xiaomianao666

小程序:bilili

Jul 5th, 2024
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@bilili@eyJmaXJzdEhlYWRlciI6ImNsYXNzIiwibGFzdF9jaGFwdGVyX3J1bGUiOiIiLCJ0aXRsZSI6ImJpbGlsaSIsImF1dGhvciI6IuS+oOWQjSIsInVybCI6Imhpa2VyOi8vZW1wdHkjI2Z5cGFnZSIsInZlcnNpb24iOjE3LCJjb2xfdHlwZSI6Im1vdmllXzFfdmVydGljYWxfcGljIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJ2aWRlbyIsImNsYXNzX3VybCI6IiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxudmFyIGQgPSBbXTtcbnZhciBwYWdlID0gTVlfUEFHRTtcbmlzTG9naW4gPSBKU09OLnBhcnNlKCQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9hcGlcIikuaXNMb2dnZWRJbigpKTtcbi8vIOmqjOivgeeZu+W9lVxuaWYgKGlzTG9naW4udHlwZSA9PT0gdHJ1ZSkge1xuICAgIGN1cnJlbnRVc2VyID0gSlNPTi5wYXJzZShyZXF1ZXN0KFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFwiKSkudXNlckxpc3RbMF07XG4gICAgY29va2llID0gY3VycmVudFVzZXIuY29va2llO1xuICAgIHVzZXJOYW1lID0gY3VycmVudFVzZXIudXNlck5hbWU7XG4gICAgbWlkID0gY3VycmVudFVzZXIudXNlck1pZDtcbiAgICB1c2VyRmFjZSA9IGN1cnJlbnRVc2VyLmZhY2UgKyBcIkBSZWZlcmVyPVwiO1xuICAgIGlmIChwYWdlID09IDEpIHtcbiAgICAgICAgdmFyIFRhYiA9IFsn6LSm5Y+3JywgJ+eDreaYoCcsICfniYflupMnLCAn5o6o6YCBJywgJ+eDremXqCcsICforqLpmIUnLCAn5YWz5rOoJywgJ+aUtuiXjycsICfotrPov7knLCAn5Yqo5oCBJ107XG4gICAgICAgIFRhYiA9IFRhYi5tYXAoKGl0KSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gaXQgPT09IGdldEl0ZW0oJ+mmlumhtScsICfmjqjpgIEnKSA/ICfwn5GJJyArIGl0IDogaXQ7XG4gICAgICAgIH0pO1xuICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgdGl0bGU6ICc8Zm9udCBjb2xvcj1cImJsdWVcIj4nICsgdXNlck5hbWUsXG4gICAgICAgICAgICBkZXNjOiAnPC9mb250PuKtkDxmb250IGNvbG9yPVwiIzE5Qjg5RFwiPuW9k+WJje+8micgKyBnZXRJdGVtKCfpppbpobUnLCAn5o6o6YCBJykgKyAnPC9mb250PuKtkCcsXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKFRhYikgPT4ge1xuICAgICAgICAgICAgICAgIHJldHVybiAkKFRhYiwgMikuc2VsZWN0KCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaW5wdXQgPSBpbnB1dC5yZXBsYWNlKC/wn5GJL2csICcnKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ID09PSAn6LSm5Y+3Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0T3B0aW9uID0gWyfpgIDlh7rnmbvlvZUnLCAn5YiH5o2i6LSm5Y+3Jywn5aSN5Yi2Y29va2llJywgJ+WIhuS6q2JmS2V5JywgJ+iuvue9rmJmS2V5JywgJ+a4hemZpGJmS2V5Jywn4p6V77iPJ107XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChzZWxlY3RPcHRpb24sIDIpLnNlbGVjdCgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChpbnB1dCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwi6YCA5Ye655m75b2VXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXR0aW5nID0gSlNPTi5wYXJzZShyZXF1ZXN0KFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFwiKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBzZXR0aW5nLnVzZXJMaXN0WzBdLmNvb2tpZSA9ICcnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0dGluZy51c2VyTGlzdC5zaGlmdCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2F2ZUZpbGUoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIsIEpTT04uc3RyaW5naWZ5KHNldHRpbmcpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwidG9hc3Q6Ly/kvaDlt7LpgIDlh7pcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcIuWIh+aNoui0puWPt1wiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNlckxpc3QgPSBKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIpKS51c2VyTGlzdC5tYXAoKHApID0+IHsgcmV0dXJuIHAudXNlck5hbWUgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCh1c2VyTGlzdCwgMSkuc2VsZWN0KCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXR0aW5nID0gSlNPTi5wYXJzZShyZXF1ZXN0KFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFwiKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRlbXAgPSBzZXR0aW5nLnVzZXJMaXN0WzBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldHRpbmcudXNlckxpc3QuZm9yRWFjaCgocCwgaW5kZXgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHAudXNlck5hbWUgPT09IGlucHV0ICYmIGluZGV4ICE9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXR0aW5nLnVzZXJMaXN0WzBdID0gcDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldHRpbmcudXNlckxpc3RbaW5kZXhdID0gdGVtcDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNhdmVGaWxlKFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFwiLCBKU09OLnN0cmluZ2lmeShzZXR0aW5nKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwidG9hc3Q6Ly/liIfmjaLmiJDlip9cIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcIuWkjeWItmNvb2tpZVwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29va2llID0gSlNPTi5wYXJzZShyZXF1ZXN0KFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFwiKSkudXNlckxpc3RbMF0uY29va2llO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29weShjb29raWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwidG9hc3Q6Ly/lt7LlpI3liLZjb29raWVcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwi5YiG5LqrYmZLZXlcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvb2tpZSA9IEpTT04ucGFyc2UocmVxdWVzdChcImhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvYmlsaS50eHRcIikpLnVzZXJMaXN0WzBdLmNvb2tpZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJmS2V5ID0gYmFzZTY0RW5jb2RlKGJhc2U2NEVuY29kZShjb29raWUpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvcHkoYmZLZXkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwidG9hc3Q6Ly/lt7LlpI3liLZiZktleSzlv6vljrvliIbkuqvlkKfvvIzms6jmhI/otKblj7flronlhah+XCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcIuiuvue9rmJmS2V5XCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgnJywgJ+aSreaUvuadg+ebiuWFseS6q++8jOazqOaEj+WuieWFqCcpLmlucHV0KCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXR0aW5nID0gSlNPTi5wYXJzZShyZXF1ZXN0KFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFwiKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0dGluZy5iZktleSA9IGlucHV0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNhdmVGaWxlKFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFwiLCBKU09OLnN0cmluZ2lmeShzZXR0aW5nKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwidG9hc3Q6Ly9iZktleeiuvue9ruaIkOWKn1wiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwi5riF6ZmkYmZLZXlcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldHRpbmcgPSBKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldHRpbmcuYmZLZXkgPSAnJztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNhdmVGaWxlKFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFwiLCBKU09OLnN0cmluZ2lmeShzZXR0aW5nKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL2JmS2V55bey5riF6ZmkXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcIuKele+4j1wiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwiaGlrZXI6Ly9wYWdlL2xvZ2luI25vUmVjb3JkSGlzdG9yeSNcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwidG9hc3Q6Ly/kvaDpgInkuobllaXvvJ9cIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ+mmlumhtScsIGlucHV0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwidG9hc3Q6Ly/liIfmjaLpppbpobXkuLo6XCIgKyBpbnB1dDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9LCBUYWIpLFxuICAgICAgICAgICAgaW1nOiB1c2VyRmFjZSA9PT0gdW5kZWZpbmVkID8gJ2h0dHBzOi8vbGFubWVpZ3VvamlhbmcuY29tL3R1Ymlhby9tb3ZpZS8yMC5zdmcnIDogdXNlckZhY2UsXG4gICAgICAgICAgICBjb2xfdHlwZTogXCJhdmF0YXJcIixcbiAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgaWQ6ICfpppbpobXmmL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u5byA5aeL5L2/55So5pys6KeE5YiZ5Y2z5Luj6KGo6YG15a6I6KeE5YiZICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgIGAsXG4gICAgICAgIFwiY29sX3R5cGVcIjogXCJsb25nX3RleHRcIixcbiAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgIGlkOiBcInRleHRcIlxuICAgICAgICB9XG4gICAgfSwge1xuICAgICAgICB0aXRsZTogdGltZSArIFwi56eS5ZCO57un57utXCIsXG4gICAgICAgIGNvbF90eXBlOiBcInRleHRfMVwiLFxuICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgaWQ6IFwidGltZXJcIlxuICAgICAgICB9XG4gICAgfSlcbiAgICBzZXRSZXN1bHQoYSlcbiAgICB3aGlsZSAodGltZSAhPSAwKSB7XG4gICAgICAgIGphdmEubGFuZy5UaHJlYWQuc2xlZXAoMTAwMClcbiAgICAgICAgdGltZSAtPSAxXG4gICAgICAgIHVwZGF0ZUl0ZW0oXCJ0aW1lclwiLCB7XG4gICAgICAgICAgICB0aXRsZTogdGltZSArIFwi56eS5ZCO57un57utXCJcbiAgICAgICAgfSlcbiAgICB9XG4gICAgYWRkSXRlbUFmdGVyKFwidGltZXJcIiwge1xuICAgICAgICB0aXRsZTogXCLpgInmi6nlhbbku5blt7LnmbvlvZXotKblj7dcIixcbiAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCgpID0+IHtcbiAgICAgICAgICAgIHVzZXJMaXN0ID0gSlNPTi5wYXJzZShyZXF1ZXN0KFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFwiKSkudXNlckxpc3QubWFwKChwKSA9PiB7IHJldHVybiBwLnVzZXJOYW1lIH0pO1xuICAgICAgICAgICAgcmV0dXJuICQodXNlckxpc3QsIDEpLnNlbGVjdCgoKSA9PiB7XG4gICAgICAgICAgICAgICAgc2V0dGluZyA9IEpTT04ucGFyc2UocmVxdWVzdChcImhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvYmlsaS50eHRcIikpO1xuICAgICAgICAgICAgICAgIHRlbXAgPSBzZXR0aW5nLnVzZXJMaXN0WzBdO1xuICAgICAgICAgICAgICAgIHNldHRpbmcudXNlckxpc3QubWFwKChwKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwLnVzZXJOYW1lID09PSBpbnB1dCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2V0dGluZy51c2VyTGlzdFswXSA9IHA7XG4gICAgICAgICAgICAgICAgICAgICAgICBwID0gdGVtcDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgc2F2ZUZpbGUoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIsIEpTT04uc3RyaW5naWZ5KHNldHRpbmcpKTtcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+WIh+aNouaIkOWKn1wiO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgfSksXG4gICAgICAgIGNvbF90eXBlOiBcInRleHRfY2VudGVyXzFcIlxuICAgIH0pXG4gICAgYWRkSXRlbUFmdGVyKFwidGltZXJcIiwge1xuICAgICAgICB0aXRsZTogXCLnmbvpmYZcIixcbiAgICAgICAgZGVzYzogXCLnmbvlvZXlpLHmlYjvvJ/ngrnmraTph43mlrDnmbvlvZVcIixcbiAgICAgICAgdXJsOiBcImhpa2VyOi8vcGFnZS9sb2dpbiNub1JlY29yZEhpc3RvcnkjXCIsXG4gICAgICAgIGNvbF90eXBlOiBcInRleHRfY2VudGVyXzFcIlxuICAgIH0pXG4gICAgZGVsZXRlSXRlbShcInRleHRcIilcbiAgICBkZWxldGVJdGVtKFwidGltZXJcIilcbn1cbnNldFJlc3VsdChkKTtcbiIsInNlYXJjaF91cmwiOiJoaWtlcjovL2VtcH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naHR0cHMnKSArIFwiQFJlZmVyZXI9XCI7XG4gICAgICAgIH1lbHNle1xuICAgICAgICAgICAg5bCB6Z2iID0gaXRlbS5jb3ZlcisgXCJAUmVmZXJlcj1cIjtcbiAgICAgICAgfVxuICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgdGl0bGU6IGl0ZW0udGl0bGUucmVwbGFjZSgvPGVtIGNsYXNzPVwia2V5d29yZFwiPi9nLCAnJykucmVwbGFjZSgvPFxcL2VtPi9nLCAnJyksXG4gICAgICAgICAgICBpbWc6IOWwgemdoixcbiAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS9maWxtZXJqaSNpbW1lcnNpdmVUaGVtZSMnLFxuICAgICAgICAgICAgY29udGVudDogaXRlbS5kZXNjLFxuICAgICAgICAgICAgZGVzYzogaXRlbS5zdHlsZXMsXG4gICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgIHNlYXNvbl9pZDogaXRlbS5zZWFzb25faWRcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfSk7XG59XG5pZiAobGlzdDIpIHtcbiAgICBsaXN0Mi5mb3JFYWNoKGl0ZW0gPT4ge1xuICAgICAgICBpZiAoIWl0ZW0uY292ZXIubWF0Y2goL2h0dHBzLykpIHtcbiAgICAgICAgICAgIOWwgemdoiA9IGl0ZW0uY292ZXIucmVwbGFjZSgnaHR0cCcsJ2h0dHBzJykgKyBcIkBSZWZlcmVyPVwiO1xuICAgICAgICB9ZWxzZXtcbiAgICAgICAgICAgIOWwgemdoiA9IGl0ZW0uY292ZXIrIFwiQFJlZmVyZXI9XCI7XG4gICAgICAgIH1cbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiBpdGVtLnRpdGxlLnJlcGxhY2UoLzxlbSBjbGFzcz1cImtleXdvcmRcIj4vZywgJycpLnJlcGxhY2UoLzxcXC9lbT4vZywgJycpLFxuICAgICAgICAgICAgaW1nOiDlsIHpnaIsXG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Oi8vZmlsZXMvcnVsZXMvY3kvYmlsaS50eHQnKSk7XG4gICAgICAgICAgICBsb2cob3JpZ2luVXNlclNldHRpbmcpO1xuICAgICAgICAgICAgY29va2llID0gb3JpZ2luVXNlclNldHRpbmcuY29va2llO1xuICAgICAgICAgICAgdXNlck5hbWUgPSBvcmlnaW5Vc2VyU2V0dGluZy51c2VyTmFtZTtcbiAgICAgICAgICAgIHVzZXJNaWQgPSBvcmlnaW5Vc2VyU2V0dGluZy51c2VyTWlkO1xuICAgICAgICAgICAgZmFjZSA9IG9yaWdpblVzZXJTZXR0aW5nLmZhY2U7XG4gICAgICAgICAgICB2aXBTdGF0dXMgPSBvcmlnaW5Vc2VyU2V0dGluZy52aXBTdGF0dXM7XG4gICAgICAgICAgICBpZihjb29raWU9PT11bmRlZmluZWQpe3NldHRpbmc9J3tcInVzZXJMaXN0XCI6W10sXCJiZktleVwiOlwiXCJ9Jzt9ZWxzZXtcbiAgICAgICAgICAgICAgICBzZXR0aW5nID0gSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgICAgICB1c2VyTGlzdDogW3tcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvb2tpZTogY29va2llLFxuICAgICAgICAgICAgICAgICAgICAgICAgdXNlck5hbWU6IHVzZXJOYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgdXNlck1pZDogdXNlck1pZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZhY2U6IGZhY2UsXG4gICAgICAgICAgICAgICAgICAgICAgICB2aXBTdGF0dXM6IHZpcFN0YXR1c1xuICAgICAgICAgICAgICAgICAgICB9XSxcbiAgICAgICAgICAgICAgICAgICAgYmZLZXk6IFwiXCJcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgbG9nKFwi5rKh5pyJ5pen55qE5ZCI5rOV55qE6YWN572u5paH5Lu2XCIpO1xuICAgICAgICAgICA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ICAgICAgICAgfVxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICB9KSxcXG4gICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgIH0pXFxuICAgIOmhtumDqOWkp+exuy5mb3JFYWNoKGxpID0+IHtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IGxpID09IGdldE15VmFyKCflpKfnsbsnLCAn5Zu95YibJykgPyAn4oCc4oCc4oCd4oCdPGI+PGZvbnQgY29sb3I9IzFhYWQxOT4nICsgbGkgKyAnPC9mb250PjwvYj4nIDogbGksXFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChsaSkgPT4ge1xcbiAgICAgICAgICAgICAgICBwdXRNeVZhcign5aSn57G7JywgbGkpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICB9LCBsaSksXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgIH0pXFxuICAgIH0pO1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgY29sX3R5cGU6ICdibGFua19ibG9jaydcXG4gICAgfSlcXG59XFxuLy8g6aG26YOo5YiG57G75Y+C5pWw5pig5bCEXFxuc3dpdGNoIChnZXRNeVZhcign5aSn57G7JywgJ+WbveWImycpKSB7XFxuICAgIGNhc2UgJ+WbveWImyc6XFxuICAgICAgICBzZWFzb25UeXBlID0gNDtcXG4gICAgICAgIGlmIChnZXRNeVZhcign5oqY5Y+gJywgJ+WFsycpID09ICflvIAnKSB7XFxuICAgICAgICAgICAgaWYgKHBhZ2UgPT0gMSkge1xcbiAgICAgICAgICAgICAgICBodG1sID0gZmV0Y2goJ2h0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS9ndW9jaHVhbmcvaW5kZXgnKTtcXG4gICAgICAgICAgICAgICAg5YiG57G75YiX6KGoID0gcGRmYShodG1sLCAnLmZpbHRlci1saXN0JiYuZmlsdGVyLWJsb2NrJyk7XFxuICAgICAgICAgICAgICAgIOWIhuexu+WIl+ihqC5mb3JFYWNoKHVsID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIOetm+mAieadoeS7tiA9IHBkZmgodWwsICcuZmlsdGVyLW5hbWUmJlRleHQnKTtcXG4gICAgICAgICAgICAgICAgICAgIOWtkOWIhuexu+WIl+ihqCA9IHBkZmEodWwsICd1bCYmbGknKTtcXG4gICAgICAgICAgICAgICAgICAgIOWtkOWIhuexu+WIl+ihqC5mb3JFYWNoKGxpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocGRmaChsaSwgJ2xpJiZUZXh0JykgPT0gJ+WFtuS7licpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogZ2V0TXlWYXIo562b6YCJ5p2h5Lu2LCAn5YWo6YOoJykgPT0gcGRmaChsaSwgJ2xpJiZUZXh0JykgPyAn4oCc4oCc4oCd4oCdPGI+PGZvbnQgY29sb3I9IzFhYWQxOT4nICsgcGRmaChsaSwgJ2xpJiZUZXh0JykgKyAnPC9mb250PjwvYj4nIDogcGRmaChsaSwgJ2xpJiZUZXh0JyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgobGksIOetm+mAieadoeS7tikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIo562b6YCJ5p2h5Lu2LCBwZGZoKGxpLCAnbGkmJlRleHQnKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIGxpLCDnrZvpgInmnaHku7YpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2JsYW5rX2Jsb2NrJ1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgJ+eUteinhic6XFxuICAgICAgICBzZWFzb25UeXBlID0gNTtcXG4gICAgICAgIGlmIChnZXRNeVZhcign5oqY5Y+gJywgJ+WFsycpID09ICflvIAnKSB7XFxuICAgICAgICAgICAgaWYgKHBhZ2UgPT0gMSkge1xcbiAgICAgICAgICAgICAgICBodG1sID0gZmV0Y2goJ2h0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS90di9pbmRleCcpO1xcbiAgICAgICAgICAgICAgICDliIbnsbvliJfooaggPSBwZGZhKGh0bWwsICcuZmlsdGVyLWxpc3QmJi5maWx0ZXItYmxvY2snKTtcXG4gICAgICAgICAgICAgICAg5YiG57G75YiX6KGoLmZvckVhY2godWwgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAg562b6YCJ5p2h5Lu2ID0gcGRmaCh1bCwgJy5maWx0ZXItbmFtZSYmVGV4dCcpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoID0gcGRmYSh1bCwgJ3VsJiZsaScpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoLmZvckVhY2gobGkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwZGZoKGxpLCAnbGkmJlRleHQnKSA9PSAn5YW25LuWJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcijnrZvpgInmnaHku7YsICflhajpg6gnKSA9PSBwZGZoKGxpLCAnbGkmJlRleHQnKSA/ICfigJzigJzigJ3igJ08Yj48Zm9udCBjb2xvcj0jMWFhZDE5PicgKyBwZGZoKGxpLCAnbGkmJlRleHQnKSArICc8L2ZvbnQ+PC9iPicgOiBwZGZoKGxpLCAnbGkmJlRleHQnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChsaSwg562b6YCJ5p2h5Lu2KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcijnrZvpgInmnaHku7YsIHBkZmgobGksICdsaSYmVGV4dCcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgbGksIOetm+mAieadoeS7tiksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn57qq5b2V54mHJzpcXG4gICAgICAgIHNlYXNvblR5cGUgPSAzO1xcbiAgICAgICAgaWYgKGdldE15VmFyKCfmipjlj6AnLCAn5YWzJykgPT0gJ+W8gCcpIHtcXG4gICAgICAgICAgICBpZiAocGFnZSA9PSAxKSB7XFxuICAgICAgICAgICAgICAgIGh0bWwgPSBmZXRjaCgnaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tL2RvY3VtZW50YXJ5L2luZGV4LycpO1xcbiAgICAgICAgICAgICAgICDliIbnsbvliJfooaggPSBwZGZhKGh0bWwsICcuZmlsdGVyLWxpc3QmJi5maWx0ZXItYmxvY2snKTtcXG4gICAgICAgICAgICAgICAg5YiG57G75YiX6KGoLmZvckVhY2godWwgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAg562b6YCJ5p2h5Lu2ID0gcGRmaCh1bCwgJy5maWx0ZXItbmFtZSYmVGV4dCcpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoID0gcGRmYSh1bCwgJ3VsJiZsaScpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoLmZvckVhY2gobGkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwZGZoKGxpLCAnbGkmJlRleHQnKSA9PSAn5YW25LuWJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcijnrZvpgInmnaHku7YsICflhajpg6gnKSA9PSBwZGZoKGxpLCAnbGkmJlRleHQnKSA/ICfigJzigJzigJ3igJ08Yj48Zm9udCBjb2xvcj0jMWFhZDE5PicgKyBwZGZoKGxpLCAnbGkmJlRleHQnKSArICc8L2ZvbnQ+PC9iPicgOiBwZGZoKGxpLCAnbGkmJlRleHQnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChsaSwg562b6YCJ5p2h5Lu2KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcijnrZvpgInmnaHku7YsIHBkZmgobGksICdsaSYmVGV4dCcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgbGksIOetm+mAieadoeS7tiksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn57u86Im6JzpcXG4gICAgICAgIHNlYXNvblR5cGUgPSA3O1xcbiAgICAgICAgaWYgKGdldE15VmFyKCfmipjlj6AnLCAn5YWzJykgPT0gJ+W8gCcpIHtcXG4gICAgICAgICAgICBpZiAocGFnZSA9PSAxKSB7XFxuICAgICAgICAgICAgICAgIGh0bWwgPSBmZXRjaCgnaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tL3ZhcmlldHkvaW5kZXgnKTtcXG4gICAgICAgICAgICAgICAg5YiG57G75YiX6KGoID0gcGRmYShodG1sLCAnLmZpbHRlci1saXN0JiYuZmlsdGVyLWJsb2NrJyk7XFxuICAgICAgICAgICAgICAgIOWIhuexu+WIl+ihqC5mb3JFYWNoKHVsID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIOetm+mAieadoeS7tiA9IHBkZmgodWwsICcuZmlsdGVyLW5hbWUmJlRleHQnKTtcXG4gICAgICAgICAgICAgICAgICAgIOWtkOWIhuexu+WIl+ihqCA9IHBkZmEodWwsICd1bCYmbGknKTtcXG4gICAgICAgICAgICAgICAgICAgIOWtkOWIhuexu+WIl+ihqC5mb3JFYWNoKGxpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocGRmaChsaSwgJ2xpJiZUZXh0JykgPT0gJ+WFtuS7licpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogZ2V0TXlWYXIo562b6YCJ5p2h5Lu2LCAn5YWo6YOoJykgPT0gcGRmaChsaSwgJ2xpJiZUZXh0JykgPyAn4oCc4oCc4oCd4oCdPGI+PGZvbnQgY29sb3I9IzFhYWQxOT4nICsgcGRmaChsaSwgJ2xpJiZUZXh0JykgKyAnPC9mb250PjwvYj4nIDogcGRmaChsaSwgJ2xpJiZUZXh0JyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgobGksIOetm+mAieadoeS7tikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIo562b6YCJ5p2h5Lu2LCBwZGZoKGxpLCAnbGkmJlRleHQnKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIGxpLCDnrZvpgInmnaHku7YpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2JsYW5rX2Jsb2NrJ1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgJ+eVquWJpyc6XFxuICAgICAgICBzZWFzb25UeXBlID0gMTtcXG4gICAgICAgIGlmIChnZXRNeVZhcign5oqY5Y+gJywgJ+WFsycpID09ICflvIAnKSB7XFxuICAgICAgICAgICAgaWYgKHBhZ2UgPT0gMSkge1xcbiAgICAgICAgICAgICAgICBodG1sID0gZmV0Y2goJ2h0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS9hbmltZS9pbmRleCcpO1xcbiAgICAgICAgICAgICAgICDliIbnsbvliJfooaggPSBwZGZhKGh0bWwsICcuZmlsdGVyLWxpc3QmJi5maWx0ZXItYmxvY2snKTtcXG4gICAgICAgICAgICAgICAg5YiG57G75YiX6KGoLmZvckVhY2godWwgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAg562b6YCJ5p2h5Lu2ID0gcGRmaCh1bCwgJy5maWx0ZXItbmFtZSYmVGV4dCcpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoID0gcGRmYSh1bCwgJ3VsJiZsaScpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoLmZvckVhY2gobGkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwZGZoKGxpLCAnbGkmJlRleHQnKSA9PSAn5YW25LuWJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcijnrZvpgInmnaHku7YsICflhajpg6gnKSA9PSBwZGZoKGxpLCAnbGkmJlRleHQnKSA/ICfigJzigJzigJ3igJ08Yj48Zm9udCBjb2xvcj0jMWFhZDE5PicgKyBwZGZoKGxpLCAnbGkmJlRleHQnKSArICc8L2ZvbnQ+PC9iPicgOiBwZGZoKGxpLCAnbGkmJlRleHQnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChsaSwg562b6YCJ5p2h5Lu2KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcijnrZvpgInmnaHku7YsIHBkZmgobGksICdsaSYmVGV4dCcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgbGksIOetm+mAieadoeS7tiksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn55S15b2xJzpcXG4gICAgICAgIHNlYXNvblR5cGUgPSAyO1xcbiAgICAgICAgaWYgKGdldE15VmFyKCfmipjlj6AnLCAn5YWzJykgPT0gJ+W8gCcpIHtcXG4gICAgICAgICAgICBpZiAocGFnZSA9PSAxKSB7XFxuICAgICAgICAgICAgICAgIGh0bWwgPSBmZXRjaCgnaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tL21vdmllL2luZGV4Jyk7XFxuICAgICAgICAgICAgICAgIOWIhuexu+WIl+ihqCA9IHBkZmEoaHRtbCwgJy5maWx0ZXItbGlzdCYmLmZpbHRlci1ibG9jaycpO1xcbiAgICAgICAgICAgICAgICDliIbnsbvliJfooaguZm9yRWFjaCh1bCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICDnrZvpgInmnaHku7YgPSBwZGZoKHVsLCAnLmZpbHRlci1uYW1lJiZUZXh0Jyk7XFxuICAgICAgICAgICAgICAgICAgICDlrZDliIbnsbvliJfooaggPSBwZGZhKHVsLCAndWwmJmxpJyk7XFxuICAgICAgICAgICAgICAgICAgICDlrZDliIbnsbvliJfooaguZm9yRWFjaChsaSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBkZmgobGksICdsaSYmVGV4dCcpID09ICflhbbku5YnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldE15VmFyKOetm+mAieadoeS7tiwgJ+WFqOmDqCcpID09IHBkZmgobGksICdsaSYmVGV4dCcpID8gJ+KAnOKAnOKAneKAnTxiPjxmb250IGNvbG9yPSMxYWFkMTk+JyArIHBkZmgobGksICdsaSYmVGV4dCcpICsgJzwvZm9udD48L2I+JyA6IHBkZmgobGksICdsaSYmVGV4dCcpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGxpLCDnrZvpgInmnaHku7YpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKOetm+mAieadoeS7tiwgcGRmaChsaSwgJ2xpJiZUZXh0JykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBsaSwg562b6YCJ5p2h5Lu2KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdibGFua19ibG9jaydcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGJyZWFrO1xcbiAgICBkZWZhdWx0OlxcbiAgICAgICAgc2Vhc29uVHlwZSA9IDQ7XFxuICAgICAgICBpZiAoZ2V0TXlWYXIoJ+aKmOWPoCcsICflhbMnKSA9PSAn5byAJykge1xcbiAgICAgICAgICAgIGlmIChwYWdlID09IDEpIHtcXG4gICAgICAgICAgICAgICAgaHRtbCA9IGZldGNoKCdodHRwczovL3d3dy5iaWxpYmlsaS5jb20vYW5pbWUvaW5kZXgnKTtcXG4gICAgICAgICAgICAgICAg5YiG57G75YiX6KGoID0gcGRmYShodG1sLCAnLmZpbHRlci1saXN0JiYuZmlsdGVyLWJsb2NrJyk7XFxuICAgICAgICAgICAgICAgIOWIhuexu+WIl+ihqC5mb3JFYWNoKHVsID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIOetm+mAieadoeS7tiA9IHBkZmgodWwsICcuZmlsdGVyLW5hbWUmJlRleHQnKTtcXG4gICAgICAgICAgICAgICAgICAgIOWtkOWIhuexu+WIl+ihqCA9IHBkZmEodWwsICd1bCYmbGknKTtcXG4gICAgICAgICAgICAgICAgICAgIOWtkOWIhuexu+WIl+ihqC5mb3JFYWNoKGxpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocGRmaChsaSwgJ2xpJiZUZXh0JykgPT0gJ+WFtuS7licpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogZ2V0TXlWYXIo562b6YCJ5p2h5Lu2LCAn5YWo6YOoJykgPT0gcGRmaChsaSwgJ2xpJiZUZXh0JykgPyAn4oCc4oCc4oCd4oCdPGI+PGZvbnQgY29sb3I9IzFhYWQxOT4nICsgcGRmaChsaSwgJ2xpJiZUZXh0JykgKyAnPC9mb250PjwvYj4nIDogcGRmaChsaSwgJ2xpJiZUZXh0JyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgobGksIOetm+mAieadoeS7tikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIo562b6YCJ5p2h5Lu2LCBwZGZoKGxpLCAnbGkmJlRleHQnKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIGxpLCDnrZvpgInmnaHku7YpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2JsYW5rX2Jsb2NrJ1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgYnJlYWs7XFxufVxcbi8vIOWtkOWIhuexu+WPguaVsOaYoOWwhFxcbnN3aXRjaCAoZ2V0TXlWYXIoJ+exu+WeiycsICflhajpg6gnKSkge1xcbiAgICBjYXNlICfmraPniYcnOlxcbiAgICAgICAgc2Vhc29uX3ZlcnNpb24gPSAxO1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgJ+eUteW9sSc6XFxuICAgICAgICBzZWFzb25fdmVyc2lvbiA9IDI7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5YW25LuWJzpcXG4gICAgICAgIHNlYXNvbl92ZXJzaW9uID0gMztcXG4gICAgICAgIGJyZ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gICAgIHByb2R1Y2VyX2lkID0gMTE7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5Zu95YaF5YW25LuWJzpcXG4gICAgICAgIHByb2R1Y2VyX2lkID0gMTI7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5Zu95aSW5YW25a6DJzpcXG4gICAgICAgIHByb2R1Y2VyX2lkID0gMTM7XFxuICAgICAgICBicmVhaztcXG4gICAgZGVmYXVsdDpcXG4gICAgICAgIHByb2R1Y2VyX2lkID0gLTE7XFxuICAgICAgICBicmVhaztcXG59XFxuc3dpdGNoIChnZXRNeVZhcign54mI5p2DJywgJ+WFqOmDqCcpKSB7XFxuICAgIGNhc2UgJ+eLrOWutic6XFxuICAgICAgICBjb3B5cmlnaHQgPSAzO1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgJ+WFtuS7lic6XFxuICAgICAgICBjb3B5cmlnaHQgPSBbMSwgMiwgNF07XFxuICAgICAgICBicmVhaztcXG4gICAgZGVmYXVsdDpcXG4gICAgICAgIGNvcHlyaWdodCA9IC0xO1xcbiAgICAgICAgYnJlYWs7XFxufVxcbnN3aXRjaCAoZ2V0TXlWYXIoJ+S7mOi0uScsICflhajpg6gnKSkge1xcbiAgICBjYXNlICflhY3otLknOlxcbiAgICAgICAgc2Vhc29uX3N0YXR1cyA9IDE7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5LuY6LS5JzpcXG4gICAgICAgIHNlYXNvbl9zdGF0dXMgPSBbMiwgNl07XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5aSn5Lya5ZGYJzpcXG4gICAgICAgIHNlYXNvbl9zdGF0dXMgPSBbNCwgNl07XFxuICAgICAgICBicmVhaztcXG4gICAgZGVmYXVsdDpcXG4gICAgICAgIHNlYXNvbl9zdGF0dXMgPSAtMTtcXG4gICAgICAgIGJyZWFrO1xcbn1cXG5zd2l0Y2ggKGdldE15VmFyKCflraPluqYnLCAn5YWo6YOoJykpIHtcXG4gICAgY2FzZSAnMeaciCc6XFxuICAgICAgICBzZWFzb25fbW9udGggPSAxO1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgJzTmnIgnOlxcbiAgICAgICAgc2Vhc29uX21vbnRoID0gNDtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICc35pyIJzpcXG4gICAgICAgIHNlYXNvbl9tb250aCA9IDc7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAnMTDmnIgnOlxcbiAgICAgICAgc2Vhc29uX21vbnRoID0gMTA7XFxuICAgICAgICBicmVhaztcXG4gICAgZGVmYXVsdDpcXG4gICAgICAgIHNlYXNvbl9tb250aCA9IC0xO1xcbiAgICAgICAgYnJlYWs7XFxufVxcbi8vIOWIpOaWreWSjOaYoOWwhOW5tOS7vVxcbnN3aXRjaCAoZ2V0TXlWYXIoJ+Wkp+exuycsICflm73liJsnKSkge1xcbiAgICBjYXNlICflm73liJsnOlxcbiAgICBjYXNlICfnlarliacnOlxcbiAgICAgICAgLy8g55Wq5Ymn5ZKM5Zu95Yib44CQ5Lmf5piv5Y+r5YGa5bm05Lu95L2G5Y+C5pWw5ZCN44CB5qC85byP5ZKM5YW25LuW5YiG57G75LiN5LiA5qC344CRXFxuICAgICAgICBhbmltZV95ZWFyID0gZ2V0TXlWYXIoJ+W5tOS7vScsICflhajpg6gnKTtcXG4gICAgICAgIHN3aXRjaCAoYW5pbWVfeWVhci5pbmNsdWRlcygnLScpKSB7XFxuICAgICAgICAgICAgY2FzZSB0cnVlOlxcbiAgICAgICAgICAgICAgICBlYXJseSA9IGFuaW1lX3llYXIuc3BsaXQoJy0nKVsxXTtcXG4gICAgICAgICAgICAgICAgbGF0ZXIgPSBhbmltZV95ZWFyLnNwbGl0KCctJylbMF07XFxuICAgICAgICAgICAgICAgIHllYXIgPSBgWyR7ZWFybHl9LCR7TnVtYmVyKGxhdGVyKSArIDF9KWA7XFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgIGNhc2UgZmFsc2U6XFxuICAgICAgICAgICAgICAgIHN3aXRjaCAoYW5pbWVfeWVhcikge1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnOTDlubTku6MnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHllYXIgPSAnWzE5OTAsMjAwMCknO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnODDlubTku6MnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHllYXIgPSAnWzE5ODAsMTk5MCknO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAn5pu05pepJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICB5ZWFyID0gJ1ssMTk4MCknO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAn5YWo6YOoJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICB5ZWFyID0gLTE7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHllYXIgPSBgWyR7YW5pbWVfeWVhcn0sJHtOdW1iZXIoYW5pbWVfeWVhcikgKyAxfSlgO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgIGRlZmF1bHQ6XFxuICAgICAgICAvLyDpmaTkuobnlarliaflkozlm73liJvnmoTlhbbku5bliIbnsbtcXG4gICAgICAgIHR2X3llYXIgPSBnZXRNeVZhcign5bm05Lu9JywgJ+WFqOmDqCcpO1xcbiAgICAgICAgc3dpdGNoICh0dl95ZWFyLmluY2x1ZGVzKCctJykpIHtcXG4gICAgICAgICAgICBjYXNlIHRydWU6XFxuICAgICAgICAgICAgICAgIGVhcmx5ID0gdHZfeWVhci5zcGxpdCgnLScpWzFdO1xcbiAgICAgICAgICAgICAgICBsYXRlciA9IHR2X3llYXIuc3BsaXQoJy0nKVswXTtcXG4gICAgICAgICAgICAgICAgcmVsZWFzZV9kYXRlID0gYFske2Vhcmx5fS0wMS0wMSAwMDowMDowMCwke051bWJlcihsYXRlcikgKyAxfS0wMS0wMSAwMDowMDowMClgXFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgIGNhc2UgZmFsc2U6XFxuICAgICAgICAgICAgICAgIHN3aXRjaCAodHZfeWVhcikge1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnOTDlubTku6MnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlbGVhc2VfZGF0ZSA9ICdbMTk5MC0wMS0wMSAwMDowMDowMCwyMDAwLTAxLTAxIDAwOjAwOjAwKSdcXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJzgw5bm05LujJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWxlYXNlX2RhdGUgPSAnWzE5ODAtMDEtMDEgMDA6MDA6MDAsMTk5MC0wMS0wMSAwMDowMDowMCknXFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICfmm7Tml6knOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlbGVhc2VfZGF0ZSA9ICdbLDE5ODAtMDEtMDEgMDA6MDA6MDApJztcXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ+WFqOmDqCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVsZWFzZV9kYXRlID0gLTE7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlbGVhc2VfZGF0ZSA9IGBbJHt0dl95ZWFyfS0wMS0wMSAwMDowMDowMCwke051bWJlcih0dl95ZWFyKSArIDF9LTAxLTAxIDAwOjAwOjAwKWA7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG59XFxuc3dpdGNoIChnZXRNeVZhcign6aOO5qC8JywgJ+WFqOmDqCcpKSB7XFxuICAgIGNhc2UgJ+eUteW9sSc6XFxuICAgICAgICBzdHlsZV9pZCA9IC0xMDtcXG4gICAgICAgIGJyZWFrO1xcbiAgICAvLyDnlarliafmoI/nm65cXG4gICAgY2FzZSAn5Y6f5YibJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwMTA7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5ryr55S75pS5JzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwMTE7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5bCP6K+05pS5JzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwMTI7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5ri45oiP5pS5JzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwMTM7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn54m55pGEJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwMTQ7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5biD6KKL5oiPJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwMTU7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn54Ot6KGAJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwMTY7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn56m/6LaKJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwMTc7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5aWH5bm7JzpcXG4gICAgICAgI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gc3R5bGVfaWQgPSAxMDA0NDtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfnvo7po58nOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDA0NTtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICflgbblg48nOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDA0NjtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfkuZnlpbMnOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDA0NztcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfogYzlnLonOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDA0ODtcXG4gICAgICAgIGJyZWFrO1xcblxcbiAgICAvLyDnu7zoibrmoI/nm67jgIHnlLXlvbFcXG4gICAgY2FzZSAn5Ymn5oOFJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNTA7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5Zac5YmnJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNTE7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn54ix5oOFJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNTI7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5Yqo5L2cJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNTM7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5oGQ5oCWJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNTQ7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn54qv572qJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNTU7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5oOK5oKaJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNTY7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5oKs55aRJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNTc7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5oiY5LqJJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNTg7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5Yqo55S7JzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNTk7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5Lyg6K6wJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNjA7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5a625bqtJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNjE7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5q2M6IieJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNjI7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn57qq5a6eJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNjM7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn54G+6Zq+JzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNjQ7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5Lq65paHJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNjU7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn56eR5oqAJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNjY7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5a6H5a6ZJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNjg7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn6JCM5a6gJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNjk7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn56S+5LyaJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNzA7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5Yqo54mpJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNzE7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn6Ieq54S2JzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNzI7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5Yy755aXJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNzM7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5Yab5LqLJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNzQ7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn572q5qGIJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNzU7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn56We56eYJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNzY7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5peF6KGMJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNzc7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5q2m5L6gJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNzg7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn6Z2S5pilJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwNzk7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn6YO95biCJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwODA7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5Y+k6KOFJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwODE7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn6LCN5oiYJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwODI7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn57uP5YW4JzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwODM7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5oOF5oSfJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwODQ7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn56We6K+dJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwODU7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5bm05LujJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwODY7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5Yac5p2RJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwODc7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5YiR5L6mJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwODg7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5Yab5peFJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwODk7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn6K6/6LCIJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwOTA7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn6ISx5Y+j56eAJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwOTE7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn55yf5Lq656eAJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwOTI7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn6YCJ56eAJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwOTQ7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5peF5ri4JzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwOTU7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5pma5LyaJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwOTg7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5ryU5ZSx5LyaJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwOTY7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5Lqy5a2QJzpcXG4gICAgICAgIHN0eWxlX2lkID0gMTAwOTc7XFxuICAgICAgIC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0bGU6ICdjb29raWXnmbvlvZUnLFxcbiAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgcmV0dXJuICQoJycsICfor7fovpPlhaXkvaDnmoRjb29raWUnKS5pbnB1dCgoKSA9PiB7XFxuICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXCJcXFwiKSByZXR1cm4gXFxcInRvYXN0Oi8vY29va2ll5LiN6IO95Li656m6XFxcIjtcXG4gICAgICAgICAgICBsZXQgdXNlcmluZm8gPSBKU09OLnBhcnNlKGZldGNoKFxcXCJodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC93ZWItaW50ZXJmYWNlL25hdlxcXCIsIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcIkNvb2tpZVxcXCI6IGlucHV0XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KSkuZGF0YTtcXG4gICAgICAgICAgICBpZiAodXNlcmluZm8uaXNMb2dpbiA9PT0gZmFsc2UpIHJldHVybiBcXFwidG9hc3Q6Ly/kvaDnmoRjb29raWXosozkvLzlpLHmlYjkuobllpR+XFxcIjtcXG4gICAgICAgICAgICB1c2VySW5mbyA9IHtcXG4gICAgICAgICAgICAgICAgY29va2llOiBpbnB1dCxcXG4gICAgICAgICAgICAgICAgdXNlck5hbWU6IHVzZXJpbmZvLnVuYW1lLFxcbiAgICAgICAgICAgICAgICB1c2VyTWlkOiAgdXNlcmluZm8ubWlkLFxcbiAgICAgICAgICAgICAgICB2aXBTdGF0dXM6IHVzZXJpbmZvLnZpcFN0YXR1cyxcXG4gICAgICAgICAgICAgICAgZmFjZTogdXNlcmluZm8uZmFjZSArIFxcXCJAUmVmZXJlcj1cXFwiXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHNldHRpbmcgPSBKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vZmlsZXMvcnV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XCLojrflj5bliLDnmoRjb29raWU6XFxcIitjb29raWUpO1xcbiAgICAgICAgaWYgKGNvb2tpZSA9PSBcXFwiXFxcIikgcmV0dXJuIFxcXCJ0b2FzdDovL+iOt+WPlmNvb2tpZeWksei0pe+8jOWGjeetieetieeci++8n1xcXCI7XFxuICAgICAgICBsZXQgdXNlcmluZm8gPSBKU09OLnBhcnNlKGZldGNoKFxcXCJodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC93ZWItaW50ZXJmYWNlL25hdlxcXCIsIHtcXG4gICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWVcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KSkuZGF0YTtcXG4gICAgICAgIGlmICh1c2VyaW5mby5pc0xvZ2luID09PSBmYWxzZSkgcmV0dXJuIFxcXCJ0b2FzdDovL+S9oOWFiOeZu+W9le+8jOWGjeiOt+WPlmNvb2tpZe+8jE9L77yfXFxcIjtcXG4gICAgICAgIHVzZXJJbmZvID0ge1xcbiAgICAgICAgICAgIGNvb2tpZTogY29va2llLFxcbiAgICAgICAgICAgIHVzZXJOYW1lOiB1c2VyaW5mby51bmFtZSxcXG4gICAgICAgICAgICB1c2VyTWlkOiAgdXNlcmluZm8ubWlkLFxcbiAgICAgICAgICAgIHZpcFN0YXR1czogdXNlcmluZm8udmlwU3RhdHVzLFxcbiAgICAgICAgICAgIGZhY2U6IHVzZXJpbmZvLmZhY2UgKyBcXFwiQFJlZmVyZXI9XFxcIlxcbiAgICAgICAgfVxcbiAgICAgICAgc2V0dGluZyA9IEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFxcXCIpKTtcXG4gICAgICAgIHNldHRpbmcudXNlckxpc3QudW5zaGlmdCh1c2VySW5mbyk7XFxuICAgICAgICAvLyDov4fmu6Tmjoljb29raWXkuLrnqbrnmoTlhYPntKBcXG4g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ICAgICAgICAgIH1cXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgLy8g5YWx5Lqr5Lya5ZGY5pKt5pS+5p2D55uKXFxuICAgICAgICAgICAgaWYgKGJhZGdlLm1hdGNoKC/ku5jotLkvKSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJChbJ+mtlOaWreino+aekCcsICflt7LotK3kubAnXSwgMSkuc2VsZWN0KChpbnB1dCwgYWlkLCBjaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSAn6a2U5pat6Kej5p6QJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoZmV0Y2goJ2hpa2VyOi8vZmlsZXMvY2FjaGUvUGFyc2VfRG4uanMnLCB7fSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBheXRtUGFyc2UobGluayk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5iaWxpTGF6eShhaWQsIGNpZCwgMTE2KS5yZXBsYWNlKC87L2csIFxcXCLvvJvvvJtcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSwgbGluaywgYWlkLCBjaWQpXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmJpbGlMYXp5KGFpZCwgY2lkLCAxMTYpLnJlcGxhY2UoLzsvZywgXFxcIu+8m++8m1xcXCIpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfVxcbn0pO1xcbnZhciBDb2xvciA9IFxcXCIjMTlCODlEXFxcIjtcXG52YXIg5q+P6aG16ZuG5pWwID0gMzA7XFxudmFyIOaQnOe0ouaooeW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gpLnJ1bGUoKOeugOS7iykgPT4ge1xcbiAgICAgICAgcmVzID0ge307XFxuICAgICAgICB2YXIgZCA9IFtdO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+W9seeJh+eugOS7i++8micgKyAnXFxcXG5cXFxcdFxcXFx0XFxcXHRcXFxcdFxcXFx0XFxcXHRcXFxcdCcgKyDnroDku4ssXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdsb25nX3RleHQnXFxuICAgICAgICB9KTtcXG4gICAgICAgIHJlcy5kYXRhID0gZDtcXG4gICAgICAgIHNldEhvbWVSZXN1bHQocmVzKTtcXG4gICAgfSwg566A5LuLKSxcXG4gICAgY29sX3R5cGU6ICdtb3ZpZV8xX3ZlcnRpY2FsX3BpY19ibHVyJyxcXG4gICAgZXh0cmE6IHtcXG4gICAgICAgIGxvbmdDbGljazogW3tcXG4gICAgICAgICAgICB0aXRsZTogJ+mihOWRiuOAgeiKsee1ruW8gOWFsycsIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgaWYgKGdldEl0ZW0oJ3ByZXZpZXdTd2l0Y2gnLCAnZm9sZCcpID09ICdmb2xkJykge1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgncHJldmlld1N3aXRjaCcsICdvcGVuJyk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/pooTlkYrlt7Lnu4/liIfmjaLkuLrlsZXnpLp+XFxcIjtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ3ByZXZpZXdTd2l0Y2gnLCAnZm9sZCcpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6aKE5ZGK5LiN5YaN5bGV56S6flxcXCI7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogJ2Rt55uS5a2QJywganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9zZXR0aW5nI25vSGlzdG9yeSM/cnVsZT1kbeebkuWtkCc7XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogJ+W8ueW5leaOp+WIticsIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgaWYgKGdldEl0ZW0oJ2lzT3ZlcnJpZGVTYXZlJywgJ2ZhbHNlJykgPT0gJ3RydWUnKSB7XFxuICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCdpc092ZXJyaWRlU2F2ZScsICdmYWxzZScpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W8ueW5leWwhuS4jeWPl2Rt55uS5a2Q5Y+C5pWw5o6n5Yi2JztcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ2lzT3ZlcnJpZGVTYXZlJywgJ3RydWUnKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lvLnluZXlsIblj5fliLBkbeebkuWtkOWPguaVsOaOp+WItic7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfV1cXG4gICAgfVxcbn0pO1xcbi8vIOabtOaWsOaXpeWOhuaooeWdl1xcbmQucHVzaCh7XFxuICAgIHRpdGxlOiAn5pel5Y6GJyxcXG4gICAgaW1nOiBpbWdMaW5rLuaXpeWOhixcXG4gICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCjov73liafml6XljoYsIOabtOaWsOi/m+W6pikgPT4ge1xcbiAgICAgICAgaWYgKGdldE15VmFyKCfml6XljoYnLCAn5YWzJykgPT0gJ+W8gCcpIHtcXG4gICAgICAgICAgICBkZWxldGVJdGVtKCfov73liafml6XljoYnKTtcXG4gICAgICAgICAgICBwdXRNeVZhcign5pel5Y6GJywgJ+WFsycpO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBhZGRJdGVtQWZ0ZXIoJ+aYvuekuuaooeW8jycsIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IOi/veWJp+aXpeWOhi5tYXRjaCgv5a6M57uTfOacn+W+hS8pID8g6L+95Ymn5pel5Y6GIDog6L+95Ymn5pel5Y6GICsgJzxicj48Zm9udCBjb2xvcj1cXFwicmVkXFxcIj7mm7TmlrDoh7MnICsgKOabtOaWsOi/m+W6pi5tYXRjaCgvW1xcXFx1NGUwMC1cXFxcdTlmYTVdLykgPyDmm7TmlrDov5vluqYgOiAoJ+esrCcgKyAo5pu05paw6L+b5bqmID09ICcnID8gMCA6IOabtOaWsOi/m+W6pikgKyAn6K+dJykpICsgJzwvZm9udD4nLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInJpY2hfdGV4dFxcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBpZDogJ+i/veWJp+aXpeWOhidcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHB1dE15VmFyKCfml6XljoYnLCAn5byAJyk7XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5YiH5o2i5pel5Y6G5Li6OicgKyBnZXRNeVZhcign5pel5Y6GJywgJ+W8gCcpXFxuICAgIH0sIOi/veWJp+aXpeWOhiwg5pu05paw6L+b5bqmKSxcXG4gICAgY29sX3R5cGU6ICdpY29uXzUnXFxufS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ICAgICAgdmFyIGQgPSBbXTtcXG4gICAgICAgICAgICBMaXN0ID0gSlNPTi5wYXJzZShnZXRNeVZhcignRGF0YScpKS5lcGlzb2RlcztcXG4gICAgICAgICAgICBMaXN0LmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5zaGFyZV9jb3B5ICsgJzxmb250IGNvbG9yPVxcXCIjMzNjY2NjXFxcIj5cXHTinq48L2ZvbnQ+JyxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogaXRlbS5jb3ZlciArICdAUmVmZXJlcj0nLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlJyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcImlkXFxcIjogaXRlbS5haWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcInR5cGVcXFwiOiAxXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgICAgIH0pO1xcbiAgICB9KSxcXG4gICAgY29sX3R5cGU6ICdpY29uXzUnXFxufSk7XFxuXFxuLy8g57K+5b2p57un57ut5qih5Z2XXFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6ICflkajovrknLFxcbiAgICBpbWc6IGltZ0xpbmsu5ZGo6L65LFxcbiAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgRGF0YSA9IEpTT04ucGFyc2UoZ2V0TXlWYXIoJ0RhdGEnKSk7XFxuICAgICAgICAvLyDmnInkupvmsqHmnInnm7TmjqXljrvmjonmh5LlvpflpITnkIZ+XFxuICAgICAgICBpZiAoRGF0YS5zZWN0aW9uKSB7XFxuICAgICAgICAgICAg5ZGo6L655pWw57uEID0gW1xcXCLwn4+377iP55u45YWz57O75YiXXFxcIiwgXFxcIvCfpKNQViboirHnta5cXFwiLCBcXFwi8J+NieerluWxj+S5n+eyvuW9qVxcXCIsIFxcXCLwn5Sl57K+5b2p5LqM5YibXFxcIl07XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIOWRqOi+ueaVsOe7hCA9IFtcXFwi8J+Pt++4j+ebuOWFs+ezu+WIl1xcXCJdO1xcbiAgICAgICAgfVxcbiAgICAgICAgLy8g5ZGo6L655pWw57uEID0gW1xcXCLwn4+377iP55u45YWz57O75YiXXFxcIiwgXFxcIvCfpKNQViboirHnta5cXFwiLCBcXFwi56uW5bGP5Lmf57K+5b2pXFxcIiwgXFxcIueyvuW9qeS6jOWIm1xcXCJdO1xcbiAgICAgICAgcmV0dXJuICQo5ZGo6L655pWw57uELCAxLCAn4YOm57K+5b2p57un57utJykuc2VsZWN0KCgpID0+IHtcXG4gICAgICAgICAgICBEYXRhID0gSlNPTi5wYXJzZShnZXRNeVZhcignRGF0YScpKTtcXG4gICAgICAgICAgICBsYXp5ID0gZ2V0TXlWYXIoJ2xhenknKTtcXG4gICAgICAgICAgICBpZiAoaW5wdXQgPT09ICfwn4+377iP55u45YWz57O75YiXJykge1xcbiAgICAgICAgICAgICAgICDns7vliJflkI3np7AgPSBEYXRhLnNlYXNvbl90aXRsZVxcbiAgICAgICAgICAgICAgICDns7vliJfmlbDmja4gPSBEYXRhLnNlYXNvbnM7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKCkucnVsZSgo57O75YiX5pWw5o2uKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkID0gW107XFxuICAgICAgICAgICAgICAgICAgICBzZXRQYWdlVGl0bGUoJ/Cfj7fvuI/nm7jlhbPns7vliJcnKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmICjns7vliJfmlbDmja4gPT0gW10gfHwg57O75YiX5pWw5o2uID09ICcnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfigJjigJjigJnigJk8YmlnPjxmb250IGNvbG9yPVxcXCJyZWRcXFwiPuKtkOivpeW9seeJh+ayoeacieebuOWFs+ezu+WIl+WTpn7irZA8L2ZvbnQ+PC9iaWc+JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAndG9hc3Q6Ly/pg73msqHmnInvvIzvvIzkvaDngrnllaXlkYB+JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+aVrOivt+acn+W+hX4nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICDns7vliJfmlbDmja4uZm9yRWFjaChsaXN0ID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5zZWFzb25fdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGltZzogKGxpc3QuaG9yaXpvbnRhbF9jb3Zlcl8xNjEwID09ICcnID8gKGxpc3QuaG9yaXpvbnRhbF9jb3Zlcl8xNjkgPT0gJycgPyBsaXN0LmNvdmVyIDogbGlzdC5ob3Jpem9udGFsX2NvdmVyXzE2OSkgOiBsaXN0Lmhvcml6b250YWxfY292ZXJfMTYxMCkgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL2ZpbG1lcmppI2ltbWVyc2l2ZVRoZW1lIycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IGxpc3QubmV3X2VwLmluZGV4X3Nob3csXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiZXBfaWRcXFwiOiBsaXN0Lm5ld19lcC5pZFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIHNldEhvbWVSZXN1bHQoZCk7XFxuICAgICAgICAgICAgICAgIH0sIOezu+WIl+aVsOaNrilcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09PSAn8J+ko1BWJuiKsee1ricpIHtcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgIFBW5ZKM6Iqx57Wu5pWw5o2uID0gRGF0YS5zZWN0aW9uWzBdLmVwaXNvZGVzO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoKS5ydWxlKChQVuWSjOiKsee1ruaVsOaNriwgbGF6eSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGQgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRQYWdlVGl0bGUoJ/CfpKNQViboirHnta4nKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoUFblkozoirHnta7mlbDmja4gPT0gW10gfHwgUFblkozoirHnta7mlbDmja4gPT0gJycpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn4oCY4oCY4oCZ4oCZPGJpZz48Zm9udCBjb2xvcj1cXFwicmVkXFxcIj7irZDor6XlvbHniYcv6KeG6aKR5rKh5pyJ55u45YWzUFblkozoirHnta7lk6Z+4q2QPC9mb250PjwvYmlnPicsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICd0b2FzdDovL+mDveayoeacie+8jO+8jOS9oOeCueWVpeWRgH4nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+aVrOivt+acn+W+hX4nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgUFblkozoirHnta7mlbDmja4uZm9yRWFjaChsaXN0ID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0LnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiBsaXN0LmNvdmVyICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGxpc3QubGluayArIGxhenksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBsaXN0LnN1YnRpdGxlICsgJ1xcXFxuJyArIGxpc3QubG9uZ190aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBsaXN0LmxpbmssXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0LmFpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidmlkOiBsaXN0LmJ2aWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lkOiBsaXN0LmNpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWRnZTogbGlzdC5iYWRnZVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRIb21lUmVzdWx0KGQpO1xcbiAgICAgICAgICAgICAgICAgICAgfSwgUFblkozoirHnta7mlbDmja4sIGxhenkpXFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/msqHmnInmlbDmja7lk6Z+J1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PT0gJ/CfjYnnq5blsY/kuZ/nsr7lvaknKSB7XFxuICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICDnq5blsY/kuZ/nsr7lvanmlbDmja4gPSBEYXRhLnNlY3Rpb25bMV0uZXBpc29kZXM7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgpLnJ1bGUoKOerluWxj+S5n+eyvuW9qeaVsOaNriwgbGF6eSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGQgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRQYWdlVGl0bGUoJ/CfjYnnq5blsY/kuZ/nsr7lvaknKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAo56uW5bGP5Lmf57K+5b2p5pWw5o2uID09IFtdIHx8IOerluWxj+S5n+eyvuW9qeaVsOaNriA9PSAnJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfigJjigJjigJnigJk8YmlnPjxmb250IGNvbG9yPVxcXCJyZWRcXFwiPuKtkOivpeW9seeJhy/op4bpopHmsqHmnInnm7jlhbPnq5blsY/nn63op4bpopHlk6Z+4q2QPC9mb250PjwvYmlnPicsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICd0b2FzdDovL+mDveayoeacie+8jO+8jOS9oOeCueWVpeWRgH4nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+aVrOivt+acn+W+hX4nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAg56uW5bGP5Lmf57K+5b2p5pWw5o2uLmZvckVhY2gobGlzdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5jb3ZlciArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBsaXN0LmxpbmsgKyBsYXp5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogbGlzdC5zdWJ0aXRsZSArICdcXFxcbicgKyBsaXN0LmxvbmdfdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogbGlzdC5saW5rLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFpZDogbGlzdC5haWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnZpZDogbGlzdC5idmlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNpZDogbGlzdC5jaWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFkZ2U6IGxpc3QuYmFkZ2VcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0SG9tZVJlc3VsdChkKTtcXG4gICAgICAgICAgICAgICAgICAgIH0sIOerluWxj+S5n+eyvuW9qeaVsOaNriwgbGF6eSlcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+ayoeacieaVsOaNruWTpn4nXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09PSAn8J+UpeeyvuW9qeS6jOWImycpIHtcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgIOeyvuW9qeS6jOWIm+aVsOaNriA9IERhdGEuc2VjdGlvblsyXS5lcGlzb2RlcztcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCkucnVsZSgo57K+5b2p5LqM5Yib5pWw5o2uLCBsYXp5KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZCA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFBhZ2VUaXRsZSgn8J+UpeeyvuW9qeS6jOWImycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICjnsr7lvankuozliJvmlbDmja4gPT0gW10gfHwg57K+5b2p5LqM5Yib5pWw5o2uID09ICcnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+KAmOKAmOKAmeKAmTxiaWc+PGZvbnQgY29sb3I9XFxcInJlZFxcXCI+4q2Q6K+l5b2x54mHL+inhumikeayoeacieS6jOWIm+S9nOWTgeWTpn7irZA8L2ZvbnQ+PC9iaWc+JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJ3RvYXN0Oi8v6YO95rKh5pyJ77yM77yM5L2g54K55ZWl5ZGAficsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn5pWs6K+35pyf5b6FficsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICDnsr7lvankuozliJvmlbDmja4uZm9yRWFjaChsaXN0ID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8g6ZKI5a+56YOo5YiG5Y+C5pWw57y65aSx55qE5oOF5Ya15aaC5Yeh5Lq65L+u5LuZ5Lyg5YaZ55qE77yM77yMXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsaXN0LmFpZCA9PSAwIHx8IGxpc3QuY2lkID09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZWRlb0RhdGEgPSBKU09OLnBhcnNlKGZldGNoKFxcXCJodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC93ZWItaW50ZXJmYWNlL3ZpZXc/YWlkPVxcXCIgKyBsaXN0Lmxpbmsuc3BsaXQoJ2F2JylbMV0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogUENfVUEsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJSZWZlcmVyXFxcIjogJ2h0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS8nXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXRob2Q6IFxcXCJHRVRcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSkuZGF0YTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFpZCA9IHZpZWRlb0RhdGEuYWlkO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnZpZCA9IHZpZWRlb0RhdGEuYnZpZDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNpZCA9IHZpZWRlb0RhdGEuY2lkO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkID0gbGlzdC5haWQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidmlkID0gbGlzdC5idmlkO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lkID0gbGlzdC5jaWQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0LnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiBsaXN0LmNvdmVyICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGxpc3QubGluayArIGxhenksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBsaXN0LnN1YnRpdGxlICsgJ1xcXFxuJyArIGxpc3QubG9uZ190aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBsaXN0LmxpbmssXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBhaWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnZpZDogYnZpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaWQ6IGNpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWRnZTogbGlzdC5iYWRnZVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRIb21lUmVzdWx0KGQpO1xcbiAgICAgICAgICAgICAgICAgICAgfSwg57K+5b2p5LqM5Yib5pWw5o2uLCBsYXp5KVxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5rKh5pyJ5pWw5o2u5ZOmfidcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5q2j5Zyo6L+b5YWlXFxcIiArIGlucHV0ICsgXFxcIueVjOmdoi4uLlxcXCI7XFxuICAgICAgICB9KVxcbiAgICB9KSxcXG4gICAgY29sX3R5cGU6IFxcXCJpY29uXzVcXFwiLFxcbiAgICBleHRyYToge1xcbiAgICAgICAgaWQ6ICfnsr7lvannu6fnu60nXFxuICAgIH1cXG59KTtcXG4vLyDmmL7npLrmqKHlvI/mm7TmlLnmqKHlnZdcXG5kLnB1c2goe1xcbiAgICB0aXRsZTogZ2V0SXRlbSgn5qih5byPJywgJ+WPjOi+uScpLFxcbiAgICBpbWc6IGdldEl0ZW0oJ+aooeW8jycsICflj4zovrknKSA9PSAn5YiX6KGoJyA/IGltZ0xpbmsu5YiX6KGoIDogaW1nTGluay7lj4zovrksXFxuICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICDmmL7npLrnmoTliafpm4bliJfooaggPSBKU09OLnBhcnNlKGdldE15VmFyKCfmmL7npLrnmoTliafpm4bliJfooagnKSk7XFxuICAgICAgICBpZiAoZ2V0SXRlbSgn5qih5byPJywgJ+WPjOi+uScpID09ICfliJfooagnKSB7XFxuICAgICAgICAgICAg5pi+56S655qE5Ymn6ZuG5YiX6KGoLmZvckVhY2goZWwgPT4ge1xcbiAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKGVsLmxpbmssIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMicsXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHNldEl0ZW0oJ+aooeW8jycsICflj4zovrknKVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICDmmL7npLrnmoTliafpm4bliJfooaguZm9yRWFjaChlbCA9PiB7XFxuICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oZWwubGluaywge1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJyxcXG4gICAgIC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B1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGpzb24sIOadpea6kCwgQ29sb3IsIG9wLCDlvbHniYflkI3np7AsIOaQnOe0ouaooeW8jywg6LCD55So5ZCN56ewKSA9PiB7XFxuICAgICAgICBldmFsKGdldE15VmFyKCfnroDmj5InKSk7XFxuICAgICAgICByZXR1cm4gJChldmFsKGdldE15VmFyKCfop6PmnpDmlbDnu4QnKSksIDMpLnNlbGVjdCgoanNvbiwg5p2l5rqQLCBDb2xvciwgb3AsIOW9seeJh+WQjeensCwg5pCc57Si5qih5byPLCDosIPnlKjlkI3np7ApID0+IHtcXG4gICAgICAgICAgICBzZXRGaWxlID0gZ2V0TXlWYXIoJ3NldEZpbGUnKTtcXG4gICAgICAgICAgICBpbnB1dCA9IGlucHV0LnJlcGxhY2UoL/CfkYkvZywgJycpO1xcbiAgICAgICAgICAgIGlmIChpbnB1dCA9PT0gJ+Kcje+4j+i+heWKqScpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQoKS5ydWxlKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcjovL3BhZ2UvaG9tZT9ydWxlPemFjee9ruWKqeaJiycpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09PSAn8J+Tpu+4j+mtlOaWrScpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL3BhZ2UvUm91dGU/cnVsZT1NeUZpZWxk4bSw4oG/JnR5cGU957yW6L6RI25vSGlzdG9yeSNcXFwiO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT09ICfwn5SN5pCc57SiJykge1xcbiAgICAgICAgICAgICAgICBpZiAo5pCc57Si5qih5byPID09ICfliIbnu4QnKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vc2VhcmNoP3M9XFxcIiArIOW9seeJh+WQjeensCArIFxcXCImZ3JvdXA9XFxcIiArIOiwg+eUqOWQjeensDtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9zZWFyY2g/cz1cXFwiICsg5b2x54mH5ZCN56ewICsgXFxcIiZydWxlPVxcXCIgKyDosIPnlKjlkI3np7A7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgLy8g5Y6f5YWI55qE6YWN572uXFxuICAgICAgICAgICAgb3JpZ2luU2V0dGluZ3MgPSBKU09OLnN0cmluZ2lmeShqc29uLnNldHRpbmdzKTtcXG4gICAgICAgICAgICAvLyDkv67mlLnphY3nva5cXG4gICAgICAgICAgICBldmFsKCdqc29uLnNldHRpbmdzLicgKyDmnaXmupAgKyAnPWlucHV0OycpO1xcbiAgICAgICAgICAgIHNldEZpbGUgPSBzZXRGaWxlLnJlcGxhY2Uob3JpZ2luU2V0dGluZ3MsIEpTT04uc3RyaW5naWZ5KGpzb24uc2V0dGluZ3MpKTtcXG4gICAgICAgICAgICBzYXZlRmlsZSgnaGlrZXI6Ly9maWxlcy9ydWxlcy9EdWFuTmlhbi9NeVBhcnNlLmpzb24nLCBzZXRGaWxlKTtcXG4gICAgICAgICAgICAvLyDliLfmlrDlhYPntKBcXG4gICAgICAgICAgICBldmFsKGdldE15VmFyKCfnroDmj5InKSk7XFxuICAgICAgICAgICAgdXBkYXRlSXRlbSgnb3AnLCB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn6Kej5p6Q77ya8J+UmDxmb250IGNvbG9yPVxcXCInICsgQ29sb3IgKyAnXFxcIj4nICsgb3AgKyAnPC9mb250PlxcXFx0XFxcXHTpobXnoIHvvJo8Zm9udCBjb2xvcj1cXFwiJyArIENvbG9yICsgJ1xcXCI+JyArICgoZ2V0TXlWYXIoJ+WIhumbhui1tycsICfpppbpobUnKSA9PSAn6aaW6aG1JykgPyAn6aaW6aG1JyA6IChnZXRNeVZhcign5YiG6ZuG6LW3JykgKyAnLScgKyBnZXRNeVZhcign5YiG6ZuG57uIJykpKSArICc8L2ZvbnQ+JyxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5YiH5o2i6Kej5p6Q5Y+j5Li6OlxcXCIgKyBpbnB1dDtcXG4gICAgICAgIH0sIGpzb24sIOadpea6kCwgQ29sb3IsIG9wLCDlvbHniYflkI3np7AsIOaQnOe0ouaooeW8jywg6LCD55So5ZCN56ewKVxcbiAgICB9LCBqc29uLCDmnaXmupAsIENvbG9yLCBvcCwg5b2x54mH5ZCN56ewLCDmkJzntKLmqKHlvI8sIOiwg+eUqOWQjeensCksXFxuICAgIGltZzogJ2hpa2VyOi8vZmlsZXMvcnVsZXMvY3kvdHViaWFvL2JpbGliaWxpLnN2ZycsXFxuICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIixcXG4gICAgZXh0cmE6IHtcXG4gICAgICAgIGlkOiAnb3AnXFxuICAgIH1cXG59KTtcXG4vLyDmu5rliqjliafpm4bmnaHmoI9cXG7liafpm4bplb/luqYgPSDliafpm4bliJfooagubGVuZ3RoO1xcbmlmICjliafpm4bplb/luqYgPiDmr4/pobXpm4bmlbApIHtcXG4gICAgcHV0TXlWYXIoJ+WIt+aWsOmAiembhicsICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgcHV0TXlWYXIoJ+WIhumbhui1tycsIHN0YXJ0KTtcXG4gICAgICAgIHB1dE15VmFyKCfliIbpm4bnu4gnLCBlbmQpO1xcbiAgICAgICAgZXZhbChnZXRNeVZhcign566A5o+SJykpO1xcbiAgICAgICAgdXBkYXRlSXRlbSgnb3AnLCB7XFxuICAgICAgICAgICAgdGl0bGU6ICfop6PmnpDvvJrwn5SYPGZvbnQgY29sb3I9XFxcIicgKyBDb2xvciArICdcXFwiPicgKyBvcCArICc8L2ZvbnQ+XFxcXHRcXFxcdOmhteegge+8mjxmb250IGNvbG9yPVxcXCInICsgQ29sb3IgKyAnXFxcIj4nICsgKChnZXRNeVZhcign5YiG6ZuG6LW3JywgJ+mmlumhtScpID09ICfpppbpobUnKSA/ICfpppbpobUnIDogKGdldE15VmFyKCfliIbpm4botbcnKSArICctJyArIGdldE15VmFyKCfliIbpm4bnu4gnKSkpICsgJzwvZm9udD4nLFxcbiAgICAgICAgfSlcXG4gICAgICAgIC8vIOWIoOmZpFxcbiAgICAgICAg5pi+56S655qE5Ymn6ZuG5YiX6KGoID0gSlNPTi5wYXJzZShnZXRNeVZhcign5pi+56S655qE5Ymn6ZuG5YiX6KGoJykpO1xcbiAgICAgICAg5pi+56S655qE5Ymn6ZuG5YiX6KGoLmZvckVhY2goZWwgPT4ge1xcbiAgICAgICAgICAgIGRlbGV0ZUl0ZW0oZWwubGluayk7XFxuICAgICAgICB9KTtcXG4gICAgICAgIC8vIOa3u+WKoFxcbiAgICAgICAgbGF6eSA9IGdldE15VmFyKCdsYXp5Jyk7XFxuICAgICAgICDliafpm4bliJfooaggPSBKU09OLnBhcnNlKGdldE15VmFyKCfliafpm4bliJfooagnKSk7XFxuICAgICAgICDmmL7npLrnmoTliafpm4bliJfooaggPSDliafpm4bliJfooaguc2xpY2Uoc3RhcnQgLSAxLCBlbmQpO1xcbiAgICAgICAgbmV3QXJyYXkgPSBbXTtcXG4gICAgICAgIGluZGV4ID0gMTtcXG4gICAgICAgIOaYvuekuueahOWJp+mbhuWIl+ihqC5mb3JFYWNoKGxpc3QgPT4ge1xcbiAgICAgICAgICAgIGlmIChnZXRJdGVtKCfmqKHlvI8nLCAn5Y+M6L65JykgPT0gJ+WIl+ihqCcpIHtcXG4gICAgICAgICAgICAgICAgbmV3QXJyYXkucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5sb25nX3RpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBsaXN0LmNvdmVyICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IGxpc3QubGluayArIGxhenksXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBsaXN0LnRpdGxlLm1hdGNoKC9bMC05XS8pID8gKGxpc3QuYmFkZ2UgKyAn56ysJyArIGxpc3QudGl0bGUgKyAn6K+dJykgOiBsaXN0LnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGxpc3QubGluayxcXG4gICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuYWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJ2aWQ6IGxpc3QuYnZpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjaWQ6IGxpc3QuY2lkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhZGdlOiBsaXN0LmJhZGdlXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIG5ld0FycmF5LnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QubG9uZ190aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5jb3ZlciArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBsaXN0LmxpbmsgKyBsYXp5LFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogbGlzdC50aXRsZS5tYXRjaCgvWzAtOV0vKSA/IChsaXN0LmJhZGdlICsgJ+esrCcgKyBsaXN0LnRpdGxlICsgJ+ivnScpIDogbGlzdC50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMicsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBsaXN0LmxpbmssXFxuICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0LmFpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBidmlkOiBsaXN0LmJ2aWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2lkOiBsaXN0LmNpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBiYWRnZTogbGlzdC5iYWRnZVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaW5kZXggKz0gMTtcXG4gICAgICAgIH0pO1xcbiAgICAgICAgYWRkSXRlbUFmdGVyKGdldE15VmFyKCfmnKvpobUnKSwgbmV3QXJyYXkpO1xcbiAgICAgICAgcHV0TXlWYXIoJ+aYvuekuueahOWJp+mbhuWIl+ihqCcsIOaYvuekuueahOWJp+mbhuWIl+ihqCk7XFxuICAgIH0pKTtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgIHRpdGxlOiAn4oi3JyxcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgaWQ6ICfljaDkvY3nrKYnLFxcbiAgICAgICAgfVxcbiAgICB9KVxcbiAgICBwdXRNeVZhcign5YiG6ZuG6LW3JywgMSk7XFxuICAgIHB1dE15VmFyKCfliIbpm4bnu4gnLCDmr4/pobXpm4bmlbApO1xcbiAgICBwdXRNeVZhcign5Ymn6ZuG5YiX6KGoJywg5Ymn6ZuG5YiX6KGoKTtcXG4gICAg5oC76aG15pWwID0gTWF0aC5jZWlsKOWJp+mbhumVv+W6piAvIOavj+mhtembhuaVsCk7XFxuICAgIHN0YXJ0ID0gMTtcXG4gICAgZW5kID0g5q+P6aG16ZuG5pWwO1xcbiAgICBmb3IgKGxldCBwYWdlID0gMTsgcGFnZSA8PSDmgLvpobXmlbA7IHBhZ2UrKykge1xcbiAgICAgICAgaWYgKGVuZCA+IOWJp+mbhumVv+W6pikge1xcbiAgICAgICAgICAgIGVuZCA9IOWJp+mbhumVv+W6pjtcXG4gICAgICAgIH1cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IHN0YXJ0ICsgJy0nICsgZW5kLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChzdGFydCwgZW5kLCBDb2xvciwg5p2l5rqQKSA9PiB7XFxuICAgICAgICAgICAgICAgIGV2YWwoZ2V0TXlWYXIoJ+WIt+aWsOmAiembhicpKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICB9LCBzdGFydCwgZW5kLCBDb2xvciwg5p2l5rqQKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOiBzdGFydCArICctJyArIGVuZFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICAgICAgaWYgKGVuZCA8IOWJp+mbhumVv+W6pikge1xcbiAgICAgICAgICAgIHN0YXJ0ICs9IOavj+mhtembhuaVsDtcXG4gICAgICAgICAgICBlbmQgKz0g5q+P6aG16ZuG5pWwO1xcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIC8vIOiusOW9leacq+mhteeahGlkXFxuICAgIHB1dE15VmFyKCfmnKvpobUnLCBzdGFydCArICctJyArIGVuZCk7XFxufSBlbHNlIHtcXG4gICAgcHV0TXlWYXIoJ+WIhumbhui1tycsIDEpO1xcbiAgICBwdXRNeVZhcign5YiG6ZuG57uIJywg5Ymn6ZuG6ZW/5bqmKTtcXG59XFxuLy8g5bGV56S65Ymn6ZuGOlxcbuaYvuekuueahOWJp+mbhuWIl+ihqCA9IOWJp+mbhuWIl+ihqC5zbGljZSgwLCBnZXRNeVZhcign5YiG6ZuG57uIJykpO1xcbnB1dE15VmFyKCfmmL7npLrnmoTliafpm4bliJfooagnLCDmmL7npLrnmoTliafpm4bliJfooagpO1xcbmluZGV4ID0gMTtcXG7mmL7npLrnmoTliafpm4bliJfooaguZm9yRWFjaChsaXN0ID0+IHtcXG4gICAgaWYgKGdldEl0ZW0oJ+aooeW8jycsICflj4zovrknKSA9PSAn5YiX6KGoJykge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogbGlzdC5sb25nX3RpdGxlLFxcbiAgICAgICAgICAgIGltZzogbGlzdC5jb3ZlciArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgIHVybDogbGlzdC5saW5rICsgbGF6eSxcXG4gICAgICAgICAgICBkZXNjOiBsaXN0LnRpdGxlLm1hdGNoKC9bMC05XS8pID8gKGxpc3QuYmFkZ2UgKyAn56ysJyArIGxpc3QudGl0bGUgKyAn6K+dJykgOiBsaXN0LnRpdGxlLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IGxpc3QubGluayxcXG4gICAgICAgICAgICAgICAgYWlkOiBsaXN0LmFpZCxcXG4gICAgICAgICAgICAgICAgYnZpZDogbGlzdC5idmlkLFxcbiAgICAgICAgICAgICAgICBjaWQ6IGxpc3QuY2lkLFxcbiAgICAgICAgICAgICAgICBiYWRnZTogbGlzdC5iYWRnZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB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lkICsgXFxcIlxcXCI7XFxudXBOYW1lID0gTVlfUEFSQU1TLnRpdGxlO1xcbnVwRmFjZSA9IE1ZX1BBUkFNUy5mYWNlO1xcbnJlbGF0aW9uID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikudXNlck1hcHBpbmcodXBNaWQpO1xcbi8vIOWktOWDj+agj1xcbmQucHVzaCh7XFxuICAgIHRpdGxlOiAnPGZvbnQgY29sb3I9XFxcImJsdWVcXFwiPicgKyB1cE5hbWUgKyAnPC9mb250PicsXFxuICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgodXBNaWQpID0+IHtcXG4gICAgICAgIGlmIChnZXRNeVZhcigndXBJbmZvJywgJ+WFsycpID09ICflvIAnKSB7XFxuICAgICAgICAgICAgZGVsZXRlSXRlbSgndXBJbmZvJyk7XFxuICAgICAgICAgICAgcHV0TXlWYXIoJ3VwSW5mbycsICflhbMnKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgLy8g55So5oi35Z+65pys5L+h5oGvXFxuICAgICAgICAgICAgICAgIHF1ZXJ5SnNvbiA9IHtcXG4gICAgICAgICAgICAgICAgICAgIG1pZDogdXBNaWQsXFxuICAgICAgICAgICAgICAgICAgICB0b2tlbjogJycsXFxuICAgICAgICAgICAgICAgICAgICBwbGF0Zm9ybTogJ3dlYicsXFxuICAgICAgICAgICAgICAgICAgICB3ZWJfbG9jYXRpb246IDE1NTAxMDFcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBwYXJtcyA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmdldFdiaUVuYyhxdWVyeUpzb24pO1xcbiAgICAgICAgICAgICAgICBpbmZvTGluayA9ICdodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC9zcGFjZS93YmkvYWNjL2luZm8/JyArIHBhcm1zO1xcbiAgICAgICAgICAgICAgICB1cERhdGEgPSBKU09OLnBhcnNlKGZldGNoKGluZm9MaW5rLCB7XFxuICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBQQ19VQSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3d3dy5iaWxpYmlsaS5jb20vXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogY29va2llPUpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFxcXCIpKS51c2VyTGlzdFswXS5jb29raWVcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSkpLmRhdGE7XFxuICAgICAgICAgICAgICAgIHVwTmFtZSA9IHVwRGF0YS5uYW1lO1xcbiAgICAgICAgICAgICAgICB1cFNleCA9IHVwRGF0YS5zZXg7XFxuICAgICAgICAgICAgICAgIHVwU2lnbiA9IHVwRGF0YS5zaWduO1xcbiAgICAgICAgICAgICAgICB1cEJpcnRoZGF5ID0gdXBEYXRhLmJpcnRoZGF5O1xcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgdXBTY2hvb2wgPSB1cERhdGEuc2Nob29sLm5hbWU7XFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIHVwU2Nob29sID0gJyc7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgIHVwSWRlbnRpZmljYXRpb24gPSB1cERhdGEub2ZmaWNpYWwudGl0bGU7XFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIHVwSWRlbnRpZmljYXRpb24gPSAnJztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBhZGRJdGVtQWZ0ZXIoJ2N1cnJlbnRVcCcsIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAndXA6JyArIHVwTmFtZSArICdcXFxcbm1pZDonICsgdXBNaWQgKyAnXFxcXG7mgKfliKs6JyArIHVwU2V4ICsgJ1xcXFxu55Sf5pelOicgKyAodXBCaXJ0aGRheSA9PSAnJyA/ICfmnKrloavlhpknIDogdXBCaXJ0aGRheSkgKyAnXFxcXG4nICsgKHVwU2Nob29sID09ICcnID8gJycgOiAn5a2m5qChOicgKyB1cFNjaG9vbCArICdcXFxcbicpICsgKHVwU2lnbiA9PSAnJyA/ICdcXFxcbicgOiB1cFNpZ24gKyAnXFxcXG4nKSArICh1cElkZW50aWZpY2F0aW9uID09ICcnID8gJycgOiAn6K6k6K+BOicpLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9lbXB0eScsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xvbmdfdGV4dCcsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiAndXBJbmZvJ1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgIGFkZEl0ZW1BZnRlcignY3VycmVudFVwJywge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICflpb3lg4/lh7rkuobngrnmhI/lpJbvvJ/ku4DkuYjpg73mnKjmnInlkaJ+JyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vZW1wdHknLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsb25nX3RleHQnLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IH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mlsaWJpbGkuY29tL3gvcG9seW1lci9zcGFjZS9zZWFzb25zX2FyY2hpdmVzX2xpc3Q/bWlkPScgKyB1cE1pZCArICcmc2Vhc29uX2lkPScgKyBzZWFzb25faWQgKyAnJnNvcnRfcmV2ZXJzZT1mYWxzZSZwYWdlX251bT0nICsgTVlfUEFHRSArICcmcGFnZV9zaXplPTMwJztcXG4gICAgICAgICAgICAgICAgICAgIFZpZGVvID0gSlNPTi5wYXJzZShmZXRjaCh1LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFBDX1VBLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3d3dy5iaWxpYmlsaS5jb20vXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pKS5kYXRhO1xcbiAgICAgICAgICAgICAgICAgICAgbWF4UGFnZSA9IE1hdGguY2VpbChWaWRlby5wYWdlLnRvdGFsIC8gVmlkZW8ucGFnZS5wYWdlX3NpemUpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKE1ZX1BBR0UgPD0gbWF4UGFnZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5b2T5YmNOuesrCcgKyBWaWRlby5wYWdlLnBhZ2VfbnVtICsgJ+mhtVxcXFx0XFxcXHRcXFxcdOWFseaciScgKyBtYXhQYWdlICsgJ+mhtSwnICsgVmlkZW8ucGFnZS50b3RhbCArICfmnaHmlbDmja4nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL2VtcHR5XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2NlbnRlcl8xXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBWaWRlby5hcmNoaXZlcy5mb3JFYWNoKGxpc3QgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QucGljICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn5pKt5pS+6YeP77yaJyArIGxpc3Quc3RhdC52aWV3LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS92aWRlb1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFpZDogbGlzdC5haWRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBzZXRIb21lUmVzdWx0KGQpO1xcbiAgICAgICAgICAgICAgICB9LCB1cE1pZCwgc2Vhc29uX2lkKVxcbiAgICAgICAgICAgIH0sIHVwTWlkLCBzZWFzb25faWQpXFxuICAgICAgICB9KTtcXG4gICAgICAgIGlmIChsaXN0LmFyY2hpdmVzID09PSB1bmRlZmluZWQpIHtcXG4gICAgICAgICAgICBsb2cobGlzdC5tZXRhLm5hbWUgKyAn5Li656m6Jyk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGlmIChsaXN0LmFyY2hpdmVzLmxlbmd0aCA8IDIpIHtcXG4gICAgICAgICAgICAgICAgbGlzdC5hcmNoaXZlcy5mb3JFYWNoKGxpc3QgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QucGljICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+aSreaUvumHj++8micgKyBsaXN0LnN0YXQudmlldyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS92aWRlb1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0LmFpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGxpc3QuYXJjaGl2ZXMubGVuZ3RoID09IDApIHtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi5aW95a625LyZ77yM6L+Z5a625LyZ5rKh5pyJ5ZCI6ZuG6KeG6aKR77yBXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLopoHkuI3ljrvngrnlh7vlhajpg6jop4bpopHnnIvnnIt+XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL2VtcHR5XFxcIixcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCAyOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QuYXJjaGl2ZXNbaV0udGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiBsaXN0LmFyY2hpdmVzW2ldLnBpYyArICdAUmVmZXJlcj0nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6ICfmkq3mlL7ph4/vvJonICsgbGlzdC5hcmNoaXZlc1tpXS5zdGF0LnZpZXcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvdmlkZW9cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFpZDogbGlzdC5hcmNoaXZlc1tpXS5haWRcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfSk7XFxufSBjYXRjaCAoZSkge1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6ICflkIjpm4bkuLrnqbonLFxcbiAgICAgICAgdXJsOiAnaGlrZXI6Ly9lbXB0eScsXFxuICAgICAgICBkZXNjOiAnU29ycnks5rKh5pyJ5pWw5o2u5ZGificsXFxuICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnLFxcbiAgICB9KTtcXG59XFxudHJ5IHtcXG4gICAgdXBWaWRlby5zZXJpZXNfbGlzdC5mb3JFYWNoKGxpc3QgPT4ge1xcbiAgICAgICAgc2VyaWVzX2lkID0gbGlzdC5tZXRhLnNlcmllc19pZDtcXG4gICAgICAgIC8vIOagh+mimC3ot7Povazmm7TlpJpcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICc8Zm9udCBjb2xvcj1cXFwiIzMzY2NjY1xcXCI+JyArIGxpc3QubWV0YS5uYW1lLnN1YnN0cmluZygwLCAzMCkgKyAnPC9mb250PlxcXFx0XFxcXHQ8Zm9udCBjb2xvcj1cXFwicmVkXFxcIj4nICsgbGlzdC5tZXRhLnRvdGFsICsgJzwvZm9udD5cXHTinq4nLFxcbiAgICAgICAgICAgIGltZzogaW1nTGluay7lkIjpm4bmlofku7blpLksXFxuICAgICAgICAgICAgLy8gaW1nOiBsaXN0Lm1ldGEuY292ZXIrJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKCh1cE1pZCwgc2VyaWVzX2lkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKCdoaWtlcjovL2VtcHR5P2Z5cGFnZScpLnJ1bGUoKHVwTWlkLCBzZXJpZXNfaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBkID0gW107XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdSA9ICdodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC9zZXJpZXMvYXJjaGl2ZXM/bWlkPScgKyB1cE1pZCArICcmc2VyaWVzX2lkPScgKyBzZXJpZXNfaWQgKyAnJm9ubHlfbm9ybWFsPXRydWUmc29ydD1kZXNjJnBuPScgKyBNWV9QQUdFICsgJyZwcz0zMCc7XFxuICAgICAgICAgICAgICAgICAgICBWaWRlbyA9IEpTT04ucGFyc2UoZmV0Y2godSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBQQ19VQSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiBcXFwiaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tL1xcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KSkuZGF0YTtcXG4gICAgICAgICAgICAgICAgICAgIG1heFBhZ2UgPSBNYXRoLmNlaWwoVmlkZW8ucGFnZS50b3RhbCAvIFZpZGVvLnBhZ2Uuc2l6ZSk7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoTVlfUEFHRSA8PSBtYXhQYWdlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICflvZPliY0656ysJyArIFZpZGVvLnBhZ2UubnVtICsgJ+mhtVxcXFx0XFxcXHRcXFxcdOWFseaciScgKyBtYXhQYWdlICsgJ+mhtSwnICsgVmlkZW8ucGFnZS50b3RhbCArICfmnaHmlbDmja4nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL2VtcHR5XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2NlbnRlcl8xXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBWaWRlby5hcmNoaXZlcy5mb3JFYWNoKGxpc3QgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QucGljICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn5pKt5pS+6YeP77yaJyArIGxpc3Quc3RhdC52aWV3LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS92aWRlb1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFpZDogbGlzdC5haWRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBzZXRIb21lUmVzdWx0KGQpO1xcbiAgICAgICAgICAgICAgICB9LCB1cE1pZCwgc2VyaWVzX2lkKVxcbiAgICAgICAgICAgIH0sIHVwTWlkLCBzZXJpZXNfaWQpXFxuICAgICAgICB9KTtcXG4gICAgICAgIGlmIChsaXN0LmFyY2hpdmVzID09PSB1bmRlZmluZWQpIHtcXG4gICAgICAgICAgICBsb2cobGlzdC5tZXRhLm5hbWUgKyAn5Li656m6Jyk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGlmIChsaXN0LmFyY2hpdmVzLmxlbmd0aCA8IDIpIHtcXG4gICAgICAgICAgICAgICAgbGlzdC5hcmNoaXZlcy5mb3JFYWNoKGxpc3QgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QucGljICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+aSreaUvumHj++8micgKyBsaXN0LnN0YXQudmlldyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS92aWRlb1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0LmFpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGxpc3QuYXJjaGl2ZXMubGVuZ3RoID09IDApIHtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi5aW95a625LyZ77yM6L+Z5a625LyZ5rKh5pyJ5ZCI6ZuG6KeG6aKR77yBXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLopoHkuI3ljrvngrnlh7vlhajpg6jop4bpopHnnIvnnIt+XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL2VtcHR5XFxcIixcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCAyOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QuYXJjaGl2ZXNbaV0udGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiBsaXN0LmFyY2hpdmVzW2ldLnBpYyArICdAUmVmZXJlcj0nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6ICfmkq3mlL7ph4/vvJonICsgbGlzdC5hcmNoaXZlc1tpXS5zdGF0LnZpZXcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvdmlkZW9cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFpZDogbGlzdC5hcmNoaXZlc1tpXS5haWRcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfSk7XFxufSBjYXRjaCAoZSkge1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6ICfns7vliJfkuLrnqbonLFxcbiAgICAgICAgdXJsOiAnaGlrZXI6Ly9lbXB0eScsXFxuICAgICAgICBkZXNjOiAnU29ycnks5rKh5pyJ5pWw5o2u5ZGificsXFxuICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnLFxcbiAgICB9KTtcXG59XFxuLy8gdXDmipXnqL9cXG5kLnB1c2goe1xcbiAgICB0aXRsZTogJ1RB55qE6KeG6aKRLOeCueWHu+WxleW8gOWFqOmDqCcsXFxuICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxuICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKCh1cE1pZCkgPT4ge1xcbiAgICAgICAgcmV0dXJuICQoKS5ydWxlKCh1cE1pZCkgPT4ge1xcbiAgICAgICAgICAgIHZhciBkID0gW107XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgcXVlcnlKc29uID0ge1xcbiAgICAgICAgICAgICAgICAgICAgbWlkOiB1cE1pZCxcXG4gICAgICAgICAgICAgICAgICAgIHBzOiAzMCxcXG4gICAgICAgICAgICAgICAgICAgIHRpZDogZ2V0TXlWYXIoJ190aWQnLCAnMCcpLFxcbiAgICAgICAgICAgICAgICAgICAgc3BlY2lhbF90eXBlOiAnJyxcXG4gICAgICAgICAgICAgICAgICAgIHBuOiBnZXRNeVZhcignX3BhZ2UnLCAnMScpLFxcbiAgICAgICAgICAgICAgICAgICAga2V5d29yZDogJycsXFxuICAgICAgICAgICAgICAgICAgICBvcmRlcjogJ3B1YmRhdGUnLFxcbiAgICAgICAgICAgICAgICAgICAgcGxhdGZvcm06ICd3ZWInLFxcbiAgICAgICAgICAgICAgICAgICAgLy8gd2ViX2xvY2F0aW9uOiAxNTUwMTAxLFxcbiAgICAgICAgICAgICAgICAgICAgb3JkZXJfYXZvaWRlZDogdHJ1ZVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHBhcm1zID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuZ2V0V2JpRW5jKHF1ZXJ5SnNvbik7XFxuICAgICAgICAgICAgICAgIGRhdGFMaW5rID0gJ2h0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3NwYWNlL3diaS9hcmMvc2VhcmNoPycgKyBwYXJtcztcXG4gICAgICAgICAgICAgICAgdXBWaWRlb0RhdGEgPSBKU09OLnBhcnNlKGZldGNoKGRhdGFMaW5rLCB7XFxuICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBQQ19VQSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3d3dy5iaWxpYmlsaS5jb20vXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogY29va2llPUpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFxcXCIpKS51c2VyTGlzdFswXS5jb29raWVcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSkpLmRhdGE7XFxuICAgICAgICAgICAgICAgIHRsaXN0ID0gdXBWaWRlb0RhdGEubGlzdC50bGlzdDtcXG4gICAgICAgICAgICAgICAgdmxpc3QgPSB1cFZpZGVvRGF0YS5saXN0LnZsaXN0O1xcbiAgICAgICAgICAgICAgICAvLyDliIbnsbvlkozpobXnoIFcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcignX3RpZCcsICcwJykgPT0gMCA/ICfigJjigJjigJnigJk8Zm9udCBjb2xvcj1cXFwicmVkXFxcIj7lhajpg6g8L2ZvbnQ+JyA6ICflhajpg6gnLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIyNub0hpc3RvcnkjJykubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdfdGlkJywgKDAgKyBcXFwiXFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdfcGFnZScsICgxICsgXFxcIlxcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBmb3IgKGl0ZW0gaW4gdGxpc3QpIHtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICh0bGlzdFtpdGVtXS50aWQgKyBcXFwiXFxcIikgPT0gZ2V0TXlWYXIoJ190aWQnLCAnMCcpID8gJ+KAmOKAmOKAmeKAmTxmb250IGNvbG9yPVxcXCJyZWRcXFwiPicgKyAodGxpc3RbaXRlbV0ubmFtZSArIGAoJHt0bGlzdFtpdGVtXS5jb3VudH0pYCkgKyAnPC9mb250PicgOiAodGxpc3RbaXRlbV0ubmFtZSArIGAoJHt0bGlzdFtpdGVtXS5jb3VudH0pYCksXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIyNub0hpc3RvcnkjJykubGF6eVJ1bGUoKHRpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignX3RpZCcsICh0aWQgKyBcXFwiXFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignX3BhZ2UnLCAoMSArIFxcXCJcXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHRsaXN0W2l0ZW1dLnRpZCksXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snLFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgbWF4UGFnZSA9IE1hdGguY2VpbCh1cFZpZGVvRGF0YS5wYWdlLmNvdW50IC8gdXBWaWRlb0RhdGEucGFnZS5wcyk7XFxuICAgICAgICAgICAgICAgIGZvciAobGV0IHBhZ2UgPSAxOyBwYWdlIDw9IG1heFBhZ2U7IHBhZ2UrKykge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogKHBhZ2UgKyBcXFwiXFxcIikgPT0gZ2V0TXlWYXIoJ19wYWdlJywgJzEnKSA/ICfigJjigJjigJnigJk8Zm9udCBjb2xvcj1cXFwicmVkXFxcIj4nICsgKHBhZ2UgKyBcXFwiXFxcIikgKyAnPC9mb250PicgOiAocGFnZSArIFxcXCJcXFwiKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjI25vSGlzdG9yeSMnKS5sYXp5UnVsZSgocGFnZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignX3BhZ2UnLCAocGFnZSArIFxcXCJcXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHBhZ2UpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvLyDlubPpk7rop4bpopFcXG4gICAgICAgICAgICAgICAgdmxpc3QuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHB1YnRpbWUgPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS50aW1lQ29udmVydChpdGVtLmNyZWF0ZWQpO1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGl0ZW0ucGljICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+aSreaUvumHj++8micgKyBpdGVtLnBsYXkgKyAnXFxcXG4nICsgcHVidGltZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS92aWRlb1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBpdGVtLmFpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+mhtemdoui1sOS4ouS6hi4uLicsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6ICdodHRwczovL2kwLmhkc2xiLmNvbS9iZnMvZ2VuZXJhbC9mN2I2NjcwMTFhNDY2MTU3MzJjNzAxZjRiYjFkMDdmNzkzZjhkMWRmLnBuZ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6ICflpKrpopHnuYHkuobvvIHnqI3lkI7lho3or5V+JyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFw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aW5mbyA9IEpTT04ucGFyc2UoZmV0Y2goXFxcImh0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3dlYi1pbnRlcmZhY2UvbmF2XFxcIiwge1xcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgXFxcIkNvb2tpZVxcXCI6IGNvb2tpZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pKS5kYXRhO1xcbiAgICAgICAgaWYgKHVzZXJpbmZvLmlzTG9naW4gPT09IGZhbHNlKSB7XFxuICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgXFxcInVzZXJOYW1lXFxcIjogJ+acqueZu+W9lScsXFxuICAgICAgICAgICAgICAgIFxcXCJ1c2VyTWlkXFxcIjogJycsXFxuICAgICAgICAgICAgICAgIFxcXCJ1c2VyRmFjZVxcXCI6ICcnLFxcbiAgICAgICAgICAgICAgICBcXFwidHlwZVxcXCI6IGZhbHNlXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgY3VycmVudFVzZXIudXNlck5hbWUgPSB1c2VyaW5mby51bmFtZTtcXG4gICAgICAgICAgICBjdXJyZW50VXNlci51c2VyTWlkID0gdXNlcmluZm8ubWlkO1xcbiAgICAgICAgICAgIC8vIDHvvJrkvJrlkZjlvIDpgJrvvJsw77ya5pyq5byA6YCaXFxuICAgICAgICAgICAgY3VycmVudFVzZXIudmlwU3RhdHVzID0gdXNlcmluZm8udmlwU3RhdHVzO1xcbiAgICAgICAgICAgIGN1cnJlbnRVc2VyLmZhY2UgPSB1c2VyaW5mby5mYWNlICsgXFxcIkBSZWZlcmVyPVxcXCI7XFxuICAgICAgICAgICAgc2F2ZUZpbGUoJ2hpa2VyOi8vZmlsZXMvcnVsZXMvY3kvYmlsaS50eHQnLCBKU09OLnN0cmluZ2lmeShiaWxpRGF0YSkpO1xcbiAgICAgICAgICAgIC8vI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5hbWVMaXN0LnB1c2goJzRL6LaF5riFJyk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaXRlbS5pZCA9PSAxMTYpIHtcXG4gICAgICAgICAgICAgICAgICAgIG5hbWVMaXN0LnB1c2goJzEwODBQNjDpq5jluKfnjocnKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtLmlkID09IDExMikge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaCgnMTA4MFAr6auY56CB546HJyk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaXRlbS5pZCA9PSA4MCkge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaCgnMTA4MFDpq5jmuIUnKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtLmlkID09IDc0KSB7XFxuICAgICAgICAgICAgICAgICAgICBuYW1lTGlzdC5wdXNoKCc3MjBQNjDpq5jluKfnjocnKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtLmlkID09IDY0KSB7XFxuICAgICAgICAgICAgICAgICAgICBuYW1lTGlzdC5wdXNoKCc3MjBQ6auY5riFJyk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaXRlbS5pZCA9PSAzMikge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaCgnNDgwUOa4heaZsCcpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZW0uaWQgPT0gMTYpIHtcXG4gICAgICAgICAgICAgICAgICAgIG5hbWVMaXN0LnB1c2goJzM2MFDmtYHnlYUnKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtLmlkID09IDYpIHtcXG4gICAgICAgICAgICAgICAgICAgIG5hbWVMaXN0LnB1c2goJzI0MFDmnoHpgJ8nKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICAgICAgLy8g5L+d5oyB6ZW/5bqm5LiA6Ie0XFxuICAgICAgICB3aGlsZSAoYXVkaW9MaXN0Lmxlbmd0aCA8IHZpZGVvTGlzdC5sZW5ndGgpIHtcXG4gICAgICAgICAgICAvLyDlpI3liLYgYXVkaW9MaXN0IOS4reacgOWQjuS4gOS4quWFg+e0oOW5tui/veWKoOWIsOaVsOe7hOacq+WwvlxcbiAgICAgICAgICAgIGF1ZGlvTGlzdC5wdXNoKGF1ZGlvTGlzdFthdWRpb0xpc3QubGVuZ3RoIC0gMV0pO1xcbiAgICAgICAgICAgIC8vIOWkjeWItiBoZWFkZXJzIOS4reacgOWQjuS4gOS4quWFg+e0oOW5tui/veWKoOWIsOaVsOe7hOacq+WwvlxcbiAgICAgICAgICAgIGhlYWRlcnMucHVzaChoZWFkZXJzW2hlYWRlcnMubGVuZ3RoIC0gMV0pO1xcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICB1cmxzOiB2aWRlb0xpc3QsXFxuICAgICAgICAgICAgYXVkaW9VcmxzOiBhdWRpb0xpc3QsXFxuICAgICAgICAgICAgaGVhZGVyczogaGVhZGVycyxcXG4gICAgICAgICAgICBuYW1lczogbmFtZUxpc3QsXFxuICAgICAgICAgICAgZGFubXU6IGRtXFxuICAgICAgICB9KVxcbiAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICBsb2coXFxcIuato+W4uOino+mHiuWksei0pe+8jOi/m+ihjOacgOWQjuWwneivlTpcXFwiKTtcXG4gICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgdXJsczogW2RhdGEuZHVybFswXS51cmwgKyBcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiXSxcXG4gICAgICAgICAgICBuYW1lczogW2RhdGEucXVhbGl0eSArIFxcXCJcXFwiXSxcXG4gICAgICAgICAgICBkYW5tdTogZG0sXFxuICAgICAgICAgICAgaGVhZGVyczogW3tcXG4gICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiBcXFwiaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tXFxcIixcXG4gICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBQQ19VQVxcbiAgICAgICAgICAgIH1dXFxuICAgICAgICB9KVxcbiAgICB9XFxufVxcbi8vIOeojeWQjuWcqOeci+KAlOKAlOaAu+aTjeS9nOWIpOaWrVxcbiQuZXhwb3J0cy5qdWRnZVRvdmlldyA9IGZ1bmN0aW9uIChhaWQpIHtcXG4gICAgc2VsZWN0aW9uID0gWyfmt7vliqAnLCAn56e76ZmkJ107XFxuICAgIHJldHVybiAkKHNlbGVjdGlvbiwgMSkuc2VsZWN0KChhaWQpID0+IHtcXG4gICAgICAgIGlmIChpbnB1dCA9PSAn5re75YqgJykge1xcbiAgICAgICAgICAgIHJlcyA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmFkZFRvdmlldyhhaWQpO1xcbiAgICAgICAgICAgIGlmIChyZXMgPT0gMCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5re75Yqg5oiQ5YqfXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzID09IC0xMDEpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+i0puWPt+acqueZu+W9lVxcXCJcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHJlcyA9PSAtMTExKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly9jc3Jm5qCh6aqM5aSx6LSlXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzID09IC00MDApIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+ivt+axgumUmeivr1xcXCJcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHJlcyA9PSA5MDAwMSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5YiX6KGo5bey5ruhXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzID09IDkwMDAzKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/nqL/ku7blt7Lnu4/ooqvliKDpmaRcXFwiXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+acquefpemUmeivr1xcXCJcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHJlcyA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmRlbFRvdmlldyhhaWQpO1xcbiAgICAgICAgICAgIGlmIChyZXMgPT0gMCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v56e76Zmk5oiQ5YqfXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzID09IC0xMDEpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+i0puWPt+acqueZu+W9lVxcXCJcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHJlcyA9PSAtMTExKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly9jc3Jm5qCh6aqM5aSx6LSlXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzID09IC00MDApIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+ivt+axgumUmeivr1xcXCJcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5pyq55+l6ZSZ6K+vXFxcIlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfSwgYWlkKVxcbn1cXG4vLyDmk43kvZznlKjmiLflhbPns7tcXG4kLmV4cG9ydHMuY2hhbmdlVXNlclJlbGF0aW9uID0gZnVuY3Rpb24gKG1pZCwgcmVfc3JjKSB7XFxuICAgIHNlbGVjdGlvbiA9IFsn5YWz5rOoJywgJ+WPluWFsycsICfmgoTmgoTlhbPms6gnLCAn5Y+W5raI5oKE5oKE5YWz5rOoJywgJ+aLiem7kScsICflj5bmtojmi4npu5EnLCAn6Lii5Ye657KJ5LidJywgJ+enu+WKqOWIhue7hCddO1xcbiAgICByZXR1cm4gJChzZWxlY3Rpb24sIDIpLnNlbGVjdCgobWlkLCByZV9zcmMpID0+IHtcXG4gICAgICAgIGlmIChpbnB1dCA9PSAn56e75Yqo5YiG57uEJykge1xcbiAgICAgICAgICAgIGJlZm9yZVRhZ2lkcyA9IFtdO1xcbiAgICAgICAgICAgIGdyb3VwcyA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmdldFVzZXJHcm91cChtaWQpO1xcbiAgICAgICAgICAgIGlmIChKU09OLnN0cmluZ2lmeShncm91cHMpID09ICd7fScpIHtcXG4gICAgICAgICAgICAgICAgYmVmb3JlVGFnaWRzLnB1c2goMCk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgcHJvcCBpbiBncm91cHMpIHtcXG4gICAgICAgICAgICAgICAgICAgIGJlZm9yZVRhZ2lkcy5wdXNoKHBhcnNlSW50KHByb3ApKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAvLyDojrflj5bmiJHnmoTliIbnu4RcXG4gICAgICAgICAgICBmb2N1c0dyb3VwTGlzdCA9IFtdO1xcbiAgICAgICAgICAgICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmdldE15QXR0ZW50aW9uR3JvdXBMaXN0KCkuZm9yRWFjaChsaXN0ID0+IHtcXG4gICAgICAgICAgICAgICAgZm9jdXNHcm91cExpc3QucHVzaChsaXN0Lm5hbWUgKyAnICcgKyBsaXN0LnRhZ2lkKTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICByZXR1cm4gJChmb2N1c0dyb3VwTGlzdCwgMSkuc2VsZWN0KChiZWZvcmVUYWdpZHMsIG1pZCkgPT4ge1xcbiAgICAgICAgICAgICAgICBhZnRlclRhZ2lkcyA9IFtdO1xcbiAgICAgICAgICAgICAgICBhZnRlclRhZ2lkcy5wdXNoKHBhcnNlSW50KGlucHV0LnNwbGl0KCcgJylbMV0pKTtcXG4gICAgICAgICAgICAgICAgZmlkcyA9IFtdO1xcbiAgICAgICAgICAgICAgICBmaWRzLnB1c2goTnVtYmVyKG1pZCkpO1xcbiAgICAgICAgICAgICAgICByZXMgPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5tb3ZlVXNlcnMoYmVmb3JlVGFnaWRzLCBhZnRlclRhZ2lkcywgZmlkcyk7XFxuICAgICAgICAgICAgICAgIGlmIChyZXMgPT0gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+enu+WKqOeUqOaIt+WIsFxcXCIgKyBpbnB1dC5zcGxpdCgnICcpWzBdICsgXFxcIuWIhue7hOaIkOWKn1xcXCJcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMgPT0gLTEwMSkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+i0puWPt+acqueZu+W9lVxcXCJcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMgPT0gLTExMSkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL2NzcmbmoKHpqozlpLHotKVcXFwiXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzID09IC00MDApIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/or7fmsYLplJnor69cXFwiXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzID09IDIyMTA0KSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5peg5p2D6ZmQXFxcIlxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHJlcyA9PSAyMjEwNSkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+acquWFs+azqFxcXCJcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/mnKrnn6XplJnor69cXFwiXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LCBiZWZvcmVUYWdpZHMsIG1pZCk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGlmIChpbnB1dCA9PSAn5YWz5rOoJykge1xcbiAgICAgICAgICAgICAgICB2YXIgYWN0ID0gMTtcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09ICflj5blhbMnKSB7XFxuICAgICAgICAgICAgICAgIHZhciBhY3QgPSAyO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gJ+aChOaChOWFs+azqCcpIHtcXG4gICAgICAgICAgICAgICAgdmFyIGFjdCA9IDM7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn5Y+W5raI5oKE5oKE5YWz5rOoJykge1xcbiAgICAgICAgICAgICAgICB2YXIgYWN0ID0gNDtcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09ICfmi4npu5EnKSB7XFxuICAgICAgICAgICAgICAgIHZhciBhY3QgPSA1O1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gJ+WPlua2iOaLiem7kScpIHtcXG4gICAgICAgICAgICAgICAgdmFyIGFjdCA9IDY7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn6Lii5Ye657KJ5LidJykge1xcbiAgICAgICAgICAgICAgICB2YXIgYWN0ID0gNztcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmVzID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuYWRkQXR0ZW50aW9uKG1pZCwgYWN0LCByZV9zcmMpO1xcbiAgICAgICAgICAgIHJlbGF0aW9uID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikudXNlck1hcHBpbmcobWlkKTtcXG4gICAgICAgICAgICB1cGRhdGVJdGVtKCdyZWxhdGlvbicsIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHJlbGF0aW9uLFxcbiAgICAgICAgICAgICAgICBpbWc6IHJlbGF0aW9uID09ICfmnKrlhbPms6gnID8gc3RvcmFnZTAuZ2V0TXlWYXIoJ+WbvuaghycpLua3u+WKoOWFs+azqCA6IHN0b3JhZ2UwLmdldE15VmFyKCflm77moIcnKS7lt7LlhbPms6hcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBpZiAocmVzID09IDApIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL1xcXCIgKyBpbnB1dCArIFxcXCLmiJDlip9cXFwiXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMgPT0gLTEwMSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6LSm5Y+35pyq55m75b2VXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzID09IC0xMTEpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL2NzcmbmoKHpqozlpLHotKVcXFwiXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMgPT0gLTQwMCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYX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WVzdChidWlsZFVybChcXFwiaHR0cDovL2FwaS5iaWxpYmlsaS5jb20veC9wbGF5ZXIvcGxheXVybFxcXCIsIHtcXG4gICAgICAgICAgICBcXFwiYXZpZFxcXCI6IGF2aWQsXFxuICAgICAgICAgICAgXFxcImNpZFxcXCI6IGNpZCxcXG4gICAgICAgICAgICBcXFwicW5cXFwiOiBxbixcXG4gICAgICAgICAgICBcXFwiZm52ZXJcXFwiOiAwLFxcbiAgICAgICAgICAgIC8vIFxcXCJmbnZhbFxcXCI6IDQwNDgsXFxuICAgICAgICAgICAgXFxcImZudmFsXFxcIjogMTYsXFxuICAgICAgICAgICAgXFxcImZvdXJrXFxcIjogMVxcbiAgICAgICAgfSksIHtcXG4gICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgIENvb2tpZTogQ29va2llXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSlcXG4gICAgICAgIHJlcyA9IEpTT04ucGFyc2UodSk7XFxuICAgICAgICBpZiAocmVzLmRhdGEuZGFzaCkge1xcbiAgICAgICAgICAgIHJldHVybiByZXMuZGF0YS5kYXNoO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBsb2coXFxcIuayoeacieaJvuWIsGRhc2jlrZfmrrVcXFwiKTtcXG4gICAgICAgICAgICBpZiAocmVzLmRhdGEuc3VwcG9ydF9mb3JtYXRzKSB7XFxuICAgICAgICAgICAgICAgIGlmICh1LmluY2x1ZGVzKFxcXCLor5XnnItcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgbXNnID0gXFxcIuaCqOWImuaJjeingueci+eahOinhumikeaYr+ivleeci+inhumike+8jOingueci+WujOaVtOeJh+auteivt+WJjeW+gOWumOe9kei0reS5sO+8gVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICBsb2cobXNnKTtcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpcm0oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5rip6aao5o+Q56S6JywgY29udGVudDogbXNnLCBjb25maXJtOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSwgY2FuY2VsOiAkLnRvU3RyaW5nKCgpID0+IHt9KVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gcmVzLmRhdGE7XFxuICAgICAgICB9XFxuICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgLy8g5LiA5Lq65LmL5LiL56ys5LiA5a2j55qE56ysMe+8jDLpm4bigJTigJTlj6/ku6Xojrflj5blpKfkvJrlkZjliafpm4bnmoTliY0zbWluXFxuICAgICAgICAgICAgbG9nKCflsJ3or5Xmm7TmlLnor7fmsYLmjqXlj6MuLi46JyArIGUpO1xcbiAgICAgICAgICAgIGxldCB1ID0gcmVxdWVzdChidWlsZFVybChcXFwiaHR0cHM6Ly9hcGkuYmlsaWJpbGkuY29tL3BnYy9wbGF5ZXIvd2ViL3BsYXl1cmxcXFwiLCB7XFxuICAgICAgICAgICAgICAgIFxcXCJhdmlkXFxcIjogYXZpZCxcXG4gICAgICAgICAgICAgICAgXFxcImNpZFxcXCI6IGNpZCxcXG4gICAgICAgICAgICAgICAgXFxcInFuXFxcIjogcW4sXFxuICAgICAgICAgICAgICAgIFxcXCJmbnZlclxcXCI6IDAsXFxuICAgICAgICAgICAgICAgIC8vIFxcXCJmbnZhbFxcXCI6IDQwNDgsXFxuICAgICAgICAgICAgICAgIFxcXCJmbnZhbFxcXCI6IDE2LFxcbiAgICAgICAgICAgICAgICBcXFwiZm91cmtcXFwiOiAxXFxuICAgICAgICAgICAgfSksIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgQ29va2llOiBDb29raWVcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAg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AgICAgICAgfVxcbiAgICAgICAgbGF0ZW5ld3MgPSBKU09OLnBhcnNlKGZldGNoKHUsIHtcXG4gICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvYmlsaS50eHRcXFwiKSkudXNlckxpc3RbMF0uY29va2llXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSkpLmRhdGE7XFxuICAgICAgICBuZXh0SW5mby5vZmZzZXQgPSBsYXRlbmV3cy5vZmZzZXQ7XFxuICAgIH1cXG4gICAgc3RvcmFnZTAucHV0TXlWYXIoSlNPTi5zdHJpbmdpZnkoTVlfUEFHRSArIDEpLCBuZXh0SW5mbyk7XFxuICAgIHJldHVybiBsYXRlbmV3cztcXG59XFxuXFxuLy8g4oCU4oCU54m55Yir55qE6KGM5Li644CB5bel5YW35Ye95pWw4oCU4oCUXFxuLy8g5bGV56S65Yqo5oCB5pWw5o2uKOi/lOWbnuWHveaVsOaWueazleeahOWPr+aJp+ihjOWtl+espuS4silcXG4kLmV4cG9ydHMuc2hvd0R5bmFtaWNEYXRhID0gZnVuY3Rpb24gKCkge1xcbiAgICByZXR1cm4gJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICBpbWdMaW5rID0gc3RvcmFnZTAuZ2V0TXlWYXIoJ+WbvuaghycpO1xcbiAgICAgICAgbGF0ZW5ld3MuaXRlbXMuZm9yRWFjaChsaXN0ID0+IHtcXG4gICAgICAgICAgICBpZiAobGlzdC50eXBlID09ICdEWU5BTUlDX1RZUEVfQVYnKSB7XFxuICAgICAgICAgICAgICAgIC8vIOaKleeov+inhumike+8iOW9k+WJjeWPkeW4g++8ieKImlxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiAnPHNtYWxsPjxzbWFsbD48Zm9udCBjb2xvcj1cXFwiZ3JleVxcXCI+JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLnB1Yl90aW1lICsgJy0nICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IucHViX2FjdGlvbiArICc8L2ZvbnQ+PC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLmZhY2UgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS91cEhvbWUnLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBtaWQ6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm1pZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IubmFtZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBmYWNlOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5mYWNlXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgLy8g5LiN5LiA5a6a5pyJ5paH5a2X5ZWKXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogKGxpc3QubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5kZXNjID09PSBudWxsID8gJzxmb250IGNvbG9yPVxcXCJncmV5XFxcIj51cOWkquaHkuS6hu+8jOi/nuaWh+ahiOmDveS4jeaDs+mFjS4uLjwvZm9udD4nIDogbGlzdC5tb2R1bGVzLm1vZHVsZV9keW5hbWljLmRlc2MudGV4dCkucmVwbGFjZSgvXFxcXG4vZywgJzxicj4nKSArICc8YnI+PGEgaHJlZj1cXFwiaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlXFxcIj7mn6XnnIvor4Torro8L2E+JyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZScsXFxuICAgICAgICAgICAgICAgICAgICAvLyDov5nkuKrkuI3og73nlKhsb25nX3RleHRcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAncmljaF90ZXh0JyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGxpc3QuYmFzaWMuY29tbWVudF9pZF9zdHIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogMVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5tb2R1bGVzLm1vZHVsZV9keW5hbWljLm1ham9yLmFyY2hpdmUudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5tYWpvci5hcmNoaXZlLmNvdmVyICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IGxpc3QubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5tYWpvci5hcmNoaXZlLmRlc2MsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGFpZDogbGlzdC5tb2R1bGVzLm1vZHVsZV9keW5hbWljLm1ham9yLmFyY2hpdmUuYWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiAnPHNtYWxsPjxzbWFsbD48Zm9udCBjb2xvcj1cXFwiZ3JleVxcXCI+55WZ6KiAOicgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX3N0YXQuY29tbWVudC5jb3VudCArICdcXFxcdFxcXFx05YiG5LqrOicgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX3N0YXQuZm9yd2FyZC5jb3VudCArICdcXFxcdFxcXFx05Zac5qyiOicgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX3N0YXQubGlrZS5jb3VudCArICc8L2ZvbnQ+PC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGltZ0xpbmsu5Yqo5oCB6Laz6L+5LFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9lbXB0eScsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcidcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lX2JsYW5rJ1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGxpc3QudHlwZSA9PSAnRFlOQU1JQ19UWVBFX0ZPUldBUkQnKSB7XFxuICAgICAgICAgICAgICAgIC8vIOW8leeUqO+8jOWkmuWHuuS6hm9yaWfmjIflkJHkuIDkuKoo6L+H5Y67KeW3suWPkeW4g+eahOinhumikSzlh4bnoa7nmoTor7TmmK/lvJXnlKjkuYvliY3nmoTluJblrZDkuI3kuIDlrprmmK/op4bpopHiiJpcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5mYWNlICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiAnPHNtYWxsPjxzbWFsbD48Zm9udCBjb2xvcj1cXFwiZ3JleVxcXCI+JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLnB1Yl90aW1lICsgJzwvZm9udD48L3NtYWxsPjwvc21hbGw+JyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS91cEhvbWUnLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBtaWQ6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm1pZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IubmFtZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBmYWNlOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5mYWNlXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IChsaXN0Lm1vZHVsZXMubW9kdWxlX2R5bmFtaWMuZGVzYyA9PT0gbnVsbCA/ICc8Zm9udCBjb2xvcj1cXFwiZ3JleVxcXCI+dXDlpKrmh5LkuobvvIzov57mlofmoYjpg73kuI3mg7PphY0uLi48L2ZvbnQ+JyA6IGxpc3QubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5kZXNjLnRleHQpLnJlcGxhY2UoL1xcXFxuL2csICc8YnI+JykgKyAnPGJyPjxhIGhyZWY9XFxcImhpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZVxcXCI+5p+l55yL6K+E6K66PC9hPicsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvQ29tbWVudHM/cD1meXBhZ2UnLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdyaWNoX3RleHQnLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogbGlzdC5iYXNpYy5jb21tZW50X2lkX3N0cixcXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyDkuZ/mmK/nuq/mloflrZfvvIzlm6DkuLrlj6rmmK/mloflrZcr5byV55So5pep5bey5oqV56i/55qE6KeG6aKRXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogMTdcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIC8vIOW8leeUqOeahOWGheWuueKAlOKAlOaIquaWre+8iOagueaNruS4jeWQjOeahOW8leeUqOexu+Wei+i/m+ihjOWkhOeQhu+8iVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICc8c21hbGw+PHNtYWxsPuS4i+mdouWGheWuueadpeiHquW8leeUqOeahOW4luWtkCx1cOaYrzo8YSBocmVmPVxcXCJoaWtlcjovL3BhZ2UvdXBIb21lXFxcIj4nICsgbGlzdC5vcmlnLm1vZHVsZXMubW9kdWxlX2F1dGhvci5uYW1lICsgJzwvYT48L3NtYWxsPjwvc21hbGw+JyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwicmljaF90ZXh0XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbWlkOiBsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm1pZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5vcmlnLm1vZHVsZXMubW9kdWxlX2F1dGhvci5uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZhY2U6IGxpc3Qub3JpZy5tb2R1bGVzLm1vZHVsZV9hdXRob3IuZmFjZVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImxpbmVcXFwiXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBpZiAobGlzdC5vcmlnLnR5cGUgPT0gJ0RZTkFNSUNfVFlQRV9BVicpIHtcXG4gICAgICAgICAgICAgICAgICAgIC8vIOW8leeUqOinhumikeivtOivtFxcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5vcmlnLm1vZHVsZXMubW9kdWxlX2R5bmFtaWMubWFqb3IuYXJjaGl2ZS50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3Qub3JpZy5tb2R1bGVzLm1vZHVsZV9keW5hbWljLm1ham9yLmFyY2hpdmUuY292ZXIgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS92aWRlb1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogbGlzdC5vcmlnLm1vZHVsZXMubW9kdWxlX2R5bmFtaWMubWFqb3IuYXJjaGl2ZS5kZXNjLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFpZDogbGlzdC5vcmlnLm1vZHVsZXMubW9kdWxlX2R5bmFtaWMubWFqb3IuYXJjaGl2ZS5haWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGxpc3Qub3JpZy50eXBlID09ICdEWU5BTUlDX1RZUEVfV09SRCcpIHtcXG4gICAgICAgICAgICAgICAgICAgIC8vIOW8leeUqOaWh+Wtl+ivtOivtFxcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogKGxpc3Qub3JpZy5tb2R1bGVzLm1vZHVsZV9keW5hbWljLmRlc2MudGV4dCA9PT0gbnVsbCA/ICc8Zm9udCBjb2xvcj1cXFwiZ3JleVxcXCI+dXDlpKrmh5LkuobvvIzov57mlofmoYjpg73kuI3mg7PphY0uLi48L2ZvbnQ+JyA6IGxpc3Qub3JpZy5tb2R1bGVzLm1vZHVsZV9keW5hbWljLmRlc2MudGV4dCkucmVwbGFjZSgvXFxcXG4vZywgJzxicj4nKSArICc8YnI+PGEgaHJlZj1cXFwiaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlXFxcIj7mn6XnnIvor4Torro8L2E+JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvQ29tbWVudHM/cD1meXBhZ2UnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAncmljaF90ZXh0JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyDor4TorrppZOadpea6kOmDveS4jeS4gOagt1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogbGlzdC5vcmlnLmlkX3N0cixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8g57qv5paH5a2XXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IDE3XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobGlzdC5vcmlnLnR5cGUgPT0gJ0RZTkFNSUNfVFlQRV9EUkFXJykge1xcbiAgICAgICAgICAgICAgICAgICAgLy8g5byV55So5Zu+54mH6K+06K+0XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAobGlzdC5vcmlnLm1vZHVsZXMubW9kdWxlX2R5bmFtaWMuZGVzYy50ZXh0ID09PSBudWxsID8gJzxmb250IGNvbG9yPVxcXCJncmV5XFxcIj51cOWkquaHkuS6hu+8jOi/nuaWh+ahiOmDveS4jeaDs+mFjS4uLjwvZm9udD4nIDogbGlzdC5vcmlnLm1vZHVsZXMubW9kdWxlX2R5bmFtaWMuZGVzYy50ZXh0KS5yZXBsYWNlKC9cXFxcbi9nLCAnPGJyPicpICsgJzxicj48YSBocmVmPVxcXCJoaWtlcjovL3BhZ2UvQ29tbWVudHM/cD1meXBhZ2VcXFwiPuafpeeci+ivhOiuujwvYT4nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAncmljaF90ZXh0JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvQ29tbWVudHM/cD1meXBhZ2VcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5tYWpvci5kcmF3LmlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAxMVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgbGlzdC5vcmlnLm1vZHVsZXMubW9kdWxlX2R5bmFtaWMubWFqb3IuZHJhdy5pdGVtcy5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGltZzogaXRlbS5zcmMgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdwaWNfM19zcXVhcmUnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGl0ZW0uc3JjICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGxvZygn5Y+v6IO96L+Y5pyJ5pyq6YCC6YWN55qE6K+06K+057G75Z6LJyk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy8g5YiG5YmyXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiAnPHNtYWxsPjxzbWFsbD48Zm9udCBjb2xvcj1cXFwiZ3JleVxcXCI+55WZ6KiAOicgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX3N0YXQuY29tbWVudC5jb3VudCArICdcXFxcdFxcXFx05YiG5LqrOicgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX3N0YXQuZm9yd2FyZC5jb3VudCArICdcXFxcdFxcXFx05Zac5qyiOicgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX3N0YXQubGlrZS5jb3VudCArICc8L2ZvbnQ+PC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGltZ0xpbmsu5Yqo5oCB6Laz6L+5LFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9lbXB0eScsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcidcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lX2JsYW5rJ1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGxpc3QudHlwZSA9PSAnRFlOQU1JQ19UWVBFX1dPUkQnKSB7XFxuICAgICAgICAgICAgICAgIC8vIOe6r+aWh+Wtl1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiAnPHNtYWxsPjxzbWFsbD48Zm9udCBjb2xvcj1cXFwiZ3JleVxcXCI+JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLnB1Yl90aW1lICsgJzwvZm9udD48L3NtYWxsPjwvc21hbGw+JyxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IuZmFjZSArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL3VwSG9tZScsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcicsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG1pZDogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IubWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZhY2U6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLmZhY2VcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogKGxpc3QubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5kZXNjID09PSBudWxsID8gJzxmb250IGNvbG9yPVxcXCJncmV5XFxcIj51cOWkquaHkuS6hu+8jOi/nuaWh+ahiOmDveS4jeaDs+mFjS4uLjwvZm9udD4nIDogbGlzdC5tb2R1bGVzLm1vZHVsZV9keW5hbWljLmRlc2MudGV4dCkucmVwbGFjZSgvXFxcXG4vZywgJzxicj4nKSArICc8YnI+PGEgaHJlZj1cXFwiaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlXFxcIj7mn6XnnIvor4Torro8L2E+JyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZScsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3JpY2hfdGV4dCcsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBsaXN0LmJhc2ljLmNvbW1lbnRfaWRfc3RyLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIOe6r+aWh+Wtl1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IDE3XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6ICc8c21hbGw+PHNtYWxsPjxmb250IGNvbG9yPVxcXCJncmV5XFxcIj7nlZnoqIA6JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfc3RhdC5jb21tZW50LmNvdW50ICsgJ1xcXFx0XFxcXHTliIbkuqs6JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfc3RhdC5mb3J3YXJkLmNvdW50ICsgJ1xcXFx0XFxcXHTllpzmrKI6JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfc3RhdC5saWtlLmNvdW50ICsgJzwvZm9udD48L3NtYWxsPjwvc21hbGw+JyxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogaW1nTGluay7liqjmgIHotrPov7ksXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYXZhdGFyJ1xcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmVfYmxhbmsnXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobGlzdC50eXBlID09ICdEWU5BTUlDX1RZUEVfRFJBVycpIHtcXG4gICAgICAgICAgICAgICAgLy8g5Zu+54mH6K+06K+0XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IubmFtZSxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6ICc8c21hbGw+PHNtYWxsPjxmb250IGNvbG9yPVxcXCJncmV5XFxcIj4nICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IucHViX3RpbWUgKyAnPC9mb250Pjwvc21hbGw+PC9zbWFsbD4nLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5mYWNlICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvdXBIb21lJyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYXZhdGFyJyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbWlkOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5taWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZmFjZTogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IuZmFjZVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAobGlzdC5tb2R1bGVzLm1vZHVsZV9keW5hbWljLmRlc2MgPT09IG51bGwgPyAnPGZvbnQgY29sb3I9XFxcImdyZXlcXFwiPnVw5aSq5oeS5LqG77yM6L+e5paH5qGI6YO95LiN5oOz6YWNLi4uPC9mb250PicgOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2R5bmFtaWMuZGVzYy50ZXh0KS5yZXBsYWNlKC9cXFxcbi9nLCAnPGJyPicpICsgJzxicj48YSBocmVmPVxcXCJoaWtlcjovL3BhZ2UvQ29tbWVudHM/cD1meXBhZ2VcXFwiPuafpeeci+ivhOiuujwvYT4nLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlJyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAncmljaF90ZXh0JyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGxpc3QuYmFzaWMuY29tbWVudF9pZF9zdHIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8g55u457C/77yI5Zu+54mH5Yqo5oCB77yJXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogMTFcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGxpc3QubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5tYWpvci5kcmF3Lml0ZW1zLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogaXRlbS5zcmMgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3BpY18zX3NxdWFyZScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBpdGVtLnNyYyArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogJzxzbWFsbD48c21hbGw+PGZvbnQgY29sb3I9XFxcImdyZXlcXFwiPueVmeiogDonICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9zdGF0LmNvbW1lbnQuY291bnQgKyAnXFxcXHRcXFxcdOWIhuS6qzonICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9zdGF0LmZvcndhcmQuY291bnQgKyAnXFxcXHRcXFxcdOWWnOasojonICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9zdGF0Lmxpa2UuY291bnQgKyAnPC9mb250Pjwvc21hbGw+PC9zbWFsbD4nLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBpbWdMaW5rLuWKqOaAgei2s+i/uSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vZW1wdHknLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInXFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZV9ibGFuaydcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgIH0pXFxufVxcbi8vIOaXtumXtOaXpeacn+i9rOaNouWHveaVsFxcbiQuZXhwb3J0cy50aW1lQ29udmVydCA9IGZ1bmN0aW9uICh0aW1lKSB7XFxuICAgIGZ1bmN0aW9uIGZvcm1hdERhdGUoZSwgdCkge1xcbiAgICAgICAgZSA9IG5ldyBEYXRlKGUgKiAxMDAwKTsgLy/ml7bpl7TmiLPkuLoxMOS9jemcgCoxMDAw77yM5pe26Ze05oiz5Li6MTPkvY3nmoTor53kuI3pnIDkuZgxMDAwXFxuICAgICAgICByZXR1cm4gdC5yZXBsYWNlKC95eXl5fFlZWVkvLCBlLmdldEZ1bGxZZWFyKCkpXFxuICAgICAgICAgICAgLnJlcGxhY2UoL3l5fFlZLywgcihlLmdldEZ1bGxZZWFyKCkgJSAxMDAsIDIpKVxcbiAgICAgICAgICAgIC5yZXBsYWNlKC9tbXxNTS8sIHIoZS5nZXRNb250aCgpICsgMSwgMikpXFxuICAgICAgICAgICAgLnJlcGxhY2UoL218TS9nLCBlLmdldE1vbnRoKCkgKyAxKVxcbiAgICAgICAgICAgIC5yZXBsYWNlKC9kZHxERC8sIHIoZS5nZXREYXRlKCksIDIpKVxcbiAgICAgICAgICAgIC5yZXBsYWNlKC9kfEQvZywgZS5nZXREYXRlKCkpXFxuICAgICAgICAgICAgLnJlcGxhY2UoL2hofEhILywgcihlLmdldEhvdXJzKCksIDIpKV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9PiB7XFxuICAgICAgICAgICAgdGVtcCArPSBvcmlnW25dXFxuICAgICAgICB9KTtcXG4gICAgICAgIHJldHVybiB0ZW1wLnNsaWNlKDAsIDMyKTtcXG4gICAgfVxcblxcbiAgICAvLyDkuLror7fmsYLlj4LmlbDov5vooYwgd2JpIOetvuWQjVxcbiAgICBmdW5jdGlvbiBlbmNXYmkocGFyYW1zLCBpbWdfa2V5LCBzdWJfa2V5KSB7XFxuICAgICAgICBjb25zdCBtaXhpbl9rZXkgPSBnZXRNaXhpbktleShpbWdfa2V5ICsgc3ViX2tleSksXFxuICAgICAgICAgICAgY3Vycl90aW1lID0gTWF0aC5yb3VuZChEYXRlLm5vdygpIC8gMTAwMCksXFxuICAgICAgICAgICAgY2hyX2ZpbHRlciA9IC9bISdcXFxcKFxcXFwpKl0vZ1xcbiAgICAgICAgbGV0IHF1ZXJ5ID0gW107XFxuICAgICAgICBwYXJhbXMgPSBPYmplY3QuYXNzaWduKHBhcmFtcywgeyB3dHM6IGN1cnJfdGltZSB9KTsgICAgLy8g5re75YqgIHd0cyDlrZfmrrVcXG4gICAgICAgIC8vIOaMieeFpyBrZXkg6YeN5o6S5Y+C5pWwXFxuICAgICAgICBPYmplY3Qua2V5cyhwYXJhbXMpLnNvcnQoKS5mb3JFYWNoKChrZXkpID0+IHtcXG4gICAgICAgICAgICBxdWVyeS5wdXNoKFxcbiAgICAgICAgICAgICAgICBlbmNvZGVVUklDb21wb25lbnQoa2V5KSArXFxuICAgICAgICAgICAgICAgICc9JyArXFxuICAgICAgICAgICAgICAgIC8vIOi/h+a7pCB2YWx1ZSDkuK3nmoQgXFxcIiEnKCkqXFxcIiDlrZfnrKZcXG4gICAgICAgICAgICAgICAgZW5jb2RlVVJJQ29tcG9uZW50KCgnJyArIHBhcmFtc1trZXldKS5yZXBsYWNlKGNocl9maWx0ZXIsICcnKSlcXG4gICAgICAgICAgICApXFxuICAgICAgICB9KVxcbiAgICAgICAgcXVlcnkgPSBxdWVyeS5qb2luK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uICAgICAgICAgICAgICAgIGlkOidhaWQtJythaWQrJ3xjaWQtJytjaWQsXFxuICAgICAgICAgICAgICAgIGxvbmdDbGljazogW3tcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnZG3nm5LlrZAnLCBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2Uvc2V0dGluZyNub0hpc3RvcnkjP3J1bGU9ZG3nm5LlrZAnO1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICflvLnluZXmjqfliLYnLCBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGdldEl0ZW0oJ2lzT3ZlcnJpZGVTYXZlJywgJ2ZhbHNlJykgPT0gJ3RydWUnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ2lzT3ZlcnJpZGVTYXZlJywgJ2ZhbHNlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lvLnluZXlsIbkuI3lj5dkbeebkuWtkOWPguaVsOaOp+WItic7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgnaXNPdmVycmlkZVNhdmUnLCAndHJ1ZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5by55bmV5bCG5Y+X5YiwZG3nm5LlrZDlj4LmlbDmjqfliLYnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH1dXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAnPGZvbnQgY29sb3I9XFxcImJsdWVcXFwiPicgKyBwLm93bmVyLm5hbWUgKyAnPC9mb250PicsXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3VwSG9tZVxcXCIsXFxuICAgICAgICAgICAgaW1nOiBwLm93bmVyLmZhY2UgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgbWlkOiBwLm93bmVyLm1pZCxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHAub3duZXIubmFtZSxcXG4gICAgICAgICAgICAgICAgZmFjZTogcC5vd25lci5mYWNlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICAvLyDomb3nhLblj6rmnIkxUCzkvYblj6/og73lpITkuo7lkIjpm4bop4bpopHkuK3vvIzlvoDlvoDlnKh1cOS4iuS8oOS4reWxnuS6juS4gOWll+W9seeJh1xcbiAgICAgICAgaWYgKHAudWdjX3NlYXNvbikge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn8J+TgeaJgOWxnuWQiOmbhu+8mjxhIGhyZWY9XFxcImhpa2VyOi8vcGFnZS9jb2xsZWN0aW9uVmllZG9cXFwiPicrcC51Z2Nfc2Vhc29uLnRpdGxlKyc8L2E+JyxcXG4gICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL2NvbGxlY3Rpb25WaWVkbyNub0hpc3RvcnkjXFxcIixcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdyaWNoX3RleHQnLFxcbiAgICAgICAgICAgICAgICBleHRyYTogeyBcXFwidGV4dFNpemVcXFwiOiAxMiwgYWlkOiBhaWQgfVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogcC5zdGF0Lmxpa2UsXFxuICAgICAgICAgICAgaW1nOiBoYXNMaWtlID09IDEgPyBpbWdMaW5rLuW3sueCuei1niA6IGltZ0xpbmsu5pyq54K56LWeLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChhaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmxpa2VMb2dpYyhhaWQpXFxuICAgICAgICAgICAgfSwgYWlkKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfNFxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6ICdzZXRMaWtlJ1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogcC5zdGF0LmZhdm9yaXRlLFxcbiAgICAgICAgICAgIGltZzogaGFzRmF2b3VyID8gaW1nTGluay7lt7LmlLbol48gOiBpbWdMaW5rLuacquaUtuiXjyxcXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjI25vSGlzdG9yeSMnKS5sYXp5UnVsZSgoYWlkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHVwTWlkID0gSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIikpLnVzZXJNaWQ7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5mYXZvdXJMb2dpYyhhaWQsIHVwTWlkKVxcbiAgICAgICAgICAgIH0sIGFpZCksXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpY29uX3NtYWxsXzRcXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOiAnc2V0RmF2b3VyJ1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogJ+eojeWQjuWGjeeciycsXFxuICAgICAgICAgICAgaW1nOiBpbWdMaW5rLueojeWQjuWGjeeciyxcXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjI25vSGlzdG9yeSMnKS5sYXp5UnVsZSgoYWlkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5qdWRnZVRvdmlldyhhaWQpXFxuICAgICAgICAgICAgfSwgYWlkKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfNFxcXCIsXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6ICfmn6XnnIvor4TorronLFxcbiAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZScsXFxuICAgICAgICAgICAgaW1nOiBpbWdMaW5rLuafpeeci+ivhOiuuixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfNFxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgXFxcImlkXFxcIjogYWlkLFxcbiAgICAgICAgICAgICAgICBcXFwidHlwZVxcXCI6IDFcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lX2JsYW5rJ1xcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiBwLmRlc2MsXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJsb25nX3RleHRcXFwiLFxcbiAgICAgICAgfSk7XFxuICAgIH0gZWxzZSB7XFxuICAgICAgICAvLyDlrZjlnKjlpJrpm4bliIZQXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBwLnRpdGxlLFxcbiAgICAgICAgICAgIGltZzogcC5waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICBkZXNjOifmkq3mlL7ph486JytwLnN0YXQudmlldysnXFxcXHRcXFxcdFxcXFx05by55bmV5pWwOicrcC5zdGF0LmRhbm1ha3UrJ1xcXFxu5Y+R5biD5pel5pyfOicrJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikudGltZUNvbnZlcnQocC5jdGltZSksXFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIyNub0hpc3RvcnkjJykubGF6eVJ1bGUoKHApID0+IHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQoJ2hpa2VyOi8vZW1wdHk/ZnlwYWdlJykucnVsZSgocCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZCA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogcC5kZXNjLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibG9uZ190ZXh0XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgICAgICAgICAgICAgIH0sIHApXFxuICAgICAgICAgICAgfSwgcCksXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJwaWNfMVxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICdkbeebkuWtkCcsIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9zZXR0aW5nI25vSGlzdG9yeSM/cnVsZT1kbeebkuWtkCc7XFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+W8ueW5leaOp+WIticsIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZ2V0SXRlbSgnaXNPdmVycmlkZVNhdmUnLCAnZmFsc2UnKSA9PSAndHJ1ZScpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgnaXNPdmVycmlkZVNhdmUnLCAnZmFsc2UnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W8ueW5leWwhuS4jeWPl2Rt55uS5a2Q5Y+C5pWw5o6n5Yi2JztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCdpc092ZXJyaWRlU2F2ZScsICd0cnVlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lvLnluZXlsIblj5fliLBkbeebkuWtkOWPguaVsOaOp+WItic7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfV1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6ICc8Zm9udCBjb2xvcj1cXFwiYmx1ZVxcXCI+JyArIHAub3duZXIubmFtZSArICc8L2ZvbnQ+JyxcXG4gICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvdXBIb21lXFxcIixcXG4gICAgICAgICAgICBpbWc6IHAub3duZXIuZmFjZSArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBtaWQ6IHAub3duZXIubWlkLFxcbiAgICAgICAgICAgICAgICB0aXRsZTogcC5vd25lci5uYW1lLFxcbiAgICAgICAgICAgICAgICBmYWNlOiBwLm93bmVyLmZhY2VcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiBwLnN0YXQubGlrZSxcXG4gICAgICAgICAgICBpbWc6IGhhc0xpa2UgPT0gMSA/IGltZ0xpbmsu5bey54K56LWeIDogaW1nTGluay7mnKrngrnotZ4sXFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIyNub0hpc3RvcnkjJykubGF6eVJ1bGUoKGFpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikubGlrZUxvZ2ljKGFpZClcXG4gICAgICAgICAgICB9LCBhaWQpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaWNvbl9zbWFsbF80XFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDogJ3NldExpa2UnXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiBwLnN0YXQuZmF2b3JpdGUsXFxuICAgICAgICAgICAgaW1nOiBoYXNGYXZvdXIgPyBpbWdMaW5rLuW3suaUtuiXjyA6IGltZ0xpbmsu5pyq5pS26JePLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChhaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgdXBNaWQgPSBKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvYmlsaS50eHRcXFwiKSkudXNlck1pZDtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmZhdm91ckxvZ2ljKGFpZCwgdXBNaWQpXFxuICAgICAgICAgICAgfSwgYWlkKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfNFxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6ICdzZXRGYXZvdXInXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiAn56iN5ZCO5YaN55yLJyxcXG4gICAgICAgICAgICBpbWc6IGltZ0xpbmsu56iN5ZCO5YaN55yLLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChhaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmp1ZGdlVG92aWV3KGFpZClcXG4gICAgICAgICAgICB9LCBhaWQpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaWNvbl9zbWFsbF80XFxcIixcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogJ+afpeeci+ivhOiuuicsXFxuICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlJyxcXG4gICAgICAgICAgICBpbWc6IGltZ0xpbmsu5p+l55yL6K+E6K66LFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaWNvbl9zbWFsbF80XFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBcXFwiaWRcXFwiOiBhaWQsXFxuICAgICAgICAgICAgICAgIFxcXCJ0eXBlXFxcIjogMVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZV9ibGFuaydcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogJ+mAiembhuWIl+ihqCcsXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCIsXFxuICAgICAgICAgICAgZGVzYzonPHNtYWxsPjxzbWFsbD7lhbEnICsgcC52aWRlb3MgKyAn5p2h6KeG6aKRPC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICAgICAgaW1nOiBpbWdMaW5rLuWIl+ihqCxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICAgICAgfSk7XFxuICAgICAgICBwLnBhZ2VzLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgY2lkID0gaXRlbS5jaWQ7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0ucGFydCxcXG4gICAgICAgICAgICAgICAgZGVzYzpmb3JtYXRTZWNvbmRzKGl0ZW0uZHVyYXRpb24pLFxcbiAgICAgICAgICAgICAgICAvLyBpbWc6aW1nTGluay7liIZQ5YiX6KGo6aG5LFxcbiAgICAgICAgICAgICAgICBpbWc6aXRlbS5maXJzdF9mcmFtZSsnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGFpZCwgY2lkLCBxbikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmJpbGlMYXp5KGFpZCwgY2lkLCBxbikucm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DveaWh+WtlyvmlbDlrZdcXG4gICAgZC51bnNoaWZ0KHtcXG4gICAgICAgIHRpdGxlOiBcXFwi5Y+R5p2h6K+E6K665ZCnXFxcIixcXG4gICAgICAgIGNvbF90eXBlOiBcXFwiaW5wdXRcXFwiLFxcbiAgICAgICAgdXJsOiAkLnRvU3RyaW5nKChpZCx0eXBlKSA9PiB7XFxuICAgICAgICAgICAgbGV0IGNzcmYgPSBKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvYmlsaS50eHRcXFwiKSkuY29va2llLm1hdGNoKC9iaWxpX2pjdD0oLio/KTsvKVsxXTtcXG4gICAgICAgICAgICBwb3N0KFxcXCJodHRwOi8vYXBpLmJpbGliaWxpLmNvbS94L3YyL3JlcGx5L2FkZFxcXCIsIHtcXG4gICAgICAgICAgICAgICAgYm9keToge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcInR5cGVcXFwiOiB0eXBlLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIm9pZFxcXCI6IGlkLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImNzcmZcXFwiOiBjc3JmLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIm1lc3NhZ2VcXFwiOiBpbnB1dFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIikpLmNvb2tpZVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICB9LCBpZCx0eXBlKVxcbiAgICB9KVxcbn1cXG5sZXQgZGF0YSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmdldENv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AgICAgICAgICBoZWFkZXJzOiB7XFxyXFxuICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWVcXHJcXG4gICAgICAgICAgICB9XFxyXFxuICAgICAgICB9KSkuZGF0YTtcXHJcXG4gICAgICAgIGdyb3VwcyA9IGNvbGxlY3Rpb25zWzBdLm1lZGlhTGlzdFJlc3BvbnNlLmxpc3Q7XFxyXFxuICAgICAgICBwdXRNeVZhcigndGVtcElkJywgSlNPTi5zdHJpbmdpZnkoZ3JvdXBzWzBdLmlkKSk7XFxyXFxuICAgICAgICBncm91cHMuZm9yRWFjaChsaXN0ID0+IHtcXHJcXG4gICAgICAgICAgICBkLnB1c2goe1xcclxcbiAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5pZCA9PSBnZXRJdGVtKCfmlLbol4/lpLknLCBKU09OLnN0cmluZ2lmeShncm91cHNbMF0uaWQpKSA/IFxcXCLigJzigJzigJ3igJ08Zm9udCBjb2xvcj0ncmVkJz5cXFwiICsgbGlzdC50aXRsZSArIFxcXCI8L2ZvbnQ+XFxcIiA6IGxpc3QudGl0bGUsXFxyXFxuICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChsaXN0KSA9PiB7XFxyXFxuICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCfmlLbol4/lpLknLCBKU09OLnN0cmluZ2lmeShsaXN0LmlkKSk7XFxyXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXHJcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/liIfmjaLmlLbol4/lpLnkuLo6XFxcIiArIGxpc3QudGl0bGU7XFxyXFxuICAgICAgICAgICAgICAgIH0sIGxpc3QpLFxcclxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcclxcbiAgICAgICAgICAgIH0pO1xcclxcbiAgICAgICA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XHJcXG4gICAgICAgICAgICAgICAgICAgIGFpZDogbGlzdC5pZCxcXHJcXG4gICAgICAgICAgICAgICAgICAgIG1pZDogbGlzdC51cHBlci5taWRcXHJcXG4gICAgICAgICAgICAgICAgfVxcclxcbiAgICAgICAgICAgIH0pO1xcclxcbiAgICAgICAgfSk7XFxyXFxuICAgIH0gY2F0Y2ggKGUpIHtcXHJcXG4gICAgICAgIHNob3dMb2FkaW5nKCflhYTlvJ/vvIzkvaDnoa7orqTkvaDmnInmlLbol4/lkJfvvIzlv6vljrvmlLbol4/kuIDkuKrop4bpopF+Jyk7XFxyXFxuICAgIH1cXHJcXG59IGVsc2Uge1xcclxcbiAgICBsYXRlclZpZXdzID0gSlNPTi5wYXJzZShmZXRjaChcXFwiaHR0cHM6Ly9hcGkuYmlsaWJpbGkuY29tL3gvdjIvaGlzdG9yeS90b3ZpZXcvd2ViP2pzb25wPWpzb25wXFxcIiwge1xcclxcbiAgICAgICAgaGVhZGVyczoge1xcclxcbiAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWVcXHJcXG4gICAgICAgIH1cXHJcXG4gICAgfSkpLmRhdGE7XFxyXFxuICAgIGNvdW50ID0gbGF0ZXJWaWV3cy5jb3VudDtcXHJcXG4gICAgZC5wdXNoKHtcXHJcXG4gICAgICAgIHRpdGxlOiBcXFwi5YWx5pyJXFxcIiArIGNvdW50ICsgXFxcIuadoeW+heeci+inhumikeiusOW9lVxcXCIsXFxyXFxuICAgICAgICB1cmw6IFxcXCJoaWtlcjovL2VtcHR5XFxcIixcXHJcXG4gICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCJcXHJcXG4gICAgfSk7XFxyXFxuICAgIGxhdGVyVmlld3MubGlzdC5mb3JFYWNoKGxpc3QgPT4ge1xcclxcbiAgICAgICAgZC5wdXNoKHtcXHJcXG4gICAgICAgICAgICB0aXRsZTogbGlzdC50aXRsZSxcXHJcXG4gICAgICAgICAgICBpbWc6IGxpc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IGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogdmlkZW9EYXRhLnRpdGxlLFxcbiAgICAgICAgZGVzYzp2aWRlb0RhdGEuaW50cm8sXFxuICAgICAgICBpbWc6IHZpZGVvRGF0YS5jb3ZlciArICdAUmVmZXJlcj0nLFxcbiAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIyNub0hpc3RvcnkjJykubGF6eVJ1bGUoKGludHJvKSA9PiB7XFxuICAgICAgICAgICAgcmV0dXJuICQoJ2hpa2VyOi8vZW1wdHk/ZnlwYWdlJykucnVsZSgoaW50cm8pID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IGQgPSBbXTtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpbnRybyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibG9uZ190ZXh0XFxcIixcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICAgICAgICAgIH0sIGludHJvKVxcbiAgICAgICAgfSwgdmlkZW9EYXRhLmludHJvKSxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwicGljXzFcXFwiLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAnZG3nm5LlrZAnLCBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9zZXR0aW5nI25vSGlzdG9yeSM/cnVsZT1kbeebkuWtkCc7XFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+W8ueW5leaOp+WIticsIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChnZXRJdGVtKCdpc092ZXJyaWRlU2F2ZScsICdmYWxzZScpID09ICd0cnVlJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ2lzT3ZlcnJpZGVTYXZlJywgJ2ZhbHNlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W8ueW5leWwhuS4jeWPl2Rt55uS5a2Q5Y+C5pWw5o6n5Yi2JztcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgnaXNPdmVycmlkZVNhdmUnLCAndHJ1ZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lvLnluZXlsIblj5fliLBkbeebkuWtkOWPguaVsOaOp+WItic7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfV1cXG4gICAgICAgIH1cXG4gICAgfSwge1xcbiAgICAgICAgdGl0bGU6ICc8Zm9udCBjb2xvcj1cXFwiYmx1ZVxcXCI+JyArIHAub3duZXIubmFtZSArICc8L2ZvbnQ+JyxcXG4gICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS91cEhvbWVcXFwiLFxcbiAgICAgICAgaW1nOiBwLm93bmVyLmZhY2UgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIixcXG4gICAgICAgIGRlc2M6ICc8c21hbGw+PHNtYWxsPuWFseaciScgKyB2aWRlb0RhdGEuZXBfY291bnQgKyAn5p2h6KeG6aKR5pWw5o2uPC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIG1pZDogcC5vd25lci5taWQsXFxuICAgICAgICAgICAgdGl0bGU6IHAub3duZXIubmFtZSxcXG4gICAgICAgICAgICBmYWNlOiBwLm93bmVyLmZhY2VcXG4gICAgICAgIH1cXG4gICAgfSwge1xcbiAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICB9KTtcXG4gICAgdmFyIGluZGV4ID0gMTtcXG4gICAgc3RvcmFnZTAucHV0VmFyKCd2aWRlb1NlY3Rpb25zJywgdmlkZW9EYXRhLnNlY3Rpb25zKTtcXG4gICAgdmlkZW9EYXRhLnNlY3Rpb25zLmZvckVhY2goZWwgPT4ge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ/Cfk4EnICsgZWwudGl0bGUsXFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIyNub0hpc3RvcnkjJykubGF6eVJ1bGUoKGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgIGlmIChnZXRNeVZhcignaXNGb2xkXycraW5kZXgsICd5JykgPT0gJ3knKSB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignaXNGb2xkXycraW5kZXgsICduJyk7XFxuICAgICAgICAgICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoJ3NlY3Rpb24nICsgaW5kZXggKyAnLXBhcnQnKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lmipjlj6AnO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ2lzRm9sZF8nK2luZGV4LCAneScpO1xcbiAgICAgICAgICAgICAgICAgICAgdmlkZW9TZWN0aW9ucyA9IHN0b3JhZ2UwLmdldFZhcigndmlkZW9TZWN0aW9ucycpO1xcbiAgICAgICAgICAgICAgICAgICAgc2VjdGlvblBhcnRMaXN0ID0gW107XFxuICAgICAgICAgICAgICAgICAgICB2aWRlb1NlY3Rpb25zW2luZGV4IC0gMV0uZXBpc29kZXMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBhaWQgPSBpdGVtLmFpZDtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjaWQgPSBpdGVtLmNpZDtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0ID0gaXRlbS5hcmMuc3RhdDtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWN0aW9uUGFydExpc3QucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn4oCc4oCc4oCd4oCdXFxcXHRcXFxcdFxcXFx0PHNtYWxsPjwvZm9udD7ilrbvuI4nICsgaXRlbS50aXRsZSArICdcXFxcblxcXFx0XFxcXHRcXFxcdFxcXFx0XFxcXHQ8L2ZvbnQ+PC9zbWFsbD48c21hbGw+PHNtYWxsPjxmb250IGNvbG9yPWdyYXk+5pKt5pS+6YeP77yaJyArIHN0YXQudmlldyArICdcXFxcdFxcXFx0XFxcXHTlvLnluZXvvJonICsgc3RhdC5kYW5tYWt1ICsgJ1xcXFx0XFxcXHRcXFxcdOWWnOasou+8micgKyBzdGF0Lmxpa2UgKyAnPC9mb250Pjwvc21hbGw+PC9zbWFsbD4nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoYWlkLCBjaWQsIHFuKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuYmlsaUxhenkoYWlkLCBjaWQsIHFuKS5yZXBsYWNlKC87L2csIFxcXCLvvJvvvJtcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgYWlkICsgXFxcIlxcXCIsIGNpZCArIFxcXCJcXFwiLCAnMTE2JyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8xXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHsgbGluZVZpc2libGU6IGZhbHNlLCBjbHM6ICdzZWN0aW9uJyArIGluZGV4ICsgJy1wYXJ0JyxpZDonYWlkLScrYWlkKyd8Y2lkLScrY2lkIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBhZGRJdGVtQWZ0ZXIoJ1NlY3Rpb24nICsgaW5kZXgsIHNlY3Rpb25QYXJ0TGlzdCk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5bGV5byAJztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sIGluZGV4KSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMScsXFxuICAgICAgICAgICAgZXh0cmE6IHsgaWQ6ICdTZWN0aW9uJyArIGluZGV4IH1cXG4gICAgICAgIH0pO1xcbiAgICAgICAgZWwuZXBpc29kZXMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICBhaWQgPSBpdGVtLmFpZDtcXG4gICAgICAgICAgICBjaWQgPSBpdGVtLmNpZDtcXG4gICAgICAgICAgICBzdGF0ID0gaXRlbS5hcmMuc3RhdDtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnVxcXFx0XFxcXHRcXFxcdDxzbWFsbD48L2ZvbnQ+4pa277iOJyArIGl0ZW0udGl0bGUgKyAnXFxcXG5cXFxcdFxcXFx0XFxcXHRcXFxcdFxcXFx0PC9mb250Pjwvc21hbGw+PHNtYWxsPjxzbWFsbD48Zm9udCBjb2xvcj1ncmF5PuaSreaUvumHj++8micgKyBzdGF0LnZpZXcgKyAnXFxcXHRcXFxcdFxcXFx05by55bmV77yaJyArIHN0YXQuZGFubWFrdSArICdcXFxcdFxcXFx0XFxcXHTllpzmrKLvvJonICsgc3RhdC5saWtlICsgJzwvZm9udD48L3NtYWxsPjwvc21hbGw+JyxcXG4gICAgICAgICAgICAgICAgdXJsO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b/lh7rplJks5YiH5o2i5omY566h57q/6LevJyk7XFxuICAgICAgICByb3V0ZSA9IFtcXG4gICAgICAgICAgICAnaHR0cHM6Ly9naXRjb2RlLm5ldC9xcV8yMzg0NzgxOS9oaWtlci8tL3Jhdy9tYXN0ZXIvdHViaWFvLmpzb24nLFxcbiAgICAgICAgICAgICdodHRwczovL2dpdGVhLmNvbS9jeS9oaWtlci9yYXcvY29tbWl0L2JlMjE2MGM2YTAxZGI4NzNkOWY5NjgxYmE3ZTg2ZWViZmExMThkODYvdHViaWFvLmpzb24nLFxcbiAgICAgICAgICAgICdodHRwczovL3Jhdy5jb2RlaHViLmNuL3AvaGlrZXIvZC90dWJpYW8vZ2l0L3Jhdy9tYXN0ZXIvdHViaWFvLmpzb24/dG9rZW49R0dkbEl1VkdxWTNiM0x5ZElvd3Jrc2JVQkNmTXl4MmZGMzFXVVplbzRtJyxcXG4gICAgICAgICAgICAnaHR0cHM6Ly9naXRlZS5jb20vbXh4bC1jeS9oaWtlci9yYXcvbWFzdGVyL3R1Ymlhby5qc29uJ1xcbiAgICAgICAgXTtcXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcm91dGUubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBldmFsKCd0dWJpYW8gPScgKyByZXF1ZXN0KHJvdXRlW2ldKSk7XFxuICAgICAgICAgICAgICAgIGlmICh0dWJpYW9bXFxcIuS6lOWkp1xcXCJdICYmIHR1Ymlhb1tcXFwi5ZOU5ZOpXFxcIl0pIHtcXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKCfnur/ot6/vvJonICsgdHViaWFvW2ldICsgJ+iiq+WimeS6hi4uLicpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAg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lp4vljJblpLHotKU6JyArIGUpO1xcbiAgICAgICAgaGlkZUxvYWRpbmcoKTtcXG4gICAgfVxcblxcbn07XFxuXCJ9XSIsImljb24iOiJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L3R1Ymlhby9iaWxpYmlsaS5zdmciLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment