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+8mlxcXCIgKyB4LFxcbiAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgbGV0IHggPSBnZXRNeVZhcihcXFwieFxcXCIsIFxcXCLlkKZcX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F90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2VcXG4gICAgfVxcbn0pO1xcblxcbmQucHVzaCh7XFxuICAgIHRpdGxlOiBcXFwi5o+Q5Y+WXFxcIixcXG4gICAgdXJsOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgIHJldHVybiBcXFwidmlkZW86Ly9cXFwiICsgaW5wdXQ7XFxuICAgIH0pLFxcbiAgICBjb2xfdHlwZTogXFxcImlucHV0XFxcIixcXG4gICAgZGVzYzogXFxcIuivt+i+k+WFpee9kemhtemTvuaOpVxcXCIsXFxuICAgIHBpY191cmw6IFxcXCJcXFwiXFxufSk7XFxuXFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6IFxcXCLnlLXlrZDkuabpmIXor7vlmagodHh0KVxcXCIsXFxuICAgIHVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICBsZXQgciA9IGZldGNoKFxcXCJoaWtlcjovL2hvbWVA5pys5Zyw6LWE5rqQ566h55CGXFxcIik7XFxuICAgICAgICBpZiAociAmJiByLmxlbmd0aCA+IDUpIHtcXG4gICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vaG9tZUDmnKzlnLDotYTmupDnrqHnkIZcXFwiO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBjb25maXJtKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLmuKnppqjmj5DnpLpcXFwiLFxcbiAgICAgICAgICAgICAgICBjb250ZW50OiBcXFwi5b2T5YmN5pyq5a+85YWl5omp5bGV5o+S5Lu277yM54K55Ye75LiL5pa556Gu5a6a5oyJ6ZKu5a+85YWlXFxcIixcXG4gICAgICAgICAgICAgICAgY29uZmlybTogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm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FxcXFxuICAgIHVybDogXFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICBkZXNjOiBkZXNjLFxcXFxuICAgIHRpdGxlOiBcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgIGV4dHJhOiB7XFxcXG4gICAgICAgIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXFxcbiAgICAgICAgICAgIGZ1bmN0aW9uIGdldGltZ3MoKSB7XFxcXG4gICAgICAgICAgICAgICAgdmFyIHZpZGVvRWxlbWVudHMgPSBkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZShcXFxcXFxcImltZ1xcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICBpZiAodmlkZW9FbGVtZW50cyA9PSBudWxsKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBbXTtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgbGV0IHVybHMgPSBbXTtcXFxcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHZpZGVvRWxlbWVudHMubGVuZ3RoOyBpKyspIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHZpZGVvRWxlbWVudHNbaV0ud2lkdGggPiA3MCAmJiB2aWRlb0VsZW1lbnRzW2ldLmhlaWdodCA+IDcwKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzcmMgPSB2aWRlb0VsZW1lbnRzW2ldLnNyYztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzcmMgPT0gbnVsbCB8fCBzcmMubGVuZ3RoIDwgNSB8fCB1cmxzLmluY2x1ZGVzKHNyYykgfHwgc3JjLmluZGV4T2YoXFxcXFxcXCJkYXRhOlxcXFxcXFwiKSA9PSAwKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL2xvZyhzcmMpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJscy5wdXNoKG5ldyBVUkwoc3JjKS50b1N0cmluZygpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gdXJscztcXFxcbiAgICAgICAgICAgIH1cXFxcblxcXFxuICAgICAgICAgICAgZnVuY3Rpb24gY2hlY2soKSB7XFxcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybHMgPSBnZXRpbWdzKCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIC8vZmJhLmxvZyhcXFxcXFxcImdldGltZ3PvvJpcXFxcXFxcIiArIHVybHMubGVuZ3RoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHdpbmRvdy5jaGVja2VkVXJscyA9PSBudWxsKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuY2hlY2tlZFVybHMgPSBbXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgY2hlY2tlZFVybHMgPSB3aW5kb3cuY2hlY2tlZFVybHM7XFxcXG4gICAgICAgICAgICAgICAgICAgIHVybHMgPSB1cmxzLmZpbHRlcihpdCA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gIWNoZWNrZWRVcmxzLmluY2x1ZGVzKGl0KVxcXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICBpZiAodXJscy5sZW5ndGggPiAwKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGljcyA9IHVybHMuZmlsdGVyKGl0ID0+IGl0ICE9IG51bGwgJiYgaXQgIT0gXFxcXFxcXCJcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwKGl0ID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHUgPSBmYmEuZ2V0SGVhZGVyVXJsKGl0KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHV1ID0gdS5zcGxpdChcXFxcXFxcIjtcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwaWMgPSB1O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodXUubGVuZ3RoID4gMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHUxID0gdXVbMF07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdTIgPSB1dVsxXS5zbGljZSgxLCAtMSkuc3BsaXQoXFxcXFxcXCImJlxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZWZlcmVyID0gbnVsbDtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1YSA9IG51bGw7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29va2llMCA9IG51bGw7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpaSBvZiB1Mikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpdDIgPSBpaS5zcGxpdChcXFxcXFxcIkBcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGl0MlswXSA9PSBcXFxcXFxcIlJlZmVyZXJcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZlcmVyID0gaXQyWzFdLnJlcGxhY2UoL++8m++8my9nLCBcXFxcXFxcIjtcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpdDJbMF0gPT0gXFxcXFxcXCJVc2VyLUFnZW50XFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdWEgPSBpdDJbMV0ucmVwbGFjZSgv77yb77ybL2csIFxcXFxcXFwiO1xcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGl0MlswXSA9PSBcXFxcXFxcIkNvb2tpZVxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvb2tpZTAgPSBpdDJbMV0ucmVwbGFjZSgv77yb77ybL2csIFxcXFxcXFwiO1xcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaWMgPSB1MTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZWZlcmVyKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGljID0gcGljICsgXFxcXFxcXCJAUmVmZXJlcj1cXFxcXFxcIiArIHJlZmVyZXI7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodWEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaWMgPSBwaWMgKyBcXFxcXFxcIkBVc2VyLUFnZW50PVxcXFxcXFwiICsgdWE7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29va2llMCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpYyA9IHBpYyArIFxcXFxcXFwiQENvb2tpZT1cXFxcXFxcIiArIGNvb2tpZTBcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGljID0gaXQ7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpYzogcGljLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB1XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5sb2cocGljcy5sZW5ndGggKyBcXFxcXFxcIlxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5wYXJzZUxhenlSdWxlQXN5bmMoJCQkKCkubGF6eVJ1bGUoKHVybHMpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2xvZyh1cmxzKTtcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhcnIgPSB1cmxzLm1hcChpdCA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogaXQucGljLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGljX3VybDogaXQucGljLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiY2FyZF9waWNfM1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbHM6IFxcXFxcXFwicGljc1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRJdGVtQmVmb3JlKFxcXFxcXFwicGljX2xpbmVcXFxcXFxcIiwgYXJyKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHBpY3MpLCBmdW5jdGlvbigpIHtcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpdCBvZiB1cmxzKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmNoZWNrZWRVcmxzLnB1c2goaXQpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG5cXFxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5sb2coZS50b1N0cmluZygpKTtcXFxc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