Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@土拨鼠@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi5Zyf5ouo6bygIiwiYXV0aG9yIjoiIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjIiwidmVyc2lvbiI6MTAsImNvbF90eXBlIjoibW92aWVfMyIsImNsYXNzX25hbWUiOiIiLCJ0eXBlIjoidmlkZW8iLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbnZhciBkID0gW107XG5sZXQgdXJsID0gXCJodHRwczovL3d3dy50YnNkeS5jb20vbS9pbmRleC5odG1sIy9cIjtcbmxldCBpdGUgPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvdVwiKShNWV9SVUxFLnRpdGxlLCBnZXRIb21lKHVybCkpO1xuZC5wdXNoKHtcbiAgICB0aXRsZTogXCJcIixcbiAgICB1cmw6IHVybCxcbiAgICBjb2xfdHlwZTogXCJ4NV93ZWJ2aWV3X3NpbmdsZVwiLFxuICAgIGRlc2M6IFwiMTAwJSYmZmxvYXRcIixcbiAgICBwaWNfdXJsOiBcIlwiLFxuICAgIGV4dHJhOiB7XG4gICAgICAgIHVybEludGVyY2VwdG9yOiBpdGUsXG4gICAgICAgIGNhbkJhY2s6IHRydWVcbiAgICB9XG59KTtcbnNldFJlc3VsdChkKTsiLCJzZWFyY2hfdXJsIjoiIiwiZ3JvdXAiOiLikaDovbvlkIjpm4YiLCJzZWFyY2hGaW5kIjoiIiwiZGV0YWlsX2NvbF90eXBlIjoibW92aWVfMSIsImRldGFpbF9maW5kX3J1bGUiOiIiLCJzZGV0YWlsX2NvbF90eXBlIjoibW92aWVfMSIsIn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1LFxcbiAgICAgICAgICAgICAgICAgICAgY2FuY2VsOiBydVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBsb2coXFxcImlucHV0XFxcIik7XFxuICAgICAgICAgICAgcmV0dXJuICQudG9TdHJpbmcoKHVybCwgcnVsZSkgPT4ge1xcbiAgICAgICAgICAgICAgICBmeV9icmlkZ2VfYXBwLm9wZW4oSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLpmL/ph4zkupHnm5hcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL2RldGFpbD9ydWxlPeS6keebmOaxh+W9sSZ1cmw9XFxcIiArIHVybCArICc/P2Z5cGFnZScsXFxuICAgICAgICAgICAgICAgIH0pKVxcbiAgICAgICAgICAgIH0sIGlucHV0LCBydWxlKVxcbiAgICAgICAgfSBlbHNlIGlmICgvXFxcXC4obXAzfGZsYWN8bTRhKSQvLnRlc3QoaW5wdXQpKSB7XFxuICAgICAgICAgICAgbG9nKGlucHV0KTtcXG4gICAgICAgICAgICByZXR1cm4gJC50b1N0cmluZygodXJsLCBydWxlKSA9PiB7XFxuICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAucGxheVZpZGVvKHVybCk7XFxuICAgICAgICAgICAgfSwgaW5wdXQsIHJ1bGUpXFxuICAgICAgICB9IGVsc2UgaWYgKCFpbnB1dC5pbmNsdWRlcyhob3N0KSAmJiBpbnB1dC5zdGFydHNXaXRoKFxcXCJodHRwXFxcIikpIHtcXG4gICAgICAgICAgICBsb2coaW5wdXQpO1xcbiAgICAgICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh1cmwsIHJ1bGUpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHdoaXRlID0gW1xcbiAgICAgICAgICAgICAgICAgICAgXFxcImRvdXlpblxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiZG91YmFuXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJpeGlndWEuY29tXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJrdWFpc2hvdVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiYmlsaWJpbGlcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIndlaWJvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJ3ZWl4aW5cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImJhaWR1XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJ6bWsuXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJzdWJoZFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwidGh1bmRlclxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwieGluanVjXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJncmFiNGtcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIi9idFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwianNyMTBcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImFzc3J0XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJxdWFya1xcXCJcXG4gICAgICAgICAgICAgICAgXTtcXG4gICAgICAgICAgICAgICAgbGV0IGluV2hpdGUgPSB3aGl0ZS5maWx0ZXIoaXQgPT4gdXJsLmluY2x1ZGVzKGl0KSkubGVuZ3RoID4gMDtcXG4gICAgICAgICAgICAgICAgaWYgKGluV2hpdGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIC8v6Lez572R6aG1XFxuICAgICAgICAgICAgICAgICAgICBmeV9icmlkZ2VfYXBwLm9wZW4oSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi6K+m5oOFXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UveXNmeD9ydWxlPVxcXCIgKyBydWxlICsgXFxcIiZyPVxcXCIgKyBydWxlICsgXFxcIiMjXFxcIiArIHVybCxcXG4gICAgICAgICAgICAgICAgICAgIH0pKVxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgLy9BSeino+aekFxcbiAgICAgICAgICAgICAgICAgICAgZnlfYnJpZGdlX2FwcC5vcGVuKEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogZG9jdW1lbnQudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3A/cnVsZT1cXFwiICsgcnVsZSArIFxcXCImcj1cXFwiICsgcnVsZSArIFxcXCImdT1cXFwiICsgZnlfYnJpZGdlX2FwcC5iYXNlNjRFbmNvZGUodXJsKSxcXG4gICAgICAgICAgICAgICAgICAgIH0pKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSwgaW5wdXQsIHJ1bGUpO1xcbiAgICAgICAgfSBlbHNlIGlmICghaW5wdXQuc3RhcnRzV2l0aChcXFwiaHR0cFxcXCIpKSB7XFxuICAgICAgICAgICAgbG9nKGlucHV0KTtcXG4gICAgICAgICAgICAvL+iDveWUpOi1t0FQUOeahOeZveWQjeWNlVxcbiAgICAgICAgICAgIGxldCB3aGl0ZSA9IFtcXG4gICAgICAgICAgICAgICAgXFxcInFrbGlua1xcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCJiZG5ldGRpc2tcXFwiLFxcbiAgICAgICAgICAgICAgICBcXFwieHVubGVpYXBwXFxcIlxcbiAgICAgICAgICAgIF07XFxuICAgICAgICAgICAgbGV0IGluV2hpdGUgPSB3aGl0ZS5maWx0ZXIoaXQgPT4gaW5wdXQuc3RhcnRzV2l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bmV4dCA9IGkgPT0gKGFyci5sZW5ndGggLSAxKSA/IG51bGwgOiBhcnJbaSArIDFdO1xcbiAgICBpZiAoaXNDaGFwdGVyKGl0LCBwcmUsIG5leHQpKSB7XFxuICAgICAgICBpZiAod2ViKSB7XFxuICAgICAgICAgICAgdmFyIHVybHggPSBcXFwid2ViUnVsZTovL1xcXCIgKyBpdC5ocmVmICsgXFxcIkBcXFwiICsgX3dlYjtcXG4gICAgICAgICAgICB2YXIgZXh0cmF4ID0ge1xcbiAgICAgICAgICAgICAgICBqc0xvYWRpbmdJbmplY3Q6IHRydWUsXFxuICAgICAgICAgICAgICAgIGlkOiBpdC5ocmVmLFxcbiAgICAgICAgICAgICAgICBibG9ja1J1bGVzOiBbJy5tNGEnLCAnLm1wMycsICcuZmx2JywgJy5hdmknLCAnLjNncCcsICcubXBlZycsICcud212JywgJy5tb3YnLCAnLnJtdmInLCAnLmdpZicsICcuanBlZycsICcucG5nJywgJy5pY28nLCAnLnN2ZyddXFxuICAgICAgICAgICAgfTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdmFyIHVybHggPSBcXFwidmlkZW86Ly9cXFwiICsgaXQuaHJlZjtcXG4gICAgICAgICAgICB2YXIgZXh0cmF4ID0ge1xcbiAgICAgICAgICAgICAgICBpZDogaXQuaHJlZlxcbiAgICAgICAgICAgIH07XFxuICAgICAgICB9XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiB0LFxcbiAgICAgICAgICAgIHVybDogdXJseCxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfM1xcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IGV4dHJheFxcbiAgICAgICAgfSk7XFxuICAgIH1cXG59XFxuaWYgKGQubGVuZ3RoID09IDApIHtcXG4gICAgLy/ljLnphY3lpLHotKVcXG4gICAgbGV0IGl0ZSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3VcXFwiKShnZXRQYXJhbShcXFwiclxcXCIpLCBnZXRIb21lKHVybCkpO1xcbiAgICBsZXQganMgPSAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgaWYgKGRvY3VtZW50LnRpdGxlICYmIGRvY3VtZW50LnRpdGxlLmxlbmd0aCkge1xcbiAgICAgICAgICAgICAgICBsZXQgciA9ICQkJCgpLmxhenlSdWxlKCh0KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBzZXRQYWdlVGl0bGUodCk7XFxuICAgICAgICAgICAgICAgIH0sIGRvY3VtZW50LnRpdGxlKTtcXG4gICAgICAgICAgICAgICAgZnlfYnJpZGdlX2FwcC5wYXJzZUxhenlSdWxlKHIpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICBmeV9icmlkZ2VfYXBwLmxvZyhlLnRvU3RyaW5nKCkpO1xcbiAgICAgICAgfVxcbiAgICB9KTtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwiXFxcIixcXG4gICAgICAgIHVybDogdXJsLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJ4NV93ZWJ2aWV3X3NpbmdsZVxcXCIsXFxuICAgICAgICBkZXNjOiBcXFwiZmxvYXQmJjEwMCVcXFwiLFxcbiAgICAgICAgcGljX3VybDogXFxcIlxcXCIsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGpzOiBqcyxcXG4gICAgICAgICAgICB1cmxJbnRlcmNlcHRvcjogaXRlLFxcbiAgICAgICAgICAgIGNhbkJhY2s6IHRydWUsXFxuICAgICAgICAgICAgZmxvYXRWaWRlbzogdHJ1ZVxcbiAgICAgICAgfVxcbiAgICB9KTtcXG4gICAgdG9hc3QoXFxcIkFJ5Yy56YWN5aSx6LSl77yM5bey5L2/55SoWDXliqDovb1cXFwiKTtcXG4gICAgc2V0UmVzdWx0KGQpO1xcbn0gZWxzZSB7XFxuICAgIGxldCBydWxlID0gZ2V0UGFyYW0oXFxcInJcXFwiKTtcXG4gICAgZC5zcGxpY2UoMCwgMCwge1xcbiAgICAgICAgdGl0bGU6IFxcXCLwn5SXXFxcIiArIHVybCxcXG4gICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS95c2Z4P3J1bGU9XFxcIiArIHJ1bGUgKyBcXFwiJnI9XFxcIiArIHJ1bGUgKyBcXFwiIyNcXFwiICsgdXJsLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzFcXFwiLFxcbiAgICAgICAgZGVzYzogXFxcIlxcXCIsXFxuICAgICAgICBwaWNfdXJsOiBcXFwiXFxcIlxcbiAgICB9KTtcXG5cXG4gICAgLy/kuLrnur/ot6/liqDliIblibLnur9cXG4gICAgbGV0IGQyID0gW107XFxuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgZDIucHVzaChkW2ldKTtcXG4gICAgICAgIGlmIChpIDwgZC5sZW5ndGggLSAxKSB7XFxuICAgICAgICAgICAgbGV0IGl0ID0gZFtpXTtcXG4gICAgICAgICAgICBsZXQgdDEgPSBwYXJzZUludChjbGVhclRleHQoaXQudGl0bGUpKTtcXG4gICAgICAgICAgICBsZXQgbmV4dCA9IGRbaSArIDFdO1xcbiAgICAgICAgICAgIGxldCB0MiA9IHBhcnNlSW50KGNsZWFyVGV4dChuZXh0LnRpdGxlKSk7XFxuICAgICAgICAgICAgaWYgKHQyIC0gdDEgPiAxIHx8IHQxIC0gdDIgPiAxKSB7XFxuICAgICAgICAgICAgICAgIGQyLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJiaWdfYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBkMi5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibGluZV9ibGFua1xcXCJcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGQyLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJiaWdfYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfVxcblxcbiAgICBzZXRSZXN1bHQoZDIpO1xcbn1cIn1dIiwiaWNvbiI6IiIsInByb3h5IjoiIn0=
Add Comment
Please, Sign In to add comment