Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥测试@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuS4gOe6p3N0dWktdm9kbGlzdFwiLFwicGF0aFwiOlwic3R1aS12b2RsaXN0XCIsXCJydWxlXCI6XCJ2YXIgZCA9IFtdO1xcbk1ZX1JVTEUudXJsLm1hdGNoKC9meXBhZ2UvKVswXVxcbnZhciBsaXN0ID0gcGRmYShnZXRSZXNDb2RlKCksICcuc3R1aS12b2RsaXN0JiZsaScpO1xcbmZvciAodmFyIGogaW4gbGlzdCkge1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IHBkZmgobGlzdFtqXSwgJ2EmJnRpdGxlJyksXFxuICAgICAgICBkZXNjOiBwZGZoKGxpc3Rbal0sICcucGljLXRleHQmJlRleHQnKSxcXG4gICAgICAgIGltZzogcGQobGlzdFtqXSwgJy5sYXp5bG9hZHx8YSYmZGF0YS1vcmlnaW5hbCcpKydAUmVmZXJlcj0nLFxcbiAgICAgICAgdXJsOiBwZChsaXN0W2pdLCAnYSYmaHJlZicpICsgJyNpbW1lcnNpdmVUaGVtZSMnXFxuICAgIH0pO1xcbn1cXG5zZXRSZXN1bHQoZCk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AgdmFyIOaPkOekuiA9IOaOkuW6jyA9PSAnI0ZGMDAwMFxcXCI+5YCS5bqPJyA/ICcjMWFhZDE5XFxcIj7mraPluo8nIDogJyNGRjAwMDBcXFwiPuWAkuW6jyc7XFxuICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDogTVlfVVJMICsgXFxcIl/mjpLluo9cXFwiLFxcbiAgICAgICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIlRWYm945o6o6YCBXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCh0YWJzLCBsaXN0cywgZCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciDmjqjpgIEgPSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJuYW1lXFxcIjogZ2V0UGFnZVRpdGxlKCksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJjb250ZW50XFxcIjogZC5kZXNjLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwicGljXFxcIjogZC5pbWcgfHwgZC5waWNfdXJsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiZnJvbVxcXCI6IHRhYnMuam9pbignJCQkJyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJ1cmxcXFwiOiBzdG9yYWdlMC5nZXRNeVZhcihcXFwibGlzdHNcXFwiKS5tYXAobGkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGxpLm1hcChsaTEgPT4gcGRmaChsaTEsICdUZXh0JykgKyAnJCcgKyBwZChsaTEsICdhJiZocmVmJykpLmpvaW4oJyMnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KS5qb2luKCckJCQnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vcGFnZS9wdXNoP3J1bGU9WFlR5o6o6YCBJnB1c2h1cmw9XFxcIiArIGVuY29kZVVSSUNvbXBvbmVudChKU09OLnN0cmluZ2lmeSjmjqjpgIEpKVxcbiAgICAgICAgICAgICAgICAgICAgfSwgdGFicywgbGlzdHMsIGQpXFxuICAgICAgICAgICAgICAgIH1dXFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICB0aXRsZTog5o6S5bqP5ZCNLnJlcGxhY2UoJ+aOkuW6jycsIOaPkOekuilcXG4gICAgICAgIH0pXFxuICAgICAgICBpZiAo5o6S5bqPID09ICcjMWFhZDE5XFxcIj7mraPluo8nKSB7XFxuICAgICAgICAgICAg56ug6IqCLnJldmVyc2UoKVxcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IGNwID0g56ug6IqCLm1hcCgoZGF0YSwgc3NpZCkgPT4ge1xcbiAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGRhdGEsICdhJiZUZXh0JyksXFxuICAgICAgICAgICAgICAgIHVybDogcGQoZGF0YSwgJ2EmJmhyZWYnKSArIGxhenksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiDnq6DoioIubGVuZ3RoID4gMyA/ICd0ZXh0XzQnIDogJ3RleHRfMicsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBjbHM6IE1ZX1VSTCArIFxcXCJf6YCJ6ZuGXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBwZChkYXRhLCAnYSYmaHJlZicpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9O1xcbiAgICAgICAgfSk7XFxuICAgICAgICBkZWxldGVJdGVtQnlDbHMoTVlfVVJMICsgXFxcIl/pgInpm4ZcXFwiKTtcXG4gICAgICAgIGFkZEl0ZW1CZWZvcmUoTVlfVVJMICsgXFxcImZvb3RlclxcXCIsIGNwKTtcXG4gICAgICAgIHB1dE15VmFyKE1ZX1VSTCArIFxcXCLnq6DoioLmjpLluo9cXFwiLCDmj5DnpLopXFxuICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgIH0sIHRhYnMsIOaOkuW6j+WQjSwgbGF6eSwgZFswXSksXFxuICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nLFxcbiAgICBleHRyYToge1xcbiAgICAgICAgaWQ6IE1ZX1VSTCArIFxcXCJf5o6S5bqPXFxcIixcXG4gICAgICAgIGxvbmdDbGljazogW3tcXG4gICAgICAgICAgICB0aXRsZTogXFxcIlRWYm945o6o6YCBXFxcIixcXG4gICAgICAgICAgICBqczogJC50b1N0cmluZygodGFicywgbGlzdHMsIGQpID0+IHtcXG4gICAgICAgICAgICAgICAgdmFyIOaOqOmAgSA9IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJuYW1lXFxcIjogZ2V0UGFnZVRpdGxlKCksXFxuICAgICAgICAgICAgICAgICAgICBcXFwiY29udGVudFxcXCI6IGQuZGVzYyxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJwaWNcXFwiOiBkLmltZyB8fCBkLnBpY191cmwsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiZnJvbVxcXCI6IHRhYnMuam9pbignJCQkJyksXFxuICAgICAgICAgICAgICAgICAgICBcXFwidXJsXFxcIjogc3RvcmFnZTAuZ2V0TXlWYXIoXFxcImxpc3RzXFxcIikubWFwKGxpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbGkubWFwKGxpMSA9PiBwZGZoKGxpMSwgJ1RleHQnKSArICckJyArIHBkKGxpMSwgJ2EmJmhyZWYnKSkuam9pbignIycpXFxuICAgICAgICAgICAgICAgICAgICB9KS5qb2luKCckJCQnKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJldHVybiBc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cXCJf57q/6LevXFxcIiArIHhsaWRcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBwdXRNeVZhcihNWV9VUkwsIGlkKVxcbiAgICAgICAgICAgIHZhciDnq6DoioIgPSBsaXN0c1tnZXRNeVZhcihNWV9VUkwsICcwJyldO1xcbiAgICAgICAgICAgIGlmICjmjpLluo8gPT0gJyNGRjAwMDBcXFwiPuWAkuW6jycpIHtcXG4gICAgICAgICAgICAgICAg56ug6IqCLnJldmVyc2UoKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBsZXQgY3AgPSDnq6DoioIubWFwKChkYXRhLCBzc2lkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChkYXRhLCAnYSYmVGV4dCcpLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBwZChkYXRhLCAnYSYmaHJlZicpICsgbGF6eSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiDnq6DoioIubGVuZ3RoID4gMyA/ICd0ZXh0XzQnIDogJ3RleHRfMicsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogTVlfVVJMICsgXFxcIl/pgInpm4ZcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBwZChkYXRhLCAnYSYmaHJlZicpXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKE1ZX1VSTCArIFxcXCJf6YCJ6ZuGXFxcIik7XFxuICAgICAgICAgICAgYWRkSXRlbUJlZm9yZShNWV9VUkwgKyBcXFwiZm9vdGVyXFxcIiwgY3ApO1xcbiAgICAgICAgICAgIHJldHVybiBcX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gICAgICAgICBrZXlzOiBbXFxcIiBiIFxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcIi5iXFxcIixcXG4gICAgICAgICAgICAvLyAgICAgYWxsS2V5OiB0cnVlLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcIm5hdi10YWJzXFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwibmF2LXRhYnNcXFwiLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcIm15dWktY29udGVudF9fbGlzdFxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcIm15dWktY29udGVudF9fbGlzdFxcXCIsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwibmF2LXRhYnNcXFwiLCBcXFwic3R1aS1jb250ZW50X19wbGF5bGlzdFxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcIm5hdi10YWJzMVxcXCIsXFxuICAgICAgICAgICAgYWxsS2V5OiB0cnVlLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcImgzXFxcIiwgXFxcInN0dWktY29udGVudF9fcGxheWxpc3RcXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJoM1xcXCIsXFxuICAgICAgICAgICAgYWxsS2V5OiB0cnVlLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcIm15dWktdm9kbGlzdCBcXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJteXVpLXZvZGxpc3RcXFwiLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcIm1vLW1vdnMtaXRlbVxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcIm1vLW1vdnMtaXRlbVxcXCIsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwibW9kdWxlLXRhYi1pdGVtXFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwibW9kdWxlLXRhYi1pdGVtXFxcIixcXG4gICAgICAgICAgICAvLyAgICAgYWxsS2V5OiB0cnVlLFxcbiAgICAgICAgfSx7XFxuICAgICAgICAgICAga2V5czogW1xcXCJ5LXBsYXlMaXN0XFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwieS1wbGF5TGlzdFxcXCIsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwic3R1aS12b2RsaXN0IFxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcInN0dWktdm9kbGlzdFxcXCIsXFxuICAgICAgICAgICAgLy8gICAgIGFsbEtleTogdHJ1ZSxcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAga2V5czogW1xcXCJwbGF5X3NvdXJjZV90YWJcXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJwbGF5X3NvdXJjZV90YWJcXFwiLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcImZlZC1wbGF5LWl0ZW1cXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJmZWQtcGxheS1pdGVtXFxcIixcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAga2V5czogW1xcXCJtb2R1bGUtaXRlbVxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcIm1vZHVsZS1pdGVtc1xcXCIsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwidm9kbGlzdCBcXFwiLCBcXFwibGF6eWxvYWRcXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJ2b2RsaXN0XFxcIixcXG4gICAgICAgICAgICBhbGxLZXk6IHRydWUsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwibW8tcGxheS1sb2FkXFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwibW8tcGxheS1sb2FkXFxcIixcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAga2V5czogW1xcXCJmZWQtbGlzdC10aXRsZVxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcImZlZC1saXN0LXRpdGxlXFxcIixcXG4gICAgICAgICAgICAvL2FsbEtleTogdHJ1ZSxcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAga2V5czogW1xcXCJwYWNrLXlrcGFja1xcXFxcXFwiXFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwicGFjay15a3BhY2tcXFwiLFxcbiAgICAgICAgfSxcXG4gICAgICAgIC8qXFxuICAgICAgICAgICAgICAgIHtcXG4gICAgICAgICAgICAgICAgICAgIGtleXM6IFtcXFwiaXRlbVxcXCJdLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaXRlbVxcXCIsXFxuICAgICAgICAgICAgICAgIH0sKi9cXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcImRhdGFfbGlzdFxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcImRhdGFfbGlzdFxcXCIsXFxuICAgICAgICB9LFxcbiAgICBdLFxcbiAgICBcXFwic2VhcmNoXFxcIjogW3tcXG4gICAgICAgICAgICBrZXlzOiBbXFxcInN0dWktdm9kbGlzdF9fbWVkaWFcXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJzdHVpLXZvZGxpc3RfX21lZGlhXFxcIixcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAga2V5czogW1xcXCJteXVpLXZvZGxpc3RfX21lZGlhXFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwibXl1aS12b2RsaXN0X19tZWRpYVxcXCIsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwibW9kdWxlLXNlYXJjaC1pdGVtXFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwibW9kdWxlLXNlYXJjaC1pdGVtXFxcIixcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAga2V5czogW1xcXCJzdHVpLXZvZGxpc3QgXFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwic3R1aS12b2RsaXN0XFxcIixcXG4gICAgICAgICAgICAvLyAgICAgYWxsS2V5OiB0cnVlLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcImRsIFxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcImRsXFxcIixcXG4gICAgICAgICAgICBhbGxLZXk6IHRydWUsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwibW9kdWxlLWl0ZW1zXFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwibW9kdWxlLWl0ZW1zXFxcIixcXG4gICAgICAgIH0sXFxuICAgIF1cXG59XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCIjYXV0b1wiLFwicGF0aFwiOlwiYXV0b1wiLFwicnVsZVwiOlwianM6XFxuZnVuY3Rpb24gZ2V0UGFnZVNvdXJjZShrZXkpIHtcXG4gICAgbGV0IHNyYyA9IHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9cXFwiICsga2V5ICsgXFxcIj9ydWxlPeaooeadv8K3UVxcXCIpO1xcbiAgICBzcmMgPSBKU09OLnBhcnNlKHNyYykucnVsZTtcXG4gICAgcmV0dXJuIHNyYztcXG59XFxuY29uc3Qgc291cmNlTWFwID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvTWFwcGluZz9ydWxlPeaooe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6ICQocGQoaXRlbSwg5YiG57G76ZO+5o6lKSArICcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChwYXJhbXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3X2NhdGUgPSBbXVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXAuZm9yRWFjaCgoY2F0ZSwgaW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3X2NhdGUucHVzaChpbmRleCA9PT0gMCA/IHBhcmFtcy5rZXkudG9TdHJpbmcoKSA6IFxcXCIwXFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnRpdGxlLCBKU09OLnN0cmluZ2lmeShuZXdfY2F0ZSkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudXJsLCBpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiBwYWdlLFxcbiAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJibGFua19ibG9ja1xcXCJcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0gZWxzZSBpZiAoZm9sZCA9PT0gJzEnKSB7XFxuICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMuZm9yRWFjaCgoaXRlbSwga2V5KSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHBkZmgoaXRlbSwg5YiG57G75qCH6aKYKVxcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mKOaOkumZpCkgIT0gJ3VuZGVmaW5lZCcgJiYg5o6S6ZmkICE9ICcnKSB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZSA9IHRpdGxlLnJlcGxhY2UobmV3IFJlZ0V4cCjmjpLpmaQsIFxcXCJnXFxcIiksIFxcXCJcXFwiKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyBcXFwi4oCc4oCc4oCd4oCdXFxcIiArIHRpdGxlLmZvbnRjb2xvcijliIbnsbvpopzoibIpIDogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQocGQoaXRlbSwg5YiG57G76ZO+5o6lKSArICcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChwYXJhbXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoTVlfUlVMRS50aXRsZSwgSlNPTi5zdHJpbmdpZnkocGFyYW1zLmNhdGVfdGVtcCkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudXJsLCBpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogcGFnZSxcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgIH0pXFxufVwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5LiA57qn5YWs5YWx5qih5p2/XCIsXCJwYXRoXCI6XCJ5aWppXCIsXCJydWxlXCI6XCJmdW5jdGlvbiDkuIDnuqcoKSB7fTtcXG5PYmplY3QuYXNzaWduKOS4gOe6py5wcm90b3R5cGUsIHtcXG4gICAgY29uc3RydWN0b3I6IOS4gOe6pyxcXG4gICAgdGVzdCgpIHt9LFxcbiAgICDojrflj5bmupDnoIEodXJsLCBoZWFkZXIpIHtcXG4gICAgICAgIHJldHVybiBmZXRjaCh0cnVlX3VybCwge1xcbiAgICAgICAgICAgIGhlYWRlcnM6IGhlYWRlciB8fCB7XFxuICAgICAgICAgICAgICAgICdVc2VyLUFnZW50JzogJ01vemlsbGEvNS4wIChXaW5kb3dzIE5UIDEwLjApJ1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pIC8vIOm7mOiupOe7n+S4gOS9v+eUqFBDIFVBXFxuIC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YpO1xcbsKgwqDCoMKgwqAgfVxcbiAgICAgICAgaHRtbENhdGVnb3JpZXMu55WM6Z2iKGQpXFxuICAgICAgICAgICAgLy8gLuWIhuexu+mTvuaOpSh0cnVlX3VybClcXG4gICAgICAgICAgICAu5rqQ56CBKGh0bWwpXFxuICAgICAgICAgICAgLumhteeggShwYWdlKVxcbiAgICAgICAgICAgIC7mt7vliqDliIbnsbvlrprkvY0ocnVsZUxpc3QpXFxuICAgICAgICAgICAgLuW8gOWQr+WGhee9ruaKmOWPoOWKn+iDvSgpIC8vIOW/hemhu1xcbiAgICAgICAgICAgIC7mipjlj6Ao5b2T5YmN5oqY5Y+g54q25oCBKSAvLyDlv4XpobtcXG4gICAgICAgICAgICAu6YCJ5Lit55qE5YiG57G76aKc6ImyKGdldFJhbmdlQ29sb3JzKCkpXFxuICAgICAgICAgLy8gICAu6YCJ5Lit55qE5YiG57G76aKc6ImyKCcjMDk4QUMxJylcXG4gICAgICAgICAgICAu5byA5aeL5omT6YCg5YiG57G7KCk7XFxuICAgIH0sXFxuICAgIOeUn+aIkOeJh+WNlShkLCBodG1sKSB7XFxuICAgICAgICBsZXQgbGlzdCA9IHBkZmEoaHRtbCwg5YiX6KGoKTtcXG4gICAgICAgIGZvciAobGV0IGogaW4gbGlzdCkge1xcbiAgICAgICAgICAgIGxldCBpbWcgPSBwZChsaXN0W2pdLCDlm77niYcpO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGxpc3Rbal0sIOagh+mimCksXFxuICAgICAgICAgICAgICAgIGRlc2M6IHBkZmgobGlzdFtqXSwg5o+P6L+wKSxcXG4gICAgICAgICAgICAgICAgaW1nOiBpbWcgKyAnQFJlZmVyZXI9JyArIGltZyxcXG4gICAgICAgICAgICAgICAgdXJsOiBwZChsaXN0W2pdLCDpk77mjqUpLnJlcGxhY2UoJ3ZvZHBsYXknLCd2b2RkZXRhaWwnKSArIFxcXCIjaW1tZXJzaX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B7XFxuICAgICAgICAgICAgICAgICAgICBjb25zdCBrZXkgPSBrZXlzW2ldXFxuICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tRm9sZExheW91dF1ba2V5XSA9IGxheW91dFtrZXldO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCLor7fkvKDlhaXmraPnoa7nmoTmipjlj6DnlYzpnaLlhYPntKDvvIFcXFwiKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAvLyBpbmplY3RJbmRleCDmipjlj6DmjInpkq7mj5LlhaXnrKwgaW5qZWN0SW5kZXgg6KGMXFxuICAgICAgICAgICAgaWYgKGluamVjdEluZGV4KSB7XFxuICAgICAgICAgICAgICAgIGlmICghKHR5cGVvZiAoaW5qZWN0SW5kZXgpID09PSAnbnVtYmVyJykpIHtcXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFwi5oqY5Y+g5oyJ6ZKu5o+S5YWl6KGM6K+35Lyg5YWl5pWw5a2X77yBXFxcIilcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAoaW5qZWN0SW5kZXggPCAxKSB7XFxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIuaKmOWPoOaMiemSruaPkuWFpeihjOivt+S8oOWFpeWkp+S6jiAwIOeahOaVtOaVsO+8gVxcXCIpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYgKGluamVjdEluZGV4ID4gdGhpc1tzeW1ib2xNYXAubUZvbGRJbmRleF0pIHtcXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFwi5oqY5Y+g5oyJ6ZKu5o+S5YWl6KGM5LiN5b6X5aSn5LqO5pi+56S65oqY5Y+g6KGM5pWw77yB6K+36LCD55SoIC5mb2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24pIHtcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAodXJsUnVsZS5wYXJzZU9wdGlvbikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBhcnNlRG9tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwZFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb207XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBhcnNlRG9tRm9ySHRtbFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGRmaFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb21Gb3JIdG1sO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHVybFJ1bGVbXFxcIuino+aekOaWueazlVxcXCJdKSB7XFxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKHVybFJ1bGVbXFxcIuino+aekOaWueazlVxcXCJdKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGFyc2VEb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBkXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGFyc2VEb21Gb3JIdG1sXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwZGZoXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbUZvckh0bWw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb207XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgdXJsID0gcGFyc2Uoc3JjLCBtVXJsUnVsZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmICh1cmxSdWxlLmRlYWxVcmwpIHtcXG4gICAgICAgICAgICAgICAgdXJsID0gdXJsUnVsZS5kZWFsVXJsKHVybClcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHVybFJ1bGVbJ+S6jOasoeWkhOeQhiddKSB7XFxuICAgICAgICAgICAgICAgIHVybCA9IHVybFJ1bGVbJ+S6jOasoeWkhOeQhiddKHVybClcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGlmICh1cmxSdWxlLnN0YXJ0c1dpdGgoXFxcIkBqczpcXFwiKSkge1xcbiAgICAgICAgICAgICAgICB1cmwgPSB0aGlzLmV2YWxKU1J1bGUoc3JjLCB1cmxSdWxlKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB1cmwgPSBwYXJzZURvbShzcmMsIHVybFJ1bGUpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiB1cmwgfHwgXFxcIlxcXCI7XFxuICAgIH0sXFxuICAgIGJ1aWxkKCkge1xcbiAgICAgICAgLy8g5qOA5rWL5piv5ZCm5Lyg5YWl6ZyA6KaB55qE5Y+C5pWwXFxuICAgICAgICB0aGl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ICAgICAgICAgICAgaWYgKHRoaXNbc3ltYm9sTWFwLm1Gb2xkSW5uZXJFbmFibGVdICYmIHRoaXNbc3ltYm9sTWFwLm1Gb2xkTGF5b3V0XS5pbmplY3RJbmRleCA9PT0gKGluZGV4KzEpKSB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgZm9sZExheW91dCA9IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGhpc1tzeW1ib2xNYXAubUZvbGRMYXlvdXRdLnRpdGxlIHx8ICh0aGlzW3N5bWJvbE1hcC5tRm9sZF0gPT09ICcxJyA/ICfigJzigJzigJ3igJ08Yj48c3BhbiBzdHlsZT1cXFwiY29sb3I6ICNGRjAwMDBcXFwiPuKIqDwvc3Bhbj48L2I+JyA6ICfigJzigJzigJ3igJ08Yj48c3BhbiBzdHlsZT1cXFwiY29sb3I6ICMxYWFkMTlcXFwiPuKIpzwvc3Bhbj48L2I+JyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB0aGlzW3N5bWJvbE1hcC5tRm9sZExheW91dF0udXJsIHx8ICQoXFxcImhpa2VyOi8vZW1wdHkjbm9IaXN0b3J5I1xcXCIpLmxhenlSdWxlKChwYXJhbXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIocGFyYW1zLm1UYWcgKyBwYXJhbXMuVkFSTUFQLkZPTEQsIGdldE15VmFyKHBhcmFtcy5tVGFnICsgcGFyYW1zLlZBUk1BUC5GT0xELCBwYXJhbXMuaXNGb2xkKSA9PT0gJzEnID8gJzAnIDogJzEnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1UYWc6IG1UYWcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzRm9sZDogdGhpc1tzeW1ib2xNYXAubUZvbGRdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBWQVJNQVA6IHRoaXMuVkFSTUFQXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IHRoaXNbc3ltYm9sTWFwLm1Gb2xkTGF5b3V0XS5jb2xfdHlwZSB8fCBcXFwic2Nyb2xsX2J1dHRvblxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tTGF5b3V0XS5wdXNoKGZvbGRMYXlvdXQpXFxuICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgLy/lhbfkvZPliJfooajkuIvnmoTliIbnsbtcXG4gICAgICAgICAgICAgICAgbGV0IHN1Yl9jYXRlZ29yaWVzID0gW107XFxuICAgICAgICAgICAgICAgIGlmIChjYXRlZ29yeS5zdWJMaXN0UnVsZS5zdGFydHNXaXRoKFxcXCJAanM6XFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzID0gdGhpcy5ldmFsSlNSdWxlKGNhdGVnb3J5Lmxpc3QsIGNhdGVnb3J5LnN1Ykxpc3RSdWxlKVxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMgPSBwYXJzZURvbUZvckFycmF5KGNhdGVnb3J5Lmxpc3QsIGNhdGVnb3J5LnN1Ykxpc3RSdWxlKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAoaW5kZXggPCAodGhpc1tzeW1ib2xNYXAubUZvbGRJbmRleF0gfHwgMSkpIHtcXG4gICAgICAgICAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHRoaXMuZ2V0VGl0bGUoaXRlbSwgY2F0ZWdvcnkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHRoaXMuZ2V0VXJsKGl0ZW0sIGNhdGVnb3J5KVxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1MYXlvdXRdLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyAn4oCc4oCc4oCd4oCdPGI+PGZvbnQgY29sb3I9JyArIHRoaXNbc3ltYm9sTWFwLm1Db2xvcl0gKyAnPicgKyB0aXRsZSArICcgPC9mb250PjwvYj4nIDogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCh1cmwpLmxhenlSdWxlKChwYXJhbXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdfY2F0ZSA9IFtdXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocGFyYW1zLmluZGV4ID09PSAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcC5mb3JFYWNoKChjYXRlLCBpbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY2F0ZS5wdXNoKGluZGV4ID09PSAwID8gcGFyYW1zLmtleS50b1N0cmluZygpIDogXFxcIjBcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy50YWcgKyBwYXJhbXMuVkFSTUFQLkNBVEVHT1JZLCBKU09OLnN0cmluZ2lmeShwYXJhbXMuaW5kZXggPT09IDAgPyBuZXdfY2F0ZSA6IHBhcmFtcy5jYXRlX3RlbXApKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIocGFyYW1zLnRhZyArIHBhcmFtcy5WQVJNQVAuVVJMLCBpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVkFSTUFQOiB0aGlzLlZBUk1BUCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhZzogbVRhZyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogdGhpc1tzeW1ib2xNYXAubVBhZ2VdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1MYXlvdXRdLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzW3N5bWJvbE1hcC5tRm9sZF0gPT09ICcwJykge1xcbiAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMuZm9yRWFjaCgoaXRlbSwga2V5KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gdGhpcy5nZXRUaXRsZShpdGVtLCBjYXRlZ29yeSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gdGhpcy5nZXRVcmwoaXRlbSwgY2F0ZWdvcnkpXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBrZXkudG9TdHJpbmcoKSA9PT0gY2F0ZV90ZW1wW2luZGV4XSA/ICfigJzigJzigJ3igJ08Yj48Zm9udCBjb2xvcj0nICsgdGhpc1tzeW1ib2xNYXAubUNvbG9yXSArICc+JyArIHRpdGxlICsgJyA8L2ZvbnQ+PC9iPicgOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHVybCkubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcFtwYXJhbXMuaW5kZXhdID0gcGFyYW1zLmtleS50b1N0cmluZygpXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMudGFnICsgcGFyYW1zLlZBUk1BUC5DQVRFR09SWSwgSlNPTi5zdHJpbmdpZnkocGFyYW1zLmNhdGVfdGVtcCkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMudGFnICsgcGFyYW1zLlZBUk1BUC5VUkwsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWQVJNQVA6IHRoaXMuVkFSTUFQLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFnOiBtVGFnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiB0aGlzW3N5bWJvbE1hcC5tUGFnZV0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJibGFua19ibG9ja1xcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XF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FxcbiAgICBkZWJ1ZygpIHtcXG4gICAgICAgIHRoaXMucGFyYW1zLmRlYnVnID0gdHJ1ZVxcbiAgICAgICAgcmV0dXJuIHRoaXM7XFxuICAgIH0sXFxuICAgIGV4ZWMoKSB7XFxuICAgICAgICB0aGlzLmNoZWNrUGFyYW1zKClcXG4gICAgICAgIGxldCB0cnVlX3VybCA9ICcnXFxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRoaXMucmVnZXhNYXAubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICBsZXQgcmVnT2JqID0gdGhpcy5yZWdleE1hcFtpXTtcXG4gICAgICAgICAgICBsZXQgdXJsRXhwID0gcmVnT2JqLnJlZztcXG4gICAgICAgICAgICBpZiAodHlwZW9mIHVybEV4cCA9PT0gJ3N0cmluZycpIHtcXG4gICAgICAgICAgICAgICAgdXJsRXhwID0gbmV3IFJlZ0V4cCh1cmxFeHApXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmICh1cmxFeHAudGVzdCh0aGlzLnBhcmFtcy51cmwpKSB7XFxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnBhcmFtcy5kZWJ1Zykge1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKHVybEV4cC50b1N0cmluZygpKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHRydWVfdXJsID0gcmVnT2JqLmV4ZWMoKTtcXG4gICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKHRydWVfdXJsKSB7XFxuICAgICAgICAgICAgcmV0dXJuIHRydWVfdXJsO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5wYXJhbXMudXJsXFxuICAgICAgICB9XFxuICAgIH0sXFxuICAgIOiOt+WPluWkhOeQhue7k+aenCgpIHtcXG4gICAgICAgIHJldHVybiB0aGlzLmV4ZWMoKVxcb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ycgPyAnIzFhYWQxOVxcXFxcXFwiPuato+W6jycgOiAnI0ZGMDAwMFxcXFxcXFwiPuWAkuW6jyc7XFxcXG4gICAgICAgIHVwZGF0ZUl0ZW0oe1xcXFxuICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICBpZDogTVlfVVJMICsgXFxcXFxcXCJf5o6S5bqPXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgbG9uZ0NsaWNrOiBbe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcXFxcXCJUVmJveOaOqOmAgVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygodGFicywgbGlzdHMsIGQpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciDmjqjpgIEgPSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJuYW1lXFxcXFxcXCI6IGdldFBhZ2VUaXRsZSgpLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiY29udGVudFxcXFxcXFwiOiBkLmRlc2MsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJwaWNcXFxcXFxcIjogZC5pbWcgfHwgZC5waWNfdXJsLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiZnJvbVxcXFxcXFwiOiB0YWJzLmpvaW4oJyQkJCcpLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwidXJsXFxcXFxcXCI6IHN0b3JhZ2UwLmdldE15VmFyKFxcXFxcXFwibGlzdHNcXFxcXFxcIikubWFwKGxpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGxpLm1hcChsaTEgPT4gcGRmaChsaTEsICdUZXh0JykgKyAnJCcgKyBwZChsaTEsICdhJiZocmVmJykpLmpvaW4oJyMnKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLmpvaW4oJyQkJCcpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL3BhZ2UvcHVzaD9ydWxlPVhZUeaOqOmAgSZwdXNodXJsPVxcXFxcXFwiICsgZW5jb2RlVVJJQ29tcG9uZW50KEpTT04uc3RyaW5naWZ5KOaOqOmAgSkpXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIHRhYnMsIGxpc3RzLCBkKVxcXFxuICAgICAgICAgICAgICAgIH1dXFxcXG4gICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgdGl0bGU6IOaOkuW6j+WQjS5yZXBsYWNlKCfmjpLluo8nLCDmj5DnpLopXFxcXG4gICAgICAgIH0pXFxcXG4gICAgICAgIGlmICjmjpLluo8gPT0gJyMxYWFkMTlcXFxcXFxcIj7mraPluo8nKSB7XFxcXG4gICAgICAgICAgICDnq6DoioIucmV2ZXJzZSgpXFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgbGV0IGNwID0g56ug6IqCLm1hcCgoZGF0YSwgc3NpZCkgPT4ge1xcXFxuICAgICAgICAgICAgcmV0dXJuIHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChkYXRhLCAnYSYmVGV4dCcpLFxcXFxuICAgICAgICAgICAgICAgIHVybDogcGQoZGF0YSwgJ2EmJmhyZWYnKSArIGxhenksXFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IOeroOiKgi5sZW5ndGggPiAzID8gJ3RleHRfNCcgOiAndGV4dF8yJyxcXFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICBjbHM6IE1ZX1VSTCArIFxcXFxcXFwiX+mAiembhlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBpZDogcGQoZGF0YSwgJ2EmJmhyZW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ioLmjpLluo9cXFxcXFxcIiwgJyMxYWFkMTlcXFxcXFxcIj7mraPluo8nKTtcXFxcbiAgICAgICAgICAgIHZhciDmj5DnpLogPSDmjpLluo8gPT0gJyNGRjAwMDBcXFxcXFxcIj7lgJLluo8nID8gJyMxYWFkMTlcXFxcXFxcIj7mraPluo8nIDogJyNGRjAwMDBcXFxcXFxcIj7lgJLluo8nO1xcXFxuICAgICAgICAgICAg57q/6LevLmZvckVhY2goKGRhdGEsIHhsaWQpID0+IHtcXFxcbiAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGlkID09IHhsaWQgPyAn4oCc4oCcJyArIGRhdGEgKyAn4oCd4oCdJyA6IGRhdGEsXFxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogTVlfVVJMICsgXFxcXFxcXCJf57q/6LevXFxcXFxcXCIgKyB4bGlkXFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICBwdXRNeVZhcihNWV9VUkwsIGlkKVxcXFxuICAgICAgICAgICAgdmFyIOeroOiKgiA9IGxpc3RzW2dldE15VmFyKE1ZX1VSTCwgJzAnKV07XFxcXG4gICAgICAgICAgICBpZiAo5o6S5bqPID09ICcjRkYwMDAwXFxcXFxcXCI+5YCS5bqPJykge1xcXFxuICAgICAgICAgICAgICAgIOeroOiKgi5yZXZlcnNlKClcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGxldCBjcCA9IOeroOiKgi5tYXAoKGRhdGEsIHNzaWQpID0+IHtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChkYXRhLCAnYSYmVGV4dCcpLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IHBkKGRhdGEsICdhJiZocmVmJykgKyBsYXp5LFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTog56ug6IqCLmxlbmd0aCA+IDMgPyAndGV4dF80JyA6ICd0ZXh0XzInLFxcXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBNWV9VUkwgKyBcXFxcXFxcIl/pgInpm4ZcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBwZChkYXRhLCAnYSYmaHJlZicpXFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9O1xcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoTVlfVVJMICsgXFxcXFxcXCJf6YCJ6ZuGXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgYWRkSXRlbUJlZm9yZShNWV9VUkwgKyBcXFxcXFxcImZvb3RlclxcXFxcXFwiLCBjcCk7XFxcXG4gICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgfSwgdGFicywgbGF6eSwgaWQpLFxcXFxuICAgICAgICBjb2xfdHlwZTogJ2ZsZXhfYnV0dG9uJyxcXFxcbiAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgIGlkOiBNWV9VUkwgKyBcXFxcXFxcIl/nur/ot69cXFxcXFxcIiArIGlkXFxcXG4gICAgICAgIH1cXFxcbiAgICB9KTtcXFxcbn0pXFxcXG5cXFxcbmlmICjmjpLluo8gPT0gJyNGRjAwMDBcXFxcXFxcIj7lgJLluo8nKSB7XFxcXG4gICAgbGlzdC5yZXZlcnNlKClcXFxcbn1cXFxcbmxpc3QuZm9yRWFjaCgoZGF0YSwgaWQpID0+IHtcXFxcbiAgICBkLnB1c2goe1xcXFxuICAgICAgICB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gICAgIGFsbEtleTogdHJ1ZSxcXFxcbiAgICAgICAgfSxcXFxcbiAgICAgICAge1xcXFxuICAgICAgICAgICAga2V5czogW1xcXFxcXFwibXl1aS12b2RsaXN0IFxcXFxcXFwiXSxcXFxcbiAgICAgICAgICAgIHVybDogXFxcXFxcXCJteXVpLXZvZGxpc3RcXFxcXFxcIixcXFxcbiAgICAgICAgfSxcXFxcbiAgICAgICAge1xcXFxuICAgICAgICAgICAga2V5czogW1xcXFxcXFwibW8tbW92cy1pdGVtXFxcXFxcXCJdLFxcXFxuICAgICAgICAgICAgdXJsOiBcXFxcXFxcIm1vLW1vdnMtaXRlbVxcXFxcXFwiLFxcXFxuICAgICAgICB9LFxcXFxuICAgICAgICB7XFxcXG4gICAgICAgICAgICBrZXlzOiBbXFxcXFxcXCJtb2R1bGUtdGFiLWl0ZW1cXFxcXFxcIl0sXFxcXG4gICAgICAgICAgICB1cmw6IFxcXFxcXFwibW9kdWxlLXRhYi1pdGVtXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAvLyAgICAgYWxsS2V5OiB0cnVlLFxcXFxuICAgICAgICB9LHtcXFxcbiAgICAgICAgICAgIGtleXM6IFtcXFxcXFxcInktcGxheUxpc3RcXFxcXFxcIl0sXFxcXG4gICAgICAgICAgICB1cmw6IFxcXFxcXFwieS1wbGF5TGlzdFxcXFxcXFwiLFxcXFxuICAgICAgICB9LFxcXFxuICAgICAgICB7XFxcXG4gICAgICAgICAgICBrZXlzOiBbXFxcXFxcXCJzdHVpLXZvZGxpc3QgXFxcXFxcXCJdLFxcXFxuICAgICAgICAgICAgdXJsOiBcXFxcXFxcInN0dWktdm9kbGlzdFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgLy8gICAgIGFsbEtleTogdHJ1ZSxcXFxcbiAgICAgICAgfSxcXFxcbiAgICAgICAge1xcXFxuICAgICAgICAgICAga2V5czogW1xcXFxcXFwicGxheV9zb3VyY2VfdGFiXFxcXFxcXCJdLFxcXFxuICAgICAgICAgICAgdXJsOiBcXFxcXFxcInBsYXlfc291cmNlX3RhYlxcXFxcXFwiLFxcXFxuICAgICAgICB9LFxcXFxuICAgICAgICB7XFxcXG4gICAgICAgICAgICBrZXlzOiBbXFxcXFxcXCJmZWQtcGxheS1pdGVtXFxcXFxcXCJdLFxcXFxuICAgICAgICAgICAgdXJsOiBcXFxcXFxcImZlZC1wbGF5LWl0ZW1cXFxcXFxcIixcXFxcbiAgICAgICAgfSxcXFxcbiAgICAgICAge1xcXFxuICAgICAgICAgICAga2V5czogW1xcXFxcXFwibW9kdWxlLWl0ZW1cXFxcXFxcIl0sXFxcXG4gICAgICAgICAgICB1cmw6IFxcXFxcXFwibW9kdWxlLWl0ZW1zXFxcXFxcXCIsXFxcXG4gICAgICAgIH0sXFxcXG4gICAgICAgIHtcXFxcbiAgICAgICAgICAgIGtleXM6IFtcXFxcXFxcInZvZGxpc3QgXFxcXFxcXCIsIFxcXFxcXFwibGF6eWxvYWRcXFxcXFxcIl0sXFxcXG4gICAgICAgICAgICB1cmw6IFxcXFxcXFwidm9kbGlzdFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgYWxsS2V5OiB0cnVlLFxcXFxuICAgICAgICB9LFxcXFxuICAgICAgICB7XFxcXG4gICAgICAgICAgICBrZXlzOiBbXFxcXFxcXCJtby1wbGF5LWxvYWRcXFxcXFxcIl0sXFxcXG4gICAgICAgICAgICB1cmw6IFxcXFxcXFwibW8tcGxheS1sb2FkXFxcXFxcXCIsXFxcXG4gICAgICAgIH0sXFxcXG4gICAgICAgIHtcXFxcbiAgICAgICAgICAgIGtleXM6IFtcXFxcXFxcImZlZC1saXN0LXRpdGxlXFxcXFxcXCJdLFxcXFxuICAgICAgICAgICAgdXJsOiBcXFxcXFxcImZlZC1saXN0LXRpdGxlXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAvL2FsbEtleTogdHJ1ZSxcXFxcbiAgICAgICAgfSxcXFxcbiAgICAgICAge1xcXFxuICAgICAgICAgICAga2V5czogW1xcXFxcXFwicGFjay15a3BhY2tcXFxcXFxcXFxcXFxcXFwiXFxcXFxcXCJdLFxcXFxuICAgICAgICAgICAgdXJsOiBcXFxcXFxcInBhY2steWtwYWNrXFxcXFxcXCIsXFxcXG4gICAgICAgIH0sXFxcXG4gICAgICAgIC8qXFxcXG4gICAgICAgICAgICAgICAge1xcXFxuICAgICAgICAgICAgICAgICAgICBrZXlzOiBbXFxcXFxcXCJpdGVtXFxcXFxcXCJdLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXFxcXFwiaXRlbVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIH0sKi9cXFxcbiAgICAgICAge1xcXFxuICAgICAgICAgICAga2V5czogW1xcXFxcXFwiZGF0YV9saXN0XFxcXFxcXCJdLFxcXFxuICAgICAgICAgICAgdXJsOiBcXFxcXFxcImRhdGFfbGlzdFxcXFxcXFwiLFxcXFxuICAgICAgICB9LFxcXFxuICAgIF0sXFxcXG4gICAgXFxcXFxcXCJzZWFyY2hcXFxcXFxcIjogW3tcXFxcbiAgICAgICAgICAgIGtleXM6IFtcXFxcXFxcInN0dWktdm9kbGlzdF9fbWVkaWFcXFxcXFxcIl0sXFxcXG4gICAgICAgICAgICB1cmw6IFxcXFxcXFwic3R1aS12b2RsaXN0X19tZWRpYVxcXFxcXFwiLFxcXFxuICAgICAgICB9LFxcXFxuICAgICAgICB7XFxcXG4gICAgICAgICAgICBrZXlzOiBbXFxcXFxcXCJteXVpLXZvZGxpc3RfX21lZGlhXFxcXFxcXCJdLFxcXFxuICAgICAgICAgICAgdXJsOiBcXFxcXFxcIm15dWktdm9kbGlzdF9fbWVkaWFcXFxcXFxcIixcXFxcbiAgICAgICAgfSxcXFxcbiAgICAgICAge1xcXFxuICAgICAgICAgICAga2V5czogW1xcXFxcXFwibW9kdWxlLXNlYXJjaC1pdGVtXFxcXFxcXCJdLFxcXFxuICAgICAgICAgICAgdXJsOiBcXFxcXFxcIm1vZHVsZS1zZWFyY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gICAgICAgICAgICAgbGV0IHRpdGxlID0gcGRmaChpdGVtLCDliIbnsbvmoIfpopgpXFxcXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZijmjpLpmaQpICE9ICd1bmRlZmluZWQnICYmIOaOkumZpCAhPSAnJykge1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZSA9IHRpdGxlLnJlcGxhY2UobmV3IFJlZ0V4cCjmjpLpmaQsIFxcXFxcXFwiZ1xcXFxcXFwiKSwgXFxcXFxcXCJcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gXFxcXFxcXCLigJzigJzigJ3igJ1cXFxcXFxcIiArIHRpdGxlLmZvbnRjb2xvcijliIbnsbvpopzoibIpIDogdGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChwZChpdGVtLCDliIbnsbvpk77mjqUpICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld19jYXRlID0gW11cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXAuZm9yRWFjaCgoY2F0ZSwgaW5kZXgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY2F0ZS5wdXNoKGluZGV4ID09PSAwID8gcGFyYW1zLmtleS50b1N0cmluZygpIDogXFxcXFxcXCIwXFxcXFxcXCIpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KG5ld19jYXRlKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnVybCwgaW5wdXQpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiBwYWdlLFxcXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXFxcbiAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiYmxhbmtfYmxvY2tcXFxcXFxcIlxcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgIH0gZWxzZSBpZiAoZm9sZCA9PT0gJzEnKSB7XFxcXG4gICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0ZW0sIOWIhuexu+agh+mimClcXFxcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mKOaOkumZpCkgIT0gJ3VuZGVmaW5lZCcgJiYg5o6S6ZmkICE9ICcnKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlID0gdGl0bGUucmVwbGFjZShuZXcgUmVnRXhwKOaOkumZpCwgXFxcXFxcXCJnXFxcXFxcXCIpLCBcXFxcXFxcIlxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyBcXFxcXFxcIuKAnOKAnOKAneKAnVxcXFxcXFwiICsgdGl0bGUuZm9udGNvbG9yKOWIhuexu+minOiJsikgOiB0aXRsZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHBkKGl0ZW0sIOWIhuexu+mTvuaOpSkgKyAnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5jYXRlX3RlbXApKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudXJsLCBpbnB1dClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgfSwge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHBhZ2UsXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTog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Xgg6KGMXFxcXG4gICAgICAgICAgICBpZiAoaW5qZWN0SW5kZXgpIHtcXFxcbiAgICAgICAgICAgICAgICBpZiAoISh0eXBlb2YgKGluamVjdEluZGV4KSA9PT0gJ251bWJlcicpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFxcXFxcIuaKmOWPoOaMiemSruaPkuWFpeihjOivt+S8oOWFpeaVsOWtl++8gVxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBpZiAoaW5qZWN0SW5kZXggPCAxKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFxcXFxcIuaKmOWPoOaMiemSruaPkuWFpeihjOivt+S8oOWFpeWkp+S6jiAwIOeahOaVtOaVsO+8gVxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBpZiAoaW5qZWN0SW5kZXggPiB0aGlzW3N5bWJvbE1hcC5tRm9sZEluZGV4XSkge1xcXFxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcXFxcXCLmipjlj6DmjInpkq7mj5LlhaXooYzkuI3lvpflpKfkuo7mmL7npLrmipjlj6DooYzmlbDvvIHor7fosIPnlKggLmZvbGRJbmRleChpbmRleCkg5oiWIC7nrKzlh6DooYzlvIDlp4vmipjlj6AoaW5kZXgpIOS8oOWFpeato+ehrueahOaYvuekuuaKmOWPoOihjOaVsFxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tRm9sZExheW91dF0uaW5qZWN0SW5kZXggPSBpbmplY3RJbmRleCB8fCAxO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXFxcXFwi6K+35Lyg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cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcXFxcXCJwYXJzZURvbVxcXFxcXFwiOlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFxcXFxcInBkXFxcXFxcXCI6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcXFxcXCJwYXJzZURvbUZvckh0bWxcXFxcXFxcIjpcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcXFxcXCJwZGZoXFxcXFxcXCI6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbUZvckh0bWw7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb207XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHVybFJ1bGVbXFxcXFxcXCLop6PmnpDmlrnms5VcXFxcXFxcIl0pIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoICh1cmxSdWxlW1xcXFxcXFwi6Kej5p6Q5pa55rOVXFxcXFxcXCJdKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXFxcXFwicGFyc2VEb21cXFxcXFxcIjpcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcXFxcXCJwZFxcXFxcXFwiOlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb207XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXFxcXFwicGFyc2VEb21Gb3JIdG1sXFxcXFxcXCI6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXFxcXFwicGRmaFxcXFxcXFwiOlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb21Gb3JIdG1sO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tO1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIHVybCA9IHBhcnNlKHNyYywgbVVybFJ1bGUpO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgaWYgKHVybFJ1bGUuZGVhbFVybCkge1xcXFxuICAgICAgICAgICAgICAgIHVybCA9IHVybFJ1bGUuZGVhbFVybCh1cmwpXFxcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHVybFJ1bGVbJ+S6jOasoeWkhOeQhiddKSB7XFxcXG4gICAgICAgICAgICAgICAgdXJsID0gdXJsUnVsZVsn5LqM5qyh5aSE55CGJ10odXJsKVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgaWYgKHVybFJ1bGUuc3RhcnRzV2l0aChcXFxcXFxcIkBqczpcXFxcXFxcIikpIHtcXFxcbiAgICAgICAgICAgICAgICB1cmwgPSB0aGlzLmV2YWxKU1J1bGUoc3JjLCB1cmxSdWxlKTtcXFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgdXJsID0gcGFyc2VEb20oc3JjLCB1cmxSdWxlKTtcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAg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KHBhcmFtcykgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy5tVGFnICsgcGFyYW1zLlZBUk1BUC5GT0xELCBnZXRNeVZhcihwYXJhbXMubVRhZyArIHBhcmFtcy5WQVJNQVAuRk9MRCwgcGFyYW1zLmlzRm9sZCkgPT09ICcxJyA/ICcwJyA6ICcxJylcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbVRhZzogbVRhZyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc0ZvbGQ6IHRoaXNbc3ltYm9sTWFwLm1Gb2xkXSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBWQVJNQVA6IHRoaXMuVkFSTUFQXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiB0aGlzW3N5bWJvbE1hcC5tRm9sZExheW91dF0uY29sX3R5cGUgfHwgXFxcXFxcXCJzY3JvbGxfYnV0dG9uXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaChmb2xkTGF5b3V0KVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcblxcXFxuICAgICAgICAgICAgICAgIC8v5YW35L2T5YiX6KGo5LiL55qE5YiG57G7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHN1Yl9jYXRlZ29yaWVzID0gW107XFxcXG4gICAgICAgICAgICAgICAgaWYgKGNhdGVnb3J5LnN1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5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdfY2F0ZSA9IFtdXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwYXJhbXMuaW5kZXggPT09IDApIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXAuZm9yRWFjaCgoY2F0ZSwgaW5kZXgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY2F0ZS5wdXNoKGluZGV4ID09PSAwID8gcGFyYW1zLmtleS50b1N0cmluZygpIDogXFxcXFxcXCIwXFxcXFxcXCIpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXBbcGFyYW1zLmluZGV4XSA9IHBhcmFtcy5rZXkudG9TdHJpbmcoKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy50YWcgKyBwYXJhbXMuVkFSTUFQLkNBVEVHT1JZLCBKU09OLnN0cmluZ2lmeShwYXJhbXMuaW5kZXggPT09IDAgPyBuZXdfY2F0ZSA6IHBhcmFtcy5jYXRlX3RlbXApKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMudGFnICsgcGFyYW1zLlZBUk1BUC5VUkwsIGlucHV0KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFZBUk1BUDogdGhpcy5WQVJNQVAsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhZzogbVRhZyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHRoaXNbc3ltYm9sTWFwLm1QYWdlXSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJibGFua19ibG9ja1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpc1tzeW1ib2xNYXAubUZvbGRdID09PSAnMCcpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMuZm9yRWFjaCgoaXRlbSwga2V5KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSB0aGlzLmdldFRpdGxlKGl0ZW0sIGNhdGVnb3J5KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHRoaXMuZ2V0VXJsKGl0ZW0sIGNhdGVnb3J5KVxcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tTGF5b3V0XS5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyAn4oCc4oCc4oCd4oCdPGI+PGZvbnQgY29sb3I9JyArIHRoaXNbc3ltYm9sTWFwLm1Db2xvcl0gKyAnPicgKyB0aXRsZSArICcgPC9mb250PjwvYj4nIDogdGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHVybCkubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMudGFnICsgcGFyYW1zLlZBUk1BUC5DQVRFR09SWSwgSlNPTi5zdHJpbmdpZnkocGFyYW1zLmNhdGVfdGVtcCkpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy50YWcgKyBwYXJhbXMuVkFSTUFQLlVSTCwgaW5wdXQpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OiBpbmRleCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVkFSTUFQOiB0aGlzLlZBUk1BUCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFnOiBtVGFnLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogdGhpc1tzeW1ib2xNYXAubVBhZ2VdLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tTGF5b3V0XS5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImJsYW5rX2Jsb2NrXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgIH1cXFxcbiAgICB9LFxcXFxuXFxcXG4gICAg55WM6Z2iKGxheW91dCkge1xcXFxuICAgICAgICByZXR1cm4gdGhpcy5sYXlvdXQobGF5b3V0KVxcXFxuICAgIH0sXFxcXG4gICAg5YiG57G76ZO+5o6lKHRydWVVcmwpIHtcXFxcbiAgICAgICAgcmV0dXJuIHRoaXMudHJ1ZVVybCh0cnVlVXJsKTtcXFxcbiAgICB9LFxcXFxuICAgIOmhteeggShwYWdlKSB7XFxcXG4gICAgICAgIHJldHVybiB0aGlzLnBhZ2Uoc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luZycpIHtcXFxcbiAgICAgICAgICAgICAgICB1cmxFeHAgPSBuZXcgUmVnRXhwKHVybEV4cClcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGlmICh1cmxFeHAudGVzdCh0aGlzLnBhcmFtcy51cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMucGFyYW1zLmRlYnVnKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxvZyh1cmxFeHAudG9TdHJpbmcoKSlcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgdHJ1ZV91cmwgPSByZWdPYmouZXhlYygpO1xcXFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9XFxcXG4gICAgICAgIGlmICh0cnVlX3VybCkge1xcXFxuICAgICAgICAgICAgcmV0dXJuIHRydWVfdXJsO1xcXFxuICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgcmV0dXJuIHRoaXMucGFyYW1zLnVybFxcXFxuICAgICAgICB9XFxcXG4gICAgfSxcXFxcbiAgICDojrflj5blpITnkIbnu5PmnpwoKSB7XFxcXG4gICAgICAgIHJldHVybiB0aGlzLmV4ZWMoKVxcXFxuICAgIH0sXFxcXG4gICAg6ZO+5o6lKHVybCkge1xcXFxuICAgICAgICByZXR1cm4gdGhpcy5iYXNlVXJsKHVybClcXFxcbiAgICB9LFxcXFxuICAgIOmhteeggShwYWdlKSB7XFxcXG4gICAgICAgIHJldHVybiB0aGlzLnBhZ2UocGFnZSlcXFxcbiAgICB9LFxcXFxuICAgIOaPkuWFpeaWsOWkhOeQhuinhOWImShyZWdFeHApIHtcXFxcbiAgICAgICAgcmV0dXJuIHRoaXMuYWRkRXh0cmEocmVnRXhwKVxcXFxuICAgIH0sXFxcXG4gICAg6LCD6K+V5qih5byPKCkge1xcXFxuICAgICAgICByZXR1cm4gdGhpcy5kZWJ1ZygpO1xcXFxuICAg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