xiaomianao666

插件名:global_六神VIP看看

May 7th, 2022
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_六神VIP看看@base64://Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgIFZJUOeci+eci+ino+aekOW8leaTjgovLyBAdmVyc2lvbiAgICAgIDYuNi42Ci8vIEBhdXRob3IgICAgICAg5YWt56WeVjU4NwovLyBAZGVzY3JpcHRpb24gICAg5YWo572R5YWo5bmz5Y+w5YWo6Ieq5Yqo6Kej5p6Q77yM5aSa5Yqf6IO957q/6Lev5peg5q2757q/6Lev77yM5paw5aKe5LqR6Kej5p6Q77yM5LyY6LSo5b2x6KeG56uZ5ZCI6ZuGKOiBmuWQiOaQnCnjgILosYbnk6PlnKjnur/op4LnnItqc+WFqOiHquWKqOino+aekOi2hea4hee6v+i3ryjlha3npZ5WNTg3KQovLyBAbm90ZSAgICAgICAgIOWFreelnlY1ODfop6PmnpDlvJXmk47vvJrosYbnk6PlnKjnur/op4LnnItqc+WFqOiHquWKqOino+aekOi2hea4hee6v+i3r+OAggovLyBAbmFtZXNwYWNlICAgIOWFreelnlY1ODcKLy8gQGljb24gICAgICAgICBodHRwczovL3AucHN0YXRwLmNvbS9vcmlnaW4vZmU2OTAwMDBjOTE0MTk1NWJiYWMKLy8gQGxpY2Vuc2UgICAgICBHUEwgTGljZW5zZQovLyBAaW5jbHVkZSAgICAgICoKLy8gQGdyYW50ICAgICAgICBHTV9zZXRWYWx1ZQovLyBAZ3JhbnQgICAgICAgIEdNX2dldFZhbHVlCi8vIEBncmFudCAgICAgICAgR01fZGVsZXRlVmFsdWUKLy8gQGdyYW50ICAgICAgICB1bnNhZmVXaW5kb3cKLy8gPT0vVXNlclNjcmlwdD09CgohYXN5bmMgZnVuY3Rpb24oKSB7CiAgbGV0IF9NYXRoZmxvb3IgPSBNYXRoLmZsb29yLCBfTWF0aG1heCA9IE1hdGgubWF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ID0gYXJndW1lbnRzW25dOwogICAgICBsZXQgdCA9IGFyZ3VtZW50cy5sZW5ndGg7CiAgICAgIGlmICghdCkgcmV0dXJuIHt9OwogICAgICBpZiAoMSA9PT0gdCkgcmV0dXJuIG8oZG4sIG4pOwogICAgICBmb3IgKGxldCBlID0gMTsgZSA8IHQ7IGUrKykgZm9yIChsZXQgdCBpbiBhcmd1bWVudHNbZV0pIG5bdF0gPSBhcmd1bWVudHNbZV1bdF07CiAgICAgIHJldHVybiBuOwogICAgfQogICAgZnVuY3Rpb24gYShuLCBlKSB7CiAgICAgIGxldCB0ID0gbiAmJiAobi5tYXRjaGVzIHx8IG4ud2Via2l0TWF0Y2hlc1NlbGVjdG9yIHx8IG4ubXNNYXRjaGVzU2VsZWN0b3IpOwogICAgICByZXR1cm4gISF0ICYmICEhZSAmJiB0LmNhbGwobiwgZSk7CiAgICB9CiAgICBmdW5jdGlvbiByKG4pIHsKICAgICAgcmV0dXJuIG4gaW5zdGFuY2VvZiBsbjsKICAgIH0KICAgIGZ1bmN0aW9uIHMobikgewogICAgICByZXR1cm4gISFuICYmIG4gPT09IG4ud2luZG93OwogICAgfQogICAgZnVuY3Rpb24gbChuKSB7CiAgICAgIHJldHVybiAhIW4gJiYgOSA9PT0gbi5ub2RlVHlwZTsKICAgIH0KICAgIGZ1bmN0aW9uIGMobikgewogICAgICByZXR1cm4gISFuICYmIDEgPT09IG4ubm9kZVR5cGU7CiAgICB9CiAgICBmdW5jdGlvbiBkKG4pIHsKICAgICAgcmV0dXJuICJmdW5jdGlvbiIgPT0gdHlwZW9mIG47CiAgICB9CiAgICBmdW5jdGlvbiBwKG4pIHsKICAgICAgcmV0dXJuICJzdHJpbmciID09IHR5cGVvZiBuOwogICAgfQogICAgZnVuY3Rpb24gZihuKSB7CiAgICAgIHJldHVybiB2b2lkIDAgPT09IG47CiAgICB9CiAgICBmdW5jdGlvbiB1KG4pIHsKICAgICAgcmV0dXJuIG51bGwgPT09IG47CiAgICB9CiAgICBmd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24obiwgZSwgdCkgewogICAgICAgIHJldHVybiBZLmNhbGwodCwgbikgPT09IGU7CiAgICAgIH0pKSA6IG47CiAgICB9CiAgICBmdW5jdGlvbiB4KG4sIGUsIHQpIHsKICAgICAgaWYgKGMobikpIHsKICAgICAgICBsZXQgaSA9IEwuZ2V0Q29tcHV0ZWRTdHlsZShuLCBudWxsKTsKICAgICAgICByZXR1cm4gdCA/IGkuZ2V0UHJvcGVydHlWYWx1ZShlKSB8fCB2b2lkIDAgOiBpW2VdOwogICAgICB9CiAgICB9CiAgICBmdW5jdGlvbiB3KG4sIGUpIHsKICAgICAgcmV0dXJuIHBhcnNlSW50KHgobiwgZSksIDEwKSB8fCAwOwogICAgfQogICAgZnVuY3Rpb24gXyhuKSB7CiAgICAgIHJldHVybiB1bi50ZXN0KG4pOwogICAgfQogICAgZnVuY3Rpb24gayhuLCBlKSB7CiAgICAgIGlmICh2b2lkIDAgPT09IGUgJiYgKGUgPSBfKG4pKSwgZSkgcmV0dXJuIG47CiAgICAgIGlmICghbW5bbl0pIHsKICAgICAgICBsZXQgZSA9IHQobiksIG8gPSAiIiArIGVbMF0udG9VcHBlckNhc2UoKSArIGUuc2xpY2UoMSk7CiAgICAgICAgaSgoZSArICIgIiArIGduLmpvaW4obyArICIgIikgKyBvKS5zcGxpdCgiICIpLCAoZnVuY3Rpb24oZSwgdCkgewogICAgICAgICAgaWYgKHQgaW4gaG4pIHJldHVybiBtbltuXSA9IHQsICExOwogICAgICAgIH0pKTsKICAgICAgfQogICAgICByZXR1cm4gbW5bbl07CiAgICB9CiAgICBmdW5jdGlvbiBTKG4sIGUsIHQpIHsKICAgICAgcmV0dXJuIHZvaWQgMCA9PT0gdCAmJiAodCA9IF8obikpLCB0IHx8IGJuW25dIHx8ICFtKGUpID8gZSA6IGUgKyAicHgiOwogICAgfQogICAgZnVuY3Rpb24gaihlLCBpKSB7CiAgICAgIGxldCBvID0gZS5kYXRhc2V0W2ldIHx8IGUuZGF0YXNldFt0KGkpXTs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0aW9uIG4obiwgdCkgewogICAgICAgIGlmICghbikgcmV0dXJuOwogICAgICAgIGlmIChyKG4pKSByZXR1cm4gbjsKICAgICAgICBsZXQgaSA9IG47CiAgICAgICAgaWYgKHAobikpIHsKICAgICAgICAgIGxldCBvID0gKHIodCkgPyB0WzBdIDogdCkgfHwgRjsKICAgICAgICAgIGlmIChpID0gL14jW1x3LV0qJC8udGVzdChuKSA/IG8uZ2V0RWxlbWVudEJ5SWQobi5zbGljZSgxKSkgOiAvPC4rPi8udGVzdChuKSA/IFYobikgOiBlKG4sIG8pLAogICAgICAgICAgIWkpIHJldHVybjsKICAgICAgICB9IGVsc2UgaWYgKGQobikpIHJldHVybiB0aGlzLnJlYWR5KG4pOwogICAgICAgIChpLm5vZGVUeXBlIHx8IGkgPT09IEwpICYmIChpID0gWyBpIF0pLCB0aGlzLmxlbmd0aCA9IGkubGVuZ3RoOwogICAgICAgIGZvciAobGV0IG4gPSAwLCBlID0gdGhpcy5sZW5ndGg7IG4gPCBlOyBuKyspIHRoaXNbbl0gPSBpW25dOwogICAgICB9CiAgICAgIHJldHVybiBuLnByb3RvdHlwZS5pbml0ID0gZnVuY3Rpb24oZSwgdCkgewogICAgICAgIHJldHVybiBuZXcgbihlLCB0KTsKICAgICAgfSwgbjsKICAgIH0oKSwgY24gPSBsbi5wcm90b3R5cGUsIGRuID0gY24uaW5pdDsKICAgIGRuLmZuID0gZG4ucHJvdG90eXBlID0gY24sIGNuLmxlbmd0aCA9IDAsIGNuLnNwbGljZSA9IGFuLCAiZnVuY3Rpb24iID09IHR5cGVvZiBTeW1ib2wgJiYgKGNuW1N5bWJvbC5pdGVyYXRvcl0gPSBLW1N5bWJvbC5pdGVyYXRvcl0pLAogICAgY24ubWFwID0gZnVuY3Rpb24obikgewogICAgICByZXR1cm4gZG4oUS5hcHBseShbXSwgbm4uY2FsbCh0aGlzLCAoZnVuY3Rpb24oZSwgdCkgewogICAgICAgIHJldHVybiBuLmNhbGwoZSwgdCwgZSk7Ci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ICB9LCBjbi5lcSA9IGZ1bmN0aW9uKG4pIHsKICAgICAgcmV0dXJuIGRuKHRoaXMuZ2V0KG4pKTsKICAgIH0sIGNuLmZpcnN0ID0gZnVuY3Rpb24oKSB7CiAgICAgIHJldHVybiB0aGlzLmVxKDApOwogICAgfSwgY24ubGFzdCA9IGZ1bmN0aW9uKCkgewogICAgICByZXR1cm4gdGhpcy5lcSgtMSk7CiAgICB9LCBjbi5maWx0ZXIgPSBmdW5jdGlvbihuKSB7CiAgICAgIGxldCBlID0gaChuKTsKICAgICAgcmV0dXJuIGRuKFouY2FsbCh0aGlzLCAoZnVuY3Rpb24obiwgdCkgewogICAgICAgIHJldHVybiBlLmNhbGwobiwgdCwgbik7CiAgICAgIH0pKSk7CiAgICB9OwogICAgbGV0IGZuID0gL1xTKy9nOwogICAgY24uaGFzQ2xhc3MgPSBmdW5jdGlvbihuKSB7CiAgICAgIHJldHVybiAhIW4gJiYgb24uY2FsbCh0aGlzLCAoZnVuY3Rpb24oZSkgewogICAgICAgIHJldHVybiBjKGUpICYmIGUuY2xhc3NMaXN0LmNvbnRhaW5zKG4pOwogICAgICB9KSk7CiAgICB9LCBjbi5yZW1vdmVBdHRyID0gZnVuY3Rpb24obikgewogICAgICBsZXQgZSA9IGIobik7CiAgICAgIHJldHVybiB0aGlzLmVhY2goKGZ1bmN0aW9uKG4sIHQpIHsKICAgICAgICBjKHQpICYmIGkoZSwgKGZ1bmN0aW9uKG4sIGUpIHsKICAgICAgICAgIHQucmVtb3ZlQXR0cmlidXRlKGUpOwogICAgICAgIH0pKTsKICAgICAgfSkpOwogICAgfSwgY24uYXR0ciA9IGZ1bmN0aW9uKG4sIGUpIHsKICAgICAgaWYgKG4pIHsKICAgICAgICBpZiAocChuKSkgewogICAgICAgICAgaWYgKDIgPiBhcmd1bWVudHMubGVuZ3RoKSB7CiAgICAgICAgICAgIGlmICghdGhpc1swXSB8fCAhYyh0aGlzWzBdKSkgcmV0dXJuOwogICAgICAgICAgICBsZXQg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y5nZXQoKS5jb25jYXQoZG4obiwgZSkuZ2V0KCkpKSk7CiAgICB9OwogICAgbGV0IHVuID0gL14tLS8sIG1uID0ge30sIGhuID0gTy5zdHlsZSwgZ24gPSBbICJ3ZWJraXQiLCAibW96IiwgIm1zIiBdLCBibiA9IHsKICAgICAgYW5pbWF0aW9uSXRlcmF0aW9uQ291bnQ6ICEwLAogICAgICBjb2x1bW5Db3VudDogITAsCiAgICAgIGZsZXhHcm93OiAhMCwKICAgICAgZmxleFNocmluazogITAsCiAgICAgIGZvbnRXZWlnaHQ6ICEwLAogICAgICBncmlkQXJlYTogITAsCiAgICAgIGdyaWRDb2x1bW46ICEwLAogICAgICBncmlkQ29sdW1uRW5kOiAhMCwKICAgICAgZ3JpZENvbHVtblN0YXJ0OiAhMCwKICAgICAgZ3JpZFJvdzogITAsCiAgICAgIGdyaWRSb3dFbmQ6ICEwLAogICAgICBncmlkUm93U3RhcnQ6ICEwLAogICAgICBsaW5lSGVpZ2h0OiAhMCwKICAgICAgb3BhY2l0eTogITAsCiAgICAgIG9yZGVyOiAhMCwKICAgICAgb3JwaGFuczogITAsCiAgICAgIHdpZG93czogITAsCiAgICAgIHpJbmRleDogITAKICAgIH07CiAgICBjbi5jc3MgPSBmdW5jdGlvbihuLCBlKSB7CiAgICAgIGlmIChwKG4pKSB7CiAgICAgICAgbGV0IHQgPSBfKG4pOwogICAgICAgIHJldHVybiBuID0gayhuLCB0KSwgMiA+IGFyZ3VtZW50cy5sZW5ndGggPyB0aGlzWzBdICYmIHgodGhpc1swXSwgbiwgdCkgOiBuID8gKGUgPSBTKG4sIGUsIHQpLAogICAgICAgIHRoaXMuZWFjaCgoZnVuY3Rpb24oaSwgbykgewogICAgICAgICAgYyhvKSAmJiAodCA/IG8uc3R5bGUuc2V0UHJvcGVydHkobiwgZSkgOiBvLnN0eWxlW25dID0gZSk7CiAgICAgICAgfSkpKSA6IHRoaXM7CiAgICAgIH0KICAgICAgZm9yIChsZXQgZSBpbiBuKSB0a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ZnQiKSkgKyB3KHRoaXNbMF0sICJtYXJnaW4iICsgKG4gPyAiQm90dG9tIiA6ICJSaWdodCIpKSA6IDApIDogdm9pZCAwOwogICAgICAgIH07CiAgICAgIH0pKTsKICAgIH0pKSwgaShbICJXaWR0aCIsICJIZWlnaHQiIF0sIChmdW5jdGlvbihuLCBlKSB7CiAgICAgIGxldCB0ID0gZS50b0xvd2VyQ2FzZSgpOwogICAgICBjblt0XSA9IGZ1bmN0aW9uKGkpIHsKICAgICAgICBpZiAoIXRoaXNbMF0pIHJldHVybiBmKGkpID8gdm9pZCAwIDogdGhpczsKICAgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBzKHRoaXNbMF0pID8gdGhpc1swXS5kb2N1bWVudC5kb2N1bWVudEVsZW1lbnRbImNsaWVudCIgKyBlXSA6IGwodGhpc1swXSkgPyAkKHRoaXNbMF0sIGUpIDogdGhpc1swXS5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKVt0XSAtIEModGhpc1swXSwgIW4pOwogICAgICAgIGxldCBvID0gcGFyc2VJbnQoaSwgMTApOwogICAgICAgIHJldHVybiB0aGlzLmVhY2goKGZ1bmN0aW9uKGUsIGkpIHsKICAgICAgICAgIGlmIChjKGkpKSB7CiAgICAgICAgICAgIGxldCBlID0geChpLCAiYm94U2l6aW5nIik7CiAgICAgICAgICAgIGkuc3R5bGVbdF0gPSBTKHQsIG8gKyAoImJvcmRlci1ib3giID09PSBlID8gQyhpLCAhbikgOiAwKSk7CiAgICAgICAgICB9CiAgICAgICAgfSkpOwogICAgICB9OwogICAgfSkpOwogICAgbGV0IHluID0ge307CiAgICBjbi50b2dnbGUgPSBmdW5jdGlvbihuKSB7CiAgICAgIHJldHVybiB0aGlzLmVhY2goKGZ1bmN0aW9uKGUsIHQpIHsKICAgICAgICBpZiAoYyh0KSkgewogICAgICAgICAgKGYobikgPyBBKHQpIDogbikgPyAodC5zdHlsZS5kaXNwbGF5ID0gdC5fX19jZCB8fCAiIiwgQSh0KSAmJiAodC5zdHlsZS5kaXNwbGF5ID0gZnVuY3Rpb24obikgewogICAgICAgICAgICBpZiAoeW5bbl0pIHJldHVybiB5bltuXTsKICAgICAgICAgICAgbGV0IGUgPSBIKG4pOwogICAgICAgICAgICBGLmJvZHkuaW5zZXJ0QmVmb3JlKGUsIG51bGwpOwogICAgICAgICAgICBsZXQgdCA9IHgoZSwgImRpc3BsYXkiKTsKICAgICAgICAgICAgcmV0dXJuIEYuYm9keS5yZW1vdmVDaGlsZChlKSwgeW5bbl0gPSAibm9uZSIgPT09IHQgPyAiYmxvY2siIDogdDsKICAgICAgICAgIH0odC50YWdOYW1lKSkpIDogKHQuX19fY2QgPSB4KHQsICJkaXNwbGF5IiksIHQuc3R5bGUuZGlzcGxheSA9ICJub25lIik7CiAgICAgICAgfQogICAgICB9KSk7CiAgICB9LCBjbi5oaWRlID0gZnVuY3Rpb24oKSB7CiAgICAgIHJldHVybiB0aGlzLnRvZ2dsZSghMSk7CiAgICB9LCBjbi5zaG93ID0gZnVuY3Rpb24oKSB7CiAgICAgIHJldHVybiB0aGlzLnRvZ2dsZSghMCk7CiAgICB9OwogICAgbGV0IHhuID0gIl9fX2NlIiwgd24gPSAiLiIsIF9uID0gewogICAgICBmb2N1czogImZvY3VzaW4iLAogICAgICBibHVyOiAiZm9jdXNvdXQiCiAgICB9LCBrbiA9IHsKICAgICAgbW91c2VlbnRlcjogIm1vdXNlb3ZlciIsCiAgICAgIG1vdXNlbGVhdmU6ICJtb3VzZW91dCIKICAgIH07CiAgICBjbi5vZmYgPSBmdW5jdGlvbihuLCBlLCB0KSB7CiAgICAgIGxldCBvID0gdGhpczsKICAgICAgaWYgKGYobikpIHRoaXMuZWFjaCgoZnVuY3Rpb24obiwgZSkgewogICAgICAgIChjKGUpIHx8IGwoZSkgfHwgcyhlKSkgJiYgUChlKTsKICAgICAgfSkpOyBlbHNlIGlmIChwKG4pKSBkKGUpICYmICh0ID0gZSwgZSA9ICIiKSwgaShiK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BlICE9PSBwIHx8IHMudGFyZ2V0WyJfX19pIiArIHBdICYmIChkZWxldGUgcy50YXJnZXRbIl9fX2kiICsgcF0sCiAgICAgICAgICAgICAgcy5zdG9wSW1tZWRpYXRlUHJvcGFnYXRpb24oKSwgMSkpKSByZXR1cm47CiAgICAgICAgICAgICAgaWYgKHMubmFtZXNwYWNlICYmICFVKGYsIHMubmFtZXNwYWNlLnNwbGl0KHduKSkpIHJldHVybjsKICAgICAgICAgICAgICBsZXQgbCA9IGk7CiAgICAgICAgICAgICAgaWYgKGUpIHsKICAgICAgICAgICAgICAgIGxldCBuID0gcy50YXJnZXQ7CiAgICAgICAgICAgICAgICBmb3IgKDshYShuLCBlKTsgKSB7CiAgICAgICAgICAgICAgICAgIGlmIChuID09PSBpKSByZXR1cm47CiAgICAgICAgICAgICAgICAgIGlmIChuID0gbi5wYXJlbnROb2RlLCAhbikgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbCA9IG4sIHMuX19fY2QgPSAhMDsKICAgICAgICAgICAgICB9IGVsc2UgaWYgKGcgJiYgcy5fX19vdCA9PT0gcCAmJiBpICE9PSBzLnRhcmdldCAmJiBpLmNvbnRhaW5zKHMudGFyZ2V0KSkgcmV0dXJuOwogICAgICAgICAgICAgIHMuX19fY2QgJiYgT2JqZWN0LmRlZmluZVByb3BlcnR5KHMsICJjdXJyZW50VGFyZ2V0IiwgewogICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiAhMCwKICAgICAgICAgICAgICAgIGdldDogZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgIHJldHVybiBsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0pLCBPYmplY3QuZGVmaW5lUHJvcGVydHkocywgImRhdGEiLCB7CiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6ICEwLAogICAgICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuIHQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgbGV0IGMgPSBvLmNhbGwobCwgcywgcy5fX190ZCk7CiAgICAgICAgICAgICAgciAmJiBQKGksIHUsIGYsIGUsIG4pLCAhMSA9PT0gYyAmJiAocy5wcmV2ZW50RGVmYXVsdCgpLCBzLnN0b3BQcm9wYWdhdGlvbigpKTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgbi5ndWlkID0gby5ndWlkID0gby5ndWlkIHx8IGRuLmd1aWQrKywgeihpLCB1LCBmLCBlLCBuKSwgaCAmJiB6KGksIHAsIGYsIGUsIG4pOwogICAgICAgICAgfQogICAgICAgIH0pKTsKICAgICAgfSkpLCB0aGlzKSA6IHRoaXM7CiAgICB9LCBjbi5vbmUgPSBmdW5jdGlvbihuLCBlLCB0LCBpKSB7CiAgICAgIHJldHVybiB0aGlzLm9uKG4sIGUsIHQsIGksICEwKTsKICAgIH0sIGNuLnJlYWR5ID0gZnVuY3Rpb24obikgewogICAgICBsZXQgZSA9IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiBzZXRUaW1lb3V0KG4sIDAsIGRuKTsKICAgICAgfTsKICAgICAgcmV0dXJuICJsb2FkaW5nIiA9PT0gRi5yZWFkeVN0YXRlID8gRi5hZGRFdmVudExpc3RlbmVyKCJET01Db250ZW50TG9hZGVkIiwgZSkgOiBlKCksCiAgICAgIHRoaXM7CiAgICB9LCBjbi50cmlnZ2VyID0gZnVuY3Rpb24obiwgZSkgewogICAgICBpZiAocChuKSkgewogICAgICAgIGxldCBlID0gTShuKSwgdCA9IGVbMF0sIGkgPSBlWzFdLCBvID0gVCh0KTsKICAgICAgICBpZiAoIW8pIHJldHVybiB0aGlzOwogICAgICAgIGxldCBhID0gL14obW91c2V8cG9pbnRlcnxjb250ZXh0bWVudXxkcmFnfGRyb3B8Y2xpY2t8ZGJsY2xpY2spL2kudGVzdChvKSA/ICJNb3VzZUV2ZW50cyIgOiAiSFRNTEV2ZW50cyI7CiAgICAgICAgKG4gPSBGLmNyZWF0ZUV2ZW50KGEpKS5pbml0RXZlbnQobywgITAsICEwKSwgbi5uYW1lc3BhY2UgPSBpLmpvaW4od24pLCBuLl9fX290ID0gdDsKICAgICAgfQogICAgICBuLl9fX3RkID0gZTsKICAgICAgbGV0IHQgPSBuLl9fX290IGluIF9uOwogICAgICByZXR1cm4gdGhpcy5lYWNoKChmdW5jdGlvbihlLCBpKSB7CiAgICAgICAgdCAmJiBkKGlbbi5fX19vdF0pICYmIChpWyJfX19pIiArIG4uX19fb3RdID0gITAsIGlbbi5fX19vdF0oKSksIGkuZGlzcGF0Y2hFdmVudChuKTsKICAgICAgfSkpOwogICAgfTsKICAgIGxldCBTbiA9IC8lMjAvZywgam4gPSAvXHI/XG4vZywgSW4gPSAvcmFkaW98Y2hlY2tib3gvaTsKICAgIGNuLnNlcmlhbGl6ZSA9IGZ1bmN0aW9uKCkgewogICAgICBsZXQgbiA9ICIiOwogICAgICByZXR1cm4gdGhpcy5lYWNoKChmdW5jdGlvbihlLCB0KSB7CiAgICAgICAgaSh0LmVsZW1lbnRzIHx8IFsgdCBdLCAoZnVuY3Rpb24oZSwgdCkgewogICAgICAgICAgaWYgKCEodC5kaXNhYmxlZCB8fCAhdC5uYW1lIHx8ICJGSUVMRFNFVCIgPT09IHQudGFnTmFtZSB8fCAvZmlsZXxyZXNldHxzdWJtaXR8YnV0dG9ufGltYWdlL2kudGVzdCh0LnR5cGUpIHx8IEluLnRlc3QodC50eXBlKSAmJiAhdC5jaGVja2VkKSkgewogICAgICAgICAgICBsZXQgZSA9IEUodCk7CiAgICAgICAgICAgIGlmICghZihlKSkgewogICAgICAgICAgICAgIGkoSihlKSA/IGUgOiBbIGUgXSwgKGZ1bmN0aW9uKGUsIGkpIHsKICAgICAgICAgICAgICAgIG4gKz0gZnVuY3Rpb24obiwgZSkgewogICAgICAgICAgICAgICAgICByZXR1cm4gIiYiICsgZW5jb2RlVVJJQ29tcG9uZW50KG4pICsgIj0iICsgZW5jb2RlVVJJQ29tcG9uZW50KGUucmVwbGFjZShqbiwgIlxyXG4iKSkucmVwbGFjZShTbiwgIisiKTsKICAgICAgICAgICAgICAgIH0odC5uYW1lLCBpKTsKICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9KSk7CiAgICAgIH0pKSwgbi5zbGljZSgxKTsKICAgIH0sIGNuLnZhbCA9IGZ1bmN0aW9uKG4pIHsKICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPyB0aGlzLmVhY2goKGZ1bmN0aW9uKGUsIHQpIHsKICAgICAgICBsZXQgbyA9IHQubXVsdGlwbGUgJiYgdC5vcHRpb25zOwogICAgICAgIGlmIChvIHx8IEluLnRlc3QodC50eXBlKSkgewogICAgICAgICAgbGV0IGUgPSBKKG4pID8gbm4uY2FsbChuLCBTdHJpbmcpIDogdShuKSA/IFtdIDogWyBuICsgIiIgXTsKICAgICAgICAgIG8gPyBpKHQub3B0aW9ucywgKGZ1bmN0aW9uKG4sIHQpIHsKICAgICAgICAgICAgdC5zZWxlY3RlZCA9IDAgPD0gZS5pbmRleE9mKHQudmFsdWUpOwogICAgICAgICAgfSksICEwKSA6IHQuY2hlY2tlZCA9IDAgPD0gZS5pbmRleE9mKHQudmFsdWUpOwogICAgICAgIH0gZWxzZSB0LnZhbHVlID0gZihuKSB8fCB1KG4pID8gIiIgOiBuOwogICAgICB9KSkgOiB0aGlzWzBdICYmIEUodGhpc1swXSk7CiAgICB9LCBjbi5jbG9uZSA9IGZ1bmN0aW9uKCkgewogICAgICByZXR1cm4gdGhpcy5tYXAoKGZ1bmN0aW9uKG4sIGUpIHsKICAgICAgICByZXR1cm4gZS5jbG9uZU5vZGUoITApOwogICAgICB9KSk7CiAgICB9LCBjbi5kZXRhY2ggPSBmdW5jdGlvbihuKSB7CiAgICAgIHJldHVybiBnKHRoaXMsIG4pLmVhY2goKGZ1bmN0aW9uKG4sIGUp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k7CiAgICB9LCBjbi51bndyYXAgPSBmdW5jdGlvbigpIHsKICAgICAgcmV0dXJuIHRoaXMucGFyZW50KCkuZWFjaCgoZnVuY3Rpb24obiwgZSkgewogICAgICAgIGlmICgiQk9EWSIgIT09IGUudGFnTmFtZSkgewogICAgICAgICAgbGV0IG4gPSBkbihlKTsKICAgICAgICAgIG4ucmVwbGFjZVdpdGgobi5jaGlsZHJlbigpKTsKICAgICAgICB9CiAgICAgIH0pKSwgdGhpczsKICAgIH0sIGNuLm9mZnNldCA9IGZ1bmN0aW9uKCkgewogICAgICBsZXQgbiA9IHRoaXNbMF07CiAgICAgIGlmIChuKSB7CiAgICAgICAgbGV0IGUgPSBuLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpOwogICAgICAgIHJldHVybiB7CiAgICAgICAgICB0b3A6IGUudG9wICsgTC5wYWdlWU9mZnNldCwKICAgICAgICAgIGxlZnQ6IGUubGVmdCArIEwucGFnZVhPZmZzZXQKICAgICAgICB9OwogICAgICB9CiAgICB9LCBjbi5vZmZzZXRQYXJlbnQgPSBmdW5jdGlvbigpIHsKICAgICAgcmV0dXJuIHRoaXMubWFwKChmdW5jdGlvbihuLCBlKSB7CiAgICAgICAgbGV0IHQgPSBlLm9mZnNldFBhcmVudDsKICAgICAgICBmb3IgKDt0ICYmICJzdGF0aWMiID09PSB4KHQsICJwb3NpdGlvbiIpOyApIHQgPSB0Lm9mZnNldFBhcmVudDsKICAgICAgICByZXR1cm4gdCB8fCBHOwogICAgICB9KSk7CiAgICB9LCBjbi5wb3NpdGlvbiA9IGZ1bmN0aW9uKCkgewogICAgICBsZXQgbiA9IHRoaXNbMF07CiAgICAgIGlmIChuKSB7CiAgICAgICAgbGV0IGUgPSAiZml4ZWQiID09PSB4KG4sICJwb3NpdGlvbiIpLCB0ID0gZSA/IG4uZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkgOiB0aGlzLm9mZnNldCgpOwogICAgICAgIGlmICghZSkgewogICAgICAgICAgbGV0IGUgPSBuLm93bmVyRG9jdW1lbnQsIGkgPSBuLm9mZnNldFBhcmVudCB8fCBlLmRvY3VtZW50RWxlbWVudDsKICAgICAgICAgIGZvciAoOyhpID09PSBlLmJvZHkgfHwgaSA9PT0gZS5kb2N1bWVudEVsZW1lbnQpICYmICJzdGF0aWMiID09PSB4KGksICJwb3NpdGlvbiIpOyApIGkgPSBpLnBhcmVudE5vZGU7CiAgICAgICAgICBpZiAoaSAhPT0gbiAmJiBjKGkpKSB7CiAgICAgICAgICAgIGxldCBuID0gZG4oaSkub2Zmc2V0KCk7CiAgICAgICAgICAgIHQudG9wIC09IG4udG9wICsgdyhpLCAiYm9yZGVyVG9wV2lkdGgiKSwgdC5sZWZ0IC09IG4ubGVmdCArIHcoaSwgImJvcmRlckxlZnRXaWR0aCIpOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gewogICAgICAgICAgdG9wOiB0LnRvcCAtIHcobiwgIm1hcmdpblRvcCIpLAogICAgICAgICAgbGVmdDogdC5sZWZ0IC0gdyhuLCAibWFyZ2luTGVmdCIpCiAgICAgICAgfTsKICAgICAgfQogICAgfSwgY24uY2hpbGRyZW4gPSBmdW5jdGlvbihuKSB7CiAgICAgIHJldHVybiBnKGRuKHkodih0aGlzLCAoZnVuY3Rpb24obikgewogICAgICAgIHJldHVybiBuLmNoaWxkcmVuOwogICAgICB9KSkpKSwgbik7CiAgICB9LCBjbi5jb250ZW50cyA9IGZ1bmN0aW9uKCkgewogICAgICByZXR1cm4gZG4oeSh2KHRoaXMsIChmdW5jdGlvbihuKSB7CiAgICAgICAgcmV0dXJuICJJRlJBTUUiID09PSBuLnRhZ05hbWUgPyBbIG4uY29udGVudERvY3VtZW50IF0gOiAiVEVNUExBVEUiID09PSBuLnRhZ05hbWUgPyBuLmNvbnRlbnQuY2hpbGROb2RlcyA6IG4uY2hpbGROb2RlczsKICAgICAgfSkpKSk7CiAgICB9LCBjbi5maW5kID0gZnVuY3Rpb24obikgewogICAgICBy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bmN0aW9uKGUsIHQpIHsKICAgICAgICByZXR1cm4gdC5jb250YWlucyhuKTsKICAgICAgfTsKICAgICAgcmV0dXJuIHRoaXMuZmlsdGVyKHQpOwogICAgfSwgY24uaXMgPSBmdW5jdGlvbihuKSB7CiAgICAgIGxldCBlID0gaChuKTsKICAgICAgcmV0dXJuIG9uLmNhbGwodGhpcywgKGZ1bmN0aW9uKG4sIHQpIHsKICAgICAgICByZXR1cm4gZS5jYWxsKG4sIHQsIG4pOwogICAgICB9KSk7CiAgICB9LCBjbi5uZXh0ID0gZnVuY3Rpb24obiwgZSwgdCkgewogICAgICByZXR1cm4gZyhkbih5KHYodGhpcywgIm5leHRFbGVtZW50U2libGluZyIsIGUsIHQpKSksIG4pOwogICAgfSwgY24ubmV4dEFsbCA9IGZ1bmN0aW9uKG4pIHsKICAgICAgcmV0dXJuIHRoaXMubmV4dChuLCAhMCk7CiAgICB9LCBjbi5uZXh0VW50aWwgPSBmdW5jdGlvbihuLCBlKSB7CiAgICAgIHJldHVybiB0aGlzLm5leHQoZSwgITAsIG4pOwogICAgfSwgY24ubm90ID0gZnVuY3Rpb24obikgewogICAgICBsZXQgZSA9IGgobik7CiAgICAgIHJldHVybiB0aGlzLmZpbHRlcigoZnVuY3Rpb24odCwgaSkgewogICAgICAgIHJldHVybiAoIXAobikgfHwgYyhpKSkgJiYgIWUuY2FsbChpLCB0LCBpKTsKICAgICAgfSkpOwogICAgfSwgY24ucGFyZW50ID0gZnVuY3Rpb24obikgewogICAgICByZXR1cm4gZyhkbih5KHYodGhpcywgInBhcmVudE5vZGUiKSkpLCBuKTsKICAgIH0sIGNuLmluZGV4ID0gZnVuY3Rpb24obikgewogICAgICBsZXQgZSA9IG4gPyBkbihuKVswXSA6IHRoaXNbMF0sIHQgPSBuID8gdGhpcyA6IGRuKGUpLnBhcmVudCgpLmNoaWxkcmVuKCk7CiAgICAgIHJldHVybiBZLmNhbGwodCwgZSk7CiAgICB9LCBjbi5jbG9zZXN0ID0gZnVuY3Rpb24obikgewogICAgICBsZXQgZSA9IHRoaXMuZmlsdGVyKG4pOwogICAgICBpZiAoZS5sZW5ndGgpIHJldHVybiBlOwogICAgICBsZXQgdCA9IHRoaXMucGFyZW50KCk7CiAgICAgIHJldHVybiB0Lmxlbmd0aCA/IHQuY2xvc2VzdChuKSA6IGU7CiAgICB9LCBjbi5wYXJlbnRzID0gZnVuY3Rpb24obiwgZSkgewogICAgICByZXR1cm4gZyhkbih5KHYodGhpcywgInBhcmVudEVsZW1lbnQiLCAhMCwgZSkpKSwgbik7CiAgICB9LCBjbi5wYXJlbnRzVW50aWwgPSBmdW5jdGlvbihuLCBlKSB7CiAgICAgIHJldHVybiB0aGlzLnBhcmVudHMoZSwgbik7CiAgICB9LCBjbi5wcmV2ID0gZnVuY3Rpb24obiwgZSwgdCkgewogICAgICByZXR1cm4gZyhkbih5KHYodGhpcywgInByZXZpb3VzRWxlbWVudFNpYmxpbmciLCBlLCB0KSkpLCBuKTsKICAgIH0sIGNuLnByZXZBbGwgPSBmdW5jdGlvbihuKSB7CiAgICAgIHJldHVybiB0aGlzLnByZXYobiwgITApOwogICAgfSwgY24ucHJldlVudGlsID0gZnVuY3Rpb24obiwgZSkgewogICAgICByZXR1cm4gdGhpcy5wcmV2KGUsICEwLCBuKTsKICAgIH0sIGNuLnNpYmxpbmdzID0gZnVuY3Rpb24obikgewogICAgICByZXR1cm4gZyhkbih5KHYodGhpcywgKGZ1bmN0aW9uKG4pIHsKICAgICAgICByZXR1cm4gZG4obikucGFyZW50KCkuY2hpbGRyZW4oKS5ub3Qobik7CiAgICAgIH0pKSkpLCBuKTsKICAgIH0sIGRuOwogIH0KICBmdW5jdGlvbiB3YWl0VG9SdW4obiwgZSkgewogICAgbGV0IHQgPSAyIDwgYXJndW1lbnRzLmxlbmd0aCAmJiB2b2lkIDAgIT09IGFyZ3VtZW50c1syXSA/IGFyZ3VtZW50c1syXSA6IDA7CiAgICBjb25zdCBpID0gbiBpbnN0YW5jZW9mIEZ1bmN0aW9uID8gbigpIDogMCA8ICQobikubGVuZ3RoOwogICAgcmV0dXJuIGkgPyB2b2lkIChlIGluc3RhbmNlb2YgRnVuY3Rpb24gJiYgZShpKSkgOiB2b2lkICgxMDAgPCB0IHx8IHNldFRpbWVvdXQoKGZ1bmN0aW9uKCkgewogICAgICB3YWl0VG9SdW4obiwgZSwgdCArIDEpOwogICAgfSksIDEwMCkpOwogIH0KICBmdW5jdGlvbiAkJChuLCBlKSB7CiAgICByZXR1cm4gbmV3IFByb21pc2UoKGZ1bmN0aW9uKHQpIHsKICAgICAgd2FpdFRvUnVuKG4sIChmdW5jdGlvbihuKSB7CiAgICAgICAgZSBpbnN0YW5jZW9mIEZ1bmN0aW9uICYmIGUobiksIHQobik7CiAgICAgIH0pKTsKICAgIH0pKTsKICB9CiAgZnVuY3Rpb24gZW1pdHRlcihuKSB7CiAgICByZXR1cm4gbiA9IG4gfHwgT2JqZWN0LmNyZWF0ZShudWxsKSwgewogICAgICBvbihlLCB0KSB7CiAgICAgICAgKG5bZV0gfHwgKG5bZV0gPSBbXSkpLnB1c2godCk7CiAgICAgIH0sCiAgICAgIG9mZihlLCB0KSB7CiAgICAgICAgbltlXSAmJiBuW2VdLnNwbGljZShuW2VdLmluZGV4T2YodCkgPj4+IDAsIDEpOwogICAgICB9LAogICAgICBlbWl0KGUsIHQpIHsKICAgICAgICAobltlXSB8fCBbXSkuc2xpY2UoKS5tYXAoKGZ1bmN0aW9uKG4pIHsKICAgICAgICAgIG4odCk7CiAgICAgICAgfSkpLCAoblsiKiJdIHx8IFtdKS5zbGljZSgpLm1hcCgoZnVuY3Rpb24obikgewogICAgICAgICAgbihlLCB0KTsKICAgICAgICB9KSk7CiAgICAgIH0KICAgIH07CiAgfQogIGZ1bmN0aW9uIGdldENkbkltYWdlVXJsKG4pIHsKICAgIHJldHVybiAiaHR0cHM6Ly9wLnBzdGF0cC5jb20vb3JpZ2luLyIgKyBuOwogIH0KICBmdW5jdGlvbiB1dWlkKCkgewog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LSAxICYmIChlID0gJChpKS5wb3NpdGlvbigpLnRvcCkgOiB0IHx8IGUgIT09ICQoaSkucG9zaXRpb24oKS50b3AgPyAodCA9ICEwLAogICAgICAkKGkpLnByZXYoIiIpLmFkZENsYXNzKCJpcy1jb2xsYXBzZSIpKSA6ICF0ICYmICQoaSkuaGFzQ2xhc3MoIm8tLWNvbGxhcHNlIikgJiYgJChpKS5hZGRDbGFzcygiaXMtY29sbGFwc2UiKTsKICAgIH0pKSwgJChuKS5wYXJlbnQoKS5hZGRDbGFzcygiby0tY29sbGFwc2UtYm94IiksICQoIi5vLS1jb2xsYXBzZSIpLm9mZigiY2xpY2siKS5vbigiY2xpY2siLCAoZnVuY3Rpb24oKSB7CiAgICAgICQodGhpcykucGFyZW50KCkudG9nZ2xlQ2xhc3MoImlzLW9wZW4iKTsKICAgIH0pKTsKICB9CiAgZnVuY3Rpb24gZml4TTN1OFBsYXlpbmcoKSB7CiAgICBmdW5jdGlvbiBuKG4pIHsKICAgICAgbi5mcm9tID0gSHJlZiwgbi5vcmlnaW4gPSBIcmVmLCBuLnVybCA9IGksIGlzTm90VG9wICYmIHdpbmRvdy5wYXJlbnQucG9zdE1lc3NhZ2UoT2JqZWN0LmFzc2lnbih7fSwgbiwgewogICAgICAgIF9pZDogTUVTU0FHRV9JRCwKICAgICAgICBhY3Rpb246ICJsb2ciLAogICAgICAgIHBhcmVudDogITAKICAgICAgfSksICIqIik7CiAgICB9CiAgICBjb25zdCBlID0gRGF0ZS5ub3coKTsKICAgIGxldCB0LCBpOwogICAgY29uc3QgbyA9IHNldEludGVydmFsKChmdW5jdGlvbigpIHsKICAgICAgY29uc3QgYSA9IERhdGUubm93KCkgLSBlOwogICAgICBpID0gIiIsIHQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCJ2aWRlb1tzcmNdIiksIHQgJiYgKGkgPSB0LnNyYyksIC8oXC5tM3U4fFwvbTN1OHBsYXkpW15cL10qJC8udGVzdChpKSA/IChjbGVhckludGVydmFsKG8pLAogICAgICBzZXRUaW1lb3V0KChhc3luYyBmdW5jdGlvbigpIHsKICAgICAgICBpZiAoMCA9PT0gdC5yZWFkeVN0YXRlKSB7CiAgICAgICAgICBsZXQgZSA9IGdldEdsb2JhbCgiSGxzIik7CiAgICAgICAgICBpZiAoZSB8fCAoYXdhaXQgYWRkSnMoIi9obHMuanMvMC4xMy4yL2hscy5taW4uanMiKSwgZSA9IGdldEdsb2JhbCgiSGxzIikpLCBlLmlzU3VwcG9ydGVkKCkpIHsKICAgICAgICAgICAgdC5wYXVzZSgpOwogICAgICAgICAgICBjb25zdCBvID0gbmV3IGU7CiAgICAgICAgICAgIG8ubG9hZFNvdXJjZShpKSwgby5hdHRhY2hNZWRpYSh0KSwgby5vbihlLkV2ZW50cy5NQU5JRkVTVF9QQVJTRUQsIChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICB0LnBsYXkoKTsKICAgICAgICAgICAgfSkpLCBuKHsKICAgICAgICAgICAgICB0ZXh0OiAi4pyUIEZpeCBtM3U4IHBsYXkiCiAgICAgICAgICAgIH0pOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfSksIDFlMykpIDogYSA+PSAxNWUzICYmIChjbGVhckludGVydmFsKG8pLCBuKHsKICAgICAgICB0ZXh0OiAiw5cgRml4IG0zdTggcGxheSBmYWlsZWQiCiAgICAgIH0pKTsKICAgIH0pLCAxMDApOwogIH0KICBmdW5jdGlvbiBpc1ZhbGlkVmlkZW9VcmwobikgewogICAgcmV0dXJuIGlzVmFsaWRVcmxSZWdleC50ZXN0KG4pICYmIGlzVmlkZW9VcmxSZWdleC50ZXN0KG4pICYmICFpc0ludmFsaWRTbmlmZlVybFJlZ2V4LnRlc3Qobik7CiAgfQogIGZ1bmN0aW9uIHRvU2VhcmNoVXJsKG4sIGUpIHsKICAgIHJldHVybiBuLmluY2x1ZGVzKCIqKiIpID8gbi5yZXBsYWNlKCIqKiIsIGUpIDogL21vdmllXC5kb3ViYW5cLmNvbVwvdGF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iA9IERhdGUubm93KCkgLSB0OwogICAgICAgICAgICBlLm11dGVkID0gITAsIGUudm9sdW1lID0gMCwgZS5wYXVzZSgpLCBuID4gNGUzICYmIGNsZWFySW50ZXJ2YWwoaSk7CiAgICAgICAgICB9KSwgNjApOwogICAgICAgIH0pKTsKICAgICAgICBjb25zdCBuID0gJCgidmlkZW8gc291cmNlW3NyY10iKS5lcSgwKS5hdHRyKCJzcmMiKSB8fCAkKCJ2aWRlb1tzcmNdIikuZXEoMCkuYXR0cigic3JjIikgfHwgIiI7CiAgICAgICAgcmV0dXJuIG4gJiYgJCgidmlkZW8sIGF1ZGlvIikucmVtb3ZlKCksIC9eXC9bXlwvXS8udGVzdChuKSAmJiAobiA9IGxvY2F0aW9uLm9yaWdpbiArIG4pLAogICAgICAgIHZvaWQgKGlzVmFsaWRWaWRlb1VybChuKSA/IHdpbmRvdy5wYXJlbnQucG9zdE1lc3NhZ2UoewogICAgICAgICAgcGFnZUluZm86IHBhZ2VJbmZvLAogICAgICAgICAgdXNlZFRpbWU6IHQsCiAgICAgICAgICBfaWQ6IE1FU1NBR0VfSUQsCiAgICAgICAgICBhY3Rpb246ICJwbGF5LnZpZGVvIiwKICAgICAgICAgIGZyb206IGxvY2F0aW9uLmhyZWYsCiAgICAgICAgICBvcmlnaW46IGxvY2F0aW9uLmhyZWYsCiAgICAgICAgICB1cmw6IG4udHJpbSgpLAogICAgICAgICAgcGFyZW50OiAhMAogICAgICAgIH0sICIqIikgOiAvXmJsb2I6Ly50ZXN0KG4pID8gd2luZG93LnBhcmVudC5wb3N0TWVzc2FnZSh7CiAgICAgICAgICBwYWdlSW5mbzogcGFnZUluZm8sCiAgICAgICAgICB1c2VkVGltZTogdCwKICAgICAgICAgIF9pZDogTUVTU0FHRV9JRCwKICAgICAgICAgIGFjdGlvbjogInNuaWZmLmJsb2IiLAogICAgICAgICAgZnJvbTogbG9jYXRpb24uaHJlZiwKICAgICAgICAgIG9yaWdpbjogbG9jYXRpb24uaHJlZiwKICAgICAgICAgIHVybDogbiwKICAgICAgICAgIHBhcmVudDogITAKICAgICAgICB9LCAiKiIpIDogd2luZG93LnBhcmVudC5wb3N0TWVzc2FnZSh7CiAgICAgICAgICBwYWdlSW5mbzogcGFnZUluZm8sCiAgICAgICAgICB1c2VkVGltZTogdCwKICAgICAgICAgIHRleHQ6ICJOT1QgTUFUQ0ggVklERU8gVVJMIiwKICAgICAgICAgIF9pZDogTUVTU0FHRV9JRCwKICAgICAgICAgIGFjdGlvbjogImxvZyIsCiAgICAgICAgICBmcm9tOiBsb2NhdGlvbi5ocmVmLAogICAgICAgICAgb3JpZ2luOiBsb2NhdGlvbi5ocmVmLAogICAgICAgICAgdXJsOiBuLAogICAgICAgICAgcGFyZW50OiAhMAogICAgICAgIH0sICIqIikpOwogICAgICB9CiAgICAgIGNvbnN0IGkgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCJpZnJhbWVbc3JjXSIpOwogICAgICBpZiAoaSkgewogICAgICAgIGNvbnN0IG4gPSBpLnNjciwgZSA9IGRlY29kZVVSSUNvbXBvbmVudChuKS5tYXRjaCgvPShodHRwW14mPV0rXC4obTN1OHxtcDQpKS8pOwogICAgICAgICgvZHBsYXllci8udGVzdChuKSB8fCBpc1ZpZGVvVXJsUmVnZXgudGVzdChuKSkgJiYgd2luZG93LnBhcmVudC5wb3N0TWVzc2FnZSh7CiAgICAgICAgICBwYWdlSW5mbzogcGFnZUluZm8sCiAgICAgICAgICB1c2VkVGltZTogdCwKICAgICAgICAgIHRleHQ6ICJpZnJhbWUgcGxheWVyIHVybCIsCiAgICAgICAgICBfaWQ6IE1FU1NBR0VfSUQsCiAgICAgICAgICBhY3Rpb246ICJsb2ciLAogICAgICAgICAgZnJvbTogbG9jYXRpb24uaHJlZiwKICAgICAgICAgIG9yaWdpbjogbG9jYXRpb24uaHJlZiwKICAgICAgICAgIHVybDogZSA/IGVbMV0gOiBuLAogICAgICAgICAgaXNNYXRjaDogZSAmJiBpc1ZhbGlkVmlkZW9VcmwoZVsxXSksCiAgICAgICAgICBwYXJlbnQ6ICEwCiAgICAgICAgfSwgIioiKSwgZSAmJiBpc1ZhbGlkVmlkZW9VcmwoZVsxXSkgJiYgKCQoImlmcmFtZSIpLnJlbW92ZSgpLCB3aW5kb3cucGFyZW50LnBvc3RNZXNzYWdlKHsKICAgICAgICAgIHBhZ2VJbmZvOiBwYWdlSW5mbywKICAgICAgICAgIHVzZWRUaW1lOiB0LAogICAgICAgICAgX2lkOiBNRVNTQUdFX0lELAogICAgICAgICAgYWN0aW9uOiAicGxheS52aWRlbyIsCiAgICAgICAgICBmcm9tOiBsb2NhdGlvbi5ocmVmLAogICAgICAgICAgb3JpZ2luOiBsb2NhdGlvbi5ocmVmLAogICAgICAgICAgdXJsOiBlWzFdLnRyaW0oKSwKICAgICAgICAgIHBhcmVudDogITAKICAgICAgICB9LCAiKiIpKTsKICAgICAgfQogICAgICBpZiAoNGUzIDw9IHQgJiYgaSkgcmV0dXJuIHZvaWQgY2xlYXJJbnRlcnZhbChlKTsKICAgICAgY29uc3QgbyA9IDAgPCAkKCJ2aWRlbyIpLmxlbmd0aDsKICAgICAgKHQgPj0gM2U0IHx8IDJlMyA8PSB0ICYmIG8pICYmIChjbGVhckludGVydmFsKGUpLCB3aW5kb3cucGFyZW50LnBvc3RNZXNzYWdlKHsKICAgICAgICBwYWdlSW5mbzogcGFnZUluZm8sCiAgICAgICAgdXNlZFRpbWU6IHQsCiAgICAgICAgaGFzVmlkZW86IG8sCiAgICAgICAgaGFzSWZyYW1lOiAhIWksCiAgICAgICAgX2lkOiBNRVNTQUdFX0lELAogICAgICAgIGFjdGlvbjogInNuaWZmLmZhaWwiLAogICAgICAgIGZyb206IGxvY2F0aW9uLmhyZWYsCiAgICAgICAgb3JpZ2luOiBsb2NhdGlvbi5ocmVmLAogICAgICAgIHBhcmVudDogITAKICAgICAgfSwgIioiKSk7CiAgICB9KSwgMTAwKTsKICB9CiAgbGV0IEhyZWYgPSBsb2NhdGlvbi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KCIveC9jb3ZlciIpID8gbi5yZXBsYWNlKC9cLmh0bWwuKi8sICIuaHRtbCIpIDogbjsKICAgICAgfSwKICAgICAgYXN5bmMganMoKSB7CiAgICAgICAgaWYgKHNraXBBZFZpZGVvV3JhcHBlcigoZnVuY3Rpb24oKSB7CiAgICAgICAgICBpc01vYmlsZSA/IHNraXBBZFZpZGVvKCIudHhwX3ZpZGVvX2NvbnRhaW5lciB2aWRlb1tzcmNdIiwgIS92bGl2ZS5xcXZpZGVvLnRjLnFxLmNvbS8udGVzdCh2aWRlby5zcmMpKSA6IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi50eHBfYWQgdmlkZW9bc3JjXSIpICYmICgkKCIudHhwX2FkIHZpZGVvW3NyY10iKS5lYWNoKChmdW5jdGlvbihuLCBlKSB7CiAgICAgICAgICAgIHNraXBBZFZpZGVvKGUpOwogICAgICAgICAgfSkpLCB0b2dnbGVTa2lwQWRUaXAoIi50eHBfYWQiKSk7CiAgICAgICAgfSkpLCBpc01vYmlsZSkgewogICAgICAgICAgbGV0IG4gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIjcGxheV9zeW5jIiksIGUgPSBuICYmIG4udmFsdWU7CiAgICAgICAgICBpZiAoIWUpIHsKICAgICAgICAgICAgY29uc3QgbiA9IChhd2FpdCBmZXRjaChsb2NhdGlvbi5ocmVmKS50aGVuKChmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgcmV0dXJuIG4udGV4dCgpOwogICAgICAgICAgICB9KSkpLm1hdGNoKC9pZD1bJyJdcGxheV9zeW5jLis/dmFsdWU9WyciXShbXiciXSspLyk7CiAgICAgICAgICAgIG4gJiYgKGUgPSBuWzFdKTsKICAgICAgICAgIH0KICAgICAgICAgIGUgJiYgKGUgPSBKU09OLnBhcnNlKGRlY29kZVVSSUNvbXBvbmVudChlKSksIGNvbnNvbGUuY29uc29sZS5sb2coZSkpOwogICAgICAgIH0KICAgICAgfQogICAgfSwKICAgIGhpZGU6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JCgiLnF5LWVwaXNvZGUtbnVtIC5zZWxlY3QtaXRlbS5zZWxlY3RlZCAuc2VsZWN0LWxpbmsiKS50ZXh0KCkgfHwgMCk7CiAgICAgICAgICAgIGlmIChlICYmIGUgIT09IHQpIHsKICAgICAgICAgICAgICB0ID0gZTsKICAgICAgICAgICAgICBsZXQgaSA9IG5bdCAtIDFdOwogICAgICAgICAgICAgIGlmIChpKSB7CiAgICAgICAgICAgICAgICBsZXQgbiA9IGkucGxheVVybC5yZXBsYWNlKC9odHRwcz86LywgbG9jYXRpb24ucHJvdG9jb2wpOwogICAgICAgICAgICAgICAgaWYgKG4gIT09IG9vUGxheVVybCkgewogICAgICAgICAgICAgICAgICBjb25zdCBlID0gb29QbGF5VXJsIHx8IGxvY2F0aW9uLmhyZWY7CiAgICAgICAgICAgICAgICAgIG9vUGxheVVybCA9IG47CiAgICAgICAgICAgICAgICAgIGNvbnN0IHQgPSAoJCgiLnF5LWVwaXNvZGUtbnVtIC5zZWxlY3QtaXRlbS5zZWxlY3RlZCAuaWNvbi10ciBpbWciKS5hdHRyKCJzcmMiKSB8fCAiIikuaW5jbHVkZXMoIi1wcmUtIik7CiAgICAgICAgICAgICAgICAgIEUuZW1pdCgidXJsLmNoYW5nZSIsIHsKICAgICAgICAgICAgICAgICAgICBvbGRVcmw6IGUsCiAgICAgICAgICAgICAgICAgICAgbmV3VXJsOiBuLAogICAgICAgICAgICAgICAgICAgIGF1dG9QbGF5OiAhdAogICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH0pLCAyMDApOwogICAgICAgIH0KICAgICAgICBpZiAoaXNNb2JpbGUpIHJldHVybjsKICAgICAgICBsZXQgdCA9IDA7CiAgICAgICAgc2tpcEFkVmlkZW9XcmFwcGVyKChmdW5jdGlvbigpIHsKICAgICAgICAgIGlmICgwID09PSB0ICYmIDAgPCAkKCIuY3VwaWQtcHVibGljLXRpbWUiKS5sZW5ndGggJiYgIm5vbmUiICE9PSAkKCIuY3VwaWQtcHVibGljLXRpbWUiKS5jc3MoImRpc3BsYXkiKSkgewogICAgICAgICAgICBnZXRHbG9iYWwoIkRhdGUiKS5ub3cgPSBmdW5jdGlvbigpIHsKICAgICAgICAgICAgICByZXR1cm4gKG5ldyB3aW5kb3cuRGF0ZSkuZ2V0VGltZSgpICsgKHQgKz0gMWU0KTsKICAgICAgICAgICAgfSwgc2V0SW50ZXJ2YWwoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgIHQgPSAwOwogICAgICAgICAgICB9KSwgNmU1KTsKICAgICAgICAgIH0KICAgICAgICAgIGNvbnN0IG4gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIuaXFwLXBsYXllciB2aWRlbyIpOwogICAgICAgICAgaWYgKG4gJiYgIW4uaXNTa2lwICYmIDEgPCBuLnJlYWR5U3RhdGUgJiYgMCA8ICQoIi5ib3R0b20tcHVibGljIikubGVuZ3RoICYmICJub25lIiAhPT0gJCgiLmJvdHRvbS1wdWJsaWMiKS5jc3MoImRpc3BsYXkiKSkgewogICAgICAgICAgICBjb25zdCBuID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiLnNraXBwYWJsZS1hZnRlciIpOwogICAgICAgICAgICBuICYmICFuLmlzU2tpcENsaWNrICYmIChpc1NraXBDbGljayA9ICEwLCBzZXRUaW1lb3V0KChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICBuLmNsaWNrKCksIHNldFRpbWVvdXQoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgbi5pc1NraXBDbGljayA9ICExOwogICAgICAgICAgICAgIH0pLCAxZTMpOwogICAgICAgICAgICB9KSwgMWUzKSk7CiAgICAgICAgICB9CiAgICAgICAgfSkpOwogICAgICB9CiAgICB9LAogICAgaGlkZTogJy5tLWlxeURvd24sIC5oZWFkZXItbG9naW4gKyBkaXYsIC5tLXZpZGVvLWFjdGlvbiwgZGl2W25hb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ogICAgICAgICAgICAkKCIuaDUtZXh0LWxheWVyLCAueWstdHJpZ2dlci1sYXllciIpLmFkZENsYXNzKCJvLS1oaWRlIik7CiAgICAgICAgICAgIGxldCBuID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiLnlvdWt1LXBsYXllciB2aWRlbyIpOwogICAgICAgICAgICBpZiAoIW4pIHJldHVybjsKICAgICAgICAgICAgbi5tdXRlZCA9ICExLCAuMDEgPj0gbi52b2x1bWUgJiYgKG4udm9sdW1lID0gLjQpLCBuLnBhdXNlZCAmJiBuLnBsYXkoKTsKICAgICAgICAgICAgbGV0IGUgPSAhMTsKICAgICAgICAgICAgJCgiLmg1LWxheWVyLWNvbmF0aW5lciIpLmNzcygiY3Vyc29yIiwgInBvaW50ZXIiKS5vZmYoImNsaWNrIikub24oImNsaWNrIiwgKGZ1bmN0aW9uKHQpIHsKICAgICAgICAgICAgICAkKHQudGFyZ2V0KS5oYXNDbGFzcygiaDUtbGF5ZXItY29uYXRpbmVyIikgJiYgKHQucHJldmVudERlZmF1bHQoKSwgdC5zdG9wSW1tZWRpYXRlUHJvcGFnYXRpb24oKSwKICAgICAgICAgICAgICBlID0gIW4ucGF1c2VkLCBzZXRUaW1lb3V0KChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgIG4ucGF1c2VkID09PSBlIHx8IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5oNXBsYXllci1kYXNoYm9hcmQgLmNvbnRyb2wtcGxheS1pY29uIikuY2xpY2soKTsKICAgICAgICAgICAgICB9KSwgMTAwKSk7CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgIH0pLCAxZTMpOwogICAgICAgIH0pKSwgJCQoIi5xdWFsaXR5LWRhc2hib2FyZCAueW91a3VfdmlwX3BheV9idG4sIC5xdWFsaXR5LWRhc2hib2FyZCAubG9naW4tY2FudXNlIiwgKGZ1bmN0aW9uKCkgewogICAgICAgICAgJCgiLnF1YWxpdHktZGFzaGJvYXJkIC55b3Vr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HRpdGxlOiAiaDQgZm9udCIsCiAgICAgIGp1bXA6ICIudGFiLWNvbnRlbnQuc3R1aS1wYW5uZWxfYmQiCiAgICB9LAogICAgaGlkZTogIi5jb250YWluZXIgfiAqW2lkXSwgYm9keSA+IC5jb250YWluZXIgPiBwW3N0eWxlXSIsCiAgICBjc3M6ICJcbmJvZHkge3BhZGRpbmctYm90dG9tOiAwICFpbXBvcnRhbnQ7fSIKICB9LCB7CiAgICBuYW1lOiAi5a6M576O55yL55yLIiwKICAgIG1hdGNoOiAid2FubWVpa2subWUiLAogICAgc2VhcmNoOiB7CiAgICAgIG1hdGNoOiAvXC9zb1wvLywKICAgICAganVtcDogIi5zdHVpLXBhZ2UsIC5zdHVpLXBhbm5lbCIsCiAgICAgIGp1bXBUbzogWyAiLnN0dWktdm9kbGlzdF9fbWVkaWEgYSIsIC8uKnByb2plY3RcLyhcZCspLiovLCAiL3BsYXkvJDEtMS0xLmh0bWwiIF0sCiAgICAgIHJlc3VsdDogImgzLnRpdGxlIGEiCiAgICB9LAogICAgcGxheTogewogICAgICBtYXRjaDogL1wvcGxheS8sCiAgICAgIHRpdGxlOiAiaDEgYSIsCiAgICAgIGp1bXA6ICItLnBsYXlsaXN0IgogICAgfSwKICAgIGhpZGU6ICIuY29udGFpbmVyIH4gKltpZF0iCiAgfSwgewogICAgbmFtZTogIuWcqOe6v+S5i+WutiIsCiAgICBtYXRjaDogInp4emoubWUiLAogICAgc2VhcmNoOiB7CiAgICAgIG1hdGNoOiAvd2Q9LywKICAgICAganVtcDogIi5zdHVpLXBhbm5lbF9fZnQiLAogICAgICBqdW1wVG86IFsgIi5zdHVpLXZvZGxpc3QgYSIsIC8uKmRldGFpbFwvKFxkKykuKi8sICIvdmlkZW8vJDEtMS0xLmh0bWwiIF0sCiAgICAgIHJlc3VsdDogIi5zdHVpLXZvZGxpc3QgLnRpdGxlIGEiCiAgICB9LAogICAgcGxheTogewogICAgICBtYXRjaDogL1wvdmlkZW8vLAogICAgICB0aXRsZTogImgxIiwKICAgICAganVtcDogIi5zdHVpLXBsYXllciIKICAgIH0sCiAgICBoaWRlOiAnYm9keSA+IGRpdltjbGFzc149IkFEIl0sIGJvZHkgPiAqOm5vdChzY3JpcHQpICsgc2NyaXB0IH4gKltpZF0nCiAgfSwgewogICAgbmFtZTogIjkx576O5YmnIiwKICAgIG1hdGNoOiAiOTFtancuY29tIiwKICAgIHNlYXJjaDogewogICAgICBtYXRjaDogL3M9LywKICAgICAga2V5d29yZDogL3M9KC4rKS8sCiAgICAgIGp1bXA6ICIubGlzdC1jb250ZW50IHwgYXBwZW5kIiwKICAgICAgcmVzdWx0OiB7CiAgICAgICAgdGl0bGU6ICIubS1tb3ZpZXMgLnUtbW92aWUgaDIiLAogICAgICAgIHVybDogIi5tLW1vdmllcyAudS1tb3ZpZSBhIgogICAgICB9CiAgICB9LAogICAgcGxheTogewogICAgICBtYXRjaDogL1wvdnBsYXkvLAogICAgICB0aXRsZTogIi52dGl0bGUgYSIsCiAgICAgIGp1bXA6ICIubWdwbGF5bGlzdCIKICAgIH0sCiAgICBoaWRlOiAiYm9keSA+ICo6bm90KHNjcmlwdCkgKyBzY3JpcHQgfiAqW2lkXSwgZGl2Om5vdChbaWRdKSA+IGlmcmFtZSwgYSA+IGlmcmFtZSwgLmFkcyIKICB9LCB7CiAgICBuYW1lOiAi5ZOU5ru0IiwKICAgIG1hdGNoOiAiYmRlNC5jb20iLAogICAgZGlzYWJsZTogITAsCiAgICBzZWFyY2g6IHsKICAgICAgbWF0Y2g6IC9cL3NlYXJjaC8sCiAgICAgIGp1bXA6ICIuc2VhcmNoLWxpc3QiLAogICAgICByZXN1bHQ6ICJhLmhlYWRlciIKICAgIH0sCiAgICBwbGF5OiB7CiAgICAgIG1hdGNoOiAvXC9wbGF5LywKICAgICAgdGl0bGU6ICIucGxheWVyLXdyYXBwZXIgKyAuY29udGFpbmVyIGEgKyBhIiwKICAgICAganVtcDogIi5wbGF5ZXItd3JhcHBlciArIC5jb250YWluZXI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AgICAgIHJldHVybiAic3RyaW5nIiA9PSB0eXBlb2YgbiA/IGF3YWl0ICQkKChmdW5jdGlvbigpIHsKICAgICAgICAgIHJldHVybiAkKG4pLmVxKDApLnRleHQoKTsKICAgICAgICB9KSkgOiAiZnVuY3Rpb24iID09IHR5cGVvZiBuID8gbigkKSA6IGdldEtleXdvcmRGcm9tVXJsKG4pOwogICAgICB9CiAgICAgIGFzeW5jIGZ1bmN0aW9uIGdvSnVtcChuLCBlKSB7CiAgICAgICAgaWYgKG4gaW5zdGFuY2VvZiBGdW5jdGlvbikgbihlKTsgZWxzZSB7CiAgICAgICAgICBjb25zdCB0ID0gYXdhaXQgZ2V0S2V5d29yZChlKTsKICAgICAgICAgIGlmICghdCkgcmV0dXJuOwogICAgICAgICAgKEFycmF5LmlzQXJyYXkobikgPyBuIDogbi5zcGxpdCgvXHMqLFxzKi8pKS5mb3JFYWNoKChmdW5jdGlvbihuKSB7CiAgICAgICAgICAgIG4gPSBuLnNwbGl0KC9ccypcfFxzKi8pLCBpbnNlcnRTZWFyY2hBZGRvbih0LCBuWzBdLCBuWzFdIHx8ICJhZnRlciIpOwogICAgICAgICAgfSkpOwogICAgICAgIH0KICAgICAgfQogICAgICBmdW5jdGlvbiBleGVjQWRkb25KcyhuKSB7CiAgICAgICAgbiAmJiBuLmpzIGluc3RhbmNlb2YgRnVuY3Rpb24gJiYgbi5qcygpOwogICAgICB9CiAgICAgIGZ1bmN0aW9uIGFkZG9uR28oKSB7CiAgICAgICAgY29uc3QgYWRkb24gPSBBRERPTlMuZmluZCgoZnVuY3Rpb24obikgewogICAgICAgICAgcmV0dXJuICFuLmRpc2FibGUgJiYgSXMobi5tYXRjaCk7CiAgICAgICAgfSkpOwogICAgICAgIGlmIChhZGRvbikgewogICAgICAgICAgaWYgKGlzRmlyc3RSdW5BZGRvbikgewogICAgICAgICAgICBsZXQgbiA9IGdldEJhc2VTdHlsZSgpOwogICAgICAgICAgICBhZGRvbi5oaWRlICYmIChuICs9ICJcbiIgKyBhZGRvbi5oaWRlICsgIiB7IiArIFB1cmlmeVN0eWxlICsgIn0iKSwgYWRkb24uY3NzICYmIChuICs9IGFkZG9uLmNzcyksCiAgICAgICAgICAgIGFkZENzcyhuKTsKICAgICAgICAgIH0KICAgICAgICAgIF9EICYmICQoIm9vLWxvZ3MiKS5sZW5ndGgsIF9EICYmICQoIm9vLWxvZ3MiKS5sZW5ndGgsICQoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICBsZXQgX01hdGhtaW4gPSBNYXRoLm1pbjsKICAgICAgICAgICAgY29uc3QgcGxheUFkZG9uID0gYWRkb24ucGxheTsKICAgICAgICAgICAgaWYgKHBsYXlBZGRvbiAmJiBJcyhwbGF5QWRkb24ubWF0Y2gpKSB7CiAgICAgICAgICAgICAgaWYgKHBsYXlBZGRvbi52aXAgJiYgIWRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5vLS12aXAiKSkgewogICAgICAgICAgICAgICAgZnVuY3Rpb24gZm9ybWF0UGFzc2VkVGltZShuKSB7CiAgICAgICAgICAgICAgICAgIHJldHVybiAoKERhdGUubm93KCkgLSBuKSAvIDFlMykudG9GaXhlZCgyKSArICJzIjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGFzeW5jIGZ1bmN0aW9uIHVwZGF0ZVFyY29kZSgpIHsKICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IDAgPCBhcmd1bWVudHMubGVuZ3RoICYmIHZvaWQgMCAhPT0gYXJndW1lbnRzWzBdID8gYXJndW1lbnRzWzBdIDogSHJlZjsKICAgICAgICAgICAgICAgICAgaXNNb2JpbGUgfHwgKCFxcmNvZGVDb2RlICYmIChxcmNvZGVDb2RlID0gYXdhaXQgZmV0Y2hDZG5VcmwoIi9xcmNvZGUtZ2VuZXJhdG9yLzEuNC40L3FyY29kZS5taW4uanMiKSksCiAgICAgICAgICAgICAgICAgIGV2YWwocXJjb2RlQ29kZSksIHFyY29kZSAmJiAoUVIgPSBxcmNvZGUoMCwgIkwiKSwgUVIuYWRkRGF0YSh1cmwpLCBRUi5tYWtlKCksICQoIi5vLS1xcmNvZGUtYm94IikucmVtb3ZlQ2xhc3MoIm8tLWhpZGUiKSwKICAgICAgICAgICAgICAgICAgJCgiLm8tLXFyY29kZSIpLmh0bWwoUVIuY3JlYXRlSW1nVGFnKCkpKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBmaXhVcmwobikgewogICAgICAgICAgICAgICAgICByZXR1cm4gbi5yZXBsYWNlKC9bXD8jXS4rL2csICIiKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGZpeFZpcFVybChuKSB7CiAgICAgICAgICAgICAgICAgIGNvbnN0IGUgPSBBRERPTlMuZmluZCgoZnVuY3Rpb24oZSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBJcyhlLm1hdGNoLCBuKSAmJiBlLnBsYXkgJiYgZS5wbGF5LmZpeFVybDsKICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgICByZXR1cm4gZSA/ICEwID09PSBlLnBsYXkuZml4VXJsID8gZml4VXJsKG4pIDogZS5wbGF5LmZpeFVybChuKSA6IG47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBnZXRWaXBUYXJnZXRVcmwoKSB7CiAgICAgICAgICAgICAgICAgIGlmIChvb1BsYXlVcmwpIHJldHVybiBvb1BsYXlVcmw7CiAgICAgICAgICAgICAgICAgIGxldCBuID0gbG9jYXRpb24uaHJlZi5yZXBsYWNlKC8mP1x3Kz1odHRwW14mXSsvLCAiIikucmVwbGFjZSgvLitodHRwLywgImh0dHAiKTsKICAgICAgICAgICAgICAgICAgcmV0dXJuIG4gPSBkZWNvZGVVUkkoZml4VmlwVXJsKG4pIHx8IG4pLCBuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gY2FuUGxheUluUGFnZShuKSB7CiAgICAgICAgICAgICAgICAgIHJldHVybiAhaXNPbmx5RG93bmxvYWRWaWRlb1VybFJlZ2V4LnRlc3QobikgJiYgKCEvXC9cL3Z3ZWNhbS50Yy5xcS5jb20vLnRlc3QobikgfHwgSXMoInYucXEuY29tIikpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gdG9TaG9ydFZpZGVvVXJsKG4pIHsKICAgICAgICAgICAgICAgICAgY29uc3QgZSA9IG4ubWF0Y2goc2hvcnRWaWRlb1VybFJlZ2V4KSB8fCBuLm1hdGNoKHNob3J0VmlkZW9VcmxMb3NlUmVnZXgpOwogICAgICAgICAgICAgICAgICByZXR1cm4gZSA/IGVbMV0uc3BsaXQoIi4iKS5zbGljZSgtMikuam9pbigiLiIpICsgIiAuLi4gIiArIGVbZS5sZW5ndGggLSAyXS5zbGljZSgtMTApICsgIjxzcGFuPiAuICIgKyBlW2UubGVuZ3RoIC0gMV0gKyAiPC9zcGFuPiIgOiBuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gZml4SWZyYW1lVXJsKG4pIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuIG4ucmVwbGFjZSgvXC8/XD8uKy8sICIiKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGdldElmcmFtZUlkKG4pIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuIGlmcmFtZXNbZml4SWZyYW1lVXJsKG4pXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGdldElmcmFtZShuKSB7CiAgICAgICAgICAgICAgICAgIHJldHVybiBmcmFtZXNbZ2V0SWZyYW1lSWQobildOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gc2V0SWZyYW1lKG4sIGUpIHsKICAgICAgICAgICAgICAgICAgaWZyYW1lc1tmaXhJZnJhbWVVcmwobildID0gZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGFkZElmcmFtZShuKSB7CiAgICAgICAgICAgICAgICAgIGxldCBlID0gMSA8IGFyZ3VtZW50cy5sZW5ndGggJiYgdm9pZCAwICE9PSBhcmd1bWVudHNbMV0gPyBhcmd1bWVudHNbMV0gOiAib28taWZyYW1lcyI7CiAgICAgICAgICAgICAgICAgIGNvbnN0IHQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCJpZnJhbWUiKTsKICAgICAgICAgICAgICAgICAgcmV0dXJuIHQuaWQgPSB1dWlkKCksIHQuZnJhbWVib3JkZXIgPSAiMCIsIHQuc2Nyb2xsaW5nID0gIm5vIiwgdC5zZWFtbGVzcyA9ICEwLAogICAgICAgICAgICAgICAgICB0LnNhbmRib3ggPSAiYWxsb3ctc2NyaXB0cyBhbGxvdy1zYW1lLW9yaWdpbiBhbGxvdy1mb3JtcyIsIG4gJiYgKHQuc3JjID0gbiwgc2V0SWZyYW1lKG4sIHQuaWQpKSwKICAgICAgICAgICAgICAgICAgJChlKS5hcHBlbmQodCksIHQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiByZW1vdmVJZnJhbWUoKSB7CiAgICAgICAgICAgICAgICAgIGxldCBuID0gMCA8IGFyZ3VtZW50cy5sZW5ndGggJiYgdm9pZCAwICE9PSBhcmd1bWVudHNbMF0gPyBhcmd1bWVudHNbMF0gOiAib28taWZyYW1lcyA+IGlmcmFtZSI7CiAgICAgICAgICAgICAgICAgIGNvbnN0IGUgPSAkKCJzdHJpbmciID09IHR5cGVvZiBuID8gbi5zdGFydHNXaXRoKCJvby1pZnJhbWVzIikgPyBuIDogIiMiICsgbiA6IG4uaWQgPyAiIyIgKyBuLmlkIDogbikuZ2V0KDApOwogICAgICAgICAgICAgICAgICBlICYmIChlLnNyYyA9ICJhYm91dDpibGFuayIsICQoZSkucmVtb3ZlKCkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gZW1wdHlJZnJhbWVzKCkgewogICAgICAgICAgICAgICAgICAkKCJvby1pZnJhbWVzID4gaWZyYW1lIikuZWFjaCgoZnVuY3Rpb24obiwgZSkgewogICAgICAgICAgICAgICAgICAgIHJlbW92ZUlmcmFtZShlKTsKICAgICAgICAgICAgICAgICAgfSkpLCAkKCJvby1pZnJhbWVzIikuZW1wdHkoKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGdldFNuaWZmVGltZShuKSB7CiAgICAgICAgICAgICAgICAgIGNvbnN0IGUgPSBzbmlmZlRpbWVzW2ZpeElmcmFtZVVybChuKV07CiAgICAgICAgICAgICAgICAgIHJldHVybiBlID8gZm9ybWF0UGFzc2VkVGltZShlKSA6ICIwcyI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBzbmlmZlN0YXJ0KCkgewogICAgICAgICAgICAgICAgICBpc1NuaWZmaW5nID0gITAsIGlzRW5zdXJlUGxheWluZ0NoZWNrID0gITEsIHNuaWZmVGltZXN0YW1wID0gRGF0ZS5ub3coKSwgc25pZmZVcmxzID0gW10sCiAgICAgICAgICAgICAgICAgIHNuaWZmVXJsc0tleSA9IFtdLCAkKCIuby0tcGxheWVyIikuZW1wdHkoKSwgJCgiaHRtbCIpLmFkZENsYXNzKCJvLS1zbmlmZmluZyIpLCAkKCIuby0tdmlwIikucmVtb3ZlQ2xhc3MoImlzLXBsYXktaW4tcGFnZSIpLAogICAgICAgICAgICAgICAgICBibG9iQ291bnQgPSAwLCAkKCIuby0tdmlwLWl0ZW0uaXMtYmxvYiIpLnJlbW92ZSgpLCBwcm9ncmVzc0ludGVydmFsID0gc2V0SW50ZXJ2YWwoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgICQoIi5vLS1zbmlmZi1wcm9ncmVzcyIpLmNzcyh7CiAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogKyQoIi5vLS1zbmlmZi1wcm9ncmVzcyIpLmNzcygid2lkdGgiKS5yZXBsYWNlKCIlIiwgIiIpICsgLjEgKyAiJSIKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgfSksIDIwMCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBzbmlmZkRvbmUoKSB7CiAgICAgICAgICAgICAgICAgIGZvcm1hdFBhc3NlZFRpbWUoc25pZmZTdGFydFRpbWUpLCBpc1NuaWZmaW5nID0gITEsIGVtcHR5SWZyYW1lcygpLCAkKCIuby0tc25pZmYtcHJvZ3Jlc3MiKS5jc3MoewogICAgICAgICAgICAgICAgICAgIHdpZHRoOiAiMTAwJSIKICAgICAgICAgICAgICAgICAgfSksIGNsZWFySW50ZXJ2YWwocHJvZ3Jlc3NJbnRlcnZhbCksICQoIi5vLS12aXAiKS5yZW1vdmVDbGFzcygiaXMtc25pZmZpbmciKS5hZGRDbGFzcygiaXMtc25pZmYtZG9uZSIpLAogICAgICAgICAgICAgICAgICAkKCJodG1sIikucmVtb3ZlQ2xhc3MoIm8tLXNuaWZmaW5nIiksIDAgPCBzbmlmZlVybHMubGVuZ3RoICYmIDAgPT09ICQoIi5vLS1zbmlmZi1kb25lIikubGVuZ3RoICYmICQoIi5vLS12aXAtcGxheSAuby0tc291cmNlcyIpLmxlbmd0aCAmJiAkKCIuby0tdmlwLXBsYXkgLm8tLXNvdXJjZXMiKS5hcHBlbmQoJzxzcGFuIGNsYXNzPSJvLS1zbmlmZi1kb25lIj7inJQ8L3NwYW4+JyksCiAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgICQoIi5vLS1zbmlmZi1wcm9ncmVzcyIpLmNzcyh7CiAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogIjAiCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgIH0pLCAxZTMpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gc25pZmZTdWNjZXNzKG4sIGUpIHsKICAgICAgICAgICAgICAgICAgY29uc3QgdCA9IChuID0gZGVjb2RlVVJJQ29tcG9uZW50KG4udHJpbSgpKS5yZXBsYWNlKC9eKGh0dHA6KT9cL1wvLywgImh0dHBzOi8vIikpLnJlcGxhY2UoL1w/LisvLCAiIik7CiAgICAgICAgICAgICAgICAgIGlmIChzbmlmZlVybHNLZXkuaW5jbHVkZXModCkpIHJldHVybjsKICAgICAgICAgICAgICAgICAgc25pZmZVcmxzS2V5LnB1c2godCksIHNuaWZmVXJscy5wdXNoKG4pOwogICAgICAgICAgICAgICAgICBjb25zdCBpID0gc25pZmZVcmxzLmxlbmd0aCwgbyA9IG4ubWF0Y2godmlkZW9FeHRSZWdleCksIGEgPSBvID8gb1sxXSA6ICJ1bmtub3ciOwogICAgICAgICAgICAgICAgICBpZiAoJCgiLm8tLXZpcC1wbGF5IC5vLS1zb3VyY2VzIikuYXBwZW5kKCc8YSBfaHJlZj0iJyArICgiYmxvYiIgPT09IGEgPyBlIDogbikgKyAnIiBjbGFzcz0iaXMtJyArIGEgKyAnIj7nur/ot68nICsgaSArICI8L2E+IiksCiAgICAgICAgICAgICAgICAgICQoIi5vLS12aXAtcGxheSAuby0tc291cmNlcyBhIikub2ZmKCJjbGljayIpLm9uKCJjbGljayIsIChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBuID0gJCh0aGlzKS5hdHRyKCJfaHJlZiIpOwogICAgICAgICAgICAgICAgICAgIHVwZGF0ZVFyY29kZShuKTsKICAgICAgICAgICAgICAgICAgICBsZXQgZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5vLS1wbGF5ZXIgdmlkZW8iKTsKICAgICAgICAgICAgICAgICAgICBlIHx8ICgkKCIuby0tcGxheWVyIikucHJlcGVuZCgnPHZpZGVvIGNsYXNzPSJvLS12aWRlbyIgcG9zdGVyPSInICsgUGxheWVyUGxheWluZ0NvdmVyICsgJyIgY29udHJvbHMgcGxheXNpbmxpbmU+PC92aWRlbz4nKSwKICAgICAgICAgICAgICAgICAgICBlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiLm8tLXBsYXllciB2aWRlbyIpKTsKICAgICAgICAgICAgICAgICAgICBjb25zdCB0ID0gZ2V0R2xvYmFsKCJQbHlyIiksIGkgPSBnZXRHbG9iYWwoIkhscyIpIHx8IGdldEdsb2JhbCgiaGxzIik7CiAgICAgICAgICAgICAgICAgICAgaWYgKCFwbGF5ZXIgJiYgdCAmJiAocGxheWVyID0gbmV3IHQoZSwgewogICAgICAgICAgICAgICAgICAgICAgZGVidWc6IF9ELAogICAgICAgICAgICAgICAgICAgICAgaW52ZXJ0VGltZTogITEsCiAgICAgICAgICAgICAgICAgICAgICBhdXRvcGxheTogITAsCiAgICAgICAgICAgICAgICAgICAgICB2b2x1bWU6IC43NSwKICAgICAgICAgICAgICAgICAgICAgIHNwZWVkOiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkOiAxLAogICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zOiBbIC41LCAuNzUsIDEsIDEuMjUsIDEuNSwgMiBdCiAgICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgICAgc3RvcmFnZTogewogICAgICAgICAgICAgICAgICAgICAgICBlbmFibGVkOiAhMCwKICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBzdG9yZVByZWZpeCArICJwbHlyIgogICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0pLCBwbGF5ZXIub24oImVudGVyZnVsbHNjcmVlbiIsIChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgICQoImh0bWwiKS5hZGRDbGFzcygiby0tZnVsbHNjcmVlbiIpOwogICAgICAgICAgICAgICAgICAgIH0pKSwgcGxheWVyLm9uKCJleGl0ZnVsbHNjcmVlIiwgKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgICAgJCgiaHRtbCIpLnJlbW92ZUNsYXNzKCJvLS1mdWxsc2NyZWVuIik7CiAgICAgICAgICAgICAgICAgICAgfSkpKSwgJCgiLm8tLXBsYXllci1iZyIpLnJlbW92ZSgpLCAvXC5tM3U4Ly50ZXN0KG4pICYmIGkgJiYgaS5pc1N1cHBvcnRlZCgpKSB7CiAgICAgICAgICAgICAgICAgICAgICBjb25zdCB0ID0gbmV3IGk7CiAgICAgICAgICAgICAgICAgICAgICB0LmxvYWRTb3VyY2UobiksIHQuYXR0YWNoTWVkaWEoZSksIHQub24oaS5FdmVudHMuTUFOSUZFU1RfUEFSU0VELCAoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGUucGxheSgpOwogICAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgICAgIH0gZWxzZSBlLnNyYyA9IG4sIGUuYWRkRXZlbnRMaXN0ZW5lcigibG9hZGVkbWV0YWRhdGEiLCAoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICBlLnBsYXkoKTsKICAgICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICAgICAgJCgiLm8tLXBsYXktdXJsIikuaHRtbCgn5p2l5rqQ77yaPGEgX2hyZWY9IicgKyBuICsgJyI+JyArIHRvU2hvcnRWaWRlb1VybChuKSArICI8L2E+IiArIChjYW5QbGF5SW5QYWdlKG4pID8gJzxzcGFuIGNsYXNzPSJvLS1zcGFuIj7lpoLmnpzlhajpg6jnur/ot6/pg73ml6Dms5Xmkq3mlL7vvIzlj6/ku6Xngrnlh7vmnaXmupDpk77mjqXkuIvovb3mnaXmkq3mlL7vvIzmiJbkvb/nlKjljZXkuKrop6PmnpDmkq3mlL7jgII8L3NwYW4+JyA6ICc8c3BhbiBjbGFzcz0iby0tc3BhbiBpcy13YXJuaW5nIj48c3Bhbj7or6Xpk77mjqXml6Dms5XlnKjlvZPliY3nq5nngrnmkq3mlL7vvIzor7fngrnlh7vmnaXmupDkuIvovb3mkq3mlL48L3NwYW4+PC9zcGFuPicpKSwKICAgICAgICAgICAgICAgICAgICAkKCIuby0tcGxheS11cmwgYSIpLm9mZigiY2xpY2siKS5vbigiY2xpY2siLCAoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuID0gJCh0aGlzKS5hdHRyKCJfaHJlZiIpOwogICAgICAgICAgICAgICAgICAgICAgaXNIaWtlciAmJiB3aW5kb3cuZnlfYnJpZGdlX2FwcC5wbGF5VmlkZW8gPyB3aW5kb3cuZnlfYnJpZGdlX2FwcC5wbGF5VmlkZW8obikgOiBpc01peGlhICYmIHdpbmRvdy5teF9icm93c2VyX29iai5wbGF5dmlkZW8gPyB3aW5kb3cubXhfYnJvd3Nlcl9vYmoucGxheXZpZGVvKG4sIG4pIDogd2luZG93Lm9wZW4obiwgIl9ibGFuayIsICJub29wZW5lciIpOwogICAgICAgICAgICAgICAgICAgIH0pKSwgJCgiLm8tLXZpcC1wbGF5IC5vLS1zb3VyY2VzIGEiKS5yZW1vdmVDbGFzcygiaXMtYWN0aXZlIiksICQodGhpcykuYWRkQ2xhc3MoImlzLWFjdGl2ZSIpOwogICAgICAgICAgICAgICAgICB9KSksIDEgPT09IGkpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgbjsKICAgICAgICAgICAgICAgICAgICAkKCIuby0tdmlwLXBsYXkgLm8tLXNvdXJjZXMgYSIpLmdldCgwKS5jbGljaygpLCAkKCIuby0tdmlwIikuYWRkQ2xhc3MoImlzLXNuaWZmLXN1Y2Nlc3MiKSwKICAgICAgICAgICAgICAgICAgICAkKCIuby0tdmlwLXBsYXkiKS5yZW1vdmVDbGFzcygiaXMtaGlkZSIpLCBpc0Vuc3VyZVBsYXlpbmdDaGVjayA9ICEwLCBzZXRUaW1lb3V0KChmdW5jdGlvbiBlKCkgewogICAgICAgICAgICAgICAgICAgICAgaWYgKGlzRW5zdXJlUGxheWluZ0NoZWNrKSByZXR1cm4gcGxheWVyICYmIHBsYXllci5yZWFkeSAmJiAwIDwgcGxheWVyLmR1cmF0aW9uID8gdm9pZCAoaXNFbnN1cmVQbGF5aW5nQ2hlY2sgPSAhMSkgOiAoKG4gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIuby0tdmlwLXBsYXkgLm8tLXNvdXJjZXMgYS5pcy1hY3RpdmUgKyBhIikpID8gbi5jbGljaygpIDogMSA8IGkgJiYgKG4gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIuby0tdmlwLXBsYXkgLm8tLXNvdXJjZXMgYSIpLAogICAgICAgICAgICAgICAgICAgICAgbiAmJiBuLmNsaWNrKCkpLCB2b2lkIHNldFRpbWVvdXQoZSwgNDUwMCkpOwogICAgICAgICAgICAgICAgICAgIH0pLCA0ZTMpOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBzbmlmZkZhaWwoKSB7CiAgICAgICAgICAgICAgICAgIHNuaWZmRG9uZSgpLCAkKCIuby0tcGxheWVyLWJnIikuYWRkQ2xhc3MoImlzLWZhaWwiKSwgJCgiLm8tLXZpcCIpLmFkZENsYXNzKCJpcy1zbmlmZi1mYWlsIik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBpU25pZmYoKSB7fQogICAgICAgICAgICAgICAgZnVuY3Rpb24gaGlrZXJTbmlmZihzbmlmZlRpY2tJZCkgewogICAgICAgICAgICAgICAgICBpZiAoc25pZmZUaWNrSWQgIT09IHNuaWZmVGljaykgcmV0dXJuOwogICAgICAgICAgICAgICAgICBsZXQgcmVzb3VyY2UgPSBldmFsKHdpbmRvdy5meV9icmlkZ2VfYXBwLmdldE5ldHdvcmtSZWNvcmRzKCkpOwogICAgICAgICAgICAgICAgICByZXNvdXJjZSA9IHJlc291cmNlLmZpbHRlcigoZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBuLnRpbWVzdGFtcCA+IHNuaWZmVGltZXN0YW1wICYmIGlzVmFsaWRWaWRlb1VybChuLnVybCk7CiAgICAgICAgICAgICAgICAgIH0pKSwgaXNTbmlmZmluZyAmJiAocmVzb3VyY2UuZm9yRWFjaCgoZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgICAgIHNuaWZmU3VjY2VzcyhuLnVybCk7CiAgICAgICAgICAgICAgICAgIH0pKSwgc2V0VGltZW91dCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgaGlrZXJTbmlmZihzbmlmZlRpY2tJZCk7CiAgICAgICAgICAgICAgICAgIH0pLCAxMDApKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIG1peGlhU25pZmYobikgewogICAgICAgICAgICAgICAgICBpZiAobiAhPT0gc25pZmZUaWNrKSByZXR1cm47CiAgICAgICAgICAgICAgICAgIGxldCBlID0gW10sIHQgPSB3aW5kb3cubXhfYnJvd3Nlcl9vYmouZ2V0d2VibG9ncygiaHR0cCIpOwogICAgICAgICAgICAgICAgICAiZXJyb3IiICE9PSB0ICYmIChlID0gdC50cmltKCkuc3BsaXQoL1xzKlxuW1xuXHNdKi8pLCBlID0gZS5maWx0ZXIoKGZ1bmN0aW9uKG4pIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXNWYWxpZFZpZGVvVXJsKG4pOwogICAgICAgICAgICAgICAgICB9KSkpLCBpc1NuaWZmaW5nICYmIChlLmZvckVhY2goKGZ1bmN0aW9uKG4pIHsKICAgICAgICAgICAgICAgICAgICBzbmlmZlN1Y2Nlc3Mobik7CiAgICAgICAgICAgICAgICAgIH0pKSwgc2V0VGltZW91dCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgbWl4aWFTbmlmZihuKTsKICAgICAgICAgICAgICAgICAgfSksIDEwMC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PniYjnvZHnq5nkuIrop6PmnpA8L2Rpdj48L2Rpdj4nOwogICAgICAgICAgICAgICAgICAgICQoZSkuZW1wdHkoKS5hcHBlbmQoJzxkaXYgY2xhc3M9Im8tLXBsYXllciI+JyArIHQgKyBuICsgIjwvZGl2PiIpLCAkKCIuby0tcGxheWVyIikucGFyZW50KCkuYWRkQ2xhc3MoIm8tLXBsYXllci1ib3giKTsKICAgICAgICAgICAgICAgICAgICBjb25zdCBpID0gRGF0ZS5ub3coKSwgbyA9IHNldEludGVydmFsKChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgIERhdGUubm93KCkgLSBpID4gOWU0ICYmIGNsZWFySW50ZXJ2YWwobyksICQoIi5vLS1wbGF5ZXItYm94ID4gKjpub3QoLm8tLXBsYXllcikiKS5yZW1vdmUoKTsKICAgICAgICAgICAgICAgICAgICB9KSwgMWUzKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gc25pZmYobikgewogICAgICAgICAgICAgICAgICBpZiAoaXNTbmlmZmluZyAmJiBzbmlmZkRvbmUoKSwgc25pZmZTdGFydCgpLCBpc0FsbG93SWZyYW1lU25pZmYpIGlTbmlmZigpOyBlbHNlIGlmIChpc0FsbG93SGlrZXJTbmlmZikgaGlrZXJTbmlmZihuKTsgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCFpc0FsbG93TWl4aWFTbmlmZikgcmV0dXJuIHZvaWQgc25pZmZEb25lKCk7CiAgICAgICAgICAgICAgICAgICAgbWl4aWFTbmlmZihuKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICBpbnNlcnRQbGF5ZXJIdG1sKGlzTW9iaWxlID8gIiIgOiAnPGRpdiBjbGFzcz0iby0tdmlwLXBsYXkgaXMtaGlkZSI+PGRpdiBjbGFzcz0iby0tc291cmNlcyI+PC9kaXY+PGRpdiBjbGFzcz0iby0tcGxheS11cmwiPjwvZGl2PjwvZGl2PicpLAogICAgICAgICAgICAgICAgICBpc01vYmlsZSAmJiAoJCgiLm8tLXZpcC1wbGF5IikucmVtb3ZlKCksICQoIi5vLS12aXAtcGFuZWwiKS5hZnRlcignPGRpdiBjbGFzcz0iby0tdmlwLXBsYXkgaXMtaGlkZSI+PGRpdiBjbGFzcz0iby0tc291cmNlcyI+PC9kaXY+PGRpdiBjbGFzcz0iby0tcGxheS11cmwiPjwvZGl2PjwvZGl2PicpKSwKICAgICAgICAgICAgICAgICAgcGF1c2VQbGF5KCksIHNuaWZmVXJscyA9IFtdLCBzbmlmZlRpbWVzID0ge30sIHNuaWZmSW5kZXggPSAtMSwgZ29TbmlmZigpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gZ29TbmlmZigpIHsKICAgICAgICAgICAgICAgICAgaWYgKCFpc1NuaWZmaW5nKSByZXR1cm47CiAgICAgICAgICAgICAgICAgIHNuaWZmSW5kZXggKz0gMTsKICAgICAgICAgICAgICAgICAgY29uc3QgbiA9IFZfVVtzbmlmZkluZGV4XSwgZSA9IChzbmlmZkluZGV4ICsgMSkgLyAoVl9VLmxlbmd0aCArIDEpLCB0ID0gKHNuaWZmVXJscy5sZW5ndGggKyAxKSAvIE1BWF9TTklGRl9QTEFZX0NPVU5ULCBpID0gX01hdGhtaW4oMTAgKiAoMi41ICogZSArIDIuNSAqIHQgKyA1ICogX01hdGhtYXgoZSwgdCkgKyAuNSksIDk5KS50b0ZpeGVkKDQpICsgIiUiOwogICAgICAgICAgICAgICAgICBpZiAoJCgiLm8tLXNuaWZmLXByb2dyZXNzIikuY3NzKHsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogaQogICAgICAgICAgICAgICAgICB9KSwgIW4pIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBuID0gc2V0SW50ZXJ2YWwoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgICAgaWYgKDAgPT09ICQoIm9vLWlmcmFtZXMgPiBpZnJhbWUiKS5sZW5ndGggJiYgKGNsZWFySW50ZXJ2YWwobiksIHNuaWZmRG9uZSgpLCAwID09PSBzbmlmZlVybHMubGVuZ3RoKSkgewogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiLm8tLXZpcC1pdGVtLmlzLWJsb2IiKTsKICAgICAgICAgICAgICAgICAgICAgICAgbiA/IG4uY2xpY2soKSA6IHNuaWZmRmFpbCgpOwogICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0pLCAxZTMpOwogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICBpZiAoc25pZmZVcmxzLmxlbmd0aCA+PSBNQVhfU05JRkZfUExBWV9DT1VOVCArIChwbGF5ZXIgJiYgcGxheWVyLnJlYWR5ICYmIDAgPCBwbGF5ZXIuZHVyYXRpb24gPyAtMSA6IDIpIHx8IHNuaWZmVXJscy5sZW5ndGggPj0gTUFYX1NOSUZGX1BMQVlfQ09VTlQgLyAyICYmIERhdGUubm93KCkgLSBzbmlmZlRpbWVzdGFtcCA+IDFlMyAqIF9NYXRobWF4KDI1MCAtIDEwICogc25pZmZVcmxzLmxlbmd0aCwgMTUwKSkgcmV0dXJuIHZvaWQgc25pZmZEb25lKCk7CiAgICAgICAgICAgICAgICAgIGNvbnN0IG8gPSBnZXRWaXBUYXJnZXRVcmwoKSwgYSA9IE1fVmlwVXJsKG4pICsgbzsKICAgICAgICAgICAgICAgICAgc25pZmZUaW1lc1tmaXhJZnJhbWVVcmwoYSldID0gRGF0ZS5ub3coKTsKICAgICAgICAgICAgICAgICAgY29uc3QgciA9IGFkZElmcmFtZShhKSwgcyA9IGlzTW9iaWxlID8gNyA6IDU7CiAgICAgICAgICAgICAgICAgIHIub25sb2FkID0gZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICByZW1vdmVJZnJhbWUociwgIlRJTUVPVVQiKTsKICAgICAgICAgICAgICAgICAgICB9KSwgMTJlMyk7CiAgICAgICAgICAgICAgICAgIH0sIHNldFRpbWVvdXQoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgIHJlbW92ZUlmcmFtZShyLCAiTUFYIFRJTUVPVVQiKSwgc2V0VGltZW91dCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICBpc1NuaWZmaW5nICYmIDAgPT09ICQoIm9vLWlmcmFtZXMgPiBpZnJhbWUiKS5sZW5ndGggJiYgc25pZmZJbmRleCA+PSBWX1UubGVuZ3RoIC0gMSAmJiBzbmlmZkRvbmUoKTsKICAgICAgICAgICAgICAgICAgICB9KSwgMTUwMCk7CiAgICAgICAgICAgICAgICAgIH0pLCAxNWUzKSwgZnVuY3Rpb24gbigpIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBlID0gJCgib28taWZyYW1lcyA+IGlmcmFtZSIpLmxlbmd0aDsKICAgICAgICAgICAgICAgICAgICBpZiAoZSA+IHMgLSAxKSBzZXRUaW1lb3V0KChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgIG4oKTsKICAgICAgICAgICAgICAgICAgICB9KSwgMTAwKTsgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuID0gcGxheWVyICYmIHBsYXllci5yZWFkeSAmJiAwIDwgcGxheWVyLmR1cmF0aW9uLCB0ID0gX01hdGhtaW4oc25pZmZVcmxzLmxlbmd0aCAqIChuID8gMjAwIDogMTUwKSArIDEwMCAqIChzIC0gZSkgKyBfTWF0aG1pbig1MCAqIHNuaWZmSW5kZXgsIDFlMyksIDNlMykgKiAoaXNNb2JpbGUgPyAuNyA6IDEpOwogICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGdvU25pZmYoKTsKICAgICAgICAgICAgICAgICAgICAgIH0pLCB0KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIH0oKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGFzeW5jIGZ1bmN0aW9uIGF1dG9TbmlmZlBsYXkoKSB7CiAgICAgICAgICAgICAgICAgIGF3YWl0IHBsYXlCZWZvcmUoKSwgMCA8IHNuaWZmVGljayAmJiBzbmlmZkRvbmUoKSwgc25pZmZTdGFydFRpbWUgPSBEYXRlLm5vdygpLCBzbmlmZigrK3NuaWZmVGljayksCiAgICAgICAgICAgICAgICAgICQoIi5vLS12aXAiKS5yZW1vdmVDbGFzcygiaXMtc25pZmYtc3VjY2VzcyBpcy1zbmlmZi1kb25lIikuYWRkQ2xhc3MoImlzLXNuaWZmaW5nIik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBwYXVzZVBsYXkoKSB7CiAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgJCgidmlkZW86bm90KC5vLS12aWRlbyksIGF1ZGlvIikuZWFjaCgoZnVuY3Rpb24obiwgZSkgewogICAgICAgICAgICAgICAgICAgICAgZS5wYXVzZSgpLCBlLnZvbHVtZSA9IDAsIGUubXV0ZWQgPSAhMCwgJCgidmlkZW86bm90KC5vLS12aWRlbyksIGF1ZGlvIikuZWFjaCgoZnVuY3Rpb24obiwgZSkgewogICAgICAgICAgICAgICAgICAgICAgICAkKGUpLnJlbW92ZSgpOwogICAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgICBjb25zdCBuID0gRGF0ZS5ub3coKSwgZSA9IHNldEludGVydmFsKChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHQgPSBEYXRlLm5vdygpIC0gbiwgaSA9IGdldEdsb2JhbCgicGxheWVyT2JqZWN0IikgfHwgZ2V0R2xvYmFsKCJNR1RWUGxheWVyIikgJiYgZ2V0R2xvYmFsKCJNR1RWUGxheWVyIikucGxheWVyIHx8IGdldEdsb2JhbCgidmlkZW9QbGF5ZXIiKSB8fCBnZXRHbG9iYWwoIlBMQVlFUiIpOwogICAgICAgICAgICAgICAgICAgICAgaSAmJiAoaS5wYXVzZSBpbnN0YW5jZW9mIEZ1bmN0aW9uICYmIGkucGF1c2UoKSwgaS5tdXRlIGluc3RhbmNlb2YgRnVuY3Rpb24gJiYgaS5tdXRlKCkpLAogICAgICAgICAgICAgICAgICAgICAgKCFpIHx8IHQgPiA5ZTQpICYmIGNsZWFySW50ZXJ2YWwoZSk7CiAgICAgICAgICAgICAgICAgICAgfSksIDYwKTsKICAgICAgICAgICAgICAgICAgfSBjYXRjaCAobikge30KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGFzeW5jIGZ1bmN0aW9uIHBsYXlCZWZvcmUoKSB7CiAgICAgICAgICAgICAgICAgICQoIi5vLS12aXAtcGxheSIpLnJlbW92ZUNsYXNzKCJpcy1oaWRlIiksIGlzTG9hZFBsYXllciB8fCAoYWRkQ3NzKCIvcGx5ci8zLjYuMi9wbHlyLmNzcyIpLAogICAgICAgICAgICAgICAgICBhd2FpdCBhZGRKcygiL2hscy5qcy8wLjEzLjIvaGxzLm1pbi5qcyIpLCBhd2FpdCBhZGRKcygiL3BseXIvMy42LjIvcGx5ci5taW4uanMiKSwKICAgICAgICAgICAgICAgICAgaXNMb2FkUGxheWVyID0gITApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gZ2V0VmlwUGxheWVyKCkgewogICAgICAgICAgICAgICAgICByZXR1cm4gJChQbGF5ZXJTZWxlY3RvcikuZ2V0KDApIHx8ICQoIiNwbGF5ZXIsIC5wbGF5ZXIiKS5nZXQoMCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmd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2UiKSwKICAgICAgICAgICAgICAgICAgdXBkYXRlUXJjb2RlKGUpLCBpc1BsYXlpbmdJblBhZ2UgJiYgIS9odHRwOi8udGVzdChuKSA/IHBsYXlJblBhZ2UoZSkgOiAocGF1c2VQbGF5KCksCiAgICAgICAgICAgICAgICAgICQoIiNvLS1wbGF5ZXItaWZyYW1lIikucmVtb3ZlKCksICQoIi5vLS1wbGF5ZXIiKS5yZW1vdmVDbGFzcygiaXMtbG9hZGVkIiksIHNldFRpbWVvdXQoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKGUsICJfYmxhbmsiKTsKICAgICAgICAgICAgICAgICAgfSksIDEwMCkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gcGxheVZpcEl0ZW0obikgewogICAgICAgICAgICAgICAgICBjb25zdCBlID0gMCA8ICQobikubGVuZ3RoOwogICAgICAgICAgICAgICAgICBsZXQgdCA9IGUgPyAkKG4pLmhhc0NsYXNzKCJvLS12aXAtc25pZmYiKSA/ICJhdXRvIiA6ICQobikuYXR0cigiX2hyZWYiKSA6IFN0b3JlLmdldCgibGFzdFBsYXlDaG9pY2UiLCAiIik7CiAgICAgICAgICAgICAgICAgICQoIi5vLS12aXAtaXRlbSIpLnJlbW92ZUNsYXNzKCJpcy1hY3RpdmUiKSwgJCgiLm8tLXZpcC1saXN0IH4gLm8tLXRpcCIpLnJlbW92ZUNsYXNzKCJvLS1oaWRlIiksCiAgICAgICAgICAgICAgICAgIGUgPyAkKG4pLmFkZENsYXNzKCJpcy1hY3RpdmUiKSA6IHQuc3RhcnRzV2l0aCgiaHR0cCIpID8gKCQoIi5vLS12aXAtaXRlbTpub3QoLm8tLXZpcC1zbmlmZikiKS5lYWNoKChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmF0dHIoIl9ocmVmIikgPT09IHQgJiYgJCh0aGlzKS5hZGRDbGFzcygiaXMtYWN0aXZlIik7CiAgICAgICAgICAgICAgICAgIH0pKSwgcGxheVZpcFVybCh0KSkgOiAkKCIuby0tdmlwLWl0ZW0uby0tdmlwLXNuaWZmIikuYWRkQ2xhc3MoImlzLWFjdGl2ZSIpLCBpc1NuaWZmaW5nICYmIHNuaWZmRG9uZSgpLAogICAgICAgICAgICAgICAgICB0LnN0YXJ0c1dpdGgoImh0dHAiKSA/IHBsYXlWaXBVcmwodCkgOiBhdXRvU25pZmZQbGF5KCksIFN0b3JlLnNldCgibGFzdFBsYXlDaG9pY2UiLCB0KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIE1fU291cmNlKG4pIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuIG4gPyBuLnJlcGxhY2UoLyhcdyspL2csIChmdW5jdGlvbihuLCBlKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIE1fU3RyaW5nKGUpOwogICAgICAgICAgICAgICAgICB9KSkgOiAiIjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIE1fVmlwVXJsKG4pIHsKICAgICAgICAgICAgICAgICAgaWYgKCFuKSByZXR1cm4gIiI7CiAgICAgICAgICAgICAgICAgIGNvbnN0IGUgPSBNX1NvdXJjZShuKTsKICAgICAgICAgICAgICAgICAgcmV0dXJuICJodHRwczovLyIgKyBlICsgKGUuaW5jbHVkZXMoIj8iKSA/ICIiIDogKGUuZW5kc1dpdGgoIi4iKSA/ICJwaHAiIDogL1wvJC8udGVzdChlKSA/ICIiIDogIi8iKSArICI/dXJsIikgKyAiPSI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBpbnNlcnRWaXBTb3VyY2UobikgewogICAgICAgICAgICAgICAgICBmdW5jdGlvbiBlKCkgewogICAgICAgICAgICAgICAgICAgICQoIi5vLS1zZXR0aW5nLWJ1dHRvbiIpLm9mZigiY2xpY2siKS5vbigiY2xpY2siLCAoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICAkKCIuby0tdmlwIikudG9nZ2xlQ2xhc3MoImlzLXNldHRpbmctb24iKTsKICAgICAgICAgICAgICAgICAgICB9KSksICQoIi5vLS10b2dnbGUiKS5vZmYoImNsaWNrIikub24oImNsaWNrIiwgKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS50b2dnbGVDbGFzcygiaXMtbiIpLCAkKHRoaXMpLmhhc0NsYXNzKCJvLS1hY3Rpb24tcGlwIikgPyAoaXNQbGF5aW5nSW5QYWdlID0gIWlzUGxheWluZ0luUGFnZSwKICAgICAgICAgICAgICAgICAgICAgIEdsb2JhbFN0b3JlLnNldCgiaXNQbGF5aW5nSW5QYWdlIiwgaXNQbGF5aW5nSW5QYWdlKSkgOiAkKHRoaXMpLmhhc0NsYXNzKCJvLS1hY3Rpb24tc2tpcC1hZCIpICYmIChpc1NraXBBZFZpZGVvID0gIWlzU2tpcEFkVmlkZW8sCiAgICAgICAgICAgICAgICAgICAgICBTdG9yZS5zZXQoImlzU2tpcEFkVmlkZW8iLCBpc1NraXBBZFZpZGVvKSk7CiAgICAgICAgICAgICAgICAgICAgfSkpLCAkKCIuby0tZWRpdC12aXAtc291cmNlLXBhbmVsIHRleHRhcmVhIikub2ZmKCJpbnB1dCIpLm9uKCJpbnB1dCIsIChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgIEdsb2JhbFN0b3JlLnNldCgiVmlwVXJscyIsICQodGhpcykudmFsKCkpOwogICAgICAgICAgICAgICAgICAgIH0pKSwgJCgiLm8tLXZpcC1pdGVtOm5vdCguby0tbm9ybWFsKSIpLm9mZigiY2xpY2siKS5vbigiY2xpY2siLCAoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICBwbGF5VmlwSXRlbSh0aGlzKTsKICAgICAgICAgICAgICAgICAgICB9KSksICQoIi5vLS1sb2ctYnV0dG9uIikub2ZmKCJjbGljayIpLm9uKCJjbGljayIsIChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgICQoIm9vLWxvZ3MiKS50b2dnbGVDbGFzcygiaXMtYWN0aXZlIik7CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIGxldCB0ID0gMSA8IGFyZ3VtZW50cy5sZW5ndGggJiYgdm9pZCAwICE9PSBhcmd1bWVudHNbMV0gPyBhcmd1bWVudHNbMV0gOiAiYWZ0ZXIiLCBpID0gMiA8IGFyZ3VtZW50cy5sZW5ndGggJiYgdm9pZCAwICE9PSBhcmd1bWVudHNbMl0gPyBhcmd1bWVudHNbMl0gOiAwOwogICAgICAgICAgICAgICAgICBpZiAoMCA8ICQoIi5vLS12aXAiKS5sZW5ndGggfHwgMjAgPCBpKSByZXR1cm47CiAgICAgICAgICAgICAgICAgIGNvbnN0IG8gPSAkKG4pOwogICAgICAgICAgICAgICAgICBpZiAoMCA9PT0gby5sZW5ndGgpIHJldHVybiB2b2lkIHNldFRpbWVvdXQoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgIGluc2VydFZpcFNvdXJjZShuLCB0LCBpICsgMSk7CiAgICAgICAgICAgICAgICAgIH0pLCAyNTApOwogICAgICAgICAgICAgICAgICBjb25zdCBhID0gdmlwVXJscy5sZW5ndGggPiBjb2xsYXBzZU51bTsKICAgICAgICAgICAgICAgICAgbGV0IHIgPSAoaXNNb2JpbGUgPyAiIiA6ICc8ZGl2IGNsYXNzPSJvLS1hY3Rpb24gby0tdG9nZ2xlIG8tLWFjdGlvbi1za2lwLWFkJyArIChpc1NraXBBZFZpZGVvID8gIiIgOiAiIGlzLW4iKSArICciPjxzcGFuIGNsYXNzPSJvLS15Ij7mmK88L3NwYW4+PHNwYW4gY2xhc3M9Im8tLW4iPuWQpjwvc3Bhbj7liqDpgJ/ot7Plub/lkYo8L2Rpdj4nKSArICc8ZGl2IGNsYXNzP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YW5kb20iKSwKICAgICAgICAgICAgICAgICAgICAnPHNwYW4gY2xhc3M9IicgKyBlICsgJyIgX2hyZWY9IicgKyBuLnVybCArICciPicgKyBuLm5hbWUgKyAiPC9zcGFuPiI7CiAgICAgICAgICAgICAgICAgIH0pKS5qb2luKCJcbiIpICsgKGEgPyAnPHNwYW4gY2xhc3M9Im8tLXZpcC1pdGVtIG8tLW5vcm1hbCBvLS1jb2xsYXBzZSI+4p6iPC9zcGFuPicgOiAiIikgKyAiPC9kaXY+IiArIChpc01vYmlsZSA/ICc8ZGl2IGNsYXNzPSJvLS10aXAgby0taGlkZSI+5aSa5pWw6Kej5p6Q5Lya5Zyo56e75Yqo56uv5pi+56S6PHN0cm9uZz7lm77niYflub/lkYo8L3N0cm9uZz7vvIzpnIDmiYvliqjmi6bmiKrjgII8YnI+6YWN5ZCI5rWP6KeI5Zmo55qEPHN0cm9uZz7ll4XmjqLlip/og708L3N0cm9uZz7kvb/nlKjvvIzkvZPpqozmm7TkvbPjgII8L2Rpdj4nIDogIiIpICsgIjwvZGl2PiIpLAogICAgICAgICAgICAgICAgICBhICYmIHNtYXJ0Q29sbGFwc2UoIi5vLS12aXAtaXRlbSIpOwogICAgICAgICAgICAgICAgICBsZXQgcyA9IDAsIGwgPSBzZXRJbnRlcnZhbCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgZSgpLCAxMDAgPCBzKysgJiYgY2xlYXJJbnRlcnZhbChsKTsKICAgICAgICAgICAgICAgICAgfSksIF9NYXRobWluKDIwMCArIDUwICogcywgMWUzKSk7CiAgICAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgY29uc3QgVmlwVXJscyA9ICLlha3npZ7op6PmnpAgaHR0cHM6Ly93ZHMuZWNzeHMuY29tLzIxNzk3NC5odG1sP3VybD1cbjcyMOWFreWFrSBodHRwczovL2p4LnhtZmx2LmNvbS8/dXJsPVxu5bCK5LqrIGh0dHBzOi8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ksICQoIi5vLS12aXAtaXRlbSIpLnJlbW92ZUNsYXNzKCJpcy1hY3RpdmUiKSk7CiAgICAgICAgICAgICAgICB9KSksIEUub24oImVuYWJsZS5zbmlmZiIsIChmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgIG4uZnJvbSA9PT0gU25pZmZDaGVja1VybCAmJiAkKCJvby1pZnJhbWVzID4gaWZyYW1lIikuZWFjaCgoZnVuY3Rpb24obiwgZSkgewogICAgICAgICAgICAgICAgICAgIGUuc3JjID09PSBTbmlmZkNoZWNrVXJsICYmIHJlbW92ZUlmcmFtZShlKTsKICAgICAgICAgICAgICAgICAgfSkpLCBpc0FsbG93SWZyYW1lU25pZmYgfHwgKGlzQWxsb3dJZnJhbWVTbmlmZiA9ICEwLCBpc0FsbG93U25pZmYgPSAhMCwgR2xvYmFsU3RvcmUuc2V0KCJpc0FsbG93SWZyYW1lU25pZmYiLCAhMCksCiAgICAgICAgICAgICAgICAgICQoIi5vLS12aXAiKS5hZGRDbGFzcygiaXMtYWxsb3ctc25pZmYiKSwgJCgiLm8tLXZpcC1pdGVtLmlzLXJhbmRvbSIpLnJlbW92ZSgpLCBzbWFydENvbGxhcHNlKCIuby0tdmlwLWl0ZW0iKSk7CiAgICAgICAgICAgICAgICB9KSksIEUub24oInNuaWZmLmZhaWwiLCAoZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgICBpZiAoaXNBbGxvd1NuaWZmKSB7CiAgICAgICAgICAgICAgICAgICAgcmVtb3ZlSWZyYW1lKGdldElmcmFtZUlkKG4uZnJvbSkpOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KSksIEUub24oInBsYXkudmlkZW8iLCAoZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgICByZW1vdmVJZnJhbWUoZ2V0SWZyYW1lSWQobi5mcm9tKSksIHNuaWZmU3VjY2VzcyhuLnVybCwgbi5mcm9tKTsKICAgICAgICAgICAgICAgIH0pKSwgRS5vbigic25pZmYuYmxvYiIsIChmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgIHJlbW92ZUlmcmFtZShnZXRJZnJhbWVJZChuLmZyb20pKTsKICAgICAgICAgICAgICAgICAgY29uc3QgZSA9IG4uZnJvbS5yZXBsYWNlKC89aHR0cC4rLywgIj0iKTsKICAgICAgICAgICAgICAgICAgbGV0IHQgPSAhMTsKICAgICAgICAgICAgICAgICAgaWYgKCQoIi5vLS12aXAtaXRlbS5pcy1wbGF5LWluLXBhZ2UiKS5lYWNoKChmdW5jdGlvbihuLCBpKSB7CiAgICAgICAgICAgICAgICAgICAgJChpKS5hdHRyKCJfaHJlZiIpID09PSBlICYmICh0ID0gITApOwogICAgICAgICAgICAgICAgICB9KSksICF0KSB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgbiA9IGJsb2JOYW1lc1tibG9iQ291bnQrK10gfHwgIuino+aekCIgKyBibG9iQ291bnQ7CiAgICAgICAgICAgICAgICAgICAgJCgiLm8tLXZpcC1pdGVtLmlzLXBsYXktaW4tcGFnZTpub3QoLmlzLWJsb2IpIikuZXEoMCkuYmVmb3JlKCc8c3BhbiBjbGFzcz0iby0tdmlwLWl0ZW0gaXMtcGxheS1pbi1wYWdlIGlzLWJsb2IiIF9ocmVmPSInICsgZSArICciPicgKyBuICsgIjwvc3Bhbj4iKSwKICAgICAgICAgICAgICAgICAgICAkKCIuby0tdmlwLWl0ZW06bm90KC5vLS1ub3JtYWwpIikub2ZmKCJjbGljayIpLm9uKCJjbGljayIsIChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgIHBsYXlWaXBJdGVtKHRoaXMpOwogICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgY29uc3QgY2hhclRvTnVtID0gZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgICByZXR1cm4gbi5jaGFyQ29kZUF0KDApIC0gOTc7CiAgICAgICAgICAgICAgICB9LCBudW1Ub0NoYXIgPSBmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgIHJldHVybiAoMCwgU3RyaW5nLmZyb21DaGFyQ29kZSkoOTcgKyBuKTsKICAgICAgICAgICAgICAgIH0sIE1fTnVtYmVyID0gZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgICByZXR1cm4gK24gKyAoMSA9PSBuICUgMiA/IC0xIDogMSk7CiAgICAgICAgICAgICAgICB9LCBNX0xldHRlciA9IGZ1bmN0aW9uKG4pIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bVRvQ2hhcihNX051bWJlcihjaGFyVG9OdW0obikpKTsKICAgICAgICAgICAgICAgIH0sIE1fQ2hhciA9IGZ1bmN0aW9uKG4pIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuIC9bYS16XS9pLnRlc3QobikgPyBNX0xldHRlcihuKSA6IC9cZC8udGVzdChuKSA/IE1fTnVtYmVyKG4pIDogIiI7CiAgICAgICAgICAgICAgICB9LCBNX1N0cmluZyA9IGZ1bmN0aW9uKG4pIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuIG4uc3BsaXQoIiIpLnJldmVyc2UoKS5tYXAoKGZ1bmN0aW9uKG4pIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gTV9DaGFyKG4pOwogICAgICAgICAgICAgICAgICB9KSkuam9pbigiIik7CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgbGV0IFZfVSA9ICJ3aS44MTF1c2cubnBkLG9qdS5qd2ZqaTM0Lm9wcyxqb2IuMTM4dXMubnBkwrd3aSxqd2ZqaS5oajduYS5tZCx3aS54eno4OC5ucGQsdS5jemQ2Lm5wZMK3b2p1LHdpbHAuZGQsYmJicmkubnBkwrd3aS4sandmamkubDE5Mi5ucGQsd2kudXNqenZwei5ucGQsdS5mamlwYmFubS5ucGTCt2pxaG1qbsK3anFobWpuLix4eHgudXBubGQueXp3wrd3acK3am9iLG1kLm1iZ3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ZpcC5wYXJ3aXguY29tOjQ0MzMvcGxheWVyLz91cmw9XG7lj6/kuZAgaHR0cHM6Ly93d3cuY2ttb3YudmlwL2FwaS5waHA/dXJsPVxu5Lmd5YWrIGh0dHBzOi8vangueW91eWl0di5jb20vP3VybD1cbuaAneS6kSBodHRwczovL2p4LmFwMnAuY24vP3VybD1cbueBuOS6vyBodHRwczovL3d3dy45MWp4cy5jb20vamlleGkvP3VybD1cbk0zVTggaHR0cHM6Ly9qeC5tM3U4LnR2L2ppZXhpLz91cmw9XG7kupE3MjAgaHR0cHM6Ly9qeC55cGFyc2UuY29tL2luZGV4LnBocD91cmw9XG7njKvop6PmnpAgaHR0cHM6Ly93d3cuY3Vhbi5sYS9tM3U4LnBocD91cmw9XG5IOOino+aekCBodHRwczovL3d3dy5oOGp4LmNvbS9qaWV4aS5waHA/dXJsPSIsIHZpcFVybHMgPSBlbnN1cmVBcnJheShjdXN0b21WaXBVcmxzKS5tYXAoKGZ1bmN0aW9uKG4pIHsKICAgICAgICAgICAgICAgICAgbGV0IGUgPSBuLnNwbGl0KC9ccysvKTsKICAgICAgICAgICAgICAgICAgaWYgKG4gPSBlLnBvcCgpLCAhL15odHRwLis9Ly50ZXN0KG4pKSByZXR1cm4ge307CiAgICAgICAgICAgICAgICAgIGxldCB0ID0gMCA8IGUubGVuZ3RoID8gZS5qb2luKCIgIikgOiBuLm1hdGNoKC9cL1wvKC4rXC4pPyhbXlwvXSspXC5cdytcLy8pWzJdLnJlcGxhY2UoL14oXHcpLywgKGZ1bmN0aW9uKG4pIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbi50b1VwcGVyQ2FzZSgpOwogICAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICAgICAgdXJsOiBuLAogICAgICAgICAgICAgICAgICAgIG5hbWU6IHQKICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIH0pKS5maWx0ZXIoKGZ1b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G4gPSBWX04uc3BsaXQoL1vvvIzjgILvvJtdLykubWFwKChmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG4udHJpbSgpOwogICAgICAgICAgICAgICAgICB9KSkuZmlsdGVyKChmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG47CiAgICAgICAgICAgICAgICAgIH0pKSwgZSA9IG5bcGFyc2VJbnQoRGF0ZS5ub3coKSAvIDFlMyAvIDYwICUgbi5sZW5ndGgpXS5zcGxpdCgiIik7CiAgICAgICAgICAgICAgICAgIFZfVS5zbGljZSgwLCA3KS5tYXAoKGZ1bmN0aW9uKG4sIHQpIHsKICAgICAgICAgICAgICAgICAgICB2aXBVcmxzLnB1c2goewogICAgICAgICAgICAgICAgICAgICAgbmFtZTogZVt0XSwKICAgICAgICAgICAgICAgICAgICAgIHVybDogTV9WaXBVcmwobiksCiAgICAgICAgICAgICAgICAgICAgICBpc1JhbmRvbTogITAKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKCFpc0NoZWNrSWZyYW1lU25pZmYpIHsKICAgICAgICAgICAgICAgICAgJCgiaHRtbCIpLmFwcGVuZCgnPG9vLWlmcmFtZXMgc3R5bGU9InZpc2liaWxpdHk6IGhpZGRlbjsgcG9zaXRpb246IGZpeGVkOyBib3R0b206IDA7IHBvaW50ZXItZXZlbnRzOiBub25lOyI+PC9vby1pZnJhbWVzPicpOwogICAgICAgICAgICAgICAgICBjb25zdCBuID0gYWRkSWZyYW1lKFNuaWZmQ2hlY2tVcmwpOwogICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICByZW1vdmVJZnJhbWUobik7CiAgICAgICAgICAgICAgICAgIH0pLCA1ZTMpLCBpc0NoZWNrSWZyYW1lU25pZmYgPSAhMDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNvbnN0IHZpcHMgPSBBcnJheS5pc0FycmF5KHBsYXlBZGRvbi52aXApID8gcGxheUFkZG9uLnZpcCA6IFsgcGxheUFkZG9uLnZpcCBdOwogICAgICAgICAgICAgICAgdmlwcy5mb3JFYWNoKChmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgIGluc2VydFZpcFNvdXJjZSgobiA9IG4uc3BsaXQoL1xzKlx8XHMqLykpWzBdLCBuWzFdKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgcGxheUFkZG9uLnRpdGxlICYmICFkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIuby0tanVtcCIpICYmIChwbGF5QWRkb24udmlwICYmICQkKChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgIHJldHVybiAkKHBsYXlBZGRvbi50aXRsZSkuZXEoMCkudGV4dCgpOwogICAgICAgICAgICAgIH0pLCAoZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgcGxheUFkZG9uLmZpeFRpdGxlICYmIChuID0gcGxheUFkZG9uLmZpeFRpdGxlKG4pKSwgaW5zZXJ0U2VhcmNoQWRkb24obiwgIi5vLS12aXAtbGlzdCIsICJhZnRlciIpOwogICAgICAgICAgICAgIH0pKSwgcGxheUFkZG9uLmp1bXAgJiYgZ29KdW1wKHBsYXlBZGRvbi5qdW1wLCBwbGF5QWRkb24udGl0bGUpKSwgZXhlY0FkZG9uSnMocGxheUFkZG9uKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCBzZWFyY2hBZGRvbiA9IGFkZG9uLnNlYXJjaDsKICAgICAgICAgICAgaWYgKHNlYXJjaEFkZG9uICYmIElzKHNlYXJjaEFkZG9uLm1hdGNoKSkgewogICAgICAgICAgICAgIGlmIChzZWFyY2hBZGRvbi5qdW1wICYmIGdvSnVtcChzZWFyY2hBZGRvbi5qdW1wLCBzZWFyY2hBZGRvbi5rZXl3b3JkKSwgc2VhcmNoQWRkb24uanVtcFRvICYmICQkKHNlYXJjaEFkZG9uLmp1bXBUb1swXSwgKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgJChzZWFyY2hBZGRvbi5qdW1wVG9bMF0pLmVhY2goKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICBsZXQgbiA9ICQodGhpcykuYXR0cigiaHJlZiIpOwogICAgICAgICAgICAgICAgICAkKHRoaXMpLmF0dHIoImhyZWYiLCBuLnJlcGxhY2Uoc2VhcmNoQWRkb24uanVtcFRvWzFdLCBzZWFyY2hBZGRvbi5qdW1wVG9bMl0pKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICB9KSksIHNlYXJjaEFkZG9uLnJlc3VsdCkgewogICAgICAgICAgICAgICAgY29uc3QgbiA9ICJzdHJpbmciID09IHR5cGVvZiBzZWFyY2hBZGRvbi5yZXN1bHQgPyB7CiAgICAgICAgICAgICAgICAgIHRpdGxlOiBzZWFyY2hBZGRvbi5yZXN1bHQsCiAgICAgICAgICAgICAgICAgIHVybDogc2VhcmNoQWRkb24ucmVzdWx0CiAgICAgICAgICAgICAgICB9IDogc2VhcmNoQWRkb24ucmVzdWx0OwogICAgICAgICAgICAgICAgaWYgKDEgPT09ICQobi50aXRsZSkubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICAgIGNvbnN0IGUgPSAkKG4udGl0bGUpLnRleHQoKTsKICAgICAgICAgICAgICAgICAgaWYgKCEv56ysLnsxLDN9W+Wto+mbhuivnemDqF0uKiQvLnRlc3QoZSkpIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBlID0gJChuLnVybCkuZXEoMCkuYXR0cigiaHJlZiIpOwogICAgICAgICAgICAgICAgICAgIGUgJiYgKGxvY2F0aW9uLmhyZWYgPSBlKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBleGVjQWRkb25KcyhzZWFyY2hBZGRvbik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZXhlY0FkZG9uSnMoYWRkb24pOwogICAgICAgICAgfSkpLCBpc0ZpcnN0UnVuQWRkb24gPSAhMTsKICAgICAgICB9IGVsc2UgaXNGaXJzdFJ1bkFkZG9uICYmICgkKCJodG1sIikucmVtb3ZlQ2xhc3MoIm8tLW1peWluZyBvLS1tIG8tLXBjIG8tLWRlYnVnIiksCiAgICAgICAgc2V0VGltZW91dCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAkaHRtbC5yZW1vdmVBdHRyaWJ1dGUoUExVR0lOX0FUVFIpOwogICAgICAgIH0pLCAxZTMpKTsKICAgICAgfQogICAgICBmdW5jdGlvbiB1cmxEZXRlY3RvcigpIHsKICAgICAgICBzZXRJbnRlcnZhbCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAhZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIGlmIChIcmVmICE9PSB3aW5kb3cubG9jYXRpb24uaHJlZikgewogICAgICAgICAgICAgIGNvbnN0IG4gPSBIcmVmOwogICAgICAgICAgICAgIEhyZWYgPSB3aW5kb3cubG9jYXRpb24uaHJlZiwgRS5lbWl0KCJ1cmwuY2hhbmdlIiwgewogICAgICAgICAgICAgICAgbmV3VXJsOiBIcmVmLAogICAgICAgICAgICAgICAgb2xkVXJsOiBuCiAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0oKTsKICAgICAgICB9KSwgMjUwKTsKICAgICAgfQogICAgICBsZXQgaXNGaXJzdFJ1bkFkZG9uID0gITAsIGlzQ2hlY2tJZnJhbWVTbmlmZiA9ICExOwogICAgICB0cnkgewogICAgICAgIGFkZG9uR28oKTsKICAgICAgfSBjYXRjaCAobikge30KICAgICAgdXJsRGV0ZWN0b3IoKTsKICAgIH0KICB9Cn0oKTsK
Add Comment
Please, Sign In to add comment