xiaomianao666

插件名:global_大人的Greasyfork-源代码

Jul 22nd, 2024
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_大人的Greasyfork-源代码@base64://Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICBHcmVhc3lmb3JrIFNlYXJjaCB3aXRoIFNsZWF6eWZvcmsgUmVzdWx0cyBpbmNsdWRlCi8vIEBuYW1lOnpoLUNOICAg5aSn5Lq655qER3JlYXN5Zm9yawovLyBAbmFtZTp6aC1UVyAgIOWkp+S6uueahEdyZWFzeWZvcmsKLy8gQG5hbWU6amEgICAgICDlpKfkurrjga5HcmVhc3lmb3JrCi8vIEBuYW1lc3BhY2UgICAgaG9vdGhpbgovLyBAdmVyc2lvbiAgICAgIDEuNi42Ci8vIEBkZXNjcmlwdGlvbiAgTWVyZ2UgYWR1bHQgcmVzdWx0cyBvZiBzbGVhenlmb3JrIGludG8gZ3JlYXN5Zm9yayB3aGVuIHRoZSBzY3JpcHQgaXMgbm8gbG9uZ2VyIGFub255bW91c2x5IGF2YWlsYWJsZSwgYWRkIHJhdGluZyBzY29yZSBhbmQgdmVyc2lvbiBmb3Igc2NyaXB0cyB0aGVuCi8vIEBkZXNjcmlwdGlvbjp6aC1DTiDlnKhHcmVhc3lmb3Jr55qE5pCc57Si57uT5p6c5Lit5re75YqgU2xlYXp5Zm9ya+S4iueahOaIkOS6uuiEmuacrO+8jOWinuWKoOivhOWIhuS4jueJiOacrOWPt++8jOW5tuWcqOiuv+mXruWMv+WQjeS4jeWPr+eUqOiEmuacrOaXtui3s+i9rOiHs1NsZWF6eWZvcmsKLy8gQGRlc2NyaXB0aW9uOnpoLVRXIOWcqEdyZWFzeWZvcmvnmoTmkJzntKLntZDmnpzkuK3mt7vliqBTbGVhenlmb3Jr5LiK55qE5oiQ5Lq66IWz5pys77yM5aKe5Yqg6KmV5YiG6IiH54mI5pys6Jmf77yM5Lim5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EdNLmdldFZhbHVlKCdhJywnYicpIT0ndW5kZWZpbmVkJywKICAgICAgICBteEFwcFN0b3JhZ2U6KGZ1bmN0aW9uKCl7CiAgICAgICAgICAgIHRyeXsKICAgICAgICAgICAgICAgIHJldHVybiB3aW5kb3cuZXh0ZXJuYWwubXhHZXRSdW50aW1lKCkuc3RvcmFnZTsKICAgICAgICAgICAgfWNhdGNoKGUpewogICAgICAgICAgICB9OwogICAgICAgIH0pKCksCiAgICAgICAgb3BlcmFVSlNTdG9yYWdlOihmdW5jdGlvbigpewogICAgICAgICAgICB0cnl7CiAgICAgICAgICAgICAgICByZXR1cm4gd2luZG93Lm9wZXJhLnNjcmlwdFN0b3JhZ2U7CiAgICAgICAgICAgIH1jYXRjaChlKXsKICAgICAgICAgICAgfTsKICAgICAgICB9KSgpLAogICAgICAgIHNldEl0ZW06ZnVuY3Rpb24oa2V5LHZhbHVlKXsKICAgICAgICAgICAgaWYodGhpcy5vcGVyYVVKU1N0b3JhZ2UpewogICAgICAgICAgICAgICAgdGhpcy5vcGVyYVVKU1N0b3JhZ2Uuc2V0SXRlbShrZXksdmFsdWUpOwogICAgICAgICAgICB9ZWxzZSBpZih0aGlzLm14QXBwU3RvcmFnZSl7CiAgICAgICAgICAgICAgICB0aGlzLm14QXBwU3RvcmFnZS5zZXRDb25maWcoa2V5LHZhbHVlKTsKICAgICAgICAgICAgfWVsc2UgaWYodGhpcy5zdXBwb3J0R00pewogICAgICAgICAgICAgICAgR01fc2V0VmFsdWUoa2V5LHZhbHVlKTsKICAgICAgICAgICAgfWVsc2UgaWYodGhpcy5zdXBwb3J0R01Qcm9taXNlKXsKICAgICAgICAgICAgICAgIEdNLnNldFZhbHVlKGtleSx2YWx1ZSk7CiAgICAgICAgICAgIH1lbHNlIGlmKHdpbmRvdy5sb2NhbFN0b3JhZ2UpewogICAgICAgICAgICAgICAgd2luZG93LmxvY2FsU3RvcmFnZS5zZXRJdGVtKGtleSx2YWx1ZSk7CiAgICAgICAgICAgIH07CiAgICAgICAgfSwKICAgICAgICBnZXRJdGVtOmZ1bmN0aW9uKGtleSxjYil7CiAgICAgICAgICAgIHZhciB2YWx1ZTsKICAgICAgICAgICAgaWYodGhpcy5vcGVyYVVKU1N0b3JhZ2UpewogICAgICAgICAgICAgICAgdmFsdWU9dGhpcy5vcGVyYVVKU1N0b3JhZ2UuZ2V0SXRlbShrZXkpOwogICAgICAgICAgICB9ZWxzZSBpZih0aGlzLm14QXBwU3RvcmFnZSl7CiAgICAgICAgICAgICAgICB2YWx1ZT10aGlzLm14QXBwU3RvcmFnZS5nZXRDb25maWcoa2V5KTsKICAgICAgICAgICAgfWVsc2UgaWYodGhpcy5zdXBwb3J0R00pewogICAgICAgICAgICAgICAgdmFsdWU9R01fZ2V0VmFsdWUoa2V5KTsKICAgICAgICAgICAgfWVsc2UgaWYodGhpcy5zdXBwb3J0R01Qcm9taXNlKXsKICAgICAgICAgICAgICAgIHZhbHVlPUdNLmdldFZhbHVlKGtleSkudGhlbih2PT57Y2Iodil9KTsKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfWVsc2UgaWYod2luZG93LmxvY2FsU3RvcmFnZSl7CiAgICAgICAgICAgICAgICB2YWx1ZT13aW5kb3cubG9jYWxTdG9yYWdlLmdldEl0ZW0oa2V5KTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgY2IodmFsdWUpOwogICAgICAgIH0sCiAgICB9OwogICAgaWYoZG9jdW1lbnQucXVlcnlTZWxlY3Rvcignc3Bhbi5zaWduLWluLWxpbmsnKSl7CiAgICAgICAgdmFyIG90aGVyU2l0ZT0vZ3JlYXN5Zm9ya1wub3JnLy50ZXN0KGxvY2F0aW9uLmhvc3RuYW1lKT8ic2xlYXp5Zm9yayI6ImdyZWFzeWZvcmsiOwogICAgICAgIGlmKC9zY3JpcHRzXC9cZCsvLnRlc3QobG9jYXRpb24uaHJlZikpewogICAgICAgICAgICBpZighZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiI3Njc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XRjaCAoZSkgewogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygncGFyc2UgZXJyb3InKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKCFkb2MpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB2YXIgbCA9IGRvYy5xdWVyeVNlbGVjdG9yKCdvbC5zY3JpcHQtbGlzdCcpOwogICAgICAgICAgICAgICAgICAgIGlmIChsKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBtbCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJ29sLnNjcmlwdC1saXN0Jyk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFtbCl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtbD1kb2N1bWVudC5jcmVhdGVFbGVtZW50KCJvbCIpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWwuc2V0QXR0cmlidXRlKCJjbGFzcyIsInNjcmlwdC1saXN0Iik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbGlzdD1kb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuc2lkZWJhcnJlZC1tYWluLWNvbnRlbnQnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwcz1saXN0LnF1ZXJ5U2VsZWN0b3JBbGwoInAiKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaT0wO2k8cHMubGVuZ3RoO2krKyl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHA9cHNbaV07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlzdC5yZW1vdmVDaGlsZChwKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpc3QuYXBwZW5kQ2hpbGQobWwpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzY3M9bC5xdWVyeVNlbGVjdG9yQWxsKCJsaSIpOwogICAgICAgICAgICAgICAgICAgICAgICBpZihzY3MpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBpPTA7aTxzY3MubGVuZ3RoO2krKyl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNjPXNjc1tpXTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighbWwucXVlcnlTZWxlY3RvcigibGlbZGF0YS1zY3JpcHQtaWQ9JyIrc2MuZGF0YXNldC5zY3JpcHRJZCsiJ10iKSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vYWRkU2NvcmUoc2MpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtbC5hcHBlbmRDaGlsZChzYyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIG9uZXJyb3I6IGZ1bmN0aW9uKGUpIHsKICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfQoKICAgIHZhciBidWxsc2hpdCxidWxsc2hpdF9vPWB2aXAuKijop4bpopF86KaW6aC7KXznvZHor7585Yi36K++fChtb29jfOiAg+ivlXzlrabkuaApLioo562U6aKYfOaMguacuil8KOe9keebmHzntrLnm6R85LqR55uYKS4qKHZpcHznm7Tpk74pfOS8mOaDoOWKtXzlhKrmg6DliLh8QW50aUdhbWV8c3BsaXR8QWdhcnxcXC5pbyhcXGJ8OnxcXC98XFwufCQpfEV4dGVuY2lvblJpcFhDaGV0b01hbG98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ICAgICAgICAgICBmaWx0ZXJUZXh0YXJlYS5pbm5lckhUTUw9YnVsbHNoaXQ7CiAgICAgICAgICAgIHZhciBhZGRpdGlvbmFsSW5mbz1kb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIjYWRkaXRpb25hbC1pbmZvIik7CiAgICAgICAgICAgIHAuYXBwZW5kQ2hpbGQoZmlsdGVyVGV4dGFyZWEpOwogICAgICAgICAgICBhZGRpdGlvbmFsSW5mby5pbnNlcnRCZWZvcmUocCxhZGRpdGlvbmFsSW5mby5maXJzdENoaWxkKTsKICAgICAgICAgICAgcHJldHRpZnlTY3JpcHQub25sb2FkPSgpPT57UFIucHJldHR5UHJpbnQoKTt9OwogICAgICAgICAgICBva0J0bi5vbmNsaWNrPSgpPT57CiAgICAgICAgICAgICAgICBfYnVsbHNoaXQ9ZmlsdGVyVGV4dGFyZWEuaW5uZXJUZXh0OwogICAgICAgICAgICAgICAgc3RvcmFnZS5zZXRJdGVtKCJHZWFzeWZvcmtCdWxsc2hpdCIsIF9idWxsc2hpdCk7CiAgICAgICAgICAgICAgICBhbGVydCgiU2F2ZWQiKTsKICAgICAgICAgICAgICAgIC8vX0dNX25vdGlmaWNhdGlvbigiU2F2ZWQiKTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgcmVzZXRCdG4ub25jbGljaz0oKT0+ewogICAgICAgICAgICAgICAgc3RvcmFnZS5zZXRJdGVtKCJHZWFzeWZvcmtCdWxsc2hpdCIsIGJ1bGxzaGl0X28pOwogICAgICAgICAgICAgICAgYWxlcnQoIlJlc2V0IG92ZXIiKTsKICAgICAgICAgICAgICAgIGxvY2F0aW9uLnJlbG9hZCgpOwogICAgICAgICAgICAgICAgLy9fR01fbm90aWZpY2F0aW9uKCJSZXNldCBvdmVyIik7CiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgICAgIGluaXRGaWx0ZXIoKTsKICAgIH0pOwoKICAgIGZ1bmN0aW9uIGFkZFNjb3JlKHNjcmlwdCl7CiAgICAg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ICAgICAgICAgICAgdmFyIGluc3RhbGxBcmVhPWRlc2NyaXB0aW9uLnF1ZXJ5U2VsZWN0b3IoIiNpbnN0YWxsLWFyZWEiKTsKICAgICAgICAgICAgbGV0IGluc3RhbGxMaW5rPWluc3RhbGxBcmVhLnF1ZXJ5U2VsZWN0b3IoIi5pbnN0YWxsLWxpbmsiKTsKICAgICAgICAgICAgbGV0IGNoZWNrSW5mbz1pbnN0YWxsQXJlYS5xdWVyeVNlbGVjdG9yKCIuaW5zdGFsbC1oZWxwLWxpbmsiKTsKICAgICAgICAgICAgc2NyaXB0Lm9ubW91c2VlbnRlcj1lPT57CiAgICAgICAgICAgICAgICBjaGVja0luZm8uYXBwZW5kQ2hpbGQocmVmcmVzaEljb24pOwogICAgICAgICAgICB9OwogICAgICAgICAgICBzY3JpcHQub25tb3VzZWxlYXZlPWU9PnsKICAgICAgICAgICAgICAgIGlmKHJlZnJlc2hJY29uICYmIHJlZnJlc2hJY29uLnBhcmVudE5vZGUpcmVmcmVzaEljb24ucGFyZW50Tm9kZS5yZW1vdmVDaGlsZChyZWZyZXNoSWNvbik7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGNoZWNrSW5mby5vbmNsaWNrPSgpPT57CiAgICAgICAgICAgICAgICBfR01feG1saHR0cFJlcXVlc3QoewogICAgICAgICAgICAgICAgICAgIG1ldGhvZDogJ0dFVCcsCiAgICAgICAgICAgICAgICAgICAgdXJsOiBzY3JpcHRIcmVmLnJlcGxhY2UoLyguKiktLiovLCIkMS5qc29uIiksCiAgICAgICAgICAgICAgICAgICAgb25sb2FkOiBmdW5jdGlvbihyZXN1bHQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGRhdGEgPSBudWxsOwogICAgICAgICAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YSA9IEpTT04ucGFyc2UocmVzdWx0LnJlc3BvbnNlVGV4dCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCdwYXJzZSBlcnJvcicpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRhdGEpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNldEluZm89aW5mbz0+ewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGluZm8uaW5zdGFsbGVkKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocGFyc2VGbG9hdChpbmZvLnZlcnNpb24pIDwgcGFyc2VGbG9hdCh2ZXJzaW9uKSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnN0YWxsTGluay5pbm5lckhUTUw9IlVwZGF0ZSB0byB2ZXJzaW9uICIrdmVyc2lvbjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYocGFyc2VGbG9hdChpbmZvLnZlcnNpb24pID4gcGFyc2VGbG9hdCh2ZXJzaW9uKSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnN0YWxsTGluay5pbm5lckhUTUw9IkRvd25ncmFkZSB0byB2ZXJzaW9uICIrdmVyc2lvbjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnN0YWxsTGluay5pbm5lckhUTUw9IlJlaW5zdGFsbCB2ZXJzaW9uICIrdmVyc2lvbjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWluZm8uZW5hYmxlZCl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnN0YWxsTGluay5zdHlsZS5iYWNrZ3JvdW5kQ29sb3I9IiM2YTZhNmEiOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluc3RhbGxMaW5rLnN0eWxlLmJhY2tncm91bmRDb2xvcj0iIjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnN0YWxsTGluay5pbm5lckhUTUw9Ikluc3RhbGwgdmVyc2lvbiAiK3ZlcnNpb247CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHdpbmRvdy5leHRlcm5hbC5UYW1wZXJtb25rZXkpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5leHRlcm5hbC5UYW1wZXJtb25rZXkuaXNJbnN0YWxsZWQoZGF0YS5uYW1lLCBkYXRhLm5hbWVzcGFjZSwgZT0+ewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRJbmZvKGUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYod2luZG93LmV4dGVybmFsLlZpb2xlbnRtb25rZXkpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5leHRlcm5hbC5WaW9sZW50bW9ua2V5LmlzSW5zdGFsbGVkKGRhdGEubmFtZSwgZGF0YS5uYW1lc3BhY2UpLnRoZW4oZT0+ewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRJbmZvKGUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogIC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1bmN0aW9uIGluaXRGaWx0ZXIoKXsKICAgICAgICB2YXIgZW5hYmxlRmlsdGVyOwogICAgICAgIGlmKHNvcnREaXYpewogICAgICAgICAgICBzdG9yYWdlLmdldEl0ZW0oImRpc2FibGVGaWx0ZXIiLHY9PnsKICAgICAgICAgICAgICAgIGVuYWJsZUZpbHRlcj0hdjsKICAgICAgICAgICAgICAgIHZhciBzd2l0Y2hGaWx0ZXI9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiZGl2Iik7CiAgICAgICAgICAgICAgICB2YXIgTXV0YXRpb25PYnNlcnZlciA9IHdpbmRvdy5NdXRhdGlvbk9ic2VydmVyIHx8IHdpbmRvdy5XZWJLaXRNdXRhdGlvbk9ic2VydmVyIHx8IHdpbmRvdy5Nb3pNdXRhdGlvbk9ic2VydmVyOwogICAgICAgICAgICAgICAgdmFyIG9ic2VydmVyID0gbmV3IE11dGF0aW9uT2JzZXJ2ZXIoZnVuY3Rpb24ocmVjb3Jkcyl7CiAgICAgICAgICAgICAgICAgICAgcmVjb3Jkcy5tYXAoZnVuY3Rpb24ocmVjb3JkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGZvcih2YXIgaT0wO2k8cmVjb3JkLmFkZGVkTm9kZXMubGVuZ3RoO2krKyl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgY3VyTm9kZT1yZWNvcmQuYWRkZWROb2Rlc1tpXTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGN1ck5vZGUuY2xhc3NOYW1lPT0ic2NyaXB0LWxpc3QiKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgc2NyaXB0cz1jdXJOb2RlLnF1ZXJ5U2VsZWN0b3JBbGwoJ2xpJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBpPTA7aTxzY3JpcHRzLmxlbmd0aDtpKyspewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2NyaXB0PXNjcmlwdHNbaV07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZFNjb3JlKHNjcmlwdCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGVuYWJsZUZpbHRlcilmaWx0ZXIoY3VyTm9kZSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihjdXJOb2RlLnRhZ05hbWU9PSJMSSIpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZFNjb3JlKGN1ck5vZGUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGVuYWJsZUZpbHRlcilmaWx0ZXIoY3VyTm9kZSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgdmFyIG9wdGlvbiA9IHsKICAgICAgICAgICAgICAgICAgICAnY2hpbGRMaXN0JzogdHJ1ZQogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIG9ic2VydmVyLm9ic2VydmUoZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiYm9keT4ud2lkdGgtY29uc3RyYWludCAuc2lkZWJhcnJlZC1tYWluLWNvbnRlbnQiKSwgb3B0aW9uKTsKICAgICAgICAgICAgICAgIHZhciBzY3JpcHRMaXN0PWRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIiNicm93c2Utc2NyaXB0LWxpc3QsI3VzZXItc2NyaXB0LWxpc3Qsb2wuc2NyaXB0LWxpc3QiKTsKICAgICAgICAgICAgICAgIGlmKHNjcmlwdExpc3Qpb2JzZXJ2ZXIub2JzZXJ2ZShzY3JpcHRMaXN0LCBvcHRpb24pOwogICAgICAgICAgICAgICAgdmFyIHNjcmlwdHM9ZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnb2wuc2NyaXB0LWxpc3Q+bGknKTsKICAgICAgICAgICAgICAgIGZvcihsZXQgaT0wO2k8c2NyaXB0cy5sZW5ndGg7aSsrKXsKICAgICAgICAgICAgICAgICAgICBsZXQgc2NyaXB0PXNjcmlwdHNbaV07CiAgICAgICAgICAgICAgICAgICAgYWRkU2NvcmUoc2NyaXB0KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vTW9kaWZ5IGZyb20gR3JlYXN5Rm9yayBCdWxsc2hpdCBGaWx0ZXIsVGhhbmtzIHRvIGRhcmtyZWQKICAgICAgICAgICAgICAgIHZhciBzdHlsZSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ3N0eWxlJyk7CiAgICAgICAgICAgICAgICBzdHlsZS50ZXh0Q29udGVudCA9IGAKICAgICAgICAgICAgICAgIGxpLmZpbHRlcmVkIHsKICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogbm9uZSAhaW1wb3J0YW50OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLmxpc3Qtb3B0aW9uewogICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAjc2NyaXB0LWxpc3Qtc29ydCBsaT5zcGFuewogICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgICAgICAgICAgICAgICAgIHRvcDogNHB4OwogICAgICAgICAgICAgICAgICAgICByaWdodDogMnB4OwogICAgICAgICAgICAgICAgICAgICBwb2ludGVyLWV2ZW50czogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgZm9udC13ZWlnaHQ6IDUwMDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICNzY3JpcHQtbGlzdC1zb3J0IGxpPnNwYW46bGFuZyhhciksICNzY3JpcHQtbGlzdC1zb3J0IGxpPnNwYW46bGFuZyhoZSksICNzY3JpcHQtbGlzdC1zb3J0IGxpPnNwYW46bGFuZyh1Zyl7CiAgICAgICAgICAgICAgICAgICAgIHJpZ2h0OiB1bnNldDsKICAgICAgICAgICAgICAgICAgICAgbGVmdDogMnB4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgI3NjcmlwdC1saXN0LXNvcnQgbGk+c3Bhbj5zcGFuewogICAgICAgICAgICAgICAgICAgICBtYXJnaW46IDAgMCAwIDJweDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC5zY3JpcHQtbGlzdD5saSAubGlzdC1pbnN0YWxsLWFyZWF7CiAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgIGZsb2F0OiByaWdodDsKICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnNjcmlwdC1saXN0PmxpOmhvdmVyIC5saXN0LWluc3RhbGwtYXJlYSB7CiAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGJsb2NrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgQC13ZWJraXQta2V5ZnJhbWVzIHNwaW4gewogICAgICAgICAgICAgICAgIGZyb20gewogICAgICAgICAgICAgICAgICAgICAtd2Via2l0LXRyYW5zZm9ybTogcm90YXRlKDBkZWcpOwogICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICB0byB7CiAgICAgICAgICAgICAgICAgICAgIC13ZWJraXQtdHJhbnNmb3JtOiByb3RhdGUoMzYwZGVnKTsKICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBAa2V5ZnJhbWVzIHNwaW4gewogICAgICAgICAgICAgICAgIGZyb20gewogICAgICAgICAgICAgICAgICAgICB0cmFuc2Zvcm06IHJvdGF0ZSgwZGVnKTsKICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgdG8gewogICAgICAgICAgICAgICAgICAgICB0cmFuc2Zvcm06IHJvdGF0ZSgzNjBkZWcpOwogICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC5yZWZyZXNoLWluZm86aG92ZXI+c3BhbiB7CiAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGJsb2NrOwogICAgICAgICAgICAgICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjogc3BpbiAxcyBsaW5lYXIgMXMgNSBhbHRlcm5hdGU7CiAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbjogc3BpbiAxcyBsaW5lYXIgaW5maW5pdGU7CiAgICAgICAgICAgICAgICB9YDsKICAgICAgICAgICAgICAgIHN0eWxlLnR5cGUgPSAndGV4dC9jc3MnOwogICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignaGVhZCcpLmFwcGVuZENoaWxkKHN0eWxlKTsKICAgICAgICAgICAgICAgIHZhciBidWxsc2hpdFJlZz1uZXcgUmVnRXhwKGJ1bGxzaGl0LCJpIik7CiAgICAgICAgICAgICAgICB2YXIgZmlsdGVyTmFtZT0iRW5hYmxlIEZpbHRlciIsZmlsdGVyZWROdW09MDsKICAgICAgICAgICAgICAgIHZhciBmaWx0ZXI9ZnVuY3Rpb24odCl7CiAgICAgICAgICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKHQucXVlcnlTZWxlY3RvckFsbCgnYXJ0aWNsZT5oMicpLCBmdW5jdGlvbihpdGVtKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGJ1bGxzaGl0UmVnLnRlc3QoaXRlbS5pbm5lclRleHQucmVwbGFjZSgiXG4iLCIgIikpKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0ucGFyZW50Tm9kZS5wYXJlbnROb2RlLmNsYXNzTGlzdC5hZGQoJ2ZpbHRlcmVkJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICA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ICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaEZpbHRlckxhYmVsLmlubmVySFRNTD1maWx0ZXJOYW1lOwogICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJlZE51bT0wOwogICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXIoZG9jdW1lbnQpOwogICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2hGaWx0ZXJMYWJlbC5pbm5lckhUTUw9ZmlsdGVyTmFtZSsnICgnK2ZpbHRlcmVkTnVtKycgZmlsdGVyZWQpJzsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgc3RvcmFnZS5zZXRJdGVtKCJkaXNhYmxlRmlsdGVyIixlbmFibGVGaWx0ZXIpOwogICAgICAgICAgICAgICAgICAgIGVuYWJsZUZpbHRlcj0hZW5hYmxlRmlsdGVyOwogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIHNvcnREaXYuaW5zZXJ0QmVmb3JlKHN3aXRjaEZpbHRlcixzb3J0RGl2LmZpcnN0Q2hpbGQpOwogICAgICAgICAgICB9KTsKICAgICAgICB9CiAgICB9Cn0pKCk7
Add Comment
Please, Sign In to add comment