Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global@base64://Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICDmtbfop5LnpL7ljLrohJrmnKwKLy8gQG5hbWVzcGFjZSAgICBoYWlqaWFvLXNjcmlwdAovLyBAdmVyc2lvbiAgICAgIDIuMAovLyBAYXV0aG9yICAgICAgIFFRMjEwNjQzMzAzMwovLyBAZGVzY3JpcHRpb24gIOa1t+inkuekvuWMuuinhumikeino+aekFFRMjEwNjQzMzAzM1FRMjA5NTU1Mzc2M1FRMTY2NDQ3MTM0OQovLyBAbGljZW5zZSAgICAgIE1JVAovLyBAaWNvbiAgICAgICAgIGh0dHBzOi8vcG9tZjIubGFpbi5sYS9mL2VyZWp4dGZvLmljbwovLyBAbWF0Y2ggICAgICAgICo6Ly8qLmhhaWppYW8uY29tLyoKLy8gQG1hdGNoICAgICAgICAqOi8vKi9wb3N0L2RldGFpbHMqCi8vIEByZXF1aXJlICAgICAgaHR0cHM6Ly9jZG4uanNkZWxpdnIubmV0L25wbS9qcXVlcnlAMy42LjQKLy8gQHJlcXVpcmUgICAgICBodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2RwbGF5ZXJAMS4yNy4xCi8vIEByZXF1aXJlICAgICAgaHR0cHM6Ly9jZG4uanNkZWxpdnIubmV0L25wbS9obHMuanNAMS4zLjUKLy8gQGdyYW50ICAgICAgICBHTV9zZXRDbGlwYm9hcmQKLy8gQGdyYW50ICAgICAgICBHTV94bWxodHRwUmVxdWVzdAovLyA9PS9Vc2VyU2NyaXB0PT0KCihlPT57Y29uc3QgdD1kb2N1bWVudC5jcmVhdGVFbGVtZW50KCJzdHlsZSIpO3QuZGF0YXNldC5zb3VyY2U9InZpdGUtcGx1Z2luLW1vbmtleSIsdC50ZXh0Q29udGVudD1lLGRvY3VtZW50LmhlYWQuYXBwZW5kKHQpfSkoIiAuY3JhY2tfY29udG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xDb250YWluZXIyKS5hcHBlbmQoJGlmcmFtZSk7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBuZXcgRFBsYXllcih7CiAgICAgICAgICAgICAgY29udGFpbmVyOiBzZWxsQ29udGFpbmVyMiwKICAgICAgICAgICAgICBhdXRvcGxheTogZmFsc2UsCiAgICAgICAgICAgICAgdGhlbWU6ICIjRkFERkEzIiwKICAgICAgICAgICAgICBsb29wOiB0cnVlLAogICAgICAgICAgICAgIGxhbmc6ICJ6aCIsCiAgICAgICAgICAgICAgc2NyZWVuc2hvdDogdHJ1ZSwKICAgICAgICAgICAgICBob3RrZXk6IHRydWUsCiAgICAgICAgICAgICAgcHJlbG9hZDogImF1dG8iLAogICAgICAgICAgICAgIHZpZGVvOiB7CiAgICAgICAgICAgICAgICB1cmwsCiAgICAgICAgICAgICAgICB0eXBlOiAiaGxzIgogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGNvcHlCdG4ub24oImNsaWNrIiwgKCkgPT4gewogICAgICAgICAgX0dNX3NldENsaXBib2FyZCh1cmwsICJ0ZXh0L3BsYWluIik7CiAgICAgICAgfSk7CiAgICAgICAganVtcExpbmsxLnNob3coKTsKICAgICAgICBqdW1wTGluazIuc2hvdygpOwogICAgICAgIGNvcHlCdG4uc2hvdygpOwogICAgICAgIHJldHVybjsKICAgICAgfSwgdHJhY2sgPSBmdW5jdGlvbigpIHsKICAgICAgICBpbml0KCk7CiAgICAgICAgY3JhY2soKTsKICAgICAgfTsKICAgICAgbGV0IGNyYWNrQnRuOwogICAgICBsZXQganVtcExpbmsxOwogICAgICBsZXQganVtcExpbmsyOwogICAgICBsZXQgY29weUJ0bjsKICAgICAgbGV0IGNvbnRhaW5lcjsKICAgICAgY29uc3Qgc2VsbENvbnRhaW5lciA9IGdldFNlbGxlckNvbnRhaW5lcigpOwogICAgICBpZiAoc2VsbENvbnRhaW5lcikgewogICAgICAgIHRyYWNr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gY29uc3QgaXNIYWlKaWFvUGlkID0gd2luZG93LmxvY2F0aW9uLmhyZWYuaW5jbHVkZXMoIj9waWQ9Iik7CiAgICAgIGNvbnN0IHNlbGxDb250YWluZXIgPSBnZXRTZWxsZXJDb250YWluZXIoKTsKICAgICAgaWYgKCFzZWxsQ29udGFpbmVyKSB7CiAgICAgICAgcmV0dXJuOwogICAgICB9CiAgICAgIGlmIChvbGRVcmwgIT09IG5ld1VybCkgewogICAgICAgIG9sZFVybCA9IG5ld1VybDsKICAgICAgICBpZiAoaXNIYWlKaWFvUGlkKSB7CiAgICAgICAgICBpZiAoaW5qZWN0RW50cnlVcmwgIT09IHdpbmRvdy5sb2NhdGlvbi5ocmVmKSB7CiAgICAgICAgICAgIGluamVjdEVudHJ5KCk7CiAgICAgICAgICB9CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgIGNvbnN0IGhpZGUkRWxlbWVudCA9ICQoIiNjcmFja19jb250YWluZXIiKTsKICAgICAgICAgIGlmIChoaWRlJEVsZW1lbnQubGVuZ3RoID4gMCkgewogICAgICAgICAgICBoaWRlJEVsZW1lbnQucmVtb3ZlKCk7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9IGVsc2UgewogICAgICAgIGlmIChpc0hhaUppYW9QaWQgJiYgaW5qZWN0RW50cnlVcmwgIT09IHdpbmRvdy5sb2NhdGlvbi5ocmVmKSB7CiAgICAgICAgICBpbmplY3RFbnRyeSgpOwogICAgICAgIH0KICAgICAgfQogICAgfSk7CiAgICBmdW5jdGlvbiBpbmplY3RFbnRyeSgpIHsKICAgICAgY29uc3Qgc2VsbENvbnRhaW5lciA9IGdldFNlbGxlckNvbnRhaW5lcigpOwogICAgICBpZiAoc2VsbENvbnRhaW5lcikgewogICAgICAgIGxldCBbcGlkXSA9IHdpbmRvdy5sb2NhdGlvbi5zZWFyY2gubWF0Y2goL1xkKy8pIHx8IFtdOwogICAgICAgIGlmICghcGlkKSB7CiAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGNvbnN0IGZvcm1hdFVybDIgPSBgJHtsb2NhdGlvbi5vcmlnaW59L2FwaS90b3BpYy8ke3BpZH1gOwogICAgICAgIGluamVjdEVudHJ5VXJsID0gd2luZG93LmxvY2F0aW9uLmhyZWY7CiAgICAgICAgX0dNX3htbGh0dHBSZXF1ZXN0KHsKICAgICAgICAgIG1ldGhvZDogIkdFVCIsCiAgICAgICAgICB1cmw6IGZvcm1hdFVybDIsCiAgICAgICAgICBvbmxvYWQ6IGZ1bmN0aW9uKHsgcmVzcG9uc2UgfSkgewogICAgICAgICAgICBjb25zdCBmb3JtYXREYXRhID0gSlNPTi5wYXJzZShyZXNwb25zZSk7CiAgICAgICAgICAgIGlmIChmb3JtYXREYXRhID09IG51bGwgPyB2b2lkIDAgOiBmb3JtYXREYXRhLmRhdGEpIHsKICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgY29uc3QgZGF0YSA9IEpTT04ucGFyc2UoYXRvYihhdG9iKGF0b2IoZm9ybWF0RGF0YS5kYXRhKSkpKTsKICAgICAgICAgICAgICAgIGNvbnN0IGF0dGFjaG1lbnRzID0gZGF0YS5hdHRhY2htZW50czsKICAgICAgICAgICAgICAgIGNvbnN0IHVzZWZ1bERhdGEgPSBhdHRhY2htZW50cy5maW5kKAogICAgICAgICAgICAgICAgICAoaXRlbSkgPT4gewogICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlbW90ZVVybCA9IGl0ZW0ucmVtb3RlVXJsIHx8ICIiOwogICAgICAgICAgICAgICAgICAgIHJldHVybiByZW1vdGVVcmwuaW5jbHVkZXMoIm0zdTgiKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgKTsKICAgICAgICAgICAgICAgIGNvbnN0IHVybCA9IHVzZWZ1bERhdGEucmVtb3RlVXJsOwogICAgICAgICAgICAgICAgaWYgKHVybCkgewogICAgICAgICAgICAgICAgICBjcmFja1VybCh1cmwpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7CiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygi5rW36KeS6Kej5p6Q5aSx6LSl5LqGOiAiLCBlcnJvcik7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSk7CiAgICAgIH0KICAgIH0KICAgIGlmICghaXNNb2JpbGUoKSkgewogICAgICBzZXRUaW1lb3V0KCgpID0+IHsKICAgICAgICBtdXRhdGlvbk9ic2VydmVyLmRpc2Nvbm5lY3QoKTsKICAgICAgfSwgMTIwICogMWUzKTsKICAgIH0KICAgIG11dGF0aW9uT2JzZXJ2ZXIub2JzZXJ2ZShkb2N1bWVudC5ib2R5LCB7CiAgICAgIGF0dHJpYnV0ZXM6IHRydWUsCiAgICAgIGNoaWxkTGlzdDogdHJ1ZQogICAgfSk7CiAgfSkoKTsKCn0pKERQbGF5ZXIsIEhscywgalF1ZXJ5KTs=
Add Comment
Please, Sign In to add comment