Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥文本转语音@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcInBpY1wiLFwicGF0aFwiOlwicGljXCIsXCJydWxlXCI6XCJqczpcXG52YXIgZCA9IFtdO1xcbmxldCB4ID0gZ2V0TXlWYXIoXFxcInhcXFwiLCBcXFwi5ZCmXFxcIik7XFxubGV0IGRlc2MgPSB4ID09IFxcXCLmmK9cXFwiID8gXFxcImZsb2F0JiYzMDBcXFwiIDogXFxcImZsb2F0JiYxXFxcIjtcXG5kLnB1c2goe1xcbiAgICBjb2xfdHlwZTogXFxcIng1X3dlYnZpZXdfc2luZ2xlXFxcIixcXG4gICAgdXJsOiBcXFwiXFxcIixcXG4gICAgZGVzYzogZGVzYyxcXG4gICAgdGl0bGU6IFxcXCJcXFwiLFxcbiAgICBleHRyYToge1xcbiAgICAgICAganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgIGZ1bmN0aW9uIGdldGltZ3MoKSB7XFxuICAgICAgICAgICAgICAgIHZhciB2aWRlb0VsZW1lbnRzID0gZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoXFxcImltZ1xcXCIpO1xcbiAgICAgICAgICAgICAgICBpZiAodmlkZW9FbGVtZW50cyA9PSBudWxsKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gW107XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgbGV0IHVybHMgPSBbXTtcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB2aWRlb0VsZW1lbnRzLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAodmlkZW9FbGVtZW50c1tpXS53aWR0aCA+IDcwICYmIHZpZGVvRWxlbWVudHNbaV0uaGVpZ2h0ID4gNzApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzcmMgPSB2aWRlb0VsZW1lbnRzW2ldLnNyYztcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3JjID09IG51bGwgfHwgc3JjLmxlbmd0aCA8IDUgfHwgdXJscy5pbmNsdWRlcyhzcmMpIHx8IHNyYy5pbmRleE9mKFxcXCJkYXRhOlxcXCIpID09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vbG9nKHNyYyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJscy5wdXNoKG5ldyBVUkwoc3JjKS50b1N0cmluZygpKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXR1cm4gdXJscztcXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgZnVuY3Rpb24gY2hlY2soKSB7XFxuICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJscyA9IGdldGltZ3MoKTtcXG4gICAgICAgICAgICAgICAgICAgIC8vZmJhLmxvZyhcXFwiZ2V0aW1nc++8mlxcXCIgKyB1cmxzLmxlbmd0aCk7XFxuICAgICAgICAgICAgICAgICAgICBpZiAod2luZG93LmNoZWNrZWRVcmxzID09IG51bGwpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuY2hlY2tlZFVybHMgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGxldCBjaGVja2VkVXJscyA9IHdpbmRvdy5jaGVja2VkVXJscztcXG4gICAgICAgICAgICAgICAgICAgIHVybHMgPSB1cmxzLmZpbHRlcihpdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICFjaGVja2VkVXJscy5pbmNsdWRlcyhpdClcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcblxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHVybHMubGVuZ3RoID4gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwaWNzID0gdXJscy5maWx0ZXIoaXQgPT4gaXQgIT0gbnVsbCAmJiBpdCAhPSBcXFwiXFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLm1hcChpdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdSA9IGZiYS5nZXRIZWFkZXJVcmwoaXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHV1ID0gdS5zcGxpdChcXFwiO1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBpYyA9IHU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodXUubGVuZ3RoID4gMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1MSA9IHV1WzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1MiA9IHV1WzFdLnNsaWNlKDEsIC0xKS5zcGxpdChcXFwiJiZcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVmZXJlciA9IG51bGw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVhID0gbnVsbDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29va2llMCA9IG51bGw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaWkgb2YgdTIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGl0MiA9IGlpLnNwbGl0KFxcXCJAXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpdDJbMF0gPT0gXFxcIlJlZmVyZXJcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZlcmVyID0gaXQyWzFdLnJlcGxhY2UoL++8m++8my9nLCBcXFwiO1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpdDJbMF0gPT0gXFxcIlVzZXItQWdlbnRcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1YSA9IGl0MlsxXS5yZXBsYWNlKC/vvJvvvJsvZywgXFxcIjtcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXQyWzBdID09IFxcXCJDb29raWVcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29raWUwID0gaXQyWzFdLnJlcGxhY2UoL++8m++8my9nLCBcXFwiO1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpYyA9IHUxO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZWZlcmVyKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpYyA9IHBpYyArIFxcXCJAUmVmZXJlcj1cXFwiICsgcmVmZXJlcjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHVhKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpYyA9IHBpYyArIFxcXCJAVXNlci1BZ2VudD1cXFwiICsgdWE7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb29raWUwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpYyA9IHBpYyArIFxcXCJAQ29va2llPVxcXCIgKyBjb29raWUwXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaWMgPSBpdDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGljOiBwaWMsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB1XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5sb2cocGljcy5sZW5ndGggKyBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZmJhLnBhcnNlTGF6eVJ1bGVBc3luYygkJCQoKS5sYXp5UnVsZSgodXJscykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2xvZyh1cmxzKTtcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGFyciA9IHVybHMubWFwKGl0ID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogaXQucGljLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IGl0LnBpYyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImNhcmRfcGljXzNcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsczogXFxcInBpY3NcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkSXRlbUJlZm9yZShcXFwicGljX2xpbmVcXFwiLCBhcnIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHBpY3MpLCBmdW5jdGlvbigpIHtcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpdCBvZiB1cmxzKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5jaGVja2VkVXJscy5wdXNoKGl0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5sb2coZS50b1N0cmluZygpKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGNoZWNrLCAzMDApO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBjaGVjaygpO1xcbiAgICAgICAgfSlcXG4gICAgfVxcbn0pO1xcblxcblxcbmQucHVzaCh7XFxuICAgIHRpdGxlOiBcXFwi5o+Q5Y+WXFxcIixcXG4gICAgdXJsOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgIHB1dE15VmFyKFxcXCJpXFxcIiwgaW5wdXQpO1xcbiAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKFxcXCJwaWNzXFxcIik7XFxuICAgICAgICByZWZyZXNoWDVXZWJWaWV3KGlucHV0KTtcXG4gICAgfSksXFxuICAgIGNvbF90eXBlOiBcXFwiaW5wdXRcXFwiLFxcbiAgICBkZXNjOiBcXFwi6K+36L6T5YWl572R6aG15Zyw5Z2AXFxcIixcXG4gICAgcGljX3VybDogXFxcIlxcXCIsXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICBkZWZhdWx0VmFsdWU6IGdldE15VmFyKFxcXCJpXFxcIiwgXFxcIlxcXCIpXFxuICAgIH1cXG59KTtcXG5kLnB1c2goe1xcbiAgICB0aXRsZTogXFxcIuaYvuekuue9kemhtee7hOS7tu+8mlxcXCIgKyB4LFxcbiAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgbGV0IHggPSBnZXRNeVZhcihcXFwieFxcXCIsIFxcXCLlkKZcXFwiKTtcXG4gICAgICAgIGxldCBuZXh0ID0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ICAgICAgICAgICAgIGxldCB1cmxzID0gW107XFxcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB2aWRlb0VsZW1lbnRzLmxlbmd0aDsgaSsrKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmICh2aWRlb0VsZW1lbnRzW2ldLndpZHRoID4gNzAgJiYgdmlkZW9FbGVtZW50c1tpXS5oZWlnaHQgPiA3MCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3JjID0gdmlkZW9FbGVtZW50c1tpXS5zcmM7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3JjID09IG51bGwgfHwgc3JjLmxlbmd0aCA8IDUgfHwgdXJscy5pbmNsdWRlcyhzcmMpIHx8IHNyYy5pbmRleE9mKFxcXFxcXFwiZGF0YTpcXFxcXFxcIikgPT0gMCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy9sb2coc3JjKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybHMucHVzaChuZXcgVVJMKHNyYykudG9TdHJpbmcoKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHVybHM7XFxcXG4gICAgICAgICAgICB9XFxcXG5cXFxcbiAgICAgICAgICAgIGZ1bmN0aW9uIGNoZWNrKCkge1xcXFxuICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCB1cmxzID0gZ2V0aW1ncygpO1xcXFxuICAgICAgICAgICAgICAgICAgICAvL2ZiYS5sb2coXFxcXFxcXCJnZXRpbWdz77yaXFxcXFxcXCIgKyB1cmxzLmxlbmd0aCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmICh3aW5kb3cuY2hlY2tlZFVybHMgPT0gbnVsbCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmNoZWNrZWRVcmxzID0gW107XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNoZWNrZWRVcmxzID0gd2luZG93LmNoZWNrZWRVcmxzO1xcXFxuICAgICAgICAgICAgICAgICAgICB1cmxzID0gdXJscy5maWx0ZXIoaXQgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICFjaGVja2VkVXJscy5pbmNsdWRlcyhpdClcXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG5cXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHVybHMubGVuZ3RoID4gMCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBpY3MgPSB1cmxzLmZpbHRlcihpdCA9PiBpdCAhPSBudWxsICYmIGl0ICE9IFxcXFxcXFwiXFxcXFxcXCIpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLm1hcChpdCA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1ID0gZmJhLmdldEhlYWRlclVybChpdCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1dSA9IHUuc3BsaXQoXFxcXFxcXCI7XFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGljID0gdTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHV1Lmxlbmd0aCA+IDEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1MSA9IHV1WzBdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHUyID0gdXVbMV0uc2xpY2UoMSwgLTEpLnNwbGl0KFxcXFxcXFwiJiZcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVmZXJlciA9IG51bGw7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdWEgPSBudWxsO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvb2tpZTAgPSBudWxsO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaWkgb2YgdTIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaXQyID0gaWkuc3BsaXQoXFxcXFxcXCJAXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpdDJbMF0gPT0gXFxcXFxcXCJSZWZlcmVyXFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmZXJlciA9IGl0MlsxXS5yZXBsYWNlKC/vvJvvvJsvZywgXFxcXFxcXCI7XFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXQyWzBdID09IFxcXFxcXFwiVXNlci1BZ2VudFxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVhID0gaXQyWzFdLnJlcGxhY2UoL++8m++8my9nLCBcXFxcXFxcIjtcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpdDJbMF0gPT0gXFxcXFxcXCJDb29raWVcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29raWUwID0gaXQyWzFdLnJlcGxhY2UoL++8m++8my9nLCBcXFxcXFxcIjtcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGljID0gdTE7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVmZXJlcikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpYyA9IHBpYyArIFxcXFxcXFwiQFJlZmVyZXI9XFxcXFxcXCIgKyByZWZlcmVyO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHVhKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGljID0gcGljICsgXFxcXFxcXCJAVXNlci1BZ2VudD1cXFxcXFxcIiArIHVhO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvb2tpZTApIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaWMgPSBwaWMgKyBcXFxcXFxcIkBDb29raWU9XFxcXFxcXCIgKyBjb29raWUwXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG5cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpYyA9IGl0O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaWM6IHBpYyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogdVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBmYmEubG9nKHBpY3MubGVuZ3RoICsgXFxcXFxcXCJcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBmYmEucGFyc2VMYXp5UnVsZUFzeW5jKCQkJCgpLmxhenlSdWxlKCh1cmxzKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9sb2codXJscyk7XFxcXG5cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXJyID0gdXJscy5tYXAoaXQgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXFxcXFwiXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGl0LnBpYyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IGl0LnBpYyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImNhcmRfcGljXzNcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBcXFxcXFxcInBpY3NcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkSXRlbUJlZm9yZShcXFxcXFxcInBpY19saW5lXFxcXFxcXCIsIGFycik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBwaWNzKSwgZnVuY3Rpb24oKSB7XFxcXG5cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaXQgb2YgdXJscykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5jaGVja2VkVXJscy5wdXNoKGl0KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuXFxcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICBmYmEubG9nKGUudG9TdHJpbmcoKSk7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoY2hlY2ssIDMwMCk7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICBjaGVjaygpO1xcXFxuICAgICAgICB9KVxcXFxuICAgIH1cXFxcbn0pO1xcXFxuXFxcXG5cXFxcbmQucHVzaCh7XFxcXG4gICAgdGl0bGU6IFxcXFxcXFwi5o+Q5Y+WXFxcXFxcXCIsXFxcXG4gICAgdXJsOiAkLnRvU3RyaW5nKCgpID0+IHtcXFxcbiAgICAgICAgcHV0TXlWYXIoXFxcXFxcXCJpXFxcXFxcXCIsIGlucHV0KTtcXFxcbiAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKFxcXFxcXFwicGljc1xcXFxcXFwiKTtcXFxcbiAgICAgICAgcmVmcmVzaFg1V2ViVmlldyhpbnB1dCk7XFxcXG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