xiaomianao666

邀您一起看:冰属性男子和酷酷女同事-妹妹登场!滑雪场的圣诞节

Feb 25th, 2023
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥冰属性男子和酷酷女同事-妹妹登场!滑雪场的圣诞节@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcImFwaVwiLFwicGF0aFwiOlwiYXBpXCIsXCJydWxlXCI6XCIkLmV4cG9ydHMuZ2V0RmVlZCA9IGZ1bmN0aW9uKCkge1xcbiAgICBsZXQgdSA9IFxcXCJodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC93ZWItaW50ZXJmYWNlL2luZGV4L3RvcC9mZWVkL3JjbWRcXFwiXFxuICAgIGxldCByZXMgPSBKU09OLnBhcnNlKHJlcXVlc3QodSwge1xcbiAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiByZWFkRmlsZShcXFwiQ29va2llLnR4dFxcXCIpXFxuICAgICAgICB9XFxuICAgIH0pKVxcbiAgICByZXR1cm4gcmVzLmRhdGEuaXRlbVxcbn1cXG4kLmV4cG9ydHMuZ2V0VXNlckluZm8gPSBmdW5jdGlvbigpIHtcXG4gICAgbGV0IHUgPSBcX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WRcXFwiOiBpZFxcbiAgICB9KSwge1xcbiAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiByZWFkRmlsZShcXFwiQ29va2llLnR4dFxcXCIpXFxuICAgICAgICB9XFxuICAgIH0pKS5kYXRhLmZhdm91cmVkXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogKGhhc0xpa2UgPyBjb2xvcihsaWtlLCBcXFwiI0ZBNzI5OFxcXCIpIDogbGlrZSksXFxuICAgICAgICBpbWc6IFxcXCJodHRwczovL2docHJveHkuY29tL2h0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS9Tb2NpYWxTaXN0ZXJZaS9iaWxpYmlsaS1BUEktY29sbGVjdC9tYXN0ZXIvaW1ncy9saWtlLnN2Z1xcXCIsXFxuICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfNFxcXCIsXFxuICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaWQsIGhhc0xpa2UpID0+IHtcXG4gICAgICAgICAgICBsZXQgY3NyZiA9IHJlYWRGaWxlKFxcXCJDb29raWUudHh0XFxcIikubWF0Y2goL2JpbGlfamN0PSguKj8pOy8pWzFdXFxuICAgICAgICAgICAgbGV0IHJlcyA9IHBvc3QoXFxcImh0dHA6Ly9hcGkuYmlsaWJpbGkuY29tL3gvd2ViLWludGVyZmFjZS9hcmNoaXZlL2xpa2VcXFwiLCB7XFxuICAgICAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJhaWRcXFwiOiBpZCxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJsaWtlXFxcIjogKGhhc0xpa2UgPyAyIDogMSksXFxuICAgICAgICAgICAgICAgICAgICBcXFwiY3NyZlxcXCI6IGNzcmZcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgXFx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XFwiOiBpbnB1dCxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJjc3JmXFxcIjogY3NyZlxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogcmVhZEZpbGUoXFxcIkNvb2tpZS50eHRcXFwiKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+aKleS6hlxcXCIgKyBpbnB1dCArIFxcXCLkuKrluIFcXFwiXFxuICAgICAgICB9LCBpZClcXG4gICAgfSwge1xcbiAgICAgICAgdGl0bGU6IChoYXNGYXZvdXIgPyBjb2xvcihmYXZvdXJpdGUsIFxcXCIjRkE3Mjk4XFxcIikgOiBmYXZvdXJpdGUpLFxcbiAgICAgICAgaW1nOiBcXFwiaHR0cHM6Ly9naHByb3h5LmNvbS9odHRwczovL3Jhdy5naXRodWJ1c2VyY29udGVudC5jb20vU29jaWFsU2lzdGVyWWkvYmlsaWJpbGktQVBJLWNvbGxlY3QvbWFzdGVyL2ltZ3MvZmF2LnN2Z1xcXCIsXFxuICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfNFxcXCIsXFxuICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaWQsIGhhc0Zhdm91cikgPT4ge1xcbiAgICAgICAgICAgIGxldCBib2R5ID0gaGFzRmF2b3VyID8ge1xcbiAgICAgICAgICAgICAgICBcXFwicmlkXFxcIjogaWQsXFxuICAgICAgICAgICAgICAgIFxcXCJ0eXBlXFxcIjogMixcXG4gICAgICAgICAgICAgICAgXFxcImRlbF9tZWRpYV9pZHNcXFwiOiAwLFxcbiAgICAgICAgICAgICAgICBcXFwiY3NyZlxcXCI6IGNzcmZcXG4gICAgICAgICAgICB9IDoge1xcbiAgICAgICAgICAgICAgICBcXFwicmlkXFxcIjogaWQsXFxuICAgICAgICAgICAgICAgIFxcXCJ0eXBlXFxcIjogMixcXG4gICAgICAgICAgICAgICAgXFxcImFkZF9tZWRpYV9pZHNcXFwiOiAwLFxcbiAgICAgICAgICAgICAgICBcXFwiY3NyZlxcXCI6IGNzcmZcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbGV0IGNzcmYgPSByZWFkRmlsZShcXFwiQ29va2llLnR4dFxcXCIpLm1hdGNoKC9iaWxpX2pjdD0oLio/KTsvKVsxXVxcbiAgICAgICAgICAgIGxldCByZXMgPSBwb3N0KFxcXCJodHRwOi8vYXBpLmJpbGliaWxpLmNvbS9tZWRpYWxpc3QvZ2F0ZXdheS9jb2xsL3Jlc291cmNlL2RlYWxcXFwiLCB7XFxuICAgICAgICAgICAgICAgIGJvZHk6IGJvZHksXFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiByZWFkRmlsZShcXFwiQ29va2llLnR4dFxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiBcXFwiaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tXFxcIlxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL1xcXCIgKyAoaGFzRmF2b3VyID8gXFxcIuWPlua2iOaUtuiXj1xcXCIgOiBcXFwi5pS26JeP5oiQ5YqfXFxcIilcXG4gICAgICAgIH0sIGlkLCBoYXNGYXZvdXIpXFxuICAgIH0sIHtcXG4gICAgICAgIHRpdGxlOiBcXFwi6K+E6K66XFxcIixcXG4gICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZVxcXCIsXFxuICAgICAgICBpbWc6IFxcXCJodHRw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6IFxcXCLmjqjpgIFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKGlkLCBjaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlKFxcXCJodHRwczovL2hpa2VyZmFucy5jb20vSm9lL1RWYm94LmpzXFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4g5o6o6YCBdHZib3goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBcXFwi5o6o6YCBIGJ5IEpvZVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZvZDogW3tcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IFxcXCJiaWxpYmlsaVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmxzOiBKU09OLnBhcnNlKCQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmxhenkoaWQsIGNpZCwgMTIwKS5yZXBsYWNlKC87L2csIFxcXCLvvJvvvJtcXFwiKSkudXJsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1dLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3d3dy5iaWxpYmlsaS5jb21cXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSwgaWQsIGNpZClcXG4gICAgICAgICAgICAgICAgfV0sXFxuICAgICAgICAgICAgICAgIFxcXCJpZFxcXCI6IFxcXCJxblxcXCJcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICAgICAgYS5zdXBwb3J0X2Zvcm1hdHMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5uZXdfZGVzY3JpcHRpb24sXFxuICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChpZCwgY2lkLCBxbikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmxhenkoaWQsIGNpZCwgcW4pLnJlcGxhY2UoLzsvZywgXFxcIu+8m++8m1xcXCIpXFxuICAgICAgICAgICAgICAgIH0sIGlkICsgXFxcIlxcXCIsIGNpZCArIFxcXCJcXFwiLCBpdGVtLnF1YWxpdHkgKyBcXFwiXFxcIiksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8yXFxcIlxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgcC5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnBhcnQsXFxuICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChpZCwgY2lkKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikubGF6eShpZCwgY2lkLCAxMjApLnJlcGxhY2UoLzsvZywgXFxcIu+8m++8m1xcXCIpXFxuICAgICAgICAgICAgICAgIH0sIGlkLCBpdGVtLmNpZCArIFxcXCJcXFwiKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzJcXFwiLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcImNpZFxcXCI6IGl0ZW0uY2lkLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImlkXFxcIjogaWQsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiYnZpZFxcXCI6IGJ2aWRcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICB9XFxufSBjYXRjaCAoZSkge1xcbiAgICBsb2coZS5tZXNzYWdlKVxcbiAgICB0b2FzdChcXFwi56iL5bqP5Ye6546w6Zeu6aKY77yM6K+35omT5byA5pel5b+X5p+l55yLXFxcIilcXG59XFxuc2V0UmVzdWx0KGQpO1wifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5Li76aG1XCIsXCJwYXRoXCI6XCJob21lcGFnZVwiLFwicnVsZVwiOlwidmFyIGQgPSBbXTtcXG50cnkge1xcbiAgICBjb25zdCB7XFxuICAgICAgICBnZXRGZWVkLFxcbiAgICAgICAgZ2V0VXNlckluZm9cXG4gICAgfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpXFxuICAgIGlmIChmaWxlRXhpc3QoXFxcIkNvb2tpZS50eHRcXFwiKSkge1xcbiAgICAgICAgaWYgKE1ZX1BBR0UgPT0gMSkge1xcbiAgICAgICAgICAgIGxldCBpID0gZ2V0VXNlckluZm8oKVxcbiAgICAgICAgICAgIGQudW5zaGlmdCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpLnVuYW1lLFxcbiAgICAgICAgICAgICAgICBpbWc6IGkuZmFjZSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvdXNlckluZm9cXFwiLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcImRhdGFcXFwiOiBpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcblxcbiAgICAgICAgICAgIGZ1bmN0aW9uIGNvbG9yKHRleHQsIGNvbG9yKSB7XFxuICAgICAgICAgICAgICAgIHRleHQgKz0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgIGlmICh0ZXh0LmluZGV4T2YoXFxcIuKAnOKAnOKAneKAnVxcXCIpID09PSAwKSB7XFxuICAgICAgICAgICAgICAgICAgICB0ZXh0LnJlcGxhY2UoXFxcIuKAnOKAnOKAneKAnVxcXCIsIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcIuKAnOKAnOKAneKAnTxmb250IGNvbG9yPSdcXFwiICsgY29sb3IgKyBcXFwiJz5cXFwiICsgdGV4dCArIFxcXCI8L2ZvbnQ+XFxcIjtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbGV0IHRhYnMgPSB7XFxuICAgICAgICAgICAgICAgIFxcXCLmjqjojZBcXFwiOiBcXFwiaGlrZXI6Ly9pbWFnZXMvY29sbGVjdGlvblxcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCLliIbnsbtcXFwiOiBcXFwiaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vdmllLzY5LnN2Z1xcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCLmlrDnlapcXFwiOiBcXFwiaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vdmllLzg0LnN2Z1xcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCLmiJHnmoRcXFwiOiBcXFwiaGlrZXI6Ly9pbWFnZXMvaWNvbjNcXFwiXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIE9iamVjdC5lbnRyaWVzKHRhYnMpLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXRlbVswXSxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogaXRlbVsxXSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKCh0YWIpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwibW9kZVxcXCIsIHRhYilcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSwgaXRlbVswXSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImljb25fcm91bmRfc21hbGxfNFxcXCJcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibGluZVxcXCJcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IG1vZGUgPSBnZXRNeVZhcihcXFwibW9kZVxcXCIsIFxcXCLmjqjojZBcXFwiKVxcbiAgICAgICAgaWYgKG1vZGUgPT0gXFxcIuaOqOiNkFxcXCIpIHtcXG4gICAgICAgICAgICBnZXRGZWVkKCkuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBKU09OLnN0cmluZ2lmeShpdGVtKVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0udGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGl0ZW0ucGljLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogaXRlbS5zdGF0LnZpZXcgKyBcXFwi5pKt5pS+4oC7XFxcIiArIGl0ZW0uc3RhdC5saWtlICsgXFxcIueCuei1nlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvZGV0YWlsI2dhbWVUaGVtZSNcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiaWRcXFwiOiBpdGVtLmlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJidmlkXFxcIjogaXRlbS5idmlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJjaWRcXFwiOiBpdGVtLmNpZFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9IGVsc2UgaWYgKG1vZGUgPT0gXFxcIuaIkeeahFxcXCIpIHtcXG4gICAgICAgICAgICBpZiAoTVlfUEFHRSA9PSAxKSB7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogZ2V0TXlWYXIoXFxcIndkXFxcIiwgXFxcImhpc3RvcnlcXFwiKSA9PSBcXFwiaGlzdG9yeVxcXCIgPyBjb2xvcihcXFwi6KeC55yL5Y6G5Y+yXFxcIiwgXFxcInJlZFxcXCIpIDogXFxcIuingueci+WOhuWPslxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcIndkXFxcIiwgXFxcImhpc3RvcnlcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8zXFxcIlxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogZ2V0TXlWYXIoXFxcIndkXFxcIiwgXFxcImhpc3RvcnlcXFwiKSA9PSBcXFwiZmF2XFxcIiA/IGNvbG9yKFxcXCLmlLbol49cXFwiLCBcXFwicmVkXFxcIikgOiBcXFwi5pS26JePXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwid2RcXFwiLCBcXFwiZmF2XFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfM1xcXCJcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldE15VmFyKFxcXCJ3ZFxcXCIsIFxcXCJoaXN0b3J5XFxcIikgPT0gXFxcInN1YlxcXCIgPyBjb2xvcihcXFwi5YWz5rOoXFxcIiwgXFxcInJlZFxcXCIpIDogXFxcIuWFs+azqFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcIndkXFxcIiwgXFxcInN1YlxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzNcXFwiXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmIChnZXRNeVZhcihcXFwid2RcXFwiLCBcXFwiaGlzdG9yeVxcXCIpID09IFxcXCJoaXN0b3J5XFxcIikge1xcbiAgICAgICAgICAgICAgICBjb25zdCB7XFxuICAgICAgICAgICAgICAgICAgICBnZXRIaXN0b3J5XFxuICAgICAgICAgICAgICAgIH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKVxcbiAgICAgICAgICAgICAgICBnZXRIaXN0b3J5KE1ZX1BBR0UpLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogaXRlbS5waWMsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL2RldGFpbCNpbW1lcnNpdmVUaGVtZSNcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJpZFxcXCI6IGl0ZW0uYWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiYnZpZFxcXCI6IGl0ZW0uYnZpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcImNpZFxcXCI6IGl0ZW0uY2lkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGdldE15VmFyKFxcXCJ3ZFxcXCIsIFxcXCJoaXN0b3J5XFxcIikgPT0gXFxcImZhdlxcXCIpIHtcXG4gICAgICAgICAgICAgICAgdmFyIHRlYW1zID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuZ2V0ZmF2dGVhbSgpWzBdLm1lZGlhTGlzdFJlc3BvbnNlLmxpc3RcXG4gICAgICAgICAgICAgICAgaWYgKE1ZX1BBR0UgPT0gMSkge1xcbiAgICAgICAgICAgICAgICAgICAgdGVhbXMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogKGdldE15VmFyKFxcXCJmYXZvXFxcIiwgdGVhbXNbMF0uaWQgKyBcXFwiXFxcIikgPT0gaXRlbS5pZCA/IGNvbG9yKGl0ZW0udGl0bGUsIFxcXCJyZWRcXFwiKSA6IGl0ZW0udGl0bGUpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJmYXZvXFxcIiwgaWQgKyBcXFwiXFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgaXRlbS5pZClcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5nZXRGYXZvdXIoZ2V0TXlWYXIoXFxcImZhdm9cXFwiLCB0ZWFtc1swXS5pZCArIFxcXCJcXFwiKSwgTVlfUEFHRSkubWVkaWFzLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogaXRlbS5jb3ZlcixcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvZGV0YWlsI2dhbWVUaGVtZSNcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJpZFxcXCI6IGl0ZW0uaWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJjaWRcXFwiOiBpdGVtLnVnYy5maXJzdF9jaWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJidmlkXFxcIjogaXRlbS5idmlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBpZiAoTVlfUEFHRSA9PSAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5nZXRzbGlzdCgpLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IChnZXRNeVZhcihcXFwic3ViXFxcIiwgXFxcIjBcXFwiKSA9PSBpdGVtLnRhZ2lkID8gY29sb3IoaXRlbS5uYW1lLCBcXFwicmVkXFxcIikgOiBpdGVtLm5hbWUpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJzdWJcXFwiLCBpZClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgaXRlbS50YWdpZCksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwic2Nyb2xsX2J1dHRvblxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5nZXRTdWJzcmliZXMoZ2V0TXlWYXIoXFxcInN1YlxcXCIsIFxcXCIwXFxcIiksIE1ZX1BBR0UpLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnVuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogaXRlbS5mYWNlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS91cHM/bWlkPVxcXCIgKyBpdGVtLm1pZCArIFxcXCImcD1meXBhZ2UjaW1tZXJzaXZlVGhlbWUjXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBlbHNlIGlmIChtb2RlID09IFxcXCLmlrDnlapcXFwiKSB7XFxuICAgICAgICAgICAgdmFyIHRhYnMgPSB7XFxuICAgICAgICAgICAgICAgIFxcXCLnlarliadcXFwiOiAxLFxcbiAgICAgICAgICAgICAgICBcXFwi55S15b2xXFxcIjogMyxcXG4gICAgICAgICAgICAgICAgXFxcIuWbveWIm1xcXCI6IDRcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKE1ZX1BBR0UgPT0gMSkge1xcbiAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyh0YWJzKS5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogKGdldE15VmFyKFxcXCJqdWppXFxcIiwgXFxcIueVquWJp1xcXCIpID09IGl0ZW0gPyBjb2xvcihpdGVtLCBcXFwicmVkXFxcIikgOiBpdGVtKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoYSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwianVqaVxcXCIsIGEpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+WIh+aNouaIkOWKn1xcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBpdGVtKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJsaW5lXFxcIlxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICBsZXQgZGF5cyA9IDdcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDE7IGkgPCBkYXlzICsgMTsgaSsrKSB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAoZ2V0TXlWYXIoXFxcImZyb21cXFwiLCBcXFwiMVxcXCIpID09IGkgKyBcXFwiXFxcIiA/IGNvbG9yKGkgKyBcXFwi5aSp5YmNXFxcIiwgXFxcInJlZFxcXCIpIDogaSArIFxcXCLlpKnliY1cXFwiKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwiZnJvbVxcXCIsIGkgKyBcXFwiXFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgaSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJzY3JvbGxfYnV0dG9uXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJsaW5lXFxcIlxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMTsgaSA8IGRheXM7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogKGdldE15VmFyKFxcXCJ0b1xcXCIsIFxcXCIxXFxcIikgPT0gaSArIFxcXCJcXFwiID8gY29sb3IoaSArIFxcXCLlpKnlkI5cXFwiLCBcXFwicmVkXFxcIikgOiBpICsgXFxcIuWkqeWQjlxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJ0b1xcXCIsIGkgKyBcXFwiXFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgaSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJzY3JvbGxfYnV0dG9uXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5nZXRNb3ZpZXModGFic1tnZXRNeVZhcihcXFwianVqaVxcXCIsIFxcXCLnlarliadcXFwiKV0sIGdldE15VmFyKFxcXCJmcm9tXFxcIiwgXFxcIjFcXFwiKSwgZ2V0TXlWYXIoXFxcInRvXFxcIiwgXFxcIjFcXFwiKSkuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0uZGF0ZSArIFxcXCIg5ZGoXFxcIiArIGl0ZW0uZGF5X29mX3dlZWssXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgaXRlbS5lcGlzb2Rlcy5mb3JFYWNoKGkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpLnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGkuY292ZXIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS9kZXRhaWxhI2dhbWVUaGVtZSNcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInNzaWRcXFwiOiBpLnNlYXNvbl9pZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJlcGlkXFxcIjogaS5lcGlzb2RlX2lkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2UgaWYgKG1vZGUgPSBcXFwi5YiG57G7XFxcIikge1xcbiAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaChcXFwiaGlrZXI6Ly9wYWdlL2NhdFxcXCIpKS5ydWxlKVxcbiAgICAgICAgfVxcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgaWYgKGdldEl0ZW0oXFxcImZzXFxcIiwgXFxcIjBcXFwiKSA9PSBcXFwiMFxcXCIpIHtcXG4gICAgICAgICAgICBsZXQgYSA9IFtdXFxuICAgICAgICAgICAgbGV0IHRpbWUgPSAxMFxcbiAgICAgICAgICAgIGEucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBgICAgICAgICAgICAgICAgICAgICAg5L2/55So5YmN6aG755+lXFxu5pys6KeE5YiZ6LCD55SoaHR0cHM6Ly9naXRodWIuY29tL1NvY2lhbFNpc3RlcllpL2JpbGliaWxpLUFQSS1jb2xsZWN055qEYXBp77yM5omA5pyJ5Luj56CB5YWo6YOo5byA5rqQ77yM5bm25LiU5LiN5a2Y5Zyo5LiK5Lyg55So5oi35L+h5oGv55qE6KGM5Li6XFxu5pys6KeE5YiZ5Li65a2m5Lmg55uu55qE77yM6K+35LqO5a+85YWlMjTlsI/ml7blhoXliKDpmaTvvIHvvIHvvIEgICAgICAgICAgICAgICAgICAgICAgICBcXG7lvIDlp4vkvb/nlKjmnKzop4TliJnljbPku6PooajpgbXlrojop4TliJkgICAgICAgICAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgIGAsXFxuICAgICAgICAgICAgICAgIFxcXCJjb2xfdHlwZVxcXCI6IFxcXCJsb25nX3RleHRcXFwiLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgaWQ6IFxcXCJ0ZXh0XFxcIlxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogdGltZSArIFxcXCLnp5LlkI7nu6fnu61cXFwiLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMVxcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBpZDogXFxcInRpbWVyXFxcIlxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBzZXRSZXN1bHQoYSlcXG4gICAgICAgICAgICB3aGlsZSAodGltZSAhPSAwKSB7XFxuICAgICAgICAgICAgICAgIGphdmEubGFuZy5UaHJlYWQuc2xlZXAoMTAwMClcXG4gICAgICAgICAgICAgICAgdGltZSAtPSAxXFxuICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oXFxcInRpbWVyXFxcIiwge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRpbWUgKyBcXFwi56eS5ZCO57un57utXFxcIlxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB1cGRhdGVJdGVtKFxcXCJ0aW1lclxcXCIsIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLmiJHlt7Lnn6XmmZNcXFwiLFxcbiAgICAgICAgICA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IGlkLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImNzcmZcXFwiOiBjc3JmLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIm1lc3NhZ2VcXFwiOiBpbnB1dFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogcmVhZEZpbGUoXFxcIkNvb2tpZS50eHRcXFwiKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICB9LCBpZClcXG4gICAgfSlcXG59XFxudmFyIHRhYnMgPSBbXFxcIueDreW6plxcXCIsIFxcXCLml7bpl7RcXFwiXVxcbnRhYnMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBpdGVtLFxcbiAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGkpID0+IHtcXG4gICAgICAgICAgICBwdXRNeVZhcihcXFwic29ydGJ5XFxcIiwgaSlcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgfSwgaXRlbSksXFxuICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiXFxuICAgIH0pXFxufSlcXG5sZXQgZGF0YSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmdldENvbW1lbnRzKGlkLCBnZXRNeVZhcihcXFwic29ydGJ5XFxcIiwgXFxcIueDreW6plxcXCIpLCBNWV9QQUdFKVxcbmRhdGEuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBpdGVtLm1lbWJlci51bmFtZSxcXG4gICAgICAgIGltZzogaXRlbS5tZW1iZXIuYXZhdGFyLFxcbiAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3Vwcz9taWQ9XFxcIiArIGl0ZW0ubWVtYmVyLm1pZCArIFxcXCIjaW1tZXJzaXZlVGhlbWUjXFxcIixcXG4gICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIlxcbiAgICB9KVxcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IGl0ZW0uY29udGVudC5tZXNzYWdlLFxcbiAgICAgICAgZGVzYzogaXRlbS5yZXBseV9jb250cm9sLmxvY2F0aW9uICsgXFxcIiBcXFwiICsgaXRlbS5yZXBseV9jb250cm9sLnRpbWVfZGVzYyxcXG4gICAgICAgIHVybDogJCgpLnJ1bGUoKHRleHQsIG9pZCwgcnBpZCkgPT4ge1xcbiAgICAgICAgICAgIGxldCBkID0gW3tcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHRleHQsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibG9uZ190ZXh0XFxcIlxcbiAgICAgICAgICAgIH1dXFxuICAgICAgICAgICAgbGV0IHJlcGx5ID0gcmVxdWVzdChidWlsZFVybChcXFwiaHR0cDovL2FwaS5iaWxpYmlsaS5jb20veC92Mi9yZXBseS9yZXBseVxcXCIsIHtcXG4gICAgICAgICAgICAgICAgXFxcInR5cGVcXFwiOiAxLFxcbiAgICAgICAgICAgICAgICBcXFwib2lkXFxcIjogb2lkLFxcbiAgICAgICAgICAgICAgICBcXFwicm9vdFxcXCI6IHJwaWRcXG4gICAgICAgICAgICB9KSwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogcmVhZEZpbGUoXFxcIkNvb2tpZS50eHRcXFwiKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImxpbmVcXFwiXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBKU09OLnBhcnNlKHJlcGx5KS5kYXRhLnJlcGxpZXMuZm9yRWFjaChpdGVtID0+IHtcXG5cXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0ubWVtYmVyLnVuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogaXRlbS5tZW1iZXIuYXZhdGFyLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS91cHM/bWlkPVxcXCIgKyBpdGVtLm1lbWJlci5taWQgKyBcXFwiI2ltbWVyc2l2ZVRoZW1lI1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0uY29udGVudC5tZXNzYWdlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IGl0ZW0ucmVwbHlfY29udHJvbC5sb2NhdGlvbiArIFxcXCIgXFxcIiArIGl0ZW0ucmVwbHlfY29udHJvbC50aW1lX2Rlc2MsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzFcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XFxuICAgICAgICAgICAgc2V0UmVzdWx0KGQpXFxuICAgICAgICB9LCBpdGVtLmNvbnRlbnQubWVzc2FnZSwgaWQsIGl0ZW0ucnBpZCArIFxcXCJcXFwiKVxcbiAgICB9KVxcbn0pXFxuc2V0UmVzdWx0KGQpO1wifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfMlwiLFwibmFtZVwiOlwiVVDkuLvpobVcIixcInBhdGhcIjpcInVwc1wiLFwicnVsZVwiOlwianM6XFxudmFyIGQgPSBbXTtcXG52YXIgbWlkID0gZ2V0UGFyYW0oXFxcIm1pZFxcXCIpXFxuaWYgKE1ZX1BBR0UgPT0gMSkge1xcbiAgICB2YXIgaW5mbyA9IEpTT04ucGFyc2UocmVxdWVzdChidWlsZFVybChcXFwiaHR0cDovL2FwaS5iaWxpYmlsaS5jb20veC9zcGFjZS9hY2MvaW5mb1xcXCIsIHtcXG4gICAgICAgIFxcXCJtaWRcXFwiOiBtaWRcXG4gICAgfSksIHtcXG4gICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICBDb29raWU6IHJlYWRGaWxlKFxcXCJDb29raWUudHh0XFxcIilcXG4gICAgICAgIH1cXG4gICAgfSkpLmRhdGFcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBpbmZvLm5hbWUsXFxuICAgICAgICBpbWc6IGluZm8uZmFjZSxcXG4gICAgICAgIGRlc2M6IGluZm8uc2lnbixcXG4gICAgICAgIHVybDogJCgpLnJ1bGUoKGluZm8pID0+IHtcXG4gICAgICAgICAgICBzZXRSZXN1bHQoW3tcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGluZm8sXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibG9uZ190ZXh0XFxcIlxcbiAgICAgICAgICAgIH1dKVxcbiAgICAgICAgfSwgaW5mby5zaWduKSxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwibW92aWVfMV92ZXJ0aWNhbF9waWNfYmx1clxcXCJcXG4gICAgfSwge1xcbiAgICAgICAgdGl0bGU6IChpbmZvLmlzX2ZvbGxvd2VkID8gXFxcIuWPlua2iOWFs+azqFxcXCIgOiBcXFwi5YWz5rOoXFxcIiksXFxuICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgIC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cnM6IHtcXG4gICAgICAgICAgICBcXFwiQ29va2llXFxcIjogY29va2llXFxuICAgICAgICB9XFxuICAgIH0pKS5kYXRhLnJlc3VsdFxcbiAgICBpZiAodHlwZSA9PSBcXFwiYmlsaV91c2VyXFxcIikge1xcbiAgICAgICAgcmVzLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0udW5hbWUsXFxuICAgICAgICAgICAgICAgIGltZzogXFxcImh0dHBzOlxcXCIgKyBpdGVtLnVwaWMsXFxuICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS91cHM/bWlkPVxcXCIgKyBpdGVtLm1pZCArIFxcXCIjZ2FtZVRoZW1lI1xcXCIsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIlxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgcmVzLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgaWYgKGl0ZW0uaXNfYXZpZCAhPSBmYWxzZSkge1xcbiAgICAgICAgICAgICAgICB2YXIgcCA9IEpTT04ucGFyc2UocmVxdWVzdChidWlsZFVybChcXFwiaHR0cDovL2FwaS5iaWxpYmlsaS5jb20veC9wbGF5ZXIvcGFnZWxpc3RcXFwiLCB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiYWlkXFxcIjogaXRlbS5haWRcXG4gICAgICAgICAgICAgICAgfSkpKS5kYXRhXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS50aXRsZS5yZXBsYWNlKC88W14+XSo+fDxcXFxcL1tePl0qPi9nbSwgXFxcIlxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBcXFwiaHR0cHM6XFxcIiArIGl0ZW0ucGljLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL2RldGFpbCNnYW1lVGhlbWUjXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcImlkXFxcIjogaXRlbS5haWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcImJ2aWRcXFwiOiBpdGVtLmJ2aWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcImNpZFxcXCI6IHBbMF0uY2lkXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnRpdGxlLnJlcGxhY2UoLzxbXj5dKj58PFxcXFwvW14+XSo+L2dtLCBcXFwiXFxcIiksXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGl0ZW0uY292ZXIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvZGV0YWlsYSNnYW1lVGhlbWUjXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcInNzaWRcXFwiOiBpdGVtLnNlYXNvbl9pZFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgIH1cXG59IGNhdGNoIChlKSB7XFxuICAgIGxvZyhlLm1lc3NhZ2UpXFxuICAgIHNldFJlc3VsdChbe1xcbiAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ08Y2VudGVyPjxzbWFsbD48c3BhbiBzdHlsZT1cXFwiY29sb3I6ICM5OTk5OTlcXFwiPu+9nu+9nu+9nuaIkeaYr+acieW6lee6v+eahO+9nu+9nu+9njwv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VzS2V5LnRpdGxlXVxcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IGVzY2FwZShpdGVtW0NhdGVnb3JpZXNIZWFkZXIuY2F0ZWdvcmllc0tleS51cmxdKVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHVybExpc3RlbmVyKSB1cmwgPSB1cmxMaXN0ZW5lci5vbkRlYWwoaXRlbSwgc3ViX2NhdGVnb3J5X25hbWUsIHVybClcXG4gICAgICAgICAgICAgICAgICAgIGxheW91dC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyAn4oCc4oCc4oCd4oCdPGI+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiAjRkE3Mjk4XFxcIj4nICsgdGl0bGUgKyAnPC9zcGFuPjwvYj4nIDogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHVybCkubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5jYXRlX3RlbXApKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoTVlfUlVMRS51cmwgKyBcXFwiI1xcXCIgKyBwYXJhbXMuc3ViX2NhdGVnb3J5X25hbWUsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogcGFnZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3J5X25hbWU6IHN1Yl9jYXRlZ29yeV9uYW1lXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIGxheW91dC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9XFxuICAgIH1cXG59XFxuJC5leHBvcnRzLkNhdGVnb3JpZXNIZWFkZXI9Q2F0ZWdvcmllc0hlYWRlclwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5YiG57G7IEJ5IFJ4XCIsXCJwYXRoXCI6XCJjYXRcIixcInJ1bGVcIjpcImNvbnN0IHtcXG4gICAgQ2F0ZWdvcmllc0hlYWRlclxcbn0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9jYXRlZ29yaWVzLWhlYWRlclxcXCIpXFxubGV0IG1DYXRlZ29yaWVzID0ge31cXG5sZXQgY2F0VXJsID0gJ2h0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS9hbmltZS9pbmRleC8nXFxubGV0IGNhdFNyYyA9IHJlcXVlc3QoY2F0VXJsKVxcbi8vIGxvZyhjYXRTcmMpXFx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gICAgICAgICAgIGxldCBjc3JmID0gcmVhZEZpbGUoXFxcIkNvb2tpZS50eHRcXFwiKS5tYXRjaCgvYmlsaV9qY3Q9KC4qPyk7LylbMV1cXG4gICAgICAgICAgICBsZXQgcmVzID0gcG9zdChcXFwiaHR0cDovL2FwaS5iaWxpYmlsaS5jb20veC93ZWItaW50ZXJmYWNlL2FyY2hpdmUvbGlrZVxcXCIsIHtcXG4gICAgICAgICAgICAgICAgYm9keToge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcImFpZFxcXCI6IGlkLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImxpa2VcXFwiOiAoaGFzTGlrZSA/IDIgOiAxKSxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJjc3JmXFxcIjogY3NyZlxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogcmVhZEZpbGUoXFxcIkNvb2tpZS50eHRcXFwiKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL1xcXCIgKyAoaGFzTGlrZSA/IFxcXCLlj5bmtojngrnotZ5cXFwiIDogXFxcIueCuei1nuaIkOWKn1xcXCIpXFxuICAgICAgICB9LCBpZCwgaGFzTGlrZSlcXG4gICAgfSwge1xcbiAgICAgICAgdGl0bGU6IChoYXNDb2luID8gY29sb3IoY29pbiwgXFxcIiNGQTcyOThcXFwiKSA6IGNvaW4pLFxcbiAgICAgICAgaW1nOiBcXFwiaHR0cHM6Ly9naHByb3h5LmNvbS9odHRwczovL3Jhdy5naXRodWJ1c2VyY29udGVudC5jb20vU29jaWFsU2lzdGVyWWkvYmlsaWJpbGktQVBJLWNvbGxlY3QvbWFzdGVyL2ltZ3MvY29pbi5zdmdcXFwiLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJpY29uX3NtYWxsXzRcXFwiLFxcbiAgICAgICAgdXJsOiAkKFtcXFwiMVxcXCIsIFxcXCIyXFxcIl0sIDIsIFxcXCLmipXluIHmlbDph49cXFwiKS5zZWxlY3QoKGlkKSA9PiB7XFxuICAgICAgICAgICAgbGV0IGNzcmYgPSByZWFkRmlsZShcXFwiQ29va2llLnR4dFxcXCIpLm1hdGNoKC9iaWxpX2pjdD0oLio/KTsvKVsxXVxcbiAgICAgICAgICAgIGxldCByZXMgPSBwb3N0KFxcXCJodHRwOi8vYXBpLmJpbGliaWxpLmNvbS94L3dlYi1pbnRlcmZhY2UvY29pbi9hZGRcXFwiLCB7XFxuICAgICAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJhaWRcXFwiOiBpZCxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJtdWx0aXBseVxcXCI6IGlucHV0LFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImNzcmZcXFwiOiBjc3JmXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiByZWFkRmlsZShcXFwiQ29va2llLnR4dFxcXCIpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5oqV5LqGXFxcIiArIGlucHV0ICsgXFxcIuS4quW4gVxcXCJcXG4gICAgICAgIH0sIGlkKVxcbiAgICB9LCB7XFxuICAgICAgICB0aXRsZTogKGhhc0Zhdm91ciA/IGNvbG9yKGZhdm91cml0ZSwgXFxcIiNGQTcyOThcXFwiKSA6IGZhdm91cml0ZSksXFxuICAgICAgICBpbWc6IFxcXCJodHRwczovL2docHJveHkuY29tL2h0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS9Tb2NpYWxTaXN0ZXJZaS9iaWxpYmlsaS1BUEktY29sbGVjdC9tYXN0ZXIvaW1ncy9mYXYuc3ZnXFxcIixcXG4gICAgICAgIGNvbF90eXBlOiBcXFwiaWNvbl9zbWFsbF80XFxcIixcXG4gICAgICAgIHVybDogJCgpLmxhenlSdWxlKChpZCwgaGFzRmF2b3VyKSA9PiB7XFxuICAgICAgICAgICAgbGV0IGJvZHkgPSBoYXNGYXZvdXIgPyB7XFxuICAgICAgICAgICAgICAgIFxcXCJyaWRcXFwiOiBpZCxcXG4gICAgICAgICAgICAgICAgXFxcInR5cGVcXFwiOiAyLFxcbiAgICAgICAgICAgICAgICBcXFwiZGVsX21lZGlhX2lkc1xcXCI6IDAsXFxuICAgICAgICAgICAgICAgIFxcXCJjc3JmXFxcIjogY3NyZlxcbiAgICAgICAgICAgIH0gOiB7XFxuICAgICAgICAgICAgICAgIFxcXCJyaWRcXFwiOiBpZCxcXG4gICAgICAgICAgICAgICAgXFxcInR5cGVcXFwiOiAyLFxcbiAgICAgICAgICAgICAgICBcXFwiYWRkX21lZGlhX2lkc1xcXCI6IDAsXFxuICAgICAgICAgICAgICAgIFxcXCJjc3JmXFxcIjogY3NyZlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBsZXQgY3NyZiA9IHJlYWRGaWxlKFxcXCJDb29raWUudHh0XFxcIikubWF0Y2goL2JpbGlfamN0PSguKj8pOy8pWzFdXFxuICAgICAgICAgICAgbGV0IHJlcyA9IHBvc3QoXFxcImh0dHA6Ly9hcGkuYmlsaWJpbGkuY29tL21lZGlhbGlzdC9nYXRld2F5L2NvbGwvcmVzb3VyY2UvZGVhbFxcXCIsIHtcXG4gICAgICAgICAgICAgICAgYm9keTogYm9keSxcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcIkNvb2tpZVxcXCI6IHJlYWRGaWxlKFxcXCJDb29raWUudHh0XFxcIiksXFxuICAgICAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3d3dy5iaWxpYmlsaS5jb21cXFwiXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vXFxcIiArIChoYXNGYXZvdXIgPyBcXFwi5Y+W5raI5pS26JePXFxcIiA6IFxcXCLmlLbol4/miJDlip9cXFwiKVxcbiAgICAgICAgfSwgaWQsIGhhc0Zhdm91cilcXG4gICAgfSwge1xcbiAgICAgICAgdGl0bGU6IFxcXCLor4TorrpcXFwiLFxcbiAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlXFxcIixcXG4gICAgICAgIGltZzogXFxcImh0dHBzOi8vbGFubWVpZ3VvamlhbmcuY29tL3R1Ymlhby9tb3JlLzQxLnBuZ1xcXCIsXFxuICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfNFxcXCIsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIFxcXCJpZFxcXCI6IGlkXFxuICAgICAgICB9XFxuICAgIH0pXFxuICAgIC8v6I635Y+W6KeG6aKR5YiGUOS/oeaBr1xcbiAgICB2YXIgcCA9IEpTT04ucGFyc2UocmVxdWVzdChidWlsZFVybChcXFwiaHR0cDovL2FwaS5iaWxpYmlsaS5jb20veC9wbGF5ZXIvcGFnZWxpc3RcXFwiLCB7XFxuICAgICAgICBcXFwiYWlkXFxcIjogaWRcXG4gICAgfSkpKS5kYXRhXFxuICAgIGlmIChwLmxlbmd0aCA9PSAxKSB7XFxuICAgICAgICAvL+inhumikemTvuaOpVxcbiAgICAgICAgbGV0IGEgPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5nZXRVcmwoaWQsIGNpZCwgMTIwKVxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuaZuuiDveaSreaUvlxcXCIsXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2NlbnRlcl8xXFxcIixcXG4gICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaWQsIGNpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikubGF6eShpZCwgY2lkLCAxMjApLnJlcGxhY2UoLzsvZywgXFxcIu+8m++8m1xcXCIpXFxuICAgICAgICAgICAgfSwgaWQsIGNpZCksXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgXFxcImxvbmdDbGlja1xcXCI6IFt7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuaOqOmAgVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygoaWQsIGNpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmUoXFxcImh0dHBzOi8vaGlrZXJmYW5zLmNvbS9Kb2UvVFZib3guanNcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiDmjqjpgIF0dmJveCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IFxcXCLmjqjpgIEgYnkgSm9lXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdm9kOiBbe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogXFxcImJpbGliaWxpXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybHM6IEpTT04ucGFyc2UoJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikubGF6eShpZCwgY2lkLCAxMjApLnJlcGxhY2UoLzsvZywgXFxcIu+8m++8m1xcXCIpKS51cmxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfV0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJSZWZlcmVyXFxcIjogXFxcImh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9LCBpZCwgY2lkKVxcbiAgICAgICAgICAgICAgICB9XSxcXG4gICAgICAgICAgICAgICAgXFxcImlkXFxcIjogXFxcInFuXFxcIlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgICAgICBhLnN1cHBvcnRfZm9ybWF0cy5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLm5ld19kZXNjcmlwdGlvbixcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGlkLCBjaWQsIHFuKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikubGF6eShpZCwgY2lkLCBxbikucmVwbGFjZSgvOy9nLCBcXFwi77yb77ybXFxcIilcXG4gICAgICAgICAgICAgICAgfSwgaWQgKyBcXFwiXFxcIiwgY2lkICsgXFxcIlxcXCIsIGl0ZW0ucXVhbGl0eSArIFxcXCJcXFwiKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzJcXFwiXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pXFxuICAgIH0gZWxzZSB7XFxuICAgICAgICBwLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdG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FwiaWNvbl9zbWFsbF80XFxcXFxcXCIsXFxcXG4gICAgICAgIHVybDogJCgpLmxhenlSdWxlKChpZCwgaGFzRmF2b3VyKSA9PiB7XFxcXG4gICAgICAgICAgICBsZXQgYm9keSA9IGhhc0Zhdm91ciA/IHtcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcInJpZFxcXFxcXFwiOiBpZCxcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcInR5cGVcXFxcXFxcIjogMixcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcImRlbF9tZWRpYV9pZHNcXFxcXFxcIjogMCxcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcImNzcmZcXFxcXFxcIjogY3NyZlxcXFxuICAgICAgICAgICAgfSA6IHtcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcInJpZFxcXFxcXFwiOiBpZCxcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcInR5cGVcXFxcXFxcIjogMixcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcImFkZF9tZWRpYV9pZHNcXFxcXFxcIjogMCxcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcImNzcmZcXFxcXFxcIjogY3NyZlxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgbGV0IGNzcmYgPSByZWFkRmlsZShcXFxcXFxcIkNvb2tpZS50eHRcXFxcXFxcIikubWF0Y2goL2JpbGlfamN0PSguKj8pOy8pWzFdXFxcXG4gICAgICAgICAgICBsZXQgcmVzID0gcG9zdChcXFxcXFxcImh0dHA6Ly9hcGkuYmlsaWJpbGkuY29tL21lZGlhbGlzdC9nYXRld2F5L2NvbGwvcmVzb3VyY2UvZGVhbFxcXFxcXFwiLCB7XFxcXG4gICAgICAgICAgICAgICAgYm9keTogYm9keSxcXFxcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiQ29va2llXFxcXFxcXCI6IHJlYW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AgICAgcmV0dXJuIOaOqOmAgXR2Ym94KHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBcXFxcXFxcIuaOqOmAgSBieSBKb2VcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2b2Q6IFt7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IFxcXFxcXFwiYmlsaWJpbGlcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsczogSlNPTi5wYXJzZSgkLnJlcXVpcmUoXFxcXFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcXFxcXCIpLmxhenkoaWQsIGNpZCwgMTIwKS5yZXBsYWNlKC87L2csIFxcXFxcXFwi77yb77ybXFxcXFxcXCIpKS51cmxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiUmVmZXJlclxcXFxcXFwiOiBcXFxcXFxcImh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgfSwgaWQsIGNpZClcXFxcbiAgICAgICAgICAgICAgICB9XSxcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcImlkXFxcXFxcXCI6IFxcXFxcXFwicW5cXFxcXFxcIlxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9KVxcXFxuICAgICAgICBhLnN1cHBvcnRfZm9ybWF0cy5mb3JFYWNoKGl0ZW0gPT4ge1xcXFxuICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5uZXdfZ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AgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImF2YXRhclxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIHVybDogXFxcXFxcXCJoaWtlcjovL3BhZ2UvdXNlckluZm9cXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImRhdGFcXFxcXFxcIjogaVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH0pXFxcXG5cXFxcbiAgICAgICAgICAgIGZ1bmN0aW9uIGNvbG9yKHRleHQsIGNvbG9yKSB7XFxcXG4gICAgICAgICAgICAgICAgdGV4dCArPSBcXFxcXFxcIlxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgIGlmICh0ZXh0LmluZGV4T2YoXFxcXFxcXCLigJzigJzigJ3igJ1cXFxcXFxcIikgPT09IDApIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGV4dC5yZXBsYWNlKFxcXFxcXFwi4oCc4oCc4oCd4oCdXFxcXFxcXCIsIFxcXFxcXFwiXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCLigJzigJzigJ3igJ08Zm9udCBjb2xvcj0nXFxcXFxcXCIgKyBjb2xvciArIFxcXFxcXFwiJz5cXFxcXFxcIiArIHRleHQgKyBcXFxcXFxcIjwvZm9udD5cXFxcXFxcIjtcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGxldCB0YWJzID0ge1xcXFxuICAgICAgICAgICAgICAgIFxcXFxcXFwi5o6o6I2QXFxcXFxcXCI6IFxcXFxcXFwiaGlrZXI6Ly9pbWFnZXMvY29sbGVjdGlvblxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIFxcXFxcXFwi5YiG57G7XFxcXFxcXCI6IFxcXFxcXFwiaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vdmllLzY5LnN2Z1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIFxcXFxcXFwi5paw55WqXFxcXFxcXCI6IFxcXFxcXFwiaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vdmllLzg0LnN2Z1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIFxcXFxcXFwi5oiR55qEXFxcXFxcXCI6IFxcXFxcXFwiaGlrZXI6Ly9pbWFnZXMvaWNvbjNcXFxcXFxcIlxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgT2JqZWN0LmVudHJpZXModGFicykuZm9yRWFjaChpdGVtID0+IHtcXFxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXRlbVswXSxcXFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBpdGVtWzFdLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgodGFiKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFxcXFxcIm1vZGVcXFxcXFxcIiwgdGFiKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIGl0ZW1bMF0pLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJpY29uX3JvdW5kX3NtYWxsXzRcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJsaW5lXFxcXFxcXCJcXFxcbiAgICAgICAgICAgIH0pXFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgbGV0IG1vZGUgPSBnZXRNeVZhcihcXFxcXFxcIm1vZGVcXFxcXFxcIiwgXFxcXFxcXCLmjqjojZBcXFxcXFxcIilcXFxcbiAgICAgICAgaWYgKG1vZGUgPT0gXFxcXFxcXCLmjqjojZBcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgZ2V0RmVlZCgpLmZvckVhY2goaXRlbSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBKU09OLnN0cmluZ2lmeShpdGVtKVxcXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnRpdGxlLFxcXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGl0ZW0ucGljLFxcXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBpdGVtLnN0YXQudmlldyArIFxcXFxcXFwi5pKt5pS+4oC7XFxcXFxcXCIgKyBpdGVtLnN0YXQubGlrZSArIFxcXFxcXFwi54K56LWeXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcXFxcXCJoaWtlcjovL3BhZ2UvZGV0YWlsI2dhbWVUaGVtZSNcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiaWRcXFxcXFxcIjogaXRlbS5pZCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiYnZpZFxcXFxcXFwiOiBpdGVtLmJ2aWQsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImNpZFxcXFxcXFwiOiBpdGVtLmNpZFxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIH0pXFxcXG4gICAgICAgIH0gZWxzZSBpZ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FxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKCgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXFxcXFwid2RcXFxcXFxcIiwgXFxcXFxcXCJmYXZcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwidGV4dF8zXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICB9LCB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcihcXFxcXFxcIndkXFxcXFxcXCIsIFxcXFxcXFwiaGlzdG9yeVxcXFxcXFwiKSA9PSBcXFxcXFxcInN1YlxcXFxcXFwiID8gY29sb3IoXFxcXFxcXCLlhbPms6hcXFxcXFxcIiwgXFxcXFxcXCJyZWRcXFxcXFxcIikgOiBcXFxcXFxcIuWFs+azqFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFxcXFxcIndkXFxcXFxcXCIsIFxcXFxcXFwic3ViXFxcXFxcXCIpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgfSksXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcInRleHRfM1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGlmIChnZXRNeVZhcihcXFxcXFxcIndkXFxcXFxcXCIsIFxcXFxcXFwiaGlzdG9yeVxcXFxcXFwiKSA9PSBcXFxcXFxcImhpc3RvcnlcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgICAgIGNvbnN0IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZ2V0SGlzdG9yeVxcXFxuICAgICAgICAgICAgICAgIH0gPSAkLnJlcXVpcmUoXFxcXFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcXFxcXCIpXFxcXG4gICAgICAgICAgICAgICAgZ2V0SGlzdG9yeShNWV9QQUdFKS5mb3JFYWNoKGl0ZW0gPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0udGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGl0ZW0ucGljLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFxcXFxcImhpa2VyOi8vcGFnZS9kZXRhaWwjaW1tZXJzaXZlVGhlbWUjXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiaWRcXFxcXFxcIjogaXRlbS5haWQsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJidmlkXFxcXFxcXCI6IGl0ZW0uYnZpZCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImNpZFxcXFxcXFwiOiBpdGVtLmNpZFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGdldE15VmFyKFxcXFxcXFwid2RcXFxcXFxcIiwgXFxcXFxcXCJoaXN0b3J5XFxcXFxcXCIpID09IFxcXFxcXFwiZmF2XFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgICAgICB2YXIgdGVhbXMgPSAkLnJlcXVpcmUoXFxcXFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcXFxcXCIpLmdldGZhdnRlYW0oKVswXS5tZWRpYUxpc3RSZXNwb25zZS5saXN0XFxcXG4gICAgICAgICAgICAgICAgaWYgKE1ZX1BBR0UgPT0gMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICB0ZWFtcy5mb3JFYWNoKGl0ZW0gPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogKGdldE15VmFyKFxcXFxcXFwiZmF2b1xcXFxcXFwiLCB0ZWFtc1swXS5pZCArIFxcXFxcXFwiXFxcXFxcXCIpID09IGl0ZW0uaWQgPyBjb2xvcihpdGVtLnRpdGxlLCBcXFxcXFxcInJlZFxcXFxcXFwiKSA6IGl0ZW0udGl0bGUpLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcInNjcm9sbF9idXR0b25cXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaWQpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcXFxcXCJmYXZvXFxcXFxcXCIsIGlkICsgXFxcXFxcXCJcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBpdGVtLmlkKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgJC5yZXF1aXJlKFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXFxcXFwiKS5nZXRGYXZvdXIoZ2V0TXlWYXIoXFxcXFxcXCJmYXZvXFxcXFxcXCIsIHRlYW1zWzBdLmlkICsgXFxcXFxcXCJcXFxcXFxcIiksIE1ZX1BBR0UpLm1lZGlhcy5mb3JFYWNoKGl0ZW0gPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0udGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGl0ZW0uY292ZXIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2RldGFpbCNnYW1lVGhlbWUjXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiaWRcXFxcXFxcIjogaXRlbS5pZCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImNpZFxcXFxcXFwiOiBpdGVtLnVnYy5maXJzdF9jaWQsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJidmlkXFxcXFxcXCI6IGl0ZW0uYnZpZFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIGlmIChNWV9QQUdFID09IDEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgJC5yZXF1aXJlKFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXFxcXFwiKS5nZXRzbGlzdCgpLmZvckVhY2goaXRlbSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAoZ2V0TXlWYXIoXFxcXFxcXCJzdWJcXFxcXFxcIiwgXFxcXFxcXCIwXFxcXFxcXCIpID09IGl0ZW0udGFnaWQgPyBjb2xvcihpdGVtLm5hbWUsIFxcXFxcXFwicmVkXFxcXFxcXCIpIDogaXRlbS5uYW1lKSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaWQpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcXFxcXCJzdWJcXFxcXFxcIiwgaWQpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgaXRlbS50YWdpZCksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwic2Nyb2xsX2J1dHRvblxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAkLnJlcXVpcmUoXFxcXFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcXFxcXCIpLmdldFN1YnNyaWJlcyhnZXRNeVZhcihcXFxcXFxcInN1YlxcXFxcXFwiLCBcXFxcXFxcIjBcXFxcXFxcIiksIE1ZX1BBR0UpLmZvckVhY2goaXRlbSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS51bmFtZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogaXRlbS5mYWNlLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFxcXFxcImhpa2VyOi8vcGFnZS91cHM/bWlkPVxcXFxcXFwiICsgaXRlbS5taWQgKyBcXFxcXFxcIiZwPWZ5cGFnZSNpbW1lcnNpdmVUaGVtZSNcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImF2YXRhclxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSBlbHNlIGlmIChtb2RlID09IFxcXFxcXFwi5paw55WqXFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgIHZhciB0YWJzID0ge1xcXFxuICAgICAgICAgICAgICAgIFxcXFxcXFwi55Wq5YmnXFxcXFxcXCI6IDEsXFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCLnlLXlvbFcXFxcXFxcIjogMyxcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcIuWbveWIm1xcXFxcXFwiOiA0XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICBpZiAoTVlfUEFHRSA9PSAxKSB7XFxcXG4gICAgICAgICAgICAgICAgT2JqZWN0LmtleXModGFicykuZm9yRWFjaChpdGVtID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAoZ2V0TXlWYXIoXFxcXFxcXCJqdWppXFxcXFxcXCIsIFxcXFxcXFwi55Wq5YmnXFxcXFxcXCIpID09IGl0ZW0gPyBjb2xvcihpdGVtLCBcXFxcXFxcInJlZFxcXFxcXFwiKSA6IGl0ZW0pLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGEpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFxcXFxcImp1amlcXFxcXFxcIiwgYSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwidG9hc3Q6Ly/liIfmjaLmiJDlip9cXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgaXRlbSksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJzY3JvbGxfYnV0dG9uXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImxpbmVcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgbGV0IGRheXMgPSA3XFxcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDE7IGkgPCBkYXlzICsgMTsgaSsrKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogKGdldE15VmFyKFxcXFxcXFwiZnJvbVxcXFxcXFwiLCBcXFxcXFxcIjFcXFxcXFxcIikgPT0gaSArIFxcXFxcXFwiXFxcXFxcXCIgPyBjb2xvcihpICsgXFxcXFxcXCLlpKnliY1cXFxcXFxcIiwgXFxcXFxcXCJyZWRcXFxcXFxcIikgOiBpICsgXFxcXFxcXCLlpKnliY1cXFxcXFxcIiksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXFxcXFwiZnJvbVxcXFxcXFwiLCBpICsgXFxcXFxcXCJcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBpKSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcInNjcm9sbF9idXR0b25cXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJsaW5lXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAxOyBpIDwgZGF5czsgaSsrKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogKGdldE15VmFyKFxcXFxcXFwidG9cXFxcXFxcIiwgXFxcXFxcXCIxXFxcXFxcXCIpID09IGkgKyBcXFxcXFxcIlxcXFxcXFwiID8gY29sb3IoaSArIFxcXFxcXFwi5aSp5ZCOXFxcXFxcXCIsIFxcXFxcXFwicmVkXFxcXFxcXCIpIDogaSArIFxcXFxcXFwi5aSp5ZCOXFxcXFxcXCIpLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFxcXFxcInRvXFxcXFxcXCIsIGkgKyBcXFxcXFxcIlxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIGkpLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwic2Nyb2xsX2J1dHRvblxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuXFxcXG4gICAgICAgICAgICAgICAgJC5yZXF1aXJlKFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXFxcXFwiKS5nZXRNb3ZpZXModGFic1tnZXRNeVZhcihcXFxcXFxcImp1amlcXFxcXFxcIiwgXFxcXFxcXCLnlarliadcXFxcXFxcIildLCBnZXRNeVZhcihcXFxcXFxcImZyb21cXFxcXFxcIiwgXFxcXFxcXCIxXFxcXFxcXCIpLCBnZXRNeVZhcihcXFxcXFxcInRvXFxcXFxcXCIsIFxcXFxcXFwiMVxcXFxcXFwiKSkuZm9yRWFjaChpdGVtID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLmRhdGUgKyBcXFxcXFxcIiDlkahcXFxcXFxcIiArIGl0ZW0uZGF5X29mX3dlZWssXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJ0ZXh0XzFcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgaXRlbS5lcGlzb2Rlcy5mb3JFYWNoKGkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogaS50aXRsZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGkuY292ZXIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFxcXFxcImhpa2VyOi8vcGFnZS9kZXRhaWxhI2dhbWVUaGVtZSNcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInNzaWRcXFxcXFxcIjogaS5zZWFzb25faWQsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiZXBpZFxcXFxcXFwiOiBpLmVwaXNvZGVfaWRcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH0gZWxzZSBpZiAobW9kZSA9IFxcXFxcXFwi5YiG57G7XFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaChcXFxcXFxcImhpa2VyOi8vcGFnZS9jYXRcXFxcXFxcIikpLnJ1bGUpXFxcXG4gICAgICAgIH1cXFxcbiAgICB9IGVsc2Uge1xcXFxuICAgICAgICBpZiAoZ2V0SXRlbShcXFxcXFxcImZzXFxcXFxcXCIsIFxcXFxcXFwiMFxcXFxcXFwiKSA9PSBcXFxcXFxcIjBcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgbGV0IGEgPSBbXVxcXFxuICAgICAgICAgICAgbGV0IHRpbWUgPSAxMFxcXFxuICAgICAgICAgICAgYS5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogYCAgICAgICAgICAgICAgICAgICAgIOS9v+eUqOWJjemhu+efpVxcXFxu5pys6KeE5YiZ6LCD55SoaHR0cHM6Ly9naXRodWIuY29tL1NvY2lhbFNpc3RlcllpL2JpbGliaWxpLUFQSS1jb2xsZWN055qEYXBp77yM5omA5pyJ5Luj56CB5YWo6YOo5byA5rqQ77yM5bm25LiU5LiN5a2Y5Zyo5LiK5Lyg55So5oi35L+h5oGv55qE6KGM5Li6XFxcXG7mnKzop4TliJnkuLrlrabkuaDnm67nmoTvvIzor7fkuo7lr7zlhaUyNOWwj+aXtuWGheWIoOmZpO+8ge+8ge+8gSAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxu5byA5aeL5L2/55So5pys6KeE5YiZ5Y2z5Luj6KGo6YG15a6I6KeE5YiZICAgICAgICAgICAgICAgICAgICAgICBcXFxcbiAgICAgICAgICAgIGAsXFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCJjb2xfdHlwZVxcXFxcXFwiOiBcXFxcXFxcImxvbmdfdGV4dFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBcXFxcXFxcInRleHRcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH0sIHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogdGltZSArIFxcXFxcXFwi56eS5ZCO57un57utXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwidGV4dF8xXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWQ6IFxcXFxcXFwidGltZXJcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICBzZXRSZXN1bHQoYSlcXFxcbiAgICAgICAgICAgIHdoaWxlICh0aW1lICE9IDApIHtcXFxcbiAgICAgICAgICAgICAgICBqYXZhLmxhbmcuVGhyZWFkLnNsZWVwKDEwMDApXFxcXG4gICAgICAgICAgICAgICAgdGltZSAtPSAxXFxcXG4gICAgICAgICAgICAgICAgdXBkYXRlSXRlbShcXFxcXFxcInRpbWVyXFxcXFxcXCIsIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRpbWUgKyBcXFxcXFxcIuenkuWQjue7p+e7rVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIHVwZGF0ZUl0ZW0oXFxcXFxcXCJ0aW1lclxcXFxcXFwiLCB7XFxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IFxcXFxcXFwi5oiR5bey55+l5pmTXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXFxcXFwiZnNcXFxcXFxcIiwgXFxcXFxcXCIxXFxcXFxcXCIpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwidG9hc3Q6Ly/kvaDlt7Lnoa7orqRcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgJC5yZXF1aXJlKFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2xvZ2luXFxcXFxcXCIpXFxcXG4gICAgICAgIH1cXFxc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yxcXFxcbiAgICAgICAgdXJsOiAkKCkucnVsZSgodGV4dCwgb2lkLCBycGlkKSA9PiB7XFxcXG4gICAgICAgICAgICBsZXQgZCA9IFt7XFxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHRleHQsXFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwibG9uZ190ZXh0XFxcXFxcXCJcXFxcbiAgICAgICAgICAgIH1dXFxcXG4gICAgICAgICAgICBsZXQgcmVwbHkgPSByZXF1ZXN0KGJ1aWxkVXJsKFxcXFxcXFwiaHR0cDovL2FwaS5iaWxpYmlsaS5jb20veC92Mi9yZXBseS9yZXBseVxcXFxcXFwiLCB7XFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCJ0eXBlXFxcXFxcXCI6IDEsXFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCJvaWRcXFxcXFxcIjogb2lkLFxcXFxuICAgICAgICAgICAgICAgIFxcXFxcXFwicm9vdFxcXFxcXFwiOiBycGlkXFxcXG4gICAgICAgICAgICB9KSwge1xcXFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJDb29raWVcXFxcXFxcIjogcmVhZEZpbGUoXFxcXFxcXCJDb29raWUudHh0XFxcXFxcXCIpXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwibGluZVxcXFxcXFwiXFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICBKU09OLnBhcnNlKHJlcGx5KS5kYXRhLnJlcGxpZXMuZm9yRWFjaChpdGVtID0+IHtcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdG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xcXFxcXFwiXFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICB9KVxcXFxuICAgIH0gZWxzZSB7XFxcXG4gICAgICAgIHJlcy5mb3JFYWNoKGl0ZW0gPT4ge1xcXFxuICAgICAgICAgICAgaWYgKGl0ZW0uaXNfYXZpZCAhPSBmYWxzZSkge1xcXFxuICAgICAgICAgICAgICAgIHZhciBwID0gSlNPTi5wYXJzZShyZXF1ZXN0KGJ1aWxkVXJsKFxcXFxcXFwiaHR0cDovL2FwaS5iaWxpYmlsaS5jb20veC9wbGF5ZXIvcGFnZWxpc3RcXFxcXFxcIiwge1xcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImFpZFxcXFxcXFwiOiBpdGVtLmFpZFxcXFxuICAgICAgICAgICAgICAgIH0pKSkuZGF0YVxcXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnRpdGxlLnJlcGxhY2UoLzxbXj5dKj58PFxcXFxcXFxcL1tePl0qPi9nbSwgXFxcXFxcXCJcXFxcXFxcIiksXFxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogXFxcXFxcXCJodHRwczpcXFxcXFxcIiArIGl0ZW0ucGljLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2RldGFpbCNnYW1lVGhlbWUjXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImlkXFxcXFxcXCI6IGl0ZW0uYWlkLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJidmlkXFxcXFxcXCI6IGl0ZW0uYnZpZCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiY2lkXFxcXFxcXCI6IHBbMF0uY2lkXFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS50aXRsZS5yZXBsYWNlKC88W14+XSo+fDxcXFxcXFxcXC9bXj5dKj4vZ20sIFxcXFxcXFwiXFxcXFxcXCIpLFxcXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGl0ZW0uY292ZXIsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcXFxcXCJoaWtlcjovL3BhZ2UvZGV0YWlsYSNnYW1lVGhlbWUjXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInNzaWRcXFxcXFxcIjogaXRlbS5zZWFzb25faWRcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH0pXFxcXG4gICAgfVxcXFxufSBjYXRjaCAoZSkge1xcXFxuICAgIGxvZyhlLm1lc3NhZ2UpXFxcXG4gICAgc2V0UmVzdWx0KFt7XFxcXG4gICAgICAgIHRpdGxlOiAn4oCc4oCc4oCd4oCdPGNlbnRlcj48c21hbGw+PHNwYW4gc3R5bGU9XFxcXFxcXCJjb2xvcjogIzk5OTk5OVxcXFxcXFwiPu+9nu+9nu+9nuaIkeaYr+acieW6lee6v+eahO+9nu+9nu+9njwvc3Bhbj48L3NtYWxsPjwvY2VudGVyPicsXFxcXG4gICAgICAgIGNvbF90eXBlOiBcXFxcXFxcInRleHRfY2VudGVyXzFcXFxcXFxcIixcXFxcbiAgICAgICAgdXJsOiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIixcXFxcbiAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgIGxpbmVWaXNpYmxlO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kZXIuY2F0ZWdvcmllc0tleS5zdWJfY2F0ZWdvcmllc1xcXFxuICAgICAgICAgICAgICAgIGxldCBzdWJfY2F0ZWdvcmllcyA9IHN1Yl9jYXRlZ29yaWVzX2tleSA/IGNhdGVnb3J5W3N1Yl9jYXRlZ29yaWVzX2tleV0gOiBjYXRlZ29yeTtcXFxcbiAgICAgICAgICAgICAgICAvLyBsb2coY2F0ZWdvcnkpXFxcXG4gICAgICAgICAgICAgICAgLyoqXFxcXG4gICAgICAgICAgICAgICAgICog5Zyo56ysIGluZGV4IOWxguWIhuexu+S4remBjeWOhuivpeWxguaJgOacieWtkOWIhuexu1xcXFxuICAgICAgICAgICAgICAgICAqL1xcXFxuICAgICAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBpdGVtW0NhdGVnb3JpZXNIZWFkZXIuY2F0ZWdvcmllc0tleS50aXRsZV1cXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IGVzY2FwZShpdGVtW0NhdGVnb3JpZXNIZWFkZXIuY2F0ZWdvcmllc0tleS51cmxdKVxcXFxuICAgICAgICAgICAgICAgICAgICBpZiAodXJsTGlzdGVuZXIpIHVybCA9IHVybExpc3RlbmVyLm9uRGVhbChpdGVtLCBzdWJfY2F0ZWdvcnlfbmFtZSwgdXJsKVxcXFxuICAgICAgICAgICAgICAgICAgICBsYXlvdXQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyAn4oCc4oCc4oCd4oCdPGI+PHNwYW4gc3R5bGU9XFxcXFxcXCJjb2xvcjogI0ZBNzI5OFxcXFxcXFwiPicgKyB0aXRsZSArICc8L3NwYW4+PC9iPicgOiB0aXRsZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCh1cmwpLmxhenlSdWxlKChwYXJhbXMpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnRpdGxlLCBKU09OLnN0cmluZ2lmeShwYXJhbXMuY2F0ZV90ZW1wKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoTVlfUlVMRS51cmwgKyBcXFxcXFxcIiNcXFxcXFxcIiArIHBhcmFtcy5zdWJfY2F0ZWdvcnlfbmFtZSwgaW5wdXQpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogcGFnZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWJfY2F0ZWdvcnlfbmFtZTogc3ViX2NhdGVnb3J5X25hbWVcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgIC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iAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS9kZXRhaWxhI2dhbWVUaGVtZSMnLFxcXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8zJyxcXFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCJtZWRpYV9pZFxcXFxcXFwiOiBkYXRhLm1lZGlhX2lkLFxcXFxuICAgICAgICAgICAgICAgIFxcXFxcXFwic3NpZFxcXFxcXFwiOiBkYXRhLnNlYXNvbl9pZFxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9KTtcXFxcbiAgICB9XFxcXG59IGNhdGNoIChlKSB7XFxcXG4gICAgbG9nKGUubWVzc2FnZSlcXFxcbn1cXFwifV1cIixcInByb3h5XCI6XCJcIn0iLCJwaWNVcmwiOiJodHRwOi8vaTAuaGRzbGIuY29tL2Jmcy9hcmNoaXZlL2FjZDVlYjdhMzIzYjQ0YmVkNWNhYmNjMTdlNDg3MDBmYTlhYzRmOWMucG5nIiwidGl0bGUiOiLlhrDlsZ7mgKfnlLflrZDlkozphbfphbflpbPlkIzkuost5aa55aa555m75Zy677yB5ruR6Zuq5Zy655qE5Zyj6K+e6IqCIn0=
Add Comment
Please, Sign In to add comment