Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_【屏蔽广告】屏蔽谷歌广告、百度广告、知乎广告、隐藏谷歌和百度搜索@base64://Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICAgICAgIOOAkOWxj+iUveW5v+WRiuOAkeWxj+iUveiwt+atjOW5v+WRiuOAgeeZvuW6puW5v+WRiuOAgeefpeS5juW5v+WRiuOAgemakOiXj+iwt+atjOWSjOeZvuW6puaQnOe0ouWinuW8uueZvuW6puaQnOe0oue7k+aenOeahOWQhOenjeW5v+WRiuetieetie+8iOi/h+a7pOaJgOaciemHh+eUqOiwt+atjOiBlOebn+WSjOeZvuW6puiBlOebn+etieW5v+WRiuiBlOebn+eahOW5v+WRiu+8iQovLyBAbmFtZXNwYWNlIGh0dHA6Ly9nb25nanUuZGFkaXlvdWh1aTAzLmNuL2FwcC90b29sL3lvdWhvdS9pbmRleC5odG1sCi8vIEB2ZXJzaW9uICAgICAgICAgICA0LjgwMwovLyBAZGVzY3JpcHRpb24gICAgICDlvLrlipvmqKHlvI/lj6/pmpDol4/lpKfpg6jliIbmgqzmta7lub/lkYrvvIzmlrDlop50d2l0dGVy5ZKMWW91dHViZeW+ruWNmuinhumikeS4i+i9veS7peWPiuW5v+WRiui/h+a7pO+8jOWPr+aMiee9keWdgOWSjOWFs+mUruivjeWxj+iUvei/h+a7pOeZvuW6puiwt+atjOW/heW6lGJpbmczNjDlvq7kv6Hlvq7ljZrnn6XkuY7osYbnk6NC56uZ55qE5pCc57Si57uT5p6c44CB5bGP6JS96LC35q2M5o6o5bm/55qE5bm/5ZGK5ZKM5Y6755+l5LmO5bm/5ZGK44CBY3NkbuW5v+WRiuOAgeWOu+eZvuW6puaQnOe0ouW5v+WRiuOAgeWOu+eZvuW6puefpemBk+W5v+WRiuOAgeWOu+eZvuW6puaWh+W6k+W5v+WRiuOAgeWOuzM2MOaQnOe0ouW5v+WRiu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lOTElOEElRTMlODAlODElRTclOUYlQTUlRTQlQjklOEUlRTUlQjklQkYlRTUlOTElOEElRTMlODAlODElRTklOUElOTAlRTglOTclOEYlRTglQjAlQjclRTYlQUQlOEMlRTUlOTIlOEMlRTclOTklQkUlRTUlQkElQTYlRTYlOTAlOUMlRTclQjQlQTIlRTUlQTIlOUUlRTUlQkMlQkElRTclOTklQkUlRTUlQkElQTYlRTYlOTAlOUMlRTclQjQlQTIlRTclQkIlOTMlRTYlOUUlOUMlRTclOUElODQlRTUlOTAlODQlRTclQTclOEQlRTUlQjklQkYlRTUlOTElOEElRTclQUQlODklRTclQUQlODklRUYlQkMlODglRTglQkYlODclRTYlQkIlQTQlRTYlODklODAlRTYlOUMlODklRTklODclODclRTclOTQlQTglRTglQjAlQjclRTYlQUQlOEMlRTglODElOTQlRTclOUIlOUYlRTUlOTIlOEMlRTclOTklQkUlRTUlQkElQTYlRTglODElOTQlRTclOUIlOUYlRTclQUQlODklRTUlQjklQkYlRTUlOTElOEElRTglODElOTQlRTclOUIlOUYlRTclOUElODQlRTUlQjklQkYlRTUlOTElOEElRUYlQkMlODkubWV0YS5qcwovLyA9PS9Vc2VyU2NyaXB0PT0KLyoK6ZyA6KaB5pu05aSa5Yqf6IO95ZKM5bu66K6u55qE6K+d77yMCuasoui/jui3n+W4luWPjemmiArjgJDnvZHnq5nlub/lkYrkvJjljJbjgJHnmb7luqbotLTlkKfjgIHnmb7luqbnn6XpgZPjgIHnmb7luqbmkJzntKLnrYnnmb7luqbns7vljrvlub/lkYrkvJjljJYK5aSn5aSa5pWw572R56uZ6Iul5L2/55So5LqG6LC35q2M5bm/5ZGK44CB55m+5bqm5bm/5ZGK55qE6aG16Z2i6YO95bCG5Lya6KKr5YeA5YyW5bm26ZqQ6JeP55u45YWz5bm/5ZGKCumSiOWvueWkp+mDqOWIhue9keermemAmueUqOeahOW5v+WRiuagt+W8j+i/m+ihjOWxj+iUvee+juWMlgrlj6/mjInnvZHlnYDlkozlhbPplK7or43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mlnKTsKICAgICBzb3NvcmVzZXQoKTsKICAgICBhbGVydCgi5bey6L+Y5Y6f6buY6K6k6K6+572uIik7CgkgICAgICAgICAgIH0pOwogfSkKCQl2YXIgemtkZG9tYWluID0gZG9jdW1lbnQuZG9tYWluOwoJCXZhciB6a2R1cmxkb21haW4gPSBsb2NhdGlvbi5ocmVmOwoJCSB2YXIgemhpaHVkbD0wOwogCQkgdmFyIGtnbW1tPTA7CmlmIChHTV9nZXRWYWx1ZSgnYWxsY29uZmlnJykud2hpdGV1cmwpewogaWYgKEdNX2dldFZhbHVlKCdhbGxjb25maWcnKS53aGl0ZXVybC5sZW5ndGg+MCApewogICAgZm9yKGxldCBiIGluIEdNX2dldFZhbHVlKCdhbGxjb25maWcnKS53aGl0ZXVybCl7CiAgICAgICAgIGlmICh6a2Rkb21haW4uaW5kZXhPZihHTV9nZXRWYWx1ZSgnYWxsY29uZmlnJykud2hpdGV1cmxbYl0pID49MCl7CiAgICAgICAgICBrZ21tbT0xOwogICAgICAgICB9CiAgICAgICAgICAgICB9CiAgICAgICAgICAgICBpZiAoa2dtbW09PTEpewogICAgICAgICAgICAgCSByZXR1cm47CiAgICAgICAgICAgICB9CiAgICAgICAgICAgICB9CiAgICAgICAgICAgfQoKCgppZih6a2Rkb21haW4uaW5kZXhPZigiLm9wLmdnIikgPiAwICkgewogJCgiLnZtLXBsYWNlbWVudCIpLnJlbW92ZSgpOwp9CgppZih6a2Rkb21haW4uaW5kZXhPZigiLmN0eXVuLmNuIikgPj0gMCB8fCB6a2Rkb21haW4uaW5kZXhPZigiY2xvdWQuMTg5LmNuIikgPj0gMCkgewpyZXR1cm47Cn0KCgoKCgoKdmFyIGdvaW5nbnVtYT0xOwp2YXIgZ29pbmdudW1iPTEwOwogJChkb2N1bWVudCkucmVhZHkoZnVuY3Rpb24oKSB7CiB2YXIgcmVmID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKSB7CmtncGluZ2Jpc2dvKCk7Cn0sIDEwMDApOwoK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oJ3R5cGUnKSA9PT0gJ2VtYWlsJyB8fAogICAgICAgJHRoaXMuYXR0cigndHlwZScpID09PSAncGhvbmUnIHx8CiAgICAgICR0aGlzLmF0dHIoJ25hbWUnKSA9PT0gJ2VtYWlsJyB8fAogICAgICAkdGhpcy5hdHRyKCduYW1lJykgPT09ICdjb2RlJyB8fAogICAgICAkdGhpcy5hdHRyKCduYW1lJykgPT09ICdwaG9uZScgfHwKICAgICAgcGxhY2Vob2xkZXIuaW5kZXhPZign5omL5py6JykgIT09IC0xIHx8CiAgICAgIHBsYWNlaG9sZGVyLmluZGV4T2YoJ+mCrueusScpICE9PSAtMSB8fAogICAgICBwbGFjZWhvbGRlci5pbmRleE9mKCfotKblj7cnKSAhPT0gLTEgfHwKICAgICAgcGxhY2Vob2xkZXIuaW5kZXhPZign5a+G56CBJykgIT09IC0xIHx8CiAgICAgIHBsYWNlaG9sZGVyLmluZGV4T2YoJ+azqOWGjCcpICE9PSAtMSkgewogICAga2dwaW5nYmlzd2hpdGV6dCA9IGZhbHNlOwogICAgcmV0dXJuIGZhbHNlOwogIH0KfSk7CiAvL+ivtOaYju+8muatpOWkhOaYr+S4uuS6huWMuemFjeafkOS6m+e9keermeeZu+mZhuaXtuaPkuS7tumUmeivr+Wxj+iUveeZu+mZhumqjOivgeeahOmhtemdoumcgOimge+8jOmYsuatouS4jeiDveato+W4uOeZu+mZhuOAguW5tuaXoOayoeacieaUtumbhueUqOaIt+eahOS7u+S9leS/oeaBrwogdmFyIGNsYXNzTmFtZXMgPSBbJ2RhdGEtZG93bi11aScsICdkYXRhLWRvd24tdWkxJywgJ2RhdGEtZG93bi11aTInXTsKZm9yICh2YXIgaSA9IDA7IGkgPCBjbGFzc05hbWVzLmxlbmd0aDsgaSsrKSB7CiAgICB2YXIgY2xhc3NOYW1lID0gY2xhc3NOYW1lc1tpXTsKICAgIGlmIChkb2N1bWVudC5nZXRFbGVtZW50c0J5Q2xhc3NOYW1lKGNsYXNzTmFtZSkubGVuZ3R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0bWwoJzxkaXYgY2xhc3M9IkNvbW1lbnRDb250ZW50IGNzcy0xeWdkcmU4Ij7op6blj5Hoh6rlrprkuYnlhbPplK7or43vvIzlt7LlsY/olL08L2Rpdj4nKTsKICAgICAgICAgfQogICAgICAgICAgICAgfQogIAkgICB9KQoKCiAkKCJkaXZbcm9sZT0nbGlzdCddIikuZmluZCgiLkxpc3QtaXRlbSIpLmVhY2goZnVuY3Rpb24oayx2KXsKIAkgaWYgKCQodGhpcykuYXR0cigiemtkeCIpKXt9ZWxzZXsKICQodGhpcykuYXR0cigiemtkeCIsIjEiKTsKICAgICBsZXQgenhjdmxrdz0kKHRoaXMpLmZpbmQoImRpdltjbGFzcz0nUmljaENvbnRlbnQtaW5uZXInXSIpLnRleHQoKS5yZXBsYWNlKC9cICsvZywiIik7CiAgICAgbGV0IHpoZGF6aHU9JCh0aGlzKS5maW5kKCJzcGFuW2NsYXNzPSdVc2VyTGluayBBdXRob3JJbmZvLW5hbWUnXSIpLnRleHQoKTsKICAgICB6eGN2bGt3PXp4Y3Zsa3cremhkYXpodTsKICAgICAvL+mXrumimOWbnuetlAogIAkgICBmb3IobGV0IGIgaW4gR01fZ2V0VmFsdWUoJ2FsbGNvbmZpZycpLnBpbmdiaWt3KXsKICAgICAgICAgaWYgKHp4Y3Zsa3cuaW5kZXhPZihHTV9nZXRWYWx1ZSgnYWxsY29uZmlnJykucGluZ2Jpa3dbYl0pID49MCl7CiAgICAgICAgICAkKHRoaXMpLnJlbW92ZSgpOwogICAgICAgICB9CiAgICAgICAgICAgICB9CgoKICAgICAgICAgICAgIAkgaWYgKCAkKHRoaXMpLmZpbmQoImxpIikubGVuZ3RoPjApewogIC8v6Zeu6aKY6K+E6K66CiAgICAgICAgICAgICAJICAgCSAgICAkKHRoaXMpLmZpbmQoImxpIikuZWFjaChmdW5jdGlvbihoLGopewogICBsZXQgenhjdmxrdz0kKHRoaXMpLmZpbmQoImRpdltjbGFzcz0nQ29tbWVudFJpY2hUZXh0IENvbW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pbmUtYmxvY2s7IG1heC13aWR0aDoyNHB4OyBwb3NpdGlvbjogcmVsYXRpdmU7IHRvcDogM3B4O2JhY2tncm91bmQ6IHJnYmEoMCwgMCwgMCwgMCk7bWFyZ2luLXJpZ2h0OiA4cHg7Ij48aW1nICBzdHlsZT0ibWF4LXdpZHRoOjI0cHg7IiBzcmM9IicrdXJsZG9mYXZpY29uKyciICA+PC9kaXY+Jyk7CgogICAgCSAgIAkgICAJIH0KICAgIAkgICAJICAgCSB9CiAgICAgICAgfSkKCiAgICAJICAgIGlmIChHTV9nZXRWYWx1ZSgnYWxsY29uZmlnJykuYmFpZHUuYmFpZHVsaWFuamllPT10cnVlKXsKICAgICAgICAgZm9yKGxldCBiIGluIEdNX2dldFZhbHVlKCdhbGxjb25maWcnKS5waW5nYml1cmwpewogICAgICAgICBpZiAodXJseHp2LmluZGV4T2YoR01fZ2V0VmFsdWUoJ2FsbGNvbmZpZycpLnBpbmdiaXVybFtiXSkgPj0wKXsKICAgICAgICAgICAkKGhmZCkucmVtb3ZlKCk7CiAgICAgICAgICAgICBwaW5nYmlqYz0xOwogICAgICAgICB9CiAgICAgICAgICAgICB9CiAgICB9CgogIGlmICggcGluZ2JpamM9PTAgICl7CiAgICAgICAgIGZvcihsZXQgYiBpbiBHTV9nZXRWYWx1ZSgnYWxsY29uZmlnJykucGluZ2Jpa3cpewogICAgICAgICBpZiAodXJseHp0LmluZGV4T2YoR01fZ2V0VmFsdWUoJ2FsbGNvbmZpZycpLnBpbmdiaWt3W2JdKSA+PTApewogICAgICAgICAgJChoZmQpLnJlbW92ZSgpOwoKICAgICAgICAgfQogICAgICAgICAgICAgfQogICAgfQogICAgIH0KIH0KCiAgCSAgICAgfSk7Cgl9CgogICAgIGlmIChHTV9nZXRWYWx1ZSgnYWxsY29uZmlnJykuYmFpZHUua2dnb29nbGVlZD09dHJ1ZSl7CiQoIi5hZHNieWdvb2dsZSIpLnJlbW92ZSgpOwovLyQoIiN0YXciKS5yZW1vdmUoKT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G9zZUJ0biddIikuY2xpY2soKTsKIAkgIH0KCSAgJCgiI3Jlc19uZXdzX2Zsb3cgIikuZmluZCgibGkiKS5lYWNoKGZ1bmN0aW9uKCkgewogaWYgKCQodGhpcykuZmluZCgic3BhbltjbGFzcz0ndHh0J10iKS5sZW5ndGggPiAwKXsKICAgICAgaWYgKCQodGhpcykuZmluZCgic3BhbltjbGFzcz0ndHh0J10iKS50ZXh0KCk9PSflub/lkYonKXsKJCh0aGlzKS5yZW1vdmUoKTsKICAgfQogICAgICAgIH0KICAgICAgICB9KQogICAgICAgIAl9CiAgICAgIAkgfQogICAgICAJICAgICAgICAJICBpZiAoemtkdXJsZG9tYWluLmluZGV4T2YoJ20uc28uY29tL3MnKSA+IDAgKXsKICAgICAgCSAgb3BlbnhjZCgpOwogICAgICAJICAkKCJkaXZbY2xhc3NePSdnLWNhcmQgcmVzLWxpc3QnXSIpLmVhY2goZnVuY3Rpb24obWluZGV4LG1tZW50KSB7CiAgICAgIAkgIAkgICAgIGlmICggJCh0aGlzKS5hdHRyKCJkYXRhLWt3a3dlZCIpPT11bmRlZmluZWQgKXsKaWYgKCQodGhpcykudGV4dCgpKXsKCSAkKHRoaXMpLmF0dHIoImRhdGEta3drd2VkIiwiMSIpOwoJICAgICAgICAgICAgbGV0IHBpbmdiaWNpPSQodGhpcykudGV4dCgpOwogaWYgKEdNX2dldFZhbHVlKCdhbGxjb25maWcnKS5iYWlkdS5rZzM2MGFkPT10cnVlKXsKICAgICAgICAgZm9yKGxldCBiIGluIEdNX2dldFZhbHVlKCdhbGxjb25maWcnKS5waW5nYmlrdyl7CiAgICAgICAgIGlmIChwaW5nYmljaS5pbmRleE9mKEdNX2dldFZhbHVlKCdhbGxjb25maWcnKS5waW5nYmlrd1tiXSkgPj0wKXsKICQobW1lbnQpLnJlbW92ZSgpOwoKICAgICAgICAgfQogICAgICAgICAgICAgfQogIH0KfQp9CiBpZiAoICQodGhpcykuYXR0cigiZGF0YS1rd3VybGVkIik9PXVuZG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ICAgICBsZXQgcGluZ2JpamM9MDsKICAgICBpZiAodXJseHp2KXsKICAgICAJICAgIGlmIChHTV9nZXRWYWx1ZSgnYWxsY29uZmlnJykuYmFpZHUua2czNjBhZD09dHJ1ZSl7CiAgICBpZiAoR01fZ2V0VmFsdWUoJ2FsbGNvbmZpZycpLmJhaWR1LmJhaWR1bGlhbmppZT09dHJ1ZSl7CiAgICAgICAgIGZvcihsZXQgYiBpbiBHTV9nZXRWYWx1ZSgnYWxsY29uZmlnJykucGluZ2JpdXJsKXsKICAgICAgICAgaWYgKHVybHh6di5pbmRleE9mKEdNX2dldFZhbHVlKCdhbGxjb25maWcnKS5waW5nYml1cmxbYl0pID49MCl7CiAgICAgICAgICAgJChoZmQpLnJlbW92ZSgpOwogICAgICAgICAgICAgcGluZ2JpamM9MTsKICAgICAgICAgfQogICAgICAgICAgICAgfQogICAgfQoKICBpZiAoIHBpbmdiaWpjPT0wKXsKICAgICAgICAgZm9yKGxldCBiIGluIEdNX2dldFZhbHVlKCdhbGxjb25maWcnKS5waW5nYmlrdyl7CiAgICAgICAgIGlmICh1cmx4enQuaW5kZXhPZihHTV9nZXRWYWx1ZSgnYWxsY29uZmlnJykucGluZ2Jpa3dbYl0pID49MCl7CiAgICAgICAgICAkKGhmZCkucmVtb3ZlKCk7CgogICAgICAgICB9CiAgICAgICAgICAgICB9CiAgICB9CiAgICB9CiB9Cn0pOwoKCiAgICAgaWYgKEdNX2dldFZhbHVlKCdhbGxjb25maWcnKS5iYWlkdS5rZzM2MGVkPT10cnVlKXsKCSAgIAkgICAkKCIjZV9pZGVhX3BwIikucmVtb3ZlKCk7CgkgICAJICAgICAgLy8gICQoIiNzaWRlIikucmVtb3ZlKCk7CgkgICAkKCIjcmlnaHRfc2hvd190b3AiKS5yZW1vdmUoKTsKCSAgICQoIiNyaWdodF9zaG93IikucmVtb3ZlKCk7CgkgICAkKCIjc29fa3ctYWQiKS5yZW1vdmUoKTsKCSAgICQoIiNsbS1yaWdodGJvdHRvb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IikucmVtb3ZlKCk7CiAgICAgICAgIGlmIChHTV9nZXRWYWx1ZSgnYWxsY29uZmlnJykuYmFpZHUua2diYWlkdWFkPT10cnVlKXsKJCgiZGl2W2NsYXNzPSdjLXJlc3VsdC1jb250ZW50J10iKS5lYWNoKGZ1bmN0aW9uKG1pbmRleCxtbWVudCkgewppZiAoJChtbWVudCkudGV4dCgpKXsKCSAgICAgICAgICAgIGxldCBwaW5nYmljaT0kKHRoaXMpLnRleHQoKTsKICAgICAgICAgaWYgKCAkKG1tZW50KS5hdHRyKCJkYXRhLWt3a3dlZCIpPT11bmRlZmluZWQgKXsKICAgICAgICAgZm9yKGxldCBiIGluIEdNX2dldFZhbHVlKCdhbGxjb25maWcnKS5waW5nYmlrdyl7CiAkKG1tZW50KS5hdHRyKCJkYXRhLWt3ZWQiLCIxIik7CiAgICAgICAgIGlmIChwaW5nYmljaS5pbmRleE9mKEdNX2dldFZhbHVlKCdhbGxjb25maWcnKS5waW5nYmlrd1tiXSkgPj0wKXsKICQobW1lbnQpLnJlbW92ZSgpOwogICAgICAgICB9CiAgICAgICAgICAgICB9CiAgICB9Cgp9CiAgICBpZiAoICQobW1lbnQpLmF0dHIoImRhdGEta3d1cmxlZCIpPT11bmRlZmluZWQgKXsKaWYgKCQobW1lbnQpLmZpbmQoImFydGljbGUiKSl7CglpZiAoJChtbWVudCkuZmluZCgiYXJ0aWNsZSIpLmF0dHIoInJsLWxpbmstaHJlZiIpKXsKbGV0IGJkenhtdXJsPSQobW1lbnQpLmZpbmQoImFydGljbGUiKS5hdHRyKCJybC1saW5rLWhyZWYiKTsKICBHTV94bWxodHRwUmVxdWVzdCh7CiAgICAgICAgICAgICAgICAgIG1ldGhvZCA6ICJHRVQiLAogICAgICAgICAgICAgICAgIGRhdGFUeXBlOiAianNvbiIsCiAgICAgICAgICAgICAgICAgdGltZW91dDogMTAwMCwKICAgICAgICAgICAgICAgIHVybCA6IGJkenhtdXJsLAogIG9ucmVhZHlzdGF0ZWNoYW5n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BkdXJsdHh0PXh6YnQudGV4dCgpOwogICAgICAgICAgIGxldCBkdXJsaHRtbD1kdXJsdHh0OwogICAgICAgICAgICBsZXQgd3VybD0iIjsKICAgICAgICAgICAgICAgICAgR01feG1saHR0cFJlcXVlc3QoewogICAgICAgICAgICAgICAgICBtZXRob2QgOiAiR0VUIiwKICAgICAgICAgICAgICAgICBkYXRhVHlwZTogImpzb24iLAogICAgICAgICAgICAgICAgIHRpbWVvdXQ6IDIwMDAsCiAgICAgICAgICAgICAgICB1cmwgOiBkdXJsLAogIG9ucmVhZHlzdGF0ZWNoYW5nZSA6IGZ1bmN0aW9uIChyZXNwb25zZSkgewogIGlmIChyZXNwb25zZS5yZXNwb25zZSl7CiAgIHZhciB1cmx6eGEyPXJlc3BvbnNlLnJlc3BvbnNlLm1hdGNoKC9VUkw9XCcoXFMqKVwnLyk7CiAgIHh6YnQuYXR0cigiaHJlZiIsdXJsenhhMlsxXSk7CiAgIGR1cmw9dXJsenhhMlsxXTsKICAgICQoZWxlbWVudCkuYXR0cigiZC1uZXciLCIxIik7CgogICAgCSBpZiAoZHVybCl7CiAgICAJIGxldCBiZHZidCA9ICQoZWxlbWVudCkuY2hpbGRyZW4oJzpsYXN0LWNoaWxkJykuZmluZCgnLmMtc2hvd3VybC5jLWNvbG9yLWdyYXknKTsKCiAgaWYgKGJkdmJ0KXsKICAJICAgIGxldCBkdXJsdnR4dD1iZHZidC50ZXh0KCk7CiAgCSAgICAgbGV0IGFkZHVybD11cmx6eGEyWzFdOwogIC8vCSAgICBjb25zb2xlLmxvZyhiZHZidC5odG1sKCkpCiAgIGxldCBhZGR4dXJsZG9tYWluID0gdXJsenhhMlsxXS5zcGxpdCgiLyIpOwogICAgIGlmKCBhZGR4dXJsZG9tYWluWzJdICkgewogICAgYWRkeHVybD1hZGR4dXJsZG9tYWluWzJdOwp9CiAgICAJIAkgICAgaWYgKGR1cmx2dHh0LmluZGV4T2YoJy4nKSA8IDApewogICAgCWR1cmx2dHh0PWR1c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YWluLmluZGV4T2YoJ3poaWRhby5iYWlkdS5jb20nKSA+IDApewogICAgICAgICQoIi5zaG9wLWVudHJhbmNlIikucmVtb3ZlKCk7CiAgICAgICAgJCgiLmFjdGl2aXR5LWVudHJ5IikucmVtb3ZlKCk7CiAgICAgICAgJCgiLnRhc2stbGlzdC1idXR0b24iKS5yZW1vdmUoKTsKICAgIH0KICAgICBpZih6a2R1cmxkb21haW4uaW5kZXhPZignemhpZGFvLmJhaWR1LmNvbS9pbmRleC8nKSA+IDApewogICAgIAkgICAgaWYgKGlzTW9iaWxlKCkpewogICAgCSAgIAkgICAgJCgiZGl2W2NsYXNzPSdlY3Mtd3JhcGVyJ10iKS5yZW1vdmUoKTsKICAgIAkgICB9CiAgICAgfQogICAgaWYoemtkdXJsZG9tYWluLmluZGV4T2YoJ3poaWRhby5iYWlkdS5jb20vc2VhcmNoJykgPiAwKXsKICAgIAkgICAgCSBpZiAoJCgiaVtjbGFzcz0nYXJpYWljb24gYXJpYWljb24tZXhpdCBhcmlhZXhpdCBmaXhlZFNlbGVjdCBhcmlhc2tpcHRoZW1lJ10iKS5sZW5ndGg+MCl7CiAgICAJIAkgICQoImlbY2xhc3M9J2FyaWFpY29uIGFyaWFpY29uLWV4aXQgYXJpYWV4aXQgZml4ZWRTZWxlY3QgYXJpYXNraXB0aGVtZSddIikuY2xpY2soKTsKICAgIAkgfQogICAgCSAgIGlmIChpc01vYmlsZSgpKXsKICAgIAkgICAJICAgICQoImRpdltjbGFzcz0nZWNzLXdyYXBlciddIikucmVtb3ZlKCk7CiAgICAJICAgfQoKICAgICAgICAkKCIuYmFubmVyZG93biIpLnJlbW92ZSgpOwogICAgICAgICQoIi5hc2lkZS5maXhoZWlnaHQiKS5yZW1vdmUoKTsKICAgICAgICAkKCIud2d0LWJvdHRvbS1hc2siKS5yZW1vdmUoKTsKICAgICAgICAkKCIubGVmdHVwIikucmVtb3ZlKCk7CiAgICAgICAgJCgiLndndC1pa25vdy1zcGVjaWFsLWJ1c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MoJ2hlaWdodCcsJ2F1dG8nKTsKICAgICAgICAgIH0KICAgIAkkKCIja25vd2xlZGdlLWFuc3dlciIpLnJlbW92ZSgpOwogICAgCSQoIi5ncmlkLXIucWItc2lkZSIpLnJlbW92ZSgpOwogICAgICAgICQoIi53Z3QtYWRzIikucmVtb3ZlKCk7CiAgICAgICAgJCgiLndndC1ib3R0b20tdW5pb24iKS5yZW1vdmUoKTsKICAgICAgICAkKCIuYWRUb3BJbWciKS5yZW1vdmUoKTsKICAgICAgICAkKCIuZXhwLXRvcHdsZC10aXAiKS5yZW1vdmUoKTsKICAgICAgICAkKCIjd2d0LWVjb20tYmFubmVyIikucmVtb3ZlKCk7CiAgICAgICAgJCgiI3dndC1lY29tLXJpZ2h0IikucmVtb3ZlKCk7CiAgICAgICAgJCgiLnF1ZXN0aW9uLW51bWJlci10ZXh0LWNoYWluIikucmVtb3ZlKCk7CgogICAgICAgICAgICAkKCIuZWMtcGNfbWF0X2NvZXVzX19yZWxhdGVkX2xpbmtfdGV4dC1jb250ZW50IikucmVtb3ZlKCk7CgogICAgfQoKICAgICBpZih6a2R1cmxkb21haW4uaW5kZXhPZignd2FwYmFpa2UuYmFpZHUuY29tL2l0ZW0nKSA+PSAwKXsKCSQoImRpdltjbGFzcz0neWl0aWFvLWNvbnRlbnQgSi15aXRpYW8tY29udGVudCddIikucmVtb3ZlKCk7Cn0KICAgIGlmKHprZHVybGRvbWFpbi5pbmRleE9mKCdiYWlrZS5iYWlkdS5jb20nKSA+IDApewoKICAgICAgICAgICAgJCgiI25hdmJhckFkTmV3IikucmVtb3ZlKCk7CiAgICAgICAgICAgICQoIi51c2VyYmFyX21hbGwiKS5yZW1vdmUoKTsKCiAgICB9CiAgICBpZih6a2R1cmxkb21haW4uaW5kZXhPZignYmFpa2UuYmFpZHUuY29tL2l0ZW0nKSA+IDApewogJCgiYVtvbmNsaWNrXj0ncGFnZS5NaXhlZG9yLm1peGVkT3Blbih0aGlzIikucmVtb3ZlKCk7CgkkKCIueWl0aWFvLWNvbnRhaW5lciIpLnJlbW92ZSgpOwogICAgICAgIC8vJCgiLmJlZm9yZS1jb250ZW50IikucmVtb3ZlKCk7IOeZvuW6pueZvuenkeWkmuS5ieivjeWSjOenkuaHgueZvuenkeinhumikeebuOWFswogICAgICAgICQoIi5jb25maWdNb2R1bGVCYW5uZXIiKS5yZW1vdmUoKTsKCiAgICAgICAgICAgICQoIi50b3BBIikucmVtb3ZlKCk7CiAgICAgICAgICAgICQoIi5yaWdodC1hZCIpLnJlbW92ZSgpOwogICAgICAgICAgICAkKCIuYm90dG9tLXJlY29tbWVuZC13cmFwcGVyIikucmVtb3ZlKCk7CiAgICAgICAgICAgICQoIi5sZW1tYVdndC1wcm9tb3Rpb24tdmJhaWtlIikucmVtb3ZlKCk7CiAgICAgICAgICAgICQoIi5sZW1tYVdndC1wcm9tb3Rpb24tc2xpZGUiKS5yZW1vdmUoKTsKICAgICAgICAgICAgJCgiI3NpZGVfYm94X3VuaW9uQWQiKS5yZW1vdmUoKTsKCiAgICB9CgogICAgaWYoemtkdXJsZG9tYWluLmluZGV4T2YoJ3dlbmt1LmJhaWR1LmNvbScpID4gMCl7CiAgICAgICAgJCgiLmJhbm5lci1hZCIpLnJlbW92ZSgpOwogICAgICAgICQoIi5hZC1ib3giKS5yZW1vdmUoKTsKICAgICAgICAkKCIjYmFudXJsIikucmVtb3ZlKCk7CiAgICAgICAgJCgiI215LXdrSG9tZS12aXAtdGlwcyIpLnBhcmVudCgpLnJlbW92ZSgpOwogICAgICAgICQoIi52aXAtY2FyZCIpLnJlbW92ZSgpOwoKICAgICAgICAgICAgJCgiLnpzai10b3BiYXIiKS5yZW1vdmUoKTsKICAgICAgICAgICAgJCgiLmxhc3RjZWxsLWRpYWxvZyIpLnJlbW92ZSgpOwogICAgICAgICAgICAkKCIuenNqLXRvcHBvcyIpLnJlbW92ZSgpOwogICAgICAgICAgICAkKCIuZmMtcmVzdWx0LWNvbnRhaW5lciIpLnJlbW92ZSgpOwo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oImRpdltpZCo9J3BjJ10iKS5yZW1vdmUoKTsKICAgICAgICAgICAgJCgiZGl2W2lkKj0nUEMnXSIpLnJlbW92ZSgpOwogICAgICAgICAgICAkKCJkaXZbaWQqPSdhZHYtY2Fyb3VzZWwtaXRlbSddIikucGFyZW50KCkucmVtb3ZlKCk7CiAgICAgICAgICAgICQoIltpZCo9J0ZlZWRBZFN5cyddIikucmVtb3ZlKCk7CiAgICAgICAgICAgICQoImRpdltpZCo9J1RhYkFkJ10iKS5yZW1vdmUoKTsKICAgICAgICAgICAgJCgiLnNlY3Rpb24tYWQiKS5yZW1vdmUoKTsKICAgICAgICAgICAgJCgiLmZ1bGwtY29sbHVubS1hZCIpLnJlbW92ZSgpOwoKICAgIH0KICAgIGlmKHprZHVybGRvbWFpbi5pbmRleE9mKCd2aWRlby5iYWlkdS5jb20vdicpID4gMCB8fCB6a2R1cmxkb21haW4uaW5kZXhPZigndi5iYWlkdS5jb20vdicpID4gMCl7CgogICAgICAgICQoIi50b3AtYWQtY29udCIpLnJlbW92ZSgpOwoKCiAgICAgICAgICAgICQoImRpdltpZCo9J3NlYXJjaE1vcmVMb25nJ10iKS5yZW1vdmUoKTsKICAgICAgICAgICAgJCgiI3NlYXJjaFBhZ2VmZWVkQmFubmVyIikucmVtb3ZlKCk7CiAgICAgICAgICAgICQoIi5zaWRlLWNvbnRlbnQiKS5yZW1vdmUoKTsKICAgICAgICAgICAgJCgiI3BzQm90dG9tQ29sdW1uIikucGFyZW50KCkucmVtb3ZlKCk7CgoKCiAgICAgICAgICAgICQoIiNzZWFyY2hSZXN1bHRBZE9uZSIpLnJlbW92ZSgpOwogICAgICAgICAgICAkKCIjc2VhcmNoSG90U2hvcnRTZXZlbiIpLnJlbW92ZSgpOwogICAgICAgICAgICAkKCIjc2VhcmNoSG90U2hvcnRTZXZlblR3byIpLnJlbW92ZSgpOwoKICAgIH0KICAgIGlmKHprZHVybGRvbWFpbi5pbmRleE9mKCd3d3cuYmFpZHUuY29tL3NmL3ZzZWFyY2gnKSA+IDApewoKICAgICAgICAkKCIjc190YWIiKS5uZXh0KCkubmV4dCgpLmVhY2goZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIHZhciBpZCA9IFN0cmluZygkKHRoaXMpLmF0dHIoImlkIikpOwogICAgICAgICAgICBpZiAoaWQgPT0gInVuZGVmaW5lZCIpIHsKICAgICAgICAgICAgICAgICQodGhpcykucmVtb3ZlKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9KQogICAgfQogICAgIH0KIH0KICB9CiBmdW5jdGlvbiBkZWx6aGlodSgpIHsKIAkgaWYgKGxvY2F0aW9uLmhyZWYuaW5kZXhPZignbGluay56aGlodS5jb20vP3RhcmdldD0nKT49IDAgKSB7CgogaWYgKCQoJ3BbY2xhc3M9ImxpbmsiXScpLmxlbmd0aD4wICApewogICB3aW5kb3cubG9jYXRpb24uaHJlZj0kKCJwW2NsYXNzPSdsaW5rJ10iKS50ZXh0KCk7CiAgfQoKfQogaWYoemtkdXJsZG9tYWluLmluZGV4T2YoJ3poaWh1LmNvbScpID4gMCl7CiAgIGlmIChHTV9nZXRWYWx1ZSgnYWxsY29uZmlnJykuYmFpZHUua2d6aGlodWVkPT10cnVlKXsKICAgCSAgICQoImRpdltjbGFzcz0nUGMtY2FyZCBDYXJkJ10iKS5yZW1vdmUoKTsKICAgCSAgICBpZih6a2R1cmxkb21haW4uaW5kZXhPZignemhpaHUuY29tL3NpZ25pbj8nKSA+IDApewogICAJICAgIAl3aW5kb3cubG9jYXRpb24uaHJlZj0naHR0cHM6Ly93d3cuemhpaHUuY29tL2tub3dsZWRnZS1wbGFuL2hvdC1xdWVzdGlvbi9ob3QvMC9kYXknOwogICAJICAgICAgICB9CgogICAJICAgICAgCSAgIGlmIChpc01vYmlsZSgpKXsKICAgICAgICAkKCJhW2NsYXNzPSdNQmFubmVyQWQnXSIpLnJlbW92ZSgpOwogICAgICAgICQoImFbY2xhc3M9J01Ib3RGZWVkQWQnXSIpLnJlbW92ZSgp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l7CiAgICAgICAgICAgIGFkY2xvc2UuY2xpY2soKTsKICAgICAgICB9CiAgICB9CiAgICAgICAgZnVuY3Rpb24gZ2V0eXR2ZWxlKCl7CiAgICBpZigkKCdkaXYjaW5mby1jb250ZW50cycpLmxlbmd0aD4wKXsKICAgICAgIC8vIGFkZGJ0bigpOwogICAgfWVsc2V7CiAgICBzZXRUaW1lb3V0KGdldHl0dmVsZSw1MDApOwogICAgfQogICAgfQogICAgICBmdW5jdGlvbiBpbnliaXQoKXsKICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCd5dGQtcG9wdXAtY29udGFpbmVyJykuc3R5bGUuZGlzcGxheT0nJzsKICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCd5dGQtYXBwJykuc3R5bGUuekluZGV4PScnOwogICAgfQogICAgICAgIGZ1bmN0aW9uIHJleXRiKCl7CiAgICAgICAgY2xvc2V5dEFkcygpOwoKICAgICAgICBpZihsb2NhdGlvbi5ocmVmIT09emtkdXJsZG9tYWluKQogICAgICAgIHsKCiAgICAgICAgaW55Yml0KCk7CiAgICAgICAgemtkdXJsZG9tYWluPWxvY2F0aW9uLmhyZWY7CiAgICAgICAgZ2V0eXR2ZWxlKCk7CiAgICAgICAgfQoKICAgIH0KICAgIGlmKHprZHVybGRvbWFpbi5pbmRleE9mKCJ5b3V0dWJlLmNvbSIpID49IDAgKSB7Cglnb2luZ251bWI9OTk5OTk5OTkyOwogICAgICBzZXRJbnRlcnZhbChmdW5jdGlvbigpewogICAgIHJleXRiKCk7CiAgICAgcmV5ZG93bigpOwogICAgICAgfSwxNTAwKTsKICAgIH0KICAgICAgc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKICAgICBkZWx0d2l0dGVyKCkKICAgICAgIH0sMTUwMCk7CgoKICAgICBmdW5jdGlvbiBkZWx0d2l0dGVyKCkgewogICAgaWYoemtkdXJsZG9tYWluLmluZGV4T2YoInR3aXR0ZXIuY29tIikgPj0gMCApIHsKC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