Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥奇妙工具箱@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcInBpY1wiLFwicGF0aFwiOlwicGljXCIsXCJydWxlXCI6XCJqczpcXG52YXIgZCA9IFtdO1xcbmxldCB4ID0gZ2V0TXlWYXIoXFxcInhcXFwiLCBcXFwi5ZCmXFxcIik7XFxubGV0IGRlc2MgPSB4ID09IFxcXCLmmK9cXFwiID8gXFxcImZsb2F0JiYzMDBcXFwiIDogXFxcImZsb2F0JiYxXFxcIjtcXG5kLnB1c2goe1xcbiAgICBjb2xfdHlwZTogXFxcIng1X3dlYnZpZXdfc2luZ2xlXFxcIixcXG4gICAgdXJsOiBcXFwiXFxcIixcXG4gICAgZGVzYzogZGVzYyxcXG4gICAgdGl0bGU6IFxcXCJcXFwiLFxcbiAgICBleHRyYToge1xcbiAgICAgICAganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgIGZ1bmN0aW9uIGdldGltZ3MoKSB7XFxuICAgICAgICAgICAgICAgIHZhciB2aWRlb0VsZW1lbnRzID0gZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoXFxcImltZ1xcXCIpO1xcbiAgICAgICAgICAgICAgICBpZiAodmlkZW9FbGVtZW50cyA9PSBudWxsKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gW107XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgbGV0IHVybHMgPSBbXTtcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB2aWRlb0VsZW1lbnRzLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAodmlkZW9FbGVtZW50c1tpXS53aWR0aCA+IDcwICYmIHZpZGVvRWxlbWVudHNbaV0uaGVpZ2h0ID4gNzApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzcmMgPSB2aWRlb0VsZW1lbnRzW2ldLnNyYztcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3JjID09IG51bGwgfHwgc3JjLmxlbmd0aCA8IDUgfHwgdXJscy5pbmNsdWRlcyhzcmMpIHx8IHNyYy5pbmRleE9mKFxcXCJkYXRhOlxcXCIpID09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vbG9nKHNyYyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJscy5wdXNoKG5ldyBVUkwoc3JjKS50b1N0cmluZygpKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXR1cm4gdXJscztcXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgZnVuY3Rpb24gY2hlY2soKSB7XFxuICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJscyA9IGdldGltZ3MoKTtcXG4gICAgICAgICAgICAgICAgICAgIC8vZmJhLmxvZyhcXFwiZ2V0aW1nc++8mlxcXCIgKyB1cmxzLmxlbmd0aCk7XFxuICAgICAgICAgICAgICAgICAgICBpZiAod2luZG93LmNoZWNrZWRVcmxzID09IG51bGwpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuY2hlY2tlZFVybHMgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGxldCBjaGVja2VkVXJscyA9IHdpbmRvdy5jaGVja2VkVXJscztcXG4gICAgICAgICAgICAgICAgICAgIHVybHMgPSB1cmxzLmZpbHRlcihpdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICFjaGVja2VkVXJscy5pbmNsdWRlcyhpdClcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcblxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHVybHMubGVuZ3RoID4gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwaWNzID0gdXJscy5maWx0ZXIoaXQgPT4gaXQgIT0gbnVsbCAmJiBpdCAhPSBcXFwiXFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLm1hcChpdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdSA9IGZiYS5nZXRIZWFkZXJVcmwoaXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHV1ID0gdS5zcGxpdChcXFwiO1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBpYyA9IHU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodXUubGVuZ3RoID4gMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1MSA9IHV1WzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1MiA9IHV1WzFdLnNsaWNlKDEsIC0xKS5zcGxpdChcXFwiJiZcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVmZXJlciA9IG51bGw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVhID0gbnVsbDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29va2llMCA9IG51bGw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaWkgb2YgdTIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGl0MiA9IGlpLnNwbGl0KFxcXCJAXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpdDJbMF0gPT0gXFxcIlJlZmVyZXJcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZlcmVyID0gaXQyWzFdLnJlcGxhY2UoL++8m++8my9nLCBcXFwiO1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpdDJbMF0gPT0gXFxcIlVzZXItQWdlbnRcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1YSA9IGl0MlsxXS5yZXBsYWNlKC/vvJvvvJsvZywgXFxcIjtcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXQyWzBdID09IFxcXCJDb29raWVcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29raWUwID0gaXQyWzFdLnJlcGxhY2UoL++8m++8my9nLCBcXFwiO1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpYyA9IHUxO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZWZlcmVyKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpYyA9IHBpYyArIFxcXCJAUmVmZXJlcj1cXFwiICsgcmVmZXJlcjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHVhKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpYyA9IHBpYyArIFxcXCJAVXNlci1BZ2VudD1cXFwiICsgdWE7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb29raWUwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpYyA9IHBpYyArIFxcXCJAQ29va2llPVxcXCIgKyBjb29raWUwXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaWMgPSBpdDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGljOiBwaWMsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB1XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5sb2cocGljcy5sZW5ndGggKyBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZmJhLnBhcnNlTGF6eVJ1bGVBc3luYygkJCQoKS5sYXp5UnVsZSgodXJscykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2xvZyh1cmxzKTtcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGFyciA9IHVybHMubWFwKGl0ID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogaXQucGljLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IGl0LnBpYyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImNhcmRfcGljXzNcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsczogXFxcInBpY3NcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkSXRlbUJlZm9yZShcXFwicGljX2xpbmVcXFwiLCBhcnIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHBpY3MpLCBmdW5jdGlvbigpIHtcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpdCBvZiB1cmxzKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5jaGVja2VkVXJscy5wdXNoKGl0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5sb2coZS50b1N0cmluZygpKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGNoZWNrLCAzMDApO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBjaGVjaygpO1xcbiAgICAgICAgfSlcXG4gICAgfVxcbn0pO1xcblxcblxcbmQucHVzaCh7XFxuICAgIHRpdGxlOiBcXFwi5o+Q5Y+WXFxcIixcXG4gICAgdXJsOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgIHB1dE15VmFyKFxcXCJpXFxcIiwgaW5wdXQpO1xcbiAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKFxcXCJwaWNzXFxcIik7XFxuICAgICAgICByZWZyZXNoWDVXZWJWaWV3KGlucHV0KTtcXG4gICAgfSksXFxuICAgIGNvbF90eXBlOiBcXFwiaW5wdXRcXFwiLFxcbiAgICBkZXNjOiBcXFwi6K+36L6T5YWl572R6aG15Zyw5Z2AXFxcIixcXG4gICAgcGljX3VybDogXFxcIlxcXCIsXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICBkZWZhdWx0VmFsdWU6IGdldE15VmFyKFxcXCJpXFxcIiwgXFxcIlxcXCIpXFxuICAgIH1cXG59KTtcXG5kLnB1c2goe1xcbiAgICB0aXRsZTogXFxcIuaYvuekuue9kemhtee7hOS7tu+8mlxcXCIgKyB4LFxcbiAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgbGV0IHggPSBnZXRNeVZhcihcXFwieFxcXCIsIFxcXCL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gIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2VcXG4gICAgfVxcbn0pO1xcblxcbmQucHVzaCh7XFxuICAgIHRpdGxlOiBcXFwi5o+Q5Y+WXFxcIixcXG4gICAgdXJsOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgIHJldHVybiBcXFwidmlkZW86Ly9cXFwiICsgaW5wdXQ7XFxuICAgIH0pLFxcbiAgICBjb2xfdHlwZTogXFxcImlucHV0XFxcIixcXG4gICAgZGVzYzogXFxcIuivt+i+k+WFpee9kemhtemTvuaOpVxcXCIsXFxuICAgIHBpY191cmw6IFxcXCJcXFwiXFxufSk7XFxuXFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6IFxcXCLnlLXlrZDkuabpmIXor7vlmagodHh0KVxcXCIsXFxuICAgIHVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICBsZXQgciA9IGZldGNoKFxcXCJoaWtlcjovL2hvbWVA5pys5Zyw6LWE5rqQ566h55CGXFxcIik7XFxuICAgICAgICBpZiAociAmJiByLmxlbmd0aCA+IDUpIHtcXG4gICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vaG9tZUDmnKzlnLDotYTmupDnrqHnkIZcXFwiO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBjb25maXJtKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLmuKnppqjmj5DnpLpcXFwiLFxcbiAgICAgICAgICAgICAgICBjb250ZW50OiBcXFwi5b2T5YmN5pyq5a+85YWl5omp5bGV5o+S5Lu277yM54K55Ye75LiL5pa556Gu5a6a5oyJ6ZKu5a+85YWlXFxcIixcXG4gICAgICAgICAgICAgICAgY29uZmlybTogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBy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xcbiAgICAgICAganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcXFxuICAgICAgICAgICAgZnVuY3Rpb24gZ2V0aW1ncygpIHtcXFxcbiAgICAgICAgICAgICAgICB2YXIgdmlkZW9FbGVtZW50cyA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKFxcXFxcXFwiaW1nXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgIGlmICh2aWRlb0VsZW1lbnRzID09IG51bGwpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtdO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBsZXQgdXJscyA9IFtdO1xcXFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdmlkZW9FbGVtZW50cy5sZW5ndGg7IGkrKykge1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAodmlkZW9FbGVtZW50c1tpXS53aWR0aCA+IDcwICYmIHZpZGVvRWxlbWVudHNbaV0uaGVpZ2h0ID4gNzApIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHNyYyA9IHZpZGVvRWxlbWVudHNbaV0uc3JjO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNyYyA9PSBudWxsIHx8IHNyYy5sZW5ndGggPCA1IHx8IHVybHMuaW5jbHVkZXMoc3JjKSB8fCBzcmMuaW5kZXhPZihcXFxcXFxcImRhdGE6XFxcXFxcXCIpID09IDApIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vbG9nKHNyYyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmxzLnB1c2gobmV3IFVSTChzcmMpLnRvU3RyaW5nKCkpO1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIHJldHVybiB1cmxzO1xcXFxuICAgICAgICAgICAgfVxcXFxuXFxcXG4gICAgICAgICAgICBmdW5jdGlvbiBjaGVjaygpIHtcXFxcbiAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJscyA9IGdldGltZ3MoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgLy9mYmEubG9nKFxcXFxcXFwiZ2V0aW1nc++8mlxcXFxcXFwiICsgdXJscy5sZW5ndGgpO1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAod2luZG93LmNoZWNrZWRVcmxzID09IG51bGwpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5jaGVja2VkVXJscyA9IFtdO1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBjaGVja2VkVXJscyA9IHdpbmRvdy5jaGVja2VkVXJscztcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJscyA9IHVybHMuZmlsdGVyKGl0ID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAhY2hlY2tlZFVybHMuaW5jbHVkZXMoaXQpXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgIGlmICh1cmxzLmxlbmd0aCA+IDApIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwaWNzID0gdXJscy5maWx0ZXIoaXQgPT4gaXQgIT0gbnVsbCAmJiBpdCAhPSBcXFxcXFxcIlxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoaXQgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdSA9IGZiYS5nZXRIZWFkZXJVcmwoaXQpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXUgPSB1LnNwbGl0KFxcXFxcXFwiO1xcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBpYyA9IHU7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1dS5sZW5ndGggPiAxKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdTEgPSB1dVswXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1MiA9IHV1WzFdLnNsaWNlKDEsIC0xKS5zcGxpdChcXFxcXFxcIiYmXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlZmVyZXIgPSBudWxsO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVhID0gbnVsbDtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb29raWUwID0gbnVsbDtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGlpIG9mIHUyKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGl0MiA9IGlpLnNwbGl0KFxcXFxcXFwiQFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXQyWzBdID09IFxcXFxcXFwiUmVmZXJlclxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZmVyZXIgPSBpdDJbMV0ucmVwbGFjZSgv77yb77ybL2csIFxcXFxcXFwiO1xcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGl0MlswXSA9PSBcXFxcXFxcIlVzZXItQWdlbnRcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1YSA9IGl0MlsxXS5yZXBsYWNlKC/vvJvvvJsvZywgXFxcXFxcXCI7XFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXQyWzBdID09IFxcXFxcXFwiQ29va2llXFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29va2llMCA9IGl0MlsxXS5yZXBsYWNlKC/vvJvvvJsvZywgXFxcXFxcXCI7XFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpYyA9IHUxO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlZmVyZXIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaWMgPSBwaWMgKyBcXFxcXFxcIkBSZWZlcmVyPVxcXFxcXFwiICsgcmVmZXJlcjtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1YSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpYyA9IHBpYyArIFxcXFxcXFwiQFVzZXItQWdlbnQ9XFxcXFxcXCIgKyB1YTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb29raWUwKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGljID0gcGljICsgXFxcXFxcXCJAQ29va2llPVxcXFxcXFwiICsgY29va2llMFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaWMgPSBpdDtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGljOiBwaWMsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHVcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZmJhLmxvZyhwaWNzLmxlbmd0aCArIFxcXFxcXFwiXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZmJhLnBhcnNlTGF6eVJ1bGVBc3luYygkJCQoKS5sYXp5UnVsZSgodXJscykgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vbG9nKHVybHMpO1xcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGFyciA9IHVybHMubWFwKGl0ID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBpdC5waWMsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBpdC5waWMsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJjYXJkX3BpY18zXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsczogXFxcXFxcXCJwaWNzXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZEl0ZW1CZWZvcmUoXFxcXFxcXCJwaWNfbGluZVxcXFxcXFwiLCBhcnIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgcGljcyksIGZ1bmN0aW9uKCkge1xcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGl0IG9mIHVybHMpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuY2hlY2tlZFVybHMucHVzaChpdCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcblxcXFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZmJhLmxvZyhlLnRvU3RyaW5nKCkpO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGNoZWNrLCAzMDApO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgY2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cXFxcIixcXFxcbn0pO1xcXFxuc2V0UmVzdWx0KGQpO1xcXCJ9XVwiLFwicHJveHlcIjpcIlwiLFwiaWNvblwiOlwiXCJ9IiwidGl0bGUiOiLlpYflppnlt6XlhbfnrrEifQ==
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement