Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@聚搜君Lite@eyJmaXJzdEhlYWRlciI6ImNsYXNzIiwibGFzdF9jaGFwdGVyX3J1bGUiOiIiLCJ0aXRsZSI6IuiBmuaQnOWQm0xpdGUiLCJhdXRob3IiOiJMb3lEZ0lrJumBk+mVvybmsLjov5zjga7mmI7ml6UiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IyNmeXBhZ2UiLCJ2ZXJzaW9uIjo1LCJjb2xfdHlwZSI6Im1vdmllXzFfdmVydGljYWxfcGljIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJvdGhlciIsImNsYXNzX3VybCI6IiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxubGV0IGJhdGNoU2VhcmNoX2VsID0gW10sXG4gIGJhdGNoU2VhcmNoX3BhZ2UgPSBwYXJzZUludChNWV9VUkwuc2xpY2UoMTUpKSxcbiAgYmF0Y2hTZWFyY2hfa3cgPSBnZXRWYXIoJ2JhdGNoU2VhcmNoLWt3JywgJycpLFxuICBiYXRjaFNlYXJjaF9jb25maWcgPSBKU09OLnBhcnNlKGdldFZhcignYmF0Y2hTZWFyY2gtY29uZmlnJykpLFxuICBiYXRjaFNlYXJjaF9zdGFydCA9ICQudG9TdHJpbmcoKG1vZGUsIHRpdGxlKSA9PiB7XG4gICAgaWYgKG1vZGUgPT0gJ+WGhee9ricpIHtcbiAgICAgIHB1dFZhcignYmF0Y2hTZWFyY2gta3cnLCBpbnB1dClcbiAgICAgIHJlZnJlc2hQYWdlKClcbiAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcbiAgICB9IGVsc2UgcmV0dXJuICdoaWtlcjovL3NlYXJjaD9zPScgKyBpbn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AgICAgICAgICAgICAgdi51cmwgPSB2LnVybCAmJiBiYXRjaFNlYXJjaF91cmxIYW5kbGUodi51cmwpXFxuICAgICAgICAgICAgICAgICAgICB2LmNvbF90eXBlID0gdi5jb2xfdHlwZSB8fCBiYXRjaFNlYXJjaF9pdGVtUnVsZS5jb2xfdHlwZVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZcXG4gICAgICAgICAgICAgICAgICB9KSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgfSkoc2V0UmVzdWx0KVxcbiAgICAgICAgICAgICAgc2V0U2VhcmNoUmVzdWx0ID0gc2V0UmVzdWx0XFxuICAgICAgICAgICAgICBzZXRIb21lUmVzdWx0ID0gc2V0UmVzdWx0XFxuICAgICAgICAgICAgfSkgKyAnOycpICsgJ1xcXFxufWNhdGNoKGUpeycgKyAkLnRvU3RyaW5nKCh0aXRsZSwgYmF0Y2hTZWFyY2hfcmVDb25maWcpID0+IHtcXG4gICAgICAgICAgICBzZXRSZXN1bHQoW3tcXG4gICAgICAgICAgICAgIHRpdGxlOiAn5bCP56iL5bqP44CQJyArIHRpdGxlICsgJ+OAkeS4re+8jOatpOS6jOe6p+mhtemdouS4jeaUr+aMgeaIluiAheW3suWkseaViO+8jOmUmeivr+S/oeaBr++8mlxcXFxuXFxcXG4nICsgZS5tZXNzYWdlLFxcbiAgICAgICAgICAgICAgY29sX3R5cGU6ICdsb25nX3RleHQnXFxuICAgICAgICAgICAgfSwgeyBjb2xfdHlwZTogJ2xpbmUnIH0sIHtcXG4gICAgICAgICAgICAgIHRpdGxlOiAn4oCc4oCc4oCd4oCdPHNwYW4gc3R5bGU9XFxcImNvbG9yOiM0MDllZmZcXFwiPuaOkumZpOWwj+eoi+W6jzwvc3Bhbj4nLFxcbiAgICAgICAgICAgICAgdXJsOiAnY29uZmlybTovL+imgeaOkumZpOivpeWwj+eoi+W6j+WQlz8uanM6JyArXFxuICAgICAgICAgICAgICAgIGJhdGNoU2Vhc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sIHBhcmFtcykge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gZnVuYyhiYXRjaFNlYXJjaF91cmxIYW5kbGUodXJsKSwgcGFyYW1zKVxcbiAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pKGZldGNoKVxcbiAgICAgICAgICAgIGV2YWwoYmF0Y2hTZWFyY2hfaXRlbVJ1bGUucHJlUnVsZSlcXG5cXG4gICAgICAgICAgICBmdW5jdGlvbiBnZXRSZXNDb2RlKCkgeyByZXR1cm4gYmF0Y2hTZWFyY2hfc2VhcmNoSHRtbCB9XFxuXFxuICAgICAgICAgICAgZnVuY3Rpb24gc2V0UmVzdWx0KGVsKSB7XFxuICAgICAgICAgICAgICBpZiAoIUFycmF5LmlzQXJyYXkoZWwpKSBlbCA9IGVsLmRhdGFcXG4gICAgICAgICAgICAgIGVsLmZvckVhY2goKHYpID0+IHtcXG4gICAgICAgICAgICAgICAgdi50aXRsZSA9IChiYXRjaFNlYXJjaF9jb25maWcuc2VhcmNoTW9kZSA9PSAn5YaF572uJyAmJiAhL17igJzigJx84oCY4oCYLy50ZXN0KHYudGl0bGUpID8gJ+KAnOKAnOKAneKAnScgOiAnJykgKyB2LnRpdGxlXFxuICAgICAgICAgICAgICAgIHYudXJsID0gYmF0Y2hTZWFyY2hfdXJsSGFuZGxlKHYudXJsLCB0cnVlKVxcbiAgICAgICAgICAgICAgICB2LmRlc2MgPSBiYXRjaFNlYXJjaF9pdGVtUnVsZS50aXRsZSArICh2LmRlc2MgPyAnIPCflLkgJyArIHYuZGVzYyA6ICcnKVxcbiAgICAgICAgICAgICAgICB2LmNvbF90eXBlID0gJ21vdmllXzFfdmVydGljYWxfcGljJ1xcbiAgICAgICAgICAgICAgICBiYXRjaFNlYXJjaF9yZXN1bHQucHVzaCh2KVxcbiAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgc2V0U2VhcmNoUmVzdWx0ID0gc2V0UmVzdWx0XFxuICAgICAgICA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KSArICc7JyArXFxuICAgICAgICAgICAgJC50b1N0cmluZygoKSA9PiB3cml0ZUZpbGUoJ2hpa2VyOi8vZmlsZXMvQmF0Y2hTZWFyY2hDb25maWcuanNvbicsIGdldFZhcignYmF0Y2hTZWFyY2gtY29uZmlnJykpKSArXFxuICAgICAgICAgICAgJztcXFwidG9hc3Q6Ly/lt7LmjpLpmaTlsI/nqIvluo/jgJAnICsgYmF0Y2hTZWFyY2hfaXRlbVJ1bGUudGl0bGUgKyAn44CRXFxcIicsXFxuICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgIH0pO1xcbiAgICAgIH1cXG4gICAgfSlcXG4gICAgcmV0dXJuIGJhdGNoU2VhcmNoX3Jlc1xcbiAgfSBjYXRjaCAoZSkge1xcbiAgICByZXR1cm4gW3tcXG4gICAgICB0aXRsZTogJ+aQnOe0ouaXtuWHuueOsOiHtOWRvemUmeivr++8jOeCueWHu+afpeeci+ino+WGs+WKnuazlVxcXFxuJyArIGUsXFxuICAgICAgdXJsOiAkKCfngrnlh7vnoa7lrprlkI7nu5PmnZ/mkJzntKLvvIzlsIbmkJzntKLnur/nqIvosIPmlbTkuLox77yMXFxcXG7ph43mlrDmkJzntKLnm7TliLDlho3mrKHlh7rnjrDnm7jlkIznmoTmiqXplJnvvIxcXFxcbueEtuWQjuWwseWPr+S7peWumuS9jeW8lei1t+iHtOWRvemUmeivr+eahOWwj+eoi+W6j++8jOaJi+WKqOWwhuWFtuaOkumZpCcpLmNvbmZpcm0oKCkgPT4ge1xcbiAgICAgICAgcHV0VmFyKCdiYXRjaFNlYXJjaC1rdycsICcnKVxcbiAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgIH0pLFxcbiAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgfV1cXG4gIH1cXG59XFxuXCJ9XSJ9
Add Comment
Please, Sign In to add comment