Advertisement
xiaomianao666

邀您一起看:罚罪

Sep 6th, 2022
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥罚罪@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJqczooXFxuZnVuY3Rpb24gKGFwcHR5cGUsIGFwcFVybCwgYXBwVWEpIHtcXG4gICAgbGV0IGNocCA9IFtdO1xcbiAgICB0cnkge1xcbiAgICAgICAgbGV0IGNvbnRzID0gW10sIGh0bWwgPSBKU09OLnBhcnNlKGZldGNoKE1ZX1VSTC5zcGxpdChcXFwiIyNcXFwiKVsxXSwge2hlYWRlcnM6IHtcXFwiVXNlci1BZ2VudFxcXCI6IGFwcFVhfX0pKTtcXG4gICAgICAgIGlmICgv56We6amsfFRWLy50ZXN0KGFwcHR5cGUpKSB7XFxuICAgICAgICAgICAgY29udHMgPSBPYmplY3Qua2V5cyhodG1sLnZpZGVvbGlzdCk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGlmIChhcHBVcmwuaW5jbHVkZXMoXFxcImFwaS5waHAvYXBwXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX3VybF93aXRoX3BsYXllcjtcXG4gICAgICAgICAgICAgICAgaWYgKGNvbnRzLmxlbmd0aCA8IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRzID0gaHRtbC5kYXRhLnZvZF9wbGF5X3VybC5zcGxpdChcXFwiJCQkXFxcIik7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXCJ4Z2FwcFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICBjb250cyA9IGh0bWwuZGF0YS52b2RfaW5mby52b2RfdXJsX3dpdGhfcGxheWVyO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRzLmxlbmd0aCA8IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250cyA9IGh0bWwuZGF0YS52b2RfaW5mby52b2RfcGxheV91cmwuc3BsaXQoXFxcIiQkJFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX3BsYXlfbGlzdDtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChjb250cy5sZW5ndGggPCAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX3BsYXlfdXJsLnNwbGl0KFxcXCIkJCRcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGxldCBsaXN0ID0gW107XFxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNvbnRzLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgaWYgKC/npZ7pqax8VFYvLnRlc3QoYXBwdHlwZSkpIHtcXG4gICAgICAgICAgICAgICAgbGlzdCA9IGh0bWwudmlkZW9saXN0W2NvbnRzW2ldXTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBpZiAoY29udHNbaV0udXJscykge1xcbiAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGNvbnRzW2ldLnVybHM7XFxuICAgICAgICAgICAgICAgIH0gZ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AgICAgICAgICAgfVxcbiAgICAgICAgICAgIGl0ZW1zLnB1c2goe3RpdGxlOiB2b2RfbmFtZSwgcGljX3VybDogdm9kX3BpYyArIFxcXCJAUmVmZXJlcj1cXFwiLCBkZXNjOiB2b2RfcmVtYXJrcywgY29sX3R5cGU6IFxcXCJtb3ZpZV8zX21hcnF1ZWVcXFwiLCB1cmw6ICQoXFxcIiNpbW1lcnNpdmVUaGVtZSNoaWtlcjovL2VtcHR5IyNcXFwiICsgbGluaykucnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goXFxcImhpa2VyOi8vcGFnZS9hcHBtb3ZsaXN0XFxcIikpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICBsb2coXFxcIlxcXFx1NWY3MVxcXFx1NzI0N1xcXFx1OGJlNlxcXFx1NjBjNVxcXFx1NTFmYVxcXFx1OTUxOTpcXFwiICsgZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChbXSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgKX0pO1xcbiAgICAgICAgfVxcbiAgICB9XFxufVxcbikoKVwifSx7XCJuYW1lXCI6XCJBUFDpgInpm4ZcIixcInBhdGhcIjpcImFwcG1vdmxpc3RcIixcInJ1bGVcIjpcIihcXG5mdW5jdGlvbiAoY2hhbmdlVXJsLCBhcHBVcmwsIGFwcFVhKSB7XFxuICAgIGFkZExpc3RlbmVyKFxcXCJvbkNsb3NlXFxcIiwgJC50b1N0cmluZygodXJsKSA9PiB7XFxuICAgICAgICBjbGVhclZhcihcXFwiYXBwbm93XFxcIik7XFxuICAgICAgICBjbGVhclZhcih1cmwpO1xcbiAgICB9XFxuICAgICwgTVlfVVJMK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ICAgICAgICAgICAgICAgaWYgKHB0YWIgPT0gXFxcImJpbGliaWxpXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybCArIFxcXCI7e1JlZmVyZXJAaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tLyYmVXNlci1BZ2VudEBNb3ppbGxhLzUuMH1cXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocHRhYiA9PSBcXFwibWd0dlxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gdXJsICsgXFxcIjt7UmVmZXJlckB3d3cubWd0di5jb20mJlVzZXItQWdlbnRATW96aWxsYS81LjB9XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodXJsLmluY2x1ZGVzKFxcXCJvamJrXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybCArIFxcXCI7e1JlZmVyZXJAaHR0cHM6Ly9iYWsub2pia2p4LmNvbS99XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAoIXVybC5pbmNsdWRlcyhcXFwiaHR0cFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIlxcXFx1OTRmZVxcXFx1NjNhNVxcXFx1NGUwZFxcXFx1NjYyZlxcXFx1NGVlNWh0dHBcXFxcdTVmMDBcXFxcdTU5MzQoXFxcXHU1M2VmXFxcXHU4MGZkXFxcXHU1MmEwXFxcXHU1YmM2XFxcXHU0ZTg2KVxcXCIpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKC9cXFxcLm0zdTgvLnRlc3QodXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWNoZU0zdTgodXJsKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybCArIFxcXCIjaXNWaWRlbz10cnVlI1xcXCI7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgaWYgKC9cXFxcLm0zdTh8XFxcXC5tcDR8b2JqXFxcXC90b3N8bmV0ZWFzZVxcXFwuY29tLy50ZXN0KHZsaW5rKSAmJiAvaHR0cC8udGVzdCh2bGluaykgJiYgIS9cXFxcLmh0bWwvLnRlc3QodmxpbmspKSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoIS9mZW5cXFxcLmxhb2RpfHJ1aWZlbmdsYnxzdW95b1xcXFwuY2MvLnRlc3QodmxpbmspKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCJcXFxcdTY4YzBcXFxcdTZkNGJcXFxcdTUyMzBcXFxcdThkNDRcXFxcdTZlOTBcXFxcdTU3MzBcXFxcdTU3NDBcXFxcdTUzZWZcXFxcdTgwZmRcXFxcdTY2MmZcXFxcdTg5YzZcXFxcdTk4OTFcXFxcdTk0ZmVcXFxcdTYzYTVcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2hhbmdlVmlkZW9VcmwodmxpbmspO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmICghanhVcmwgfHwgL3hcXFxcLW5cXFxcLmNjLy50ZXN0KGp4VXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbm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ydWxlLmpzXFxcIiwgMjQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHg1cnVsZShsaW5rLCBsaW5rKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFwiXFxcXHU2MjUzXFxcXHU1ZjAwXFxcXHU4OWUzXFxcXHU2NzkwXFxcXHU3ZjUxXFxcXHU5ODc1XFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwid2ViOi8vXFxcIiArIGxpbms7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFwiXFxcXHU0ZjdmXFxcXHU3NTI4XFxcXHU1MTg1XFxcXHU3ZjZlXFxcXHU4OWUzXFxcXHU2NzkwXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIlxcXFx1NGY3ZlxcXFx1NzUyOFxcXFx1NTE4NVxcXFx1N2Y2ZVxcXFx1ODllM1xcXFx1Njc5MFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaG93TG9hZGluZyhcXFwiXFxcXHU2YjYzXFxcXHU1NzI4XFxcXHU4ZmRiXFxcXHU4ODRjXFxcXHU4OWUzXFxcXHU2NzkwLi4uXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBldmFsKEpTT04ucGFyc2UoZmV0Y2goXFxcImhpa2VyOi8vcGFnZS9teVBhcnNlXFxcIikpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAsIGxpbmssIHB0YWIsIHZsaW5rLCBhcHBVcmwpO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcHVybCA9IEpTT04ucGFyc2UoaHRtbCkudXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2hhbmdlVmlkZW9VcmwocHVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFwiXFxcXHU4OWUzXFxcXHU2NzkwXFxcXHU1M2VmXFxcXHU4MGZkXFxcXHU1MmEwXFxcXHU1YmM2XFxcXHU0ZTg2XFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgIGxvZyhcXFwiXFxcXG5cXFxcdTY3MmFcXFxcdTgwZmRcXFxcdTYyMTBcXFxcdTUyOWZcXFxcdTgzYjdcXFxcdTUzZDZcXFxcdTg5YzZcXFxcdTk4OTFcXFxcdTU3MzBcXFxcdTU3NDA6XFxcIiArIGUubWVzc2FnZSArIFxcXCJcXFxcblxcXFx1NWMxZFxcXFx1OGJkNVxcXFx1NGY3ZlxcXFx1NzUyOFxcXFx1ODljNFxcXFx1NTIxOVxcXFx1NTE4NVxcXFx1N2Y2ZVxcXFx1ODllM1xcXFx1Njc5MFxcXCIpO1xcbiAgICAgICAgICA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FxuICAgICAgICBpZiAoIXVybC5pbmNsdWRlcyhcXFwiaHR0cFxcXCIpKSB7XFxuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCLpk77mjqXkuI3mmK/ku6VodHRw5byA5aS0KOWPr+iDveWKoOWvhuS6hilcXFwiKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaWYgKC9cXFxcLm0zdTgvLnRlc3QodXJsKSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gY2FjaGVNM3U4KHVybCk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHVybCArICcjaXNWaWRlbz10cnVlIyc7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIC8vYWVz6Kej5a+GXFxuICAgIGZ1bmN0aW9uIERlKGRhdGEsIHRva2VuX2tleSwgdG9rZW5faXYpIHtcXG4gICAgICAgIGV2YWwoZ2V0Q3J5cHRvSlMoKSk7XFxuICAgICAgICB2YXIga2V5ID0gQ3J5cHRvSlMuZW5jLlV0ZjgucGFyc2UodG9rZW5fa2V5KTtcXG4gICAgICAgIHZhciBpdiA9IENyeXB0b0pTLmVuYy5VdGY4LnBhcnNlKHRva2VuX2l2KTtcXG4gICAgICAgIHJldHVybiBDcnlwdG9KUy5BRVMuZGVjcnlwdChkYXRhLCBrZXksIHtcXG4gICAgICAgICAgICBpdjogaXYsXFxuICAgICAgICAgICAgbW9kZTogQ3J5cHRvSlMubW9kZS5DQkMsXFxuICAgICAgICAgICAgcGFkZGluZzogQ3J5cHRvSlMucGFkLlBrY3M3XFxuICAgICAgICB9KS50b1N0cmluZyhDcnlwdG9KUy5lbmMuVXRmOCk7XFxuICAgIH07XFxuICAgIGlmICh2bGluay5pbmNsdWRlcygnbTN1OC5jYWNoZS5zdW95by5jYycpKSB7XFxuICAgICAgICBsZXQgdXJsID0gSlNPTi5wYXJzZShmZXRjaCgnaHR0cHM6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FxcXFxcXHU2M2E1OlxcXFxcXFwiICsgdmxpbmspO1xcXFxuICAgICAgICAgICAgZnVuY3Rpb24gY2hhbmdlVmlkZW9VcmwodXJsKSB7XFxcXG4gICAgICAgICAgICAgICAgaWYgKHVybC5pbmNsdWRlcyhcXFxcXFxcIndrZmlsZVxcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyBcXFxcXFxcIjt7UmVmZXJlckBodHRwczovL2ZhbnR1YW4ud2tmaWxlLmNvbS99XFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHB0YWIgPT0gXFxcXFxcXCJiaWxpYmlsaVxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyBcXFxcXFxcIjt7UmVmZXJlckBodHRwczovL3d3dy5iaWxpYmlsaS5jb20vJiZVc2VyLUFnZW50QE1vemlsbGEvNS4wfVxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHB0YWIgPT0gXFxcXFxcXCJtZ3R2XFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyBcXFxcXFxcIjt7UmVmZXJlckB3d3cubWd0di5jb20mJlVzZXItQWdlbnRATW96aWxsYS81LjB9XFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1cmwuaW5jbHVkZXMoXFxcXFxcXCJvamJrXFxcXFxcXCIpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybCArIFxcXFxcXFwiO3tSZWZlcmVyQGh0dHBzOi8vYmFrLm9qYmtqeC5jb20vfVxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBpZiAoIXVybC5pbmNsdWRlcyhcXFxcXFxcImh0dHBcXFxcXFxcIikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXFxcXFwiXFxcXFxcXFx1OTRmZVxcXFxcXFxcdTYzYTVcXFxcXFxcXHU0ZTBkXFxcXFxcXFx1NjYyZlxcXFxcXFxcdTRlZTVodHRwXFxcXFxcXFx1NWYwMFxcXFxcXFxcdTU5MzQoXFxcXFxcXFx1NTNlZlxcXFxcXFxcdTgwZmRcXFxcXFxcXHU1MmEwXFxcXFxcXFx1NWJjNlxcXFxcXFxcdTRlODYpXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXFxcXFwubTN1OC8udGVzdCh1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2FjaGVNM3U4KHVybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsICsgXFxcXFxcXCIjaXNWaWRlbz10cnVlI1xcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICBpZiAoL1xcXFxcXFxcLm0zdTh8XFxcXFxcXFwubXA0fG9ialxcXFxcXFxcL3Rvc3xuZXRlYXNlXFxcXFxcXFwuY29tLy50ZXN0KHZsaW5rKSAmJiAvaHR0cC8udGVzdCh2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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0xvYWRpbmcoXFxcXFxcXCJcXFxcXFxcXHU2YjYzXFxcXFxcXFx1NTcyOFxcXFxcXFxcdThmZGJcXFxcXFxcXHU4ODRjXFxcXFxcXFx1ODllM1xcXFxcXFxcdTY3OTAuLi5cXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGV2YWwoSlNPTi5wYXJzZShmZXRjaChcXFxcXFxcImhpa2VyOi8vcGFnZS9teVBhcnNlXFxcXFxcXCIpKS5ydWxlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICwgbGluaywgcHRhYiwgdmxpbmssIGFwcFVybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwdXJsID0gSlNPTi5wYXJzZShodG1sKS51cmw7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoYW5nZVZpZGVvVXJsKHB1cmwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcXFxcXCJcXFxcXFxcXHU4OWUzXFxcXFxcXFx1Njc5MFxcXFxcXFxcdTUzZWZcXFxcXFxcXHU4MGZkXFxcXFxcXFx1NTJhMFxcXFxcXFxcdTViYzZcXFxcXFxcXHU0ZTg2XF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I6Imh0dHBzOi8vd3d3LnpoYW5sYW5nYnUuY29tL3VwbG9hZC92b2QvMjAyMjA4MzEtMS8wYTMyYjYyNDg4OGE5NWRlMWU5ZTA4MWQ5OWIyMjEzOC5qcGdAUmVmZXJlcj0iLCJ0aXRsZSI6Iue9mue9qiJ9
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement