Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@期刊杂志demo@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi5pyf5YiK5p2C5b+XZGVtbyIsImF1dGhvciI6Ikpva2VyIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjZnlwYWdlIiwidmVyc2lvbiI6NiwiY29sX3R5cGUiOiJtb3ZpZV8zIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJyZWFkIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG5sZXQgZCA9IFtdO1xubGV0IG5vdyA9IGdldEl0ZW0oJ25vdycsICfmjqjojZDmnJ/liIonKTtcbmlmIChNWV9QQUdFID09IDEpIHtcbiAgICBsZXQgYXJyID0gWyfmjqjojZDmnJ/liIonLCAn54Ot6Zeo5pyf5YiKJywgJ+ebtOaSrScsICfmlLbol48nXTtcbiAgICBmb3IgKGxldCBpdCBvZiBhcnIpIHtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiBub3cgPT0gaXQgPyAn4oCc4oCc4oCd4oCdJyArIGl0LmZvbnRjb2xvcigncmVkJykgOiBpdCxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGl0KSA9PiB7XG4gICAgICAgICAgICAgICAgc2V0SXRlbShcIm5vd1wiLCBpdCk7XG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xuICAgICAg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1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgnc2VsZWN0X3piJywgZSk7XG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcbiAgICAgICAgICAgICAgICB9LCBvYmoudmFsdWUpLFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcInNjcm9sbF9idXR0b25cIlxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgZm9yIChsZXQgaXQgb2Ygc291cmNlX2xpc3Rbc2VsZWN0X3piXS5saXN0KSB7XG4gICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgIHRpdGxlOiBpdC50aXRsZSxcbiAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgodGFnKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaChcImhpa2VyOi8vcGFnZS9nZXRIZWFkZXJzXCIpKS5ydWxlKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGxpc3QgPSBKU09OLnBhcnNlKHJlcXVlc3QoJ2h0dHA6Ly9hcGkubGlmdmVzLmNvbS92aWRlby9nZXRMaXZlU291cmNlTGluaz90YWc9JyArIHRhZywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IGhlYWRlcnNcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKS5kYXRhX2xpc3QsXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmxzID0gbGlzdC5tYXAodiA9PiB2LmhyZWYpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgICAgICAgICAgdXJsczogdXJsc1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICA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naHR0cHM6Ly9hcGkubGlmdmVzLmNvbS9tYWdhemluZS9ib29rP21hZ19pZD0nICsgaXQubWFnX2lkICsgJyZxaXNodT0nICsgaXQucWlzaHUsXG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cbn0gZWxzZSBpZiAobm93ID09ICfmlLbol48nKSB7XG4gICAgaWYgKE1ZX1BBR0UgPT0gMSkge1xuICAgICAgICBsZXQgY29sbGVjdGlvbiA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2NvbGxlY3Rpb24nKSB8fCAne30nKTtcbiAgICAgICAgZm9yIChsZXQgaSBpbiBjb2xsZWN0aW9uKSB7XG4gICAgICAgICAgICBsZXQgaXQgPSBjb2xsZWN0aW9uW2ldO1xuICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICB0aXRsZTogaSxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzMnLFxuICAgICAgICAgICAgICAgIGltZzogaXQuaW1nLFxuICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS9oaXN0b3J5JyxcbiAgICAgICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgICAgICBocmVmOiBpdC51cmwsXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpLFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGl0LmltZ1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICB9XG59XG5zZXRSZXN1bHQoZCk7Iiwic2VhcmNoX3VybCI6Imhpa2VyOi8vZW1wdHkjIyoqIiwiZ3JvdXAiOiLikaDmjqjojZAiLCJzZWFyY2hGaW5kIjoianM6XG5sZXQgZCA9IFtdO1xuZXZhbChKU09OLnBhcnNlKGZldGNoKFwiaGlrZXI6Ly9wYWdlL2dldEhlYWRlcnNcIikpLnJ1bGUpO1xubGV0IHFrX2xpc3QgPSBKU09OLnBhcnNlKHJlcXVlc3QoX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VyOi8vcGFnZS90ZXh0JyArIGZ1bGxUaGVtZSArIHJlYWRUaGVtZSxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2UsXFxuICAgICAgICAgICAgICAgIGhyZWY6IFxcXCJodHRwczovL2FwaS5saWZ2ZXMuY29tL21hZ2F6aW5lL3JlYWQ/cmVhZF9pZD1cXFwiICsgZS5yZWFkX2lkLFxcbiAgICAgICAgICAgICAgICBpbmRleDogaW5kZXhcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9KVxcbn1cXG5cXG5zZXRSZXN1bHQoZCk7XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLojrflj5bor7fmsYLlpLRcIixcInBhdGhcIjpcImdldEhlYWRlcnNcIixcInJ1bGVcIjpcIiBmdW5jdGlvbiByYW5kb21fY2hhcih0KSB7XFxuICAgICBmb3IgKHZhciBuID0gWycwJywgJzEnLCAnMicsICczJywgJzQnLCAnNScsICc2JywgJzcnLCAnOCcsICc5JywgJ2EnLCAnYicsICdjJywgJ2QnLCAnZScsICdmJywgJ2cnLCAnaCcsICdpJywgJ2onLCAnaycsICdsJywgJ20nLCAnbicsICdvJywgJ3AnLCAncScsICdyJywgJ3MnLCAndCcsICd1JywgJ3YnLCAndycsICd4JywgJ3knLCAneiddLCBpID0gJycsIGUgPSAwOyBlIDwgdDsgZSsrKSB7XFxuICAgICAgICAgdmFyIG8gPSBNYXRoLmNlaWwoMzUgKiBNYXRoLnJhbmRvbSgpKVxcbiAgICAgICAgIGkgKz0gbltvXVxcbiAgICAgfVxcbiAgICAgcmV0dXJuIGlcXG4gfVxcblxcbiBmdW5jdGlvbiBnZXRTZWNyZXRkYXRlKCkge1xcbiAgICAgdmFyIHQgPSBwYXJzZUludCgobmV3IERhdGUoKSkuZ2V0VGltZSgpIC8gMWUzKVxcbiAgICAgdmFyIG4gPSByYW5kb21fY2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ge1xcbiAgICAgICAgc2V0SXRlbSgnaW5kZW50JywgU3RyaW5nKHMgLSAxKSk7XFxuICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgIH0sIGluZGVudClcXG59KVxcblxcbmQucHVzaCh7XFxuICAgIGNvbF90eXBlOiAnbGluZSdcXG59KVxcblxcbmQucHVzaCh7XFxuICAgIHRpdGxlOiAn6aKE6KeIJy5iaWcoKSArICco5a2X5Y+3OicgKyBmb250c2l6ZSArICcs57yp6L+bOicgKyBpbmRlbnQgKyAnKScsXFxuICAgIGNvbF90eXBlOiAncmljaF90ZXh0J1xcbn0sIHtcXG4gICAgdGl0bGU6ICc8cD7lsI/mo4noooTluIXlkJc/PC9wPjxwPuWwj+ajieiihOaAjuS5iOi/meS5iOW4he+8nzwvcD48cD7lsI/mo4noooTnnJ/mmK/otoXotoXotoXotoXotoXotoXotoXotoXnuqfluIUhISEh5biF54K45LqG5aW95LiN5aW977yf5Li+5LiW6aKc5peg5Y+MISEhITwvcD4nLnJlcGxhY2UoL1xcXFw8cFxcXFw+L2csICc8cD4nICsgaW5kZW50cyksXFxuICAgIGNvbF90eXBlOiAncmljaF90ZXh0JyxcXG4gICAgZXh0cmE6IHtcXG4gICAgICAgIHRleHRTaXplOiBmb250c2l6ZVxcbiAgICB9XFxufSlcXG5zZXRSZXN1bHQoZCk7XCJ9XSIsImljb24iOiJodHRwOi8vcWsuZGVtby5saWZ2ZXMuY29tL2Zhdmljb24uaWNvIiwicHJveHkiOiIifQ==
Add Comment
Please, Sign In to add comment