xiaomianao666

小程序:AI聚集

Feb 17th, 2023
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@AI聚集@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiQUnogZrpm4YiLCJhdXRob3IiOiIiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IyNmeWNsYXNzIyNmeXBhZ2UiLCJ2ZXJzaW9uIjo1NCwiY29sX3R5cGUiOiJtb3ZpZV8zIiwiY2xhc3NfbmFtZSI6IummlumhtSbosYzosYYm6Iy25p2v54uQJuaQnOeJhybpnZLpuqYm55S15b2x54uXJuiMtuadr+iZjiIsInR5cGUiOiJ0b29sIiwiY2xhc3NfdXJsIjoiaG9tZSZodHRwczovL3d3dy53YW5kb3UucHJvLyZodHRwczovL2N1cGZveC5hcHAvJmh0dHA6Ly9zb3VwaWFuLmRlLyZodHRwczovL3d3dy5xaW1haXR2LmNvbS8maHR0cHM6Ly93d3cuZGlhbnlpbmdnb3UuY29tL3lpbmdrdS8maHR0cHM6Ly93d3cuNzI1OTk4LmNvbS95aW5na3UiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbnZhciBteXVybCA9IE1ZX1VSTC5zcGxpdChcIiMjXCIpWzFdO1xuXG5sZXQgYW5jaG9ySWQgPSBteXVybDtcbmxldCBqcyA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS94NWFpXCIpKE1ZX1JVTEUudGl0bGUsIGFuY2hvcklkKTtcblxuZnVuY3Rpb24gbG9hZFVybChteXVybCwgbXlydWxlLCBtKSB7XG4gICAgc2V0UmVzdWx0KFt7XG4gICAgICAgIGNvbF90eXBlOiBcIng1X3dlYnZpZXdfc2luZ2xlXCIsXG4gICAgICAgIHVybDogbXl1cmwsXG4gICAgICAgIGRlc2M6IFwiZmxvYXQmJnRvcFwiLCAgICAgICAgXG4gICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICBmbG9hdFZpZGVvOiB0cnVlLFxuICAgICAgICAgICAgY2FuQmFjazogdHJ1ZSxcbiAgICAgICAgICAgIHVybEludGVyY2VwdG9yOiAkLnRvU3RyaW5nKChNWV9SVUxFLG1vYmFuKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKGlucHV0LnN0YXJ0c1dpdGgoJ2h0dHBzOi8vd3d3LmFsaXl1bmRyaXZlLmNvbS9zLycpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh1cmwpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5vcGVuKEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBydWxlOiAn5LqR55uY5rGH5b2xJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvZGV0YWlsP3J1bGU95LqR55uY5rGH5b2xJnVybD0nICsgdXJsICsgJz8/ZnlwYWdlJ1xuICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICB9LCBpbnB1dClcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0LnN0YXJ0c1dpdGgoJ2h0dHBzOi8vd3d3LnFpbWFpdHYuY29tL2luZGV4LnBocD9zJykpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGh0bWwgPSBmZXRjaChpbnB1dClcbiAgICAgICAgICAgICAgICAgICAgbGV0IGFyciA9IHBkZmEoaHRtbCwgXCJib2R5JiZpZnJhbWVcIik7XG4gICAgICAgICAgICAgICAgICAgIGlmIChhcnIubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVybCA9IHBkZmgoYXJyWzBdLCAnaWZyYW1lJiZzcmMnKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQudG9TdHJpbmcoKHVybCwgTVlfUlVMRSxtb2JhbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB1PSdoaWtlcjovL2VtcHR5IyM/dT0nICsgdXJsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHU9bW9iYW49PScwJz91OnUrJyNpbW1lcnNpdmVUaGVtZSMnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5vcGVuKEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcnVsZTogTVlfUlVMRS50aXRsZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICflvbHniYfor6bmg4UnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncm91cDogTVlfUlVMRS5ncm91cCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJlUnVsZTogTVlfUlVMRS5wcmVSdWxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWdlczogTVlfUlVMRS5wYWdlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB1LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaW5kUnVsZTogTVlfUlVMRS5kZXRhaWxfZmluZF9ydWxlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSwgdXJsLCBNWV9SVUxFLG1vYmFuKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICghaW5wdXQuc3RhcnRzV2l0aChcImh0dHBzOi8vY3VwZm94LmFwcC9cIikgJiYgIWlucHV0LnN0YXJ0c1dpdGgoXCJodHRwczovLzUxc291anUuY29tL1wiKSAmJlxuICAgICAgICAgICAgICAgICAgICAhaW5wdXQuc3RhcnRzV2l0aChcImh0dHBzOi8vd3d3LmRpYW55aW5nZ291LmNvbS9cIikgJiYgIWlucHV0LnN0YXJ0c1dpdGgoXCJodHRwczovL3d3dy53YW5kb3UucHJvL1wiKSAmJiAhaW5wdXQuc3RhcnRzV2l0aChcImh0dHA6Ly9zb3VwaWFuLnh5ei9cIikgJiYgIWlucHV0LnN0YXJ0c1dpdGgoXCJodHRwczovL3d3dy5xaW1haXR2LmNvbS9cIikgJiYgIVxuICAgICAgICAgICAgICAgICAgICBpbnB1dC5zdGFydHNXaXRoKFwiaHR0cHM6Ly93d3cuNzI1OTk4LmNvbS9cIikgJiYgIWlucHV0LmluY2x1ZGVzKFwic2VhcmNoXCIpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh1cmwsIE1ZX1JVTEUsbW9iYW4pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB1PSdoaWtlcjovL2VtcHR5IyM/dT0nICsgdXJsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHU9bW9iYW49PScwJz91OnUrJyNpbW1lcnNpdmVUaGVtZSMnO1xuICAgICAgICAgICAgICAgICAgICAgICAgZmJhLm9wZW4oSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ1bGU6IE1ZX1JVTEUudGl0bGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICflvbHniYfor6bmg4UnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdyb3VwOiBNWV9SVUxFLmdyb3VwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZVJ1bGU6IE1ZX1JVTEUucHJlUnVsZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWdlczogTVlfUlVMRS5wYWdlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAg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tleXMucGFnZVRpdGxlID8ga2V5cy5wYWdlVGl0bGUgOiAnJztcXG59IGVsc2Uge1xcbiAgICB1cmwgPSBnZXRNeVZhcignd2VidXJsJyk7XFxufVxcbmxvZygn5LqM57qn6aG16Z2iOicgKyB1cmwpO1xcblxcbmlmIChnZXRJdGVtKCdhaScsICcwJykgPT0gJzEnKSB7XFxuICAgIHZhciBsYXp5ID0gJCgnJykubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICB2YXIgaHRtbCA9IEpTT04ucGFyc2UocmVxdWVzdChpbnB1dCkubWF0Y2goL3IgcGxheWVyXy4qPz0oLio/KTwvKVsxXSlcXG4gICAgICAgICAgICB2YXIgdXJsID0gaHRtbC51cmxcXG4gICAgICAgICAgICBpZiAoaHRtbC5lbmNyeXB0ID09ICcxJykge1xcbiAgICAgICAgICAgICAgICB1cmwgPSB1bmVzY2FwZSh1cmwpO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaHRtbC5lbmNyeXB0ID09ICcyJykge1xcbiAgICAgICAgICAgICAgICB1cmwgPSB1bmVzY2FwZShiYXNlNjREZWNvZGUodXJsKSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmICgvbTN1OHxtcDQvLnRlc3QodXJsKSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdXJsXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd2aWRlbzovLycgKyBpbnB1dFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICByZXR1cm4gJ3ZpZGVvOi8vJyArIGlucHV0XFxuICAgICAgICB9XFxuICAgIH0pXFxuXFxuICAgIHRyeSB7XFxuICAgICAgICBNWV9VUkwgPSAnaGlrZXI6Ly9lbXB0eSMjJyArIHVybFxcbiAgICAgICAgcmVxdWlyZShjb25maWcu6Ieq5Yqo5Yy56YWNKTtcXG4gICAgICAgIOiHquWKqOS6jOe6pyhsYXp5KTtcXG4gICAgICAgIHB1dE15VmFyKCdibScsICcxJylcXG4gICAgfSBjYXRjaCB7XFxuICAgICAgICBwdXRNeVZhcignYm0nLCAnMCcpXFxuICAgIH1cXG59XFxuXFxuXFxubG9nKCfmqKHmnb86JyArIGdldE15VmFyKCdibScsICcwJykpXFxuXFxuaWYgKGdldE15VmFyKCdibScsICcwJykgPT0gJzAnKSB7XFxuXFxuICAgIHZhciBkID0gW107XFxuICAgIE1ZX1VSTCA9IHVybFxcblxcbiAgICBmdW5jdGlvbiBnZXRUaXRsZShodG1sLCBzKSB7XFxuICAgICAgICB2YXIgdGl0bGUgPSAnJztcXG4gICAgICAgIHZhciB0aXRsZXMgPSBwZGZhKGh0bWwsIHMpO1xcbiAgICAgICAgLy9sb2codGl0bGVzKTtcXG4gICAgICAgIGlmICh0aXRsZXMubGVuZ3RoID09IDApIHtcXG4gICAgICAgICAgICByZXR1cm4gdGl0bGVcXG4gICAgICAgIH1cXG4gICAgICAgIGZvciAobGV0IHggb2YgdGl0bGVzKSB7XFxuICAgICAgICAgICAgaWYgKHguaW5jbHVkZXMoJzxmb250JykpIHtcXG4gICAgICAgICAgICAgICAgdGl0bGUgPSBwZGZoKHgsICdoMS0tZm9udCYmVGV4dCcpO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoeC5pbmNsdWRlcygnPHNwYW4nKSkge1xcbiAgICAgICAgICAgICAgICB0aXRsZSA9IHBkZmgoeCwgJ2gxLS1zcGFuJiZUZXh0Jyk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdGl0bGUgPSBwZGZoKHgsICdUZXh0Jyk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmICh0aXRsZSAhPSAnJykge1xcbiAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBjb250aW51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iAgICAgICAgICAgIHRpdGxlOiBwZGZoKGl0LCBcXFwiYSYmdGl0bGVcXFwiKSxcXG4gICAgICAgICAgICBocmVmOiBwZChpdCwgXFxcImEmJmhyZWZcXFwiLCB1cmwpXFxuICAgICAgICB9XFxuICAgIH0pO1xcbiAgICAvL2xvZyhhcnIpO1xcbiAgICBsZXQgZGVidWcgPSBmYWxzZTtcXG5cXG4gICAgZnVuY3Rpb24gY2xlYXJUZXh0KGl0KSB7XFxuICAgICAgICByZXR1cm4gaXQucmVwbGFjZSgv56ysfOmbhnznq6AvZywgXFxcIlxcXCIpO1xcbiAgICB9XFxuXFxuICAgIGZ1bmN0aW9uIGlzTW92aWUoaXQpIHtcXG4gICAgICAgIGlmIChpdCA9PSBudWxsIHx8IGl0LnRleHQgPT0gbnVsbCkge1xcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmIChub2ZpbGUoaXQuaHJlZikpIHtcXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxuICAgICAgICB9XFxuICAgICAgICBsZXQgdGl0ID0gaXQudGl0bGUgfHwgXFxcIlxcXCI7XFxuICAgICAgICBpdCA9IGl0LnRleHQgfHwgXFxcIlxcXCI7XFxuICAgICAgICBpZiAoaXQgPT0gXFxcIlxcXCIgfHwgaXQubGVuZ3RoID4gOCkge1xcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcXG4gICAgICAgIH1cXG4gICAgICAgIC8v5o6S6ZmkXFxuICAgICAgICBsZXQgcmVnID0gL1xcXFwufOmrmOa4heebtOaSrXzlhpnnnJ/mjqjojZB85b2x6ZmifOW9seinhnzok53lhYnnlLXlvbF86auY5riF55S15b2xfOesrOS4gOWto3znrKzkuozlraN856ys5LiJ5a2jfOesrOWbm+Wto3znrKzkupTlraMvO1xcbiAgICAgICAgaWYgKHRpdCAhPSBcXFwiXFxcIiAmJiAhdGl0LmluY2x1ZGVzKGl0KSB8fCByZWcudGVzdChpdCk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cXCJcXFwiKSB7XFxuICAgICAgICAgICAgcmV0dXJuIC0xO1xcbiAgICAgICAgfVxcbiAgICAgICAgaXQgPSBjbGVhclRleHQoaXQpO1xcbiAgICAgICAgbGV0IHJlZyA9IC9eWzAtOV0qJC87XFxuICAgICAgICBpZiAoIXJlZy50ZXN0KGl0KSkge1xcbiAgICAgICAgICAgIHJldHVybiAtMTtcXG4gICAgICAgIH1cXG4gICAgICAgIGl0ID0gcGFyc2VJbnQoaXQpO1xcbiAgICAgICAgaWYgKGlzTmFOKGl0KSkge1xcbiAgICAgICAgICAgIHJldHVybiAtMTtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmIChpdCA+IDE5MDAgJiYgaXQgPCAyMTAwKSB7XFxuICAgICAgICAgICAgcmV0dXJuIC0xO1xcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIGl0O1xcbiAgICB9XFxuXFxuICAgIGZ1bmN0aW9uIGlzQ2hhcHRlcjAoaXQsIGJyb3RoZXIpIHtcXG4gICAgICAgIC8qaWYgKGRlYnVnKSB7XFxuICAgICAgICAgICAgbG9nKHtcXG4gICAgICAgICAgICAgICAgaXQ6IGl0LFxcbiAgICAgICAgICAgICAgICBicm90aGVyOiBicm90aGVyXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9Ki9cXG4gICAgICAgIGl0ID0gZ2V0Q2hhcHRlck51bShpdCk7XFxuICAgICAgICAvL2lmIChkZWJ1ZykgbG9nKGl0KTtcXG4gICAgICAgIGlmIChpdCA8IDApIHtcXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxuICAgICAgICB9XFxuICAgICAgICBicm90aGVyID0gZ2V0Q2hhcHRlck51bShicm90aGVyKTtcXG4gICAgICAgIC8vaWYgKGRlYnVnKSBsb2coYnJvdGhlcik7XFxuICAgICAgICBpZiAoYnJvdGhlciA8IDApIHtcXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gaXQ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ZW5jb2RlVVJJQ29tcG9uZW50KEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwibmFtZVxcXCI6IGRvY3VtZW50LnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJ1cmxcXFwiOiBwbGF5XFxuICAgICAgICAgICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgIH0sIHRmcHVzaCk7XFxuXFxuICAgIGZ1bmN0aW9uIF9fd2ViKG1vZGUpIHtcXG4gICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh0ZnB1c2gpID0+IHtcXG4gICAgICAgICAgICBsZXQgdXJscyA9IF9nZXRVcmxzKCk7XFxuICAgICAgICAgICAgbGV0IHJlZyA9IC9cXFxcLmh0bWx8XFxcXC5jc3N8XFxcXC5qcy87XFxuICAgICAgICAgICAgZm9yIChsZXQgayBpbiB1cmxzKSB7XFxuICAgICAgICAgICAgICAgIGlmICghcmVnLnRlc3QodXJsc1trXSkgJiYgdXJsc1trXS5tYXRjaCgvXFxcXC5tcDR8XFxcXC5tM3U4LykpIHtcXG4gICAgICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAubG9nKHVybHNba10pO1xcbiAgICAgICAgICAgICAgICAgICAgLy9yZXR1cm4gZnlfYnJpZGdlX2FwcC5nZXRIZWFkZXJVcmwodXJsc1trXS5yZXBsYWNlKC8uKj91cmw9LywgXFxcIlxcXCIpKSArIFxcXCIjaWdub3JlSW1nPXRydWUjXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIGlmICh0ZnB1c2ggPT0gJzAnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZ5X2JyaWRnZV9hcHAuZ2V0SGVhZGVyVXJsKHVybHNba10ucmVwbGFjZSgvLio/dXJsPS8sIFxcXCJcXFwiKSkgKyBcXFwiI2lnbm9yZUltZz10cnVlI1xcXCI7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5ID0gZnlfYnJpZGdlX2FwcC5nZXRIZWFkZXJVcmwodXJsc1trXS5yZXBsYWNlKC8uKj91cmw9LywgXFxcIlxcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9wdXNoP3B1c2h1cmw9JyArIGVuY29kZVVSSUNvbXBvbmVudChKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJuYW1lXFxcIjogZG9jdW1lbnQudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJ1cmxcXFwiOiBwbGF5XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwgbW9kZSk7XFxuICAgIH1cXG5cXG4gICAgJC5leHRlbmQoe1xcbiAgICAgICAgbHdlYjogX193ZWJcXG4gICAgfSlcXG5cXG4gICAgbGV0IHdlYiA9IGdldEl0ZW0oJ3dlYicsICcwJyk7XFxuICAgIHZhciBwdXNodHlwZSA9IFsn5YiX6KGoJywgJ+WNlembhiddXFxuICAgIHZhciBwYXJzZXR5cGUgPSBbJ1dlYuWXheaOojowJywgJ+inhumikeWXheaOojoxJywgJ2Rt55uS5a2QOjInXVxcbiAgICBsb2coJ+aOqOmAgeexu+WeizonICsgcHVzaHR5cGVbcGFyc2VJbnQodGZwdXNoKV0pXFxuICAgIGxvZygn5ZeF5o6i57G75Z6LOicgKyBwYXJzZXR5cGVbcGFyc2VJbnQod2ViKV0uc3BsaXQoJzonKVswXSlcXG5cXG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgIGxldCBpdCA9IGFycltpXTtcXG4gICAgICAgIGxldCB0ID0gaXQudGV4dDtcXG4gICAgICAgIGlmICghaXQuaHJlZiB8fCBpdC5ocmVmID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICB9XFxuICAgICAgICBsZXQgcHJlID0gaSA9PSAwID8gbnVsbCA6IGFycltpIC0gMV07XFxuICAgICAgICBsZXQgbmV4dCA9IGkgPT0gKGFyci5sZW5ndGggLSAxKSA/IG51bGwgOiBhcnJbaSArIDFdO1xcbiAgICAgICAgaWYgKGlzQ2hhcHRlcihpdCwgcHJlLCBuZXh0KSkge1xcbiAgICAgICAgICAgIGlmICh0ZnB1c2ggPT0gJzEnKSB7XFxuICAgICAgICAgICAgICAgIC8qdmFyIHVybHggPSBcXFwid2ViUnVsZTovL1xcXCIgKyBpdC5ocmVmICsgXFxcIkBcXFwiICsgX3dlYjtcXG4gICAgICAgICAgICAgICAgdmFyIGV4dHJheCA9IHtcXG4gICAgICAgICAgICAgICAgICAgIGpzTG9hZGluZ0luamVjdDogdHJ1ZSxcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBpdC5ocmVmLFxcbiAgICAgICAgICAgICAgICAgICAgY2xzOiAncGxheXMnLFxcbiAgICAgICAgICAgICAgICAgICAgYmxvY2tSdWxlczogWycubTRhJywgJy5tcDMnLCAnLmZsdicsICcuYXZpJywgJy4zZ3AnLCAnLm1wZWcnLCAnLndtdicsICcubW92JywgJy5ybXZiJywgJy5naWYnLCAnLmpwZWcnLCAnLnBuZycsICcuaWNvJywgJy5zdmcnXVxcbiAgICAgICAgICAgICAgICB9OyovXFxuICAgICAgICAgICAgICAgIHZhciB1cmx4ID0gJ2hpa2VyOi8vcGFnZS9wdXNoPyZwdXNodXJsPScgKyBlbmNvZGVVUklDb21wb25lbnQoSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgXFxcIm5hbWVcXFwiOiBnZXRQYWdlVGl0bGUoKSxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJ1cmxcXFwiOiBpdC50ZXh0ICsgJyQnICsgaXQuaHJlZixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJjb250ZW50XFxcIjogTVlfVVJMLnRpdGxlLFxcbiAgICAgICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgICAgIHZhciBleHRyYXggPSB7XFxuICAgICAgICAgICAgICAgICAgICBpZDogaXQuaHJlZixcXG4gICAgICAgICAgICAgICAgICAgIGNsczogJ3BsYXlzJyxcXG4gICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBpZiAod2ViID09ICcwJykge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHVybHggPSBcXFwid2ViUnVsZTovL1xcXCIgKyBpdC5ocmVmICsgXFxcIkBcXFwiICsgX3dlYjtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBleHRyYXggPSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAganNMb2FkaW5nSW5qZWN0OiB0cnVlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBpdC5ocmVmLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogJ3BsYXlzJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBibG9ja1J1bGVzOiBbJy5tNGEnLCAnLm1wMycsICcuZmx2JywgJy5hdmknLCAnLjNncCcsICcubXBlZycsICcud212JywgJy5tb3YnLCAnLnJtdmInLCAnLmdpZicsICcuanBlZycsICcucG5nJywgJy5pY28nLCAnLnN2ZyddXFxuICAgICAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHdlYiA9PSAnMScpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciB1cmx4ID0gXFxcInZpZGVvOi8vXFxcIiArIGl0LmhyZWY7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgZXh0cmF4ID0ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBpdC5ocmVmLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogJ3BsYXlzJyxcXG4gICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAod2ViID09ICcyJykge1xcbiAgICAgICAgICAgICAgICAgICAgbGF6eSA9ICQoJycpLmxhenlSdWxlKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvbGF6eVRvWDU/cnVsZT1kbeebkuWtkCcpLnZpZGVvWDUoKTtcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB2YXIgdXJseCA9IGl0LmhyZWYgKyBsYXp5XFxuICAgICAgICAgICAgICAgICAgICB2YXIgZXh0cmF4ID0ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBpdC5ocmVmLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogJ3BsYXlzJyxcXG4gICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHQsXFxuICAgICAgICAgICAgICAgIHVybDogdXJseCxcXG4gICAgICAgICAgICAgICAgcGg6IHQgKyBcXFwiJFxcXCIgKyBpdC5ocmVmLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfM1xcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiBleHRyYXhcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgfVxcbiAgICBpZiAoZC5sZW5ndGggPT0gMCkge1xcbiAgICAgICAgLy/ljLnphY3lpLHotKVcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgIHVybDogdXJsLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwieDVfd2Vidmlld19zaW5nbGVcXFwiLFxcbiAgICAgICAgICAgIGRlc2M6IFxcXCJmbG9hdCYmMTAwJVxcXCIsXFxuICAgICAgICAgICAgcGljX3VybDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgZmxvYXRWaWRlbzogdHJ1ZSxcXG4gICAgICAgICAgICAgICAgY2FuQmFjazogdHJ1ZSxcXG4gICAgICAgICAgICAgICAgYmxvY2tSdWxlczogW1xcXCIuZ2lmXFxcIiwgXFxcIi9hZC9cXFwiLCBcXFwiZ29vZ2xlXFxcIiwgXFxcIi9zaC90by9cXFwiLCBcXFwiLkdJRlxcXCJdXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICB0b2FzdChcXFwiQUnljLnphY3lpLHotKXvvIzlt7Lkvb/nlKhYNeWKoOi9vVxcXCIpO1xcbiAgICAgICAgbG9nKFxcXCLlvZPliY3pobXpnaLlnLDlnYA6IFxcXCIgKyB1cmwpXFxuICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgIH0gZWxzZSB7XFxuICAgICAgICAvL+S4uue6v+i3r+WKoOWIhuWJsue6v1xcbiAgICAgICAgbGV0IGQyID0gW107XFxuICAgICAgICBsZXQgbXRhYiA9IFtdO1xcblxcbiAgICAgICAgZCA9IHVuaXF1ZShkKVxcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBkLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgZDIucHVzaChkW2ldKTtcXG4gICAgICAgICAgICBtdGFiLnB1c2goZFtpXS5waCk7XFxuICAgICAgICAgICAgaWYgKGkgPCBkLmxlbmd0aCAtIDEpIHtcXG4gICAgICAgICAgICAgICAgbGV0IGl0ID0gZFtpXTtcXG4gICAgICAgICAgICAgICAgbGV0IHQxID0gcGFyc2VJbnQoY2xlYXJUZXh0KGl0LnRpdGxlKSk7XFxuICAgICAgICAgICAgICAgIGxldCBuZXh0ID0gZFtpICsgMV07XFxuICAgICAgICAgICAgICAgIGxldCB0MiA9IHBhcnNlSW50KGNsZWFyVGV4dChuZXh0LnRpdGxlKSk7XFxuICAgICAgICAgICAgICAgIGlmICh0MiAtIHQxID4gMSB8fCB0MSAtIHQyID4gMSkge1xcbiAgICAgICAgICAgICAgICAgICAgbXRhYi5wdXNoKCcjJyk7XFxuICAgICAgICAgICAgICAgICAgICBkMi5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJpZ19ibGFua19ibG9ja1xcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgZDIucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJsaW5lX2JsYW5rXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBkMi5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJpZ19ibGFua19ibG9ja1xcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcblxcbiAgICAgICAgbGV0IHBsYXlsID0gbXRhYi5qb2luKCcjJykucmVwbGFjZSgvIyMjL2csICckJCQkJCQnKTtcXG5cXG5cXG4gICAgICAgIGxldCBmcm9tID0gW107XFxuICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IHBsYXlsLnNwbGl0KCckJCQnKS5sZW5ndGg7IGorKykge1xcbiAgICAgICAgICAgIGZyb20ucHVzaChcXFwi5pKt5pS+5YiX6KGoXFxcIiArIFtqICsgMV0pO1xcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IHB1c2ggPSBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgXF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xuICAgICAgICBkMi5zcGxpY2UoMiwgMCwge1xcbiAgICAgICAgICAgIHRpdGxlOiBwYXJzZXR5cGVbcGFyc2VJbnQod2ViKV0uc3BsaXQoJzonKVswXSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaW5mKSA9PiB7XFxuICAgICAgICAgICAgICAgIGlmIChnZXRJdGVtKCd3ZWJwdXNoJywgJzAnKSA9PSAnMScpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ljZXmjqjmqKHlvI/lvIDlkK/ml6Dms5Xkv67mlLknXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgbGV0IGFsbF9jb2xzID0gaW5mXFxuICAgICAgICAgICAgICAgIGxldCBjb2wgPSBzdG9yYWdlMC5nZXRJdGVtKCfll4XmjqInLCAnV2Vi5ZeF5o6iJyk7XFxuICAgICAgICAgICAgICAgIGxldCDll4XmjqIgPSBhbGxfY29scy5tYXAoKGl0KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXQuc3BsaXQoJzonKVswXSA9PT0gY29sID8gJ+Keoe+4jycgKyBpdCA6IGl0O1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgbGV0IHRpcHMgPSAn6K+36YCJ5oup5ZeF5o6i5qih5byPJztcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQo5ZeF5o6iLCAxLCB0aXBzKS5zZWxlY3QoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgaW5wdXQgPSBpbnB1dC5yZXBsYWNlKC/inqHvuI8vZywgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgc3RvcmFnZTAuc2V0SXRlbSgn5ZeF5o6iJywgaW5wdXQuc3BsaXQoJzonKVswXSk7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgbW9kZSA9IGlucHV0LnNwbGl0KCc6JylbMV1cXG4gICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnNldEl0ZW0oJ3dlYicsIG1vZGUpXFxuICAgICAgICAgICAgICAgICAgICBsZXQgb2xkSWRzID0gKGZpbmRJdGVtc0J5Q2xzKCdwbGF5cycpKS5tYXAoaXQgPT4gaXQuZXh0cmEuaWQpO1xcbiAgICAgICAgICAgICAgICAgICAgb2xkSWRzLmZvckVhY2goeCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG1vZGUgPT0gJzAnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oeCwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwid2ViUnVsZTovL1xcXCIgKyB4ICsgXFxcIkBcXFwiICsgJC5sd2ViKCcwJyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzTG9hZGluZ0luamVjdDogdHJ1ZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogeCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbHM6ICdwbGF5cycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmxvY2tSdWxlczogWycubTRhJywgJy5tcDMnLCAnLmZsdicsICcuYXZpJywgJy4zZ3AnLCAnLm1wZWcnLCAnLndtdicsICcubW92JywgJy5ybXZiJywgJy5naWYnLCAnLmpwZWcnLCAnLnBuZycsICcuaWNvJywgJy5zdmcnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG1vZGUgPT0gJzEnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oeCwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwidmlkZW86Ly9cXFwiICsgeCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IHgsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiAncGxheXMnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG1vZGUgPT0gJzInKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oeCwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB4ICsgJCgnJykubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9sYXp5VG9YNT9ydWxlPWRt55uS5a2QJykudmlkZW9YNSgpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiB4LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsczogJ3BsYXlzJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oJ3BhcnNlJywge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBzdG9yYWdlMC5nZXRJdGVtKCfll4XmjqInLCAnV2Vi5ZeF5o6iJyksXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG5cXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LliIfll4XmjqLmlrnlvI/kuLo6JyArIGlucHV0O1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIHBhcnNldHlwZSksXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6ICdwYXJzZScsXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuXFxuICAgICAgICBkMi51bnNoaWZ0KHtcXG4gICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnTxzbWFsbD7imqHvuI8nICsgdXJsICsgJzwvc21hbGw+JyxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnLFxcbiAgICAgICAgICAgIHVybDogdXJsLFxcbiAgICAgICAgfSk7XFxuICAgICAgICBpZiAoZ2V0SXRlbSgnYWknLCAnMCcpID09ICcxJykge1xcblxcbiAgICAgICAgICAgIGQyLnVuc2hpZnQoe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogZ2V0UGFnZVRpdGxlKCksXFxuICAgICAgICAgICAgICAgIGltZzogJyBodHRwczovL3MxLmF4MXguY29tLzIwMjMvMDIvMTEvcFNoMnJiOC5qcGcnLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfdmVydGljYWxfcGljX2JsdXInXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH1cXG4gICAgICAgIHNldFJlc3VsdChkMilcXG4gICAgfVxcbn1cIn0se1wiY29sX3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tpXSxcXG4gICAgICAgICAgICB1cmw6ICQoJycpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCdpbmRleCcsIGkpXFxuICAgICAgICAgICAgICAgIC8vY2xlYXJNeVZhcignc291JylcXG4gICAgICAgICAgICAgICAgY2xlYXJNeVZhcigncGFnZScpXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WIh+aNouaIkOWKnydcXG4gICAgICAgICAgICB9LCBpKSxcXG4gICAgICAgIH0pXFxuICAgIH0pXFxuXFxuICAgIHZhciB3ZWIgPSBnZXRJdGVtKCd3ZWInLCAnMCcpXFxuICAgIC8vbG9nKHdlYilcXG4gICAgdmFyIHRpdGxlID0gJydcXG4gICAgc3dpdGNoICh3ZWIpIHtcXG4gICAgICAgIGNhc2UgJzAnOlxcbiAgICAgICAgICAgIHRpdGxlID0gJ1dlYuWXheaOoidcXG4gICAgICAgICAgICBicmVhaztcXG4gICAgICAgIGNhc2UgJzEnOlxcbiAgICAgICAgICAgIHRpdGxlID0gJ+inhumikeWXheaOoidcXG4gICAgICAgICAgICBicmVhaztcXG4gICAgICAgIGNhc2UgJzInOlxcbiAgICAgICAgICAgIHRpdGxlID0gJ2Rt55uS5a2QJ1xcbiAgICAgICAgICAgIGJyZWFrO1xcbiAgICB9XFxuICAgIHNldEl0ZW0oJ+WXheaOoicsIHRpdGxlKVxcblxcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6ICfmjqjpgIEnLFxcbiAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3NldHRpbmdcXFwiLFxcbiAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbidcXG4gICAgfSwge1xcbiAgICAgICAgdGl0bGU6IFxcXCLpppbpobXliqDovb06XFxcIiArIGdldEl0ZW0oJ2hvbWUnLCAn5YWzJyksXFxuICAgICAgICB1cmw6ICQoJycpLmxhenlSdWxlKCgpID0+IHtcXG4gICAgICAgICAgICBpZiAoZ2V0SXRlbSgnaG9tZScsICflhbMnKSA9PSAn5YWzJykge1xcbiAgICAgICAgICAgICAgICBzZXRJdGVtKCdob21lJywgJ+W8gCcpXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgc2V0SXRlbSgnaG9tZScsICflhbMnKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgfSksXFxuICAgICAgICBjb2xfdHlwZTogXFxcImZsZXhfYnV0dG9uXFxcIlxcbiAgICB9LCB7XFxuICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgIHZhciB3ZWIgPSBnZXRJdGVtKCd3ZWInLCAnMCcpXFxuICAgICAgICAgICAgc3dpdGNoICh3ZWIpIHtcXG4gICAgICAgICAgICAgICAgY2FzZSAnMCc6XFxuICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCd3ZWInLCAnMScpXFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgY2FzZSAnMSc6XFxuICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCd3ZWInLCAnMicpXFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgY2FzZSAnMic6XFxuICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCd3ZWInLCAnMCcpXFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICB9KSxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwiZmxleF9idXR0b25cXFwiLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBpZDogJ3BhcnNldCdcXG4gICAgICAgIH1cXG4gICAgfSwge1xcbiAgICAgICAgdGl0bGU6ICfmqKHmnb86JyArIChnZXRJdGVtKCdhaScsICcwJykgPT0gJzAnID8gJ+WFs+mXrScgOiAn5byA5ZCvJyksXFxuICAgICAgICBjb2xfdHlwZTogXFxcImZsZXhfYnV0dG9uXFxcIixcXG4gICAgICAgIHVybDogJCgnJykubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgIGlmIChnZXRJdGVtKCdhaScsICcwJykgPT0gJzAnKSB7XFxuICAgICAgICAgICAgICAgIHNldEl0ZW0oJ2FpJywgJzEnKVxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHNldEl0ZW0oJ2FpJywgJzAnKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICB9KSxcXG4gICAgICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBpZDogJ2FpbWInXFxuICAgICAgICB9XFxuICAgIH0pO1xcbn1cXG5cXG5cXG5cXG5pZiAoTVlfUEFHRSA9PSAxKSB7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogXFxcIuaQnOe0olxcXCIsXFxuICAgICAgICB1cmw6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgIH0pLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJpbnB1dFxcXCIs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zKCR7dH0pKyomJmFgKVxcblxcbiAgICAgICAgbGlzdC5tYXAoeCA9PiB7XFxuICAgICAgICAgICAgdmFyIG5hbWUgPSBwZGZoKHgsICcucG9zdGVyLWl0ZW0tdGl0bGUmJlRleHQnKVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBuYW1lLFxcbiAgICAgICAgICAgICAgICBpbWc6IHBkZmgoeCwgJ2ltZyYmc3JjJyksXFxuICAgICAgICAgICAgICAgIHVybDogJCgnJykubGF6eVJ1bGUoKG4pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJzb3VcXFwiLCBuKVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LCBuYW1lKVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICB9XFxuXFxuICAgIFsn54Ot6Zeo55S15b2xLeeUteW9sScsICfng63pl6jnlLXop4bliact55S16KeG5YmnJywgJ+eDremXqOe7vOiJui3nu7zoibonLCAn54Ot6Zeo5Yqo5ryrLeWKqOa8qyddLm1hcCh4ID0+IHtcXG4gICAgICAgIHNldExpc3RzKHgpXFxuICAgIH0pXFxuXFxufVwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwiMS7osYzosYZcIixcInBhdGhcIjpcIndhbmRvdVwiLFwicnVsZVwiOlwianM6XFxubGV0IGR1cmwgPSBnZXRNeVZhcihcXFwiZHVybFxcXCIsIFxcXCJcXFwiKTtcXG5pZiAoZHVybCAhPSAnJykge1xcblxcbiAgICBkdXJsID0gJ2h0dHBzOi8vd3d3LndhbmRvdS5wcm8nICsgZHVybC5yZXBsYWNlKCcuaHRtbCcsICcnKVxcbiAgICBsZXQgdXJsID0gZHVybDtcXG4gICAgbGV0IGlkID0gdXJsO1xcbiAgICBsZXQgaHRtbCA9IGZldGNoKHVybCk7XFxuICAgIHZhciBydWxlID0gTVlfUlVMRS50aXRsZVxcbiAgICB2YXIgbmFtZT1wZGZoKGh0bWwsICcubW92aWUtY29udGVudCYmcCYmVGV4dCcpO1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IG5hbWUsXFxuICAgICAgICBpbWc6IHBkZmgoaHRtbCwgJy5tb3ZpZS1pbWcmJmltZyYmc3JjJyksXFxuICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfdmVydGljYWxfcGljJyxcXG4gICAgICAgIGRlc2M6IHBkZmgoaHRtbCwgJy5ib3R0b20mJnAmJlRleHQnKSxcXG4gICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS94NT91PScgKyBiYXNlNjRFbmNvZGUodXJsKSxcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgaWQ6IHVybCxcXG4gICAgICAgICAgICBpbmhlcml0VGl0bGU6IGZhbHNlXFxuICAgICAgICB9XFxuICAgIH0pXFxuICAgIC8vc2V0UmVzdWx0KGQpO1xcblxcbiAgICBsZXQgdGV4dCA9IHBkZmgoaHRtbCwgXFxcImJvZHkmJiNfX05FWFRfREFUQV9fJiZIdG1sXFxcIik7XFxuICAgIC8vbG9nKHRleHQpO1xcbiAgICBsZXQgZXJqaSA9IEpTT04ucGFyc2UodGV4dCk7XFxuICAgIC8vbG9nKGVyamkpO1xcbiAgICBsZXQgbGlzdCA9IGVyamkucHJvcHMucGFnZVByb3BzLmRhdGEucGxheURhdGE7XFxuXFxuICAgIGlmIChsaXN0ICYmIGxpc3QubGVuZ3RoID4gMCkge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBNWV9VUkwgPSBcXFwiXFxcIjtcXG4gICAgICAgICAgICBsZXQge1xcbiAgICAgICAgICAgICAgICB3cmFwXFxuICAgICAgICAgICAgfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3Rvb2w/cnVsZT1cXFwiICsgcnVsZSk7XFxuICAgICAgICAgICAgbGlzdCA9IGxpc3QubWFwKGl0ID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHUgPSBpdC5kYXRhX3VybDtcXG4gICAgICAgICAgICAgICAgdSA9IFxcXCJoaWtlcjovL3BhZ2UvcD9ydWxlPVxcXCIgKyBydWxlICsgXFxcIiZ1PVxcXCIgKyBiYXNlNjRFbmNvZGUodSk7XFxuICAgICAgICAgICAgICAgIHUgPSBnZXRJdGVtKCdhaScsICcwJykgPT0gJzAnID8gdSA6IHUgKyAnI2ltbWVyc2l2ZVRoZW1lIydcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdC5zaXRlX25hbWUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IHUsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6aXQuc2l0ZV9pY29uLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmhlcml0VGl0bGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiB1LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyb206ICdob21lJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlVGl0bGU6bmFtZSxcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGlmIChNWV9QQUdFID09IDEpIHtcXG4gICAgICAgICAgICAgICAgLy9hZGRJdGVtQWZ0ZXIoaWQsIGxpc3QpO1xcbiAgICAgICAgICAgICAgICBkID0gZC5jb25jYXQobGlzdCk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcb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4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBpbnB1dDtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBpZCA9IHVybDtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gZmV0Y2godXJsKTtcXG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKGh0bWwpXFxuICAgICAgICAgICAgICAgICAgICBsZXQgdGV4dCA9IHBkZmgoaHRtbCwgXFxcImJvZHkmJiNfX05FWFRfREFUQV9fJiZIdG1sXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAvL2xvZyh0ZXh0KTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBlcmppID0gSlNPTi5wYXJzZSh0ZXh0KTtcXG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKGVyamkpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGxpc3QgPSBlcmppLnByb3BzLnBhZ2VQcm9wcy5kYXRhLnBsYXlEYXRhO1xcbiAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxpc3QgJiYgbGlzdC5sZW5ndGggPiAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTVlfVVJMID0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cmFwXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS90b29sP3J1bGU9XFxcIiArIHJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXN0ID0gbGlzdC5tYXAoaXQgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHUgPSBpdC5kYXRhX3VybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUgPSBcXFwiaGlrZXI6Ly9wYWdlL3A/cnVsZT1cXFwiICsgcnVsZSArIFxcXCImdT1cXFwiICsgYmFzZTY0RW5jb2RlKHUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdSA9IGdldEl0ZW0oJ2FpJywgJzAnKSA9PSAnMCcgPyB1IDogdSArICcjaW1tZXJzaXZlVGhlbWUjJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXQuc2l0ZV9uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogdSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1nOml0LnNpdGVfaWNvbixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmhlcml0VGl0bGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tOiAnaG9tZScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2VUaXRsZTpuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZEl0ZW1BZnRlcihpZCwgbGlzdCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coZS50b1N0cmluZygpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgIH0sIE1ZX1JVTEUudGl0bGUsIHVybCwgcyxuYW1lKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcIm1vdmllXzFfbGVmdF9waWNcXFwiLFxcbiAgICAgICAgICAgIGRlc2M6IFxcXCLigJzigJzigJ3igJ08Zm9udCBjb2xvcj0jZjEzYjY2YT7osYzosYY8L2ZvbnQ+XFxcIixcXG4gICAgICAgICAgICBwaWNfdXJsOiBpbWcsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IHVybCxcXG4gICAgICAgICAgICAgICAgaW5oZXJpdFRpdGxlOiBmYWxzZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICB9XFxuICAgIHNldFJlc3VsdChkKVxcbn0gZWxzZSB7XFxuXFxufVxcblxcblxcbmlmIChnZXRJdGVtKCdob21lJywgJ+WFsycpID09ICflvIAnKSB7XFxuICAgIHZhciBodG1sID0gZmV0Y2goJ2h0dHBzOi8vd3d3LndhbmRvdS5wcm8vJylcXG4gICAgbGV0IGpzb24gPSBKU09OLnBhcnNlKHBkZmgoaHRtbCwgXFxcImJvZHkmJiNfX05FWFRfREFUQV9fJiZIdG1sXFxcIikpO1xcblxcblxcblxcbiAgICBmdW5jdGlvbiBzZXRMaXN0cyhpdGVtKSB7XFxuICAgICAgICB2YXIgdGl0bGUgPSBpdGVtLnNwbGl0KCcjJylbMF1cXG4gICAgICAgIHZhciBrZXkgPSBpdGVtLnNwbGl0KCcjJylbMV1cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnYXZhdGFyJyxcXG4gICAgICAgICAgICBpbWc6ICdodHRwczovL2xhbm1laWd1b2ppYW5nLmNvbS90dWJpYW8vbW9yZS8xMC5wbmcnXFxuICAgICAgICB9KVxcblxcbiAgICAgICAgdmFyIGxpc3QgPSBqc29uLnByb3BzLnBhZ2VQcm9wcy5mYWxsYmFja1trZXldLmRhdGFcXG5cXG4gICAgICAgIGxpc3QubWFwKHggPT4ge1xcbiAgICAgICAgICAgIHZhciBuYW1lID0geC5ob3RfbmFtZVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBuYW1lLFxcbiAgICAgICAgICAgICAgICBpbWc6IHguaG90X2ltZ191cmwsXFxuICAgICAgICAgICAgICAgIGRlc2M6IHguaG90X3JhdGUsXFxuICAgICAgICAgICAgICAgIHVybDogJCgnJykubGF6eVJ1bGUoKG4sIHUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJzb3VcXFwiLCBuKVxcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ2R1cmwnLCB1KVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LCBuYW1lLCB4LmhvdF91cmwpXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pXFxuICAgIH1cXG5cXG4gICAgWyfng63pl6jnlLXlvbEjaW5kZXgtZ2V0TW92aWVMaXN0LW1vdmllJywgJ+eDremXqOWJp+mbhiNpbmRleC1nZXRUdkxpc3QtdHYtMjgnXS5tYXAoeCA9PiB7XFxuICAgICAgICBzZXRMaXN0cyh4KVxcbiAgICB9KVxcblxcbn1cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5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HVybDogJCgnJykubGF6eVJ1bGUoKG4pID0+IHtcXG4gICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcInNvdVxcXCIsIG4pXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIG5hbWUpXFxuICAgICAgICB9KVxcbiAgICB9KVxcbn1cXG5cXG5bJ+eDreaSreaWsOWJpy10dicsICfng63pl6jnlLXlvbEtbW92aWUnLCAn54Ot5pKt5Yqo5ryrLWFuaW1lJywgJ+eDreaSree7vOiJui1zaG93JywgJ+eDreaSree6quW9leeJhy1kb2N1bWVudGFyeSddLm1hcCh4ID0+IHtcXG4gICAgc2V0TGlzdHMoeClcXG59KVxcblxcbn1cXG5cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuWHveaVsFwiLFwicGF0aFwiOlwieHRvb2xzXCIsXCJydWxlXCI6XCJqczpcXG5mdW5jdGlvbiBlbmNvZGVVVEY4KHMpIHtcXG52YXIgaSwgciA9IFtdLCBjLCB4O1xcbmZvciAoaSA9IDA7IGkgPCBzLmxlbmd0aDsgaSsrKVxcbmlmICgoYyA9IHMuY2hhckNvZGVBdChpKSkgPCAweDgwKSByLnB1c2goYyk7XFxuZWxzZSBpZiAoYyA8IDB4ODAwKSByLnB1c2goMHhDMCArIChjID4+IDYgJiAweDFGKSwgMHg4MCArIChjICYgMHgzRikpO1xcbmVsc2Uge1xcbmlmICgoeCA9IGMgXiAweEQ4MDApID4+IDEwID09IDApIC8v5a+55Zub5a2X6IqCVVRGLTE26L2s5o2i5Li6VW5pY29kZVxcbmMgPSAoeCA8PCAxMCkgKyAocy5jaGFyQ29kZUF0KCsraSkgXiAweERDMDApICsgMHgxMDAwMCxcXG5yLnB1c2goMHhGMCArIChjID4+IDE4ICYgMHg3KSwgMHg4MCArIChjID4+IDEyICYgMHgzRikpO1xcb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aGVtZSMnXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiB3cmFwMSh3ZWIgKyAnLScgKyB0LCBzKSxcXG4gICAgICAgICAgICB1cmw6IHUsXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgICAgIGltZzppbWcsXFxuICAgICAgICAgICAgLy9kZXNjOiAocGRmYShpdCwgXFxcImEmJnNwYW5cXFwiKSB8fCBbXSkubWFwKGkgPT4gcGRmaChpLCBcXFwiVGV4dFxcXCIpKS5qb2luKFxcXCIgXFxcIiksXFxuICAgICAgICAgICAgcGljX3VybDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IHBkKGl0LCBcXFwiYSYmaHJlZlxcXCIpLFxcbiAgICAgICAgICAgICAgICBpbmhlcml0VGl0bGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICBwYWdlVGl0bGU6IHRcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgfVxcbiAgICBzZXRSZXN1bHQoZClcXG59IGVsc2Uge1xcblxcbn1cXG5cXG5pZiAoZ2V0SXRlbSgnaG9tZScsICflhbMnKSA9PSAn5byAJykge1xcbiAgICBmdW5jdGlvbiBzZXRMaXN0cyhpdGVtKSB7XFxuICAgICAgICB2YXIgdGl0bGUgPSBpdGVtLnNwbGl0KCctJylbMF1cXG4gICAgICAgIHZhciB0ID0gaXRlbS5zcGxpdCgnLScpWzFdXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcicsXFxuICAgICAgICAgICAgaW1nOiAnaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vcmUvMTAucG5nJ1xcbiAgICAgICAgfSlcXG5cXG4gICAgICAgIHZhciBodG1sID0gSlNPTi5wYXJzZShmZXRjaChgaHR0cDovL3d3dy5xaW1haXR2LmNvbS9pbmRleC5waHA/cz1tb3ZpZSZjPWhvbWUmbT1nZXRtb3ZpZSZ0eXBlPSVFNyU4MyVBRCVFOSU5NyVBOCZjYXRpZD0ke3R9YCkpLmh0bWxcXG5cXG4gICAgICAgIHZhciBsaXN0ID0gcGRmYShodG1sLCBgYm9keSYmLm1vdmllLWxpc3QtaXRlbWApXFxuXFxuICAgICAgICBsaXN0Lm1hcCh4ID0+IHtcXG4gICAgICAgICAgICB2YXIgbmFtZSA9IHBkZmgoeCwgJy5tb3ZpZS10aXRsZSYmVGV4dCcpXFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IG5hbWUsXFxuICAgICAgICAgICAgICAgIGltZzogcGRmaCh4LCAnaW1nJiZzcmMnKSxcXG4gICAgICAgICAgICAgICAgZGVzYzogcGRmaCh4LCAnLm1vdmllLXJhdGluZyYmVGV4dCcpLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoJycpLmxhenlSdWxlKChuKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwic291XFxcIiwgbilcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSwgbmFtZSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSlcXG4gICAgfVxcblxcbiAgICBbJ+eDreaSreeUteW9sS0xJywgJ+eDreaSreeUteinhuWJpy0yJywgJ+eDreaSreWKqOa8qy0zJywgJ+eDreaSree7vOiJui01J10ubWFwKHggPT4ge1xcbiAgICAgICAgc2V0TGlzdHMoeClcXG4gICAgfSlcXG59XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLlh73mlbAyXCIsXCJwYXRoXCI6XCJ6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KCQkJCgpLmxhenlSdWxlKChydWxlLCB1cmwsIGFuY2hvcklkLCBtb2JhbikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IGdldFZhcihcXFwiaHRtbDBcXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpdXJsID0gJyc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyVmFyKFxcXCJodG1sMFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2xvZygndXJsOicgKyB1cmwpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1cmwuc3RhcnRzV2l0aCgnaHR0cHM6Ly9jdXBmb3guYXBwL3BhZ2U/dXJsPScpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgYmFzZXVybCA9IHVybC5yZXBsYWNlKC8uK3VybD0oLio/KSYuKy9nbSwgJyQxJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl1cmwgPSBiYXNlNjREZWNvZGUoYmFzZXVybClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcignaWZyYW1lJywgaXVybClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZygnaXVybDonICsgaXVybClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXVybC5sZW5ndGggPiAwID8gXFxcIjFcXFwiIDogXFxcIjBcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKGUudG9TdHJpbmcoKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSwgcnVsZSwgbG9jYXRpb24uaHJlZiwgYW5jaG9ySWQsIG1vYmFuKSwgJCQkLnRvU3RyaW5nKChydWxlLG1vYmFuKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy9mYmEubG9nKGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vZmJhLmxvZyhydWxlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcXFwiMFxcXCIgPT0gaW5wdXQpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmNoZWNrYyA9IHdpbmRvdy5jaGVja2MgKyAxO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKmlmICh3aW5kb3cuY2hlY2tjID4gMTIwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYmEubG9nKFxcXCLmiafooYzotoXov4czMOenku+8jOaXoOazleino+aekFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgeyovXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQod2luZG93LmNoZWNrMCwgMjUwKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy99XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVybCA9IGZiYS5nZXRWYXIoJ2lmcmFtZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYmEubG9nKCdtb2JhbicrbW9iYW4pXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG1vYmFuPT0nMScpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsPXVybCsnI2ltbWVyc2l2ZVRoZW1lIydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSAgICAgIFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYmEubG9nKHVybClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmJhLm9wZW4oSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcnVsZTogcnVsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5b2x54mH6K+m5oOFJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdyb3VwOiBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZVJ1bGU6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZXM6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL3A/cnVsZT0nICsgcnVsZSArICcmdT0nICsgdXJsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmluZFJ1bGU6IFxcXCJcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmNoZWNrdXJsID0gbG9jYXRpb24uaHJlZjtcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gY2hlY2t1MCgpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh3aW5kb3cuY2hlY2t1cmwgIT0gbG9jYXRpb24uaHJlZikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vaGFzaOWPkeeUn+S6huWPmOWMllxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5jaGVja2MgPSAwO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVjazAoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAyMDAwKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChjaGVja3UwLCAyNTApO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrdTAoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9LHJ1bGUsbW9iYW4pKTtcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgZmJhLmxvZyhlLnRvU3RyaW5nKCkpO1xcbiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCh3aW5kb3cuY2hlY2swLCAyNTApO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHdpbmRvdy5jaGVja2MgPSAwO1xcbiAgICAgICAgICAgIHdpbmRvdy5jaGVjazAgPSBjaGVjazA7XFxuICAgICAgICAgICAgY2hlY2swKCk7XFxuICAgICAgICB9XFxuICAgIH0sIHJ1bGUsIGFuY2hvcklkLCBnZXRJdGVtKCdhaScsJzAnKSk7XFxufVwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwiNS7ojLbmna/omY5cIixcInBhdGhcIjpcImFpb2JiXCIsXCJydWxlXCI6XCJqczpcXG5sZXQgZHVybCA9IGdldE15VmFyKFxcXCJkdXJsXFxcIiwgXFxcIlxcXCIpO1xcbmlmIChkdXJsICE9ICcnKSB7XFxuICAgIE1ZX1VSTCA9IGR1cmxcXG4gICAgbG9nKGR1cmwpXFxuXFxuICAgIGxldCB1cmwgPSBkdXJsO1xcbiAgICBsZXQgaWQgPSB1cmw7XFxuICAgIHRyeSB7XFxuICAgICAgICB2YXIgaHRtbCA9IGZldGNoKHVybCk7XFxuICAgIH0gY2F0Y2gge1xcbiAgICAgICAgdmFyIGh0bWwgPSAnJ1xcbiAgICB9XFxuICAgIHZhciBydWxlID0gTVlfUlVMRS50aXRsZVxcbiAgICBpZiAoaHRtbCA9PSB1bmRlZmluZWQgfHwgaHRtbCA9PSAnJykge1xcbiAgICAgICAgdG9hc3QoJ+aXoOaVsOaNricpXFxuICAgICAgICBjbGVhck15VmFyKFxcXCJzb3VcXFwiKTtcXG4gICAgICAgIGNsZWFyTXlWYXIoXFxcImR1cmxcXFwiKTtcXG4gICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgfSBlbHNlIHtcXG5cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IHBkZmgoaHRtbCwgJ2g0JiZUZXh0JyksXFxuICAgICAgICAgICAgaW1nOiBwZChodG1sLCAnaW1nJiZzcmMnKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfdmVydGljYWxfcGljJyxcXG4gICAgICAgICAgICBkZXNjOiBwZGZoKGh0bWwsICdib2R5JiYucHViVGltZSYmVGV4dCcpLFxcbiAgICAgICAgICAgIHVybDogdXJsLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOiB1cmwsXFxuICAgICAgICAgICAgICAgIGluaGVyaXRUaXRsZTogZmFsc2VcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcblxcblxcbiAgICAgICAgdmFyIGxpc3QgPSBwZGZhKGh0bWwsICcubW92aWVaeSYmYScpXFxuICAgICAgICBpZiAobGlzdCAmJiBsaXN0Lmxlbmd0aCA+IDApIHtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBNWV9VUkwgPSBcXFwiXFxcIjtcXG4gICAgICAgICAgICAgICAgbGV0IHtcXG4gICAgICAgICAgICAgICAgICAgIG1lcmdlXFxuICAgICAgICAgICAgICAgIH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS90b29sP3J1bGU9XFxcIiArIHJ1bGUpO1xcbiAgICAgICAgICAgICAgICBsaXN0ID0gbGlzdC5tYXAoaXQgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHUgPSBwZGZoKGl0LCAnYSYmaHJlZicpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHQgPSBwZGZoKGl0LCAndWwmJlRleHQnKTtcXG4gICAgICAgICAgICAgICAgICAgIHUgPSBcXFwiaGlrZXI6Ly9wYWdlL3A/cnVsZT1cXFwiICsgcnVsZSArIFxcXCImdT1cXFwiICsgYmFzZTY0RW5jb2RlKHUpO1xcbiAgICAgICAgICAgICAgICAgICAgdSA9IGdldEl0ZW0oJ2FpJywgJzAnKSA9PSAnMCcgPyB1IDogdSArICcjaW1tZXJzaXZlVGhlbWUjJ1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbWVyZ2UodCwgJ+ivpuaDhScsIDEpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogJ2h0dHBzOi8vd3d3LjcyNTk5OC5jb20vc3RhdGljL3NlYXJjaC9pbWFnZXMvb25MaW5lLnBuZycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogdSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmhlcml0VGl0bGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbHM6IHVybCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbTogJ2hvbWUnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGQgPSBkLmNvbmNhdChsaXN0KVxcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgbG9nKGUudG9TdHJpbmcoKSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+aXoOi1hOa6kCcsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH1cXG4gICAgICAgIHNldFJlc3VsdChkKVxcbiAgICB9XFxuXFxufVxcbnMgPSBnZXRNeVZhcihcXFwic291XFxcIiwgXFxcIlxcXCIpO1xcblxcbmxldCByID0gXFxcIlxcXCI7XFxuaWYgKHMgIT0gXFxcIlxcXCIpIHtcXG5cXG4gICAgdmFyIHVybCA9IHBvc3QoYGh0dHBzOi8vd3d3LjcyNTk5OC5jb20va2V5d29yZHMuaHRtbGAsIHtcXG4gICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICBrZXl3b3JkczogcyxcXG4gICAgICAgICAgICB0eXBlOiAnbW92aWUnXFxuICAgICAgICB9LFxcbiAgICAgICAgb25seUhlYWRlcnM6IHRydWVcXG4gICAgfSlcXG4gICAgdmFyIGpzb24gPSBKU09OLnBhcnNlKHVybClcXG4gICAgdmFyIHR1cmwgPSBqc29uLnVybC5yZXBsYWNlKC8tXFxcXGQrLmh0bWwkLywgJy0nICsgTVlfUEFHRSArICcuaHRtbCcpXFxuICAgIE1ZX1VSTCA9IHR1cmxcXG4gICAgdmFyIGh0bWwgPSBmZXRjaCh0dXJsKVxcblxcbiAgICB2YXIgbGlzdCA9IHBkZmEoaHRtbCwgJ2JvZHkmJi5lYWNoJylcXG4gICAgLy9sb2cobGlzdClcXG5cXG4gICAgbGV0IHtcXG4gICAgICAgIHdyYXBcXG4gICAgfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3Rvb2xcXFwiKTtcXG5cXG4gICAgZm9yIChsZXQgaXQgb2YgbGlzdCkge1xcbiAgICAgICAgbGV0IG5hbWUgPSBwZGZoKGl0LCAnYSYmdGl0bGUnKTtcXG4gICAgICAgIGxldCBpbWcgPSBwZChpdCwgJ2ltZyYmc3JjJyk7XFxuICAgICAgICBpZiAoaW1nID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgaW1nID0gXFxcImh0dHBzOi8vd3d3LjcyNTk5OC5jb20vc3RhdGljL3NlYXJjaC9pbWFnZXMvcHJlbG9hZEltZy5wbmdcXFwiO1xcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IHVybCA9IHBkKGl0LCAnYSYmaHJlZicpO1xcbiAgICAgICAgbGV0IGRlc2MgPSBwZGZhKGl0LCAnYm9keSYmLmluZm8mJmEnKS5tYXAoeCA9PiBwZGZoKHgsICdhJiZUZXh0JykpLmpvaW4oJyAnKTtcXG4gICAgICAgIGxldCBzY29yZSA9IHBkZmgoaXQsICcubm9TY29yZSYmVGV4dCcpO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogd3JhcChuYW1lLCBzKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfdmVydGljYWxfcGljJyxcXG4gICAgICAgICAgICBpbWc6IGltZyxcXG4gICAgICAgICAgICBkZXNjOiAn6K+E5YiGOicgKyBzY29yZSArICdcXFxcbicgKyBkZXNjLFxcbiAgICAgICAgICAgIHVybDogJCh1cmwpLmxhenlSdWxlKChydWxlLCB1cmwsIHMpID0+IHtcXG4gICAgICAgICAgICAgICAgdmFyIGNscyA9IGZpbmRJdGVtc0J5Q2xzKHVybCk7XFxuICAgICAgICAgICAgICAgIGlmICghIWNscykge1xcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKHVybClcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBpbnB1dDtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBpZCA9IHVybDtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gZmV0Y2godXJsKTtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBsaXN0ID0gcGRmYShodG1sLCAnLm1vdmllWnkmJmEnKVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxpc3QgJiYgbGlzdC5sZW5ndGggPiAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTVlfVVJMID0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXJnZVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvdG9vbD9ydWxlPVxcXCIgKyBydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGxpc3QubWFwKGl0ID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1ID0gcGRmaChpdCwgJ2EmJmhyZWYnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0ID0gcGRmaChpdCwgJ3VsJiZUZXh0Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ID0gXFxcImhpa2VyOi8vcGFnZS9wP3J1bGU9XFxcIiArIHJ1bGUgKyBcXFwiJnU9XFxcIiArIGJhc2U2NEVuY29kZSh1KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUgPSBnZXRJdGVtKCdhaScsICcwJykgPT0gJzAnID8gdSA6IHUgKyAnI2ltbWVyc2l2ZVRoZW1lIydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IG1lcmdlKHQsICfor6bmg4UnLCAxKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbWc6ICdodHRwczovL3d3dy43MjU5OTguY29tL3N0YXRpYy9zZWFyY2gvaW1hZ2VzL29uTGluZS5wbmcnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5oZXJpdFRpdGxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiB1cmwsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyb206ICdob21lJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRJdGVtQWZ0ZXIoaWQsIGxpc3QpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKGUudG9TdHJpbmcoKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBhZGRJdGVtQWZ0ZXIoaWQsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfml6DotYTmupAnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiB1cmwsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICB9LCBNWV9SVUxFLnRpdGxlLCB1cmwsIHMpLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOiB1cmwsXFxuICAgICAgICAgICAgICAgIGluaGVyaXRUaXRsZTogZmFsc2VcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9XFxuXFxuICAgIHNldFJlc3VsdChkKVxcbn0gZWxzZSB7XFxuXFxufVxcblxcbmlmIChnZXRJdGVtKCdob21lJywgJ+WFsycpID09ICflvIAnKSB7XFxuICAgIGZ1bmN0aW9uIHNldExpc3RzKGl0ZW0pIHtcXG4gICAgICAgIE1ZX1VSTCA9ICdodHRwczovL3d3dy43MjU5OTguY29tLyc7XFxuICAgICAgICB2YXIgdGl0bGUgPSBpdGVtLnNwbGl0KCcjJylbMF1cXG4gICAgICAgIHZhciBrZXkgPSBpdGVtLnNwbGl0KCcjJylbMV1cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnYXZhdGFyJyxcXG4gICAgICAgICAgICBpbWc6ICdodHRwczovL2xhbm1laWd1b2ppYW5nLmNvbS90dWJpYW8vbW9yZS8xMC5wbmcnXFxuICAgICAgICB9KVxcblxcbiAgICAgICAgdmFyIGh0bWwgPSBmZXRjaChgaHR0cHM6Ly93d3cuNzI1OTk4LmNvbS95aW5na3UtbGlzdC8ke2tleX0tMC0wLTAtMC0wLTAuaHRtbGApXFxuICAgICAgICB2YXIgbGlzdCA9IHBkZmEoaHRtbCwgJ2JvZHkmJi5lYWNoJylcXG5cXG4gICAgICAgIGxpc3QubWFwKHggPT4ge1xcbiAgICAgICAgICAgIHZhciBuYW1lID0gcGRmaCh4LCAnYSYmdGl0bGUnKVxcbiAgICAgICAgICAgIGxldCBpbWcgPSBwZCh4LCAnaW1nJiZzcmMnKTtcXG4gICAgICAgICAgICBpZiAoaW1nID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICAgIGltZyA9IFxcXCJodHRwczovL3d3dy43MjU5OTguY29tL3N0YXRpYy9zZWFyY2gvaW1hZ2VzL3ByZWxvYWRJbWcucG5nXFxcIjtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbGV0IHVybCA9IHBkKHgsICdhJiZocmVmJyk7XFxuICAgICAgICAgICAgbGV0IHNjb3JlID0gcGRmaCh4LCAnLm5vU2NvcmUmJlRleHQnKTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogbmFtZSxcXG4gICAgICAgICAgICAgICAgaW1nOiBpbWcsXFxuICAgICAgICAgICAgICAgIGRlc2M6IHNjb3JlLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoJycpLmxhenlSdWxlKChuLCB1KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwic291XFxcIiwgbilcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdkdXJsJywgdSlcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4g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gPyB1IDogdSArICcjaW1tZXJzaXZlVGhlbWUjJ1xcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHdyYXAxKHdlYisnLScrdCwgcyksXFxuICAgICAgICAgICAgICAgICAgICBpbWc6ICdodHRwczovL3d3dy43MjU5OTguY29tL3N0YXRpYy9zZWFyY2gvaW1hZ2VzL29uTGluZS5wbmcnLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiB1LFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmhlcml0VGl0bGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogdXJsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2VUaXRsZTp0LFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgZCA9IGQuY29uY2F0KGxpc3QpXFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgbG9nKGUudG9TdHJpbmcoKSk7XFxuICAgICAgICB9XFxuICAgIH1cXG4gICAgc2V0UmVzdWx0KGQpXFxufVxcbnMgPSBnZXRNeVZhcihcXFwic291XFxcIiwgXFxcIlxcXCIpO1xcbmxldCByID0gXFxcIlxcXCI7XFxuaWYgKHMgIT0gXFxcIlxcXCIpIHtcXG4gICAgdmFyIHBhZ2UgPSBNWV9QQUdFO1xcbiAgICB2YXIgdXJsID0gYGh0dHBzOi8vd3d3LmRpYW55aW5nZ291LmNvbS9zby8ke3N9L3BhZ2VfJHtwYWdlfS5odG1sYDtcXG4gICAgLy9sb2codXJsKVxcbiAgICB2YXIgaHRtbCA9IGZldGNoKHVybClcXG5cXG4gICAgdmFyIGxpc3QgPSBwZGZhKGh0bWwsICdib2R5JiYuZWFjaCcpXFxuICAgIC8vbG9nKGxpc3QpXFxuXFxuICAgIGxldCB7XFxuICAgICAgICB3cmFwXFxuICAgIH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS90b29sXFxcIik7XFxuXFxuICAgIGZvciAobGV0IGl0IG9mIGxpc3QpIHtcXG4gICAgICAgIGxldCBuYW1lID0gcGRmaChpdCwgJ2EmJnRpdGxlJyk7XFxuICAgICAgICBsZXQgaW1nID0gcGQoaXQsICdpbWcmJmRhdGEtdXJsJyk7XFxuICAgICAgICBpZiAoaW1nID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgaW1nID0gXFxcImh0dHBzOi8vd3d3LmRpYW55aW5nZ291LmNvbS9WaWV3L2ltYWdlcy9ibGFua19iZy5wbmdcXFwiO1xcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IHVybCA9IHBkKGl0LCAnYSYmaHJlZicpO1xcbiAgICAgICAgbGV0IGRlc2MgPSBwZGZhKGl0LCAnYm9keSYmLmluZm8mJmEnKS5tYXAoeCA9PiBwZGZoKHgsICdhJiZUZXh0JykpLmpvaW4oJyAnKTtcXG4gICAgICAgIGxldCBzY29yZSA9IHBkZmgoaXQsICcubm9TY29yZSYmVGV4dCcpO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogd3JhcChuYW1lLCBzKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfdmVydGljYWxfcGljJyxcXG4gICAgICAgICAgICBpbWc6IGltZyxcXG4gICAgICAgICAgICBkZXNjOiAn6K+E5YiGOicgKyBzY29yZSArICdcXFxcbicgKyBkZXNjLFxcbiAgICAgICAgICAgIHVybDogJCh1cmwpLmxhenlSdWxlKChydWxlLCB1cmwsIHMsIG5hbWUpID0+IHtcXG4gICAgICAgICAgICAgICAgdmFyIGNscyA9IGZpbmRJdGVtc0J5Q2xzKHVybCk7XFxuICAgICAgICAgICAgICAgIGlmICghIWNscykge1xcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKHVybClcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBpbnB1dDtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBpZCA9IHVybDtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gZmV0Y2goYGh0dHBzOi8vd3d3LmRpYW55aW5nZ291LmNvbS9TcGlkZXJNb3ZpZS96eS8ke25hbWV9YCwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3gtcmVxdWVzdGVkLXdpdGgnOiAnWE1MSHR0cFJlcXVlc3QnXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IHBkZmEoaHRtbCwgJy5tb3ZpZVp5JiZhJylcXG4gICAgICAgICAgICAgICAgICAgIGlmIChsaXN0ICYmIGxpc3QubGVuZ3RoID4gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1ZX1VSTCA9IFxcXCJcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JhcDFcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3Rvb2w/cnVsZT1cXFwiICsgcnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpc3QgPSBsaXN0Lm1hcChpdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdSA9IHBkZmgoaXQsICdhJiZocmVmJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdCA9IHBkZmgoaXQsICdsaSwwJiZUZXh0Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgd2ViPXBkZmgoaXQsICdsaSwxJiZUZXh0Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ID0gXFxcImhpa2VyOi8vcGFnZS9wP3J1bGU9XFxcIiArIHJ1bGUgKyBcXFwiJnU9XFxcIiArIGJhc2U2NEVuY29kZSh1KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUgPSBnZXRJdGVtKCdhaScsICcwJykgPT0gJzAnID8gdSA6IHUgKyAnI2ltbWVyc2l2ZVRoZW1lIydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHdyYXAxKHdlYisnLScrdCwgcyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiAnaHR0cHM6Ly93d3cuNzI1OTk4LmNvbS9zdGF0aWMvc2VhcmNoL2ltYWdlcy9vbkxpbmUucG5nJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB1LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluaGVyaXRUaXRsZTogZmFsc2UsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsczogdXJsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWdlVGl0bGU6dCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRJdGVtQWZ0ZXIoaWQsIGxpc3QpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKGUudG9TdHJpbmcoKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICB9LCBNWV9SVUxFLnRpdGxlLCB1cmwsIHMsIG5hbWUpLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOiB1cmwsXFxuICAgICAgICAgICAgICAgIGluaGVyaXRUaXRsZTogZmFsc2VcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9XFxuXFxuICAgIHNldFJlc3VsdChkKVxcbn0gZWxzZSB7XFxuXFxufVxcblxcbmlmIChnZXRJdGVtKCdob21lJywgJ+WFsycpID09ICflvIAnKSB7XFxuICAgIGZ1bmN0aW9uIHNldExpc3RzKGl0ZW0pIHtcXG4gICAgICAgIE1ZX1VSTCA9ICdodHRwczovL3d3dy5kaWFueWluZ2dvdS5jb20vJztcXG4gICAgICAgIHZhciB0aXRsZSA9IGl0ZW0uc3BsaXQoJyMnKVswXVxcbiAgICAgICAgdmFyIGtleSA9IGl0ZW0uc3BsaXQoJyMnKVsxXVxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInLFxcbiAgICAgICAgICAgIGltZzogJ2h0dHBzOi8vbGFubWV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WxlKChuLCB1KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwic291XFxcIiwgbilcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdkdXJsJywgdSlcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSwgbmFtZSwgdXJsKVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICB9XFxuXFxuICAgIGZ1bmN0aW9uIGhvbWUoKSB7XFxuICAgICAgICBbJ+eUteW9sSNtb3ZpZScsICfnlLXop4bliacjdHYnLCAn57qq5b2V54mHI2RvYycsICfliqjmvKsjY29taWMnXS5tYXAoeCA9PiB7XFxuXFxuICAgICAgICAgICAgc2V0TGlzdHMoeClcXG4gICAgICAgIH0pXFxuICAgIH1cXG4gICAgXFxuICAgIHZhciBwYWdlPU1ZX1BBR0U7XFxuICAgIGxldCB0cnVlX3VybCA9IGdldE15VmFyKE1ZX1JVTEUudXJsLCBNWV9VUkwpO1xcbiAgICBpZihwYWdlPjEpe1xcbiAgICAgICAgbG9nKHRydWVfdXJsKVxcbiAgICAgICAgdHJ1ZV91cmw9dHJ1ZV91cmwrYC9wYWdlXyR7cGFnZX0uaHRtbGBcXG4gICAgICAgIGxvZyh0cnVlX3VybClcXG4gICAgfVxcbiAgICB2YXIgaHRtbCA9ZmV0Y2godHJ1ZV91cmwpLnJlcGxhY2UoJyUnLCcnKTtcXG4gICAgLy9sb2coaHRtbClcXG4gICAgXFxuICAgIFxcbiAgICBjb25zdCDliIbnsbvpopzoibIgPSBnZXRSYW5nZUNvbG9ycygpO1xcbiAgICBjb25zdCDlpKfnsbvlrprkvY0gPSAnLndfMTAwJztcXG4gICAgY29uc3Qg5ou85o6l5YiG57G7ID0gJ2JvZHkmJi55X2ZpbHRlck1lbnU6bnRoLWNoaWxkKG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