xiaomianao666

插件名:global_💯懒人专用系列———视频下载

Jul 25th, 2024
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_💯懒人专用系列———视频下载@base64://Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICDwn5KvIOaHkuS6uuS4k+eUqOezu+WIlyDigJTigJTigJQg6KeG6aKR5LiL6L29Ci8vIEBuYW1lc3BhY2UgICAgbHItdG9vbGJveC1WaWRlb0Rvd25sb2FkCi8vIEB2ZXJzaW9uICAgICAgMS4wLjIyCi8vIEBkZXNjcmlwdGlvbiAg4q2V5pSv5oyB5LiL6L29QuermShiaWxpYmlsaSnvvIzmipbpn7PvvIzlv6vmiYvvvIzopb/nk5zop4bpopHvvIxZb3V0dWJl562J572R56uZ6KeG6aKR44CC4p2M5ouS57ud5pS26LS544CC4q2V5oyB57ut5pu05paw44CCCi8vIEBhdXRob3IgICAgICAgbGFuaGFoYQovLyBAaWNvbiAgICAgICAgIGh0dHBzOi8vbGYxLWNkbi10b3MuYnl0ZWdvb2Z5LmNvbS9nb29meS9pZXMvZG91eWluX3dlYi9wdWJsaWMvZmF2aWNvbi5pY28KLy8gQG1hdGNoICAgICAgICAqOi8vKi5kb3V5aW4uY29tLyoKLy8gQG1hdGNoICAgICAgICAqOi8vKi5rdWFpc2hvdS5jb20vKgovLyBAbWF0Y2ggICAgICAgICo6Ly8qLml4aWd1YS5jb20vKgovLyBAbWF0Y2ggICAgICAgICo6Ly8qLmJpbGliaWxpLmNvbS8qCi8vIEBtYXRjaCAgICAgICAgKjovLyoueW91dHViZS5jb20vKgovLyBAcmVxdWlyZSAgICAgIGh0dHBzOi8vbGYyNi1jZG4tdG9zLmJ5dGVjZG50cC5jb20vY2RuL2V4cGlyZS0xLU0vY3J5cHRvLWpzLzQuMS4xL2NyeXB0by1qcy5taW4uanMKLy8gQGdyYW50ICAgICAgICBHTV9yZWdpc3Rlck1lbn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BzZXRTdHlsZSgpewogICAgICAgICAgICBsZXQgbWVudVNldFN0eWxlID0gYAogICAgICAgICAgICAgICAgICAgICAgICAuemhtTWFza3sKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6OTk5OTk5OTk5OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojMDAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IGZpeGVkO3RvcDogMDtyaWdodDogMDtib3R0b206IDA7bGVmdDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wYWNpdHk6MC44OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC53cmFwLWJveHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6MTAwMDAwMDAwMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOmZpeGVkOzt0b3A6IDUwJTtsZWZ0OiA1MCU7dHJhbnNmb3JtOiB0cmFuc2xhdGUoLTUwJSwgLTIwMHB4KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiAzMDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiAjNTU1OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDVweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJmbG93OmhpZGRlbjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQ6MTZweCBudW1Gb250LFBpbmdGYW5nU0MtUmVndWxhcixUYWhvbWEsTWljcm9zb2Z0IFlhaGVpLHNhbnMtc2VyaWYgIWltcG9ydGFudDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtd2VpZ2h0OjQwMCAhaW1wb3J0YW50OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZXRXcmFwSGVhZHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6I2YyNDQ0MztoZWlnaHQ6NDBweDtjb2xvcjojZmZmO3RleHQtYWxpZ246Y2VudGVyO2xpbmUtaGVpZ2h0OjQwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNldFdyYXBMaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNldFdyYXBMaSBsaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmY7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItYm90dG9tOjFweCBzb2xpZCAjZWVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luOjBweCAhaW1wb3J0YW50OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzoxMnB4IDIwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO2FsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXN0LXN0eWxlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAuc2V0V3JhcExpQ29udGVudHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO2FsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNldFdyYXBTYXZlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246YWJzb2x1dGU7dG9wOi0ycHg7cmlnaHQ6MTBweDtmb250LXNpemU6MjRweDtjdXJzb3I6cG9pbnRlcgogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0Rm9vdHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOmFic29sdXRlO2JvdHRvbTowcHg7cGFkZGluZzoxMHB4IDIwcHg7d2lkdGg6MTAwJTsKICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDoxMDAwMDAwMDA5O2JhY2tncm91bmQ6I2ZlZjllZjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldEZvb3RMaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6IDEycHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0Rm9vdExpIGxpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogaW5saW5lLWZsZXg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOjBweCAycHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47YWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZTogMTJweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldEZvb3RMaSBsaSBhewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6IzU1NTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldEZvb3RMaSBhOmhvdmVyIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiNmZTZkNzM7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRQYWdlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDoxMDAwMDAwMDAxOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246YWJzb2x1dGU7dG9wOjBweDtsZWZ0OjMwMHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZDojZmZmOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6MzAwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6MTAwJTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldFVsSGVhZHsKICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRQYWdlSGVhZHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1ib3R0b206MXB4IHNvbGlkICNjY2M7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6NDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUtaGVpZ2h0OjQwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6I2ZlNmQ3MzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiNmZmY7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6IDE1cHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRQYWdlTGl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW46MHB4O3BhZGRpbmc6MHB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0UGFnZUxpIGxpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlzdC1zdHlsZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6OHB4IDIwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItYm90dG9tOjFweCBzb2xpZCAjZWVlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aGlodVNldFBhZ2V7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6LWluZGV4OjEwMDAwMDAwMDI7cG9zaXRpb246YWJzb2x1dGU7dG9wOjBweDtsZWZ0OjMwMHB4O2JhY2tncm91bmQ6I2ZmZjt3aWR0aDozMDBweDtoZWlnaHQ6MTAwJTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldFBhZ2VJbnB1dHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXggIWltcG9ydGFudDtqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47YWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhpaHVTZXRQYWdlTGl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW46MHB4O3BhZGRpbmc6MHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OjI1OHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3ZlcmZsb3cteTogc2Nyb2xsOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAuemhpaHVTZXRQYWdlQ29udGVudHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXggIWltcG9ydGFudDtqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47YWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgLnpobV9jaXJjdWxhcnsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiA0MHB4O2hlaWdodDogMjBweDtib3JkZXItcmFkaXVzOiAxNnB4O3RyYW5zaXRpb246IC4zcztjdXJzb3I6IHBvaW50ZXI7Ym94LXNoYWRvdzogMCAwIDNweCAjOTk5IGluc2V0OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5yb3VuZC1idXR0b257CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogMjBweDtoZWlnaHQ6IDIwcHg7O2JvcmRlci1yYWRpdXM6IDUwJTtib3gtc2hhZG93OiAwIDFweCA1cHggcmdiYSgwLDAsMCwuNSk7dHJhbnNpdGlvbjogLjNzO3Bvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX2JhY2t7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXI6IHNvbGlkICNGRkY7IGJvcmRlci13aWR0aDogMCAzcHggM3B4IDA7IGRpc3BsYXk6IGlubGluZS1ibG9jazsgcGFkZGluZzogM3B4O3RyYW5zZm9ybTogcm90YXRlKDEzNWRlZyk7ICAtd2Via2l0LXRyYW5zZm9ybTogcm90YXRlKDEzNWRlZyk7bWFyZ2luLWxlZnQ6MTBweDtjdXJzb3I6cG9pbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudG8tcmlnaHR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW4tbGVmdDoyMHB4OyBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHBhZGRpbmc6IDNweDt0cmFuc2Zvcm06IHJvdGF0ZSgtNDVkZWcpOyAtd2Via2l0LXRyYW5zZm9ybTogcm90YXRlKC00NWRlZyk7Y3Vyc29yOnBvaW50ZXI7CgogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0U2F2ZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZToyNHB4O2N1cnNvcjpwb2ludGVyO21hcmdpbi1yaWdodDo1cHg7bWFyZ2luLWJvdHRvbTo0cHg7Y29sb3I6I0ZGRjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3NldF9wYWdlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDoxMDAwMDAwMDAzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246YWJzb2x1dGU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b3A6MHB4O2xlZnQ6MzAwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kOiNmZmY7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDozMDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDoxMDAlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1fc2V0X3BhZ2VfaGVhZGVyewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWJvdHRvbToxcHggc29saWQgI2NjYzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDo0MHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZS1oZWlnaHQ6NDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojZmU2ZDczOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6I2ZmZjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZTogMTVweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3NldF9wYWdlX2NvbnRlbnR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4ICFpbXBvcnRhbnQ7anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO2FsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpobV9zZXRfcGFnZV9saXN0ewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luOjBweDtwYWRkaW5nOjBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogMjIwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdy15OiBzY3JvbGw7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1fc2V0X3BhZ2VfbGlzdDo6LXdlYmtpdC1zY3JvbGxiYXIgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyrmu5rliqjmnaHmlbTkvZPmoLflvI8qLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGggOiAwcHg7ICAvKumrmOWuveWIhuWIq+WvueW6lOaoquerlua7muWKqOadoeeahOWwuuWvuCovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDFweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3NldF9wYWdlX2xpc3Q6Oi13ZWJraXQtc2Nyb2xsYmFyLXRodW1iIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8q5rua5Yqo5p2h6YeM6Z2i5bCP5pa55Z2XKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1yYWRpdXMgICA6IDJweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNmZTZkNzM7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpobV9zZXRfcGFnZV9saXN0Ojotd2Via2l0LXNjcm9sbGJhci10cmFjayB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKua7muWKqOadoemHjOmdoui9qOmBkyovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93ICAgOiBpbnNldCAwIDAgNXB4IHJnYmEoMCwgMCwgMCwgMC4yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQgICA6ICNlZGVkZWQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItcmFkaXVzOiAxMHB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1fc2V0X3BhZ2VfbGlzdCBsaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qYm9yZGVyLWJvdHRvbToxcHggc29saWQgI2NjYzsqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzoxMnB4IDIwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OmJsb2NrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWJvdHRvbToxcHggc29saWQgI2VlZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBsaTpsYXN0LWNoaWxkewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWJvdHRvbTpub25lOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1fc2Nyb2xsewogICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdy15OiBzY3JvbGwgIWltcG9ydGFudDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3Njcm9sbDo6LXdlYmtpdC1zY3JvbGxiYXIgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyrmu5rliqjmnaHmlbTkvZPmoLflvI8qLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGggOiAwcHg7ICAvKumrmOWuveWIhuWIq+WvueW6lOaoquerlua7muWKqOadoeeahOWwuuWvuCovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDFweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3Njcm9sbDo6LXdlYmtpdC1zY3JvbGxiYXItdGh1bWIgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyrmu5rliqjmnaHph4zpnaLlsI/mlrnlnZcqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1cyAgIDogMnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZlNmQ3MzsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3Njcm9sbDo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2sgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyrmu5rliqjmnaHph4zpnaLovajpgZMqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdyAgIDogaW5zZXQgMCAwIDVweCByZ2JhKDAsIDAsIDAsIDAuMik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kICAgOiAjZWRlZGVkOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogMTBweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAvKi1mb3JtLSovCiAgICAgICAgICAgICAgICAgICAgICAgIDpyb290IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0tYmFzZS1jb2xvcjogIzQzNGE1NjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0td2hpdGUtY29sb3ItcHJpbWFyeTogI2Y3ZjhmODsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0td2hpdGUtY29sb3Itc2Vjb25kYXJ5OiAjZmVmZWZlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1ncmF5LWNvbG9yLXByaW1hcnk6ICNjMmMyYzI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLWdyYXktY29sb3Itc2Vjb25kYXJ5OiAjYzJjMmMyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1ncmF5LWNvbG9yLXRlcnRpYXJ5OiAjNjc2Zjc5OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1hY3RpdmUtY29sb3I6ICMyMjdjOWQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLXZhbGlkLWNvbG9yOiAjYzJjMmMyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1pbnZhbGlkLWNvbG9yOiAjZjcyZjQ3OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1pbnZhbGlkLWljb246IHVybCgiZGF0YTppbWFnZS9zdmcreG1sO2NoYXJzZXQ9dXRmOCwlM0NzdmclMjB4bWxucyUzRCUyMmh0dHAlM0ElMkYlMkZ3d3cudzMub3JnJTJGMjAwMCUyRnN2ZyUyMiUyMHdpZHRoJTNEJTIyMjQlMjIlMjBoZWlnaHQlM0QlMjIyNCUyMiUyMHZpZXdCb3glM0QlMjIwJTIwMCUyMDI0JTIwMjQlMjIlM0UlMjAlM0NwYXRoJTIwZCUzRCUyMk0xMy40MSUyMDEybDQuMy00LjI5YTElMjAxJTIwMCUyMDElMjAwLTEuNDItMS40MkwxMiUyMDEwLjU5bC00LjI5LTQuM2ExJTIwMSUyMDAlMjAwJTIwMC0xLjQyJTIwMS40Mmw0LjMlMjA0LjI5LTQuMyUyMDQuMjlhMSUyMDElMjAwJTIwMCUyMDAlMjAwJTIwMS40MiUyMDElMjAxJTIwMCUyMDAlMjAwJTIwMS40MiUyMDBsNC4yOS00LjMlMjA0LjI5JTIwNC4zYTElMjAxJTIwMCUyMDAlMjAwJTIwMS40MiUyMDAlMjAxJTIwMSUyMDAlMjAwJTIwMCUyMDAtMS40MnolMjIlMjBmaWxsJTNEJTIyJTIzZjcyZjQ3JTIyJTIwJTJGJTNFJTNDJTJGc3ZnJTNFIik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXQgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAxNnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmlnaHQ6MHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtbW96LWFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcHBlYXJhbmNlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZCB2YXIoLS1ncmF5LWNvbG9yLXByaW1hcnkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogM3B4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAxLjdlbTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiAxLjc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzogMnB4IDFlbTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHQtb3ZlcmZsb3c6IGVsbGlwc2lzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbjogYmFja2dyb3VuZC1jb2xvciAwLjNzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6NTUlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOjE0cHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2l6aW5nOiBpbml0aWFsOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X19ib2R5Oi1tcy1pbnB1dC1wbGFjZWhvbGRlciB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcjogdmFyKC0tZ3JheS1jb2xvci1zZWNvbmRhcnkpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X19ib2R5OjotbW96LXBsYWNlaG9sZGVyIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiB2YXIoLS1ncmF5LWNvbG9yLXNlY29uZGFyeSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXRfX2JvZHk6OnBsYWNlaG9sZGVyIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiB2YXIoLS1ncmF5LWNvbG9yLXNlY29uZGFyeSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X19ib2R5W2RhdGEtaXMtdmFsaWRdIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmctcmlnaHQ6IDFlbTsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXRfX2JvZHlbZGF0YS1pcy12YWxpZD10cnVlXSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLXZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keVtkYXRhLWlzLXZhbGlkPWZhbHNlXSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLWludmFsaWQtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdzogaW5zZXQgMCAwIDAgMXB4IHZhcigtLWludmFsaWQtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X19ib2R5OmZvY3VzIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0tYWN0aXZlLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCB2YXIoLS1hY3RpdmUtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0bGluZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keTotd2Via2l0LWF1dG9maWxsIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb24tZGVsYXk6IDk5OTlzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLXdlYmtpdC10cmFuc2l0aW9uLXByb3BlcnR5OiBiYWNrZ3JvdW5kLWNvbG9yOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbi1wcm9wZXJ0eTogYmFja2dyb3VuZC1jb2xvcjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fdmFsaWRhdG9yIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtcG9zaXRpb246IHJpZ2h0IDAuNWVtIGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtcmVwZWF0OiBuby1yZXBlYXQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLXNpemU6IDEuNWVtOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAxMDAlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVmdDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvcDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiAxMDAlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDogLTE7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXRfX2JvZHlbZGF0YS1pcy12YWxpZD1mYWxzZV0gKyAudGV4dC1pbnB1dF9fdmFsaWRhdG9yIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtaW1hZ2U6IHZhcigtLWludmFsaWQtaWNvbik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNlbGVjdC1ib3ggewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNpemluZzogaW5oZXJpdDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZTogMTZweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb246IGJhY2tncm91bmQtY29sb3IgMC41cyBlYXNlLW91dDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOjkwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNlbGVjdC1ib3g6OmFmdGVyIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0tZ3JheS1jb2xvci1zZWNvbmRhcnkpIHRyYW5zcGFyZW50IHRyYW5zcGFyZW50IHRyYW5zcGFyZW50OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXN0eWxlOiBzb2xpZDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci13aWR0aDogNnB4IDRweCAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm90dG9tOiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudDogIiI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW46IGF1dG8gMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmlnaHQ6IC03MnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9wOiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6LWluZGV4OiAxOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZWxlY3QtYm94X19ib2R5IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaXppbmc6IGluaXRpYWw7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtbW96LWFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcHBlYXJhbmNlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZCB2YXIoLS1ncmF5LWNvbG9yLXByaW1hcnkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogM3B4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAxLjdlbTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiAxLjc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nLWxlZnQ6IDFlbTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmctcmlnaHQ6IGNhbGMoMWVtICsgMTZweCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTQwJTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZToxNHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZy10b3A6MnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZy1ib3R0b206MnB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZWxlY3QtYm94X19ib2R5W2RhdGEtaXMtdmFsaWQ9dHJ1ZV0gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWNvbG9yOiB2YXIoLS12YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93OiBpbnNldCAwIDAgMCAxcHggdmFyKC0tdmFsaWQtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZWxlY3QtYm94X19ib2R5W2RhdGEtaXMtdmFsaWQ9ZmFsc2VdIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0taW52YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93OiBpbnNldCAwIDAgMCAxcHggdmFyKC0taW52YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNlbGVjdC1ib3hfX2JvZHkuZm9jdXMtdmlzaWJsZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLWFjdGl2ZS1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93OiBpbnNldCAwIDAgMCAxcHggdmFyKC0tYWN0aXZlLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG91dGxpbmU6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNlbGVjdC1ib3hfX2JvZHk6LXdlYmtpdC1hdXRvZmlsbCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2l0aW9uLWRlbGF5OiA5OTk5czsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC13ZWJraXQtdHJhbnNpdGlvbi1wcm9wZXJ0eTogYmFja2dyb3VuZC1jb2xvcjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb24tcHJvcGVydHk6IGJhY2tncm91bmQtY29sb3I7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHRhcmVhX19ib2R5IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC13ZWJraXQtYXBwZWFyYW5jZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC1tb3otYXBwZWFyYW5jZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcjogMXB4IHNvbGlkIHZhcigtLWdyYXktY29sb3ItcHJpbWFyeSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItcmFkaXVzOiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNpemluZzogaW5pdGlhbDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQ6IGluaGVyaXQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZWZ0OiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0dGVyLXNwYWNpbmc6IGluaGVyaXQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzogMWVtOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzaXplOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9wOiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbjogYmFja2dyb3VuZC1jb2xvciAwLjVzIGVhc2Utb3V0OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0YXJlYV9fYm9keTpvbmx5LWNoaWxkIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2l6ZTogdmVydGljYWw7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHRhcmVhX19ib2R5OmZvY3VzIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0tYWN0aXZlLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCB2YXIoLS1hY3RpdmUtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0bGluZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dGFyZWFfX2JvZHlbZGF0YS1pcy12YWxpZD10cnVlXSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLXZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCB2YXIoLS12YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHRhcmVhX19ib2R5W2RhdGEtaXMtdmFsaWQ9ZmFsc2VdIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0taW52YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93OiBpbnNldCAwIDAgMCAxcHggdmFyKC0taW52YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0YXJlYSAuX2R1bW15LWJveCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW4taGVpZ2h0OiAyNDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdy13cmFwOiBicmVhay13b3JkOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzogMWVtOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlzaWJpbGl0eTogaGlkZGVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpdGUtc3BhY2U6IHByZS13cmFwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd29yZC13cmFwOiBicmVhay13b3JkOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50b0xlZnRNb3ZlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbmltYXRpb246bW92ZVRvTGVmdCAwLjVzIGluZmluaXRlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLXdlYmtpdC1hbmltYXRpb246bW92ZVRvTGVmdCAwLjVzIGluZmluaXRlOyAvKlNhZmFyaSBhbmQgQ2hyb21lKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbi1pdGVyYXRpb24tY291bnQ6MTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbi1maWxsLW1vZGU6IGZvcndhcmRzOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBAa2V5ZnJhbWVzIG1vdmVUb0xlZnR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tIHtsZWZ0OjIwMHB4O30KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvIHtsZWZ0OjBweDt9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIEAtd2Via2l0LWtleWZyYW1lcyBtb3ZlVG9MZWZ0IC8qU2FmYXJpIGFuZCBDaHJvbWUqL3sKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyb20ge2xlZnQ6MjAwcHg7fQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8ge2xlZnQ6MHB4O30KICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgLnRvUmlnaHRNb3ZlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbmltYXRpb246bW92ZVRvUmlnaHQgMnMgaW5maW5pdGU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjptb3ZlVG9SaWdodCAycyBpbmZpbml0ZTsgLypTYWZhcmkgYW5kIENocm9tZSovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb24taXRlcmF0aW9uLWNvdW50OjE7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb24tZmlsbC1tb2RlOiBmb3J3YXJkczsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBAa2V5ZnJhbWVzIG1vdmVUb1JpZ2h0ewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbSB7bGVmdDowcHg7fQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8ge2xlZnQ6MjAwMHB4O30KICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgQC13ZWJraXQta2V5ZnJhbWVzIG1vdmVUb1JpZ2h0IC8qU2FmYXJpIGFuZCBDaHJvbWUqL3sKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyb20ge2xlZnQ6MHB4O30KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvIHtsZWZ0OjIwMHB4O30KICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBgOwoKICAgICAgICAgICAgZG9tU3R5bGUgLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKG1lbnVTZXRTdHlsZSkpOwoKICAgICAgICAgICAgZG9tSGVhZC5hcHBlbmRDaGlsZChkb21TdHlsZSk7CiAgICAgICAgfQoKICAgICAgICBtZW51U2V0KCl7CgogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwoKICAgICAgICAgICAgdmFyIHNldExpc3RKc29uID0gWwogICAgICAgICAgICAgICAgeydvcHRpb25OYW1lJzpsYW5nLmR5VmlkZW9Eb3dubG9hZCwnb3B0aW9uSUQnOidkeVZpZGVvRG93bmxvYWQnLCdkZWZhdWx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c3RKc29uW3NldE5dLm9wdGlvbklELCcyMicpOwoKICAgICAgICAgICAgICAgIGxldCBiYWNrQ29sb3IsYXJyb3dDb2xvcixzd2l0Y2hCYWNrQ29ybG9yOwoKICAgICAgICAgICAgICAgIGlmKGxpc3RWYWx1ZSAhPSAyMil7CiAgICAgICAgICAgICAgICAgICAgYmFja0NvbG9yID0gJyNmZmYnOwogICAgICAgICAgICAgICAgICAgIGFycm93Q29sb3I9ICcjRUVFJzsKICAgICAgICAgICAgICAgICAgICBzd2l0Y2hCYWNrQ29ybG9yID0gJyNGRkYnOwoKICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgIGJhY2tDb2xvciA9ICcjZmU2ZDczJzsKICAgICAgICAgICAgICAgICAgICBhcnJvd0NvbG9yID0gJyNDQ0MnOwogICAgICAgICAgICAgICAgICAgIHN3aXRjaEJhY2tDb3Jsb3IgPSAnI0ZGRTVFNSc7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgaWYoc2V0TGlzdEpzb25bc2V0Tl0ub3B0aW9uSUQgPT0gJycpewogICAgICAgICAgICAgICAgICAgIGFycm93Q29sb3IgPSAnI0VFRSc7CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8bGk+PHNwYW4+IitzZXRMaXN0SnNvbltzZXROXS5vcHRpb25OYW1lKyI8L3NwYW4+IjsKCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgY2xhc3M9J3NldFdyYXBMaUNvbnRlbnQnPiI7CgogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8ZGl2IGNsYXNzPSd6aG1fY2lyY3VsYXInIGlkPSciK3NldExpc3RKc29uW3NldE5dLm9wdGlvbklEKyInIHN0eWxlPSdiYWNrZ3JvdW5kLWNvbG9yOiAiK3N3aXRjaEJhY2tDb3Jsb3IrIjsnPjxkaXYgY2xhc3M9J3JvdW5kLWJ1dHRvbicgc3R5bGU9J2JhY2t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SVFOSU5NyVBRSVFOSVBMiU5OCcgdGFyZ2V0PSdfYmxhbmsnPiIrbGFuZy5xdWVzdGlvbisiPC9hPjwvbGk+44O7PGxpPjxhIGhyZWY9J2h0dHBzOi8vdC5tZS8rc0dvNlpadnk1NHd6WVRsbCcgdGFyZ2V0PSdfYmxhbmsnPiIrbGFuZy50Z2dyb3VwKyI8L2E+PC9saT4iOwoKICAgICAgICAgICAgc2V0SHRtbCArPSc8L3VsPic7CgogICAgICAgICAgICBzZXRIdG1sICs9JzwvZGl2Pic7CgogICAgICAgICAgICBzZXRIdG1sICs9ICI8L2Rpdj4iOwoKICAgICAgICAgICAgaWYoZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3NldE1hc2snKSkgcmV0dXJuOwoKICAgICAgICAgICAgdGhpcy5jcmVhdGVFbGVtZW50KCdkaXYnLCd6aG1NZW51Jyk7CgogICAgICAgICAgICBsZXQgemhtTWVudSA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCd6aG1NZW51Jyk7CgogICAgICAgICAgICB6aG1NZW51LmlubmVySFRNTCA9IHNldEh0bWw7CgogICAgICAgICAgICBsZXQgdGltZXJaaG1JY29uID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICBpZiAoZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3pobU1lbnUnKSl7CgogICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXJaaG1JY29uKTsgLy8g5Y+W5raI5a6a5pe25ZmoCgogICAgICAgICAgICAgICAgICAgIGxldCBjaXJjdWxhciA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy56aG1fY2lyY3VsYXInKTsKCiAgICAgICAgICAgICAgICAgICAgY2lyY3VsYXIuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCBmdW5jdGlvbihlKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYnV0dG9uU3R5bGUgPSBpdGVtLmNoaWxkcmVuWzBdLnN0eWxlOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsZWZ0ID0gYnV0dG9uU3R5bGUubGVmdDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZWZ0ID0gcGFyc2VJbnQobGVmdCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpc3RMZWZ0VmFsdWU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobGVmdD09MCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1dHRvblN0eWxlLmxlZnQgPSAnMjJweCc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1dHRvblN0eWxlLmJhY2tncm91bmQgPSAnI2ZlNmQ3Myc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uc3R5bGUuYmFja2dyb3VuZD0nI2ZmRTVFNSc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0ubmV4dFNpYmxpbmcgJiYgaXRlbS5uZXh0U2libGluZy5nZXRBdHRyaWJ1dGUoJ2RhdGEnKSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLm5leHRTaWJsaW5nLnNldEF0dHJpYnV0ZSgnc3R5bGUnLCdib3JkZXI6IHNvbGlkICNjY2M7Ym9yZGVyLXdpZHRoOiAwIDNweCAzcHggMDsnKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlzdExlZnRWYWx1ZSA9IDIyOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidXR0b25TdHlsZS5sZWZ0ID0gJzBweCc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1dHRvblN0eWxlLmJhY2tncm91bmQgPSAnI2ZmZic7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uc3R5bGUuYmFja2dyb3VuZD0nI2ZmZic7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0ubmV4dFNpYmxpbmcpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5uZXh0U2libGluZy5zZXRBdHRyaWJ1dGUoJ3N0eWxlJywnYm9yZGVyOiBzb2xpZCAjRUVFO2JvcmRlci13aWR0aDogMCAzcHggM3B4IDA7JykKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXN0TGVmdFZhbHVlID0gMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2V0TGlzdElEID0gaXRlbS5pZDsKCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0VmFsdWUoc2V0TGlzdElELGxpc3RMZWZ0VmFsdWUpOwoKICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgfSk7CgogICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5pY29uU2V0U2F2ZScpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywoKT0+ewoKICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZj1sb2NhdGlvbi5ocmVmOwoKICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgIH0pCgogICAgICAgIH0KCiAgICAgICAgY3JlYXRlRWxlbWVudChkb20sZG9tSWQpewoKICAgICAgICAgICAgdmFyIHJvb3RFbGVtZW50ID0gZG9jdW1lbnQuYm9keTsKCiAgICAgICAgICAgIHZhciBuZXdFbGVtZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChkb20pOwoKICAgICAgICAgICAgbmV3RWxlbWVudC5pZCA9IGRvbUlkOwoKICAgICAgICAgICAgdmFyIG5ld0VsZW1lbnRIdG1sQ29udGVudCA9IGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKCcnKTsKCiAgICAgICAgICAgIHJvb3RFbGVtZW50LmFwcGVuZENoaWxkKG5ld0VsZW1lbnQpOwoKICAgICAgICAgICAgbmV3RWxlbWVudC5hcHBlbmRDaGlsZChuZXdFbGVtZW50SHRtbENvbnRlbnQpOwoKICAgICAgICB9CgogICAgICAgIHJlcXVlc3QobWV0aG9kLHVybCxkYXRhLGlzQ29va2llPScnKXsKCiAgICAgICAgICAgIGxldCByZXF1ZXN0ID0gbmV3IFhNTEh0dHBSZXF1ZXN0KCk7CgogICAgICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUscmVqZWN0KT0+ewoKICAgICAgICAgICAgICAgIHJlcXVlc3Qub25yZWFkeXN0YXRlY2hhbmdlPWZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgIGlmKHJlcXVlc3QucmVhZHlTdGF0ZT09NCl7CgogICAgICAgICAgICAgICAgICAgICAgICBpZihyZXF1ZXN0LnN0YXR1cz09MjAwKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHJlcXVlc3QucmVzcG9uc2VUZXh0KTsKCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChyZXF1ZXN0LnN0YXR1cyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIHJlcXVlc3Qub3BlbihtZXRob2QsdXJsKTsKICAgICAgICAgICAgICAgIC8vcmVxdWVzdC53aXRoQ3JlZGVudGlhbHMgPSB0cnVlOwogICAgICAgICAgICAgICAgaWYoaXNDb29raWUpewogICAgICAgICAgICAgICAgICAgIHJlcXVlc3Qud2l0aENyZWRlbnRpYWxzID0gdHJ1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJlcXVlc3Quc2V0UmVxdWVzdEhlYWRlcignQ29udGVudC1UeXBlJywgJ2FwcGxpY2F0aW9uL3gtd3d3LWZvcm0tdXJsZW5jb2RlZCcpOwogICAgICAgICAgICAgICAgcmVxdWVzdC5zZW5kKGRhdGEpOwoKICAgICAgICAgICAgfSkKCiAgICAgICAgfQoKICAgICAgICBzZXRDb29raWUoY25hbWUsY3ZhbHVlLGV4ZGF5cyl7CgogICAgICAgICAgICB2YXIgZCA9IG5ldyBEYXRlKCk7CgogICAgICAgICAgICBkLnNldFRpbWUoZC5nZXRUaW1lKCkrKGV4ZGF5cyoyNCo2MCo2MCoxMDAwKSk7CgogICAgICAgICAgICB2YXIgZXhwaXJlcyA9ICJleHBpcmVzPSIrZC50b0dNVFN0cmluZygpOwoKICAgICAgICAgICAgZG9jdW1lbnQuY29va2llID0gY25hbWUrIj0iK2N2YWx1ZSsiOyAiK2V4cGlyZXM7CiAgICAgICAgfQoKICAgICAgICBnZXRDb29raWUoY25hbWUpewogICAgICAgICAgICB2YXIgbmFtZSA9IGNuYW1lICsgIj0iOwogICAgICAgICAgICB2YXIgY2EgPSBkb2N1bWVudC5jb29raWUuc3BsaXQoJzsnKTsKICAgICAgICAgICAgZm9yKHZhciBpPTA7IGk8Y2EubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIHZhciBjID0gY2FbaV0udHJpbSgpOwogICAgICAgICAgICAgICAgaWYgKGMuaW5kZXhPZihuYW1lKT09MCkgeyByZXR1cm4gYy5zdWJzdHJpbmcobmFtZS5sZW5ndGgsYy5sZW5ndGgpOyB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuICIiOwogICAgICAgIH0KCiAgICAgICAgZ2V0UXVlcnlTdHJpbmcoZSkgewogICAgICAgICAgICB2YXIgdCA9IG5ldyBSZWdFeHAoIihefCYpIiArIGUgKyAiPShbXiZdKikoJnwkKSIpOwogICAgICAgICAgICB2YXIgYSA9IHdpbmRvdy5sb2NhdGlvbi5zZWFyY2guc3Vic3RyKDEpLm1hdGNoKHQpOwogICAgICAgICAgICBpZiAoYSAhPSBudWxsKSByZXR1cm4gYVsyXTsKICAgICAgICAgICAgcmV0dXJuICIiOwogICAgICAgIH0KCiAgICAgICAgZ2V0VXJsUGFyYW1zKHVybCl7CiAgICAgICAgICAgIGxldCByZWcgPSAvKFtePyYrI10rKT0oW14/JisjXSspL2c7CiAgICAgICAgICAgIGxldCBvYmo9e307CiAgICAgICAgICAgIHVybC5yZXBsYWNlKHJlZywocmVzLCQxLCQyKT0+e29ialskMV09JDJ9KTsKICAgICAgICAgICAgcmV0dXJuIG9iajsKICAgICAgICB9CgogICAgICAgIHN0YXRpYyBnZXRFbGVtZW50KGNzcyxhbGw9JycpewoKICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLHJlamVjdCk9PnsKCiAgICAgICAgICAgICAgICBsZXQgbnVtID0gMDsKCiAgICAgICAgICAgICAgICBsZXQgdGltZXIgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICBudW0rKwoKICAgICAgICAgICAgICAgICAgICBsZXQgZG9tOwoKICAgICAgICAgICAgICAgICAgICBpZihhbGwgPT0gZmFsc2UpewoKICAgICAgICAgICAgICAgICAgICAgICAgZG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3Rvcihjc3MpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoZG9tKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKGRvbSk7CgogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgZG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbChjc3MpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoZG9tLmxlbmd0aD4wKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKGRvbSk7CgogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBpZihudW09PTIwKXsKICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUoZmFsc2UpOwogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICB9LDMwMCkKCiAgICAgICAgICAgICAgICB9KQoKICAgICAgICB9CgogICAgICAgIHN0YXRpYyB0b2FzdChtc2csZHVyYXRpb24pewoKICAgICAgICAgICAgZHVyYXRpb249aXNOYU4oZHVyYXRpb24pPzMwMDA6ZHVyYXRpb247CgogICAgICAgICAgICBsZXQgdG9hc3REb20gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTsKCiAgICAgICAgICAgIHRvYXN0RG9tLmlubmVySFRNTCA9IG1zZzsKCiAgICAgICAgICAgIC8vdG9hc3REb20uc3R5bGUuY3NzVGV4dD0id2lkdGg6IDYwJTttaW4td2lkdGg6IDE1MHB4O29wYWNpdHk6IDAuNztoZWlnaHQ6IDMwcHg7Y29sb3I6IHJnYigyNTUsIDI1NSwgMjU1KTtsaW5lLWhlaWdodDogMzBweDt0ZXh0LWFsaWduOiBjZW50ZXI7Ym9yZGVyLXJhZGl1czogNXB4O3Bvc2l0aW9uOiBmaXhlZDt0b3A6IDQwJTtsZWZ0OiAyMCU7ei1pbmRleDogO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iA9IGljb25WaXBQb3NpdGlvbj09J2xlZnQnPydyb3cnOidyb3ctcmV2ZXJzZSc7CgogICAgICAgICAgICBsZXQgcGxheVZpZGVvU3R5bGUgPSBgCiAgICAgICAgICAgICAgIC56aG1fcGxheV92aWRvZV9pY29uewogICAgICAgICAgICAgICAgICBwYWRkaW5nLXRvcDoycHg7CiAgICAgICAgICAgICAgICAgIGN1cnNvcjpwb2ludGVyOwogICAgICAgICAgICAgICAgICB6LWluZGV4Ojk5OTk5OTsKICAgICAgICAgICAgICAgICAgcG9zaXRpb246Zml4ZWQ7JHtpY29uVmlwUG9zaXRpb259OjVweDt0b3A6JHtpY29uVmlwVG9wfXB4OwogICAgICAgICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjsKICAgICAgICAgICAgICAgICAgb3ZlcmZsb3c6dmlzaWJsZTsKICAgICAgICAgICAgICAgICAgZGlzcGxheTpmbGV4OwogICAgICAgICAgICAgICAgICBmbGV4LWRpcmVjdGlvbjoke3NvcnREaXZ9OwogICAgICAgICAgICAgICAgICB3aWR0aDphdXRvOwogICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgIC56aG1fcGxheV92aWRlb193cmFwewogICAgICAgICAgICAgICAgICB6LWluZGV4Ojk5OTk5OTk7CiAgICAgICAgICAgICAgICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICAgICAgICAgICAgICAgIHdpZHRoOjMwMHB4OwogICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgIC5pY29uTG9nb3sKICAgICAgICAgICAgICAgb3BhY2l0eToke2ljb25WaXBPcGFjaXR5LzEwMH07CiAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVvX2xpbmV7CiAgICAgICAgICAgICAgICAgIHdpZHRoOjMyMHB4OwogICAgICAgICAgICAgICAgICBoZWlnaHQ6YXV0bzsKICAgICAgICAgICAgICAgICAgb3ZlcmZsb3cteTpzY3JvbGw7CiAgICAgICAgICAgICAgICAgIG92ZXJmbG93LXg6aGlkZGVuOwogICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgIC56aG1fcGxheV92aWRlX2xpbmVfdWx7CiAgICAgICAgICAgICAgICAgIHdpZHRoOjMwMHB4OwogICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7CiAgICAgICAgICAgICAgICAgIGZsZXgtZmxvdzogcm93IHdyYXA7CiAgICAgICAgICAgICAgICAgIGxpc3Qtc3R5bGU6IG5vbmU7CiAgICAgICAgICAgICAgICAgIHBhZGRpbmc6MHB4OwogICAgICAgICAgICAgICAgICBtYXJnaW46MHB4OwoKICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAuemhtX3BsYXlfdmlkZW9fbGluZV91bF9saXsKICAgICAgICAgICAgICAgICAgcGFkZGluZzo0cHggMHB4OwogICAgICAgICAgICAgICAgICBtYXJnaW46MnB4OwogICAgICAgICAgICAgICAgICB3aWR0aDozMCU7CiAgICAgICAgICAgICAgICAgIGNvbG9yOiNGRkY7CiAgICAgICAgICAgICAgICAgIHRleHQtYWxpZ246Y2VudGVyOwogICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiNmMjQ0NDM7CiAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6MHB4IDBweCAxMHB4ICNmZmY7CiAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZToxNHB4OwogICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgIC56aG1fcGxheV92aWRlb19saW5lX3VsX2xpOmhvdmVyewogICAgICAgICAgICAgICAgICBjb2xvcjojMjYwMDMzOwogICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiNmY2MwYzAKICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAuemhtX2xpbmVfc2VsZWN0ZWR7CiAgICAgICAgICAgICAgICAgIGNvbG9yOiMyNjAwM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sKCiAgICAgICAgICAgIF90aGlzLmNyZWF0ZUVsZW1lbnQoJ2RpdicsJ3pobUljb24nKTsKCiAgICAgICAgICAgIGxldCB6aG1QbGF5ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3pobUljb24nKTsKCiAgICAgICAgICAgIHpobVBsYXkuaW5uZXJIVE1MID0gcGxheVdyYXBIdG1sOwoKICAgICAgICB9CiAgICAgICAgLy/lt6bplK7mjInkuIvmi5bliqgKICAgICAgICAvL3R5cGU65qC55o2u5LiN5ZCM57G75Z6L77yM5aSE55CG5Zu+5qCH5Y2V5Ye75LqL5YqhCiAgICAgICAgemhtTG9nb0RyYWcodHlwZSx3ZWIpewoKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKCiAgICAgICAgICAgIHZhcsKgemhtTG9nb0RyYWc9ZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiI3pobWxvZ28iKTsKCiAgICAgICAgICAgIHZhciB6aG1Mb2dvSWNvbiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5pY29uTG9nbyIpOwoKICAgICAgICAgICAgaWYoIXpobUxvZ29EcmFnIHx8ICF6aG1Mb2dvSWNvbilyZXR1cm47CgogICAgICAgICAgICB6aG1Mb2dvRHJhZy5vbm1vdXNlZG93biA9IGZ1bmN0aW9uKGV2ZW50KXsKCiAgICAgICAgICAgICAgICBpZihldmVudC53aGljaD09MylyZXR1cm4gZmFsc2U7Ly/lsY/olL3lj7PplK4KCiAgICAgICAgICAgICAgICBsZXQgc2Vkb3duVG9wID0gemhtTG9nb0RyYWcub2Zmc2V0VG9wOwoKICAgICAgICAgICAgICAgIGxldCB6aG1Mb2dvSWNvbkhlaWdodCA9IHpobUxvZ29JY29uLm9mZnNldEhlaWdodDsKCiAgICAgICAgICAgICAgICBsZXQgYm90dG9tU3BhY2UgPSAxMDsKCiAgICAgICAgICAgICAgICBpZihldmVudC50YXJnZXQuY2xhc3NOYW1lICE9ICdpY29uTG9nbycpcmV0dXJuOwoKICAgICAgICAgICAgICAgIC8vbGV0wqBzaGlmdFjCoD3CoGV2ZW50LmNsaWVudFjCoC3CoHpobUxvZ29EcmFnLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLmxlZnQ7CiAgICAgICAgICAgICAgICBsZXQgc2hpZnR4ID0gNTsKCiAgICAgICAgICAgICAgICBsZXTCoHNoaWZ0WSA9IGV2ZW50LmNsaWVudFktemhtTG9nb0RyYWcuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkudG9wOwoKICAgICAgICAgICAgICAgIHpobUxvZ29EcmFnLnN0eWxlLnBvc2l0aW9uwqA9wqAnZml4ZWQnOwoKICAgICAgICAgICAgICAgIHpobUxvZ29EcmFnLnN0eWxlLnpJbmRleMKgPcKgOTk5OTk5OTsKCiAgICAgICAgICAgICAgICBkb2N1bWVudC5ib2R5LmFwcGVuZCh6aG1Mb2dvRHJhZyk7CgogICAgICAgICAgICAgICAgZnVuY3Rpb27CoG9uTW91c2VNb3ZlKGV2ZW50KXsKCiAgICAgICAgICAgICAgICAgICAgLy96aG1Mb2dvRHJhZy5zdHlsZS5sZWZ0wqA9wqBwYWdlWMKgLcKgc2hpZnRYwqArwqAncHgnOwogICAgICAgICAgICAgICAgICAgIHpobUxvZ29EcmFnLnN0eWxlLmxlZnTCoD3CoCc1cHgnOwoKICAgICAgICAgICAgICAgICAgICBsZXQgaGVpZ2h0ID0gd2luZG93LmlubmVySGVpZ2h0IC0gemhtTG9nb0ljb25IZWlnaHQtYm90dG9tU3BhY2U7CgogICAgICAgICAgICAgICAgICAgIGxldCB5ID0gZXZlbnQucGFnZVktc2hpZnRZOwoKICAgICAgICAgICAgICAgICAgICB5ID0gTWF0aC5taW4oTWF0aC5tYXgoMCwgeSksIGhlaWdodCk7CgogICAgICAgICAgICAgICAgICAgIHpobUxvZ29EcmFnLnN0eWxlLnRvcCA9IHkrJ3B4JzsKCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvL+WcqG1vdXNlbW92ZeS6i+S7tuS4iuenu+WKqOWbvuaghwogICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignbW91c2Vtb3ZlJyxvbk1vdXNlTW92ZSk7CiAgICAgICAgICAgICAgICAvL+advuW8gOS6i+S7tgogICAgICAgICAgICAgICAgZG9jdW1lbnQub25tb3VzZXVwID0gZnVuY3Rpb24oZSl7CgogICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdpY29uVG9wJyx6aG1Mb2dvRHJhZy5vZmZzZXRUb3ApOwoKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5yZW1vdmVFdmVudExpc3RlbmVyKCdtb3VzZW1vdmUnLMKgb25Nb3VzZU1vdmUpOwoKICAgICAgICAgICAgICAgICAgICB6aG1Mb2dvRHJhZy5vbm1vdXNldXDCoD3CoG51bGw7CgogICAgICAgICAgICAgICAgICAgIGxldCBoZWlnaHQgPSB6aG1Mb2dvRHJhZy5vZmZzZXRUb3AremhtTG9nb0ljb25IZWlnaHQrYm90dG9tU3BhY2U7CgogICAgICAgICAgICAgICAgICAgIGlmKHpobUxvZ29EcmFnLm9mZnNldFRvcCA8IDApewoKICAgICAgICAgICAgICAgICAgICAgICAgemhtTG9nb0RyYWcuc3R5bGUudG9wID0nMHB4JzsKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIGlmKHdpbmRvdy5pbm5lckhlaWdodCA8IGhlaWdodCl7CgogICAgICAgICAgICAgICAgICAgICAgICB6aG1Mb2dvRHJhZy5zdHlsZS50b3AgPXdpbmRvdy5pbm5lckhlaWdodC16aG1Mb2dvSWNvbkhlaWdodC1ib3R0b21TcGFjZSsncHgnOwoKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgfTsKCiAgICAgICAgICAgIH07CgogICAgICAgICAgICB6aG1Mb2dvRHJhZy5vbmRyYWdzdGFydMKgPcKgZnVuY3Rpb24oKXsKICAgICAgICAgICAgICAgIHJldHVybsKgZmFsc2U7CiAgICAgICAgICAgIH07CiAgICAgICAgfQoKICAgICAgICAvL+S4i+i9vQogICAgICAgIHN0YXRpYyBMUl9kb3dubG9hZCh1cmwsZmlsZW5hbWUpewoKICAgICAgICAgICAgbGV0IHVhID0gbmF2aWdhdG9yLnVzZXJBZ2VudC50b0xvd2VyQ2FzZSgpOwoKICAgICAgICAgICAgY29uc29sZS5sb2codWEubWF0Y2goL3ZlcnNpb25cLyhbXGQuXSspLipzYWZhcmkvKSk7CgogICAgICAgICAgICBpZih1YS5tYXRjaCgvdmVyc2lvblwvKFtcZC5dKykuKnNhZmFyaS8pKXsKCiAgICAgICAgICAgICAgICB3aW5kb3cub3Blbih1cmwpOwoKICAgICAgICAgICAgfWVsc2V7CiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyh1cmwpOwogICAgICAgICAgICAgICAgR01fZG93bmxvYWQodXJsLGZpbGVuYW1lKTsKICAgICAgICAgICAgfQoKCiAgICAgICAgfQoKICAgIH0KCiAgICBjbGFzcyBWaWRlb0Rvd25sb2FkQ2xhc3MgZXh0ZW5kcyBCYXNlQ2xhc3N7CgogICAgICAgIGNvbnN0cnVjdG9yKCl7CgogICAgICAgICAgICBzdXBlcigpOwogICAgICAgIH0KCiAgICAgICAgZHlWaWRlb0Rvd25sb2FkKCl7CgogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwoKICAgICAgICAgICBsZXQgdGltZXIgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgLy/ojrflj5bmiYDmnInop4bpopEKICAgICAgICAgICAgICAgbGV0IHZpZGVvRG9tQWxsID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgndmlkZW8nKTsKCiAgICAgICAgICAgICAgIC8vY29uc29sZS5sb2codmlkZW9Eb21BbGwpO3JldHVybjsKCiAgICAgICAgICAgICAgIGlmKHZpZGVvRG9tQWxsLmxlbmd0aD09MClyZXR1cm47CgogICAgICAgICAgICAgICAvL+iOt+WPluW9k+WJjeinhumikQoKICAgICAgICAgICAgICAgbGV0IHZpZGVvQWxsPVtdOwoKICAgICAgICAgICAgICAgZm9yKGxldCBpID0wO2k8dmlkZW9Eb21BbGwubGVuZ3RoO2krKyl7CgogICAgICAgICAgICAgICAgICAgbGV0IGF1dG9wbGF5ID0gdmlkZW9Eb21BbGxbaV0uZ2V0QXR0cmlidXRlKCdhdXRvcGxheScpOwoKICAgICAgICAgICAgICAgICAgIGlmKGF1dG9wbGF5ICE9PSBudWxsKXsKCiAgICAgICAgICAgICAgICAgICAgICAgdmlkZW9BbGwucHVzaCh2aWRlb0RvbUFsbFtpXSk7CgogICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICBsZXQgdmlkZW9Db250YWluZXI9bG9jYXRpb24uaHJlZi5pbmRleE9mKCdtb2RhbF9pZCcpICE9IC0xP3ZpZGVvQWxsWzBdOnZpZGVvQWxsW3ZpZGVvQWxsLmxlbmd0aC0xXTsKCiAgICAgICAgICAgICAgIGlmKCF2aWRlb0NvbnRhaW5lcilyZXR1cm47CgogICAgICAgICAgICAgICAvL+inhumikeWcsOWdgAogICAgICAgICAgICAgICBsZXQgdXJsID0gdmlkZW9Db250YWluZXIgJiYgdmlkZW9Db250YWluZXIuY2hpbGRyZW4ubGVuZ3RoPjAgJiYgdmlkZW9Db250YWluZXIuY2hpbGRyZW5bMF0uc3JjP3ZpZGVvQ29udGFpbmVyLmNoaWxkcmVuWzBdLnNyYzp2aWRlb0NvbnRhaW5lci5zcmM7CgogICAgICAgICAgICAgICAvL+inhumikUlECgogICAgICAgICAgICAgICBsZXQgdmlkZW9JZDsKCiAgICAgICAgICAgICAgIC8vbGV0IHJlc3AgPSB1cmwubWF0Y2goL14oaHR0cHM6KT9cL1wvdlswLTldKy13ZWJhP1wuZG91eWludm9kXC5jb21cLyhbYS16QS1aMC05XSspXC9bYS16QS1aMC05XStcL3ZpZGVvLyk7CgogICAgICAgICAgICAgICBsZXQgcmVzcCA9IHVybC5tYXRjaCgvXihodHRwczopP1wvXC8uK1wuY29tXC8oW2EtekEtWjAtOV0rKVwvW2EtekEtWjAtOV0rXC92aWRlby8pOwoKICAgICAgICAgICAgICAgbGV0IHJlcyA9IHVybC5tYXRjaCgvYmxvYjpodHRwczpcL1wvd3d3LmRvdXlpbi5jb21cLyguKikvKTsKCiAgICAgICAgICAgICAgIGlmKHJlc3AgJiYgcmVzcFsyXSl7CgogICAgICAgICAgICAgICAgICAgdmlkZW9JZD1yZXNwWzJdOwoKICAgICAgICAgICAgICAgfWVsc2UgaWYocmVzICYmIHJlc1sxXSl7CgogICAgICAgICAgICAgICAgICAgdmlkZW9JZD1yZXNbMV0KCiAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgIHZpZGVvSWQgPSB2aWRlb0NvbnRhaW5lci5nZXRBdHRyaWJ1dGUoJ2RhdGEteGdwbGF5ZXJpZCcpCiAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgIC8vY29uc29sZS5sb2codmlkZW9JZCk7CiAgICAgICAgICAgICAgIC8v5omA5pyJ6KeG6aKR5pON5L2c5oyJ6ZKu5Yy65Z+fCgogICAgICAgICAgICAgICBsZXQgcGxheUNvbnRhaW5lciA9IHZpZGVvQ29udGFpbmVyLnBhcmVudE5vZGUucGFyZW50Tm9kZS5xdWVyeVNlbGVjdG9yKCcueGctcmlnaHQtZ3JpZCcpOwoKICAgICAgICAgICAgICAgaWYoIXBsYXlDb250YWluZXIpcmV0dXJuOwoKICAgICAgICAgICAgICAgbGV0IHZpZGVvRG93bmxvYWREb20gPSBwbGF5Q29udGFpbmVyLnF1ZXJ5U2VsZWN0b3IoJyN6aG1EeURvd25sb2FkJyt2aWRlb0lkKTsKCiAgICAgICAgICAgICAgIGlmKHZpZGVvRG93bmxvYWREb20pewoKICAgICAgICAgICAgICAgICAgIGxldCBkb20gPSBwbGF5Q29udGFpbmVyLnF1ZXJ5U2VsZWN0b3JBbGwoJy54Z3BsYXllci1wbGF5Y2xhcml0eS1zZXR0aW5nJyk7CgogICAgICAgICAgICAgICAgICAgZm9yKGxldCBuPTA7bjxkb20ubGVuZ3RoO24rKyl7CgogICAgICAgICAgICAgICAgICAgICAgIGxldCBidG4gPSBkb21bbl0ucXVlcnlTZWxlY3RvcignLmJ0bicpOwoKICAgICAgICAgICAgICAgICAgICAgICBpZihkb21bbl0uaWQgIT0gJ3pobUR5RG93bmxvYWQnK3ZpZGVvSWQgJiYgYnRuLmlubmVyVGV4dD09J+S4i+i9vScpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9tW25dLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoZG9tW25dKTsKICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgIHJldHVybjsKCiAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgIGlmKHZpZGVvQ29udGFpbmVyICYmIHBsYXlDb250YWluZXIpewoKICAgICAgICAgICAgICAgICAgIGxldCBwbGF5Q2xhcml0eURvbSA9IHBsYXlDb250YWluZXIucXVlcnlTZWxlY3RvcignLnhncGxheWVyLXBsYXljbGFyaXR5LXNldHRpbmcnKTsKCiAgICAgICAgICAgICAgICAgICBpZighcGxheUNsYXJpdHlEb20pe2NvbnNvbGUubG9nKCfmnKrojrflj5bmmbrog73mjInpkq7lhYPntKAnKTtyZXR1cm47fQoKICAgICAgICAgICAgICAgICAgIGxldCBwYWx5Q2xhcml0eUJ0biA9IHBsYXlDbGFyaXR5RG9tLnF1ZXJ5U2VsZWN0b3IoJy5idG4nKTsKCiAgICAgICAgICAgICAgICAgICBpZighcGFseUNsYXJpdHlCdG4pe2NvbnNvbGUubG9nKCfmnKrojrflj5bmmbrog73mlofmnKzlhYPntKAnKTtyZXR1cm47fQoKICAgICAgICAgICAgICAgICAgIGxldCBkb3dubG9hZERvbSA9IHBsYXlDbGFyaXR5RG9tLmNsb25lTm9kZSh0cnVlKTsKCiAgICAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5zZXRBdHRyaWJ1dGUoJ2lkJywnemhtRHlEb3dubG9hZCcrdmlkZW9JZCk7CgogICAgICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCdzZWFyY2gnKSAhPSAtMSAmJiBsb2NhdGlvbi5ocmVmLmluZGV4T2YoJ21vZGFsX2lkJykgPT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5zdHlsZT0nbWFyZ2luLXRvcDowcHg7cGFkZGluZy10b3A6MTAwcHg7JzsKCiAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgZG93bmxvYWREb20uc3R5bGU9J21hcmdpbi10b3A6LTY4cHg7cGFkZGluZy10b3A6MTAwcHg7cGFkZGluZy1sZWZ0OjIwcHg7cGFkZGluZy1yaWdodDoyMHB4Oyc7CiAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgbGV0IGRvd25sb2FkVGV4dCA9IGRvd25sb2FkRG9tLnF1ZXJ5U2VsZWN0b3IoJy5idG4nKTsKCiAgICAgICAgICAgICAgICAgICBkb3dubG9hZFRleHQuaW5uZXJUZXh0PSfkuIvovb0nOwoKICAgICAgICAgICAgICAgICAgIGRvd25sb2FkVGV4dC5zdHlsZSA9ICdmb250LXNpemU6MTJweDtmb250LXdlaWdodDo2MDA7JzsKCiAgICAgICAgICAgICAgICAgICBkb3dubG9hZFRleHQuc2V0QXR0cmlidXRlKCdpZCcsJ3pobURvdXlpbkRvd25sb2FkJyt2aWRlb0lkKTsKCiAgICAgICAgICAgICAgICAgICBsZXQgZGV0YWlsID0gcGxheUNvbnRhaW5lci5xdWVyeVNlbGVjdG9yKCd4Zy1pY29uOm50aC1vZi10eXBlKDEpJykuY2hpbGRyZW5bMF07CgogICAgICAgICAgICAgICAgICAgbGV0IGxpbmtVcmwgPSBkZXRhaWwuZ2V0QXR0cmlidXRlKCdocmVmJyk/ZGV0YWlsLmdldEF0dHJpYnV0ZSgnaHJlZicpOmxvY2F0aW9uLmhyZWY7CgogICAgICAgICAgICAgICAgICAgaWYobGlua1VybC5pbmRleE9mKCd3d3cuZG91eWluLmNvbScpPT0tMSl7CgogICAgICAgICAgICAgICAgICAgICAgIGxpbmtVcmw9Jy8vd3d3LmRvdXlpbi5jb20nK2xpbmtVcmw7CiAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgZG93bmxvYWRUZXh0LnNldEF0dHJpYnV0ZSgnZGF0YS11cmwnLGxpbmtVcmwpOwoKICAgICAgICAgICAgICAgICAgIGRvd25sb2FkVGV4dC5yZW1vdmVBdHRyaWJ1dGUoJ3RhcmdldCcpOwoKICAgICAgICAgICAgICAgICAgIGRvd25sb2FkVGV4dC5zZXRBdHRyaWJ1dGUoJ2hyZWYnLCdqYXZhc2NyaXB0OnZvaWQoMCk7Jyk7CgogICAgICAgICAgICAgICAgICAgbGV0IHZpcnR1YWxEb20gPSBkb3dubG9hZERvbS5xdWVyeVNlbGVjdG9yKCcudmlydHVhbCcpOwoKICAgICAgICAgICAgICAgICAgIGRvd25sb2FkRG9tLm9ubW91c2VvdmVyPWZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgIC8vZG93bmxvYWREb20uY2xhc3NOYW1lPSd4Z3BsYXllci1wbGF5Y2xhcml0eS1zZXR0aW5nJzsKCiAgICAgICAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmLmluZGV4T2YoJ3NlYXJjaCcpICE9IC0xICYmIGxvY2F0aW9uLmhyZWYuaW5kZXhPZignbW9kYWxfaWQnKSA9PSAtMSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgIHZpcnR1YWxEb20uc3R5bGU9J2Rpc3BsYXk6YmxvY2sgIWltcG9ydGFudDttYXJnaW4tYm90dG9tOjM3cHg7JzsKCiAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgdmlydHVhbERvbS5zdHlsZT0nZGlzcGxheTpibG9jayAhaW1wb3J0YW50JzsKICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgZG93bmxvYWREb20ub25tb3VzZW91dD1mdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAvL2Rvd25sb2FkRG9tLmNsYXNzTmFtZT0neGdwbGF5ZXItcGxheWNsYXJpdHktc2V0dGluZyBkaXNhcHBlYXInOwogICAgICAgICAgICAgICAgICAgICAgIHZpcnR1YWxEb20uc3R5bGU9J2Rpc3BsYXk6bm9uZSAhaW1wb3J0YW50JzsKICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICBsZXQgZG93bmxvYWRIdG1sID0gJyc7CgogICAgICAgICAgICAgICAgICAgZG93bmxvYWRPcHRpb24uZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgZG93bmxvYWRIdG1sICs9IGA8ZGl2IGNsYXNzPSJpdGVtICR7aXRlbS5pZH0iIGlkPSIke2l0ZW0uaWR9JHt2aWRlb0lkfSI+JHtpdGVtLm5hbWV9PC9kaXY+YDsKCiAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgIGlmKGRvd25sb2FkRG9tLnF1ZXJ5U2VsZWN0b3IoJy52aXJ0dWFsJykpewoKICAgICAgICAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5xdWVyeVNlbGVjdG9yKCcudmlydHVhbCcpLmlubmVySFRNTCA9IGRvd25sb2FkSHRtbDsKCiAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgLy9wbGF5Q29udGFpbmVyLmFwcGVuZENoaWxkKGRvd25sb2FkRG9tKTsKCiAgICAgICAgICAgICAgICAgICBwbGF5Q2xhcml0eURvbS5hZnRlcihkb3dubG9hZERvbSk7CgogICAgICAgICAgICAgICAgICAgbGV0IHRvTGlua0RvbSA9IHBsYXlDb250YWluZXIucXVlcnlTZWxlY3RvcignI3RvTGluaycrdmlkZW9JZCk7CgogICAgICAgICAgICAgICAgICAgaWYodG9MaW5rRG9tKXsKCiAgICAgICAgICAgICAgICAgICAgICAgdG9MaW5rRG9tLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodXJsLm1hdGNoKC9eYmxvYi8pKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+WKoOWvhuinhumikeWcsOWdgO+8jOaXoOazleebtOaOpeaJk+W8gCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4odXJsKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICBsZXQgdG9Eb3dubG9hZERvbSA9IHBsYXlDb250YWluZXIucXVlcnlTZWxlY3RvcignI3RvRG93bmxvYWQnK3ZpZGVvSWQpOwoKICAgICAgICAgICAgICAgICAgIGlmKHRvRG93bmxvYWREb20pewoKICAgICAgICAgICAgICAgICAgICAgICB0b0Rvd25sb2FkRG9tLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewogICAgICAgICAgICAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nKHVybCk7cmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodXJsLm1hdGNoKC9eYmxvYi8pKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+WKoOWvhuinhumikeWcsOWdgO+8jOaXoOazleS4i+i9vScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfmraPlnKjkuIvovb3or7fnqI3kvq8nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaW5mb0RvbSA9IHBsYXlDb250YWluZXIucGFyZW50Tm9kZS5wYXJlbnROb2RlLnBhcmVudE5vZGUucXVlcnlTZWxlY3RvcignLnZpZGVvLWluZm8tZGV0YWlsJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRlc2NJbmZvID0gaW5mb0RvbT9pbmZvRG9tOmRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy56OF9WZXhQZicpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBmaWxlbmFtZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkZXNjSW5mbyAmJiBkZXNjSW5mby5pbm5lclRleHQgJiYgZGVzY0luZm8uaW5uZXJUZXh0LnJlcGxhY2VBbGwoJy4nLCcnKSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbGVuYW1lID0gZGVzY0luZm8uaW5uZXJUZXh0LnJlcGxhY2VBbGwoJy4nLCcnKSsnLm1wNCc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbGVuYW1lID0gbmV3IERhdGUoKS5nZXRUaW1lKCkrJy5tcDQnOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy5MUl9kb3dubG9hZCh1cmwsZmlsZW5hbWUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgbGV0IHRvQ29weURvbSA9IHBsYXlDb250YWluZXIucXVlcnlTZWxlY3RvcignI3RvQ29weScrdmlkZW9JZCk7CgogICAgICAgICAgICAgICAgICAgaWYodG9Db3B5RG9tKXsKCiAgICAgICAgICAgICAgICAgICAgICAgdG9Db3B5RG9tLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCflt7LlpI3liLbliLDliarotLTmnb8nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldENsaXBib2FyZCh1cmwpOwogICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAvL2NsZWFySW50ZXJ2YWwodGltZXIpOwoKICAgICAgICAgICB9LDEwMCkKCiAgICAgICAgfQoKICAgICAgICBrc1ZpZGVvRG93bmxvYWQoKXsKCiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CgogICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcignbG9hZCcsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICBhc3luYyBmdW5jdGlvbiBnZXRDb250cm9scygpewoKICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9Eb21BcnIgPSBhd2FpdCBCYXNlQ2xhc3MuZ2V0RWxlbWVudCgnLnBsYXllci12aWRlbycsMSk7CgogICAgICAgICAgICAgICAgICAgIGlmKCF2aWRlb0RvbUFycil7CgogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5rKh5pyJ5om+5YiwRE9NJyk7cmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvRG9tID0gdmlkZW9Eb21BcnIubGVuZ3RoPjI/dmlkZW9Eb21BcnJbMV06dmlkZW9Eb21BcnJbMF07CgogICAgICAgICAgICAgICAgICAgIGlmKHZpZGVvRG9tLmdldEF0dHJpYnV0ZSgnc3JjJykubWF0Y2goL15ibG9iLykpewogICAgICAgICAgICAgICAgICAgICAgICAvL+WIoOmZpOaui+eVmeS4i+i9vURPTQogICAgICAgICAgICAgICAgICAgICAgICAvKgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9Eb3dubG9hZERvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1Lc0Rvd25sb2FkJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZih2aWRlb0Rvd25sb2FkRG9tKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvRG93bmxvYWREb20ucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh2aWRlb0Rvd25sb2FkRG9tKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygnYmxvYuinhumikeaXoOazleS4i+i9vScpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIF90aGlzLmNyZWF0ZUtzVmlkZW9Eb3dubG9hZCh2aWRlb0RvbSk7CgogICAgICAgICAgICAgICAgICAgIHZpZGVvRG9tLmFkZEV2ZW50TGlzdGVuZXIoJ3BsYXlpbmcnLGZ1bmN0aW9uKCl7IC8v5pKt5pS+5LitCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCLmkq3mlL7kuK0iKTsKICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAgICAgdmlkZW9Eb20uYWRkRXZlbnRMaXN0ZW5lcignZW5kZWQnLGZ1bmN0aW9uKCl7IC8v57uT5p2fCgogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygi5pKt5pS+57uT5p2fIik7CgogICAgICAgICAgICAgICAgICAgICAgICAvL2dldENvbnRyb2xzKCk7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXV0b1BsYXkgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuYXV0by13YXJwcGVyJykuZ2V0QXR0cmlidXRlKCdhdXRvcGxheScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0b1BsYXkpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgfSwgZmFsc2UpOwoKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjdG9Eb3dubG9hZCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfmraPlnKjkuIvovb3or7fnqI3kvq8nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5VGltZVRvdGFsID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnRvdGFsJykuaW5uZXJUZXh0OwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNlY29uZCA9IHBsYXlUaW1lVG90YWwubWF0Y2goLyguKyk6KC4rKS8pOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNlY29uZFRvdGFsID0gc2Vjb25kWzFdKjYwK3BhcnNlSW50KHNlY29uZFsyXSk7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVVybCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1Lc0Rvd25sb2FkJykuZ2V0QXR0cmlidXRlKCdkYXRhLXVybCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGFjY291bnQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucHJvZmlsZS11c2VyLW5hbWUtdGl0bGUnKT9kb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucHJvZmlsZS11c2VyLW5hbWUtdGl0bGUnKS5pbm5lclRleHQ6ZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmZlZWQtYXV0aG9yJykuaW5uZXJUZXh0OwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnZpZGVvLWluZm8tdGl0bGUnKT9kb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcudmlkZW8taW5mby10aXRsZScpLmlubmVyVGV4dDpuZXcgRGF0ZSgpLmdldFRpbWUoKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb0ZpbGVOYW1lID0gKGFjY291bnQgJiYgdGl0bGUpP2FjY291bnQrJy0nK3RpdGxlKycubXA0JzpuZXcgRGF0ZSgpLmdldFRpbWUoKSsnLm1wNCc7CgogICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MuTFJfZG93bmxvYWQoZGF0YVVybCx2aWRlb0ZpbGVOYW1lKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIC8qCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoc2Vjb25kVG90YWw8MzApewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9GaWxlTmFtZSA9IG5ldyBEYXRlKCkuZ2V0VGltZSgpKycubXA0JzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fZG93bmxvYWQoZGF0YVVybCx2aWRlb0ZpbGVOYW1lKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4oZGF0YVVybCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0b0NvcHknKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn5bey5aSN5Yi25Yiw5Ymq6LS05p2/Jyk7CgogICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRDbGlwYm9hcmQodmlkZW9Eb20uZ2V0QXR0cmlidXRlKCdzcmMnKSk7CiAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3RvTGluaycpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4odmlkZW9Eb20uZ2V0QXR0cmlidXRlKCdzcmMnKSk7CgogICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGdldENvbnRyb2xzKCk7CgogICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKGUpewoKICAgICAgICAgICAgICAgICAgICBnZXRDb250cm9scygpOwoKICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoIndoZWVsIixnZXRDb250cm9scyk7CgogICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoJ2tleWRvd24nLGZ1bmN0aW9uKGUpewoKICAgICAgICAgICAgICAgICAgICBpZihlLmNvZGU9PSdBcnJvd0Rvd24nIHx8IGUuY29kZT09J0Fycm93VXAnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGdldENvbnRyb2xzKCk7CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICB9KQoKCiAgICAgICAgfQoKICAgICAgICBjcmVhdGVLc1ZpZGVvRG93bmxvYWQodmlkZW9Eb20pewoKICAgICAgICAgICAgbGV0IG1hdGNoID0gL15odHRwcz86XC9cL3d3d1wua3VhaXNob3VcLmNvbVwvKC4rKS87CgogICAgICAgICAgICBsZXQgcmVzcCA9IGxvY2F0aW9uLmhyZWYubWF0Y2gobWF0Y2gpOwoKICAgICAgICAgICAgaWYoIXJlc3AgfHwgKHJlc3BbMV0uaW5kZXhPZignc2hvcnQtdmlkZW8nKSA9PSAtMSAmJiByZXNwWzFdLmluZGV4T2YoJ3ZpZGVvJykgPT0tMSAmJiByZXNwWzFdLmluZGV4T2YoJ25ldy1yZWNvJykgPT0gLTEpKXsKCiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5b2T5YmN5LiN5piv6KeG6aKR5pKt5pS+6aG1Jyk7cmV0dXJuOwogICAgICAgICAgICB9CgogICAgICAgICAgICBpZihyZXNwWzFdLmluZGV4T2YoJ3Nob3J0LXZpZGVvJykgIT0gLTEpewoKICAgICAgICAgICAgICAgIGxldCBwbGF5ZXJBcmVhID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnZpZGVvLWNvbnRhaW5lci1wbGF5ZXInKTsKCiAgICAgICAgICAgICAgICBsZXQgcGxheWVyQXJlYVdpZHRoID0gcGxheWVyQXJlYS5zdHlsZS53aWR0aC5tYXRjaCgvKC4rKXB4Lyk7CgogICAgICAgICAgICAgICAgbGV0IHBsYXllckJhclByb2dyZXNzID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnBsYXllci1iYXItcHJvZ3Jlc3MnKTsKCiAgICAgICAgICAgICAgICBwbGF5ZXJCYXJQcm9ncmVzcy5zdHlsZS53aWR0aCA9IHBsYXllckFyZWFXaWR0aFsxXS0zMjArJ3B4JzsKCiAgICAgICAgICAgICAgICBsZXQgdGltZVRvdGFsID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnRvdGFsJyk7CgogICAgICAgICAgICAgICAgdGltZVRvdGFsLnN0eWxlLnJpZ2h0PScxODBweCc7CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGxldCBjb250cm9scyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5yaWdodCcpOwoKICAgICAgICAgICAgbGV0IHZpZGVvRG93bmxvYWREb20gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtS3NEb3dubG9hZCcpOwoKICAgICAgICAgICAgaWYodmlkZW9Eb3dubG9hZERvbSl7CgogICAgICAgICAgICAgICAgdmlkZW9Eb3dubG9hZERvbS5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHZpZGVvRG93bmxvYWREb20pOwogICAgICAgICAgICB9CgogICAgICAgICAgICBsZXQgZGV0YWlsRG9tID0gY29udHJvbHMucXVlcnlTZWxlY3RvcignZGl2Om50aC1vZi10eXBlKDEpJyk7CgogICAgICAgICAgICBsZXQgeGdJY29uID0gZGV0YWlsRG9tLmNsb25lTm9kZSh0cnVlKTsKCiAgICAgICAgICAgIGxldCBsaW5rVXJsID0gdmlkZW9Eb20uZ2V0QXR0cmlidXRlKCdzcmMnKTsKCiAgICAgICAgICAgIHhnSWNvbi5xdWVyeVNlbGVjdG9yKCcua3dhaS1wbGF5ZXItdm9sdW1lLXNvdW5kJykuaW5uZXJIVE1MPSI8ZGl2IHN0eWxlPSdjdXJzb3I6cG9pbnRlcjsnPuS4i+i9vTwvZGl2PiI7CgogICAgICAgICAgICBsZXQgc2xpZGVyID0geGdJY29uLnF1ZXJ5U2VsZWN0b3IoJy5wbC1zbGlkZXInKTsKCiAgICAgICAgICAgIC8vc2xpZGVyLnN0eWxlID0gJ3dpZHRoOjQ5cHg7cGFkZGluZzoxMHB4IDVweCAyMHB4Oyc7CgogICAgICAgICAgICBsZXQgZG93bmxvYWRMaXN0ID0gJyc7CgogICAgICAg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1wb3J0YW50JzsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAvL+mHjeaehOaSreaUvuaTjeS9nOaMiemSrgoKICAgICAgICAgICAgbGV0IHpobUtzQnV0dG9uID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3pobUtzQnV0dG9uJyk7CgogICAgICAgICAgICAvL2NvbnNvbGUubG9nKHpobUtzQnV0dG9uKTsKCiAgICAgICAgICAgIGlmKHpobUtzQnV0dG9uKXsKCiAgICAgICAgICAgICAgICAvL3pobUtzQnV0dG9uLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoemhtS3NCdXR0b24pOwoKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgbGV0IGJ1dHRvbkljb24gPSBkZXRhaWxEb20uY2xvbmVOb2RlKHRydWUpOwogICAgICAgICAgICAvL2NvbnNvbGUubG9nKGJ1dHRvbkljb24pOwogICAgICAgICAgICBidXR0b25JY29uLnNldEF0dHJpYnV0ZSgnaWQnLCd6aG1Lc0J1dHRvbicpOwoKICAgICAgICAgICAgbGV0IGJ1dHRvbkljb25JbWcgPSBidXR0b25JY29uLnF1ZXJ5U2VsZWN0b3IoJy51bm11dGVkLWljb24nKTsKCiAgICAgICAgICAgIGlmKGJ1dHRvbkljb25JbWcpewogICAgICAgICAgICAgICAgYnV0dG9uSWNvbkltZy5zdHlsZSA9ICdiYWNrZ3JvdW5kOiB1cmwoaHR0cHM6Ly9zMi0xMDYyMy5rd2ltZ3MuY29tL3VkYXRhL3BrZy9jbG91ZGNkbi9pbWcvcGxheWVyLXNldHRpbmcuYWQxZjVjZTguc3ZnKSBuby1yZXBlYXQnOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGRldGFpbERvbS5hZnRlcihidXR0b25JY29uKTsKCiAgICAgICAgICAgIGxldCBwbFNsaWRlciA9IGJ1dHRvbkljb24ucXVlcnlTZWxlY3RvcignLnBsLXNsaWRlcicpOwoKICAgICAgICAgICAgcGxTbGlkZXIuc3R5bGU9J3dpZHRoOmF1dG87cGFkZGluZzoxMHB4IDEwcHggMjVweCAxMHB4Oyc7CgogICAgICAgICAgICBwbFNsaWRlci5pbm5lckhUTUwgPSAiIjsKCiAgICAgICAgICAgIGxldCBidXR0b25Gb3VyID0gY29udHJvbHMucXVlcnlTZWxlY3RvcignZGl2Om50aC1vZi10eXBlKDQpJyk7CgogICAgICAgICAgICBidXR0b25Gb3VyLnN0eWxlLm1hcmdpbj0nMHB4JzsKCiAgICAgICAgICAgIGxldCBhdXRvUGxheSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wbGF5LXNldHRpbmctY29udGFpbmVyJyk7CgogICAgICAgICAgICBpZihhdXRvUGxheSl7CiAgICAgICAgICAgICAgICBhdXRvUGxheS5zdHlsZS5tYXJnaW49JzBweCA0MHB4IDBweCAwcHgnOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGxldCBidXR0b25GaXZlID0gY29udHJvbHMucXVlcnlTZWxlY3RvcignZGl2Om50aC1vZi10eXBlKDUpJyk7CgogICAgICAgICAgICBpZihidXR0b25GaXZlKXsKCiAgICAgICAgICAgICAgICBidXR0b25GaXZlLnN0eWxlLm1hcmdpbj0nMTVweCAwcHgnOwoKICAgICAgICAgICAgICAgIGJ1dHRvbkZpdmUub25tb3VzZW92ZXI9ZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRvb2xUaXAgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcua3dhaS1wbGF5ZXItcm90YXRlLXRvb2x0aXAnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHRvb2xUaXApewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvb2xUaXAucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh0b29sVGlwKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKCiAgICAgICAgICAgICAgICAgICAgfSwzMCkKCiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgcGxTbGlkZXIuYXBwZW5kQ2hpbGQoYnV0dG9uRml2ZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbGV0IGJ1dHRvblNpeCA9IGNvbnRyb2xzLnF1ZXJ5U2VsZWN0b3IoJ2RpdjpudGgtb2YtdHlwZSg2KScpOwoKICAgICAgICAgICAgaWYoYnV0dG9uU2l4KXsKCiAgICAgICAgICAgICAgICBidXR0b25TaXguc3R5bGUubWFyZ2luPScxNXB4IDBweCc7CgogICAgICAgICAgICAgICAgbGV0IHRvb2xUaXAgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcua3dhaS1wbGF5ZXItZnVsbHNjcmVlbi10b29sdGlwJyk7CgogICAgICAgICAgICAgICAgYnV0dG9uU2l4Lm9ubW91c2VvdmVyPWZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0b29sVGlwID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmt3YWktcGxheWVyLWZ1bGxzY3JlZW4tdG9vbHRpcCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYodG9vbFRpcCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9vbFRpcC5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHRvb2xUaXApOwoKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICB9LDMwKQoKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBwbFNsaWRlci5hcHBlbmRDaGlsZChidXR0b25TaXgpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHBsU2xpZGVyLmFwcGVuZENoaWxkKGJ1dHRvbkZvdXIpOwoKICAgICAgICB9CgogICAgICAgIHhpZ3VhVmlkZW9Eb3dubG9hZCgpewoKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKCiAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdsb2FkJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgIGFzeW5jIGZ1bmN0aW9uIGdldENvbnRyb2xzKCl7CgogICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb0RvbSA9IGF3YWl0IEJhc2VDbGFzcy5nZXRFbGVtZW50KCd2aWRlbycpOwoKICAgICAgICAgICAgICAgICAgICBpZighdmlkZW9Eb20pewoKICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+ayoeacieaJvuWIsERPTScpO3JldHVybjsKCiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBfdGhpcy5jcmVhdGVYaWd1YVZpZGVvRG93bmxvYWQoKTsKCiAgICAgICAgICAgICAgICAgICAgR01feG1saHR0cFJlcXVlc3QoewoKICAgICAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiAiZ2V0IiwKCiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJ2h0dHA6Ly80Ny45OS4xNTguMTE4L3ZpZGVvLWNyYWNrL3YyL3BhcnNlP2NvbnRlbnQ9JytlbmNvZGVVUklDb21wb25lbnQobG9jYXRpb24uaHJlZiksCgogICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiAnJywKCiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHsnQWNjZXB0JzogJ3RleHQvcGxhaW4sIHRleHQvaHRtbCxhcHBsaWNhdGlvbi9qc29uJ30sCgogICAgICAgICAgICAgICAgICAgICAgICBvbmxvYWQ6IGZ1bmN0aW9uKHJlcyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cocmVzKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHJlcy5zdGF0dXM9PTIwMCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzcCA9IEpTT04ucGFyc2UocmVzLnJlc3BvbnNlVGV4dCkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb1NyYyA9ICcnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihyZXNwLmNvZGUgPT0gMCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWRlb1NyYyA9IHJlc3AuZGF0YS51cmw7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyh2aWRlb1NyYyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3RvRG93bmxvYWQnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCF2aWRlb1NyYyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfor6Xop4bpopHml6Dms5XkuIvovb0nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb1RpdGxlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnZpZGVvVGl0bGUgaDEnKS5pbm5lclRleHQ7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9BdXRob3IgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuYXV0aG9yX191c2VyTmFtZScpLnRpdGxlOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfmraPlnKjkuIvovb3or7fnqI3kvq8nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy5MUl9kb3dubG9hZCh2aWRlb1NyYyx2aWRlb1RpdGxlKydAJyt2aWRlb0F1dGhvcisnLm1wNCcpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0b0NvcHknKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCF2aWRlb1NyYyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfor6Xop4bpopHkuI3og73lpI3liLblnLDlnYAnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn5bey5aSN5Yi25Yiw5Ymq6LS05p2/Jyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRDbGlwYm9hcmQodmlkZW9TcmMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0b0xpbmsnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCF2aWRlb1NyYyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfor6Xop4bpopHkuI3og73nm7TmjqXmiZPlvIAnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKHZpZGVvU3JjKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKGUpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZS5wYXRoLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5jbGFzc05hbWUgPT0gJ3hncGxheWVyLWNvbnRyb2wtaXRlbSBjb250cm9sX3BsYXluZXh0IGNvbW1vbi1jb250cm9sLWl0ZW0nKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24ucmVsb2FkKCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sMTAwMCkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBvYmpMaW5rID0ge307CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlLnBhdGguZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLmhyZWYpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpMaW5rLmhyZWYgPSBpdGVtLmhyZWY/aXRlbS5ocmVmOicnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpMaW5rLnRhcmdldCA9IGl0ZW0udGFyZ2V0P2l0ZW0udGFyZ2V0OicnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYob2JqTGluay5ocmVmICYmIG9iakxpbmsudGFyZ2V0ICE9ICdfYmxhbmsnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbi5ocmVmID0gb2JqTGluay5ocmVmOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgICAgICBvbmVycm9yIDogZnVuY3Rpb24oZXJyKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCdlcnJvcicpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhlcnIpCiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcigndmlkZW8nKS5hZGRFdmVudExpc3RlbmVyKCdlbmRlZCcsZnVuY3Rpb24oKXsgLy/nu5PmnZ8KCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCLmkq3mlL7nu5PmnZ8iKTsKICAgICAgICAgICAgICAgICAgICAgICAgLyoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdXRvUGxheSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy54Zy1zd2l0Y2gtY2hlY2tlZCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGF1dG9QbGF5KXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAqLwogICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24ucmVsb2FkKCk7CgogICAgICAgICAgICAgICAgICAgICAgICB9LDU1MDApOwoKICAgICAgICAgICAgICAgICAgICB9LCBmYWxzZSk7CgogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGdldENvbnRyb2xzKCk7CiAgICAgICAgICAgIH0pCiAgICAgICAgfQoKICAgICAgICBjcmVhdGVYaWd1YVZpZGVvRG93bmxvYWQoKXsKCiAgICAgICAgICAgIGxldCByaWdodEdyaWQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcueGctcmlnaHQtZ3JpZCcpOwoKICAgICAgICAgICAgbGV0IHBsYXlDb250cm9sID0gcmlnaHRHcmlkLnF1ZXJ5U2VsZWN0b3IoJ2RpdjpudGgtb2YtdHlwZSgyKScpOwoKICAgICAgICAgICAgbGV0IGNvbnRyb2wgPSBwbGF5Q29udHJvbC5jbG9uZU5vZGUodHJ1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gICAgY29udHJvbC5vbm1vdXNlb3Zlcj1mdW5jdGlvbigpewoKICAgICAgICAgICAgICAgIHBvcG92ZXIuc3R5bGUuZGlzcGxheT0nYmxvY2snOwoKICAgICAgICAgICAgfQoKICAgICAgICAgICAgY29udHJvbC5vbm1vdXNlb3V0PWZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgcG9wb3Zlci5zdHlsZS5kaXNwbGF5PSdub25lJzsKCiAgICAgICAgICAgIH0KCgogICAgICAgIH0KCiAgICAgICAgYmlsaVZpZGVvRG93bmxvYWQoKXsKCiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CgogICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcignbG9hZCcsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICBhc3luYyBmdW5jdGlvbiBnZXRDb250cm9scygpewoKICAgICAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmLmluZGV4T2YoJ2Jhbmd1bWknKSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmlnaHRDb250cm9sID0gYXdhaXQgQmFzZUNsYXNzLmdldEVsZW1lbnQoJy5zcXVpcnRsZS1jb250cm9sbGVyLXdyYXAtcmlnaHQnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFyaWdodENvbnRyb2wpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmsqHmnInmib7liLBET00nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmNyZWF0ZUJpbGlWaWRlb0Rvd25sb2FkKCk7CgogICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG49MDsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aW1lciA9IHNldEludGVydmFsKGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5iaWxpYmlsaS1wbGF5ZXItdmlkZW8tYnRuLXF1YWxpdHknKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZG9tT3RoZXIgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuYnB4LXBsYXllci1jdHJsLXF1YWxpdHknKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkb20pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuY3JlYXRlQmlsaVZpZGVvRG93bmxvYWQoKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKGRvbU90aGVyKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmNyZWF0ZUJpbGlWaWRlb0Rvd25sb2FkT3RoZXIoKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG4rKz4zMCljbGVhckludGVydmFsKHRpbWVyKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIH0sMTAwKQoKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIC8vX3RoaXMuY3JlYXRlQmlsaVZpZGVvRG93bmxvYWQoKTsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHRpbWVyWmhtSWNvbiA9IHNldEludGVydmFsKGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9Eb20gPSBbe25hbWU6J3ZpZGVvJyx0eXBlOidkb20nfSx7bmFtZTonYndwX3ZpZGVvJyx0eXBlOidkb20nfSx7bmFtZTonLmJpbGliaWxpLXBsYXllci12aWRlbycsdHlwZTonY2xhc3MnfV07CgogICAgICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGkgPSAwO2k8dmlkZW9Eb20ubGVuZ3RoO2krKyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvID0gdmlkZW9Eb21baV0udHlwZSA9PSAnZG9tJz9kb2N1bWVudC5xdWVyeVNlbGVjdG9yKHZpZGVvRG9tW2ldLm5hbWUpOmRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IodmlkZW9Eb21baV0ubmFtZSkuZmlyc3RDaGlsZDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih2aWRlbyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXJaaG1JY29uKTsgLy/lj5bmtojlrprml7blmagKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW8uYWRkRXZlbnRMaXN0ZW5lcigncGxheScsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCLmkq3mlL7lvIDlp4siKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmNyZWF0ZUJpbGlWaWRlb0Rvd25sb2FkKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvLmFkZEV2ZW50TGlzdGVuZXIoJ2VuZGVkJyxmdW5jdGlvbigpeyAvL+e7k+adnwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCdiYW5ndW1pJykgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBiaWxpRG93bmxvYWQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjYmlsaURvd25sb2FkJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coYmlsaURvd25sb2FkKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaWxpRG93bmxvYWQucGFyZW50Tm9kZS5yZW1vdmVDaGlsZChiaWxpRG93bmxvYWQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIH07CgogICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBnZXRDb250cm9scygpOwogICAgICAgICAgICAgICAgLy/lsY/olL3nmbvlvZXlvLnmoYYKICAgICAgICAgICAgICAgIGxldCB2aWRlbyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJ3ZpZGVvJyk7CgogICAgICAgICAgICAgICAgaWYodmlkZW8pewoKICAgICAgICAgICAgICAgICAgICB2aWRlby5hZGRFdmVudExpc3RlbmVyKCdwYXVzZScsIGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coIuaaguWBnCIpOwogICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNsb3NlSWNvbiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5iaWxpLW1pbmktY2xvc2UtaWNvbicpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGNsb3NlSWNvbik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoY2xvc2VJY29uKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xvc2VJY29uLmNsaWNrKCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvLnBsYXkoKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OwoKICAgICAgICAgICAgICAgICAgICAgICAgfSw1MCk7CgogICAgICAgICAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgICAgIH07CgogICAgICAgICAgICB9KQoKICAgICAgICB9CgogICAgICAgIGNyZWF0ZUJpbGlWaWRlb0Rvd25sb2FkKCl7CgogICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwoKICAgICAgICAgICAgYXN5bmMgZnVuY3Rpb24gZ2V0Q29udHJvbHMoKXsKCiAgICAgICAgICAgICAgICBsZXQgZG93bmxvYWRJY29uID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2JpbGlEb3dubG9hZCcpOwoKICAgICAgICAgICAgICAgIGlmKGRvd25sb2FkSWNvbil7CiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+S4i+i9veaMiemSruW3suWtmOWcqCcpO3JldHVybjsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmLmluZGV4T2YoJ2Jhbmd1bWknKSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgIGxldCBxdWFsaXR5ID0gYXdhaXQgQmFzZUNsYXNzLmdldEVsZW1lbnQoJy5zcXVpcnRsZS1xdWFsaXR5LXdyYXAnKTsKCiAgICAgICAgICAgICAgICAgICAgaWYoIXF1YWxpdHkpewoKICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+ayoeacieaJvuWIsERPTScpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIGxldCBjb250cm9sID0gcXVhbGl0eS5jbG9uZU5vZGUodHJ1ZSk7CgogICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGNvbnRyb2wucXVlcnlTZWxlY3RvcignLnNxdWlydGxlLXZpZGVvLXF1YWxpdHktdGV4dCcpKTsKCiAgICAgICAgICAgICAgICAgICAgY29udHJvbC5xdWVyeVNlbGVjdG9yKCcuc3F1aXJ0bGUtdmlkZW8tcXVhbGl0eS10ZXh0JykuaW5uZXJUZXh0PSfkuIvovb0nOwoKICAgICAgICAgICAgICAgICAgICBjb250cm9sLnNldEF0dHJpYnV0ZSgnaWQnLCdiaWxpRG93bmxvYWQnKTsKCiAgICAgICAgICAgICAgICAgICAgcXVhbGl0eS5iZWZvcmUoY29udHJvbCk7CgogICAgICAgICAgICAgICAgfWVsc2UgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCd2aWRlbycpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IGF1dG9JY29uRG9tID0gYXdhaXQgQmFzZUNsYXNzLmdldEVsZW1lbnQoJy5iaWxpYmlsaS1wbGF5ZXItdmlkZW8tYnRuLXF1YWxpdHknKTsKCiAgICAgICAgICAgICAgICAgICAgaWYoIWF1dG9JY29uRG9tKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmsqHmnInmib7liLBET00nKTtyZXR1cm47CgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRyb2wgPSBhdXRvSWNvbkRvbS5jbG9uZU5vZGUodHJ1ZSk7CgogICAgICAgICAgICAgICAgICAgIGNvbnRyb2wuc3R5bGU9J21hcmdpbi1yaWdodDoyMHB4Oyc7CgogICAgICAgICAgICAgICAgICAgIGNvbnRyb2wucXVlcnlTZWxlY3RvcignLmJ1aS1zZWxlY3QtcmVzdWx0JykuaW5uZXJUZXh0PSfkuIvovb0nOwoKICAgICAgICAgICAgICAgICAgICBjb250cm9sLnF1ZXJ5U2VsZWN0b3IoJy5idWktc2VsZWN0LXJlc3VsdCcpLnNldEF0dHJpYnV0ZSgnaWQnLCdiaWxpRG93bmxvYWQnKTsKCiAgICAgICAgICAgICAgICAgICAgYXV0b0ljb25Eb20uYmVmb3JlKGNvbnRyb2wpOwoKICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5b2T5YmN6aG16Z2i5LiN5piv6KeG6aKR5oiW55Wq5YmnJyk7cmV0dXJuOwoKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjYmlsaURvd25sb2FkJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgIGxldCBidmlkID0gJycsYXZpZD0nJzsKCiAgICAgICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCdiYW5ndW1pJykgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgYnZpZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5hdi1saW5rJykuaW5uZXJUZXh0OwoKICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihsb2NhdGlvbi5ocmVmLmluZGV4T2YoJ3ZpZGVvJykgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhcmFtcyA9IGxvY2F0aW9uLmhyZWYubWF0Y2goL2h0dHBzOlwvXC93d3cuYmlsaWJpbGkuY29tXC92aWRlb1wvKC4rKVw/Lyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZihwYXJhbXNbMV0uaW5kZXhPZignYXYnKSAhPS0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdmlkID0gcGFyYW1zWzFdLnJlcGxhY2UoJ2F2JywnJyk7CgogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBidmlkID0gcGFyYW1zWzFdLnN1YnN0cmluZyhwYXJhbXNbMV0ubGVuZ3RoLTEpPT0nLyc/cGFyYW1zWzFdLnN1YnN0cmluZygwLHBhcmFtc1sxXS5sZW5ndGgtMSk6cGFyYW1zWzFdOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCflvZPliY3pobXpnaLml6Dms5XkuIvovb0nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBpZighYnZpZCAmJiAhYXZpZCl7CgogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5pyq6I635Y+WYnZpZOaIlmF2aWQnKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gImh0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3dlYi1pbnRlcmZhY2Uvdmlldz9idmlkPSIrYnZpZCsiJmFpZD0iK2F2aWQ7CgogICAgICAgICAgICAgICAgICAgIGxldCB1cmkgPSBfdGhpcy5yZXF1ZXN0KCdnZXQnLHVybCkudGhlbigocmVzdWx0KT0+ewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlc3AgPSBKU09OLnBhcnNlKHJlc3VsdCk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZihyZXNwLmNvZGUgPCAwKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ivpeinhumikeaXoOazleS4i+i9vScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfop4bpopHkv6Hmga/mjqXlj6Pov5Tlm57mlbDmja7plJnor68nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIC8v6YCJ6ZuGY2lkCgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGFnZUlkID0gX3RoaXMuZ2V0UXVlcnlTdHJpbmcoJ3AnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjaWQgPSAnJzsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHBhZ2VJZCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lkID0gcmVzcC5kYXRhLnBhZ2VzW3BhZ2VJZC0xXS5jaWQ7CgogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaWQgPSByZXNwLmRhdGEuY2lkOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhjaWQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmsgPSAnaHR0cHM6Ly9hcGkuYmlsaWJpbGkuY29tL3gvcGxheWVyL3BsYXl1cmw/YXZpZD0nK3Jlc3AuZGF0YS5haWQrJyZjaWQ9JytjaWQrJyZxbj0xMTInOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlcyA9IF90aGlzLnJlcXVlc3QoJ2dldCcsbGluaykudGhlbigocmVzdWx0KT0+ewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0gSlNPTi5wYXJzZShyZXN1bHQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRhdGEuY29kZSA8IDApewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn6K+l6KeG6aKR5peg5rOV5LiL6L29Jyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+inhumikeWcsOWdgOaOpeWPo+i/lOWbnuaVsOaNrumUmeivrycpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZG93bmxvYWRVcmwgPSBkYXRhLmRhdGEuZHVybFswXS51cmw7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9HTV9kb3dubG9hZChkb3dubG9hZFVybCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4oZG93bmxvYWRVcmwpOwoKICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGdldENvbnRyb2xzKCk7CgogICAgICAgIH0KCiAgICAgICAgY3JlYXRlQmlsaVZpZGVvRG93bmxvYWRPdGhlcigpewoKICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKCiAgICAgICAgICAgIGFzeW5jIGZ1bmN0aW9uIGdldENvbnRyb2xzKCl7CgogICAgICAgICAgICAgICAgbGV0IGRvd25sb2FkSWNvbiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNiaWxpRG93bmxvYWQnKTsKCiAgICAgICAgICAgICAgICBpZihkb3dubG9hZEljb24pewogICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfkuIvovb3mjInpkq7lt7LlrZjlnKgnKTtyZXR1cm47CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCdiYW5ndW1pJykgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICBsZXQgcXVhbGl0eSA9IGF3YWl0IEJhc2VDbGFzcy5nZXRFbGVtZW50KCcuc3F1aXJ0bGUtcXVhbGl0eS13cmFwJyk7CgogICAgICAgICAgICAgICAgICAgIGlmKCFxdWFsaXR5KXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmsqHmnInmib7liLBET00nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBsZXQgY29udHJvbCA9IHF1YWxpdHkuY2xvbmVOb2RlKHRydWUpOwoKICAgICAgICAgICAgICAgICAgICBjb250cm9sLnF1ZXJ5U2VsZWN0b3IoJy5zcXVpcnRsZS12aWRlby1xdWFsaXR5LXRleHQnKS5pbm5lclRleHQ9J+S4i+i9vSc7CgogICAgICAgICAgICAgICAgICAgIGNvbnRyb2wuc2V0QXR0cmlidXRlKCdpZCcsJ2JpbGlEb3dubG9hZCcpOwoKICAgICAgICAgICAgICAgICAgICBxdWFsaXR5LmJlZm9yZShjb250cm9sKTsKCiAgICAgICAgICAgICAgICB9ZWxzZSBpZihsb2NhdGlvbi5ocmVmLmluZGV4T2YoJ3ZpZGVvJykgIT0gLTEgfHwgbG9jYXRpb24uaHJlZi5pbmRleE9mKCdmZXN0aXZhbCcpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IGF1dG9JY29uRG9tID0gYXdhaXQgQmFzZUNsYXNzLmdldEVsZW1lbnQoJy5icHgtcGxheWVyLWN0cmwtcXVhbGl0eScpOwoKICAgICAgICAgICAgICAgICAgICBpZighYXV0b0ljb25Eb20pewoKICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+ayoeacieaJvuWIsERPTScpO3JldHVybjsKCiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBsZXQgY29udHJvbCA9IGF1dG9JY29uRG9tLmNsb25lTm9kZSh0cnVlKTsKCiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coY29udHJvbCk7CgogICAgICAgICAgICAgICAgICAgIGNvbnRyb2wuc3R5bGU9J21hcmdpbi10b3A6LTgwcHg7cGFkZGluZy10b3A6ODBweDttYXJnaW4tcmlnaHQ6MjBweDsnOwoKICAgICAgICAgICAgICAgICAgICBjb250cm9sLnF1ZXJ5U2VsZWN0b3IoJy5icHgtcGxheWVyLWN0cmwtcXVhbGl0eS1yZXN1bHQnKS5pbm5lclRleHQ9J+S4i+i9vSc7CgogICAgICAgICAgICAgICAgICAgIGNvbnRyb2wucXVlcnlTZWxlY3RvcignLmJweC1wbGF5ZXItY3RybC1xdWFsaXR5LW1lbnUnKS5zZXRBdHRyaWJ1dGUoJ2lkJywnYmlsaURvd25sb2FkJyk7CgogICAgICAgICAgICAgICAgICAgIGxldCBtZW51SXRlbXMgPSBjb250cm9sLnF1ZXJ5U2VsZWN0b3JBbGwoJy5icHgtcGxheWVyLWN0cmwtcXVhbGl0eS1tZW51LWl0ZW0nKTsKCiAgICAgICAgICAgICAgICAgICAgbWVudUl0ZW1zLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVZhbHVlID0gaXRlbS5nZXRBdHRyaWJ1dGUoJ2RhdGEtVmFsdWUnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRhdGFWYWx1ZSAhPSAxNiAmJiBkYXRhVmFsdWUgIT0gODApewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0ucGFyZW50Tm9kZS5yZW1vdmVDaGlsZChpdGVtKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAgICAgYXV0b0ljb25Eb20uYmVmb3JlKGNvbnRyb2wpOwoKICAgICAgICAgICAgICAgICAgICBjb250cm9sLm9ubW91c2VvdmVyPWZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wuY2xhc3NOYW1lPSdicHgtcGxheWVyLWN0cmwtYnRuIGJweC1wbGF5ZXItY3RybC1xdWFsaXR5IGJweC1zdGF0ZS1zaG93JzsKCiAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgY29udHJvbC5vbm1vdXNlb3V0PWZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wuY2xhc3NOYW1lPSdicHgtcGxheWVyLWN0cmwtYnRuIGJweC1wbGF5ZXItY3RybC1xdWFsaXR5JzsKICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+W9k+WJjemhtemdouS4jeaYr+inhumikeaIlueVquWJpycpO3JldHVybjsKCiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2JpbGlEb3dubG9hZCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbihlKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IGJpbGlEYXRhVmFsdWUgPSBlLnRhcmdldC5nZXRBdHRyaWJ1dGUoJ2RhdGEtVmFsdWUnKT9lLnRhcmdldC5nZXRBdHRyaWJ1dGUoJ2RhdGEtVmFsdWUnKTonJzsKCiAgICAgICAgICAgICAgICAgICAgaWYoIWJpbGlEYXRhVmFsdWUpcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICBsZXQgYnZpZCA9ICcnLGF2aWQ9Jyc7CgogICAgICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYuaW5kZXhPZignYmFuZ3VtaScpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGJ2aWQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuYXYtbGluaycpLmlubmVyVGV4dDsKCiAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCd2aWRlbycpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub3dVcmwgPSBsb2NhdGlvbi5ocmVmLnNwbGl0KCc/Jyk7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGFyYW1zID0gbm93VXJsWzBdLm1hdGNoKC9odHRwczpcL1wvd3d3LmJpbGliaWxpLmNvbVwvdmlkZW9cLyguKykvKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHBhcmFtc1sxXS5pbmRleE9mKCdhdicpICE9LTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF2aWQgPSBwYXJhbXNbMV0ucmVwbGFjZSgnYXYnLCcnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ2aWQgPSBwYXJhbXNbMV0uc3Vic3RyaW5nKHBhcmFtc1sxXS5sZW5ndGgtMSk9PScvJz9wYXJhbXNbMV0uc3Vic3RyaW5nKDAscGFyYW1zWzFdLmxlbmd0aC0xKTpwYXJhbXNbMV07CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCdmZXN0aXZhbCcpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBidmlkPV90aGlzLmdldFF1ZXJ5U3RyaW5nKCdidmlkJyk7CgogICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCflvZPliY3pobXpnaLml6Dms5XkuIvovb0nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBpZighYnZpZCAmJiAhYXZpZCl7CgogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5pyq6I635Y+WYnZpZOaIlmF2aWQnKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gImh0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3dlYi1pbnRlcmZhY2Uvdmlldz9idmlkPSIrYnZpZCsiJmFpZD0iK2F2aWQ7CgogICAgICAgICAgICAgICAgICAgIGxldCB1cmkgPSBfdGhpcy5yZXF1ZXN0KCdnZXQnLHVybCkudGhlbigocmVzdWx0KT0+ewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlc3AgPSBKU09OLnBhcnNlKHJlc3VsdCk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZihyZXNwLmNvZGUgPCAwKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ivpeinhumikeaXoOazleS4i+i9vScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfop4bpopHkv6Hmga/mjqXlj6Pov5Tlm57mlbDmja7plJnor68nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIC8v6YCJ6ZuGY2lkCgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGFnZUlkID0gX3RoaXMuZ2V0UXVlcnlTdHJpbmcoJ3AnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjaWQgPSAnJzsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHBhZ2VJZCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lkID0gcmVzcC5kYXRhLnBhZ2VzW3BhZ2VJZC0xXS5jaWQ7CgogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaWQgPSByZXNwLmRhdGEuY2lkOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGluayA9ICdodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC9wbGF5ZXIvcGxheXVybD9hdmlkPScrcmVzcC5kYXRhLmFpZCsnJmNpZD0nK2NpZCsnJnFuPScrYmlsaURhdGFWYWx1ZTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZXMgPSBfdGhpcy5yZXF1ZXN0KCdnZXQnLGxpbmssJycsdHJ1ZSkudGhlbigocmVzdWx0KT0+ewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0gSlNPTi5wYXJzZShyZXN1bHQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRhdGEuY29kZSA8IDApewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn6K+l6KeG6aKR5peg5rOV5LiL6L29Jyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+inhumikeWcsOWdgOaOpeWPo+i/lOWbnuaVsOaNrumUmeivrycpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZG93bmxvYWRVcmwgPSBkYXRhLmRhdGEuZHVybFswXS51cmw7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9HTV9kb3dubG9hZChkb3dubG9hZFVybCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4oZG93bmxvYWRVcmwpOwoKICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGdldENvbnRyb2xzKCk7CgogICAgICAgIH0KCiAgICAgICAgeW91dHViZVZpZGVvRG93bmxvYWQoKXsKCiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CgogICAgICAgICAgICBsZXQgdGltZXIgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgIGxldCB1cmwgPSBsb2NhdGlvbi5ocmVmLm1hdGNoKC9eaHR0cHM/OlwvXC93d3dcLnlvdXR1YmVcLmNvbVwvKHdhdGNoXD92PS4rfHNob3J0c1wvLispfCh3YXRjaFw/YXBwPWRlc2t0b3Amdj0uK3xzaG9ydHNcLy4rKS8pOwoKICAgICAgICAgICAgICAgIGlmKHVybCl7CgogICAgICAgICAgICAgICAgICAgIGxldCB5b3V0dWJlSWNvbiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1sb2dvJyk7CgogICAgICAgICAgICAgICAgICAgIGlmKHlvdXR1YmVJY29uKXsKICAgICAgICAgICAgICAgICAgICAgICAgeW91dHViZUljb24uc3R5bGUub3BhY2l0eT0xOwogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgX3RoaXMuemhtTG9nbygpOwoKICAgICAgICAgICAgICAgICAgICBsZXQgcGxheVdyYXBIdG1sID0gIjxkaXYgY2xhc3M9J3pobV9wbGF5X3ZpZGVvX2xpbmUnPiI7CgogICAgICAgICAgICAgICAgICAgIHBsYXlXcmFwSHRtbCArPSI8dWwgY2xhc3M9J3pobV9wbGF5X3ZpZGVfbGluZV91bCc+IjsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlMaW5lID0gWwogICAgICAgICAgICAgICAgICAgICAgICB7bmFtZTon5LiL6L2957q/6LevMScsdXJsOidodHRwczovL3poLnNhdmVmcm9tLm5ldC8xNzYvI3VybD0nfSwKICAgICAgICAgICAgICAgICAgICAgICAge25hbWU6J+S4i+i9vee6v+i3rzInLHVybDonaHR0cHM6Ly9teWRvd25kb3duLmNvbS95MiMnfSwKICAgICAgICAgICAgICAgICAgICAgICAge25hbWU6J+S4i+i9vee6v+i3rzMnLHVybDonaHR0cHM6Ly93d3cueXRkb3duZmsuY29tL3NlYXJjaD91cmw9J30sCiAgICAgICAgICAgICAgICAgICAgICAgIHtuYW1lOifkuIvovb3nur/ot680Jyx1cmw6J2h0dHBzOi8veW91dC5jb20vdmlkZW8vP3VybD0nfQogICAgICAgICAgICAgICAgICAgIF07CgogICAgICAgICAgICAgICAgICAgIHBsYXlMaW5lLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICBwbGF5V3JhcEh0bWwgKz1gPGxpIGNsYXNzPSdwbGF5TGluZVRkIHpobV9wbGF5X3ZpZGVvX2xpbmVfdWxfbGknIHVybD0nJHtpdGVtLnVybH0nID4ke2l0ZW0ubmFtZX08L2xpPmA7CgogICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgIHBsYXlXcmFwSHRtbCArPSI8L3VsPjwvZGl2PiI7CgogICAgICAgICAgICAgICAgICAgIGxldCB6aG1QbGF5ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3pobWxvZ28nKTsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlMaW5lRG9tID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7CgogICAgICAgICAgICAgICAgICAgIHBsYXlMaW5lRG9tLmNsYXNzTmFtZSA9ICdwbGF5TGluZURpdiB6aG1fcGxheV92aWRlb193cmFwJzsKCiAgICAgICAgICAgICAgICAgICAgcGxheUxpbmVEb20uc3R5bGUuZGlzcGxheSA9ICdub25lJzsKCiAgICAgICAgICAgICAgICAgICAgcGxheUxpbmVEb20uaW5uZXJIVE1MID0gcGxheVdyYXBIdG1sOwoKICAgICAgICAgICAgICAgICAgICB6aG1QbGF5LmFwcGVuZENoaWxkKHBsYXlMaW5lRG9tKTsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlMaW5lVGQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcucGxheUxpbmVUZCcpOwoKICAgICAgICAgICAgICAgICAgICBwbGF5TGluZVRkLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICBpdGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKGl0ZW0uZ2V0QXR0cmlidXRlKCd1cmwnKStsb2NhdGlvbi5ocmVmKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wbGF5QnV0dG9uJykub25tb3VzZW92ZXI9KCk9PnsKCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5wbGF5TGluZURpdiIpLnN0eWxlLmRpc3BsYXk9J2Jsb2NrJzsKCiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucGxheUJ1dHRvbicpLm9ubW91c2VvdXQ9KCk9PnsKCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5wbGF5TGluZURpdiIpLnN0eWxlLmRpc3BsYXk9J25vbmUnOwoKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIF90aGlzLnpobUxvZ29EcmFnKCd5b3V0dWJlJywnJyk7CgogICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgIGxldCB6aG1JY29uID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3pobUljb24nKTsKCiAgICAgICAgICAgICAgICAgICAgaWYoemhtSWNvbil7CgogICAgICAgICAgICAgICAgICAgICAgICB6aG1JY29uLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoemhtSWNvbik7CiAgICAgICAgICAgICAgICAgICAgfQoKCiAgICAgICAgICAgICAgICAgICAgbGV0IHpobWxvZ28gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtbG9nbycpOwoKICAgICAgICAgICAgICAgICAgICBpZih6aG1sb2dvKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIC8vemhtbG9nby5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHpobWxvZ28pOwoKICAgICAgICAgICAgICAgICAgICAgICAgemhtbG9nby5zdHlsZS5vcGFjaXR5PTA7CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgIH0sMjAwMCkKCiAgICAgICAgfQoKICAgIH0KCiAgICB2YXIgbm93V2ViID0gW107CgogICAgdHJ5ewogICAgICAgIHZhciB3ZWJzaXRlID0gdG9wLmxvY2F0aW9uLmhyZWY7CgogICAgICAgIGZvcihsZXQgaT0wO2k8dmlkZW9Eb3dubG9hZC5sZW5ndGg7aSsrKXsKCiAgICAgICAgICAgIGlmKHdlYnNpdGUubWF0Y2godmlkZW9Eb3dubG9hZFtpXS5tYXRjaCkgJiYgdmlkZW9Eb3dubG9hZFtpXS5pc1dlYk9wZW4gPT0gMjIpewogICAgICAgICAgICAgICAgLy9DcnlwdG9KUy5NRDUod2Vic2l0ZSkudG9TdHJpbmcoKTsKICAgICAgICAgICAgICAgIC8vY29uc29sZS5sb2codmlkZW9Eb3dubG9hZFtpXSkKICAgICAgICAgICAgICAgIG5vd1dlYi5wdXNoKHZpZGVvRG93bmxvYWRbaV0pOwoKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CgogICAgICAgIH0KCiAgICB9Y2F0Y2goZXJyKXsKCiAgICAgICAgLy9jb25zb2xlLmxvZyhlcnIpOwogICAgfQoKICAgIHZhciBiYXNlQ2xhc3MgPSBuZXcgQmFzZUNsYXNzKCk7CgogICAgaWYobm93V2ViLmxlbmd0aCAhPSAxKXsKCiAgICAgICAgY29uc29sZS5sb2coJ+ayoeacieWMuemFjeivpee9keermeaIluivpeaooeWdl+W3suWFs+mXrScpO3JldHVybjsKCiAgICB9ZWxzZXsKCiAgICAgICAgdmFyIHZpZGVvRG93bmxvYWRDbGFzcyA9IG5ldyBWaWRlb0Rvd25sb2FkQ2xhc3MoKTsKCiAgICAgICAgdmlkZW9Eb3dubG9hZENsYXNzW25vd1dlYlswXS5uYW1lXSgpOwoKICAgIH0KCn0pKCk7
Add Comment
Please, Sign In to add comment