Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@WiKiHowⓂ️@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiV2lLaUhvd+KTgu+4jyIsImF1dGhvciI6IiIsInVybCI6Imh0dHBzOi8vemgud2lraWhvdy5jb20vZnlBbGw/cGc9ZnlwYWdlIiwidmVyc2lvbiI6MSwiY29sX3R5cGUiOiJjYXJkX3BpY18xIiwiY2xhc3NfbmFtZSI6IuS4quS6uuW9ouixoeS4juaXtuWwmibkurrpmYXlhbPns7sm5YGH5pyf5LiO6IqC5pelJuWBpeW6tyblhbTotqPkuI7miYvoibom5a6X5pWZ5LiO5ZOy5a2mIiwidHlwZSI6Im90aGVyIiwiY2xhc3NfdXJsIjoiQ2F0ZWdvcnk6JUU0JUI4JUFBJUU0JUJBJUJBJUU1JUJEJUEyJUU4JUIxJUExJUU0JUI4JThFJUU2JTk3JUI2JUU1JUIwJTlBJkNhdGVnb3J5OiVFNCVCQSVCQSVFOSU5OSU4NSVFNSU4NSVCMyVFNyVCMyVCQiZDYXRlZ29yeTolRTUlODElODclRTYlOUMlOUYlRTQlQjglOEUlRTglOEElODIlRTYlOTclQTUmQ2F0ZWdvcnk6JUU1JTgxJUE1JUU1JUJBJUI3JkNhdGVnb3J5OiVFNSU4NSVCNCVFOCVCNiVBMyVFNCVCOCU4RSVFNiU4OSU4QiVFOCU4OSVCQSZDYXRlZ29yeTolRTUlQUUlOTclRTYlOTUlOTklRTQlQjglOEUlRTUlOTMlQjIlRTUlQUQlQTYiLCJhcmVhX25hbWUiOiLlrqDniankuI7liqjniakm5a625bGF5LiO5Zut6Im6JuWutuW6reeUn+a0uyblt6XkvZwm5pWZ6IKy5LiO5Lqk5rWBJuaXheihjCbmsb3ovabkuI7lhbbku5bkuqTpgJrlt6XlhbciLCJhcmVhX3VybCI6IkNhdGVnb3J5OiVFNSVBRSVBMCVFNyU4OSVBO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0bGU6Z2V0U21hbGxUZXh0KGxpTGlzdCtnZXRDb2xvclRleHQoXCLirZBcIitncmVlbkJveCxcIiMwMDk5MzNcIikpLFxuXHQgICAgICAgICAgICAgICAgZXh0cmE6IHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHRTaXplOiBzaXplLFxuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2s6IHRydWVcblx0ICAgICAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9KTtcblx0XHRcdH1cblx0XHR9ZWxzZXtcblx0ICAgICBpZihsaUxpc3QhPT1cIlwiKSBcblx0ICAgICBcdGQucHVzaCh7XG5cdCAgICAgXHRcdHRpdGxlOmdldFNtYWxsVGV4dChsaUxpc3QpLFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IHNpemUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2s6IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuXHQgIFx0fVxuXHR9XHRcbn1cblxuICBcbmxldCByZWFkbHk9Jyc7XG50cnl7XG5cdHJlYWRseSA9IHBhcnNlRG9tRm9ySHRtbChodG1sLCcuc2VjdGlvbi7kvaDpnIDopoHlh4blpIcmJnVsJiZIdG1sJykucmVwbGFjZSgvPFxcL2xpPi9nLFwiPC9zcGFuPjxicj5cIilcblx0LnJlcGxhY2UoLzxsaT4vZywnPHNwYW4+4piR77iPJm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jylcblx0LnJlcGxhY2UoLzxkaXYgY2xhc3M9XCJjaGVja21hcmtcIj48XFwvZGl2Pi9nLFwiXCIpO1xufWNhdGNoKGUpe31cblxuXG5cbmxldCB0aXBzID0gJyc7XG50cnl7XG5cdHRpcHMgPSBwYXJzZURvbUZvckh0bWwoaHRtbCwnLnNlY3Rpb24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gICAgICBjbGljazogdHJ1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblx0fSk7XG5cdGQucHVzaCh7dGl0bGU6IGdldFNtYWxsVGV4dChyZWFkbHkpLFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogc2l6ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2s6IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9fSk7XG59XG5cbmlmKHRpcHMgIT09ICcnKXtcblx0Ly9kLnB1c2goe2NvbF90eXBlOiAnbGluZSd9KTtcblx0ZC5wdXNoKHtcblx0XHR0aXRsZTogICfigJzigJzigJ3igJ08Yj7lsI/mj5DnpLrwn5ev77iPPC9iPicsXG5cdFx0dXJsOlwiaGlrZXI6Ly9lbXB0eVwiLFxuXHRcdGNvbF90eXBlOlwidGV4dF9jZW50ZXJfMVwiLFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogc2l6ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2s6IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cdH0pO1xuXHRkLnB1c2goe3RpdGxlOiBnZXRTbWFsbFRleHQodGlwcyksXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHRTaXplOiBzaXplLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGljazogdHJ1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH19KTtcbn1cblxuaWYod2FybmluZyAhPT0gJycpe1xuXHQvL2QucHVzaCh7Y29sX3R5cGU6ICdsaW5lJ30pO1xuXHRkLnB1c2goe1xuXHRcdHRpdGxlOiAn4oCc4oCc4oCd4oCdPGI+6K2m5ZGK4pqg77iPPC9iPicsXG5cdFx0dXJsOlwiaGlrZXI6Ly9lbXB0eVwiLFxuXHRcdGNvbF90eXBlOlwidGV4dF9jZW50ZXJfMVwiLFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogc2l6ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2s6IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cdH0pO1xuXHRkLnB1c2goe3RpdGxlOiBnZXRTbWFsbFRleHQod2FybmluZyksXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHRTaXplOiBzaXplLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGljazogdHJ1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH19KTtcbn1cblxubGV0IHRpcHNCdXR0b20gPSAn6K+l5paH56ug5p2l5rqQ5LqOV2lLaUhvd++8jOWmguaCqOWWnOasou+8jOivt+i/m+WFpeWumOe9kea1j+iniCc7XG5sZXQgd2FybmluZ0J1dHRvbSA9ICfmraTop4TliJnku4XkvpvkuKrkurrlrabkuaDkuqTmtYHkvb/nlKgs6K+35L2/55So5ZCOMjTlsI/ml7blhoXliKDpmaQnO1xuZC5wdXNoKHtjb2xfdHlwZTogJ2xpbmVfYmxhbmsnfSk7XG5kLnB1c2goe1xuICAgdGl0bGU6ICfigJzigJzigJ3igJ0nK0dldFRpcHModGlwc0J1dHRvbSx3YXJuaW5nQnV0dG9tKSxcbiAgIHVybDogTVlfVVJMLFxuICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xufSk7XG5kLnB1c2goe2NvbF90eXBlOiAnbGluZV9ibGFuayd9KTtcblxucmVzLmRhdGEgPSBkO1xuc2V0SG9tZVJlc3VsdChyZXMpOyIsInN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