Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_网页加速器#0@base64://Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICAgICAgIOe9kemhteWKoOmAn+WZqAovLyBAbmFtZXNwYWNlICAgICAgICAgaHR0cHM6Ly9naXRodWIuY29tL3N5aHl6MTk5MC9pbnN0YW50cGFnZQovLyBAdmVyc2lvbiAgICAgICAgICAgMS4zLjMKLy8gQGF1dGhvciAgICAgICAgICAgIFlvdVhpYW9Ib3UKLy8gQGRlc2NyaXB0aW9uICAgICAgIOiHquWKqOW4ruS9oOWKoOmAn+e9kemhteS4reeahOi2hemTvuaOpe+8jOWKoOW/q+aJk+W8gOe9kemhteeahOmAn+W6pu+8jOWunua1i+espuWQiOadoeS7tueahOe9kemhteaJk+W8gOmAn+W6puWHj+WwkTUwJeS7peS4iuOAggovLyBAbGljZW5zZSAgICAgICAgICAgQUdQTAovLyBAaG9tZXBhZ2UgICAgICAgICAgaHR0cHM6Ly93d3cueW91eGlhb2hvdS5jb20vdG9vbC9pbnN0YWxsLWluc3RhbnRwYWdlLmh0bWwKLy8gQHN1cHBvcnRVUkwgICAgICAgIGh0dHBzOi8vZ2l0aHViLmNvbS9zeWh5ejE5OTAvaW5zdGFudHBhZ2UKLy8gQHJlcXVpcmUgICAgICAgICAgIGh0dHBzOi8vdW5wa2cuY29tL3N3ZWV0YWxlcnQyQDEwLjE2LjYvZGlzdC9zd2VldGFsZXJ0Mi5taW4uanMKLy8gQHJlc291cmNlICAgICAgICAgIHN3YWxTdHlsZSBodHRwczovL3VucGtnLmNvbS9zd2VldGFsZXJ0MkAxMC4xNi42L2Rpc3Qvc3dlZXRhbGVydDIubWluLmNzcwovLyBAbWF0Y2ggICAgICAgICAgICAgKjovLyovKgovLyBAbm9mcmFtZXMKLy8gQHJ1bi1hdCAgICAgICAgICAgIGRvY3VtZW50LWlkbGUKLy8gQGdyYW50ICAgICA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jcmlwdD09CgooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIGxldCB1dGlsID0gewogICAgICAgIGdldFZhbHVlKG5hbWUpIHsKICAgICAgICAgICAgcmV0dXJuIEdNX2dldFZhbHVlKG5hbWUpOwogICAgICAgIH0sCgogICAgICAgIHNldFZhbHVlKG5hbWUsIHZhbHVlKSB7CiAgICAgICAgICAgIEdNX3NldFZhbHVlKG5hbWUsIHZhbHVlKTsKICAgICAgICB9LAoKICAgICAgICBpbmNsdWRlKHN0ciwgYXJyKSB7CiAgICAgICAgICAgIHN0ciA9IHN0ci5yZXBsYWNlKC9bLV9dL2lnLCAnJyk7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwLCBsID0gYXJyLmxlbmd0aDsgaSA8IGw7IGkrKykgewogICAgICAgICAgICAgICAgbGV0IHZhbCA9IGFycltpXTsKICAgICAgICAgICAgICAgIGlmICh2YWwgIT09ICcnICYmIHN0ci50b0xvd2VyQ2FzZSgpLmluZGV4T2YodmFsLnRvTG93ZXJDYXNlKCkpID4gLTEpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfSwKCiAgICAgICAgYWRkU3R5bGUoaWQsIHRhZywgY3NzKSB7CiAgICAgICAgICAgIHRhZyA9IHRhZyB8fCAnc3R5bGUnOwogICAgICAgICAgICBsZXQgZG9jID0gZG9jdW1lbnQsIHN0eWxlRG9tID0gZG9jLmdldEVsZW1lbnRCeUlkKGlkKTsKICAgICAgICAgICAgaWYgKHN0eWxlRG9tKSByZXR1cm47CiAgICAgICAgICAgIGxldCBzdHlsZSA9IGRvYy5jcmVhdGVFbGVtZW50KHRhZyk7CiAgICAgICAgICAgIHN0eWxlLnJlbCA9ICdzdHlsZXNoZWV0JzsKICAgICAgICAgICAgc3R5bGUuaWQgPSBpZDsKICAgICAgICAgICAgdGFnID09PSAnc3R5bGUnID8gc3R5bGUuaW5uZXJIVE1MID0gY3NzIDogc3R5bGUuaHJlZiA9IGNzczsKICAgICAgICAgICAgZG9jLmhlYWQuYXBwZW5kQ2hpbGQoc3R5bGUpOwogICAgICAgIH0sCgogICAgICAgIHJlZzogewogICAgICAgICAgICBjaHJvbWU6IC9eaHR0cHM/OlwvXC9jaHJvbWUuZ29vZ2xlLmNvbVwvd2Vic3RvcmVcLy4rP1wvKFthLXpdezMyfSkoPz1bXC8jP118JCkvLAogICAgICAgICAgICBlZGdlOiAvXmh0dHBzPzpcL1wvbWljcm9zb2Z0ZWRnZS5taWNyb3NvZnQuY29tXC9hZGRvbnNcLy4rP1wvKFthLXpdezMyfSkoPz1bXC8jP118JCkvLAogICAgICAgICAgICBmaXJlZm94OiAvXmh0dHBzPzpcL1wvKHJldmlld2Vyc1wuKT8oYWRkb25zXC5tb3ppbGxhXC5vcmd8YWRkb25zKD86LWRldik/XC5hbGxpem9tXC5vcmcpXC8uKj8oPzphZGRvbnxyZXZpZXcpXC8oW14vPD4iJz8jXSspLywKICAgICAgICAgICAgbWljcm9zb2Z0OiAvXmh0dHBzPzpcL1wvKD86YXBwc3x3d3cpLm1pY3Jvc29mdC5jb21cLyg/OnN0b3JlfHApXC8uKz9cLyhbYS16QS1aXGRdezEwLH0pKD89W1wvIz9dfCQpLywKICAgICAgICB9CiAgICB9OwoKICAgIGxldCBtYWluID0gewogICAgICAgIGluaXRWYWx1ZSgpIHsKICAgICAgICAgICAgbGV0IHZhbHVlID0gW3sKICAgICAgICAgICAgICAgIG5hbWU6ICdzZXR0aW5nX3N1Y2Nlc3NfdGltZXMnLAogICAgICAgICAgICAgICAgdmFsdWU6IDAKICAgICAgICAgICAgfSwgewogICAgICAgICAgICAgICAgbmFtZTogJ2FsbG93X2V4dGVybmFsX2xpbmtzJywKICAgICAgICAgICAgICAgIHZhbHVlOiB0cnVlCiAgICAgICAgICAgIH0sIHsKICAgICAgICAgICAgICAgIG5hbWU6ICdhbGxvd19xdWVyeV9saW5rcycsCiAgICAgICAgICAgICAgICB2YWx1ZTogdHJ1ZQogICAgICAgICAgICB9LCB7CiAgICAgICAgICAgICAgICBuYW1lOiAnZW5hYmxlX3N0b3JlX2xpbmsnLAogICAgICAgICAgICAgICAgdmFsdWU6IHRydWUKICAgICAgICAgICAgfSwgewogICAgICAgICAgICAgICAgbmFtZTogJ2VuYWJsZV90YXJnZXRfc2VsZicsCiAgICAgICAgICAgICAgICB2YWx1ZTogZmFsc2UKICAgICAgICAgICAgfSwgewogICAgICAgICAgICAgICAgbmFtZTogJ2VuYWJsZV9hbmltYXRpb24nLAogICAgICAgICAgICAgICAgdmFsdWU6IGZhbHNlCiAgICAgICAgICAgIH0sIHsKICAgICAgICAgICAgICAgIG5hbWU6ICdkZWxheV9vbl9ob3ZlcicsCiAgICAgICAgICAgICAgICB2YWx1ZTogNjUKICAgICAgICAgICAgfSwgewogICAgICAgICAgICAgICAgbmFtZTogJ2V4Y2x1ZGVfbGlzdCcsCiAgICAgICAgICAgICAgICB2YWx1ZTogJycKICAgICAgICAgICAgfSwgewogICAgICAgICAgICAgICAgbmFtZTogJ2V4Y2x1ZGVfa2V5d29yZCcsCiAgICAgICAgICAgICAgICB2YWx1ZTogJ2xvZ2luXG5sb2dvdXRcbnJlZ2lzdGVyXG5zaWduaW5cbnNpZ251cFxuc2lnbm91dFxucGF5XG5jcmVhdGVcbmVkaXRcbmRvd25sb2FkXG5kZWxcbnJlc2V0XG5zdWJtaXRcbmRvdWJsZWNsaWNrXG5nb29nbGVhZHNcbmV4aXQnCiAgICAgICAgICAgIH1dOwoKICAgICAgICAgICAgdmFsdWUuZm9yRWFjaCgodikgPT4gewogICAgICAgICAgICAgICAgdXRpbC5nZXRWYWx1ZSh2Lm5hbWUpID09PSB1bmRlZmluZWQgJiYgdXRpbC5zZXRWYWx1ZSh2Lm5hbWUsIHYudmFsdWUpOwogICAgICAgICAgICB9KTsKICAgICAgICB9LAoKICAgICAgICByZWdpc3Rlck1lbnVDb21tYW5kKCkgewogICAgICAgICAgICBHTV9yZWdpc3Rlck1lbnVDb21tYW5kKCfwn5qAIOW3suWKoOmAn++8micgKyB1dGlsLmdldFZhbHVlKCdzZXR0aW5nX3N1Y2Nlc3NfdGltZXMnKSArICfmrKEnLCAoKSA9PiB7CiAgICAgICAgICAgICAgICBTd2FsLmZpcmUoewogICAgICAgICAgICAgICAgICAgIHNob3dDYW5jZWxCdXR0b246IHRydWUsCiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfnoa7lrpropoHph43nva7liqDpgJ/mrKHmlbDlkJfvvJ8nLAogICAgICAgICAgICAgICAgICAgIGljb246ICd3YXJuaW5nJywKICAgICAgICAgICAgICAgICAgICBjb25maXJtQnV0dG9uVGV4dDogJ+ehruWumicsCiAgICAgICAgICAgICAgICAgICAgY2FuY2VsQnV0dG9uVGV4dDogJ+WPlua2iCcsCiAgICAgICAgICAgICAgICAgICAgY3VzdG9tQ2xhc3M6IHsKICAgICAgICAgICAgICAgICAgICAgICAgcG9wdXA6ICdpbnN0YW50LXBvcHVwJywKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgfSkudGhlbigocmVzKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHJlcy5pc0NvbmZpcm1lZCkgewogICAgICAgICAgICAgICAgICAgICAgICB1dGlsLnNldFZhbHVlKCdzZXR0aW5nX3N1Y2Nlc3NfdGltZXMnLCAwKTsKICAgICAgICAgICAgICAgICAgICAgICAgaGlzdG9yeS5nbygwKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIEdNX3JlZ2lzdGVyTWVudUNvbW1hbmQoJ+Kame+4jyDorr7nva4nLCAoKSA9PiB7CiAgICAgICAgICAgICAgICBsZXQgZG9tID0gYDxkaXYgc3R5bGU9ImZvbnQtc2l6ZTogMWVtOyI+CiAgICAgICAgICAg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W91eGlhb2hvdS5jb20vdG9vbC9pbnN0YWxsLWluc3RhbnRwYWdlLmh0bWwiIHRhcmdldD0iX2JsYW5rIj7kvb/nlKjor7TmmI48L2E+77yM5Yqp5omL5YWN6LS55byA5rqQ77yMUG93ZXJlZCBieSA8YSBocmVmPSJodHRwczovL3d3dy55b3V4aWFvaG91LmNvbSI+5rK55bCP54y0PC9hPjwvZGl2PicsCiAgICAgICAgICAgICAgICAgICAgY3VzdG9tQ2xhc3M6IHsKICAgICAgICAgICAgICAgICAgICAgICAgcG9wdXA6ICdpbnN0YW50LXBvcHVwJywKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgfSkudGhlbigocmVzKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgaWYgKHJlcy5pc0NvbmZpcm1lZCkgewogICAgICAgICAgICAgICAgICAgICAgICBoaXN0b3J5LmdvKDApOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdTLUV4dGVybmFsJykuYWRkRXZlbnRMaXN0ZW5lcignY2hhbmdlJywgKGUpID0+IHsKICAgICAgICAgICAgICAgICAgICB1dGlsLnNldFZhbHVlKCdhbGxvd19leHRlcm5hbF9saW5rcycsIGUuY3VycmVudFRhcmdldC5jaGVja2VkKTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ1MtUXVlcnknKS5hZGRFdmVudExpc3RlbmVyKCdjaGFuZ2UnLCAoZSkgPT4gewogICAgICAgICAgICAgICAgICAgIHV0aWwuc2V0VmFsdWUoJ2FsbG93X3F1ZXJ5X2xpbmtzJywgZS5jdXJyZW50VGFyZ2V0LmNoZWNrZWQpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnUy1TdG9yZScpLmFkZEV2ZW50TGlzdGVuZXIoJ2NoYW5nZScsIChlKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgdXRpbC5zZXRWYWx1ZSgnZW5hYmxlX3N0b3JlX2xpbmsnLCBlLmN1cnJlbnRUYXJnZXQuY2hlY2tlZCk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdTLVRhcmdldCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NoYW5nZScsIChlKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgdXRpbC5zZXRWYWx1ZSgnZW5hYmxlX3RhcmdldF9zZWxmJywgZS5jdXJyZW50VGFyZ2V0LmNoZWNrZWQpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnUy1BbmltYXRlJykuYWRkRXZlbnRMaXN0ZW5lcignY2hhbmdlJywgKGUpID0+IHsKICAgICAgICAgICAgICAgICAgICB1dGlsLnNldFZhbHVlKCdlbmFibGVfYW5pbWF0aW9uJywgZS5jdXJyZW50VGFyZ2V0LmNoZWNrZWQpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnUy1EZWxheScpLmFkZEV2ZW50TGlzdGVuZXIoJ2NoYW5nZScsIChlKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgdXRpbC5zZXRWYWx1ZSgnZGVsYXlfb25faG92ZXInLCBlLmN1cnJlbnRUYXJnZXQudmFsdWUpOwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnUy1FeGNsdWRlJykuYWRkRXZlbnRMaXN0ZW5lcignY2hhbmdlJywgKGUpID0+IHsKICAgICAgICAgICAgICAgICAgICB1dGlsLnNldFZhbHVlKCdleGNsdWRlX2xpc3QnLCBlLmN1cnJlbnRUYX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mdldFZhbHVlKCdlbmFibGVfdGFyZ2V0X3NlbGYnKTsKICAgICAgICAgICAgY29uc3QgZW5hYmxlU3RvcmVMaW5rID0gdXRpbC5nZXRWYWx1ZSgnZW5hYmxlX3N0b3JlX2xpbmsnKTsKICAgICAgICAgICAgd2luZG93Lmluc3RhbnRMb2FkZWQgPSB0cnVlOwogICAgICAgICAgICBjb25zdCBleGNsdWRlS2V5d29yZCA9IHV0aWwuZ2V0VmFsdWUoJ2V4Y2x1ZGVfa2V5d29yZCcpLnNwbGl0KCdcbicpOwoKICAgICAgICAgICAgbGV0IGRlbGF5T25Ib3ZlciA9IHV0aWwuZ2V0VmFsdWUoJ2RlbGF5X29uX2hvdmVyJyk7CiAgICAgICAgICAgIGxldCB1c2VNb3VzZWRvd24gPSBmYWxzZTsKICAgICAgICAgICAgbGV0IHVzZU1vdXNlZG93bk9ubHkgPSBmYWxzZTsKICAgICAgICAgICAgbGV0IHVzZVZpZXdwb3J0ID0gZmFsc2U7CgogICAgICAgICAgICBpZiAoJ2luc3RhbnRJbnRlbnNpdHknIGluIGRvY3VtZW50LmJvZHkuZGF0YXNldCkgewogICAgICAgICAgICAgICAgY29uc3QgaW50ZW5zaXR5ID0gZG9jdW1lbnQuYm9keS5kYXRhc2V0Lmluc3RhbnRJbnRlbnNpdHk7CgogICAgICAgICAgICAgICAgaWYgKGludGVuc2l0eS5zdWJzdHIoMCwgJ21vdXNlZG93bicubGVuZ3RoKSA9PT0gJ21vdXNlZG93bicpIHsKICAgICAgICAgICAgICAgICAgICB1c2VNb3VzZWRvd24gPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIGlmIChpbnRlbnNpdHkgPT09ICdtb3VzZWRvd24tb25seScpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdXNlTW91c2Vkb3duT25seSA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnRlbnNpdHkuc3Vic3RyKDAsICd2aWV3cG9ydCcubGVuZ3RoKSA9PT0gJ3ZpZXdwb3J0JykgewogICAgICAgICAgICAgICAgICAgIGlmICghKG5hdmlnYXRvci5jb25uZWN0aW9uICYmIChuYXZpZ2F0b3IuY29ubmVjdGlvbi5zYXZlRGF0YSB8fCAobmF2aWdhdG9yLmNvbm5lY3Rpb24uZWZmZWN0aXZlVHlwZSAmJiBuYXZpZ2F0b3IuY29ubmVjdGlvbi5lZmZlY3RpdmVUeXBlLmluY2x1ZGVzKCcyZycpKSkpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnRlbnNpdHkgPT09ICJ2aWV3cG9ydCIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQuY2xpZW50V2lkdGggKiBkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQuY2xpZW50SGVpZ2h0IDwgNDUwMDAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNlVmlld3BvcnQgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGludGVuc2l0eSA9PT0gInZpZXdwb3J0LWFsbCIpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzZVZpZXdwb3J0ID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgbWlsbGlzZWNvbmRzID0gcGFyc2VJbnQoaW50ZW5zaXR5KTsKICAgICAgICAgICAgICAgICAgICBpZiAoIU51bWJlci5pc05hTihtaWxsaXNlY29uZHMpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGRlbGF5T25Ib3ZlciA9IG1pbGxpc2Vjb25kczsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGlmIChpc1N1cHBvcnRlZCkgewogICAgICAgICAgICAgICAgY29uc3QgZXZlbnRMaXN0ZW5lcnNPcHRpb25zID0gewogICAgICAgICAgICAgICAgICAgIGNhcHR1cmU6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgcGFzc2l2ZTogdHJ1ZSwKICAgICAgICAgICAgICAgIH07CgogICAgICAgICAgICAgICAgaWYgKCF1c2VNb3VzZWRvd25Pbmx5KSB7CiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcigndG91Y2hzdGFydCcsIHRvdWNoc3RhcnRMaXN0ZW5lciwgZXZlbnRMaXN0ZW5lcnNPcHRpb25zKTsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBpZiAoIXVzZU1vdXNlZG93bikgewogICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ21vdXNlb3ZlcicsIG1vdXNlb3Zlckxpc3RlbmVyLCBldmVudExpc3RlbmVyc09wdGlvbnMpOwogICAgICAgICAgICAgICAgfSBlbHNlIGlmICghbW91c2Vkb3duU2hvcnRjdXQpIHsKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKCdtb3VzZWRvd24nLCBtb3VzZWRvd25MaXN0ZW5lciwgZXZlbnRMaXN0ZW5lcnNPcHRpb25zKTsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBpZiAobW91c2Vkb3duU2hvcnRjdXQpIHsKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKCdtb3VzZWRvd24nLCBtb3VzZWRvd25TaG9ydGN1dExpc3RlbmVyLCBldmVudExpc3RlbmVyc09wdGlvbnMpOwogICAgICAgICAgICAgICAgfQoKCiAgICAgICAgICAgICAgICBpZiAodXNlVmlld3BvcnQpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgdHJpZ2dlcmluZ0Z1bmN0aW9uOwogICAgICAgICAgICAgICAgICAgIGlmICh3aW5kb3cucmVxdWVzdElkbGVDYWxsYmFjaykgewogICAgICAgICAgICAgICAgICAgICAgICB0cmlnZ2VyaW5nRnVuY3Rpb24gPSAoY2FsbGJhY2spID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVlc3RJZGxlQ2FsbGJhY2soY2FsbGJhY2ssIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aW1lb3V0OiAxNTAwLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgdHJpZ2dlcmluZ0Z1bmN0aW9uID0gKGNhbGxiYWNrKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFjaygpOwogICAgICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgdHJpZ2dlcmluZ0Z1bmN0aW9uKCgpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgaW50ZXJzZWN0aW9uT2JzZXJ2ZXIgPSBuZXcgSW50ZXJzZWN0aW9uT2JzZXJ2ZXIoKGVudHJpZXMpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudHJpZXMuZm9yRWFjaCgoZW50cnkpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZW50cnkuaXNJbnRlcnNlY3RpbmcpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbGlua0VsZW1lbnQgPSBlbnRyeS50YXJnZXQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludGVyc2VjdGlvbk9ic2VydmVyLnVub2JzZXJ2ZShsaW5rRWxlbWVudCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZWxvYWQobGlua0VsZW1lbnQpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJ2EnKS5mb3JFYWNoKChsaW5rRWxlbWVudCkgPT4gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzUHJlbG9hZGFibGUobGlua0VsZW1lbnQpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50ZXJzZWN0aW9uT2JzZXJ2ZXIub2JzZXJ2ZShsaW5rRWxlbWVudCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CgogICAgICAgICAgICBmdW5jdGlvbiB0b3VjaHN0YXJ0TGlzdGVuZXIoZXZlbnQpIHsKICAgICAgICAgICAgICAgIC8qIENocm9tZSBvbiBBbmRyb2lkIGNhbGxzIG1vdXNlb3ZlciBiZWZvcmUgdG91Y2hjYW5jZWwgc28gYGxhc3RUb3VjaFRpbWVzdGFtcGAKICAgICAgICAgICAgICAgICAqIG11c3QgYmUgYXNzaWduZWQgb24gdG91Y2hzdGFydCB0byBiZSBtZWFzdXJlZCBvbiBtb3VzZW92ZXIuICovCiAgICAgICAgICAgICAgICBsYXN0VG91Y2hUaW1lc3RhbXAgPSBwZXJmb3JtYW5jZS5ub3coKTsKCiAgICAgICAgICAgICAgICBjb25zdCBsaW5rRWxlbWVudCA9IGV2ZW50LnRhcmdldC5jbG9zZXN0KCdhJyk7CgogICAgICAgICAgICAgICAgaWYgKCFpc1ByZWxvYWRhYmxlKGxpbmtFbGVtZW50KSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBwcmVsb2FkKGxpbmtFbGVtZW50KTsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgZnVuY3Rpb24gbW91c2VvdmVyTGlzdGVuZXIoZXZlbnQpIHsKICAgICAgICAgICAgICAgIGlmIChwZXJmb3JtYW5jZS5ub3coKSAtIGxhc3RUb3VjaFRpbWVzdGFtcCA8IERFTEFZX1RPX05PVF9CRV9DT05TSURFUkVEX0FfVE9VQ0hfSU5JVElBVEVEX0FDVElPTikgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBpZiAoISgnY2xvc2VzdCcgaW4gZXZlbnQudGFyZ2V0KSkgewogICAgICAgICAgICAgICAgICAgIC8vIFdpdGhvdXQgdGhpcyBjaGVjayBzb21ldGltZXMgYW4gZXJyb3Ig4oCcZXZlbnQudGFyZ2V0LmNsb3Nlc3QgaXMgbm90IGEgZnVuY3Rpb27igJ0gaXMgdGhyb3duLCBmb3IgdW5rbm93biByZWFzb25zCiAgICAgICAgICAgICAgICAgICAgLy8gVGhhdCBlcnJvciBkZW5vdGVzIHRoYXQgYGV2ZW50LnRhcmdldGAgaXNu4oCZdCB1bmRlZmluZWQuIE15IGJlc3QgZ3Vlc3MgaXMgdGhhdCBpdOKAmXMgdGhlIERvY3VtZW50LgoKICAgICAgICAgICAgICAgICAgICAvLyBEZXRhaWxzIGNvdWxkIGJlIGdsZWFuZWQgZnJvbSB0aHJvd2luZyBzdWNoIGFuIGVycm9yOgogICAgICAgICAgICAgICAgICAgIC8vdGhyb3cgbmV3IFR5cGVFcnJvcihgaW5zdGFudC5wYWdlIG5vbi1lbGVtZW50IGV2ZW50IHRhcmdldDogdGltZVN0YW1wPSR7fn5ldmVudC50aW1lU3RhbXB9LCB0eXBlPSR7ZXZlbnQudHlwZX0sIHR5cGVvZj0ke3R5cGVvZiBldmVudC50YXJnZXR9LCBub2RlVHlwZT0ke2V2ZW50LnRhcmdldC5ub2RlVHlwZX0sIG5vZGVOYW1lPSR7ZXZlbnQudGFyZ2V0Lm5vZGVOYW1lfSwgdmlld3BvcnQ9JHtpbm5lcldpZHRofXgke2lubmVySGVpZ2h0fSwgY29vcmRzPSR7ZXZlbnQuY2xpZW50WH14JHtldmVudC5jbGllbnRZfSwgc2Nyb2xsPSR7c2Nyb2xsWH14JHtzY3JvbGxZfWApCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuCiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgY29uc3QgbGlua0VsZW1lbnQgPSBldmVudC50YXJnZXQuY2xvc2VzdCgnYScpOwoKICAgICAgICAgICAgICAgIGlmICghaXNQcmVsb2FkYWJsZShsaW5rRWxlbWVudCkpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgbGlua0VsZW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignbW91c2VvdXQnLCBtb3VzZW91dExpc3RlbmVyLCB7cGFzc2l2ZTogdHJ1ZX0pOwoKICAgICAgICAgICAgICAgIG1vdXNlb3ZlclRpbWVyID0gc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgcHJlbG9hZChsaW5rRWxlbWVudCk7CiAgICAgICAgICAgICAgICAgICAgbW91c2VvdmVyVGltZXIgPSB1bmRlZmluZWQ7CiAgICAgICAgICAgICAgICB9LCBkZWxheU9uSG92ZXIpOwogICAgICAgICAgICB9CgogICAgICAgICAgICBmdW5jdGlvbiBtb3VzZWRvd25MaXN0ZW5lcihldmVudCkgewogICAgICAgICAgICAgICAgY29uc3QgbGlua0VsZW1lbnQgPSBldmVudC50YXJnZXQuY2xvc2VzdCgnYScpOwoKICAgICAgICAgICAgICAgIGlmICghaXNQcmVsb2FkYWJsZShsaW5rRWxlbWVudCkpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgcHJlbG9hZChsaW5rRWxlbWVudCk7CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGZ1bmN0aW9uIG1vdXNlb3V0TGlzdGVuZXIoZXZlbnQpIHsKICAgICAgICAgICAgICAgIGlmIChldmVudC5yZWxhdGVkVGFyZ2V0ICYmIGV2ZW50LnRhcmdldC5jbG9zZXN0KCdhJykgPT09IGV2ZW50LnJlbGF0ZWRUYXJnZXQuY2xvc2VzdCgnYScpKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGlmIChtb3VzZW92ZXJUaW1lcikgewogICAgICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dChtb3VzZW92ZXJUaW1lcik7CiAgICAgICAgICAgICAgICAgICAgbW91c2VvdmVyVGltZXIgPSB1bmRlZmluZWQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGZ1bmN0aW9uIG1vdXNlZG93blNob3J0Y3V0TGlzdGVuZXIoZXZlbnQpIHsKICAgICAgICAgICAgICAgIGlmIChwZXJmb3JtYW5jZS5ub3coKSAtIGxhc3RUb3VjaFRpbWVzdGFtcCA8IERFTEFZX1RPX05PVF9CRV9DT05TSURFUkVEX0FfVE9VQ0hfSU5JVElBVEVEX0FDVElPTikgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBjb25zdCBsaW5rRWxlbWVudCA9IGV2ZW50LnRhcmdldC5jbG9zZXN0KCdhJyk7CgogICAgICAgICAgICAgICAgaWYgKGV2ZW50LndoaWNoID4gMSB8fCBldmVudC5tZXRhS2V5IHx8IGV2ZW50LmN0cmxLZXkpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgaWYgKCFsaW5rRWxlbWVudCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBsaW5rRWxlbWVudC5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsIGZ1bmN0aW9uIChldmVudCkgewogICAgICAgICAgICAgICAgICAgIGlmIChldmVudC5kZXRhaWwgPT09IDEzMzcpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgICAgIH0sIHtjYXB0dXJlOiB0cnVlLCBwYXNzaXZlOiBmYWxzZSwgb25jZTogdHJ1ZX0pOwoKICAgICAgICAgICAgICAgIGNvbnN0IGN1c3RvbUV2ZW50ID0gbmV3IE1vdXNlRXZlbnQoJ2NsaWNrJywgewogICAgICAgICAgICAgICAgICAgIHZpZXc6IHdpbmRvdywKICAgICAgICAgICAgICAgICAgICBidWJibGVzOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIGNhbmNlbGFibGU6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgZGV0YWlsOiAxMzM3CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIGxpbmtFbGVtZW50LmRpc3BhdGNoRXZlbnQoY3VzdG9tRXZlbnQpOwogICAgICAgICAgICB9CgogICAgICAgICAgICBmdW5jdGlvbiBpc1ByZWxvYWRhYmxlKGxpbmtFbGVtZW50KSB7CiAgICAgICAgICAgICAgICBpZiAoIWxpbmtFbGVtZW50IHx8ICFsaW5rRWxlbWVudC5ocmVmKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGlmICh1dGlsLmluY2x1ZGUobGlua0VsZW1lbnQuaHJlZiwgZXhjbHVkZUtleXdvcmQpKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCF1dGlsLnJlZy5jaHJvbWUudGVzdChsaW5rRWxlbWVudC5ocmVmKSAmJgogICAgICAgICAgICAgICAgICAgICAgICAhdXRpbC5yZWcuZWRnZS50ZXN0KGxpbmtFbGVtZW50LmhyZWYpICYmCiAgICAgICAgICAgICAgICAgICAgICAgICF1dGlsLnJlZy5lZGdlLnRlc3QobGlua0VsZW1lbnQuaHJlZikgJiYKICAgICAgICAgICAgICAgICAgICAgICAgIXV0aWwucmVnLm1pY3Jvc29mdC50ZXN0KGxpbmtFbGVtZW50LmhyZWYpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgaWYgKHVzZVdoaXRlbGlzdCAmJiAhKCdpbnN0YW50JyBpbiBsaW5rRWxlbWVudC5kYXRhc2V0KSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBpZiAoIWFsbG93RXh0ZXJuYWxMaW5rcyAmJiBsaW5rRWxlbWVudC5vcmlnaW4gIT09IGxvY2F0aW9uLm9yaWdpbiAmJiAhKCdpbnN0YW50JyBpbiBsaW5rRWxlbWVudC5kYXRhc2V0KSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBpZiAoIVsnaHR0cDonLCAnaHR0cHM6J10uaW5jbHVkZXMobGlua0VsZW1lbnQucHJvdG9jb2wpKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGlmIChsaW5rRWxlbWVudC5wcm90b2NvbCA9PT0gJ2h0dHA6JyAmJiBsb2NhdGlvbi5wcm90b2NvbCA9PT0gJ2h0dHBzOicpIHsKICAgICAgICAgICAgICAgICAgICBpZiAobGlua0VsZW1lbnQuaHJlZi5pbmRleE9mKCdodHRwOi8vd3d3LmJhaWR1LmNvbS9saW5rP3VybCcpID09PSAwKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmtFbGVtZW50LmhyZWYgPSBsaW5rRWxlbWVudC5ocmVmLnJlcGxhY2UoJ2h0dHAnLCAnaHR0cHMnKTsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy/kuIvovb3mlofku7bkuI3liqDpgJ8KICAgICAgICAgICAgICAgIGlmICgvXC5bYS16QS1aMC05XXswLDV9JC9pLnRlc3QobGlua0VsZW1lbnQuaHJlZikpIHsKICAgICAgICAgICAgICAgICAgICAvL+aOkumZpOWfn+WQje+8jOe9keermeaJqeWxleWQjQogICAgICAgICAgICAgICAgICAgIGlmICghLyhjb218Y258dG9wfGx0ZHxuZXR8dGVjaHxzaG9wfHZpcHx4eXp8d2FuZ3xjbG91ZHxvbmxpbmV8c2l0ZXxsb3ZlfGFydHx4aW58c3RvcmV8ZnVufGNjfHdlYnNpdGV8cHJlc3N8c3BhY2V8YmVlcnxsdXhlfHZpZGVvfHJlbnxncm91cHxmaXR8eW9nYXxvcmd8cHJvfGlua3xiaXp8aW5mb3xkZXNpZ258bGlua3x3b3JrfG1vYml8a2ltfHB1YnxuYW1lfHR2fGNvfGFzaWF8cmVkfGxpdmV8d2lraXxnb3Z8bGlmZXx3b3JsZHxydW58c2hvd3xjaXR5fGdvbGR8dG9kYXl8cGx1c3xjb29sfGljdXxjb21wYW55fGNoYXR8em9uZXxmYW5zfGxhd3xob3N0fGNlbnRlcnxjbHVifGVtYWlsfGZ1bmR8c29jaWFsfHRlYW18Z3VydXxodG18aHRtbHxwaHB8YXNwfGpzcCkkL2kudGVzdChsaW5rRWxlbWVudC5ocmVmKSkgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGlmICghYWxsb3dRdWVyeVN0cmluZyAmJiBsaW5rRWxlbWVudC5zZWFyY2ggJiYgISgnaW5zdGFudCcgaW4gbGlua0VsZW1lbnQuZGF0YXNldCkpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgaWYgKGxpbmtFbGVtZW50Lmhhc2ggJiYgbGlua0VsZW1lbnQucGF0aG5hbWUgKyBsaW5rRWxlbWVudC5zZWFyY2ggPT09IGxvY2F0aW9uLnBhdGhuYW1lICsgbG9jYXRpb24uc2VhcmNoKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGlmIChsaW5rRWxlbWVudC5kYXRhc2V0LmZpbGVuYW1lIHx8IGxpbmtFbGVtZW50LmRhdGFzZXQubm9JbnN0YW50KSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICB9CgogICAgICAgICAgICBmdW5jdGlvbiBwcmVsb2FkKGxpbmtFbGVtZW50KSB7CiAgICAgICAgICAgICAgICBsZXQgdXJsID0gbGlua0VsZW1lbnQuaHJlZjsKCiAgICAgICAgICAgICAgICBpZiAoIWlzT25saW5lKCkpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgaWYgKHByZWZldGNoZXMuaGFzKHVybCkpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgaWYgKGVuYWJsZVN0b3JlTGluaykgewogICAgICAgICAgICAgICAgICAgIGlmICh1dGlsLnJlZy5jaHJvbWUudGVzdCh1cmwpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmtFbGVtZW50LmhyZWYgPSB1cmwucmVwbGFjZSgiY2hyb21lLmdvb2dsZS5jb20iLCAiY2hyb21lLmNyeHNvc28uY29tIik7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmICh1dGlsLnJlZy5lZGdlLnRlc3QodXJsKSkgewogICAgICAgICAgICAgICAgICAgICAgICBsaW5rRWxlbWVudC5ocmVmID0gdXJsLnJlcGxhY2UoIm1pY3Jvc29mdGVkZ2UubWljcm9zb2Z0LmNvbSIsICJtaWNyb3NvZnRlZGdlLmNyeHNvc28uY29tIik7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmICh1dGlsLnJlZy5maXJlZm94LnRlc3QodXJsKSkgewogICAgICAgICAgICAgICAgICAgICAgICBsaW5rRWxlbWVudC5ocmVmID0gdXJsLnJlcGxhY2UoImFkZG9ucy5tb3ppbGxhLm9yZyIsICJhZGRvbnMuY3J4c29zby5jb20iKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKHV0aWwucmVnLm1pY3Jvc29mdC50ZXN0KHVybCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgbGlua0VsZW1lbnQuaHJlZiA9IHVybC5yZXBsYWNlKC8od3d3fGFwcHMpXC5taWNyb3NvZnRcLmNvbS8sICJhcHBzLmNyeHNvc28uY29tIik7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGNvbnN0IHByZWZldGNoZXIgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdsaW5rJyk7CiAgICAgICAgICAgICAgICBwcmVmZXRjaGVyLnJlbCA9ICdwcmVmZXRjaCc7CiAgICAgICAgICAgICAgICBwcmVmZXRjaGVyLmhyZWYgPSB1cmw7CiAgICAgICAgICAgICAgICBkb2N1bWVudC5oZWFkLmFwcGVuZENoaWxkKHByZWZldGNoZXIpOwoKICAgICAgICAgICAgICAgIHByZWZldGNoZXMuYWRkKHVybCk7CgogICAgICAgICAgICAgICAgaWYgKGVuYWJsZUFuaW1hdGlvbikgewogICAgICAgICAgICAgICAgICAgIGxpbmtFbGVtZW50LmNsYXNzTGlzdC5hZGQoImxpbmstaW5zdGFudGVkIik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoZW5hYmxlVGFyZ2V0U2VsZikgewogICAgICAgICAgICAgICAgICAgIGxpbmtFbGVtZW50LnRhcmdldCA9ICdfc2VsZic7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgdXRpbC5zZXRWYWx1ZSgnc2V0dGluZ19zdWNjZXNzX3RpbWVzJywgdXRpbC5nZXRWYWx1ZSgnc2V0dGluZ19zdWNjZXNzX3RpbWVzJykgKyAxKTsKICAgICAgICAgICAgfQogICAgICAgIH0sCgogICAgICAgIGFkZFBsdWdpblN0eWxlKCkgewogICAgICAgICAgICBsZXQgc3R5bGUgPSBgCiAgICAgICAgICAgICAgICAuaW5zdGFudC1wb3B1cCB7IGZvbnQtc2l6ZTogMTRweCAhaW1wb3J0YW50OyB9CiAgICAgICAgICAgICAgICAuaW5zdGFudC1zZXR0aW5nLWxhYmVsIHsgZGlzcGxheTogZmxleDthbGlnbi1pdGVtczogY2VudGVyO2p1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjtwYWRkaW5nLXRvcDogMTVweDsgfQogICAgICAgICAgICAgICAgLmluc3RhbnQtc2V0dGluZy1sYWJlbC1jb2wgeyBkaXNwbGF5OiBmbGV4O2FsaWduLWl0ZW1zOiBmbGV4LXN0YXJ0OztwYWRkaW5nLXRvcDogMTVweDtmbGV4LWRpcmVjdGlvbjpjb2x1bW4gfQogICAgICAgICAgICAgICAgLmluc3RhbnQtc2V0dGluZy1jaGVja2JveCB7IHdpZHRoOiAxNnB4O2hlaWdodDogMTZweDsgfQogICAgICAgICAgICAgICAgLmluc3RhbnQtc2V0dGluZy10ZXh0YXJ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BzdHlsZSk7CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGNvbnN0IGhlYWRPYnNlcnZlciA9IG5ldyBNdXRhdGlvbk9ic2VydmVyKCgpID0+IHsKICAgICAgICAgICAgICAgIHV0aWwuYWRkU3R5bGUoJ3N3YWwtcHViLXN0eWxlJywgJ3N0eWxlJywgR01fZ2V0UmVzb3VyY2VUZXh0KCdzd2FsU3R5bGUnKSk7CiAgICAgICAgICAgICAgICB1dGlsLmFkZFN0eWxlKCdpbnN0YW50LXN0eWxlJywgJ3N0eWxlJywgc3R5bGUpOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgaGVhZE9ic2VydmVyLm9ic2VydmUoZG9jdW1lbnQuaGVhZCwge2NoaWxkTGlzdDogdHJ1ZSwgc3VidHJlZTogdHJ1ZX0pOwogICAgICAgIH0sCgogICAgICAgIGluaXQoKSB7CiAgICAgICAgICAgIHRoaXMuaW5pdFZhbHVlKCk7CiAgICAgICAgICAgIHRoaXMuYWRkUGx1Z2luU3R5bGUoKTsKICAgICAgICAgICAgdGhpcy5yZWdpc3Rlck1lbnVDb21tYW5kKCk7CiAgICAgICAgICAgIGlmICh0aGlzLmluRXhjbHVkZUxpc3QoKSkgcmV0dXJuOwogICAgICAgICAgICB0aGlzLmluc3RhbnRQYWdlKCk7CiAgICAgICAgfQogICAgfTsKICAgIG1haW4uaW5pdCgpOwp9KSgpOwo=
Add Comment
Please, Sign In to add comment