Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@影视大全@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi5b2x6KeG5aSn5YWoIiwiYXV0aG9yIjoizrEm5piO5pyI54WnIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjaHR0cHM6Ly93d3cuc2RzcnR5LmNvbS9pbmRleC5waHAvdm9kL3R5cGUvaWQvMS9wYWdlL2Z5cGFnZS5odG1sIiwidmVyc2lvbiI6MCwiY29sX3R5cGUiOiJtb3ZpZV8zIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJ2aWRlbyIsImNsYXNzX3VybCI6IiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxudmFyIGQgPSBbXTtcbnZhciBnZXRSYW5nZUNvbG9ycyA9IGZ1bmN0aW9uKCkge8KgwqDCoMKgwqDCoMKgXG4gICAgcmV0dXJuICcjJyArICgnMDAwMDAnICsgKE1hdGgucmFuZG9tKCkgKiAweDEwMDAwMDAgPDwgMCkudG9TdHJpbmcoMTYpKS5zdWJzdHIoLTYpO8KgwqDCoMKgwqBcbn1cbmNvbnN0IOS4i+S4gOmhtSA9IFwicGQoaHRtbCwgJ2E6bWF0Y2hlcyjkuIvkuIDpobUpJiZocmVmJylcIjtcbmNvbnN0IHBhZ2UgPSBNWV9QQUdFO1xuZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS95aT9ydWxlPc6xJykpLnJ1bGUpXG5cbnZhciDlrprkvY3kv6Hmga8gPSBbe1xuICAgIOS4gOe6p+WumuS9jTogJ2JvZHkmJi5uYXYtdGFicycsXG4gICAg5bCP57G7Oidib2R5JiZhJyxcbn1dXG5c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ICAgICAgICB2YXIgZHMgPSBzdG9yYWdlMC5nZXRJdGVtKCdkc2hvdycsICflsZXlvIAnKTtcbiAgICAgICAgICAgIHZhciB0aXRsZSA9IGZpbmRJdGVtKCdkc2hvdycpLnRpdGxlO1xuICAgICAgICAgICAgaWYgKGRzID09ICflsZXlvIAnKSB7XG4gICAgICAgICAgICAgICAgc3RvcmFnZTAuc2V0SXRlbSgnZHNob3cnLCAn5pS26LW3JylcbiAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKCdkY29udGVudCcsIHtcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGRjLFxuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgdXBkYXRlSXRlbSgnZHNob3cnLCB7XG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZS5yZXBsYWNlKCflsZXlvIAnLCAn5pS26LW3JylcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgc3RvcmFnZTAuc2V0SXRlbSgnZHNob3cnLCAn5bGV5byAJylcbiAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKCdkY29udGVudCcsIHtcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHNkYyxcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oJ2RzaG93Jywge1xuICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUucmVwbGFjZSgn5pS26LW3JywgJ+WxleW8gCcpXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXG4gICAgICAgIH0sIGRlc2MsIHNkZXNjKSxcbiAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgIGlkOiAnZHNob3cnLFxuICAgICAgICB9XG4gICAgf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VybCkgPT4ge1xcbiAgICAgICAgLy9mYmEubG9nKGZiYS5nZXRVcmxzKCkpO1xcbiAgICAgICAgdmFyIHVybHMgPSBfZ2V0VXJscygpO1xcbiAgICAgICAgaWYgKHdpbmRvdy5jb3VudCA9PSBudWxsIHx8IHdpbmRvdy5jb3VudCA9PSB1bmRlZmluZWQpIHtcXG4gICAgICAgICAgICB3aW5kb3cuY291bnQgPSAwXFxuICAgICAgICB9XFxuICAgICAgICBpZiAod2luZG93LmNvdW50ID49IDIzKSB7XFxuICAgICAgICAgICAgcmV0dXJuIHNyY3VybFxcbiAgICAgICAgfVxcbiAgICAgICAgd2luZG93LmNvdW50ID0gd2luZG93LmNvdW50ICsgMTtcXG4gICAgICAgIGlmICh3aW5kb3cuY291bnQgPiAxICYmIHdpbmRvdy5jb3VudCA8PSAzICYmIHdpbmRvdy5jb3VudCAhPSBudWxsICYmIHdpbmRvdy5jb3VudCAhPSB1bmRlZmluZWQpIHtcXG4gICAgICAgICAgICBpZiAoZG9jdW1lbnQucXVlcnlTZWxlY3RvcignYm9keScpLmlubmVyVGV4dC5zZWFyY2goL+inpuWPkeS6humYsuebl+mTvnzmnKrmjojmnYN85o6l5Y+j6Ziy55uXfOivt+WIsOS4u+ermeingueciy8pICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgIGlmICghc3JjdXJsKSB7XFxuICAgICAgICAgICAgICAgIFxcdGZiYS5sb2coJ+Wwneivlei3s+mYsuebl+mqjOivgeS4gCcpO1xcbiAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZiA9IGxvY2F0aW9uLmhyZWY7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIFxcdGZiYS5sb2coJ+Wwneivlei3s+mYsuebl+mqjOivgeS6jCcpO1xcbiAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZiA9IHNyY3VybFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfTtcXG4gICA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S51cmw7XFxuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBsb2NhdGlvbi5ocmVmfVxcbiAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGZiYS5sb2coJ+aXpeW/l+ajgOe0ouesrCcgKyB3aW5kb3cuY291bnQgKyAn5qyhJyk7XFxuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgaW4gdXJscykge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHVybHNbaV0ubWF0Y2goL2R5Y2RuXFxcXC10b3NcXFxcLnBzdGF0cHxcXFxcLm0zdTh8XFxcXC5tcDR8XFxcXC5mbHZ8bmV0ZWFzZVxcXFwuY29tfHZpZGVvX21wNHx0eXBlXFxcXD1tM3U4fHB0XFxcXD1tM3U4LykgJiYgIXVybHNbaV0ubWF0Y2goL2h0bWx8bTN1OFxcXFwudHZ8XFxcXCZuZXh0fGFjXFxcXD1kbXxcXFxcPWh0dHB8aHR0cHNcXFxcOlxcXFwvXFxcXC9bXFxcXGRdXFxcXC5tM3U4fFxcXFw/dXJsXFxcXD1cXFxcL20zdTgvKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vZnlfYnJpZGdlX2FwcC5sb2codXJsc1tpXSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodXJsc1tpXS5pbmRleE9mKCdiaWxpdmlkZW8nKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsc1tpXSArICc7e1JlZmVyZXJAaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tJiZVc2VyLUFnZW50QE1vemlsbGEvNS4wfSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh1cmxzW2ldLmluZGV4T2YoJ3RpdGFuLm1ndHYuY29tJykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybHNbaV0gKyAnI2lzVmlkZW89dHJ1ZSMnICsgJzt7UmVmZXJlckB3d3cubWd0di5jb20mJlVzZXItQWdlbnRATW96aWxsYS81LjB9JztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHVybHNbaV0uaW5kZXhPZignanVoYW9rYW4nKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsc1tpXSArICc7e1JlZmVyZXJAaHR0cHM6Ly93d3cuanVoYW9rYW4uY2MvfSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh1cmxzW2ldLmluZGV4T2YoJ29qYmsnKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsc1tpXSArICc7e1JlZmVyZXJAaHR0cHM6Ly92Lm9qYmtqeC5jb20vfSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh1cmxzW2ldLmluZGV4T2YoJ3drZmlsZScpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmxzW2ldICsgJzt7UmVmZXJlckBodHRwczovL2ZhbnR1YW4ud2tmaWxlLmNvbS99JztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsc1tpXSArICcjaXNWaWRlbz10cnVlIydcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0gLy9lbmQgZm9yIGlcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgIH0sIHNyY3VybCk7XFxuICAgIHJldHVybiB2aWRlb1xcbn1cXG4vL+e7k+adn3g1cnVsZeW8uuWKm+WXheaOolxcbiAgICByZXR1cm4geDVydWxlKGlucHV0LCBpbnB1dCk7XFxufSlcIn1dIiwiaWNvbiI6Imh0dHBzOi8vd3d3LnNkc3J0eS5jb20vdGVtcGxhdGUvd2FwaWFuL2Fzc2V0cy9pbWcvbG9nb19ibGFjay5wbmciLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment