-
Notifications
You must be signed in to change notification settings - Fork 36
/
小阅阅.py
41 lines (40 loc) · 57.1 KB
/
小阅阅.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# -*- coding: utf-8 -*-
#!/usr/bin/env python3
"""
* 仅供学习交流,请在下载后的24小时内完全删除 请勿将任何内容用于商业或非法目的,否则后果自负。
* 小阅阅阅读 V1.91
* 活动入口,微信打开:
* 如果连接过期了运行一下就出来了最新的入口!
* http://18hn.a7c98k.shop/yunonline/v1/auth/2639bb95daba1d99e5338a8c2e21e2f0?codeurl=18hn.a7c98k.shop&codeuserid=2&time=1709021176
* 打开活动入口,抓包的任意接口cookies中的ysm_uid参数
*
* 变量格式:
* 新建同名环境变量
* 变量名:xyyyd
* 变量值:
* # 3000 代表 3毛,后面两个推送参数可不填,那就必须配置全局推送!
* 账号备注#ysm_uid参数#unionId#提现金额如3000#wxpushApptoken#wxpushTopicId
*
* 其他参数说明(脚本最下方填写参数)
* wxpusher全局参数:wxpusherAppToken、wxpusherTopicId
* 具体使用方法请看文档地址:https://wxpusher.zjiecode.com/docs/#/
*
* 也可使用 微信机器人:wechatBussinessKey
*
* 支持支付宝提现:账号备注#ysm_uid参数#unionId#提现金额如3000#wxpushApptoken#wxpushTopicId#支付宝姓名#支付宝账号
* 只想提现支付宝,不想填写其他参数,最少的参数就是:账号备注#ysm_uid参数#unionId####支付宝姓名#支付宝账号
*
* 增加 自定义检测文章等待时间:xyyydReadPostDelay,默认值是 15-20秒
* 增加 精简日志:xyyydReadPureLog,默认值是 true(也就是精简日志,如果需要显示完整的,请设置为 false)
*
* 定时运行每半小时一次
* 达到标准自动提现
* 达到标准,自动提现
"""
# This file requires Python 3.x and the following dependencies:
# - base64
try:
import base64
exec(base64.b64decode('IiIiCiog5LuF5L6b5a2m5Lmg5Lqk5rWB77yM6K+35Zyo5LiL6L295ZCO55qEMjTlsI/ml7blhoXlr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Xh0WzplbmRfaW5kZXhdKQogICAgICAgIGlmIG5vdCBhbGxfbWF0Y2hlczoKICAgICAgICAgICAgYnJlYWsKCiAgICAgICAgc291cmNlID0gc291cmNlX2FmdGVyX2JlZm9yZV90ZXh0W2VuZF9pbmRleCArIGxlbihhZnRlcl90ZXh0KSA6XQogICAgICAgIHN0YXJ0X2luZGV4ID0gc291cmNlLmZpbmQoYmVmb3JlX3RleHQpCgogICAgcmV0dXJuIHJlc3VsdHMgaWYgYWxsX21hdGNoZXMgZWxzZSByZXN1bHRzWzBdIGlmIHJlc3VsdHMgZWxzZSAiIgoKCmRlZiBzYWZlX3JlcXVlc3QobWV0aG9kLCB1cmwsIHJldHJpZXM9MywgKiprd2FyZ3MpOgogICAgZm9yIGkgaW4gcmFuZ2UocmV0cmllcyk6CiAgICAgICAgdHJ5OgogICAgICAgICAgICBpZiBtZXRob2QudXBwZXIoKSA9PSAiR0VUIjoKICAgICAgICAgICAgICAgIHJlc3BvbnNlID0gcmVxdWVzdHMuZ2V0KHVybCwgKiprd2FyZ3MpCiAgICAgICAgICAgIGVsaWYgbWV0aG9kLnVwcGVyKCkgPT0gIlBPU1QiOgogICAgICAgICAgICAgICAgcmVzcG9uc2UgPSByZXF1ZXN0cy5wb3N0KHVybCwgKiprd2FyZ3MpCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICBwcmludChmIuS4jeaUr+aMgeeahOivt+axguexu+Weizoge21ldGhvZH0iKQogICAgICAgICAgICAgICAgcmV0dXJuIE5vbmUKICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlCiAgICAgICAgZXhjZXB0IHJlcXVlc3RzLmV4Y2VwdGlvbnMuUmVxdWVzdEV4Y2VwdGlvbiBhcyBlOgogICAgICAgICAgICBwcmludChmIuivt+axguWksei0pToge2V9IikKICAgICAgICAgICAgaWYgaSA8IHJldHJpZXMgLSAxOiAgIyDlpoLmnpzkuI3mmK/mnIDlkI7kuIDmrKHlsJ3or5XvvIzlsLHnrYnlvoXkuIDmrrXml7bpl7Tlho3ph43or5UKICAgICAgICAgICAgICAgIHdhaXQgPSByYW5kb20ucmFuZGludCgxLCA1KSAgIyDpmo/mnLrnrYnlvoXml7bpl7QKICAgICAgICAgICAgICAgIHByaW50KGYi562J5b6FIHt3YWl0fSDnp5LlkI7ph43or5UuLi4iKQogICAgICAgICAgICAgICAgdGltZS5zbGVlcCh3YWl0KQogICAgICAgICAgICBlbHNlOgogICAgICAgICAgICAgICAgcHJpbnQoIuWwneivleivt+axguWksei0pe+8jOW3sui+vuWIsOacgOWkp+WwneivleasoeaVsCIpCiAgICAgICAgICAgICAgICByZXR1cm4gTm9uZSAgIyDmiJbogIXkvaDlj6/ku6Xov5Tlm57kuIDkuKrnibnlrprnmoTlgLzmiJblr7nosaHmnaXooajnpLror7fmsYLlpLHotKUKCgpkZWYgcHVzaChhcHBUb2tlbiwgdG9waWNJZHMsIHRpdGxlLCBsaW5rLCB0ZXh0KToKICAgIGRhdGFwdXN0ID0gewogICAgICAgICJhcHBUb2tlbiI6IGFwcFRva2VuLAogICAgICAgICJjb250ZW50IjogZiIiIjxib2R5IG9ubG9hZD0id2luZG93LmxvY2F0aW9uLmhyZWY9J3tsaW5rfSciPuWHuueOsOajgOa1i+aWh+eroO+8ge+8ge+8gVxuPGEgc3R5bGU9J3BhZGRpbmc6MTBweDtjb2xvcjpyZWQ7Zm9udC1zaXplOjIwcHg7JyBocmVmPSd7bGlua30nPueCueWHu+aIkeaJk+W8gOW+heajgOa1i+aWh+eroDwvYT5cbuivt+WwveW/q+eCueWHu+mTvuaOpeWujOaIkOmYheivu1xu5aSH5rOo77yae3RleHR9PC9ib2R5PiIiIiwKICAgICAgICAic3VtbWFyeSI6IHRpdGxlIG9yICLlsI/pmIXpmIXpmIXor7siLAogICAgICAgICJjb250ZW50VHlwZSI6IDIsCiAgICAgICAgInRvcGljSWRzIjogW3RvcGljSWRzIG9yICIxMTY4NiJdLAogICAgICAgICJ1cmwiOiBsaW5rLAogICAgfQogICAgIyBwcmludChkYXRhcHVzdCkKICAgIHVybHB1c3QgPSAiaHR0cDovL3d4cHVzaGVyLnpqaWVjb2RlLmNvbS9hcGkvc2VuZC9tZXNzYWdlIgogICAgdHJ5OgogICAgICAgIHAgPSBzYWZlX3JlcXVlc3QoIlBPU1QiLCB1cmw9dXJscHVzdCwganNvbj1kYXRhcHVzdCwgdmVyaWZ5PUZhbHNlKQogICAgICAgICMgcHJpbnQocCkKICAgICAgICBpZiBwLmpzb24oKVsiY29kZSJdID09IDEwMDA6CiAgICAgICAgICAgIHByaW50KCLinIUg5o6o6YCB5paH56ug5Yiw5b6u5L+h5oiQ5Yqf77yM6K+35bC95b+r5YmN5b6A54K55Ye75paH56ug77yM5LiN54S25bCx6buR5Y+35ZWm77yBIikKICAgICAgICAgICAgcmV0dXJuIFRydWUKICAgICAgICBlbHNlOgogICAgICAgICAgICBwcmludCgi4p2MIOaOqOmAgeaWh+eroOWIsOW+ruS/oeWksei0pe+8jOWujOeKiuWtkO+8jOimgem7keWPt+S6hu+8gSIpCiAgICAgICAgICAgIHJldHVybiBGYWxzZQogICAgZXhjZXB0IEV4Y2VwdGlvbiBhcyBlOgogICAgICAgIHByaW50KCLinYwg5o6o6YCB5paH56ug5Yiw5b6u5L+h5aSx6LSl77yM5a6M54qK5a2Q77yM6KaB6buR5Y+35LqG77yBIikKICAgICAgICByYWlzZSBlCiAgICAgICAgcmV0dXJuIEZhbHNlCgoKZGVmIHB1c2hXZWNoYXRCdXNzaW5lc3Mocm9ib3RLZXksIGxpbmspOgogICAgZGF0YXB1c3QgPSB7Im1zZ3R5cGUiOiAidGV4dCIsICJ0ZXh0IjogeyJjb250ZW50IjogbGlua319CiAgICAjIHByaW50KGRhdGFwdXN0KQogICAgdXJscHVzdCA9ICJodHRwczovL3F5YXBpLndlaXhpbi5xcS5jb20vY2dpLWJpbi93ZWJob29rL3NlbmQ/a2V5PSIgKyByb2JvdEtleQogICAgdHJ5OgogICAgICAgIHAgPSBzYWZlX3JlcXVlc3QoIlBPU1QiLCB1cmw9dXJscHVzdCwganNvbj1kYXRhcHVzdCwgdmVyaWZ5PUZhbHNlKQogICAgICAgICMgcHJpbnQocCkKICAgICAgICBpZiBwLmpzb24oKVsiZXJyY29kZSJdID09IDA6CiAgICAgICAgICAgIHByaW50KCLinIUg5o6o6YCB5paH56ug5Yiw5LyB5Lia5b6u5L+h5oiQ5Yqf77yBIikKICAgICAgICAgICAgcmV0dXJuIFRydWUKICAgICAgICBlbHNlOgogICAgICAgICAgICBwcmludCgi4p2MIOaOqOmAgeaWh+eroOWIsOS8geS4muW+ruS/oeWksei0pe+8gSIpCiAgICAgICAgICAgIHJldHVybiBGYWxzZQogICAgZXhjZXB0OgogICAgICAgIHByaW50KCLinYwg5o6o6YCB5paH56ug5Yiw5LyB5Lia5b6u5L+h5aSx6LSl77yBIikKICAgICAgICByZXR1cm4gRmFsc2UKCgpkZWYgZ2V0UG9zdFdlY2hhdEluZm8obGluayk6CiAgICB0cnk6CiAgICAgICAgciA9IHNhZmVfcmVxdWVzdCgiR0VUIiwgbGluaywgdmVyaWZ5PUZhbHNlKQogICAgICAgICMgcHJpbnQobGluaywgci50ZXh0KQogICAgICAgIGh0bWwgPSByZS5zdWIoIlxzIiwgIiIsIHIudGV4dCkKICAgICAgICBiaXogPSByZS5maW5kYWxsKCd2YXJiaXo9IiguKj8pIlx8XHwnLCBodG1sKQogICAgICAgIGlmIGJpeiAhPSBbXToKICAgICAgICAgICAgYml6ID0gYml6WzBdCiAgICAgICAgaWYgYml6ID09ICIiIG9yIGJpeiA9PSBbXToKICAgICAgICAgICAgaWYgIl9fYml6IiBpbiBsaW5rOgogICAgICAgICAgICAgICAgYml6ID0gcmUuZmluZGFsbCgiX19iaXo9KC4qPykmIiwgbGluaykKICAgICAgICAgICAgICAgIGlmIGJpeiAhPSBbXToKICAgICAgICAgICAgICAgICAgICBiaXogPSBiaXpbMF0KICAgICAgICBuaWNrbmFtZSA9IHJlLmZpbmRhbGwoJ3Zhcm5pY2tuYW1lPWh0bWxEZWNvZGVcKCIoLio/KSJcKTsnLCBodG1sKQogICAgICAgIGlmIG5pY2tuYW1lICE9IFtdOgogICAgICAgICAgICBuaWNrbmFtZSA9IG5pY2tuYW1lWzBdCiAgICAgICAgdXNlcl9uYW1lID0gcmUuZmluZGFsbCgndmFydXNlcl9uYW1lPSIoLio/KSI7JywgaHRtbCkKICAgICAgICBpZiB1c2VyX25hbWUgIT0gW106CiAgICAgICAgICAgIHVzZXJfbmFtZSA9IHVzZXJfbmFtZVswXQogICAgICAgIG1zZ190aXRsZSA9IHJlLmZpbmRhbGwoInZhcm1zZ190aXRsZT0nKC4qPyknXC5odG1sXCgiLCBodG1sKQogICAgICAgIGlmIG1zZ190aXRsZSAhPSBbXToKICAgICAgICAgICAgbXNnX3RpdGxlID0gbXNnX3RpdGxlWzBdCiAgICAgICAgdGV4dCA9IGYi5YWs5LyX5Y+35ZSv5LiA5qCH6K+G77yae2Jpen185paH56ugOnttc2dfdGl0bGV9fOS9nOiAhTp7bmlja25hbWV9fOi0puWPtzp7dXNlcl9uYW1lfSIKICAgICAgICBwcmludCh0ZXh0KQogICAgICAgIHJldHVybiBuaWNrbmFtZSwgdXNlcl9uYW1lLCBtc2dfdGl0bGUsIHRleHQsIGJpegogICAgZXhjZXB0IEV4Y2VwdGlvbiBhcyBlOgogICAgICAgICMgcHJpbnQoZSkKICAgICAgICBwcmludCgi4p2MIOaPkOWPluaWh+eroOS/oeaBr+Wksei0pSIpCiAgICAgICAgcmV0dXJuIEZhbHNlCgoKZGVmIHRzKCk6CiAgICByZXR1cm4gc3RyKGludCh0aW1lLnRpbWUoKSkpICsgIjAwMCIKCgpjaGVja0RpY3QgPSB7CiAgICAiTXpreE5URTNNelE0TVE9PSI6IFsi6aaZ5aeQ54ix5peF6KGMIiwgImdoXzU0YTY1ZGM2MDAzOSJdLAogICAgIk16ZzVNak0wTURFd053PT0iOiBbIuaIkeacrOmdnuWHoSIsICJnaF80NmIwNzY5MD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AgICAgICAgdHJ5OgogICAgICAgICAgICByID0gc2FmZV9yZXF1ZXN0KCJHRVQiLCB1KQogICAgICAgICAgICByaiA9IHIuanNvbigpCiAgICAgICAgICAgIGlmIHJqLmdldCgiZXJyY29kZSIpID09IDA6CiAgICAgICAgICAgICAgICBwcmludCgKICAgICAgICAgICAgICAgICAgICBmIui0puWPt1t7c2VsZi5uYW1lfV3ojrflj5bkv6Hmga/miJDlip/vvIzlvZPliY3pmIXor7vmlofnq6Dmr4/nr4flpZblirEge3IuanNvbigpWydkYXRhJ11bJ2F3YXJkJ1195Liq6YeR5biBIgogICAgICAgICAgICAgICAgKQogICAgICAgICAgICAgICAgcmV0dXJuIFRydWUKICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAgIHByaW50KGYi6LSm5Y+3W3tzZWxmLm5hbWV9XeiOt+WPlueUqOaIt+S/oeaBr+Wksei0pe+8jOi0puWPt+W8guW4uCDmiJbogIUgeXNtX3VpZOaXoOaViO+8jOivt+ajgOa1i3lzbV91aWTmmK/lkKbmraPnoa4iKQogICAgICAgICAgICAgICAgcmV0dXJuIEZhbHNlCiAgICAgICAgZXhjZXB0IEV4Y2VwdGlvbiBhcyBlOgogICAgICAgICAgICBwcmludChyLnRleHQpCiAgICAgICAgICAgIHByaW50KGYi6LSm5Y+3W3tzZWxmLm5hbWV9XeiOt+WPlueUqOaIt+S/oeaBr+Wksei0pSx5c21fdWlk5peg5pWI77yM6K+35qOA5rWLeXNtX3VpZOaYr+WQpuato+ehriIpCiAgICAgICAgICAgIHJldHVybiBGYWxzZQoKICAgIGRlZiBoYXNXZWNoYXQoc2VsZik6CiAgICAgICAgciA9ICIiCiAgICAgICAgdHJ5OgogICAgICAgICAgICB1ID0gZiJodHRwOi8ve3NlbGYuZG9tbmFpbkhvc3R9L3l1bm9ubGluZS92MS9oYXNXZWNoYXQ/dW5pb25pZD17c2VsZi51bmlvbklkfSIKICAgICAgICAgICAgciA9IHNhZmVfcmVxdWVzdCgiR0VUIiwgdSkKICAgICAgICAgICAgcHJpbnQoZiLotKblj7dbe3NlbGYubmFtZX1d5Yik5pat5YWs5LyX5Y+35Lu75Yqh5pWw6YeP77yae3IuanNvbigpWydkYXRhJ11bJ2hhcyddfSIpCiAgICAgICAgZXhjZXB0IEV4Y2VwdGlvbiBhcyBlOgogICAgICAgICAgICBwcmludChmIui0puWPt1t7c2VsZi5uYW1lfV3liKTmlq3mmK/lkKbmnInlhazkvJflj7fku7vliqHlpLHotKXvvJp7ci50ZXh0fSIpCiAgICAgICAgICAgIHJldHVybiBGYWxzZQoKICAgIGRlZiBnb2xkKHNlbGYpOgogICAgICAgIHIgPSAiIgogICAgICAgIHRyeToKICAgICAgICAgICAgdSA9IGYiaHR0cDovL3tzZWxmLmRvbW5haW5Ib3N0fS95dW5vbmxpbmUvdjEvZ29sZD91bmlvbmlkPXtzZWxmLnVuaW9uSWR9JnRpbWU9e3RzKCl9IgogICAgICAgICAgICByID0gc2FmZV9yZXF1ZXN0KCJHRVQiLCB1KQogICAgICAgICAgICAjIHByaW50KHIuanNvbigpKQogICAgICAgICAgICByaiA9IHIuanNvbigpCiAgICAgICAgICAgIHNlbGYucmVtYWluID0gbWF0aC5mbG9vcihpbnQocmouZ2V0KCJkYXRhIikuZ2V0KCJsYXN0X2dvbGQiKSkpCiAgICAgICAgICAgIHByaW50KAogICAgICAgICAgICAgICAgZifotKblj7dbe3NlbGYubmFtZX1d5LuK5pel5bey57uP6ZiF6K+75LqGe3JqLmdldCgiZGF0YSIpLmdldCgiZGF5X3JlYWQiKX3nr4fmlofnq6As5Ymp5L2Ze3JqLmdldCgiZGF0YSIpLmdldCgicmVtYWluX3JlYWQiKX3mnKrpmIXor7vvvIzku4rml6Xojrflj5bph5HluIF7cmouZ2V0KCJkYXRhIikuZ2V0KCJkYXlfZ29sZCIpfe+8jOWJqeS9mXtzZWxmLnJlbWFpbn0nCiAgICAgICAgICAgICkKICAgICAgICBleGNlcHQgRXhjZXB0aW9uIGFzIGU6CiAgICAgICAgICAgIHByaW50KGYi6LSm5Y+3W3tzZWxmLm5hbWV9XeiOt+WPlumHkeW4geWksei0pe+8miIsIGUpCiAgICAgICAgICAgICMgcmFpc2UgZQogICAgICAgICAgICByZXR1cm4gRmFsc2UKCiAgICBkZWYgZ2V0S2V5KHNlbGYpOgogICAgICAgIHVrID0gIiIKICAgICAgICB1a1JlcyA9IE5vbmUKICAgICAgICB1ID0gZiJodHRwOi8ve3NlbGYuZG9tbmFpbkhvc3R9L3l1bm9ubGluZS92MS97c2VsZi5yZWFkSnVtcFBhdGh9IgogICAgICAgICMgcHJpbnQoIuaPkOekuiBnZXRLZXnvvJoiLCB1KQogICAgICAgIHAgPSBmInVuaW9uaWQ9e3NlbGYudW5pb25JZH0iCiAgICAgICAgciA9IHNhZmVfcmVxdWVzdCgiUE9TVCIsIHUsIGhlYWRlcnM9c2VsZi5oZWFkZXJzLCBkYXRhPXAsIHZlcmlmeT1GYWxzZSkKICAgICAgICAjIHByaW50KCJnZXRLZXnvvJoiLCByLnRleHQpCiAgICAgICAgcmogPSByLmpzb24oKQogICAgICAgIGRvbWFpbiA9IHJqLmdldCgiZGF0YSIpLmdldCgiZG9tYWluIikKICAgICAgICAjIHByaW50KCLor7fmsYLkuK3ovazpobXvvJoiLCByLnRleHQpCiAgICAgICAgcHAgPSBwYXJzZV9xcyh1cmxwYXJzZShkb21haW4pLnF1ZXJ5KQogICAgICAgIGhuID0gdXJscGFyc2UoZG9tYWluKS5uZXRsb2MKICAgICAgICB1ayA9IHBwLmdldCgidWsiKVswXQogICAgICAgIHVrUmVzID0gci50ZXh0CiAgICAgICAgaWYgdWsgPT0gIiI6CiAgICAgICAgICAgIHByaW50KGYi6LSm5Y+3W3tzZWxmLm5hbWV9XeiOt+WPlnVr5aSx6LSl77yM6L+U5Zue6ZSZ6K+v77yae3VrUmVzfSIpCiAgICAgICAgICAgIHJldHVybgogICAgICAgIHRpbWUuc2xlZXAoOCkKICAgICAgICByID0gc2FmZV9yZXF1ZXN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GF0KDB4NjMwOTA3MWQpIFhXRUIvODQ2MSBGbHVlIiwKICAgICAgICAgICAgfSwKICAgICAgICAgICAgdmVyaWZ5PUZhbHNlLAogICAgICAgICkKICAgICAgICAjIDxzY3JpcHQgc3JjPSJodHRwczovL2ltYWdlLmh6eXNteXkuY24veXVuc2FvbWEvanMvYXJ0aWNsZS5qcz92NC4wIj48L3NjcmlwdD4KICAgICAgICByZWFkSnNWZXJzaW9uID0gZXh0cmFjdF9taWRkbGVfdGV4dChyLnRleHQsICJqcy9hcnRpY2xlLmpzPyIsICciJykKICAgICAgICBjaGVja0pzQ29kZUNoYW5nZWQgPSAoCiAgICAgICAgICAgIGNoZWNrX2ZpbGVfbWQ1KAogICAgICAgICAgICAgICAgZXh0cmFjdF9taWRkbGVfdGV4dChyLnRleHQsICc8c2NyaXB0IHNyYz0iJywgJyI+PC9zY3JpcCcpLAogICAgICAgICAgICAgICAgIjg3MWRhMjljZGNiZmNkMDUxYzRkYmVlY2U3NmRhZmFiIiwKICAgICAgICAgICAgKQogICAgICAgICAgICA9PSBGYWxzZQogICAgICAgICkKICAgICAgICBpZiAocmVhZEpzVmVyc2lvbiAhPSAidjEwLjAiKSBvciBjaGVja0pzQ29kZUNoYW5nZWQ6CiAgICAgICAgICAgIHByaW50KAogICAgICAgICAgICAgICAgZiLotKblj7dbe3NlbGYubmFtZX1dIOajgOa1i+WIsOaOpeWPo+eJiOacrOWPkeeUn+WPmOWMlu+8jOW9k+WJjeaOpeWPo+eJiOacrOS4uu+8mntyZWFkSnNWZXJzaW9ufe+8jOaLieWTjeitpuaKpe+8jOWPsOWtkOaQnuS6i++8jOimgeaKk+S6uuS6hu+8jOW8gOWni+aSpOmAgO+8jOmAgOWHuueoi+W6jyA+PiAiCiAgICAgICAgICAgICkKICAgICAgICAgICAgc3lzLmV4aXQoMCkKICAgICAgICBlbHNlOgogICAgICAgICAgICAjIHByaW50KGYi6LSm5Y+3W3tzZWxmLm5hbWV9XSDpmIXor7vlh4blpIflr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JpLzUzNy4zNiBOZXRUeXBlL1dJRkkgTWljcm9NZXNzZW5nZXIvNy4wLjIwLjE3ODEoMHg2NzAwMTQzQikgV2luZG93c1dlY2hhdCgweDYzMDkwNzFkKSBYV0VCLzg0NjEgRmx1ZSIsCiAgICAgICAgfQogICAgICAgIHJldHVybiB1aywgaAoKICAgIGRlZiByZWFkKHNlbGYpOgogICAgICAgIGluZm8gPSBzZWxmLmdldEtleSgpCiAgICAgICAgaWYgbGVuKGluZm8pID09IDA6CiAgICAgICAgICAgIHByaW50KGYi6LSm5Y+3W3tzZWxmLm5hbWV9XeiOt+WPlumYheivu+WPguaVsOWksei0pe+8jOWBnOatouW+gOWQjumYheivu++8geKaoO+4jyAiKQogICAgICAgICAgICByZXR1cm4KICAgICAgICAjIHByaW50KGluZm8pCiAgICAgICAgdGltZS5zbGVlcCgyKQogICAgICAgIGFyY3RpbGVUaW1lID0gMQogICAgICAgIHdoaWxlIFRydWU6CiAgICAgICAgICAgIHJlcyA9IHsiZXJyY29kZSI6IC0xfQogICAgICAgICAgICByZWZyZXNoVGltZSA9IDAKICAgICAgICAgICAgd2hpbGUgcmVzWyJlcnJjb2RlIl0gIT0gMDoKICAgICAgICAgICAgICAgIHRpbWVTdGFtcCA9IHN0cih0cygpKQogICAgICAgICAgICAgICAgcHNnbiA9IGhhc2hsaWIubWQ1KAogICAgICAgICAgICAgICAgICAgICgKICAgICAgICAgICAgICAgICAgICAgICAgaW5mb1sxXVsiT3JpZ2luIl0ucmVwbGFjZSgiaHR0cHM6Ly8iLCAiIilbMDoxMV0KICAgICAgICAgICAgICAgICAgICAgICAgKyBpbmZvWzBdCiAgICAgICAgICAgICAgICAgICAgICAgICsgdGltZVN0YW1wCiAgICAgICAgICAgICAgICAgICAgICAgICsgIkEmSTI1TElMSVlEUyQiCiAgICAgICAgICAgICAgICAgICAgKS5lbmNvZGUoKQogICAgICAgICAgICAgICAgKS5oZXhkaWdlc3QoKQogICAgICAgICAgICAgICAgIyBwcmludChpbmZvLCB0aW1lU3RhbXApCiAgICAgICAgICAgICAgICBzZWxmLnBhcmFtcyA9IHsKICAgICAgICAgICAgICAgICAgICAidWsiOiBpbmZvWzBdLAogICAgICAgICAgICAgICAgICAgICJ0aW1lIjogdGltZVN0YW1wLAogICAgICAgICAgICAgICAgICAgICJwc2duIjogcHNnbiwKICAgICAgICAgICAgICAgICAgICAidiI6ICI2LjAiLAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdSA9IGYiaHR0cHM6Ly9uc3IuenNmMjAyM2U0NTguY2xvdWQveXVub25saW5lL3YxL2dldHdlbnpoYW5nIgogICAgICAgICAgICAgICAgciA9IHNhZmVfcmVxdWVzdCgKICAgICAgICAgICAgICAgICAgICAiR0VUIiwKICAgICAgICAgICAgICAgICAgICB1LAogICAgICAgICAgICAgICAgICAgIGhlYWRlcnM9aW5mb1sxXSwKICAgICAgICAgICAgICAgICAgICBwYXJhbXM9c2VsZi5wYXJhbXMsCiAgICAgICAgICAgICAgICAgICAgdmVyaWZ5PUZhbHNlLAogICAgICAgICAgICAgICAgICAgIHRpbWVvdXQ9NjAsCiAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICBwcmludCgiLSIgKiA1MCkKICAgICAgICAgICAgICAgICMgcHJpbnQoCiAgICAgICAgICAgICAgICAjICAgICBmIui0puWPt1t7c2VsZi5uYW1lfV3nrKxbe3JlZnJlc2hUaW1lKzF9XeasoeiOt+WPlumYheivu+aWh+eroFt7aW5mb1swXX1d55uu55qE6aG177yae3IudGV4dH0iCiAgICAgICAgICAgICAgICAjICkKICAgICAgICAgICAgICAgICMgcHJpbnQoIumYheivu+aWh+eroOWPguaVsOafpeeci++8miIsIHUsIHNlbGYucGFyYW1zLCByLnRleHQsIGluZm9bMV0pCiAgICAgICAgICAgICAgICBpZiByLnRleHQgYW5kIHIuanNvbigpWyJlcnJjb2RlIl0gPT0gMDoKICAgICAgICAgICAgICAgICAgICByZXMgPSByLmpzb24oKQogICAgICAgICAgICAgICAgICAgIHByaW50KAogICAgICAgICAgICAgICAgICAgICAgICBmIui0puWPt1t7c2VsZi5uYW1lfV3nrKxbe3JlZnJlc2hUaW1lKzF9XeasoeiOt+WPluesrFt7YXJjdGlsZVRpbWV9Xeevh+mYheivu+aWh+eroFt7aW5mb1swXX1d6Lez6L2s6ZO+5o6l5oiQ5YqfIgogICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICAgICAgZGVjb2RlZF9zdHIgPSBqc29uLmxvYWRzKHIudGV4dCkKICAgICAgICAgICAgICAgICAgICBpZiBkZWNvZGVkX3N0clsibXNnIl06CiAgICAgICAgICAgICAgICAgICAgICAgIHByaW50KAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZiLotKblj7dbe3NlbGYubmFtZX1d56ysW3tyZWZyZXNoVGltZSsxfV3mrKHojrflj5bnrKxbe2FyY3RpbGVUaW1lfV3nr4fpmIXor7vmlofnq6Bbe2luZm9bMF19Xei3s+i9rOmTvuaOpeWksei0pe+8mntkZWNvZGVkX3N0clsnbXNnJ119IgogICAgICAgICAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBGYWxzZQogICAgICAgICAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICAgICAgICAgIHByaW50KAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZiLotKblj7dbe3NlbGYubmFtZX1d56ysW3tyZWZyZXNoVGltZSsxfV3mrKHojrflj5bnrKxbe2FyY3RpbGVUaW1lfV3nr4fpmIXor7vmlofnq6Bbe2luZm9bMF19Xei3s+i9rOmTvuaOpeWksei0pe+8mntyLnRleHR9IgogICAgICAgICAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICB0aW1lLnNsZWVwKDEuNSkKICAgICAgICAgICAgICAgIHJlZnJlc2hUaW1lID0gcmVmcmVzaFRpbWUgKyAxCiAgICAgICAgICAgICAgICBpZiByZWZyZXNoVGltZSA+PSA1OgogICAgICAgICAgICAgICAgICAgIHByaW50KGYi4pqg77iPIOi0puWPt1t7c2VsZi5uYW1lfV3ojrflj5bpmIXor7vnrKxbe2FyY3RpbGVUaW1lfV3nr4fmlofnq6Bbe2luZm9bMF19Xei2heaXtuKApuKApiIpCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuCiAgICAgICAgICAgIHdlY2hhdFBvc3RMaW5rID0gIiIKICAgICAgICAgICAgaWYgcmVzLmdldCgiZXJyY29kZSIpID09IDA6CiAgICAgICAgICAgICAgICByZXR1cm5MaW5rID0gIiIKICAgICAgICAgICAgICAgIHRyeToKICAgICAgICAgICAgICAgICAgICByZXR1cm5MaW5rID0gcmVzLmdldCgiZGF0YSIpLmdldCgibGluayIpCiAgICAgICAgICAgICAgICBleGNlcHQgRXhjZXB0aW9uIGFzIGU6CiAgICAgICAgICAgICAgICAgICAgcHJpbnQoCiAgICAgICAgICAgICAgICAgICAgICAgIGYi4pqg77iPIOi0puWPt1t7c2VsZi5uYW1lfV3ojrflj5bpmIXor7vnrKxbe2FyY3RpbGVUaW1lfV3nr4fmlofnq6Bbe2luZm9bMF19XemTvuaOpeWksei0pe+8jOeWkeS8vOWPsOWtkOaOpeWPo+WkquWeg+Wcvu+8jOW0qeS6hu+8jOi/lOWbnuaVsOaNruS4uu+8miIsCiAgICAgICAgICAgICAgICAgICAgICAgIHJlcy5nZXQoImRhdGEiKSwKICAgICAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICAgICAgY29udGludWUKICAgICAgICAgICAgICAgIGlmICJtcC53ZWl4aW4ucXEuY29tIiBpbiByZXR1cm5MaW5rOgogICAgICAgICAgICAgICAgICAgIGlmIHh5eXlkUmVhZFB1cmVMb2cgPT0gRmFsc2U6CiAgICAgICAgICAgICAgICAgICAgICAgIHByaW50KGYi6LSm5Y+3W3tzZWxmLm5hbWV9XSDpmIXor7vnrKxbe2FyY3RpbGVUaW1lfV3nr4flvq7kv6Hmlofnq6DvvJp7cmV0dXJuTGlua30iKQogICAgICAgICAgICAgICAgICAgIHdlY2hhdFBvc3RMaW5rID0gcmV0dXJuTGluawogICAgICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAgICAgICAjIHByaW50KGYi6LSm5Y+3W3tzZWxmLm5hbWV9XSDpmIXor7vnrKxbe2FyY3RpbGVUaW1lfV3nr4fmlofnq6Dlh4blpIfot7PovazvvJp7bGlua30iKQogICAgICAgICAgICAgICAgICAgIHdlY2hhdFBvc3RMaW5rID0gc2VsZi5qdW1wKHJldHVybkxpbmspCiAgICAgICAgICAgICAgICAgICAgaWYgeHl5eWRSZWFkUHVyZUxvZyA9PSBGYWxzZToKICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnQoCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmIui0puWPt1t7c2VsZi5uYW1lfV0g6ZiF6K+756ysW3thcmN0aWxlVGltZX1d56+H5b6u5L+h5paH56ug77yae3dlY2hhdFBvc3RMaW5rfSIKICAgICAgICAgICAgICAgICAgICAgICAgKQogICAgICAgICAgICAgICAgaWYgeHl5eWRSZWFkUHVyZUxvZyA9PSBGYWxzZToKICAgICAgICAgICAgICAgICAgICBwcmludChmIui0puWPt1t7c2VsZi5uYW1lfV0g6ZiF6K+756ysW3thcmN0aWxlVGltZX1d56+H5paH56ug77yae3dlY2hhdFBvc3RMaW5rfSIpCiAgICAgICAgICAgICAgICBzbGVlcFRpbWUgPSByYW5kb20ucmFuZGludCg3LCAxMCkKICAgICAgICAgICAgICAgIGlmICJtcC53ZWl4aW4ucXEuY29tIiBpbiB3ZWNoYXRQb3N0TGluazoKICAgICAgICAgICAgICAgICAgICBwb3N0V2VjaGF0SW5mbyA9IGdldFBvc3RXZWNoYXRJbmZvKHdlY2hhdFBvc3RMaW5rKQogICAgICAgICAgICAgICAgICAgIGlmIHBvc3RXZWNoYXRJbmZvID09IEZhbHNlOgogICAgICAgICAgICAgICAgICAgICAgICBwcmludCgKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYi4pqg77iPIOi0puWPt1t7c2VsZi5uYW1lfV3lm6Ag6I635Y+W5YWs5LyX5Y+35paH56ug5L+h5oGv5LiN5oiQ5Yqf77yM5a+86Ie06ZiF6K+756ysW3thcmN0aWxlVGltZX1d56+H5paH56ugW3tpbmZvWzBdfV0g5aSx6LSl4oCm4oCmIgogICAgICAgICAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBGYWxzZQogICAgICAgICAgICAgICAgICAgICMg5aaC5p6c5piv5qOA5rWL54m55b6B5Yiw55qE5paH56ugIOaIluiAhSDlkI7kuIDnr4fmlofnq6DkuI7liY3kuIDnr4fnm7jkvLwKICAgICAgICAgICAgICAgICAgICBpZiAoCiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrRGljdC5nZXQocG9zdFdlY2hhdEluZm9bNF0pICE9IE5vbmUKICAgICAgICAgICAgICAgICAgICAgICAgb3IgKHJlcy5nZXQoImRhdGEiKS5nZXQoImEiKSA9PSAyKQogICAgICAgICAgICAgICAgICAgICAgICBvciAoIiZjaGtzbT0iIGluIHdlY2hhdFBvc3RMaW5rKQogICAgICAgICAgICAgICAgICAgICAgICBvciAoIl9fYml6IiBub3QgaW4gd2VjaGF0UG9zdExpbmspCiAgICAgICAgICAgICAgICAgICAgKToKICAgICAgICAgICAgICAgICAgICAgICAgc2xlZXBUaW1lID0gcmVhZFBvc3REZWxheSBvciByYW5kb20ucmFuZGludCgxNSwgMjApCiAgICAgICAgICAgICAgICAgICAgICAgIHByaW50KAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZiLimqDvuI8g6LSm5Y+3W3tzZWxmLm5hbWV9XemYheivu+esrFt7YXJjdGlsZVRpbWV9Xeevh+aWh+eroFt7aW5mb1swXX1dIOajgOa1i+WIsOeWkeS8vOajgOa1i+aWh+eroO+8jOato+WcqOaOqOmAge+8jOetieW+hei/h+ajgOa1i++8jOetieW+heaXtumXtO+8mntzbGVlcFRpbWV956eS44CC44CC44CCIgogICAgICAgICAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICAgICAgICAgIGlmIHNlbGYud2VjaGF0QnVzc2luZXNzS2V5OgogICAgICAgICAgICAgICAgICAgICAgICAgICAgcHVzaFdlY2hhdEJ1c3NpbmVzcyhzZWxmLndlY2hhdEJ1c3NpbmVzc0tleSwgd2VjaGF0UG9zdExpbmspCiAgICAgICAgICAgICAgICAgICAgICAgIGVsaWYgc2VsZi5hcHBUb2tlbjoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1c2goCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5hcHBUb2tlbiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLnRvcGljSWRzLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICLlsI/pmIXpmIXpmIXor7vov4fmo4DmtYsiLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdlY2hhdFBvc3RMaW5rLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYi6LSm5Y+3W3tzZWxmLm5hbWV9XemYheivu+esrFt7YXJjdGlsZVRpbWV9Xeevh+aWh+eroFt7aW5mb1swXX1dIOato+WcqOetieW+hei/h+ajgOa1i++8jOetieW+heaXtumXtO+8mntzbGVlcFRpbWV956eSXG7lubvnlJ/mj5DnpLrvvJrlv6vngrnvvIzliKvogL3mkIHml7bpl7TkuobvvIEiLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgKQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnQoCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZiLimqDvuI8g6LSm5Y+3W3tzZWxmLm5hbWV9XemYheivu+esrFt7YXJjdGlsZVRpbWV9Xeevh+aWh+eroFt7aW5mb1swXX1dIOmcgOimgei/h+ajgOa1i++8jOS9huaYr+acqumFjee9ruaOqOmAgXRva2Vu77yM5Li65LqG6YG/5YWN6buR5Y+377yM5YGc5q2i6ZiF6K+744CC44CC44CCIgogICAgICAgICAgICAgICAgICAgICAgICAgICAgKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEZhbHNlCiAgICAgICAgICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnQoCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmIuKchSDotKblj7dbe3NlbGYubmFtZX1d6ZiF6K+756ysW3thcmN0aWxlVGltZX1d56+H5paH56ugW3tpbmZvWzBdfV0g6Z2e5qOA5rWL5paH56ug77yM5qih5ouf6K+7e3NsZWVwVGltZX3np5IiCiAgICAgICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICAgICAgcHJpbnQoCiAgICAgICAgICAgICAgICAgICAgICAgIGYi4pyFIOi0puWPt1t7c2VsZi5uYW1lfV3pmIXor7vnrKxbe2FyY3RpbGVUaW1lfV3nr4fmlofnq6Bbe2luZm9bMF19XSDpnZ7mo4DmtYvmlofnq6DvvIzmqKHmi5/or7t7c2xlZXBUaW1lfeenkiIKICAgICAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICB0aW1lLnNsZWVwKHNsZWVwVGltZSkKICAgICAgICAgICAgICAgIHUxID0gZiJodHRwczovL25zci56c2YyMDIzZTQ1OC5jbG91ZC95dW5vbmxpbmUvdjEvZ2V0X3JlYWRfZ29sZD91az17aW5mb1swXX0mdGltZT17c2xlZXBUaW1lfSZ0aW1lc3RhbXA9e3RzKCl9IgogICAgICAgICAgICAgICAgcjEgPSBzYWZlX3JlcXVlc3QoIkdFVCIsIHUxLCBoZWFkZXJzPWluZm9bMV0sIHZlcmlmeT1GYWxzZSkKICAgICAgICAgICAgICAgIGlmIHIxLnRleHQgYW5kIHIxLmpzb24oKToKICAgICAgICAgICAgICAgICAgICB0cnk6CiAgICAgICAgICAgICAgICAgICAgICAgIHByaW50KAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZiLinIUg6LSm5Y+3W3tzZWxmLm5hbWV9XemYheivu+esrFt7YXJjdGlsZVRpbWV9Xeevh+aWh+eroFt7aW5mb1swXX1d5omA5b6X6YeR5biB77yae3IxLmpzb24oKVsnZGF0YSddWydnb2xkJ1195Liq77yM6LSm5oi35b2T5YmN6YeR5biB77yae3IxLmpzb24oKVsnZGF0YSddWydsYXN0X2dvbGQnXX3kuKrvvIzku4rml6Xlt7Lor7vvvJp7cjEuanNvbigpWydkYXRhJ11bJ2RheV9yZWFkJ1195qyh77yM5LuK5pel5pyq6K+7IHtyMS5qc29uKClbJ2RhdGEnXVsncmVtYWluX3JlYWQnXX3nr4fmlofnq6AiCiAgICAgICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgICAgICBleGNlcHQgRXhjZXB0aW9uIGFzIGU6CiAgICAgICAgICAgICAgICAgICAgICAgIHByaW50KAogICAgICAgICAgICAgICAgICAgICAgICAgICAgZiLinYwg6LSm5Y+3W3tzZWxmLm5hbWV9XemYheivu+esrFt7YXJjdGlsZVRpbWV9Xeevh+aWh+eroFt7aW5mb1swXX1d5byC5bi477yae3IxLmpzb24oKS5nZXQoJ21zZycpfSIKICAgICAgICAgICAgICAgICAgICAgICAgKQogICAgICAgICAgICAgICAgICAgICAgICBpZiAi5pys5qyh6ZiF6K+75peg5pWIIiBpbiByMS5qc29uKCkuZ2V0KCJtc2ciKToKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlCiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhawogICAgICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAgICAgICBwcmludCgKICAgICAgICAgICAgICAgICAgICAgICAgZiLinYwg6LSm5Y+3W3tzZWxmLm5hbWV9XemYheivu+esrFt7YXJjdGlsZVRpbWV9Xeevh+aWh+eroFt7aW5mb1swXX1d5aSx6LSl77yae3IxLnRleHR9IgogICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgICAgICBicmVhawogICAgICAgICAgICBlbGlmIHJlcy5nZXQoImVycmNvZGUiKSA9PSA0MDU6CiAgICAgICAgICAgICAgICBwcmludChmIuKaoO+4jyDotKblj7dbe3NlbGYubmFtZX1d6ZiF6K+756ysW3thcmN0aWxlVGltZX1d56+H5paH56ugW3tpbmZvWzBdfV3pmIXor7vph43lpI0iKQogICAgICAgICAgICAgICAgdGltZS5zbGVlcCgxLjUpCiAgICAgICAgICAgIGVsaWYgcmVzLmdldCgiZXJyY29kZSIpID09IDQwNzoKICAgICAgICAgICAgICAgIHByaW50KGYi4pqg77iPIOi0puWPt1t7c2VsZi5uYW1lfV3pmIXor7vnrKxbe2FyY3RpbGVUaW1lfV3nr4fmlofnq6Bbe2luZm9bMF19XemYheivu+e7k+adnyIpCiAgICAgICAgICAgICAgICByZXR1cm4gVHJ1ZQogICAgICAgICAgICBlbHNlOgogICAgICAgICAgICAgICAgcHJpbnQoZiLimqDvuI8g6LSm5Y+3W3tzZWxmLm5hbWV9XemYheivu+esrFt7YXJjdGlsZVRpbWV9Xeevh+aWh+eroFt7aW5mb1swXX1d5pyq55+l5oOF5Ya1IikKICAgICAgICAgICAgICAgIHRpbWUuc2xlZXAoMS41KQogICAgICAgICAgICBhcmN0aWxlVGltZSA9IGFyY3RpbGVUaW1lICsgMQoKICAgIGRlZiBqdW1wKHNlbGYsIGxpbmspOgogICAgICAgIHByaW50KGYi6LSm5Y+3W3tzZWxmLm5hbWV9XeW8gOWni+acrOasoemYheivu+KApuKApiIpCiAgICAgICAgaG4gPSB1cmxwYXJzZShsaW5rKS5uZXRsb2MKICAgICAgICBoID0gewogICAgICAgICAgICAiSG9zdCI6IGhuLAogICAgICAgICAgICAiQ29ubmVjdGlvbiI6ICJrZWVwLWFsaXZlIiwKICAgICAgICAgICAgIlVwZ3JhZGUtSW5zZWN1cmUtUmVxdWVzdHMiOiAiMSIsCiAgICAgICAgICAgIC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ZvciBrZXksIHZhbHVlIGluIGV4Y2hhbmdlUGFyYW1zLml0ZW1zKCk6CiAgICAgICAgICAgIGV4Y2hhbmdlUGFyYW1zW2tleV0gPSB2YWx1ZVswXQogICAgICAgIHdpdGhkcmF3QmFsYW5jZSA9IHJvdW5kKChpbnQoc2VsZi50eGJ6KSAvIDEwMDAwKSwgMykKICAgICAgICBpZiBnb2xkIG9yIChzZWxmLmJhbGFuY2UgPj0gd2l0aGRyYXdCYWxhbmNlKToKICAgICAgICAgICAgaWYgZ29sZDoKICAgICAgICAgICAgICAgICMg5byA5aeL5o+Q546wCiAgICAgICAgICAgICAgICB1MSA9IGYiaHR0cDovL3tzZWxmLmRvbW5haW5Ib3N0fS95dW5vbmxpbmUvdjEvdXNlcl9nb2xkIgogICAgICAgICAgICAgICAgcDEgPSBmInVuaW9uaWQ9e2V4Y2hhbmdlUGFyYW1zWyd1bmlvbmlkJ119JnJlcXVlc3RfaWQ9e2V4Y2hhbmdlUGFyYW1zWydyZXF1ZXN0X2lkJ119JmdvbGQ9e2dvbGR9IgogICAgICAgICAgICAgICAgciA9IHNhZmVfcmVxdWVzdCgKICAgICAgICAgICAgICAgICAgICAiUE9TVCIsCiAgICAgICAgICAgICAgICAgICAgdTEsCiAgICAgICAgICAgICAgICAgICAgZGF0YT1wMSwKICAgICAgICAgICAgICAgICAgICBoZWFkZXJzPXsKICAgICAgICAgICAgICAgICAgICAgICAgIkFjY2VwdCI6ICJhcHBsaWNhdGlvbi9qc29uLCB0ZXh0L2phdmFzY3JpcHQsICovKjsgcT0wLjAxIiwKICAgICAgICAgICAgICAgICAgICAgICAgIkFjY2VwdC1FbmNvZGluZyI6ICJnemlwLCBkZWZsYXRlIiwKICAgICAgICAgICAgICAgICAgICAgICAgIkFjY2VwdC1MYW5ndWFnZSI6ICJ6aC1DTix6aDtxPTAuOSIsCiAgICAgICAgICAgICAgICAgICAgICAgICJDb250ZW50LVR5cGUiOiAiYXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkOyBjaGFyc2V0PVVURi04IiwKICAgICAgICAgICAgICAgICAgICAgICAgIkNvb2tpZSI6IGYieXNtdWlkPXtzZWxmLnlzbV91aWR9OyBlamVjdENvZGU9MSIsCiAgICAgICAgICAgICAgICAgICAgICAgICJIb3N0IjogZiJ7c2VsZi5kb21uYWluSG9zdH0iLAogICAgICAgICAgICAgICAgICAgICAgICAiT3JpZ2luIjogZiJodHRwOi8ve3NlbGYuZG9tbmFpbkhvc3R9IiwKICAgICAgICAgICAgICAgICAgICAgICAgIlByb3h5LUNvbm5lY3Rpb24iOiAia2VlcC1hbGl2ZSIsCiAgICAgICAgICAgICAgICAgICAgICAgICJSZWZlcmVyIjogZiJodHRwOi8ve3NlbGYuZG9tbmFpbkhvc3R9L3l1bm9ubGluZS92MS9leGNoYW5nZXtzZWxmLmV4Y2hhbmdlUGFyYW1zfSIsCiAgICAgICAgICAgICAgICAgICAgICAgICJVc2VyLUFnZW50IjogIk1vemlsbGEvNS4wIChXaW5kb3dzIE5UIDEwLjA7IFdpbjY0OyB4NjQpIEFwcGxlV2ViS2l0LzUzNy4zNiAoS0hUTUwsIGxpa2UgR2Vja28pIENocm9tZS8xMDcuMC4wLjAgU2FmYXJpLzUzNy4zNiBOZXRUeXBlL1dJRkkgTWljcm9NZXNzZW5nZXIvNy4wLjIwLjE3ODEoMHg2NzAwMTQzQikgV2luZG93c1dlY2hhdCgweDYzMDkwNzFkKSBYV0VCLzg0NjEgRmx1ZSIsCiAgICAgICAgICAgICAgICAgICAgICAgICJYLVJlcXVlc3RlZC1XaXRoIjogIlhNTEh0dHBSZXF1ZXN0IiwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIHZlcmlmeT1GYWxzZSwKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgIHRyeToKICAgICAgICAgICAgICAgICAgICByZXMgPSByLmpzb24oKQogICAgICAgICAgICAgICAgICAgIGlmIHJlcy5nZXQoImVycmNvZGUiKSA9PSAwOgogICAgICAgICAgICAgICAgICAgICAgICB3aXRoZHJhd0JhbGFuY2VOdW0gPSBzZWxmLmJhbGFuY2UgKyBmbG9hdChyZXNbImRhdGEiXVsibW9uZXkiXSkKICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnQoCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmIuKchSDotKblj7dbe3NlbGYubmFtZX1dIOmHkeW4geWFkeaNouS4uueOsOmHkeaIkOWKn++8jOW8gOWni+aPkOeOsO+8jOmihOiuoeWIsOi0piB7d2l0aGRyYXdCYWxhbmNlTnVtfSDlhYMgPj4+ICIKICAgICAgICAgICAgICAgICAgICAgICAgKQogICAgICAgICAgICAgICAgICAgICAgICBpZiB3aXRoZHJhd0JhbGFuY2VOdW0gPCB3aXRoZHJhd0JhbGFuY2U6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmludChmIui0puWPt1t7c2VsZi5uYW1lfV3msqHmnInovr7liLDmj5DnjrDmoIflh4Yge3dpdGhkcmF3QmFsYW5jZX0g5YWDIikKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBGYWxzZQogICAgICAgICAgICAgICAgICAgICAgICBzZWxmLndpdGhkcmF3UG9zdChleGNoYW5nZVBhcmFtcykKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuCiAgICAgICAgICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnQoCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmIui0puWPt1t7c2VsZi5uYW1lfV0g6YeR5biB5YWR5o2i5Li6546w6YeR5aSx6LSl77yaIiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIudGV4dCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICIg5o+Q546w5Zyw5Z2A77yaIiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUxLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgIiDmj5DnjrDlj4LmlbDvvJoiLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgcDEsCiAgICAgICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgIGV4Y2VwdCBFeGNlcHRpb24gYXMgZToKICAgICAgICAgICAgICAgICAgICAjIHJhaXNlIGUKICAgICAgICAgICAgICAgICAgICAjIOWkhOeQhuW8guW4uAogICAgICAgICAgICAgICAgICAgIHByaW50KGYi6LSm5Y+3W3tzZWxmLm5hbWV9XSDmj5DnjrDlpLHotKXvvJoiLCBlKQogICAgICAgICAgICBzZWxmLndpdGhkcmF3UG9zdChleGNoYW5nZVBhcmFtcykKCiAgICBkZWYgaW5pdChzZWxmKToKICAgICAgICB0cnk6CiAgICAgICAgICAgIGNoYXJhY3RlcnMgPSBzdHJpbmcuYXNjaWlfbGV0dGVycyArIHN0cmluZy5kaWdpdHMKICAgICAgICAgICAgciA9IHNhZmVfcmVxdWVzdCgKICAgICAgICAgICAgICAgICJHRVQiLAogICAgICAgICAgICAgICAgZiJodHRwczovL25zci56c2YyMDIzZTQ1OC5jbG91ZC95dW5vbmxpbmUvdjEvZ2V0Y2hhdHNpdGU/dD17dGltZS50aW1lKCl9JmNpZD17Jycuam9pbihyYW5kb20uY2hvaWNlcyhjaGFyYWN0ZXJzLCBrPTMyKSl9JmNvZGU9MDgxa3RSRmExVE02MEgwZ3I0R2ExVXsnJy5qb2luKHJhbmRvbS5jaG9pY2VzKGNoYXJhY3RlcnMsIGs9MTApKX0mc3RhdGU9MSIsCiAgICAgICAgICAgICAgICB2ZXJpZnk9RmFsc2UsCiAgICAgICAgICAgICkKICAgICAgICAgICAgc2VsZi5kb21uYWluSG9zdCA9IHIuanNvbigpWyJkYXRhIl1bImx1b2RpIl0uc3BsaXQoIi8iKVsyXQogICAgICAgICAgICAjIHByaW50KHIudGV4dCkKICAgICAgICAgICAgaWYgeHl5eWRSZWFkUHVyZUxvZyA9PSBGYWxzZToKICAgICAgICAgICAgICAgIHByaW50KGYi6LSm5Y+3W3tzZWxmLm5hbWV9Xe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ICAgICAgIkNvb2tpZSI6IGYieXNtX3VpZD17c2VsZi55c21fdWlkfTsiLAogICAgICAgICAgICB9CiAgICAgICAgICAgICMg6I635Y+WcmVxdWVzdElkCiAgICAgICAgICAgIHNlbGYuc2lnbmlkID0gIiIKICAgICAgICAgICAgZm9yIGkgaW4gcmFuZ2UoMyk6CiAgICAgICAgICAgICAgICByID0gc2FmZV9yZXF1ZXN0KAogICAgICAgICAgICAgICAgICAgICJHRVQiLAogICAgICAgICAgICAgICAgICAgIGYiaHR0cDovL3tzZWxmLmRvbW5haW5Ib3N0fS8iLAogICAgICAgICAgICAgICAgICAgIGhlYWRlcnM9ewogICAgICAgICAgICAgICAgICAgICAgICAiVXBncmFkZS1JbnNlY3VyZS1SZXF1ZXN0cyI6ICIxIiwKICAgICAgICAgICAgICAgICAgICAgICAgIlVzZXItQWdlbnQiOiAiTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzEwNy4wLjAuMCBTYWZhcmkvNTM3LjM2IE5ldFR5cGUvV0lGSSBNaWNyb01lc3Nlbmdlci83LjAuMjAuMTc4MSgweDY3MDAxNDNCKSBXaW5kb3dzV2VjaGF0KDB4NjMwOTA3MWQpIFhXRUIvODQ2MSBGbHVlIiwKICAgICAgICAgICAgICAgICAgICAgICAgIkFjY2VwdCI6ICJ0ZXh0L2h0bWwsYXBwbGljYXRpb24veGh0bWwreG1sLGFwcGxpY2F0aW9uL3htbDtxPTAuOSxpbWFnZS9hdmlmLGltYWdlL3dlYnAsaW1hZ2UvYXBuZywqLyo7cT0wLjgsYXBwbGljYXRpb24vc2lnbmVkLWV4Y2hhbmdlO3Y9YjM7cT0wLjkiLAogICAgICAgICAgICAgICAgICAgICAgICAiQWNjZXB0LUVuY29kaW5nIjogImd6aXAsIGRlZmxhdGUiLAogICAgICAgICAgICAgICAgICAgICAgICAiQWNjZXB0LUxhbmd1YWdlIjogInpoLUNOLHpoO3E9MC45IiwKICAgICAgICAgICAgICAgICAgICAgICAgIkNvb2tpZSI6IGYieXNtdWlkPXtzZWxmLnlzbV91aWR9IiwKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIHZlcmlmeT1GYWxzZSwKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgIGh0bWx0ZXh0ID0gci50ZXh0CiAgICAgICAgICAgICAgICBpZiByLmhpc3Rvcnk6CiAgICAgICAgICAgICAgICAgICAgZm9yIHJlc3AgaW4gci5oaXN0b3J5OgogICAgICAgICAgICAgICAgICAgICAgICBpZiAib3Blbi53ZWl4aW4ucXEuY29tIiBpbiByZXNwLmhlYWRlcnNbIkxvY2F0aW9uIl06CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmludCgKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmIui0puWPt1t7c2VsZi5uYW1lfV0gQ29va2ll5bey6L+H5pyf77yM6K+36YeN6L+b5LiA5LiL572R56uZ77yM5bCx5Lya6Ieq5Yqo5pu05pawQ29va2ll77yI55uu5YmN5LiN56Gu5a6a6L+H5pyf5piv5Zug5Li66Ieq5bex5omL5Yqo6L+b5Y676L+H5LqG6L+Y5piv5LuA5LmI5YW25LuW5Y6f5Zug77yJIgogICAgICAgICAgICAgICAgICAgICAgICAgICAgKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEZhbHNlCiAgICAgICAgICAgICAgICByZXMxID0gcmUuc3ViKCJccyIsICIiLCBodG1sdGV4dCkKICAgICAgICAgICAgICAgIHNpZ25pZGwgPSByZS5maW5kYWxsKCdcKVx8XHwiKC4qPykiOycsIHJlczEpCiAgICAgICAgICAgICAgICAjIHByaW50KHNpZ25pZGwsIGh0bWx0ZXh0KQogICAgICAgICAgICAgICAgaWYgIuivpei0puWPt+WtmOWcqOi/neinhOaTjeS9nO+8jOW3suiiq+WwgeemgSIgaW4gaHRtbHRleHQ6CiAgICAgICAgICAgICAgICAgICAgcHJpbnQoZiLotKblj7dbe3NlbGYubmFtZX1dIOWtmOWcqOi/neinhOaTjeS9nO+8jOW3suiiq+Wwgeemge+8jOWHieWHie+8jOi/h+S4pOS4quaciOWGjeeci+eci+ino+ayoeino+WwgeWQp34gIikKICAgICAgICAgICAgICAgICAgICByZXR1cm4gRmFsc2UKICAgICAgICAgICAgICAgIGlmIHNpZ25pZGwgPT0gW106CiAgICAgICAgICAgICAgICAgICAgdGltZS5zbGVlcCgxKQogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlCiAgICAgICAgICAgICAgICBlbHNlOgogICAgICAgICAgICAgICAgICAgIHNlbGYuc2lnbmlkID0gc2lnbmlkbFswXQogICAgICAgICAgICAgICAgICAgIGJyZWFrCiAgICAgICAgICAgICMg6I635Y+W5o+Q546w6aG16Z2i5Zyw5Z2ACiAgICAgICAgICAgIHIgPSBzYWZlX3JlcXVlc3QoCiAgICAgICAgICAgICAgICAiR0VUIiwKICAgICAgICAgICAgICAgIGYiaHR0cDovL3tzZWxmLmRvbW5haW5Ib3N0fS8/Y2F0ZT0wIiwKICAgICAgICAgICAgICAgIGhlYWRlcnM9ewogICAgICAgICAgICAgICAgICAgICJVcGdyYWRlLUluc2VjdXJlLVJlcXVlc3RzIjogIjEiLAogICAgICAgICAgICAgICAgICAgICJVc2VyLUFnZW50IjogIk1vemlsbGEvNS4wIChXaW5kb3dzIE5UIDEwLjA7IFdpbjY0OyB4NjQpIEFwcGxlV2ViS2l0LzUzNy4zNiAoS0hUTUwsIGxpa2UgR2Vja28pIENocm9tZS8xMDcuMC4wLjAgU2FmYXJpLzUzNy4zNiBOZXRUeXBlL1dJRkkgTWljcm9NZXNzZW5nZXIvNy4wLjIwLjE3ODEoMHg2NzAwMTQzQikgV2luZG93c1dlY2hhdCgweDYzMDkwNzFkKSBYV0VCLzg0NjEgRmx1ZSIsCiAgICAgICAgICAgICAgICAgICAgIkFjY2VwdCI6ICJ0ZXh0L2h0bWwsYXBwbGljYXRpb24veGh0bWwreG1sLGFwcGxpY2F0aW9uL3htbDtxPTAuOSxpbWFnZS9hdmlmLGltYWdlL3dlYnAsaW1hZ2UvYXBuZywqLyo7cT0wLjgsYXBwbGljYXRpb24vc2lnbmVkLWV4Y2hhbmdlO3Y9YjM7cT0wLjkiLAogICAgICAgICAgICAgICAgICAgICJBY2NlcHQtRW5jb2RpbmciOiAiZ3ppcCwgZGVmbGF0ZSIsCiAgICAgICAgICAgICAgICAgICAgIkFjY2VwdC1MYW5ndWFnZSI6ICJ6aC1DTix6aDtxPTAuOSIsCiAgICAgICAgICAgICAgICAgICAgIkNvb2tpZSI6IGYieXNtdWlkPXtzZWxmLnlzbV91aWR9IiwKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB2ZXJpZnk9RmFsc2UsCiAgICAgICAgICAgICkKICAgICAgICAgICAgaHRtbHRleHQgPSByLnRleHQKICAgICAgICAgICAgcmVhZF9qdW1wX3JlYWRfdGV4dCA9IGV4dHJhY3RfbWlkZGxlX3RleHQoCiAgICAgICAgICAgICAgICBodG1sdGV4dCwKICAgICAgICAgICAgICAgICJmdW5jdGlvbiByZWFkX2p1bXBfcmVhZCh0eXBlLHRpbWUpeyIsCiAgICAgICAgICAgICAgICAic3VjY2VzczogZnVuY3Rpb24ocmVzKSB7IiwKICAgICAgICAgICAgKQogICAgICAgICAgICBpZiByZWFkX2p1bXBfcmVhZF90ZXh0OgogICAgICAgICAgICAgICAgcmVhZEp1bXBQYXRoID0gZXh0cmFjdF9taWRkbGVfdGV4dCgKICAgICAgICAgICAgICAgICAgICByZWFkX2p1bXBfcmVhZF90ZXh0LCAidXJsOiBkb21haW4rJyIsICInLCIKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgIGlmIHJlYWRKdW1wUGF0aDoKICAgICAgICAgICAgICAgICAgICBzZWxmLnJlYWRKdW1wUGF0aCA9IHJlYWRKdW1wUGF0aAogICAgICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAgICAgICBwcmludCgKICAgICAgICAgICAgICAgICAgICAgICAgZiLotKblj7dbe3NlbGYubmFtZX1dIOWIneWni+WMluWksei0pe+8jOivt+aJi+WKqOiuv+mXruS4i+ehruiupOmhtemdouayoeW0qea6gyDmiJbogIUg56iN5ZCO5YaN6K+V5ZCn77yM5LiA55u05LiN6KGM77yM6K+35YmN5b6AVEfnvqTlj43ppoh+ICIKICAgICAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEZhbHNlCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICBpZiAi5a2Y5Zyo6L+d6KeE5pON5L2cIiBpbiBodG1sdGV4dDoKICAgICAgICAgICAgICAgICAgICBwcmludChmIui0puWPt1t7c2VsZi5uYW1lfV0g6KKr5qOA5rWL5Yiw5LqG77yM5bey57uP6KKr5bCB77yM57uI5q2i5Lu75Yqh77yM5b+r5Y675o+Q6YaS5aSn5a625ZCnfiAiKQogICAgICAgICAgICAgICAgICAgIHN5cy5leGl0KDApCiAgICAgICAgICAgICAgICBlbHNlOgogICAgICAgICAgICAgICAgICAgIHByaW50KAogICAgICAgICAgICAgICAgICAgICAgICBmIui0puWPt1t7c2VsZi5uYW1lfV0g5Yid5aeL5YyW5aSx6LSl77yM6K+35omL5Yqo6K6/6Zeu5LiL56Gu6K6k6aG16Z2i5rKh5bSp5rqDIOaIluiAhSDnqI3lkI7lho3or5XlkKfvvIzkuIDnm7TkuI3ooYzvvIzor7fliY3lvoBUR+e+pOWPjemmiH4gIgogICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgICAgICByZXR1cm4gRmFsc2UKICAgICAgICAgICAgcmVzMSA9IHJlLnN1YigiXHMiLCAiIiwgaHRtbHRleHQpCiAgICAgICAgICAgIHNpZ25pZGwgPSByZS5maW5kYWxsKCcveXVub25saW5lL3YxL2V4Y2hhbmdlKC4qPykiJywgcmVzMSkKICAgICAgICAgICAgIyBwcmludCgi5Yid5aeL5YyWIOaPkOeOsOWPguaVsDoiLCBzaWduaWRsWzBdKQogICAgICAgICAgICBpZiBzaWduaWRsID09IFtdOgogICAgICAgICAgICAgICAgcHJpbnQoZiLotKblj7dbe3NlbGYubmFtZX1d5Yid5aeL5YyWIOaPkOeOsOWPguaVsCDlpLHotKUs6LSm5Y+35byC5bi4IikKICAgICAgICAgICAgICAgIHJldHVybiBGYWxzZQogICAgICAgICAgICBlbHNlOgogICAgICAgICAgICAgICAgc2VsZi5leGNoYW5nZVBhcmFtcyA9IHNpZ25pZGxbMF0KICAgICAgICAgICAgcmV3YXJkTnVtUmVzdWx0ID0gcmUuc2VhcmNoKAogICAgICAgICAgICAgICAgJ2RpdiBjbGFzcz0ibnVtIG51bWJlciByZXdhcmROdW0iPiguKj8pPC8nLCBodG1sdGV4dAogICAgICAgICAgICApCiAgICAgICAgICAgICMgcHJpbnQoIuWIneWni+WMliDmj5DnjrDlj4LmlbA6Iiwgc2lnbmlkbFswXSkKICAgICAgICAgICAgaWYgcmV3YXJkTnVtUmVzdWx0ID09IFtdOgogICAgICAgICAgICAgICAgcHJpbnQoZiLotKblj7dbe3NlbGYubmFtZX1d5Yid5aeL5YyWIOaPkOeOsOWPguaVsCDlpLHotKUs6LSm5Y+35byC5bi4IikKICAgICAgICAgICAgICAgIHJldHVybiBGYWxzZQogICAgICAgICAgICBlbHNlOgogICAgICAgICAgICAgICAgc2VsZi5iYWxhbmNlID0gZmxvYXQocmV3YXJkTnVtUmVzdWx0WzFdKQogICAgICAgICAgICBpZiBzZWxmLnNpZ25pZCA9PSAiIjoKICAgICAgICAgICAgICAgIHByaW50KGYi6LSm5Y+3W3tzZWxmLm5hbWV9XeWIneWni+WMliByZXF1ZXN0SWQg5aSx6LSlLOi0puWPt+W8guW4uCIpCiAgICAgICAgICAgICAgICByZXR1cm4gRmFsc2UKICAgICAgICAgICAgcmV0dXJuIFRydWUKICAgICAgICBleGNlcHQgRXhjZXB0aW9uIGFzIGU6CiAgICAgICAgICAgICMgcmFpc2UgZQogICAgICAgICAgICBwcmludChmIui0puWPt1t7c2VsZi5uYW1lfV3liJ3lp4vljJblpLHotKUs6K+35qOA5p+l5L2g55qEY2siKQogICAgICAgICAgICByZXR1cm4gRmFsc2UKCiAgICBkZWYgcnVuKHNlbGYpOgogICAgICAgIGlmIHNlbGYuaW5pdCgpOgogICAgICAgICAgICBzZWxmLnVzZXJfaW5mbygpCiAgICAgICAgICAgIHNlbGYuaGFzV2VjaGF0KCkKICAgICAgICAgICAgc2VsZi5nb2xkKCkKICAgICAgICAgICAgY3VycmVudEhvdXIgPSBkYXRldGltZS5ub3coKS5ob3VyCiAgICAgICAgICAgIGlmIChjdXJyZW50SG91ciA8IHJlYWRUaW1lUmFuZ2VbMF0pIG9yIChjdXJyZW50SG91ciA+IHJlYWRUaW1lUmFuZ2VbMV0pOgogICAgICAgICAgICAgICAgcHJpbnQoCiAgICAgICAgICAgICAgICAgICAgZiLotKblj7dbe3NlbGYubmFtZX1dIOajgOa1i+WIsOW9k+WJjeaXtumXtOS4jeWcqOiuvuWumueahOmYheivu+aXtumXtOiMg+WbtCB7cmVhZFRpbWVSYW5nZVswXX0te3JlYWRUaW1lUmFuZ2VbMV195bCP5pe2IOWGhe+8jOi3s+i/h+mYheivuyIKICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAgIHNlbGYucmVhZCgpCiAgICAgICAgICAgIHRpbWUuc2xlZXAoMykKICAgICAgICAgICAgc2VsZi5nb2xkKCkKICAgICAgICAgICAgdGltZS5zbGVlcCgzKQogICAgICAgICAgICBzZWxmLndpdGhkcmF3KCkKCgpkZWYgZ2V0TmV3SW52aXRlVXJsKCk6CiAgICByID0gc2FmZV9yZXF1ZXN0KAogICAgICAgICJHRVQiLCAiaHR0cHM6Ly93d3cuZmlsZXNtZWouY24vd2FpZG9tYWluLnBocCIsIHZlcmlmeT1GYWxzZQogICAgKS5qc29uKCkKICAgIGlmI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VVybCgpCiAgICBpZiBhY2NvdW50cyBpcyBOb25lOgogICAgICAgIHByaW50KGYi5L2g5rKh5pyJ5aGr5YWleHl5eWTvvIzlkovov5DooYzvvJ9cbui1sOS4i+mCgOivt+WRl++8mntpbnZpdGVVcmx9IikKICAgIGVsc2U6CiAgICAgICAgIyDojrflj5bnjq/looPlj5jph4/nmoTlgLzvvIzlubbmjInmjIflrprlrZfnrKbkuLLliIblibLmiJDlpJrkuKrotKblj7fnmoTlj4LmlbDnu4TlkIgKICAgICAgICBhY2NvdW50c19saXN0ID0gb3MuZW52aXJvbi5nZXQoInh5eXlkIikuc3BsaXQoIiYiKQoKICAgICAgICAjIOi+k+WHuuacieWHoOS4qui0puWPtwogICAgICAgIG51bV9vZl9hY2NvdW50cyA9IGxlbihhY2NvdW50c19saXN0KQogICAgICAgIG1vcmVUaXAgPSAiIgogICAgICAgIGlmIHJlYWRQb3N0RGVsYXkgPiAwOgogICAgICAgICAgICBtb3JlVGlwID0gZiLlt7Lorr7nva7nmoTmjqjpgIHmlofnq6DnrYnlvoXngrnlh7vml7bpl7TkuLoge3JlYWRQb3N0RGVsYXl956eSICIKICAgICAgICBwcmludCgKICAgICAgICAgICAgZiLlvZPliY3ohJrmnKzniYjmnKzvvJrlsI/pmIXpmIXpmIXor7sgVjEuOTEgXG7lubvnlJ/mj5DnpLrvvJrojrflj5bliLAge251bV9vZl9hY2NvdW50c30g5Liq6LSm5Y+3IHttb3JlVGlwfVxu5rOo5YaM5Zyw5Z2A77yae2ludml0ZVVybH0iCiAgICAgICAgKQoKICAgICAgICAjIOmBjeWOhuaJgOaciei0puWPtwogICAgICAgIGZvciBpLCBhY2NvdW50IGluIGVudW1lcmF0ZShhY2NvdW50c19saXN0LCBzdGFydD0xKToKICAgICAgICAgICAgIyBwcmludCgiXG4iKQogICAgICAgICAgICBwcmludCgiLSIgKiA1MCkKICAgICAgICAgICAgcHJpbnQoZiLotKblj7dbe2FjY291bnQuc3BsaXQoJyMnKVswXX1d5byA5aeL5omn6KGM5Lu75YqhID4+PiIpCiAgICAgICAgICAgICMgcHJpbnQoIlxuIikKICAgICAgICAgICAgIyDmjIlA56ym5Y+35YiG5Ymy5b2T5YmN6LSm5Y+355qE5LiN5ZCM5Y+C5pWwCiAgICAgICAgICAgIHZhbHVlcyA9IGFjY291bnQuc3BsaXQoIiMiKQogICAgICAgICAgICAjIHByaW50KHZhbHVlcykKICAgICAgICAgICAgY2cgPSB7fQogICAgICAgICAgICB0cnk6CiAgICAgICAgICAgICAgICBpZiBsZW4odmFsdWVzKSA9PSAzOgogICAgICAgICAgICAgICAgICAgIGNnID0gewogICAgICAgICAgICAgICAgICAgICAgICAibmFtZSI6IHZhbHVlc1swXSwKICAgICAgICAgICAgICAgICAgICAgICAgInlzbV91aWQiOiB2YWx1ZXNbMV0sCiAgICAgICAgICAgICAgICAgICAgICAgICJ1bmlvbklkIjogdmFsdWVzWzJdLAogICAgICAgICAgICAgICAgICAgICAgICAidHhieiI6IDMwMDAsCiAgICAgICAgICAgICAgICAgICAgICAgICJhbGlBY2NvdW50IjogIiIsCiAgICAgICAgICAgICAgICAgICAgICAgICJhbGlOYW1lIjogIiIsCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAgICAgICBjZyA9IHsKICAgICAgICAgICAgICAgICAgICAgICAgIm5hbWUiOiB2YWx1ZXNbMF0sCiAgICAgICAgICAgICAgICAgICAgICAgICJ5c21fdWlkIjogdmFsdWVzWzFdLAogICAgICAgICAgICAgICAgICAgICAgICAidW5pb25JZCI6IHZhbHVlc1syXSwKICAgICAgICAgICAgICAgICAgICAgICAgInR4YnoiOiB2YWx1ZXNbM10gb3IgMzAwMCwKICAgICAgICAgICAgICAgICAgICAgICAgImFsaUFjY291bnQiOiAiIiwKICAgICAgICAgICAgICAgICAgICAgICAgImFsaU5hbWUiOiAiIiwKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIGV4Y2VwdCBFeGNlcHRpb24gYXMgZToKICAgICAgICAgICAgICAgICMg5aSE55CG5byC5bi4CiAgICAgICAgICAgICAgICBwcmludCgi5bm755Sf6YC86YC85Y+oOiIsICLphY3nva7nmoTllaXnjqnmhI/vvIznvLrlj4LmlbDkuobmhqjmibnvvIznnIvmuIXohJrmnKzor7TmmI7vvIEiKQogICAgICAgICAgICAgICAgY29udGludWUKICAgICAgICAgICAgY2dbImFwcFRva2VuIl0gPSAiIgogICAgICAgICAgICBjZ1sidG9waWNJZHMiXSA9ICIiCiAgICAgICAgICAgICMgcHJpbnQoIuaJi+WKqO+8miIsIGxlbih2YWx1ZXMpLCB2YWx1ZXNbNF0pCiAgICAgICAgICAgIGlmIGxlbih2YWx1ZXMpID49IDU6CiAgICAgICAgICAgICAgICBpZiB2YWx1ZXNbNF06CiAgICAgICAgICAgICAgICAgICAgY2dbImFwcFRva2VuIl0gPSB2YWx1ZXNbNF0KICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAgIGNnWyJhcHBUb2tlbiJdID0gd3hwdXNoZXJBcHBUb2tlbgogICAgICAgICAgICBpZiBsZW4odmFsdWVzKSA+PSA2OgogICAgICAgICAgICAgICAgaWYgdmFsdWVzWzVdOgogICAgICAgICAgICAgICAgICAgIGNnWyJ0b3BpY0lkcyJdID0gdmFsdWVzWzVdCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICBjZ1sidG9waWNJZHMiXSA9IHd4cHVzaGVyVG9waWNJZAogICAgICAgICAgICBpZiBsZW4odmFsdWVzKSA+PSA3OgogICAgICAgICAgICAgICAgaWYgdmFsdWVzWzZdOgogICAgICAgICAgICAgICAgICAgIGNnWyJhbGlOYW1lIl0gPSB2YWx1ZXNbNl0KICAgICAgICAgICAgaWYgbGVuKHZhbHVlcykgPj0gODoKICAgICAgICAgICAgICAgIGlmIHZhbHVlc1s3XToKICAgICAgICAgICAgICAgICAgICBjZ1siYWxpQWNjb3VudCJdID0gdmFsdWVzWzddCiAgICAgICAgICAgIHRyeToKICAgICAgICAgICAgICAgIGlmIHdlY2hhdEJ1c3NpbmVzc0tleSA9PSAiIjoKICAgICAgICAgICAgICAgICAgICBpZiBjZ1siYXBwVG9rZW4iXS5zdGFydHN3aXRoKCJBVF8iKSA9PSBGYWxzZToKICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnQoZiLlubvnlJ/mj5DnpLrvvIzotKblj7dbe2FjY291bnQuc3BsaXQoJyMnKVswXX1dIHd4cHVzaCDphY3nva7plJnor6/vvIzlv6vku5Tnu4bnnIvlpLTpg6jor7TmmI7vvIEiKQogICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZQogICAgICAgICAgICAgICAgICAgIGlmIChjZ1siYXBwVG9rZW4iXS5zdGFydHN3aXRoKCJBVF8iKSA9PSBGYWxzZSkgb3IgKAogICAgICAgICAgICAgICAgICAgICAgICBjZ1sidG9waWNJZHMiXS5pc2RpZ2l0KCkgPT0gRmFsc2UKICAgICAgICAgICAgICAgICAgICApOgogICAgICAgICAgICAgICAgICAgICAgICBwcmludChmIuW5u+eUn+aPkOekuu+8jOi0puWPt1t7YWNjb3VudC5zcGxpdCgnIycpWzBdfV0gd3hwdXNoIOmFjee9rumUmeivr++8jOW/q+S7lOe7hueci+WktOmDqOivtOaYju+8gSIpCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlCiAgICAgICAgICAgICAgICBhcGkgPSBISFlEKGNnKQogICAgICAgICAgICAgICAgaWYgY2dbImFsaU5hbWUiXSBhbmQgY2dbImFsaUFjY291bnQiXToKICAgICAgICAgICAgICAgICAgICBwcmludCgKICAgICAgICAgICAgICAgICAgICAgICAgZiLlubvnlJ/mj5DnpLrvvIzotKblj7dbe2FjY291bnQuc3BsaXQoJyMnKVswXX1dIOmHh+eUqOS6hiDmlK/ku5jlrp3mj5DnjrDvvIzlp5PlkI3vvJp7Y2dbJ2FsaU5hbWUnXX3vvIzotKbmiLfvvJp7Y2dbJ2FsaUFjY291bnQnXX0iCiAgICAgICAgICAgICAgICAgICAgKQogICAgICAgICAgICAgICAgZWxzZToKICAgICAgICAgICAgICAgICAgICBwcmludChmIuW5u+eUn+aPkOekuu+8jOi0puWPt1t7YWNjb3VudC5zcGxpdCgnIycpWzBdfV0g6YeH55So5LqGIOW+ruS/oeaPkOeOsCIpCiAgICAgICAgICAgICAgICBhcGkucnVuKCkKICAgICAgICAgICAgZXhjZXB0IEV4Y2VwdGlvbiBhcyBlOgogICAgICAgICAgICAgICAgaWYgIkV4cGVjdGluZyB2YWx1ZTogbGluZSAxIGNvbHVtbiAxIiBpbiBzdHIoZSk6CiAgICAgICAgICAgICAgICAgICAgcHJpbnQoZiLlubvnlJ/mj5DnpLrvvIzotKblj7dbe2FjY291bnQuc3BsaXQoJyMnKVswXX1dIOeWkeS8vCB1bmlvbklk5Ye66ZSZ77yM5o2i5LiA5Liq5ZCn77yBIikKICAgICAgICAgICAgICAgIGVsaWYgImxpbmsnIGlzIG5vdCBkZWZpbmVkIiBpbiBzdHIoZSk6CiAgICAgICAgICAgICAgICAgICAgcHJpbnQoCiAgICAgICAgICAgICAgICAgICAgICAgIGYi5bm755Sf5o+Q56S677yM6LSm5Y+3W3thY2NvdW50LnNwbGl0KCcjJylbMF19XSDnlpHkvLwg5paw5Y+355qE5p+Q56eN5Y6f5Zug5a+86Ie055qE5peg5rOV6ZiF6K+777yM6K+35omL5Yqo6ZiF6K+75Lik56+H5YaN6K+V6K+V5ZCn77yBIgogICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICAgICAgcHJpbnQoZiLlubvnlJ/mj5DnpLrvvIzotKblj7dbe2FjY291bnQuc3BsaXQoJyMnKVswXX1dIOWHuumUmeWVpu+8jOivt+WwhuS4i+mdouaKpemUmeaIquWbvuWPkeWIsHRn5Lqk5rWB576kOiIpCiAgICAgICAgICAgICAgICByYWlzZSBlCiAgICAgICAgICAgICAgICBjb250aW51ZQogICAgICAgICAgICAjIHByaW50KCJcbiIpCiAgICAgICAgICAgIHByaW50KCItIiAqIDUwKQogICAgICAgICAgICBwcmludChmIui0puWPt1t7YWNjb3VudC5zcGxpdCgnIycpWzBdfV3miafooYzku7vliqHlrozmr5XvvIEiKQogICAgICAgICAgICAjIHByaW50KCJcbiIpCg=='))
except Exception as e:
print('脚本执行出错:', str(e))