Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@色戒•太久@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi6Imy5oiS4oCi5aSq5LmFIiwiYXV0aG9yIjoiQXJpc2UiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IyNodHRwOi8vdGFpOTk5LnByby8jI2Z5cGFnZSIsInZlcnNpb24iOjIwMjQwNTA4LCJjb2xfdHlwZSI6Im1vdmllXzMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InZpZGVvIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG4gICAgICAgIHJjKCdodHRwczovL21pcnJvci5naHByb3h5LmNvbS8vaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL21pc3R5d2F0ZXIvaGlrZXIvbWFpbi9mJywgMjQpO1xuICAgICAgICB2YXIgZCA9IFtdO1xuICAgICAgICB2YXIgaG9zdCA9IGNvbmZpZy5ob3N0O1xuICAgICAgICBjb25zdCBwYWdlID0gTVlfUEFHRTtcbiAgICAgICAgdmFyIGRhdGEgPSBbe1xuICAgICAgICAgICAgdGl0bGU6ICfpppbpobUm6buR5paZJuWbveS6pyboh6rmi40m5ZyL55SiJumAieWmgybpurvosYYmU1dBRybmiaPmiaMmOTHojITlrZAm57OW5b+DVmxvZybokJ3ojonnpL4mSlZJRCbkuYzmiZjpgqYm55qH5a625Y2O5Lq6JuaYn+epuibmnY/lkKcm5aSp576OJuaOouiKsScsXG4gICAgICAgICAgICBpZDogJ+mmlumhtSYxMDFAJjFAJjFAMzEmMUAzMCYxQDMyJjFAMjEmMUAyOSYxQDQ4JjFANDkmMUA1MCYx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dldE15VmFyKGhvc3QgKyAnYycpLnNwbGl0KFwiQFwiKVswXSAgICAgICBcbiAgICAgICAgdmFyIGNoaWQgPSBnZXRNeVZhcihob3N0ICsgJ2MnKS5zcGxpdChcIkBcIilbMV0gICAgICAgXG4gICAgICAgIHZhciByZXN1bHQgPSBKU09OLnBhcnNlKHBvc3QoTVlfVVJMLCB7XG4gICAgYm9keToge1xuICAgICAgICAgICAgIFwiY2F0ZWdvcnlfaWRcIjogY2lkLFxuICAgICAgICAgICAgIFwiY2F0ZWdvcnlfY2hpbGRfaWRcIjogY2hpZCxcbiAgICAgICAgICAgICBcInBhZ2VcIjogTVlfUEFHRSAtIDEsXG4gICAgICAgICAgICAgXCJsaW1pdFwiOiAyMFxuICAgICAgICAgICAgICB9XG4gICAgICAgIH0pKTtcbiBcbiAgICAgICAgdmFyIGxpc3QgPSByZXN1bHQuZGF0YS5kYXRhO1xuICAgICAgICBsaXN0LmZvckVhY2goKGl0ZW0pID0+IHtcbiAgICAgICAgICB2YXIgdGl0bGUgPSBpdGVtLnRpdGxlO1xuICAgICAgICAgIHZhciBkZXNjID0gaXRlbS5jcmVhdGVfdGltZS5zbGljZSgwLDEwKSArIFwiXFx0XFx0XFx0XFx0XCIgKyBjb252ZXJ0VGltZShpdGVtLmR1cmF0aW9uKTtcbiAgICAgICAgICB2YXIgdXJsID0gaXRlbS5pZDtcbiAgICAgICAgICB2YXIgaW1nID0gaXRlbS51cmw7XG4gICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcbiAgICAgICAgICAgICAgICBkZXNjOiBkZXNjLFxuICAgICAgICAgICAgICAgIGltZzogaW1nLFxuICAgICAgICAgICAgICAgIHVybDogdXJsICsgbGF6eSxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzInLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pXG59ICAgICAgXG4gc2V0UmVzdWx0KGQpIiwic2VhcmNoX3VybC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ClcXG59XFxuXFxuZnVuY3Rpb24gc2V0VGFicyh0YWJzLCB0YWJ1cmwpIHtcXG5cXG52YXIgQ29sb3IyID0gXFxcIiNGRjAwRkZcXFwiO1xcblxcbmZ1bmN0aW9uIGdldEhlYWQodGl0bGUpIHtcXG4gICAgcmV0dXJuICfigJjigJjigJnigJk8c3Ryb25nPjxmb250IGNvbG9yPVxcXCInICsgQ29sb3IyICsgJ1xcXCI+JyArIHRpdGxlICsgJzwvZnJvbnQ+PC9zdHJvbmc+JztcXG59XFxuXFxuICAgIGZvciAodmFyIGkgaW4gdGFicykge1xcbiAgICAgICAgdmFyIHRhYm5hbWUgPSB0YWJzW2ldO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogZ2V0TXlWYXIodGFidXJsLCAnMCcpID09IGkgPyBnZXRIZWFkKHRhYm5hbWUpIDogdGFibmFtZSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgIHVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgodGFibmFtZSwgdGFidXJsLCBpKSA9PiB7XFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKHRhYnVybCwgaSlcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgdGFibmFtZSwgdGFidXJsLCBpKVxcbiAgICAgICAgfSlcXG4gICAgaWYgKGkgPT0gMykge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfVxcbiAgICB9XFxufVxcblxcbiAgICAgICAgICAgICAgXFxuZnVuY3Rpb24gc2V0TGlzdHMobGlzdHMsIGluZGV4KSB7XFxuICAgIHZhciBsaXN0ID0gbGlzdHNbaW5kZXhdO1xcbiAgICBmdW5jdGlvbiBwbGF5TGlzdHMoKSB7XFxuICAgICBmb3IgKHZhciBqID0gMDsgaiA8IGxpc3QubGVuZ3RoOyBqKyspIHtcXG4gICAgICAgICAgdmFyIHRpdGxlID0gbGlzdFtqXS50aXRsZTtcXG4gICAgICAgICAgdmFyIGRlc2MgPSBsaXN0W2pdLmNyZWF0ZV90aW1lLnNsaWNlKDAsMTApICsgXFxcIlxcXFx0XFxcXHRcXFxcdFxcXFx0XFxcIiArIGNvbnZlcnRUaW1lKGxpc3Rbal0uZHVyYXRpb24pO1xcbiAgICAgICAgICB2YXIgdXJsID0gbGlzdFtqXS5pZDtcXG4gICAgICAgICAgdmFyIGltZyA9IGxpc3Rbal0udXJsO1xcbiAgICAgICAgICB2YXIgY29sID0gXFxcIm1vdmllXzJcXFwiO1xcbiAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcbiAgICAgICAgICAgICAgZGVzYzogZGVzYyxcXG4gICAgICAgICAgICAgIGltZzogaW1nLFxcbiAgICAgICAgICAgICAgdXJsOiB1cmwgKyBsYXp5LFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBjb2wsICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICB9XFxuICAgcGxheUxpc3RzKCkgICAgICAgXFxuICAgaWYgKGluZGV4ID09IDEpIHtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJsaW5lX2JsYW5rXFxcIlxcbiAgICAgICAgICAgICAgIH0pIFxcbiAgICAgdmFyIGFyciA9IGRhdGEudmlwX3RvcF9jYXQ7XFxuICAgICAgYXJyLmZvckVhY2goaXRlbSA9PiB7ICAgXFxuICAgICAgICB2YXIgaW1nID0gaXRlbS5pY29uX3VybF9lbmNyeXB0O1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLm5hbWUsXFxuICAgICAgICAgICAgICAgIGltZzogaW1nICE9IG51bGwgPyBpbWcucmVwbGFjZSgvaHR0cHM/OlxcXFwvXFxcXC8uKj9cXFxcLy8sZ2V0TXlWYXIoXFxcInBpY1VybFxcXCIsaW1nLm1hdGNoKC9odHRwcz86XFxcXC9cXFxcLy4qP1xcXFwvLylbMF0pKSA6IFxcXCJodHRwczovL3RodW1ic25hcC5jb20vaS9zeVNNUTdNZy5qcGdcXFwiLFxcbiAgICAgICAgICAgICAgICB1cmw6IGl0ZW0uY2lkICsgJChcXFwiQCNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKGhvc3QpID0+IHtcXG4gICAgICAgICAgICAgICAgcHV0TXlWYXIoaG9zdCArICdjJyxpbnB1dCk7ICAgICBcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LGhvc3QpLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2NhcmRfcGljXzMnLFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuXFxuc2V0VGFicyh0YWJzLCBNWV9VUkwpO1xcbnNldExpc3RzKGxpc3RzLCBnZXRNeVZhcihNWV9VUkwsICcwJykpO1xcblwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwibGF6eVwiLFwicGF0aFwiOlwibGF6eVwiLFwicnVsZVwiOlwidmFyIGxhenkgPSAkKCcnKS5sYXp5UnVsZSgoaG9zdCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgdmFyIHBsYXkgPSBob3N0ICsgXFxcInYyL3ZpZGVvcGxheVxcXCJcXG4gICAgICAgICAgICAgICAgICAgdmFyIHJlc3VsdCA9IEpTT04ucGFyc2UocG9zdChwbGF5LCB7XFxuICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgXFxcInZpZFxcXCI6IGlucHV0XFxuICAgICAgICAgICAgICB9XFxuICAgICAgICB9KSk7XFxuICAgICAgICAgICAgICAgICAgIHZhciBwbGF5bGlzdCA9IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmxzOiBbcmVzdWx0LnZpZGVvLnNsLHJlc3VsdC52aWRlby5zZWxmX2Nkbl9wYXRoXVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICByZXR1cm4gcGxheWxpc3QgICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgIH0saG9zdClcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcInVwZGF0ZVwiLFwicGF0aFwiOlwidXBkYXRlXCIsXCJydWxlXCI6XCIvKlxcbnZhciBodG1sID0gZmV0Y2goZ2V0SXRlbSgnbGluaycpKVxcbmlmICggIWdldEl0ZW0oJ2xpbmsnKS5pbmNsdWRlcygnaHR0cCcpIHx8ICFodG1sLmluY2x1ZGVzKCfoibLmiJInKSApIHtcXG4qL1xcbiAgICBsZXQgZmFidSA9IGZldGNoKCdodHRwOi8vd3d3LnRhaTk5Lm5ldCcse1xcbiAgICAgICAgaGVhZGVyczp7XFxuICAgICAgICAgICAgQWNjZXB0OlxcXCJ0ZXh0L2h0bWwsYXBwbGljYXRpb24veGh0bWwreG1sLGFwcGxpY2F0aW9uL3htbDtxPTAuOSxpbWFnZS9hdmlmLGltYWdlL3dlYnAsaW1hZ2UvYXBuZywqLyo7cT0wLjgsYXBwbGljYXRpb24vc2lnbmVkLWV4Y2hhbmdlO3Y9YjM7cT0wLjdcXFwiXFxuICAgICAgICB9XFxuICAgIH0pO1xcbiAgICBsZXQgdGVtcCA9IHBkZmgoZmFidSwgJ2EmJmh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AgICAgICAgY2FuY2VsOiAkLnRvU3RyaW5nKCgpID0+IHt9KVxcbiAgICB9KTtcXG4gICAgIFxcbi8vICAgfVxcblwifV0iLCJpY29uIjoiaHR0cHM6Ly9pbWcudmludWEuY24vaW1hZ2VzL3ZMa0ZYLnBuZyIsInByb3h5IjoiIn0=
Add Comment
Please, Sign In to add comment