Advertisement
xiaomianao666

邀您一起看:ikuuu

Mar 24th, 2022
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥ikuuu@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcImxvbmdfdGV4dFwiLFwibmFtZVwiOlwi5rWL6K+V5omn6KGM5LqR5Ye95pWwXCIsXCJwYXRoXCI6XCJ0ZXN0X3J1blwiLFwicnVsZVwiOlwianM6XFxubGV0IHt0YXNrLGhvc3R9ID0gTVlfUEFSQU1TO1xcbmNvbnN0IHtjb2xvciwgc21hbGx9ID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvdXRpbGl5P3J1bGU96YGT6ZW/5LuT5bqTUHJvXFxcIik7XFxuY29uc3Qge3Rhc2tDYWxsLCB0YXNrUnVuLHRhc2tSZXF9ID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvdXRpbHM/cnVsZT1cXFwiK01ZX1JVTEUudGl0bGUpO1xcbi8vIGxvZygn6KeE5YiZ5ZCNOicrTVlfUlVMRS50aXRsZSk7XFxuU3RyaW5nLnByb3RvdHlwZS5zdHJpcCA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIHRoaXMucmVwbGFjZSgvKF5cXFxccyopfChcXFxccyokKS9nLCBcXFwiXFxcIik7IH1cXG5zZ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4gICAgICAgIH0sXFxuICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgXFxcInBhcmFtc1xcXCI6IHtcXG4gICAgICAgICAgICAgICAgXFxcImRhdGFcXFwiOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwidHlwZVxcXCI6IHRhc2subW9kZXx8J3J1bicsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiZnVuY1xcXCI6IHRhc2suZnVuY3x8JycsXFxuICAgICAgICAgICAgICAgICAgICBcXFwicGFyYW1zXFxcIjogdGFzay5wYXJhbXN8fFtdXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIFxcXCJhdXRoXFxcIjoge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcIm5hbWVcXFwiOiBob3VzZV9kYXRhLnVzZXJuYW1lfHxcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJwYXNzd29yZFxcXCI6IGhvdXNlX2RhdGEucGFzc3dvcmR8fFxcXCJcXFwiXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KSxcXG4gICAgICAgIG1ldGhvZDogJ1BPU1QnXFxuICAgIH0pO1xcbiAgICByZXR1cm4gSlNPTi5wYXJzZShyZXN1bHQpLnJlc3VsdDtcXG59XFxuXFxuZnVuY3Rpb24gdGFza191cGxvYWQodGFzayl7IC8vIOmAmueUqOS7u+WKoeWPkeW4g+aWsOWinuWPiuS/ruaUueWKn+iDvVxcbiAgICBjb25zdCB7YXBpLGdldEZpbGV9ID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvdXRpbGl5P3J1bGU96YGT6ZW/5LuT5bqTUHJvXFxcIik7XFxuICAgIGxldCBob3VzZUZpbGUgPSBnZXRGaWxlfHxmYWxzZTtcXG4gICAgaWYoIWhvdXNlRmlsZSl7XFxuICAgICAgICBzZXRJdGVtKCdpc19ob3VzZV92aXAnLCAnZmFsc2UnKTtcXG4gICAgfVxcbiAgICBsZXQgYXBpX3VybCA9IGFwaS5ob3N0KycvaGlrZXJ1bGUvdGFzay9hZGQnO1xcbiAgICBsZXQgaG91c2VfZGF0YSA9IGhvdXNlRmlsZSgpO1xcbiAgICBsZXQgcmVzdWx0ID0gcmVxdWVzdChhcGlfdXJsLCB7XFxuICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgJ2NvbnRlbnQtdHlwZSc6ICdhcHBsaWNhdGlvbi9qc29uJ1xcbiAgICAgICAgfSxcXG4gICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICBcXFwicGFyYW1zXFxcIjoge1xcbiAgICAgICAgICAgICAgICBcXFwiZGF0YVxcXCI6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJuYW1lXFxcIjogdGFzay5uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInB5Y29kZVxcXCI6IHRhc2sucHljb2RlLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIm5vdGVcXFwiOiB0YXNrLm5vdGUsXFxuICAgICAgICAgICAgICAgICAgICBcXFwidGVzdF9jb2RlXFxcIjogdGFzay50ZXN0X2NvZGUsXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIFxcXCJhdXRoXFxcIjoge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcIm5hbWVcXFwiOiBob3VzZV9kYXRhLnVzZXJuYW1lfHxcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJwYXNzd29yZFxcXCI6IGhvdXNlX2RhdGEucGFzc3dvcmR8fFxcXCJcXFwiXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KSxcXG4gICAgICAgIG1ldGhvZDogJ1BPU1QnXFxuICAgIH0pO1xcbiAgICByZXR1cm4gSlNPTi5wYXJzZShyZXN1bHQpLnJlc3VsdDtcXG59XFxuXFxuZn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ICAgIHRpdGxlOifwn5eS5paw5bu6L+abtOaWsOKcjycsXFxuICAgIGNvbF90eXBlOidmbGV4X2J1dHRvbicsXFxuICAgIHVybDonaGlrZXI6Ly9wYWdlL25ld190YXNrI25vSGlzdG9yeSMnLFxcbn0pO1xcblxcbmxldCB1cmwgPSBob3N0KycvaGlrZXJ1bGUvdGFzay9nZXRfYnlfZGV2P25hbWU9Jytob3VzZV9kYXRhLnVzZXJuYW1lKycmcGFzc3dvcmQ9Jytob3VzZV9kYXRhLnBhc3N3b3JkO1xcbnRyeSB7XFxuICAgIGxldCByZXN1bHQgPSBKU09OLnBhcnNlKGZldGNoKHVybCx7fSkpO1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6cmVzdWx0LmRldGFpbCxcXG4gICAgICAgIGNvbF90eXBlOid0ZXh0X2NlbnRlcl8xJyxcXG4gICAgICAgIHVybDonaGlrZXI6Ly9lbXB0eScsXFxuICAgIH0pO1xcblxcbiAgICBpZihyZXN1bHQuc3RhdHVzPT09MCl7XFxuICAgICAgICBsZXQgdGFza3MgPSByZXN1bHQucmVzdWx0O1xcbiAgICAgICAgZm9yKHZhciB0YXNrIG9mIHRhc2tzKXtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTon8J+QiScrdGFzay5uYW1lKycoaWQ6Jyt0YXNrLmlkKycpJyxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfMicsXFxuICAgICAgICAgICAgICAgIHVybDonaGlrZXI6Ly9wYWdlL3Rhc2tfaW5mbyNub0hpc3RvcnkjJyxcXG4gICAgICAgICAgICAgICAgZXh0cmE6e3VybDpob3N0KycvaGlrZXJ1bGUvdGFzay9nZXRfaW5mby8nK3Rhc2suaWQrJz9uYW1lPScraG91c2VfZGF0YS51c2VybmFtZSsnJnBhc3N3b3JkPScraG91c2VfZGF0YS5wYXNzd29yZCxcXG4gICAgICAgICAgICAgICAgY2FuX3VwZGF0ZTp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ICAgICAgICAgICAgICAgICBsZXQgcmVzdWx0ID0gSlNPTi5wYXJzZShmZXRjaChkZWxfdXJsLHt9KSk7XFxuICAgICAgICAgICAgICAgICAgICBpZihyZXN1bHQuc3RhdHVzPT09MCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYmFjayh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vXFxcIityZXN1bHQuZGV0YWlsO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9Y2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lh7rplJnkuoY6XFxcXG5cXFwiK2UubWVzc2FnZTtcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIH0sdGFzayxhcGkuaG9zdCxob3VzZV9kYXRhKSxcXG4gICAgICAgIH1cXG4gICAgKTtcXG4gICAgbGV0IHJ1bGVDb2RlID0gXFxcIua1t+mYlOinhueVjOacrOWcsOaWh+S7tuWIhuS6q++/pWZpbGVfdXJs77+laGlrZXI6Ly9maWxlcy9ydWxlcy9kekhvdXNlL3B5dGhvbi9cXFwiK3Rhc2submFtZStcXFwiLnB5QFxcXCIrTVlfVVJMK1xcXCImZGVidWc9MVxcXCI7XFxuICAgIGxldCBpbXBvcnRVcmwgPSAncnVsZTovLycgKyBiYXNlNjRFbmNvZGUocnVsZUNvZGUpO1xcblxcbiAgICBpdGVtcy5wdXNoKFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIHRpdGxlOifwn5Ol5a+85YWlJyxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2ZsZXhfYnV0dG9uJyxcXG4gICAgICAgICAgICB1cmw6aW1wb3J0VXJsXFxuICAgICAgICB9XFxuICAgICk7XFxuXFxuICAgIGl0ZW1zLnB1c2goXFxuICAgICAgICB7XFxuICAgICAgICAgICAgdGl0bGU6J/Cfk53mnKzlnLDnvJbovpEnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nLFxcbiAgICAgICAgICAgIHVybDokKCkubGF6eVJ1bGUoKHRhc2spID0+IHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdlZGl0RmlsZTovL2hpa2VyOi8vZmlsZXMvcnVsZXMvZHpIb3VzZS9weXRob24vJyt0YXNrLm5hbWUrJy5weSc7XFxuICAgICAgICAgICAgfSx0YXNrKVxcbiAgICAgICAgfVxcbiAgICApO1xcblxcbiAgICBpdGVtcy5wdXNoKFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIHRpdGxlOifilrbvuI/mtYvor5XmiafooYwnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nLFxcbiAgICAgICAgICAgIHVybDpcXFwiaGlrZXI6Ly9wYWdlL3Rlc3RfcnVuI25vSGlzdG9yeSNcXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIHRhc2s6dGFzayxcXG4gICAgICAgICAgICAgICAgaG9zdDphcGkuaG9zdCxcXG4gICAgICAgICAgICAgICAgaG91c2VfZGF0YTpob3VzZV9kYXRhXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICApO1xcblxcbiAgICBpZihjYW5fdXBkYXRlKXtcXG4gICAgICAgIGl0ZW1zLnB1c2goXFxuICAgICAgICAgICAge1xcbiAgICAgICAgICAgICAgICB0aXRsZTon4pa26YeN5Y+R5biDJyxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIHVybDonaGlrZXI6Ly9wYWdlL25ld190YXNrI25vSGlzdG9yeSMnLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgdGFzazp0YXNrLFxcbiAgICAgICAgICAgICAgICAgICAgLy8gaG9zdDphcGkuaG9zdCxcXG4gICAgICAgICAgICAgICAgICAgIC8vIGhvdXNlX2RhdGE6aG91c2VfZGF0YVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgKTtcXG4gICAgICAgIGl0ZW1zLnB1c2goXFxuICAgICAgICAgICAge1xcbiAgICAgICAgICAgICAgICB0aXRsZTon8J+Nh+S7u+WKoeaUueWQjScsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB1cmw6JCh0YXNrLm5hbWUsIFxcXCLovpPlhaXmlrDnmoTku7vliqHlkI3np7BcXFwiKS5pbnB1dCgodGFzaykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoXFxcIuehruiupOWwhlxcXCIrdGFzay5uYW1lK1xcXCLkv67mlLnkuLo6XFxcIitpbnB1dCsnID8nKS5jb25maXJtKChpbnB1dCx0YXNrKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxvZyh0YXNrLmlkKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB7dGFza1JlbmFtZX0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS91dGlscz9ydWxlPVxcXCIrTVlfUlVMRS50aXRsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlc3VsdCA9IHRhc2tSZW5hbWUodGFzay5pZCxpbnB1dCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gYmFjayh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vXFxcIityZXN1bHQ7XFxuICAgICAgICAgICAgICAgICAgICB9LGlucHV0LHRhc2spO1xcbiAgICAgICAgICAgICAgICB9LHRhc2spLFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICk7XFxuXFxuICAgICAgICBpdGVtcy5wdXNoKFxcbiAgICAgICAgICAgIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6J/CfjbDmm7TmlLnliIbkuqvnirbmgIEnLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2ZsZXhfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgdXJsOiQoKS5sYXp5UnVsZSgodGFzaykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qge3Rhc2tDaGFuZ2VTdGF0ZX0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS91dGlscz9ydWxlPVxcXCIrTVlfUlVMRS50aXRsZSk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgcmVzdWx0ID0gdGFza0NoYW5nZVN0YXRlKHRhc2suaWQpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8vJytyZXN1bHQ7XFxuICAgICAgICAgICAgICAgIH0sdGFzayksXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgKTtcXG5cXG4gICAgICAgIGl0ZW1zLnB1c2goXFxuICAgICAgICAgICAge1xcbiAgICAgICAgICAgICAgICB0aXRsZTp0YXNrLnZpc2libGU/J/CfkYDlj6/op4YnOifwn5GA5LiN5Y+v6KeGJyxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIHVybDokKCkubGF6eVJ1bGUoKHRhc2spID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHt0YXNrQ2hhbmdlVmlzaWJsZX0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS91dGlscz9ydWxlPVxcXCIrTVlfUlVMRS50aXRsZSk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgcmVzdWx0ID0gdGFza0NoYW5nZVZpc2libGUodGFzay5pZCk7XFxuICAg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1cm4gJ2VkaXRGaWxlOi8vJytmaWxlcGF0aDtcXG4gICAgfSlcXG59KTtcXG5kLnB1c2goe1xcbiAgICB0aXRsZTon8J+UhOWIt+aWsOS7o+eggeahhicsXFxuICAgIGNvbF90eXBlOidmbGV4X2J1dHRvbicsXFxuICAgIHVybDokKCkubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgaWYoIWdldFZhcigndGFza19ib3gubmV3X3Rhc2tfbmFtZScsICcnKSl7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WIt+aWsOW/hemhu+WFiOWhq+WGmeS7u+WKoeWQjeensCdcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCBmaWxlX3BhdGggPSAnaGlrZXI6Ly9maWxlcy9ydWxlcy9kekhvdXNlL3B5dGhvbi8nK2dldFZhcigndGFza19ib3gubmV3X3Rhc2tfbmFtZScsICcnKSsnLnB5JztcXG4gICAgICAgIHB1dFZhcigndGFza19ib3gubmV3X3Rhc2tfcHljb2RlJyxmZXRjaChmaWxlX3BhdGgpKTtcXG4gICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWIt+aWsCc7XFxuICAgIH0pXFxufSk7XFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6J/Cfk7Llj5HluIMnLFxcbiAgICBjb2xfdHlwZTonZmxleF9idXR0b24nLFxcbiAgICB1cmw6JCgpLmxhenlSdWxlKCh0YXNrVXBsb2FkKSA9PiB7XFxuICAgICAgICBpZighZ2V0VmFyKCd0YXNrX2JveC5uZXdfdGFza19uYW1lJywgJycpfHwhZ2V0VmFyKCd0YXNrX2JveC5uZXdfdGFza19weWNvZGUnLCAnJykpe1xcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lj5HluIPku7vliqHlv4Xpobvkv53or4Hku7vliqHlkI3np7Dlj4rku6PnoIHloavlhpknXFxuICAgICAgICB9XFxuICAgICAgICBsZXQgdGFzayA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AgICAgICAgIGxldCB1cmwgPSAnaHR0cDovL3d3dy5maGRxLm5ldCcrcGRmaChjYXRlLCdhJiZocmVmJyk7XFxuICAgICAgICAgICAgICAgIGxldCB0aXBzID0gZ2V0VmFyKCdub3dfZW1vamlfdXJsJyk9PT11cmw/J+KcjCc6Jyc7XFxuICAgICAgICAgICAgICAgIHRpdGxlID0gdGl0bGUucmVwbGFjZSgnZW1vamknLCcnKSt0aXBzO1xcbiAgICAgICAgICAgICAgICBkLnB1c2goXFxuICAgICAgICAgICAgICAgICAgICB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6dGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiQoKS5sYXp5UnVsZSgodXJsLHRpdGxlKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcignbm93X2Vtb2ppX3VybCcsdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lvZPliY1lbW9qaeWIhuexuzonK3RpdGxlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sdXJsLHRpdGxlKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBjYXRjaCAoZSkge1xcblxcbiAgICAgICAgfVxcbiAgICB9XFxufVxcblxcbmxldCBodG1sPWZldGNoKGdldFZhcignbm93X2Vtb2ppX3VybCcpKTtcXG5sZXQgZW1vamlfbGlzdCA9IHBkZmEoaHRtbCwnLmVtb2ppbGlzdHBjJiZsaScpO1xcbmZvcih2YXIgZW1vamkgb2YgZW1vamlfbGlzdCl7XFxuICAgIGxldCB0aXRsZS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J1Zz0xXFxcIjtcXG4gICAgbGV0IGltcG9ydFVybCA9ICdydWxlOi8vJyArIGJhc2U2NEVuY29kZShydWxlQ29kZSk7XFxuXFxuICAgIGl0ZW1zLnB1c2goXFxuICAgICAgICB7XFxuICAgICAgICAgICAgdGl0bGU6J/Cfk6Xlr7zlhaUnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nLFxcbiAgICAgICAgICAgIHVybDppbXBvcnRVcmxcXG4gICAgICAgIH1cXG4gICAgKTtcXG5cXG4gICAgaXRlbXMucHVzaChcXG4gICAgICAgIHtcXG4gICAgICAgICAgICB0aXRsZTon8J+TneacrOWcsOe8lui+kScsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbicsXFxuICAgICAgICAgICAgdXJsOiQoKS5sYXp5UnVsZSgodGFzaykgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2VkaXRGaWxlOi8vaGlrZXI6Ly9maWxlcy9ydWxlcy9kekhvdXNlL3B5dGhvbi8nK3Rhc2submFtZSsnLnB5JztcXG4gICAgICAgICAgICB9LHRhc2spXFxuICAgICAgICB9XFxuICAgICk7XFxuXFxuICAgIGl0ZW1zLnB1c2goXFxuICAgICAgICB7XFxuICAgICAgICAgICAgdGl0bGU6J+KWtu+4j+a1i+ivleaJp+ihjCcsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbicsXFxuICAgICAgICAgICAgdXJsOlxcXCJoaWtlcjovL3BhZ2UvdGVzdF9ydW4jbm9IaXN0b3J5I1xcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgdGFzazp0YXNrLFxcbiAgICAgICAgICAgICAgICBob3N0OmFwaS5ob3N0LFxcbiAgICAgICAgICAgICAgICBob3VzZV9kYXRhOmhvdXNlX2RhdGFcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICk7XFxuXFxuICAgIGlmKGNhbl91cGRhdGUpe1xcbiAgICAgICAgaXRlbXMucHVzaChcXG4gICAgICAgICAgICB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOifilrbph43lj5HluIMnLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2ZsZXhfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgdXJsOidoaWtlcjovL3BhZ2UvbmV3X3Rhc2sjbm9IaXN0b3J5IycsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICB0YXNrOnRhc2ssXFxuICAgICAgICAgICAgICAgICAgICAvLyBob3N0OmFwaS5ob3N0LFxcbiAgICAgICAgICAgICAgICAgICAgLy8gaG91c2VfZGF0YTpob3VzZV9kYXRhXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICApO1xcbiAgICAgICAgaXRlbXMucHVzaChcXG4gICAgICAgICAgICB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOifwn42H5Lu75Yqh5pS55ZCNJyxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIHVybDokKHRhc2submFtZSwgXFxcIui+k+WFpeaWsOeahOS7u+WKoeWQjeensFxcXCIpLmlucHV0KCh0YXNrKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChcXFwi56Gu6K6k5bCGXFxcIit0YXNrLm5hbWUrXFxcIuS/ruaUueS4ujpcXFwiK2lucHV0KycgPycpLmNvbmZpcm0oKGlucHV0LHRhc2spPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKHRhc2suaWQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHt0YXNrUmVuYW1lfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3V0aWxzP3J1bGU9XFxcIitNWV9SVUxFLnRpdGxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzdWx0ID0gdGFza1JlbmFtZSh0YXNrLmlkLGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBiYWNrKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly9cXFwiK3Jlc3VsdDtcXG4gICAgICAgICAgICAgICAgICAgIH0saW5wdXQsdGFzayk7XFxuICAgICAgICAgICAgICAgIH0sdGFzayksXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgKTtcXG5cXG4gICAgICAgIGl0ZW1zLnB1c2goXFxuICAgICAgICAgICAge1xcbiAgICAgICAgICAgICAgICB0aXRsZTon8J+NsOabtOaUueWIhuS6q+eKtuaAgScsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB1cmw6JCgpLmxhenlSdWxlKCh0YXNrKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBjb25zdCB7dGFza0NoYW5nZVN0YXRlfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3V0aWxzP3J1bGU9XFxcIitNWV9SVUxFLnRpdGxlKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCByZXN1bHQgPSB0YXNrQ2hhbmdlU3RhdGUodGFzay5pZCk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly8nK3Jlc3VsdDtcXG4gICAgICAgICAgICAgICAgfSx0YXNrKSxcXG4gICAgICAgICAgICB9XFxuICAgICAgICApO1xcblxcbiAgICAgICAgaXRlbXMucHVzaChcXG4gICAgICAgICAgICB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOnRhc2sudmlzaWJsZT8n8J+RgOWPr+inhic6J/CfkYDkuI3lj6/op4YnLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2ZsZXhfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgdXJsOiQoKS5sYXp5UnVsZSgodGFzaykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qge3Rhc2tDaGFuZ2VWaXNpYmxlfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3V0aWxzP3J1bGU9XFxcIitNWV9SVUxFLnRpdGxlKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCByZXN1bHQgPSB0YXNrQ2hhbmdlVmlzaWJsZSh0YXNrLmlkKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovLycrcmVzdWx0O1xcbiAgICAgICAgICAgICAgICB9LHRhc2spLFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICk7XFxuICAgIH1cXG5cXG4gICAgaXRlbXMucHVzaChcXG4gICAgICAgIHtcXG4gICAgICAgICAgICB0aXRsZTon5aSH5rOoJyxcXG4gICAgICAgICAgICBkZXNjOnNtYWxsKHRhc2subm90ZSksXFxuICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnLFxcbiAgICAgICAgICAgIHVybDondG9hc3Q6Ly8nK3Rhc2subm90ZVxcbiAgICAgICAgfVxcbiAgICApO1xcblxcbiAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgIHRpdGxlOifinI1weXRob27ku6PnoIE6JyxcXG4gICAgICAgIGNvbF90eXBlOid0ZXh0XzEnLFxcbiAgICAgICAgdXJsOidoaWtlcjovL2VtcHR5J1xcbiAgICB9KVxcblxcbiAgICBpdGVtcy5wdXNoKFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIHRpdGxlOnRhc2sucHljb2RlLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidsb25nX3RleHQnXFxuICAgICAgICB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IGl0ZW1zLnB1c2goXFxcXG4gICAgICAgIHtcXFxcbiAgICAgICAgICAgIHRpdGxlOifilrbvuI/mtYvor5XmiafooYwnLFxcXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbicsXFxcXG4gICAgICAgICAgICB1cmw6XFxcXFxcXCJoaWtlcjovL3BhZ2UvdGVzdF9ydW4jbm9IaXN0b3J5I1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICB0YXNrOnRhc2ssXFxcXG4gICAgICAgICAgICAgICAgaG9zdDphcGkuaG9zdCxcXFxcbiAgICAgICAgICAgICAgICBob3VzZV9kYXRhOmhvdXNlX2RhdGFcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfVxcXFxuICAgICk7XFxcXG5cXFxcbiAgICBpZihjYW5fdXBkYXRlKXtcXFxcbiAgICAgICAgaXRlbXMucHVzaChcXFxcbiAgICAgICAgICAgIHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTon4pa26YeN5Y+R5biDJyxcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2ZsZXhfYnV0dG9uJyxcXFxcbiAgICAgICAgICAgICAgICB1cmw6J2hpa2VyOi8vcGFnZS9uZXdfdGFzayNub0hpc3RvcnkjJyxcXFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICB0YXNrOnRhc2ssXFxcXG4gICAgICAgICAgICAgICAgICAgIC8vIGhvc3Q6YXBpLmhvc3QsXFxcXG4gICAgICAgICAgICAgICAgICAgIC8vIGhvdXNlX2RhdGE6aG91c2VfZGF0YVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgKTtcXFxcbiAgICAgICAgaXRlbXMucHVzaChcXFxcbiAgICAgICAgICAgIHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTon8J+Nh+S7u+WKoeaUueWQjScsXFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbicsXFxcXG4gICAgICAgICAgICAgICAgdXJsOiQodGFzay5uYW1lLCBcXFxcXFxcIui+k+WFpeaWsOeahOS7u+WKoeWQjeensFxcXFxcXFwiKS5pbnB1dCgodGFzaykgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChcXFxcXFxcIuehruiupOWwhlxcXFxcXFwiK3Rhc2submFtZStcXFxcXFxcIuS/ruaUueS4ujpcXFxcXFxcIitpbnB1dCsnID8nKS5jb25maXJtKChpbnB1dCx0YXNrKT0+e1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKHRhc2suaWQpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qge3Rhc2tSZW5hbWV9ID0gJC5yZXF1aXJlKFxcXFxcXFwiaGlrZXI6Ly9wYWdlL3V0aWxzP3J1bGU9XFxcXFxcXCIrTVlfUlVMRS50aXRsZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzdWx0ID0gdGFza1JlbmFtZSh0YXNrLmlkLGlucHV0KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gYmFjayh0cnVlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcInRvYXN0Oi8vXFxcXFxcXCIrcmVzdWx0O1xcXFxuICAgICAgICAgICAgICAgICAgICB9LGlucHV0LHRhc2spO1xcXFxuICAgICAgICAgICAgICAgIH0sdGFzayksXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICk7XFxcXG5cXFxcbiAgICAgICAgaXRlbXMucHVzaChcXFxcbiAgICAgICAgICAgIHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTon8J+NsOabtOaUueWIhuS6q+eKtuaAgScsXFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbicsXFxcXG4gICAgICAgICAgICAgICAgdXJsOiQoKS5sYXp5UnVsZSgodGFzaykgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBjb25zdCB7dGFza0NoYW5nZVN0YXRlfSA9ICQucmVxdWlyZShcXFxcXFxcImhpa2VyOi8vcGFnZS91dGlscz9ydWxlPVxcXFxcXFwiK01ZX1JVTEUudGl0bGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgcmVzdWx0ID0gdGFza0NoYW5nZVN0YXRlKHRhc2suaWQpO1xcXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovLycrcmVzdWx0O1xcXFxuICAgICAgICAgICAgICAgIH0sdGFzayksXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICk7XFxcXG5cXFxcbiAgICAgICAgaXRlbXMucHVzaChcXFxcbiAgICAgICAgICAgIHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTp0YXNrLnZpc2libGU/J/CfkYDlj6/op4YnOifwn5GA5LiN5Y+v6KeGJyxcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2ZsZXhfYnV0dG9uJyxcXFxcbiAgICAgICAgICAgICAgICB1cmw6JCgpLmxhenlSdWxlKCh0YXNrKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHt0YXNrQ2hhbmdlVmlzaWJsZX0gPSAkLnJlcXVpcmUoXFxcXFxcXCJoaWtlcjovL3BhZ2UvdXRpbHM/cnVsZT1cXFxcXFxcIitNWV9SVUxFLnRpdGxlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJlc3VsdCA9IHRhc2tDaGFuZ2VWaXNpYmxlKHRhc2suaWQpO1xcXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovLycrcmVzdWx0O1xcXFxuICAgICAgICAgICAgICAgIH0sdGFzayksXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICk7XFxcXG4gICAgfVxcXFxuXFxcXG4gICAgaXRlbXMucHVzaChcXFxcbiAgICAgICAge1xcXFxuICAgICAgICAgICAgdGl0bGU6J+Wkh+azqCcsXFxcXG4gICAgICAgICAgICBkZXNjOnNtYWxsKHRhc2subm90ZSksXFxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMScsXFxcXG4gICAgICAgICAgICB1cmw6J3RvYXN0Oi8vJyt0YXNrLm5vdGVcXFxcbiAgICAgICAgfVxcXFxuICAgICk7XFxcXG5cXFxcbiAgICBpdGVtcy5wdXNoKHtcXFxcbiAgICAgICAgdGl0bGU6J+KcjXB5dGhvbuS7o+eggTonLFxcXFxuICAgICAgICBjb2xfdHlwZTondGV4dF8xJyxcXFxcbiAgICAgICAgdXJsOidoaWtlcjovL2VtcHR5J1xcXFxuICAgIH0pXFxcXG5cXFxcbiAgICBpdGVtcy5wdXNoKFxcXFxuICAgICAgICB7XFxcXG4gICAgICAgICAgICB0aXRsZTp0YXNrLnB5Y29kZSxcXFxcbiAgICAgICAgICAgIGNvbF90eXBlOidsb25nX3RleHQnXFxcXG4gICAgICAgIH1cXFxcbiAgICApO1xcXFxufVxcXFxucmVzLmRhdGEgPSBpdGVtcztcXFxcbnNldEhvbWVSZXN1bHQocmVzKTtcXFwifSx7XFxcIm5hbWVcXFwiOlxcXCLmlrDlu7rku7vliqFcXFwiLFxcXCJwYXRoXFxcIjpcXFwibmV3X3Rhc2tcXFwiLFxcXCJydWxlXFxcIjpcXFwianM6XFxcXG5cXFxcbmNvbnN0IHt0YXNrVXBsb2FkfSA9ICQucmVxdWlyZShcXFxcXFxcImhpa2VyOi8vcGFnZS91dGlscz9ydWxlPVxcXFxcX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VwbGFjZSgnZW1vamknLCcnKSt0aXBzO1xcXFxuICAgICAgICAgICAgICAgIGQucHVzaChcXFxcbiAgICAgICAgICAgICAgICAgICAge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6dGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6JCgpLmxhenlSdWxlKCh1cmwsdGl0bGUpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ25vd19lbW9qaV91cmwnLHVybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W9k+WJjWVtb2pp5YiG57G7OicrdGl0bGU7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LHVybCx0aXRsZSksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbidcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICk7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgY2F0Y2ggKGUpIHtcXFxcblxcXFxuICAgICAgICB9XFxcXG4gICAgfVxcXFxufVxcXFxuXFxcXG5sZXQgaHRtbD1mZXRjaChnZXRWYXIoJ25vd19lbW9qaV91cmwnKSk7XFxcXG5sZXQgZW1vamlfbGlzdCA9IHBkZmEoaHRtbCwnLmVtb2ppbGlzdHBjJiZsaScpO1xcXFxuZm9yKHZhciBlbW9qaSBvZiBlbW9qaV9saXN0KXtcXFxcbiAgICBsZXQgdGl0bGUgPSBwZGZoKGVtb2ppLCdsaSYmVGV4dCcpO1xcXFxuICAgIGQucHVzaCh7XFxcXG4gICAgICAgIHRpdGxlOnRpdGxlLFxcXFxuICAgICAgICBjb2xfdHlwZTonZmxleF9idXR0b24nLFxcXFxuICAgICAgICB1cmw6J2NvcHk6Ly8nK3RpdGxlXFxcXG4gICAgfSk7XFxcXG59XFxcXG5zZXRSZXN1bHQoZCk7XFxcIn1dXCJ9IiwicGljVXJsIjoiaHR0cHM6Ly9hcGkubXR5cXguY24vYXBpL3JhbmRvbS5waHA/dD0wLjE0MDk4MTQyMTc3NDM0MDciLCJ0aXRsZSI6ImlrdXV1In0=
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement