xiaomianao666

小程序:云盘君

Feb 26th, 2023
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@云盘君@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi5LqR55uY5ZCbIiwiYXV0aG9yIjoi5bCP5qOJ6KKE8J+MniIsInVybCI6Imhpa2VyOi8vZW1wdHkjI2Z5cGFnZSIsInZlcnNpb24iOjE2LCJjb2xfdHlwZSI6Im1vdmllXzMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InZpZGVvIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG52YXIgZCA9IFtdO1xuYWRkTGlzdGVuZXIoXG4gICAgJ29uUmVmcmVzaCcsICQudG9TdHJpbmcoKCkgPT4ge1xuICAgICAgICBjbGVhck15VmFyKCdzJylcbiAgICB9KVxuKVxuZXZhbChKU09OLnBhcnNlKGZldGNoKFwiaGlrZXI6Ly9wYWdlL3NvdVwiKSkucnVsZSk7XG5sZXQgcyA9IGdldE15VmFyKCdzJywgJycpO1xuaWYgKHMgPT0gXCJcIikge1xuICAgIGlmIChNWV9QQUdFID09IDEpIHtcblxuICAgICAgICBoZWFkZXIgPSB7XG4gICAgICAgICAgICAnVXNlci1BZ2VudCc6ICdNb3ppbGxhLzUuMCAoTGludXg7IEFuZHJvaWQgNi4wOyBOZXh1cyA1IEJ1aWxkL01SQTU4TikgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzk5LjAuNDg0NC41MSBNb2JpbGUgU2FmYXJpLzUzNy4zNicsXG4gICAgICAgICAgICAnSG9zdCc6ICd0b3AuYmFpZHUuY29tJy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KHBhcnNlSW50KGkpICsgMSkudG9TdHJpbmcoKSArICc8L3NwYW4+JyArIFwiXFx0XFx0XFx0XCIgKyBuYW1lIDogaSA9PSBcIjFcIiA/ICfigJzigJzigJ3igJ08c3BhbiBzdHlsZT1cImNvbG9yOiNmZjY2MDBcIj4nICsgKHBhcnNlSW50KGkpICsgMSkudG9TdHJpbmcoKSArICc8L3NwYW4+JyArIFwiXFx0XFx0XFx0XCIgKyBuYW1lIDogaSA9PSBcIjJcIiA/ICfigJzigJzigJ3igJ08c3BhbiBzdHlsZT1cImNvbG9yOiNmZjk5MDBcIj4nICsgKHBhcnNlSW50KGkpICsgMSkudG9TdHJpbmcoKSArICc8L3NwYW4+JyArIFwiXFx0XFx0XFx0XCIgKyBuYW1lIDogJ+KAnOKAnOKAneKAnTxzcGFuPicgKyAocGFyc2VJbnQoaSkgKyAxKS50b1N0cmluZygpICsgJzwvc3Bhbj4nICsgXCJcXHRcXHRcXHRcIiArIG5hbWUsXG4gICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChuYW1lKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIG5hbWUgPSBuYW1lLnNwbGl0KCcgICAgKCcpWzBdO1xuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcigncycsIG5hbWUpO1xuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXG4gICAgICAgICAgICAgICAgfSwgbmFtZSksXG4gICAgICAgICAgICAgICAgZGVzYzogZGVzLFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcInRleHRfMVwiXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH1cbiAgICBzZXRSZXN1bHQoZCk7XG59Iiwic2VhcmNoX3VybCI6Imhpa2VyOi8vZW1wdHkjIyoqIiwiZ3JvdXAiOiLikaDnvZHnm5giLCJzZWFyY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AgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICBsZXQgYXJyID0gcGRmYShodG1sLCBcXFwiI2FwcCYmYVxcXCIpO1xcbiAgICAgICAgLy9sb2coYXJyKTtcXG4gICAgICAgIGxldCBkID0gW107XFxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgIGxldCBpdCA9IFxcXCI8ZGl2PlxcXCIgKyBhcnJbaV0gKyBcXFwiPC9kaXY+XFxcIjtcXG4gICAgICAgICAgICBsZXQgdSA9IHBkZmgoaXQsIFxcXCJhJiZocmVmXFxcIik7XFxuICAgICAgICAgICAgLy9sb2codSk7XFxuICAgICAgICAgICAgaWYgKCF1LmluY2x1ZGVzKFxcXCIvcy9cXFwiKSkge1xcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdSA9IFxcXCJodHRwczovL3d3dy5hbGlwYW5zb3UuY29tXFxcIiArIHUucmVwbGFjZShcXFwiL3MvXFxcIiwgXFxcIi9jdi9cXFwiKTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChpdCwgXFxcInRlbXBsYXRlJiZUZXh0XFxcIiksXFxuICAgICAgICAgICAgICAgIHVybDogJCh1KS5sYXp5UnVsZSgod3JhcHUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gcmVxdWVzdChpbnB1dCwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIkNvb2tpZVxcXCI6IFxcXCJub19zaG93X2RvbmF0ZT0xXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiBpbnB1dC5yZXBsYWNlKFxcXCIvY3YvXFxcIiwgXFxcIi9zL1xcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWRpcmVjdDogZmFsc2VcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIF9saW5rcyA9IGh0bWwubWF0Y2goL2h0dHBzOlxcXFwvXFxcXC8od3d3XFxcXC5hbGl5dW5kcml2ZVxcXFwuY29tXFxcXC9zfGFseXdwXFxcXC5uZXQpXFxcXC9cXFxcdyovZykgfHwgW107XFxuICAgICAgICAgICAgICAgICAgICAvL2xvZyhfbGlua3MpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKF9saW5rcy5sZW5ndGggPiAxICYmIF9saW5rc1sxXS5yZXBsYWNlKF9saW5rc1swXSwgXFxcIlxcXCIpLnJlcGxhY2UoL1thLXpBLVowLTldKy9nLCBcXFwiXFxcIikgPT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gd3JhcHUoX2xpbmtzWzFdKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoX2xpbmtzLmxlbmd0aCA+IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gd3JhcHUoX2xpbmtzWzBdKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGlucHV0O1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCB3cmFwdSksXFxuICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLigJzigJzigJ3igJ08Zm9udCBjb2xvcj0jZjEzYjY2YT7njKvni7jnm5jmkJw8L2ZvbnQ+Jm5ic3A7XFxcIiArIHBkZmgoaXQsIFxcXCJ0ZW1wbGF0ZSwxJiZUZXh0XFxcIiksXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gZDtcXG4gICAgfV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xcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgJ1JlZmVyZXInOiAnaHR0cHM6Ly91LmdpdGNhZmUubmV0LydcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgYWN0aW9uOiBcXFwic2VhcmNoXFxcIixcXG4gICAgICAgICAgICAgICAga2V5d29yZDogc1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgICAgICBsZXQgbGlzdCA9IEpTT04ucGFyc2UoaHRtbCk7XFxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxpc3QubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICBsZXQgaXQgPSBsaXN0W2ldXFxuICAgICAgICAgICAgbGV0IHRpdGxlID0gaXQudGl0bGU7XFxuICAgICAgICAgICAgbGV0IG11cmwgPSBpdC5rZXlcXG4gICAgICAgICAgICBpZiAodGl0bGUuaW5jbHVkZXMocykpIHtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLigJzigJzigJ3igJ08Zm9udCBjb2xvcj0jZjEzYjY2YT7lsI/nurjmnaE8L2ZvbnQ+Jm5ic3A7XFxcIiArIGNhdF9jb2RlKGl0LmNhdCksXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlczogaXQuZGVzXFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiB3cmFwdSgnaHR0cHM6Ly93d3cuYWxpeXVuZHJpdmUuY29tL3MvJyArIG11cmwpLFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gZDtcXG4gICAgfVxcbn0sIHt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ICAgIGxldCBpdCA9IGFycltpXTtcXG4gICAgICAgICAgICBsZXQgdSA9IHBkKGl0LCBcXFwiYSYmaHJlZlxcXCIsIHVybCk7XFxuICAgICAgICAgICAgbGV0IHQgPSBwZGZoKGl0LCBcXFwiYSYmVGV4dFxcXCIpO1xcbiAgICAgICAgICAgIGlmIChpdC5pbmNsdWRlcyhcXFwiTmV4dCBwYWdlXFxcIikgfHwgaXQuaW5jbHVkZXMoXFxcIuS4i+S4gOmhtVxcXCIpKSB7XFxuICAgICAgICAgICAgICAgIGxldCB1MiA9IHBkKGl0LCBcXFwiYSYmaHJlZlxcXCIsIHVybCk7XFxuICAgICAgICAgICAgICAgIGxvZyhcXFwibmV4dCBwYWdlXFxcIik7XFxuICAgICAgICAgICAgICAgIGxvZyh1Mik7XFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJiaW5nXFxcIiwgdTIpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAodSA9PSBudWxsIHx8IHQgPT0gbnVsbCB8fCAhaXQuaW5jbHVkZXMocykpIHtcXG4gICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmICghaXQuaW5jbHVkZXMoXFxcIue9keebmFxcXCIpICYmICFpdC5pbmNsdWRlcyhcXFwi5LqR55uYXFxcIikgJiZcXG4gICAgICAgICAgICAgICAgIWl0LmluY2x1ZGVzKFxcXCJhbGl5dW5kcml2ZVxcXCIpICYmICFpdC5pbmNsdWRlcyhcXFwieXVucGFuXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmICh1LnN0YXJ0c1dpdGgoXFxcImh0dHBzOi8vY24uYmluZy5jb20vXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxldCBkb20gPSBnZXRIb21lKHUpLnJlcGxhY2UoXFxcImh0dHA6Ly9cXFwiLCBcXFwiXFxcIikucmVwbGFjZShcXFwiaHR0cHM6Ly9cXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgbGV0IF9saW5rcyA9IHQubWF0Y2goL2h0dHBzOlxcXFwvXFxcXC8od3d3XFxcXC5hbGl5dW5kcml2ZVxcXFwuY29tXFxcXC9zfGFseXdwXFxcXC5uZXQpXFxcXC9cXFxcdyovZykgfHwgW107XFxuICAgICAgICAgICAgbG9nKF9saW5rcyk7XFxuICAgICAgICAgICAgbGV0IGMgPSBudWxsO1xcbiAgICAgICAgICAgIGlmIChfbGlua3MubGVuZ3RoID4gMSAmJiBfbGlua3NbMV0ucmVwbGFjZShfbGlua3NbMF0sIFxcXCJcXFwiKS5yZXBsYWNlKC9bYS16QS1aMC05XSsvZywgXFxcIlxcXCIpID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICAgIGMgPSB3cmFwdShfbGlua3NbMV0pO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoX2xpbmtzLmxlbmd0aCA+IDApIHtcXG4gICAgICAgICAgICAgICAgYyA9IHdyYXB1KF9saW5rc1swXSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0LFxcbiAgICAgICAgICAgICAgICBkZXNjOiBcXFwi4oCc4oCc4oCd4oCdPGZvbnQgY29sb3I9I2YxM2I2NmE+5b+F5bqUPC9mb250PiZuYnNwO1xcXCIgKyBkb20sXFxuICAgICAgICAgICAgICAgIHVybDogYyAhPSBudWxsID8gYyA6ICQodSkubGF6eVJ1bGUoKHdyYXB1LCBtb2RlKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IHJlcXVlc3QoaW5wdXQpO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIF9saW5rcyA9IGh0bWwubWF0Y2goL2h0dHBzOlxcXFwvXFxcXC8od3d3XFxcXC5hbGl5dW5kcml2ZVxcXFwuY29tXFxcXC9zfGFseXdwXFxcXC5uZXQpXFxcXC9cXFxcdyovZykgfHwgW107XFxuICAgICAgICAgICAgICAgICAgICBsb2coX2xpbmtzKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChfbGlua3MubGVuZ3RoID4gMSAmJiBfbGlua3NbMV0ucmVwbGFjZShfbGlua3NbMF0sIFxcXCJcXFwiKS5yZXBsYWNlKC9bYS16QS1aMC05XSsvZywgXFxcIlxcXCIpID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdyYXB1KF9saW5rc1sxXSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKF9saW5rcy5sZW5ndGggPiAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdyYXB1KF9saW5rc1swXSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBydWxlID0gTVlfUlVMRS50aXRsZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vcGFnZS95c2Z4P3J1bGU9XFxcIiArIHJ1bGUgKyBcXFwiJnI9XFxcIiArIHJ1bGUgKyBcXFwiJm1vZGU9XFxcIiArIG1vZGUgKyBcXFwiIyNcXFwiICsgaW5wdXQ7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sIHdyYXB1LCBjb25maWcubW9kZSlcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiBkO1xcbiAgICB9XFxufV07XFxuXFxubGV0IGNjb2YgPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9jY29mJylcXG5ydWxlcy5wdXNoKGNjb2YpXFxuLy/lubblj5Hop4TliJnmlbBcXG5sZXQgc2l6ZSA9IDEwO1xcblxcbiQuZXhwb3J0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samIyNGlPaUpvZEhSd2N6b3ZMMmRwZEdWbExtTnZiUzltYkhreE16azNMMmhwYTJWeUxXbGplUzl5WVhjdmJXRnpkR1Z5TDJGc2FYbDFiaTV3Ym1jaWZRPT1cXFwiXFxuICAgICAgICB9KTtcXG4gICAgICAgIGNvbmZpcm0oe1xcbiAgICAgICAgICAgIHRpdGxlOiBNWV9SVUxFLnRpdGxlICsgJ+aPkOekuicsXFxuICAgICAgICAgICAgY29udGVudDogJ+acrOinhOWImeS+nei1luS6keebmOaxh+W9seinhOWIme+8jOeCueWHu+S4i+mdoueahOehruWumuaMiemSruWvvOWFpe+8jOazqOaEj+WvvOWFpeWQjuS4gOWumuimgeWcqOS6keebmOaxh+W9seeZu+W9lemYv+mHjOS6keebmOi0puWPt++8jOWQpuWImeS4jeiDveeUqCcsXFxuICAgICAgICAgICAgY29uZmlybTogcnUsXFxuICAgICAgICAgICAgY2FuY2VsOiBydVxcbiAgICAgICAgfSlcXG4gICAgfVxcbiAgICBhZGRMaXN0ZW5lcihcXFwib25DbG9zZVxcXCIsICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgY2xlYXJNeVZhcihcXFwic1xcXCIpO1xcbiAgICB9KSk7XFxuICAgIGxldCB0aXAgPSBcXFwi5LqR55uY5pCc57Si5ZCbIOajgOe0ouWKn+iDveeUseWvueW6lOe9keermeaPkOS+m++8jOacrOinhOWImeS4jeaPkOS+m+S7u+S9leWGheWuuVxcXCI7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogdGlwLFxcbiAgICAgICAgdXJsOiAkKFxcXCIjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKCh0aXApID0+IHtcXG4gICAgICAgICAgICBjb25maXJtKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLkvb/nlKjor7TmmI5cXFwiLFxcbiAgICAgICAgICAgICAgICBjb250ZW50OiB0aXAgKyBcXFwi77yM5pys6KeE5YiZ5Luj56CB5a6M5YWo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a6J6KOF6Zi/6YeM5LqR55uY5a6Y5pa5QVBQXFxcIik7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/kv67mlLnmiJDlip9cXFwiXFxuICAgICAgICB9LCBkbW9kZSksXFxuICAgICAgICBjb2xfdHlwZTogXFxcImljb25fMl9yb3VuZFxcXCIsXFxuICAgICAgICBkZXNjOiBcXFwiXFxcIixcXG4gICAgICAgIHBpY191cmw6IFxcXCJoaWtlcjovL2ltYWdlcy9pY29uMVxcXCJcXG4gICAgfSk7XFxuXFxuXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJ+aQnOe0oicsXFxuICAgICAgICBkZXNjOiAn6K+36L6T5YWl5YWz6ZSu6K+NJyxcXG4gICAgICAgIGNvbF90eXBlOiAnaW5wdXQnLFxcbiAgICAgICAgdXJsOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICBwdXRNeVZhcigncycsIGlucHV0KTtcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgIH0pLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldE15VmFyKCdzJywgJycpXFxuICAgICAgICB9XFxuICAgIH0pO1xcbiAgICBsZXQgcnVsZXMgPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9kYXRhXFxcIikoKTtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwiXFxcIiA9PSByID8gXFxcIuKAnOKAnOWFqOmDqOKAneKAnVxcXCIgOiBcXFwi5YWo6YOoXFxcIixcXG4gICAgICAgIHVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgY2xlYXJJdGVtKFxcXCJyXFxcIik7XFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICB9KSxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwic2Nyb2xsX2J1dHRvblxcXCIsXFxuICAgICAgICBkZXNjOiBcXFwiXFxcIixcXG4gICAgICAgIHBpY191cmw6IFxcXCJcXFwiXFxuICAgIH0pO1xcbiAgICBmb3IgKGxldCBpdCBvZiBydWxlcykge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogaXQgPT0gciA/IFxcXCLigJzigJxcXFwiICsgaXQgKyBcXFwi4oCd4oCdXFxcIiA6IGl0LFxcbiAgICAgICAgICAgIHVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgocikgPT4ge1xcbiAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXCJyXFxcIiwgcik7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICB9LCBpdCksXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJzY3JvbGxfYnV0dG9uXFxcIixcXG4gICAgICAgICAgICBkZXNjOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBwaWNfdXJsOiBcXFwiXFxcIlxcbiAgICAgICAgfSk7XFxuICAgIH1cXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIGNvbF90eXBlOiAnbGluZScsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGlkOiAneXBqLWwnXFxuICAgICAgICB9XFxuICAgIH0pO1xcbn1cXG5sZXQgcyA9IGdldE15VmFyKCdzJywgJycpO1xcbmlmIChzICE9IFxcXCJcXFwiKSB7XFxuICAgIGxldCBwID0gTVlfUEFHRTtcXG4gICAgbGV0IGRhdGEgPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9kYXRhXFxcIikocCwgciAhPSBcXFwiXFxcIiA/IHIgOiBudWxsKTtcXG5cXG4gICAgbGV0IHBhZ2VpZCA9IFxcXCJ5cGotcGFnZVxcXCIgKyBwO1xcbiAgICBpZiAoZGF0YS5sZW5ndGggPiAwKSB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi5Yqg6L2956ysXFxcIiArIHAgKyBcXFwi6aG15Lit77yM6L+b5bqm77yaMS9cXFwiICsgZGF0YS5sZW5ndGgsXFxuICAgICAgICAgICAgdXJsOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICAgICAgICAgIGRlc2M6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgIHBpY191cmw6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOiBwYWdlaWRcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgfVxcbiAgICBzZXRSZXN1bHQoZCk7XFxuICAgIGxvZyhkYXRhLmxlbmd0aCk7XFxuICAgIGlmIChkYXRhLmxlbmd0aCA+IDApIHtcXG4gICAgICAgIC8v5aSa57q/56iL5Yqg6L29ICAgICAgICBcXG4gICAgICAgIGxldCByZWFsUGFnZSA9IFxcXCJcXFwiID09IHIgPyAxIDogcDtcXG4gICAgICAgIGxldCB0YXNrcyA9IGRhdGEubWFwKGl0ID0+IHtcXG4gICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICBmdW5jOiBmdW5jdGlvbihydWxlKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcnVsZS5maW5kKHMsIHJlYWxQYWdlKTtcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgcGFyYW06IGl0LFxcbiAgICAgICAgICAgICAgICBpZDogX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AgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBpdC51cmwsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBpdC5waWNfdXJsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IGl0LnBpY191cmwgPyAnbW92aWVfMV92ZXJ0aWNhbF9waWMnIDogXFxcInRleHRfMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBcXFwiX19hcHBcXFwiICsgTVlfUEFHRSArIFxcXCJAXFxcIiArIHBhcmFtLmosXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5oZXJpdFRpdGxlOiBmYWxzZVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XFxuXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYgKHBhcmFtLmkgPj0gcGFyYW0uYWxsKSB7XFxuICAgICAgICAgICAgICAgICAgICBkZWxldGVJdGVtKHBhZ2VpZClcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi5Yqg6L2956ysXFxcIiArIE1ZX1BBR0UgKyBcXFwi6aG15Lit77yM6L+b5bqm77yaXFxcIiArIChwYXJhbS5pICsgMSkgKyBcXFwiL1xcXCIgKyBwYXJhbS5hbGwsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBwYWdlaWRcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBwYXJhbToge1xcbiAgICAgICAgICAgICAgICBhbGw6IGRhdGEubGVuZ3RoLFxcbiAgICAgICAgICAgICAgICBpOiAwLFxcbiAgICAgICAgICAgICAgICBqOiAtMVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgIH1cXG59XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLmkJzntKLpobXpnaJcIixcInBhdGhcIjpcInNvdXBcIixcInJ1bGVcIjpcImpzOlxcbnZhciBkID0gW107XFxuaWYgKE1ZX1BBUkFNUy5rZXkpIHtcXG4gICAgcHV0TXlWYXIoXFxcInNcXFwiLCBNWV9QQVJBTVMua2V5KTtcXG59XFxuZXZhbChKU09OLnBhcnNlKGZldGNoKFxcXCJoaWtlcjovL3BhZ2Uvc291XFxcIikpLnJ1bGUpO1wifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwiQ0NPRlwiLFwicGF0aFwiOlwiY2NvZlwiLFwicnVsZVwiOlwidmFyIHdyYXB1ID0gKHUpID0+IHtcXG4gICAgaWYgKGNvbmZpZy5tb2RlID09IFxcXCLkupHnm5jmsYflvbFcXFwiKSB7XFxuICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9kZXRhaWw/cnVsZT3kupHnm5jmsYflvbEmdXJsPSc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XJlcic6ICdodHRwczovL3Bhbi5jY29mLmNjL3NlYXJjaD9rZXl3b3JkPScgKyBzXFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBib2R5OiB7XFxuICAgICAgICAgICAgICAgIFxcXCJwYWdlU2l6ZVxcXCI6IDIwLFxcbiAgICAgICAgICAgICAgICBcXFwicGFnZU51bVxcXCI6IHBhZ2UsXFxuICAgICAgICAgICAgICAgIFxcXCJrZXl3b3JkXFxcIjogcyxcXG4gICAgICAgICAgICAgICAgXFxcImZyb21Nb2JpbGVcXFwiOiB0cnVlXFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBtZXRob2Q6ICdQT1NUJ1xcbiAgICAgICAgfSlcXG4gICAgICAgIGxldCBsaXN0ID0gSlNPTi5wYXJzZShodG1sKVxcbiAgICAgICAgICAgIC5kYXRhLnJvd3NcXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbGlzdC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgIGxldCBpdCA9IGxpc3RbaV1cXG4gICAgICAgICAgICBsZXQgdGl0bGUgPSBpdC5maWxlTmFtZVxcbiAgICAgICAgICAgIGxldCBtdXJsID0gaXQudXJsXFxuICAgICAgICAgICAgbGV0IHR5cGUgPSBpdC50eXBlLnJlcGxhY2UoL2ZvbGRlci8sICfmlofku7blpLknKS5yZXBsYWNlKC9maWxlLywgJ+aWh+S7ticpXFxuICAgICAgICAgICAgaWYgKHRpdGxlLmluY2x1ZGVzKHMpKSB7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiAn4oCc4oCc4oCd4oCdPGZvbnQgY29sb3I9I2YxM2I2NmE+Q0NPRjwvZm9udD4mbmJzcDsnICsgJ+aWh+S7tuexu+Wei++8micgKyB0eXBlICsgJ++8jOaWh+S7tuWkp+Wwj++8micgKyBieXRlc1RvU2l6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Nobk51bUNoYXJbc3RyW2ldXTtcXG4gICAgICAgIGlmICh0eXBlb2YgbnVtICE9PSAndW5kZWZpbmVkJykge1xcbiAgICAgICAgICAgIG51bWJlciA9IG51bTtcXG4gICAgICAgICAgICBpZiAoaSA9PT0gc3RyLmxlbmd0aCAtIDEpIHtcXG4gICAgICAgICAgICAgICAgc2VjdGlvbiArPSBudW1iZXI7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBsZXQgdW5pdCA9IGNobk5hbWVWYWx1ZVtzdHJbaV1dLnZhbHVlO1xcbiAgICAgICAgICAgIHNlY1VuaXQgPSBjaG5OYW1lVmFsdWVbc3RyW2ldXS5zZWNVbml0O1xcbiAgICAgICAgICAgIGlmIChzZWNVbml0KSB7XFxuICAgICAgICAgICAgICAgIHNlY3Rpb24gPSAoc2VjdGlvbiArIG51bWJlcikgKiB1bml0O1xcbiAgICAgICAgICAgICAgICBydG4gKz0gc2VjdGlvbjtcXG4gICAgICAgICAgICAgICAgc2VjdGlvbiA9IDA7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgc2VjdGlvbiArPSAobnVtYmVyICogdW5pdCk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIG51bWJlciA9IDA7XFxuICAgICAgICB9XFxuICAgIH1cXG4gICAgcmV0dXJuIHJ0biArIHNlY3Rpb247XFxufVxcblxcbmZ1bmN0aW9uIG5hbWVDb21wYXJlKGEsIGIpIHtcXG4gICAgaWYgKGEgPT0gbnVsbCB8fCBiID09IG51bGwpXFxuICAgICAgICByZXR1cm4gYSA9PSBudWxsID8gYiA9PSBudWxsID8gMCA6IC0xIDogMTtcXG5cXG4gICAgYSA9IGEucmVwbGFjZSgvKFvpm7bkuIDkuozkuInlm5vkupTlha3kuIPlhavkuZ3ljYHnmb7ljYPkuIfkur9dKS9nLCBmdW5jdGlvbihtYXRjaCwgcDEsIHAyLCBwMywgb2Zmc2V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9yaWdpbiwgbW9kZSkgPT4ge1xcbiAgICAgICAgbGV0IGhvc3QgPSBvcmlnaW4ucmVwbGFjZShuZXcgUmVnRXhwKFxcXCJodHRwOi8vfGh0dHBzOi8vXFxcIiksIFxcXCJcXFwiKS5zcGxpdChcXFwiL1xcXCIpWzBdO1xcbiAgICAgICAgbGV0IGhvc3RzID0gaG9zdC5zcGxpdChcXFwiLlxcXCIpO1xcbiAgICAgICAgaWYgKGhvc3RzLmxlbmd0aCA+IDIpIHtcXG4gICAgICAgICAgICBob3N0ID0gaG9zdHNbaG9zdHMubGVuZ3RoIC0gMl0gKyBcXFwiLlxcXCIgKyBob3N0c1tob3N0cy5sZW5ndGggLSAxXTtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmIChpbnB1dC5zdGFydHNXaXRoKFxcXCJtYWduZXRcXFwiKSkge1xcbiAgICAgICAgICAgIGNvbmZpcm0oe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogXFxcIua4qemmqOaPkOekulxcXCIsXFxuICAgICAgICAgICAgICAgIGNvbnRlbnQ6IFxcXCLmo4DmtYvliLDmlrDnmoTno4Hpk77lnLDlnYDvvIzngrnlh7vnoa7lrprmjInpkq7ljbPlj6/mkq3mlL7vvIzngrnlh7vlj5bmtojmjInpkq7lj6/ku6XlpI3liLbpk77mjqVcXFwiLFxcbiAgICAgICAgICAgICAgICBjb25maXJtOiAkLnRvU3RyaW5nKChtYWcpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBtYWc7XFxuICAgICAgICAgICAgICAgIH0sIGlucHV0KSxcXG4gICAgICAgICAgICAgICAgY2FuY2VsOiAkLnRvU3RyaW5nKChtYWcpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiY29weTovL1xcXCIgKyBtYWdcXG4gICAgICAgICAgICAgICAgfSwgaW5wdXQpXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcXG4gICAgICAgIH0g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gICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuivpuaDhVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UveXNmeD9ydWxlPVxcXCIgKyBydWxlICsgXFxcIiZyPVxcXCIgKyBydWxlICsgXFxcIiZtb2RlPVxcXCIgKyBtb2RlICsgXFxcIiMjXFxcIiArIHVybCxcXG4gICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgfSwgaW5wdXQsIHJ1bGUsIG1vZGUpO1xcbiAgICAgICAgfSBlbHNlIGlmICghaW5wdXQuc3RhcnRzV2l0aChcXFwiaHR0cFxcXCIpKSB7XFxuICAgICAgICAgICAgbG9nKGlucHV0KTtcXG4gICAgICAgICAgICAvL+iDveWUpOi1t0FQUOeahOeZveWQjeWNlVxcbiAgICAgICAgICAgIGxldCB3aGl0ZSA9IFtcXG4gICAgICAgICAgICAgICAgXFxcInFrbGlua1xcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCJiZG5ldGRpc2tcXFwiLFxcbiAgICAgICAgICAgICAgICBcXFwieHVubGVpYXBwXFxcIixcXG4gICAgICAgICAgICAgICAgXFxcInNtYXJ0ZHJpdmVcXFwiXFxuICAgICAgICAgICAgXTtcXG4gICAgICAgICAgICBsZXQgaW5XaGl0ZSA9IHdoaXRlLmZpbHRlcihpdCA9PiBpbnB1dC5zdGFydHNXaXRoKGl0KSkubGVuZ3RoID4gMDtcXG4gICAgICAgICAgICBpZiAoIWluV2hpdGUpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gJC50b1N0cmluZygodXJsLCBydWxlKSA9PiB7XFxuICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlblRoaXJkQXBwICYmIGZ5X2JyaWRnZV9hcHAub3BlblRoaXJkQXBwKHVybCk7XFxuICAgICAgICAgICAgfSwgaW5wdXQsIHJ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YnZpZXdfc2luZ2xlXFxcIixcXG4gICAgZGVzYzogXFxcIjEwMCUmJmZsb2F0XFxcIixcXG4gICAgcGljX3VybDogXFxcIlxcXCIsXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICB1cmxJbnRlcmNlcHRvcjogaXRlLFxcbiAgICAgICAganM6IGpzLFxcbiAgICAgICAgY2FuQmFjazogdHJ1ZSxcXG4gICAgICAgIGpzTG9hZGluZ0luamVjdDogdHJ1ZSxcXG4gICAgICAgIGZsb2F0VmlkZW86IHRydWVcXG4gICAgfVxcbn0pO1xcbmQucHVzaCh7XFxuICAgIGNvbF90eXBlOiBcXFwibGluZVxcXCIsXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICBpZDogdXJsXFxuICAgIH1cXG59KTtcXG5zZXRSZXN1bHQoZCk7XCJ9XSIsImljb24iOiIiLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment