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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naHR0cHM6Ly9hcGkubGlmdmVzLmNvbS9tYWdhemluZS9ib29rP21hZ19pZD0nICsgaXQubWFnX2lkICsgJyZxaXNodT0nICsgaXQucWlzaHUsXG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cbn0gZWxzZSBpZiAobm93ID09ICfmlLbol48nKSB7XG4gICAgaWYgKE1ZX1BBR0UgPT0gMSkge1xuICAgICAgICBsZXQgY29sbGVjdGlvbiA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2NvbGxlY3Rpb24nKSB8fCAne30nKTtcbiAgICAgICAgZm9yIChsZXQgaSBpbiBjb2xsZWN0aW9uKSB7XG4gICAgICAgICAgICBsZXQgaXQgPSBjb2xsZWN0aW9uW2ldO1xuICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICB0aXRsZTogaSxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzMnLFxuICAgICAgICAgICAgICAgIGltZzogaXQuaW1nLFxuICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS9oaXN0b3J5JyxcbiAgICAgICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgICAgICBocmVmOiBpdC51cmwsXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpLFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGl0LmltZ1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICB9XG59XG5zZXRSZXN1bHQoZCk7Iiwic2VhcmNoX3VybCI6Imhpa2VyOi8vZW1wdHkjIyoqIiwiZ3JvdXAiOiIjI+W4uOeUqCIsInNlYXJjaEZpbmQiOiJqczpcbmxldCBkID0gW107XG5ldmFsKEpTT04ucGFyc2UoZmV0Y2goXCJoaWtlcjovL3BhZ2UvZ2V0SGVhZGVyc1wiKSkucnVsZSk7XG5sZXQgcWtfbGlzdCA9IEpTT04ucGFyc2UocmVxdWVzdChcImh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OiAnaGlrZXI6Ly9wYWdlL3RleHQnICsgZnVsbFRoZW1lICsgcmVhZFRoZW1lLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgaHJlZjogXFxcImh0dHBzOi8vYXBpLmxpZnZlcy5jb20vbWFnYXppbmUvcmVhZD9yZWFkX2lkPVxcXCIgKyBlLnJlYWRfaWQsXFxuICAgICAgICAgICAgICAgIGluZGV4OiBpbmRleFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgIH0pXFxufVxcblxcbnNldFJlc3VsdChkKTtcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuiOt+WPluivt+axguWktFwiLFwicGF0aFwiOlwiZ2V0SGVhZGVyc1wiLFwicnVsZVwiOlwiIGZ1bmN0aW9uIHJhbmRvbV9jaGFyKHQpIHtcXG4gICAgIGZvciAodmFyIG4gPSBbJzAnLCAnMScsICcyJywgJzMnLCAnNCcsICc1JywgJzYnLCAnNycsICc4JywgJzknLCAnYScsICdiJywgJ2MnLCAnZCcsICdlJywgJ2YnLCAnZycsICdoJywgJ2knLCAnaicsICdrJywgJ2wnLCAnbScsICduJywgJ28nLCAncCcsICdxJywgJ3InLCAncycsICd0JywgJ3UnLCAndicsICd3JywgJ3gnLCAneScsICd6J10sIGkgPSAnJywgZSA9IDA7IGUgPCB0OyBlKyspIHtcXG4gICAgICAgICB2YXIgbyA9IE1hdGguY2VpbCgzNSAqIE1hdGgucmFuZG9tKCkpXFxuICAgICAgICAgaSArPSBuW29dXFxuICAgICB9XFxuICAgICByZXR1cm4gaVxcbiB9XFxuXFxuIGZ1bmN0aW9uIGdldFNlY3JldGRhdGUoKSB7XFxuICAgICB2YXIgdCA9IHBhcnNlSW50KChuZXcgRGF0ZSgpKS5nZXRUaW1lKCkgLyAxZTMpXFxuICAgICB2YXIgbiA9IHJhb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8vZW1wdHkjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKChzKSA9PiB7XFxuICAgICAgICBzZXRJdGVtKCdpbmRlbnQnLCBTdHJpbmcocyAtIDEpKTtcXG4gICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgfSwgaW5kZW50KVxcbn0pXFxuXFxuZC5wdXNoKHtcXG4gICAgY29sX3R5cGU6ICdsaW5lJ1xcbn0pXFxuXFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6ICfpooTop4gnLmJpZygpICsgJyjlrZflj7c6JyArIGZvbnRzaXplICsgJyznvKnov5s6JyArIGluZGVudCArICcpJyxcXG4gICAgY29sX3R5cGU6ICdyaWNoX3RleHQnXFxufSwge1xcbiAgICB0aXRsZTogJzxwPuWwj+ajieiihOW4heWQlz88L3A+PHA+5bCP5qOJ6KKE5oCO5LmI6L+Z5LmI5biF77yfPC9wPjxwPuWwj+ajieiihOecn+aYr+i2hei2hei2hei2hei2hei2hei2hei2hee6p+W4hSEhISHluIXngrjkuoblpb3kuI3lpb3vvJ/kuL7kuJbpopzml6Dlj4whISEhPC9wPicucmVwbGFjZSgvXFxcXDxwXFxcXD4vZywgJzxwPicgKyBpbmRlbnRzKSxcXG4gICAgY29sX3R5cGU6ICdyaWNoX3RleHQnLFxcbiAgICBleHRyYToge1xcbiAgICAgICAgdGV4dFNpemU6IGZvbnRzaXplXFxuICAgIH1cXG59KVxcbnNldFJlc3VsdChkKTtcIn1dIiwiaWNvbiI6Imh0dHA6Ly9xay5kZW1vLmxpZnZlcy5jb20vZmF2aWNvbi5pY28iLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment