Advertisement
xiaomianao666

邀您一起看:好色

Nov 15th, 2022
549
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥好色@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuS6jOe6p+ino+aekFwiLFwicGF0aFwiOlwicFwiLFwicnVsZVwiOlwianM6XFxudmFyIGQgPSBbXTtcXG5sZXQgdXJsID0gYmFzZTY0RGVjb2RlKGdldFBhcmFtKFxcXCJ1XFxcIikpO1xcbmxldCBtdnRpdGxlID0gYmFzZTY0RGVjb2RlKGdldFBhcmFtKFxcXCJtb3Z0aXRsZVxcXCIpKTtcXG5cXG5sZXQgaHRtbCA9IHJlcXVlc3QodXJsKTtcXG5sZXQgYWxpc3QgPSBwZGZhKGh0bWwsIFxcXCJib2R5JiZhXFxcIik7XFxubGV0IGFyciA9IGFsaXN0Lm1hcChpdCA9PiB7XFxuICAgIHJldHVybiB7XFxuICAgICAgICAvL2h0bWw6IGl0LFxcbiAgICAgICAgdGV4dDogcGRmaChpdCwgXFxcImEmJlRleHRcXFwiKSxcXG4gICAgICAgIHRpdGxlOiBwZGZoKGl0LCBcXFwiYSYmdGl0bGVcXFwiKSxcXG4gICAgICAgIGhyZWY6IHBkKGl0LCBcXFwiYSYmaHJlZlxcXCIsIHVybClcXG4gICAgfVxcbn0pO1xcbi8vbG9nKGFyc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ZXNjOiBcXFwiZmxvYXQmJjEwMCVcXFwiLFxcbiAgICAgICAgcGljX3VybDogXFxcIlxcXCIsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGNhbkJhY2s6IHRydWVcXG4gICAgICAgIH1cXG4gICAgfSk7XFxuICAgIHRvYXN0KFxcXCJBSeWMuemFjeWksei0pe+8jOW3suS9v+eUqFg15Yqg6L29XFxcIik7XFxuICAgIHNldFJlc3VsdChkKTtcXG59IGVsc2Uge1xcbiAgICAvL+S4uue6v+i3r+WKoOWIhuWJsue6v1xcbiAgICBsZXQgZDIgPSBbXTtcXG4gICAgbGV0IG10YWIgPSBbXTtcXG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBkLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICBkMi5wdXNoKGRbaV0pO1xcbiAgICAgICAgbXRhYi5wdXNoKGRbaV0ucGgpO1xcbiAgICAgICAgaWYgKGkgPCBkLmxlbmd0aCAtIDEpIHtcXG4gICAgICAgICAgICBsZXQgaXQgPSBkW2ldO1xcbiAgICAgICAgICAgIGxldCB0MSA9IHBhcnNlSW50KGNsZWFyVGV4dChpdC50aXRsZSkpO1xcbiAgICAgICAgICAgIGxldCBuZXh0ID0gZFtpICsgMV07XFxuICAgICAgICAgICAgbGV0IHQyID0gcGFyc2VJbnQoY2xlYXJUZXh0KG5leHQudGl0bGUpKTtcXG4gICAgICAgICAgICBpZiAodDIgLSB0MSA+IDEgfHwgdDEgLSB0MiA+IDEpIHtcXG4gICAgICAgICAgICAgICAgbXRhYi5wdXNoKCcjJyk7XFxuICAgICAgICAgICAgICAgIGQyLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJiaWdfYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBkMi5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibGluZV9ibGFua1x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yM6K+35YWI6K6+572u44CCJ1xcbiAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgdmFyIHN0YXRlID0gcmVxdWVzdCh0dmlwICsgJy9hY3Rpb24nLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkJyxcXG4gICAgICAgICAgICAgICAgICAgICdSZWZlcmVyJzogdHZpcFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICB0aW1lb3V0OiAyMDAwLFxcbiAgICAgICAgICAgICAgICBib2R5OiAnZG89cHVzaCZ1cmw9JyArIGlucHV0LFxcbiAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJ1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGxvZyhzdGF0ZSk7XFxuICAgICAgICAgICAgaWYgKHN0YXRlID09ICdvaycpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aOqOmAgeaIkOWKn++8jOWmguaenHR2Ym945pi+56S64oCc5rKh5om+5Yiw5pWw5o2u4oCd5Y+v6IO95piv5b2T5YmN55qEamFy5LiN5pSv5oyB44CCJztcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5o6o6YCB5aSx6LSlJ1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIHR2aXApLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJzY3JvbGxfYnV0dG9uXFxcIlxcbiAgICB9KTtcXG4gICAgc2V0UmVzdWx0KGQyKTtcXG59XCJ9LHtcImNvbF90eXBlXCI6XCJ0ZXh0XzFcIixcIm5hbWVcIjpcIuaQnOe0oua1i+ivlVwiLFwicGF0aFwiOlwic1wiLFwicnVsZVwiOlwianM6XFxubGV0IHVybCA9IGJhc2U2NERlY29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xcIlxcXCIgPyByIDogbnVsbCk7XFxuXFxuICAgIGxldCBwYWdlaWQgPSBNWV9SVUxFLnRpdGxlICsgXFxcIi1wYWdlXFxcIiArIHA7XFxuICAgIGlmIChkYXRhLmxlbmd0aCA+IDApIHtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLliqDovb3nrKxcXFwiICsgcCArIFxcXCLpobXkuK3vvIzov5vluqbvvJoxL1xcXCIgKyBkYXRhLmxlbmd0aCxcXG4gICAgICAgICAgICB1cmw6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICAgICAgZGVzYzogXFxcIlxcXCIsXFxuICAgICAgICAgICAgcGljX3VybDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IHBhZ2VpZFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICB9XFxuICAgIHNldFJlc3VsdChkKTtcXG4gICAgbG9nKGRhdGEubGVuZ3RoKTtcXG4gICAgaWYgKGRhdGEubGVuZ3RoID4gMCkge1xcbiAgICAgICAgLy/lpJrnur/nqIvliqDovb0gICAgICAgIFxcbiAgICAgICAgbGV0IHJlYWxQYWdlID0gXFxcIlxcXCIgPT0gciA/IDEgOiBwO1xcbiAgICAgICAgbGV0IHRhc2tzID0gZGF0YS5tYXAoaXQgPT4ge1xcbiAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgIGZ1bmM6IGZ1bmN0aW9uKHJ1bGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBydWxlLmZpbmQocywgcmVhbFBhZ2UpO1xcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBwYXJhbTogaXQsXFxuICAgICAgICAgICAgICAgIGlkOiBcXFwicnVsZUBcXFwiICsgaXQubmFtZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcblxcbiAgICAgICAgYmF0Y2hFeGVjdXRlKHRhc2tzLCB7XFxuICAgICAgICAgICAgZnVuYzogZnVuY3Rpb24ocGFyYW0sIGlkLCBlcnJvciwgcmVzdWx0KSB7XFxuICAgICAgICAgICAgICAgIC8vbG9nKFxcXCJsaXN0ZW5lcjogXFxcIiArIChyZXN1bHQgfHwgW10pLmxlbmd0aClcXG4gICAgICAgICAgICAgICAgcGFyYW0uaSA9IHBhcmFtLmkgKyAxO1xcbiAgICAgICAgICAgICAgICBpZiAocmVzdWx0KSB7XFxuICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGl0IG9mIHJlc3VsdCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbS5qID0gcGFyYW0uaiArIDE7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZEl0ZW1CZWZvcmUocGFnZWlkLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogd3JhcChpdC50aXRsZSwgcyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBpdC5kZXNjLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBpdC51cmwsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBpdC5waWNfdXJsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IGl0LnBpY191cmwgPyAnbW92aWVfMV92ZXJ0aWNhbF9waWMnIDogXFxcInRleHRfMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYTogaXQuZXh0cmFcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcblxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmIChwYXJhbS5pID49IHBhcmFtLmFsbCkge1xcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlSXRlbShwYWdlaWQpXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuWKoOi9veesrFxcXCIgKyBNWV9QQUdFICsgXFxcIumhteS4re+8jOi/m+W6pu+8mlxcXCIgKyAocGFyYW0uaSArIDEpICsgXFxcIi9cXFwiICsgcGFyYW0uYWxsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2NlbnRlcl8xXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogcGFnZWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgcGFyYW06IHtcXG4gICAgICAgICAgICAgICAgYWxsOiBkYXRhLmxlbmd0aCxcXG4gICAgICAgICAgICAgICAgaTogMCxcXG4gICAgICAgICAgICAgICAgajogLTFcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9XFxufSBlbHNlIHtcXG4gICAgbGV0IHtcXG4gICAgICAgIGxvYWRcXG4gICAgfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2RhdGFcXFwiKTtcXG4gICAgbGV0IGRhdGEgPSBsb2FkKC0xLCBudWxsKTtcXG4gICAgaWYgKGRhdGEubGVuZ3RoID4gMCkge1xcbiAgICAgICAgZm9yIChsZXQgaXQgb2YgZGF0YSkge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpdC5uYW1lLFxcbiAgICAgICAgICAgICAgICB1cmw6IFxcXCJzZWxlY3Q6Ly9cXFwiICsgSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLor7fpgInmi6nmk43kvZxcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sOiAxLFxcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9uczogW1xcXCLorr/pl67pppbpobVcXFwiLCBcXFwi5pCc57Si5q2k56uZXFxcIl0sXFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygodXJsKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXCLorr/pl67pppbpobVcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1ZX1VSTCA9IHVybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ4NTovL1xcXCIgKyBnZXRIb21lKHVybClcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vcGFnZS9zaW5nbGVzXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0sIGl0LnVybClcXG4gICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiZmxleF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgcGljX3VybDogXFxcIl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ICAgICBpZiAobmFtZSAmJiBuYW1lICE9IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9IHBkZmgoaXQsIFxcXCJpbnB1dCYmdmFsdWVcXFwiKTtcXG4gICAgICAgICAgICAgICAgYm9keVtuYW1lXSA9IHZhbHVlIHx8IGtleTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBodG1sID0gcG9zdChhY3Rpb24sIHtcXG4gICAgICAgICAgICBib2R5OiBib2R5XFxuICAgICAgICB9KTtcXG4gICAgfVxcblxcbiAgICBsZXQgYWxpc3QgPSBwZGZhKGh0bWwsIFxcXCJib2R5JiZhXFxcIik7XFxuICAgIGxldCBhcnIgPSBhbGlzdC5tYXAoaXQgPT4ge1xcbiAgICAgICAgbGV0IHQgPSBwZGZoKGl0LCBcXFwiYSYmVGV4dFxcXCIpO1xcbiAgICAgICAgbGV0IHQyID0gcGRmaChpdCwgXFxcImEmJnRpdGxlXFxcIik7XFxuICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgIC8vaHRtbDogaXQsXFxuICAgICAgICAgICAgdGV4dDogdDIgJiYgdDIuaW5jbHVkZXMoa2V5KSA/IHQyIDogdCxcXG4gICAgICAgICAgICBocmVmOiBwZChpdCwgXFxcImEmJmhyZWZcXFwiLCB1cmwpXFxuICAgICAgICB9XFxuICAgIH0pO1xcblxcbiAgICBmdW5jdGlvbiBpc1Jlc3VsdChpdCkge1xcbiAgICAgICAgaXQgPSBpdC50ZXh0IHx8IFxcXCJcXFwiO1xcbiAgICAgICAgaWYgKGl0ID09IFxcXCJcXFwiIHx8IGl0Lm1hdGNoKC/mkJzntKJ857uT5p6cLykpIHtcXG4gICAgICAgICAgICByZXR1cm4gZmFsc2VcXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiBpdC5pbmNsdWRlcyhrZXkpO1xcbiAgICB9XFxuXFxuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYXJyLmxlbmd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4ge1xcbiAgICAgICAgICAgIGRlbGV0ZUl0ZW1CeUNscyhcXFwiYWlhZGRcXFwiKTtcXG4gICAgICAgICAgICBhZGRJdGVtQWZ0ZXIocnIgKyBcXFwiYWlzZGVsXFxcIiwgW3tcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLor7fovpPlhaXnvZHnq5nlkI3np7BcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpbnB1dFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2UsXFxuICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IFxcXCJwdXRNeVZhcignbmFtZScsIGlucHV0KVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBcXFwiYWlhZGRcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLor7fovpPlhaXnvZHnq5nmkJzntKLlnLDlnYBcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpbnB1dFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2UsXFxuICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IFxcXCJwdXRNeVZhcignc3VybCcsIGlucHV0KVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBcXFwiYWlhZGRcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi5o+Q5Lqk5L+d5a2YXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzdXJsID0gZ2V0TXlWYXIoXFxcInN1cmxcXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWUgPSBnZXRNeVZhcihcXFwibmFtZVxcXCIsIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3VybCA9PSBcXFwiXFxcIiB8fCBuYW1lID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/or7fovpPlhaXlrozmlbTlhoXlrrlcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCByID0gZGVjb2RlVVJJQ29tcG9uZW50KHN1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHIgPSByLnJlcGxhY2UobmV3IFJlZ0V4cChcXFwiW1xcXFx1NGUwMC1cXFxcdTlmYTVdK1xcXCIsIFxcXCJnXFxcIiksIFxcXCIqKlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZFJ1bGVcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvZGF0YVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZFJ1bGUobmFtZSwgcik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5bey5L+d5a2YXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IFxcXCJhaWFkZFxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIF0pO1xcbiAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgIH0sIE1ZX1JVTEUudGl0bGUpLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJmbGV4X2J1dHRvblxcXCIsXFxuICAgIH0pO1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IFxcXCIgLSBcXFwiLFxcbiAgICAgICAgdXJsOiBcXFwic2VsZWN0Oi8vXFxcIiArIEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICBvcHRpb25zOiBuYW1lcyxcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuivt+mAieaLqeimgeWIoOmZpOeahOermeeCuVxcXCIsXFxuICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQge1xcbiAgICAgICAgICAgICAgICAgICAgcmVtb3ZlUnVsZVxcbiAgICAgICAgICAgICAgICB9ID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvZGF0YVxcXCIpO1xcbiAgICAgICAgICAgICAgICByZW1vdmVSdWxlKGlucHV0KTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL09LXFxcIjtcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfS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CBydWxlKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBzcCA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3NwXFxcIik7XFxuICAgICAgICAgICAgICAgIGxldCBkID0gc3Aob2xkLCBrZXksIHJ1bGUpO1xcbiAgICAgICAgICAgICAgICBsZXQge1xcbiAgICAgICAgICAgICAgICAgICAgd3JhcFxcbiAgICAgICAgICAgICAgICB9ID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvdG9vbFxcXCIpO1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpdCBvZiBkKSB7XFxuICAgICAgICAgICAgICAgICAgICBpdC50aXRsZSA9IHdyYXAoaXQudGl0bGUsIGtleSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgYWRkSXRlbUFmdGVyKHVybCwgZCk7XFxuICAgICAgICAgICAgICAgIGRlbGV0ZUl0ZW0odXJsKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL09LXFxcIjtcXG4gICAgICAgICAgICB9LCB1cmwsIG9sZCwga2V5LCBydWxlKSxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDogdXJsXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgIH1cXG59XFxuXFxuJC5leHBvcnRzID0ge1xcbiAgICBjaGVjazogY2hlY2ssXFxuICAgIHRlc3Q6IHRlc3RcXG59XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLlt6XlhbdcIixcInBhdGhcIjpcInRvb2xcIixcInJ1bGVcIjpcImZ1bmN0aW9uIHdyYXAodGV4dCwgcykge1xcbiAgICByZXR1cm4gdGV4dC5pbmNsdWRlcyhcXFwi4oCc4oCc4oCd4oCdXFxcIikgPyB0ZXh0IDogXFxcIuKAnOKAnOKAneKAnVxcXCIgKyB0ZXh0LnJlcGxhY2UobmV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gICAgY2FuQmFjazogdHJ1ZVxcXFxuICAgICAgICB9XFxcXG4gICAgfSk7XFxcXG4gICAgdG9hc3QoXFxcXFxcXCJBSeWMuemFjeWksei0pe+8jOW3suS9v+eUqFg15Yqg6L29XFxcXFxcXCIpO1xcXFxuICAgIHNldFJlc3VsdChkKTtcXFxcbn0gZWxzZSB7XFxcXG4gICAgLy/kuLrnur/ot6/liqDliIblibLnur9cXFxcbiAgICBsZXQgZDIgPSBbXTtcXFxcbiAgICBsZXQgbXRhYiA9IFtdO1xcXFxuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZC5sZW5ndGg7IGkrKykge1xcXFxuICAgICAgICBkMi5wdXNoKGRbaV0pO1xcXFxuICAgICAgICBtdGFiLnB1c2goZFtpXS5waCk7XFxcXG4gICAgICAgIGlmIChpIDwgZC5sZW5ndGggLSAxKSB7XFxcXG4gICAgICAgICAgICBsZXQgaXQgPSBkW2ldO1xcXFxuICAgICAgICAgICAgbGV0IHQxID0gcGFyc2VJbnQoY2xlYXJUZXh0KGl0LnRpdGxlKSk7XFxcXG4gICAgICAgICAgICBsZXQgbmV4dCA9IGRbaSArIDFdO1xcXFxuICAgICAgICAgICAgbGV0IHQyID0gcGFyc2VJbnQoY2xlYXJUZXh0KG5leHQudGl0bGUpKTtcXFxcbiAgICAgICAgICAgIGlmICh0MiAtIHQxID4gMSB8fCB0MSAtIHQyID4gMSkge1xcXFxuICAgICAgICAgICAgICAgIG10YWIucHVzaCgnIycpO1xcXFxuICAgICAgICAgICAgICAgIGQyLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJiaWdfYmxhbmtfYmxvY2tcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIGQyLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJsaW5lX2JsYW5rXFxcXFxcXCJcXFxcbiAgICAgIC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AgICAgICAgICAgaWYgKCF0dmlwLmluY2x1ZGVzKCc6OTk3JykpIHtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8vSVDkuLrnqbrmiJbkuI3mraPnoa7vvIzor7flhYjorr7nva7jgIInXFxcXG4gICAgICAgICAgICB9O1xcXFxuICAgICAgICAgICAgdmFyIHN0YXRlID0gcmVxdWVzdCh0dmlwICsgJy9hY3Rpb24nLCB7XFxcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcXFxuICAgICAgICAgICAgICAgICAgICAnQ29udGVudC1UeXBlJzogJ2FwcGxpY2F0aW9uL3gtd3d3LWZvcm0tdXJsZW5jb2RlZCcsXFxcXG4gICAgICAgICAgICAgICAgICAgICdSZWZlcmVyJzogdHZpcFxcXFxuICAgICAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICAgICAgdGltZW91dDogMjAwMCxcXFxcbiAgICAgICAgICAgICAgICBib2R5OiAnZG89cHVzaCZ1cmw9JyArIGlucHV0LFxcXFxuICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnXFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgIGxvZyhzdGF0ZSk7XFxcXG4gICAgICAgICAgICBpZiAoc3RhdGUgPT0gJ29rJykge1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mjqjpgIHmiJDlip/vvIzlpoLmnpx0dmJveOaYvuekuuKAnOayoeaJvuWIsOaVsOaNruKAneWPr+iDveaYr+W9k+WJjeeahGphcuS4jeaUr+aMgeOAgic7XFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mjqjpgIHlpLHotKUnXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH0sIHR2aXApLFxcXFxuICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJzY3JvbGxfYnV0dG9uXFxcXFxcXCJcXF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AgICAgY29sX3R5cGU6IFxcXFxcXFwidGV4dF9jZW50ZXJfMVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgZGVzYzogXFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgIHBpY191cmw6IFxcXFxcXFwiXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgIGlkOiBwYWdlaWRcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSk7XFxcXG4gICAgfVxcXFxuICAgIHNldFJlc3VsdChkKTtcXFxcbiAgICBsb2coZGF0YS5sZW5ndGgpO1xcXFxuICAgIGlmIChkYXRhLmxlbmd0aCA+IDApIHtcXFxcbiAgICAgICAgLy/lpJrnur/nqIvliqDovb0gICAgICAgIFxcXFxuICAgICAgICBsZXQgcmVhbFBhZ2UgPSBcXFxcXFxcIlxcXFxcXFwiID09IHIgPyAxIDogcDtcXFxcbiAgICAgICAgbGV0IHRhc2tzID0gZGF0YS5tYXAoaXQgPT4ge1xcXFxuICAgICAgICAgICAgcmV0dXJuIHtcXFxcbiAgICAgICAgICAgICAgICBmdW5jOiBmdW5jdGlvbihydWxlKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBydWxlLmZpbmQocywgcmVhbFBhZ2UpO1xcXFxuICAgICAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICAgICAgcGFyYW06IGl0LFxcXFxuICAgICAgICAgICAgICAgIGlkOiBcXFxcXFxcInJ1bGVAXFxcXFxcXCIgKyBpdC5uYW1lXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH0pO1xcXFxuXFxcXG4gICAgICAgIGJhdGNoRXhlY3V0ZSh0YXNrcywge1xcXFxuICAgICAgICAgICAgZnVuYzogZnVuY3Rpb24ocGFyYW0sIGlkLCBlcnJvciwgcmVzdWx0KSB7XFxcXG4gICAgICAgICAgICAgICAgLy9sb2coXFxcXFxcXCJsaXN0ZW5lcjogXFxcXFxcXCIgKyAocmVzdWx0IHx8IFtdKS5sZW5ndGgpXFxcXG4gICAgICAgICAgICAgICAgcGFyYW0uaSA9IHBhcmFtLmkgKyAxO1xcXFxuICAgICAgICAgICAgICAgIGlmIChyZXN1bHQpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGl0IG9mIHJlc3VsdCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtLmogPSBwYXJhbS5qICsgMTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRJdGVtQmVmb3JlKHBhZ2VpZCwge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogd3JhcChpdC50aXRsZSwgcyksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IGl0LmRlc2MsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogaXQudXJsLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBpdC5waWNfdXJsLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogaXQucGljX3VybCA/ICdtb3ZpZV8xX3ZlcnRpY2FsX3BpYycgOiBcXFxcXFxcInRleHRfMVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYTogaXQuZXh0cmFcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcXFxuXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIGlmIChwYXJhbS5pID49IHBhcmFtLmFsbCkge1xcXFxuICAgICAgICAgICAgICAgICAgICBkZWxldGVJdGVtKHBhZ2VpZClcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIuWKoOi9veesrFxcXFxcXFwiICsgTVlfUEFHRSArIFxcXFxcXFwi6aG15Lit77yM6L+b5bqm77yaXFxcXFxcXCIgKyAocGFyYW0uaSArIDEpICsgXFxcXFxcXCIvXFxcXFxcXCIgKyBwYXJhbS5hbGwsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXFxcXFwiXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJ0ZXh0X2NlbnRlcl8xXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGljX3VybDogXFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IHBhZ2VpZFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICBwYXJhbToge1xcXFxuICAgICAgICAgICAgICAgIGFsbDogZGF0YS5sZW5ndGgsXFxcXG4gICAgICAgICAgICAgICAgaTogMCxcXFxcbiAgICAgICAgICAgICAgICBqOiAtMVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9KVxcXFxuICAgIH1cXFxcbn0gZWxzZSB7XFxcXG4gICAgbGV0IHtcXFxcbiAgICAgICAgbG9hZFxcXFxuICAgIH0gPSAkLnJlcXVpcmUoXFxcXFxcXCJoaWtlcjovL3BhZ2UvZGF0YVxcXFxcXFwiKTtcXFxcbiAgICBsZXQgZGF0YSA9IGxvYWQoLTEsIG51bGwpO1xcXFxuICAgIGlmIChkYXRhLmxlbmd0aCA+IDApIHtcXFxcbiAgICAgICAgZm9yIChsZXQgaXQgb2YgZGF0YSkge1xcXFxuICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogaXQubmFtZSxcXFxcbiAgICAgICAgICAgICAgICB1cmw6IFxcXFxcXFwic2VsZWN0Oi8vXFxcXFxcXCIgKyBKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIuivt+mAieaLqeaTjeS9nFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2w6IDEsXFxcXG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnM6IFtcXFxcXFxcIuiuv+mXrummlumhtVxcXFxcXFwiLCBcXFxcXFxcIuaQnOe0ouatpOermVxcXFxcXFwiXSxcXFxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHVybCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXFxcXFwi6K6/6Zeu6aaW6aG1XFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBNWV9VUkwgPSB1cmw7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwieDU6Ly9cXFxcXFxcIiArIGdldEhvbWUodXJsKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL3BhZ2Uvc2luZ2xlc1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAg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XFwi5aKe5YigXFxcIixcXFwicGF0aFxcXCI6XFxcIm1hbmFnZVxcXCIsXFxcInJ1bGVcXFwiOlxcXCIkLmV4cG9ydHMgPSBmdW5jdGlvbihkLCBuYW1lcykge1xcXFxuICAgIGQucHVzaCh7XFxcXG4gICAgICAgIHRpdGxlOiBcXFxcXFxcIiArIFxcXFxcXFwiLFxcXFxuICAgICAgICB1cmw6ICQoXFxcXFxcXCIjbm9Mb2FkaW5nI1xcXFxcXFwiKS5sYXp5UnVsZSgocnIpID0+IHtcXFxcbiAgICAgICAgICAgIGRlbGV0ZUl0ZW1CeUNscyhcXFxcXFxcImFpYWRkXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgYWRkSXRlbUFmdGVyKHJyICsgXFxcXFxcXCJhaXNkZWxcXFxcXFxcIiwgW3tcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXFxcXFwiXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXFxcXFwi6K+36L6T5YWl572R56uZ5ZCN56ewXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImlucHV0XFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZVZpc2libGU6IGZhbHNlLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IFxcXFxcXFwicHV0TXlWYXIoJ25hbWUnLCBpbnB1dClcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogXFxcXFxcXCJhaWFkZFxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgICAgIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXFxcXFwiXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXFxcXFwi6K+36L6T5YWl572R56uZ5pCc57Si5Zyw5Z2AXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImlucHV0XFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZVZpc2libGU6IGZhbHNlLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IFxcXFxcXFwicHV0TXlWYXIoJ3N1cmwnLCBpbnB1dClcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogXFxcXFxcXCJhaWFkZFxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgICAgIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXFxcXFwi5o+Q5Lqk5L+d5a2YXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcInRleHRfY2VudGVyXzFcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKFxcXFxcXFwiI25vTG9hZGluZyNcXFxcXFxcIikubGF6eVJ1bGUoKCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHN1cmwgPSBnZXRNeVZhcihcXFxcXFxcInN1cmxcXFxcXFxcIiwgXFxcXFxcXCJcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmFtZSA9IGdldE15VmFyKFxcXFxcXFwibmFtZVxcXFxcXFwiLCBcXFxcXFxcIlxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdXJsID09IFxcXFxcXFwiXFxcXFxcXCIgfHwgbmFtZSA9PSBcXFxcXFxcIlxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwidG9hc3Q6Ly/or7fovpPlhaXlrozmlbTlhoXlrrlcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHIgPSBkZWNvZGVVUklDb21wb25lbnQoc3VybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByID0gci5yZXBsYWNlKG5ldyBSZWdFeHAoXFxcXFxcXCJbXFxcXFxcXFx1NGUwMC1cXFxcXFxcXHU5ZmE1XStcXFxcXFxcIiwgXFxcXFxcXCJnXFxcXFxcXCIpLCBcXFxcXFxcIioqXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRSdWxlXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ID0gJC5yZXF1aXJlKFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2RhdGFcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBhZGRSdWxlKG5hbWUsIHIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcInRvYXN0Oi8v5bey5L+d5a2YXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBcXFxcXFxcImFpYWRkXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIF0pO1xcXFxuICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwia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Xp5UnVsZSgodXJsLCBvbGQsIGtleSwgcnVsZSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGxldCBzcCA9ICQucmVxdWlyZShcXFxcXFxcImhpa2VyOi8vcGFnZS9zcFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICBsZXQgZCA9IHNwKG9sZCwga2V5LCBydWxlKTtcXFxcbiAgICAgICAgICAgICAgICBsZXQge1xcXFxuICAgICAgICAgICAgICAgICAgICB3cmFwXFxcXG4gICAgICAgICAgICAgICAgfSA9ICQucmVxdWlyZShcXFxcXFxcImhpa2VyOi8vcGFnZS90b29sXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGl0IG9mIGQpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaXQudGl0bGUgPSB3cmFwKGl0LnRpdGxlLCBrZXkpO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBhZGRJdGVtQWZ0ZXIodXJsLCBkKTtcXFxcbiAgICAgICAgICAgICAgICBkZWxldGVJdGVtKHVybCk7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwidG9hc3Q6Ly9PS1xcXFxcXFwiO1xcXFxuICAgICAgICAgICAgfSwgdXJsLCBvbGQsIGtleSwgcnVsZSksXFxcXG4gICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgIGlkOiB1cmxcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSk7XFxcXG4gICAgfVxcXFxufVxcXFxuXFxcXG4kLmV4cG9ydHMgPSB7XFxcXG4gICAgY2hlY2s6IGNoZWNrLFxcXFxuICAgIHRlc3Q6IHRlc3RcXFxcbn1cXFwifSx7XFxcImNvbF90eXBlXFxcIjpcXFwibW92aWVfM1xcXCIsXFxcIm5hbWVcXFwiOlxcXCLlt6XlhbdcXFwiLFxcXCJwYXRoXFxcIjpcXFwidG9vbFxcXCIsXFxcInJ1bGVc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