xiaomianao666

小程序:PikPak

May 14th, 2024
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@PikPak@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiUGlrUGFrIiwiYXV0aG9yIjoi57KJ5aa5IiwidXJsIjoiaGlrZXI6Ly9lbXB0eSIsInZlcnNpb24iOjAsImNvbF90eXBlIjoibW92aWVfMyIsImNsYXNzX25hbWUiOiIiLCJ0eXBlIjoidmlkZW8iLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbiQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9TaG93XCIpIiwic2VhcmNoX3VybCI6Imhpa2VyOi8vKioiLCJncm91cCI6IuinhumikSIsInNlYXJjaEZpbmQiOiJqczpcclxudmFyIHJlcyA9IFtdXHJcbmNvbnN0IHtzZWFyY2hfbGlzdH0gPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvU2VhcmNoXCIpXHJcbnNlYXJjaF9saXN0KE1ZX1VSTC5yZXBsYWNlKFwiaGlrZXI6Ly9cIiwgXCJcIikscmVzKVxyXG5wdXRNeVZhcihcInNlYXJjaF8xXCIsIFwiMVwiKVxyXG5zZXRSZXN1bHQocmVzKSIsImRldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJkZXRhaWxfZmluZF9ydWxlIjoiIiwic2RldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJzZGV0YWlsX2ZpbmRfcnVsZSI6ImpzOlxyXG4vLyAkLmxvZyhNWV9VUkwpXHJcbnNldFBhZ2VUaXRsZShcIuaQnOe0olwiKVxyXG52YXIgcmVzID0gW11cclxudmFyIHNlYXJjaF9yb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gICAgICAgIGlmIChpdGVtLnBhcmVudF9pZCA9PSAnJykge1xyXG4gICAgICAgICAgICBzX3BhdGhzLnVuc2hpZnQoe1xyXG4gICAgICAgICAgICAgICAgaWQ6ICcnLFxyXG4gICAgICAgICAgICAgICAgbmFtZTogJ2hvbWUnLFxyXG4gICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICByZXR1cm5cclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBsZXQgc19pdGVtID0ge31cclxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBsaXN0Lmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAobGlzdFtpXS5pZCA9PSBpdGVtLnBhcmVudF9pZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNfaXRlbSA9IGxpc3RbaV1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzZWFyY2hfbGlzdF9mb2xkZXJfcGF0aHMoc19wYXRocywgbGlzdCwgc19pdGVtKVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIGxldCBzX3BhdGhzID0gW11cclxuICAgIHNlYXJjaF9saXN0X2ZvbGRlcl9wYXRocyhzX3BhdGhzLCBsaXN0LmZpbGVzLCBzX2l0ZW0pXHJcbiAgICBzdG9yYWdlMC5wdXRNeVZhcignc19wYXRocycsIHNfcGF0aHMpXHJcbiAgICAvLyDpnaLljIXlsZHot6/lvoQo5oyJ6ZKuKVxyXG4gICAgZ2VuZXJhdGVfcGF0aHMocmVzLCAnc19wYXRocycsIHNlYXJjaF9yb290X2l0ZW1bMl0pXHJcbiAgICAvLyDliJfooajmoI9cclxuICAgIGdlbmVyYXRlX2xpc3QocmVzLCAnc19wYXRocycpXHJcbn0gZWxzZSB7XHJcbiAgICAvLyDpnaLljIXlsZHot6/lvoQo5oyJ6ZKuKVxyXG4gICAgZ2VuZXJhdGVfcGF0aHMocmVzLCAnc19wYXRoc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Y2Nlc3NfdG9rZW4pXFxyXFxuICAgICAgICBzZXRJdGVtKCdyZWZyZXNoX3Rva2VuJywgcmVzLnJlZnJlc2hfdG9rZW4pXFxyXFxuICAgICAgICByZXR1cm4gdHJ1ZVxcclxcbiAgICB9IGVsc2Uge1xcclxcbiAgICAgICAgbG9nKHJlcylcXHJcXG4gICAgICAgIHJldHVybiBmYWxzZVxcclxcbiAgICB9XFxyXFxufVxcclxcblxcclxcbi8vIOWIt+aWsGF1dGhvcml6YXRpb25cXHJcXG5mdW5jdGlvbiByZWZyZXNoX2F1dGhvcml6YXRpb24odXNlcm5hbWUsIHBhc3N3b3JkKSB7XFxyXFxuICAgIGxldCByZXMgPSBKU09OLnBhcnNlKFxcclxcbiAgICAgICAgcG9zdCgnaHR0cHM6Ly91c2VyLm15cGlrcGFrLmNvbS92MS9hdXRoL3NpZ25pbicsIHtcXHJcXG4gICAgICAgICAgICBib2R5OiB7XFxyXFxuICAgICAgICAgICAgICAgIGNhcHRjaGFfdG9rZW46ICcnLFxcclxcbiAgICAgICAgICAgICAgICBjbGllbnRfaWQ6ICdZTnhUOXc3R01kV3ZFT0thJyxcXHJcXG4gICAgICAgICAgICAgICAgY2xpZW50X3NlY3JldDogJ2RidzJPdG1WRWV1VXZJcHRiMUNveWcnLFxcclxcbiAgICAgICAgICAgICAgICB1c2VybmFtZTogdXNlcm5hbWUsXFxyXFxuICAgICAgICAgICAgICAgIHBhc3N3b3JkOiBwYXNzd29yZCxcXHJcXG4gICAgICAgICAgICB9LFxcclxcbiAgICAgICAgfSlcXHJcXG4gICAgKVxcclxcbiAgICBpZiAocmVzLmFjY2Vzc190b2tlbikge1xcclxcbiAgICAgICAgc2V0SXRlbSgnYWNjZXNzX3Rva2VuJywgcmVzLmFjY2Vzc190b2tlbilcXHJcXG4gICAgICAgIHNldEl0ZW0oJ3JlZnJlc2hfdG9rZW4nLCByZXMucmVmcmVzaF90b2tlbilcXHJcXG4gICAgICAgIHJldHVybiB0cnVlXFxyXFxuICAgIH0gZWxzZSB7XFxyXFxuICAgICAgICBsb2cocmVzKVxcclxcbiAgICAgICAgcmV0dXJuIGZhbHNlXFxyXFxuICAgIH1cXHJcXG59XFxyXFxuXFxyXFxuLy8g6I635Y+W55So5oi35Z+65pys5L+h5oGvXFxyXFxuZnVuY3Rpb24gZ2V0X3VzZXJfYmFzZV9pbmZvKCkge1xcclxcbiAgICByZXR1cm4gSlNPTi5wYXJzZShcXHJcXG4gICAgICAgIHJlcXVlc3QoYnVpbGRVcmwoJ2h0dHBzOi8vdXNlci5teXBpa3Bhay5jb20vdjEvdXNlci9tZScsIHt9KSwge1xcclxcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXHJcXG4gICAgICAgICAgICAgICAgQXV0aG9yaXphdGlvbjogJ0JlYXJlciAnICsgZ2V0SXRlbSgnYWNjZXNzX3Rva2VuJyksXFxyXFxuICAgICAgICAgICAgfSxcXHJcXG4gICAgICAgIH0pXFxyXFxuICAgIClcXHJcXG59XFxyXFxuXFxyXFxuLy8g6I635Y+W55So5oi3VklQ5L+h5oGvXFxyXFxuZnVuY3Rpb24gZ2V0X3VzZXJfdmlwX2luZm8oKSB7XFxyXFxuICAgIHJldHVybiBKU09OLnBhcnNlKFxcclxcbiAgICAgICAgcmVxdWVzdChcXHJcXG4gICAgICAgICAgICBidWlsZFVybCgnaHR0cHM6Ly9hcGktZHJpdmUubXlwaWtwYWsuY29tL3ZpcC92MS9zcGFjZS9saXN0Jywge1xcclxcbiAgICAgICAgICAgICAgICB0eXBlOiAnc3BhY2UnLFxcclxcbiAgICAgICAgICAgIH0pLFxcclxcbiAgICAgICAgICAgIHtcXHJcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcclxcbiAgICAgICAgICAgICAgICAgICAgQXV0aG9yaXphdGlvbjogJ0JlYXJlciAnICsgZ2V0SXRlbSgnYWNjZXNzX3Rva2VuJyksXFxyXFxuICAgICAgICAgICAgICAgIH0sXFxyXFxuICAgICAgICAgICAgfVxcclxcbiAgICAgICAgKVxcclxcbiAgICApXFxyXFxufVxcclxcblxcclxcbi8vIOiOt+WPlumCgOivt+eggVxcclxcbmZ1bmN0aW9uIGdldF91c2VyX2ludml0ZUNvZGUoKSB7XFxyXFxuICAgIHJldHVybiBKU09OLnBhcnNlKFxcclxcbiAgICAgICAgcmVxdWVzdChidWlsZFVybCgnaHR0cHM6Ly9hcGktZHJpdmUubXlwaWtwYWsuY29tL3ZpcC92MS9hY3Rpdml0eS9pbnZpdGVDb2RlJywge30pLCB7XFxyXFxuICAgICAgICAgICAgaGVhZGVyczoge1xcclxcbiAgICAgICAgICAgICAgICBBdXRob3JpemF0aW9uOiAnQmVhcmVyICcgKyBnZXRJdGVtKCdhY2Nlc3NfdG9rZW4nKSxcXHJcXG4gICAgICAgICAgICB9LFxcclxcbiAgICAgICAgfSlcXHJcXG4gICAgKVxcclxcbn1cXHJcXG5cXHJcXG4vLyDojrflj5bmlofku7blpLkv5paH5Lu25YiX6KGoXFxyXFxuZnVuY3Rpb24gZ2V0X2l0ZW1zX2xpc3QocGFyZW50X2lkKSB7XFxyXFxuICAgIHJldHVybiBKU09OLnBhcnNlKFxcclxcbiAgICAgICAgcmVxdWVzdChcXHJcXG4gICAgICAgICAgICBidWlsZFVybCgnaHR0cHM6Ly9hcGktZHJpdmUubXlwaWtwYWsuY29tL2RyaXZlL3YxL2ZpbGVzJywge1xcclxcbiAgICAgICAgICAgICAgICBwYXJlbnRfaWQ6IHBhcmVudF9pZCxcXHJcXG4gICAgICAgICAgICAgICAgdGh1bWJuYWlsX3NpemU6ICdTSVpFX0xBUkdFJyxcXHJcXG4gICAgICAgICAgICAgICAgd2l0aF9hdWRpdDogJ3RydWUnLFxcclxcbiAgICAgICAgICAgICAgICBsaW1pdDogJzEwMDAnLFxcclxcbiAgICAgICAgICAgICAgICBmaWx0ZXJzOiAne1xcXCJwaGFzZVxcXCI6e1xcXCJlcVxcXCI6XFxcIlBIQVNFX1RZUEVfQ09NUExFVEVcXFwifSxcXFwidHJhc2hlZFxcXCI6e1xcXCJlcVxcXCI6ZmFsc2V9fScsXFxyXFxuICAgICAgICAgICAgfSksXFxyXFxuICAgICAgICAgICAge1xcclxcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxyXFxuICAgICAgICAgICAgICAgICAgICBBdXRob3JpemF0aW9uOiAnQmVhcmVyICcgKyBnZXRJdGVtKCdhY2Nlc3NfdG9rZW4nKSxcXHJcXG4gICAgICAgICAgICAgICAgfSxcXHJcXG4gICAgICAgICAgICB9XFxyXFxuICAgICAgICApXFxyXFxuICAgIClcXHJcXG59XFxyXFxuXFxyXFxuLy8g6I635Y+W5paH5Lu255u06ZO+XFxyXFxuZnVuY3Rpb24gZ2V0X2l0ZW1fdXJsKGl0ZW1faWQpIHtcXHJcXG4gICAgcmV0dXJuIEpTT04ucGFyc2UoXFxyXFxuICAgICAgICByZXF1ZXN0KFxcclxcbiAgICAgICAgICAgIGJ1aWxkVXJsKFxcclxcbiAgICAgICAgICAgICAgICBgaHR0cHM6Ly9hcGktZHJpdmUubXlwaWtwYWsuY29tL2RyaXZlL3YxL2ZpbGVzLyR7aXRlbV9pZH0/X21hZ2ljPTIwMjEmdGh1bWJuYWlsX3NpemU9U0laRV9MQVJHRWAsXFxyXFxuICAgICAgICAgICAgICAgIHt9XFxyXFxuICAgICAgICAgICAgKSxcXHJcXG4gICAgICAgICAgICB7XFxyXFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXHJcXG4gICAgICAgICAgICAgICAgICAgIEF1dGhvcml6YXRpb246ICdCZWFyZXIgJyArIGdldEl0ZW0oJ2FjY2Vzc190b2tlbicpLFxcclxcbiAgICAgICAgICAgICAgICB9LFxcclxcbiAgICAgICAgICAgIH1cXHJcXG4gICAgICAgIClcXHJcXG4gICAgKVxcclxcbn1cXHJcXG5cXHJcXG4kLmV4cG9ydHMgPSB7XFxyXFxuICAgIHJlZnJlc2hfYXV0aG9yaXphdGlvbixcXHJcXG4gICAgZ2V0X3Vz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JcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoXFxyXFxuICAgICAgICAgICAgICAgICAgICAocGF0aHMsIGksIHBhdGhzX2tpbmQpID0+IHtcXHJcXG4gICAgICAgICAgICAgICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcihwYXRoc19raW5kLCBwYXRocy5zbGljZSgwLCBpICsgMSkpXFxyXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcclxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXHJcXG4gICAgICAgICAgICAgICAgICAgIH0sXFxyXFxuICAgICAgICAgICAgICAgICAgICBwYXRocyxcXHJcXG4gICAgICAgICAgICAgICAgICAgIGksXFxyXFxuICAgICAgICAgICAgICAgICAgICBwYXRoc19raW5kXFxyXFxuICAgICAgICAgICAgICAgICksXFxyXFxuICAgICAgICAgICAgfSlcXHJcXG4gICAgICAgIH1cXHJcXG4gICAgfSlcXHJcXG4gICAgdF9yZXMuc2hpZnQoKTtcXHJcXG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0X3Jlcy5sZW5ndGg7IGkrKykge1xcclxcbiAgICAgICAgcmVzLnB1c2godF9yZXNbaV0pXFxyXFxuICAgIH1cXHJcXG59XFxyXFxuXFxyXFxuJC5leHBvcnRzID0ge1xcclxcbiAgICBnZW5lcmF0ZV9wYXRocyxcXHJcXG4gICAgLy8gZ2VuZXJhdGVfc2VhcmNoX3BhdGhzLFxcclxcbn1cXHJcXG5cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIlNlYXJjaFwiLFwicGF0aFwiOlwiU2VhcmNoXCIsXCJydWxlXCI6XCIvLyDmr4/ml6XkuIDlj6XnvJPlrZhcXHJcXG5mdW5jdGlvbiBzYXZlX2RheV9zYXlfY2FjaGUoKSB7XFxyXFxuICAgIGxldCBkYXlfc2F5X2NhY2hlID0ge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c5YiX6KGoXFxyXFxuZnVuY3Rpb24gc2VhcmNoX2xpc3Qoa2V5X3dvcmQsIHJlcykge1xcclxcbiAgICBjb25zdCB7IGdldEV4dCB9ID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvTGlzdCcpXFxyXFxuICAgIGNvbnN0IHsgZ2V0X2l0ZW1zX2xpc3QgfSA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL0FQSScpXFxyXFxuICAgIGxldCBsaXN0ID0gZ2V0X2l0ZW1zX2xpc3QoJyonKVxcclxcbiAgICBsZXQga2V5X3dvcmRfcmVnZXggPSBuZXcgUmVnRXhwKCcuKj8nICsga2V5X3dvcmQgKyAnLio/JywgJ21naScpXFxyXFxuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbGlzdC5maWxlcy5sZW5ndGg7IGkrKykge1xcclxcbiAgICAgICAgaWYgKGxpc3QuZmlsZXNbaV0ubmFtZS5tYXRjaChrZXlfd29yZF9yZWdleCkpIHtcXHJcXG4gICAgICAgICAgICB2YXIgdXJsID0gJCgpLmxhenlSdWxlKFxcclxcbiAgICAgICAgICAgICAgICAoaXRlbSwgZXh0KSA9PiB7XFxyXFxuICAgICAgICAgICAgICAgICAgICBjb25zdCB7IGdldF9pdGVtX3VybCB9ID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvQVBJJylcXHJcXG4gICAgICAgICAgICAgICAgICAgIGxldCByZXMgPSBnZXRfaXRlbV91cmwoaXRlbS5pZClcXHJcXG4gICAgICAgICAgICAgICAgICAgIGZvciAoaXRlbSBvZiByZXMubWVkaWFzKSB7XFxyXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXHJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRtcCA9IGl0ZW0ubGlua1xcclxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodG1wLnVybCkge1xcclxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRtcC51cmwgKyBleHRcXHJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxyXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXHJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcclxcbiAgICAgICAgICAgICAgICAgICAgfVxcclxcbiAgICAgICAgICAgICAgICB9LFxcclxcbiAgICAgICAgICAgICAgICBsaXN0LmZpbGVzW2ldLFxcclxcbiAgICAgICAgICAgICAgICBnZXRFeHQobGlzdC5maWxlc1tpXS5uYW1lKVxcclxcbiAgICAgICAgICAgIClcXHJcXG5cXHJcXG4gICAgICAgICAgICByZXMucHVzaCh7XFxyXFxuICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0LmZpbGVzW2ldLm5hbWUsXFxyXFxuICAgICAgICAgICAgICAgIGltZzogbGlzdC5maWxlc1tpXS5raW5kID09ICdkcml2ZSNmb2xkZXInID8gbGlzdC5maWxlc1tpXS5pY29uX2xpbmsgOiBsaXN0LmZpbGVzW2ldLnRodW1ibmFpbF9saW5rLFxcclxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcicsXFxyXFxuICAgICAgICAgICAgICAgIHVybDpcXHJcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QuZmlsZXNbaV0ua2luZCA9PSAnZHJpdmUjZm9sZGVyJ1xcclxcbiAgICAgICAgICAgICAgICAgICAgICAgID8gJ2hpa2VyOi8vZW1wdHkmJiYnICsgbGlzdC5maWxlc1tpXS5pZCArICcmJiYnICsgbGlzdC5maWxlc1tpXS5uYW1lXFxyXFxuICAgICAgICAgICAgICAgICAgICAgICAgOiB1cmwsXFxyXFxuICAgICAgICAgICAgfSlcXHJcXG4gICAgICAgIH1cXHJcXG4gICAgfVxcclxcbn1cXHJcXG5cXHJcXG4kLmV4cG9ydHMgPSB7XFxyXFxuICAgIHNlYXJjaF9iYXIsXFxyXFxuICAgIHNlYXJjaF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vbWUnLFxcclxcbiAgICAgICAgfSxcXHJcXG4gICAgXSlcXHJcXG4gICAgbGV0IGxpc3QgPSBnZXRfaXRlbXNfbGlzdChwYXRoc1twYXRocy5sZW5ndGggLSAxXS5pZClcXHJcXG4gICAgbGlzdC5maWxlcy5mb3JFYWNoKChpdGVtKSA9PiB7XFxyXFxuICAgICAgICBpZiAoaXRlbS5raW5kID09ICdkcml2ZSNmb2xkZXInKSB7XFxyXFxuICAgICAgICAgICAgdmFyIHVybGwgPSAkKCkubGF6eVJ1bGUoXFxyXFxuICAgICAgICAgICAgICAgIChwYXRocywgaXRlbSwgcGF0aHNfa2luZCkgPT4ge1xcclxcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcInNlYXJjaF8xXFxcIiwgXFxcIjBcXFwiKVxcclxcbiAgICAgICAgICAgICAgICAgICAgcGF0aHMucHVzaCh7XFxyXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGl0ZW0uaWQsXFxyXFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogaXRlbS5uYW1lLFxcclxcbiAgICAgICAgICAgICAgICAgICAgfSlcXHJcXG4gICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKHBhdGhzX2tpbmQsIHBhdGhzKVxcclxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcclxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcclxcbiAgICAgICAgICAgICAgICB9LFxcclxcbiAgICAgICAgICAgICAgICBwYXRocyxcXHJcXG4gICAgICAgICAgICAgICAgaXRlbSxcXHJcXG4gICAgICAgICAgICAgICAgcGF0aHNfa2luZFxcclxcbiAgICAgICAgICAgIClcXHJcXG4gICAgICAgIH0gZWxzZSB7XFxyXFxuICAgICAgICAgICAgdmFyIGV4dCA9IGdldEV4dChpdGVtLm5hbWUpXFxyXFxuICAgICAgICB9XFxyXFxuICAgICAgICB2YXIgdXJsID0gJCgpLmxhenlSdWxlKFxcclxcbiAgICAgICAgICAgIChpdGVtLCBleHQpID0+IHtcXHJcXG4gICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcInNlYXJjaF8xXFxcIiwgXFxcIjBcXFwiKVxcclxcbiAgICAgICAgICAgICAgICBjb25zdCB7IGdldF9pdGVtX3VybCB9ID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvQVBJJylcXHJcXG4gICAgICAgICAgICAgICAgbGV0IHJlcyA9IGdldF9pdGVtX3VybChpdGVtLmlkKVxcclxcbiAgICAgICAgICAgICAgICBmb3IgKGl0ZW0gb2YgcmVzLm1lZGlhcykge1xcclxcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXHJcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdG1wID0gaXRlbS5saW5rXFxyXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRtcC51cmwpIHtcXHJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRtcC51cmwgKyBleHRcXHJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcXHJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxyXFxuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcclxcbiAgICAgICAgICAgICAgICB9XFxyXFxuICAgICAgICAgICAgfSxcXHJcXG4gICAgICAgICAgICBpdGVtLFxcclxcbiAgICAgICAgICAgIGV4dFxcclxcbiAgICAgICAgKVxcclxcbiAgICAgICAgcmVzLnB1c2goe1xcclxcbiAgICAgICAgICAgIHRpdGxlOiBpdGVtLm5hbWUsXFxyXFxuICAgICAgICAgICAgaW1nOiBpdGVtLmtpbmQgPT0gJ2RyaXZlI2ZvbGRlcicgPyBpdGVtLmljb25fbGluayA6IGl0ZW0udGh1bWJuYWlsX2xpbmssXFxyXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInLFxcclxcbiAg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XFxuICAgICAgICB0aXRsZTogJ+WvhueggScsXFxyXFxuICAgICAgICBjb2xfdHlwZTogJ2lucHV0JyxcXHJcXG4gICAgICAgIGRlc2M6ICfor7fovpPlhaXlr4bnoIEnLFxcclxcbiAgICAgICAgZXh0cmE6IHtcXHJcXG4gICAgICAgICAgICBvbkNoYW5nZTogXFxcInB1dE15VmFyKCd0cGFzc3dkJywgaW5wdXQpXFxcIixcXHJcXG4gICAgICAgICAgICB0aXRsZVZpc2libGU6IGZhbHNlLFxcclxcbiAgICAgICAgfSxcXHJcXG4gICAgfSlcXHJcXG5cXHJcXG4gICAgLy8g6Ze06ZqU5qCPXFxyXFxuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgMTU7IGkrKykge1xcclxcbiAgICAgICAgcmVzLnB1c2goe1xcclxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snLFxcclxcbiAgICAgICAgfSlcXHJcXG4gICAgfVxcclxcblxcclxcbiAgICByZXMucHVzaCh7XFxyXFxuICAgICAgICB0aXRsZTogJ+ehruWumicsXFxyXFxuICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoKSA9PiB7XFxyXFxuICAgICAgICAgICAgY29uc3QgeyBsb2dpbiB9ID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvQVBJJylcXHJcXG4gICAgICAgICAgICBzZXRJdGVtKCd1c2VybmFtZScsIGdldE15VmFyKCd0dXNlcm5hbWUnLCAnJykpXFxyXFxuICAgICAgICAgICAgc2V0SXRlbSgncGFzc3dkJywgZ2V0TXlWYXIoJ3RwYXNzd2QnLCAnJykpXFxyXFxuICAgICAgICAgICAgbG9naW4oZ2V0SXRlbSgndXNlcm5hbWUnLCAnJyksIGdldEl0ZW0oJ3Bhc3N3ZCcsICcnKSlcXHJcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxyXFxuICAgICAgICAgICAgLy8gcmV0dXJuICd0b2FzdDovLycgKyBnZXRNeVZhcigndHVz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ICAgIH0gZWxzZSB7XFxyXFxuICAgICAgICAgICAgICAgIHNldEl0ZW0oJ2F1dG9fcmVmcmVzaF9pbnZpdGUnLCAnMCcpXFxyXFxuICAgICAgICAgICAgfVxcclxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXHJcXG4gICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxyXFxuICAgICAgICB9KSxcXHJcXG4gICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8xXFxcIlxcclxcbiAgICB9KVxcclxcblxcclxcbiAgICByZXMucHVzaCh7XFxyXFxuICAgICAgICB0aXRsZTogYPCfmLQke1xcXCLigJjigJjigJnigJlcXFwiK3N0eWxlX2NvbG9yKFxcXCLmmK/lkKbmiZPljbDpgoDor7fml6Xlv5co54K55Ye75YiH5o2iKVxcXCIsIFxcXCIjMjRCQjc1XFxcIil9OiAke2dldE15VmFyKFxcXCJkZWJ1Z19lbmFibGVcXFwiLCBcXFwiMFxcXCIpID09ICcwJyA/ICflkKYnIDogJ+aYryd9YCxcXHJcXG4gICAgICAgIHVybDogJCgpLmxhenlSdWxlKCgpPT57XFxyXFxuICAgICAgICAgICAgaWYoZ2V0TXlWYXIoXFxcImRlYnVnX2VuYWJsZVxcXCIsIFxcXCIwXFxcIikgPT0gJzAnKSB7XFxyXFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJkZWJ1Z19lbmFibGVcXFwiLCBcXFwiMVxcXCIpXFxyXFxuICAgICAgICAgICAgfSBlbHNlIHtcXHJcXG4gICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcImRlYnVnX2VuYWJsZVxcXCIsIFxcXCIwXFxcIilcXHJcXG4gICAgICAgICAgICB9XFxyXFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcclxcbiAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXHJcXG4gICAgICAgIH0pLFxcclxcbiAgICAgICAgY29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G4gICAgICAgICAgICBBdXRob3JpemF0aW9uOiBgQmVhcmVyICR7cmVzcG9uc2VEYXRhfWAsXFxyXFxuICAgICAgICAgICAgQ29va2llOiBjb29raWUsXFxyXFxuICAgICAgICB9XFxyXFxuICAgICAgICB3aGlsZSAodGVzdF9udW0gPj0gMCkge1xcclxcbiAgICAgICAgICAgIGxldCByZXNwb25zZTEgPSBmZXRjaChgaHR0cHM6Ly9hcGkubWFpbC5jeC9hcGkvdjEvbWFpbGJveC8ke21haWx9YCwge1xcclxcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiBoZWFkZXJzLFxcclxcbiAgICAgICAgICAgIH0pXFxyXFxuICAgICAgICAgICAgbGV0IHJlc3BvbnN0MURhdGEgPSBKU09OLnBhcnNlKHJlc3BvbnNlMSlcXHJcXG4gICAgICAgICAgICBsZXQgaWQgPSBnZXRFbWFpbElkKHJlc3BvbnN0MURhdGEpXFxyXFxuICAgICAgICAgICAgaWYgKGlkKSB7XFxyXFxuICAgICAgICAgICAgICAgIGxldCByZXNwb25zZTIgPSBmZXRjaChgaHR0cHM6Ly9hcGkubWFpbC5jeC9hcGkvdjEvbWFpbGJveC8ke21haWx9LyR7aWR9YCwge1xcclxcbiAgICAgICAgICAgICAgICAgICAgaGVhZGVyczogaGVhZGVycyxcXHJcXG4gICAgICAgICAgICAgICAgfSlcXHJcXG4gICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBKU09OLnBhcnNlKHJlc3BvbnNlMilcXHJcXG4gICAgICAgICAgICAgICAgbGV0IGVtYWlsVGV4dCA9IGRhdGFbJ2JvZHknXVsnaHRtbCddXFxyXFxuICAgICAgICAgICAgICAgIGxldCB2ZXJpZmljYXRpb25Db2RlID0gZXh0cmFjdFZlcmlmaWNhdGlvbkNvZGUoZW1haWxUZXh0KVxcclxcbiAgICAgICAgICAgICAgICBpZiAodmVyaWZpY2F0aW9uQ29kZSkge1xcclxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZlcmlmaWNhdGlvbkNvZGVcXHJcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXHJcXG4gICAgICAgICAgICAgICAgICAgIHRlc3RfbnVtLS1cXHJcXG4gICAgICAgICAgICAgICAgICAgIGRlYnVnX2xvZygn5pyq6IO95o+Q5Y+W5Yiw6aqM6K+B56CBLOetieW+hTVz5ZCO6YeN6K+VJylcXHJcXG4gICAgICAgICAgICAgICAgfVxcclxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxyXFxuICAgICAgICAgICAgICAgIHRlc3RfbnVtLS1cXHJcXG4gICAgICAgICAgICB9XFxyXFxuICAgICAgICAgICAgamF2YS5sYW5nLlRocmVhZC5zbGVlcCg1MDAwKVxcclxcbiAgICAgICAgfVxcclxcbiAgICB9IGNhdGNoIChlKSB7XFxyXFxuICAgICAgICBkZWJ1Z19sb2coZS50b1N0cmluZygpKVxcclxcbiAgICAgICAgdGhyb3cgZVxcclxcbiAgICB9XFxyXFxufVxcclxcblxcclxcbi8vICA9PT09PT09PT09PT09PT3liqDlr4blj4rlj4LmlbDlh73mlbA9PT09PT09PT09PT09PT09XFxyXFxuXFxyXFxuZnVuY3Rpb24gdXVpZHY0KCkge1xcclxcbiAgICByZXR1cm4gJ3h4eHh4eHh4LXh4eHgtNHh4eC15eHh4LXh4eHh4eHh4eHh4eCcucmVwbGFjZSgvW3h5XS9nLCBmdW5jdGlvbiAoYykge1xcclxcbiAgICAgICAgY29uc3QgciA9IChNYXRoLnJhbmRvbSgpICogMTYpIHwgMCxcXHJcXG4gICAgICAgICAgICB2ID0gYyA9PT0gJ3gnID8gciA6IChyICYgMHgzKSB8IDB4OFxcclxcbiAgICAgICAgcmV0dXJuIHYudG9TdHJpbmcoMTYpXFxyXFxuICAgIH0pXFxyXFxufVxcclxcblxcclxcbmZ1bmN0aW9uIGdldFVBS2V5KCkge1xcclxcbiAgICBjb25zdCBnID0geGlkICsgJ2NvbS5waWtjbG91ZC5waWtwYWsxYXBwa2V5J1xcclxcbiAgICBjb25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cXHJcXG4gICAgICAgICAgICBhbGc6ICdtZDUnLFxcclxcbiAgICAgICAgICAgIHNhbHQ6ICdXNEF0OENOMDBZZUlDZnJoS3llJyxcXHJcXG4gICAgICAgIH0sXFxyXFxuICAgICAgICB7XFxyXFxuICAgICAgICAgICAgYWxnOiAnbWQ1JyxcXHJcXG4gICAgICAgICAgICBzYWx0OiAnV2JzSnNleE1USWorcWp1Vk5rVFpVSnhxVWtkZicsXFxyXFxuICAgICAgICB9LFxcclxcbiAgICAgICAge1xcclxcbiAgICAgICAgICAgIGFsZzogJ21kNScsXFxyXFxuICAgICAgICAgICAgc2FsdDogJ081NmJjV01vSGFUWGV5NVFuektYRFVFVGVhVlNEJyxcXHJcXG4gICAgICAgIH0sXFxyXFxuICAgICAgICB7XFxyXFxuICAgICAgICAgICAgYWxnOiAnbWQ1JyxcXHJcXG4gICAgICAgICAgICBzYWx0OiAnbkFOM2pCcml5OC9QWEdBZHNuM3lQTVUnLFxcclxcbiAgICAgICAgfSxcXHJcXG4gICAgICAgIHtcXHJcXG4gICAgICAgICAgICBhbGc6ICdtZDUnLFxcclxcbiAgICAgICAgICAgIHNhbHQ6ICcrT1FFaW9ORUNOZjlVZFJlJyxcXHJcXG4gICAgICAgIH0sXFxyXFxuICAgICAgICB7XFxyXFxuICAgICAgICAgICAgYWxnOiAnbWQ1JyxcXHJcXG4gICAgICAgICAgICBzYWx0OiAnMkJUQnhaM0liUG5rcnJmZC8nLFxcclxcbiAgICAgICAgfSxcXHJcXG4gICAgICAgIHtcXHJcXG4gICAgICAgICAgICBhbGc6ICdtZDUnLFxcclxcbiAgICAgICAgICAgIHNhbHQ6ICdnQmlwNUFZdG01MycsXFxyXFxuICAgICAgICB9LFxcclxcbiAgICAgICAge1xcclxcbiAgICAgICAgICAgIGFsZzogJ21kNScsXFxyXFxuICAgICAgICAgICAgc2FsdDogJzlGTXlydmpaRlpKVDVZK2IxTmVTWWZzNScsXFxyXFxuICAgICAgICB9LFxcclxcbiAgICAgICAge1xcclxcbiAgICAgICAgICAgIGFsZzogJ21kNScsXFxyXFxuICAgICAgICAgICAgc2FsdDogJzBjSUJ0RVZXWUNLZElPbE9YblRKUGhMR1UveTUnLFxcclxcbiAgICAgICAgfSxcXHJcXG4gICAgICAgIHtcXHJcXG4gICAgICAgICAgICBhbGc6ICdtZDUnLFxcclxcbiAgICAgICAgICAgIHNhbHQ6ICc5Mmo0SStaaU15eEZ4NlEnLFxcclxcbiAgICAgICAgfSxcXHJcXG4gICAgICAgIHtcXHJcXG4gICAgICAgICAgICBhbGc6ICdtZDUnLFxcclxcbiAgICAgICAgICAgIHNhbHQ6ICd4TkZOOVJuVWx1MjE4cycsXFxyXFxuICAgICAgICB9LFxcclxcbiAgICAgICAge1xcclxcbiAgICAgICAgICAgIGFsZzogJ21kNScsXFxyXFxuICAgICAgICAgICAgc2FsdDogJ1VaY25uUTJua2FZMFMnLFxcclxcbiAgICAgICAgfSxcXHJcXG4gICAgXVxcclxcbiAgICBsZXQgbWQ1X2hhc2ggPSBgWU54VDl3N0dNZFd2RU9LYTEuMzguMGNvbS5waWtjbG91ZC5waWtwYWske3hpZH0ke3R9YFxcclxcbiAgICBlLmZvckVhY2goKGl0ZW0pID0+IHtcXHJcXG4gICAgICAgIG1kNV9oYXNoICs9IGl0ZW0uc2FsdFxcclxcbiAgICAgICAgbWQ1X2hhc2ggPSBtZDUobWQ1X2hhc2gpXFxyXFxuICAgIH0pXFxyXFxuXFxyXFxuICAgIHJldHVybiBtZDVfaGFzaFxcclxcbn1cXHJcXG5cXHJcXG5mdW5jdGlvbiBpdGVtX2NvbXBhcmUoaW1nX2xpc3QsIG1vZGVfbGlzdCkge1xcclxcbiAgICBsZXQgc2NvcmUgPSAwXFxyXFxuICAgIGxldCByYW5rID0gMFxcclxcbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IDM7IGkrKykge1xcclxcbiAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCAzOyBqKyspIHtcXHJcXG4gICAgICAgICAgICBpZiAoaW1nX2xpc3RbaV1bal0gIT09IG1vZGVfbGlzdFtpXVtqXSkge1xcclxcbiAgICAgICAgICAgICAgICBzY29yZSArPSAxXFxyXFxuICAgICAgICAgICAgfVxcclxcbiAgICAgICAgfVxcclxcbiAgICB9XFxyXFxuICAgIGlmIChzY29yZSA9PT0gMikge1xcclxcbiAgICAgICAgcmFuayArPSAxXFxyXFxuICAgIH1cXHJcXG4gICAgcmV0dXJuIHJhbmtcXHJcXG59XFxyXFxuXFxyXFxuZnVuY3Rpb24gbGlzdF9jb21wYXJlKGZyYW1lcykge1xcclxcbiAgICBsZXQgc2NvcmVfbGlzdCA9IFtdXFxyXFxuICAgIGxldCBmbGFnID0gMFxcclxcbiAgICBmb3IgKGxldCBmcmFtZSBvZiBmcmFtZXMpIHtcXHJcXG4gICAgICAgIGxldCBpbWdfbGlzdCA9IGZyYW1lLm1hdHJpeFxcclxcbiAgICAgICAgbGV0IHNjb3JlcyA9IDBcXHJcXG4gICAgICAgIGZvciAobGV0IG1vZGVfZnJhbWUgb2YgZnJhbWVzKSB7XFxyXFxuICAgICAgICAgICAgbGV0IG1vZGVfbGlzdCA9IG1vZGVfZnJhbWUubWF0cml4XFxyXFxuICAgICAgICAgICAgbGV0IG9uZV9zY29yZSA9IGl0ZW1fY29tcGFyZShpbWdfbGlzdCwgbW9kZV9saXN0KVxcclxcbiAgICAgICAgICAgIHNjb3JlcyArPSBvbmVfc2NvcmVcXHJcXG4gICAgICAgIH1cXHJcXG4gICAgICAgIHNjb3JlX2xpc3QucHVzaChzY29yZXMpXFxyXFxuICAgICAgICBmbGFnICs9IDFcXHJcXG4gICAgfVxcclxcbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IDEyOyBpKyspIHtcXHJcXG4gICAgICAgIGlmIChzY29yZV9saXN0W2ldID09PSAxMSkge1xcclxcbiAgICAgICAgICAgIC8vIGRlYnVnX2xvZyhpKVxcclxcbiAgICAgICAgICAgIHJldHVybiBpXFxyXFxuICAgICAgICB9XFxyXFxuICAgIH1cXHJcXG59XFxyXFxuXFxyXFxuZnVuY3Rpb24gcihlLCB0KSB7XFxyXFxuICAgIGxldCBuID0gdCAtIDFcXHJcXG4gICAgaWYgKG4gPCAwKSB7XFxyXFxuICAgICAgICBuID0gMFxcclxcbiAgICB9XFxyXFxuICAgIGxldCByID0gZVtuXVxcclxcblxcclxcbiAgICBsZXQgdSA9IE1hdGguZmxvb3Ioclsncm93J10gLyAyKSArIDFcXHJcXG4gICAgbGV0IGMgPSBNYXRoLmZsb29yKHJbJ2NvbHVtbiddIC8gMikgKyAxXFxyXFxuXFxyXFxuICAgIGxldCBmID0gclsnbWF0cml4J11bdV1bY11cXHJcXG4gICAgbGV0IGwgPSB0ICsgMVxcclxcbiAgICBpZiAobCA+PSBlLmxlbmd0aCkge1xcclxcbiAgICAgICAgbCA9IHRcXHJcXG4gICAgfVxcclxcblxcclxcbiAgICBsZXQgZCA9IGVbbF1cXHJcXG4gICAgbGV0IHAgPSBsICUgZFsncm93J11cXHJcXG4gICAgbGV0IGggPSBsICUgZFsnY29sdW1uJ11cXHJcXG5cXHJcXG4gICAgbGV0IGcgPSBkWydtYXRyaXgnXVtwXVtoXVxcclxcblxcclxcbiAgICBsZXQgeSA9IGVbdF1cXHJcXG4gICAgbGV0IG0gPSAzICUgeVsncm93J11cXHJcXG4gICAgbGV0IHYgPSA3ICUgeVsnY29sdW1uJ11cXHJcXG4gICAgbGV0IHcgPSB5WydtYXRyaXgnXVttXVt2XVxcclxcbiAgICBsZXQgYiA9IHBhcnNlSW50KGkoZikpICsgbyh3KVxcclxcbiAgICBsZXQgeCA9IHBhcnNlSW50KGkodykpIC0gbyhmKVxcclxcblxcclxcbiAgICByZXR1cm4gW3MoYShpKGYpLCBvKGYpKSksIHMoYShpKGcpLCBvKGcpKSksIHMoYShpKHcpLCBvKHcpKSksIHMoYShiLCB4KSldXFxyXFxufVxcclxcblxcclxcbmZ1bmN0aW9uIGkoZSkge1xcclxcbiAgICByZXR1cm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XHJcXG4gICAgICAgICdYLURldmljZS1JZCc6IHhpZCxcXHJcXG4gICAgICAgICdVc2VyLUFnZW50JzogdWEsXFxyXFxuICAgIH1cXHJcXG4gICAgdHJ5IHtcXHJcXG4gICAgICAgIGNvbnN0IHJlc3BvbnNlID0gZmV0Y2gocmVxdWVzdHVybCwge1xcclxcbiAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxcclxcbiAgICAgICAgICAgIGhlYWRlcnM6IE9iamVjdC5hc3NpZ24oXFxyXFxuICAgICAgICAgICAgICAgIHtcXHJcXG4gICAgICAgICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbicsXFxyXFxuICAgICAgICAgICAgICAgIH0sXFxyXFxuICAgICAgICAgICAgICAgIGhlYWRlcnNcXHJcXG4gICAgICAgICAgICApLFxcclxcbiAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KGpzb25fZGF0YSksXFxyXFxuICAgICAgICB9KVxcclxcbiAgICAgICAgY29uc3QgcmVzcG9uc2VEYXRhID0gSlNPTi5wYXJzZShyZXNwb25zZSlcXHJcXG4gICAgICAgIHJldHVybiByZXNwb25zZURhdGFcXHJcXG4gICAgfSBjYXRjaCAoZXJyb3IpIHtcXHJcXG4gICAgICAgIGRlYnVnX2xvZyhlcnJvci50b1N0cmluZygpKVxcclxcbiAgICAgICAgdGhyb3cgZXJyb3JcXHJcXG4gICAgfVxcclxcbn1cXHJcXG5cXHJcXG5mdW5jdGlvbiBnZXRJbWFnZSgpIHtcXHJcXG4gICAgY29uc3QgdXJsID0gJ2h0dHBzOi8vdXNlci5teXBpa3Bhay5jb20vcHp6bC9nZW4nXFxyXFxuICAgIGNvbnN0IHJlcXVlc3R1cmwgPSBidWlsZFVybCh1cmwsIHtcXHJcXG4gICAgICAgIGRldmljZWlkOiB4aWQsXFxyXFxuICAgICAgICB0cmFjZWlkOiAnJyxcXHJcXG4gICAgfSlcXHJcXG5cXHJcXG4gICAg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NlLUlkJzogeGlkLFxcclxcbiAgICAgICAgICAgICdVc2VyLUFnZW50JzogdWEsXFxyXFxuICAgICAgICB9LFxcclxcbiAgICAgICAgYmFzaWNSZXF1ZXN0SGVhZGVyc18xLFxcclxcbiAgICAgICAge1xcclxcbiAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbicsXFxyXFxuICAgICAgICB9XFxyXFxuICAgIClcXHJcXG4gICAgdHJ5IHtcXHJcXG4gICAgICAgIGNvbnN0IHJlc3BvbnNlID0gcG9zdChyZXF1ZXN0dXJsLCB7XFxyXFxuICAgICAgICAgICAgaGVhZGVyczogaGVhZGVycyxcXHJcXG4gICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeShqc29uRGF0YSksXFxyXFxuICAgICAgICB9KVxcclxcbiAgICAgICAgY29uc3QgcmVzcG9uc2VEYXRhID0gSlNPTi5wYXJzZShyZXNwb25zZSlcXHJcXG4gICAgICAgIHJldHVybiByZXNwb25zZURhdGFcXHJcXG4gICAgfSBjYXRjaCAoZXJyb3IpIHtcXHJcXG4gICAgICAgIGRlYnVnX2xvZyhlcnJvci50b1N0cmluZygpKVxcclxcbiAgICAgICAgdGhyb3cgZXJyb3JcXHJcXG4gICAgfVxcclxcbn1cXHJcXG5cXHJcXG5mdW5jdGlvbiBzaWdudXAodmVyaWZpY2F0aW9uVG9rZW4pIHtcXHJcXG4gICAgY29uc3QgbmFtZSA9ICdVXycgKyBtYWlsLnNwbGl0KCdAJylbMF1cXHJcXG4gICAgY29uc3QgdXJsID0gJ2h0dHBzOi8vdXNlci5teXBpa3Bhay5jb20vdjEvYXV0aC9zaWdudXAnXFxyXFxuICAgIGNvbnN0IHJlcXVlc3R1cmwgPSBidWlsZFVybCh1cmwsIHtcXHJcXG4gICAgICAgIGNsaWVudF9pZDogY2xpZW50LFxcclxcbiAgICB9KVxcclxcbiAgICBjb25zdCBqc29uRGF0YSA9IHtcXHJcXG4gICAgICAgIGNhcHRj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AgICAgICB0aHJvdyBlcnJvclxcclxcbiAgICB9XFxyXFxufVxcclxcblxcclxcbmZ1bmN0aW9uIGluaXQxKGFjY2Vzc1Rva2VuLCBzdWIpIHtcXHJcXG4gICAgdHJ5IHtcXHJcXG4gICAgICAgIGNvbnN0IHVybCA9ICdodHRwczovL3VzZXIubXlwaWtwYWsuY29tL3YxL3NoaWVsZC9jYXB0Y2hhL2luaXQnXFxyXFxuICAgICAgICBjb25zdCByZXF1ZXN0dXJsID0gYnVpbGRVcmwodXJsLCB7XFxyXFxuICAgICAgICAgICAgY2xpZW50X2lkOiBjbGllbnQsXFxyXFxuICAgICAgICB9KVxcclxcbiAgICAgICAgY29uc3QganNvbkRhdGEgPSB7XFxyXFxuICAgICAgICAgICAgYWN0aW9uOiAnUE9TVDovdmlwL3YxL2FjdGl2aXR5L2ludml0ZScsXFxyXFxuICAgICAgICAgICAgY2FwdGNoYV90b2tlbjogYWNjZXNzVG9rZW4sXFxyXFxuICAgICAgICAgICAgY2xpZW50X2lkOiBjbGllbnQsXFxyXFxuICAgICAgICAgICAgZGV2aWNlX2lkOiB4aWQsXFxyXFxuICAgICAgICAgICAgbWV0YToge1xcclxcbiAgICAgICAgICAgICAgICBjYXB0Y2hhX3NpZ246IGAxLiR7c2lnbn1gLFxcclxcbiAgICAgICAgICAgICAgICB1c2VyX2lkOiBzdWIsXFxyXFxuICAgICAgICAgICAgICAgIHBhY2thZ2VfbmFtZTogJ2NvbS5waWtjbG91ZC5waWtwYWsnLFxcclxcbiAgICAgICAgICAgICAgICBjbGllbnRfdmVyc2lvbjogJzEuMzguMCcsXFxyXFxuICAgICAgICAgICAgICAgIHRpbWVzdGFtcDogdCxcXHJcXG4gICAgICAgICAgICB9LFxcclxcbiAgICAgICAgICAgIHJlZGlyZWN0X3VyaTogJ3hsYWNjc2RrMDE6Ly94YmFzZS5jbG91ZC9jYWxsYmFjaz9zdGF0ZT1oYXJib3InLFxcclxcbiAgICAgICAgfVxcclxcbiAgICAgICAgY29uc3QgaGVhZGVycyA9IE9iamVjdC5hc3NpZ24oXFxyXFxuICAgICAgICAgICAge1xcclxcbiAgICAgICAgICAgICAgICAnWC1EZXZpY2UtSWQnOiB4aWQsXFxyXFxuICAgICAgICAgICAgICAgICdVc2VyLUFnZW50JzogdWEsXFxyXFxuICAgICAgICAgICAgfSxcXHJcXG4gICAgICAgICAgICBiYXNpY1JlcXVlc3RIZWFkZXJzXzEsXFxyXFxuICAgICAgICAgICAge1xcclxcbiAgICAgICAgICAgICAgICAnQ29udGVudC1UeXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nLFxcclxcbiAgICAgICAgICAgIH1cXHJcXG4gICAgICAgIClcXHJcXG4gICAgICAgIGNvbnN0IHJlc3BvbnNlID0gcG9zdChyZXF1ZXN0dXJsLCB7XFxyXFxuICAgICAgICAgICAgaGVhZGVyczogaGVhZGVycyxcXHJcXG4gICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeShqc29uRGF0YSksXFxyXFxuICAgICAgICB9KVxcclxcbiAgICAgICAgY29uc3QgcmVzcG9uc2VEYXRhID0gSlNPTi5wYXJzZShyZXNwb25zZSlcXHJcXG4gICAgICAgIHJldHVybiByZXNwb25zZURhdGFcXHJcXG4gICAgfSBjYXRjaCAoZXJyb3IpIHtcXHJcXG4gICAgICAgIGRlYnVnX2xvZyhlcnJvci50b1N0cmluZygpKVxcclxcbiAgICAgICAgdGhyb3cgZXJyb3JcXHJcXG4gICAgfVxcclxcbn1cXHJcXG5cXHJcXG5mdW5jdGlvbiBpbnZpdGUoc3ViLCBhY2Nlc3NUb2tlbiwgY2FwdGNoYSkge1xcclxcbiAgICB0cnkge1xcclxcbiAgICAgICAgY29uc3QgdXJsID0gJ2h0dHBzOi8vYXBpLWRyaXZlLm15cGlrcGFrLmNvbS92aXAvdjEvYWN0aXZpdHkvaW52aXRlJ1xcclxcbiAgICAgICAgY29uc3QganNvbkRhdGEgPSB7XFxyXFxuICAgICAgICAgICAgZGF0YToge1xcclxcbiAgICAgICAgICAgICAgICBzZGtfaW50OiAnMzMnLFxcclxcbiAgICAgICAgICAgICAgICB1dWlkOiB4aWQsXFxyXFxuICAgICAgICAgICAgICAgIHVzZXJUeXBlOiAnMScsXFxyXFxuICAgICAgICAgICAgICAgIHVzZXJpZDogc3ViLFxcclxcbiAgICAgICAgICAgICAgICB1c2VyU3ViOiAnJyxcXHJcXG4gICAgICAgICAgICAgICAgcHJvZHVjdF9mbGF2b3JfbmFtZTogJ2NoYScsXFxyXFxuICAgICAgICAgICAgICAgIGxhbmd1YWdlX3N5c3RlbTogJ3poLUNOJyxcXHJcXG4gICAgICAgICAgICAgICAgbGFuZ3VhZ2VfYXBwOiAnemgtQ04nLFxcclxcbiAgICAgICAgICAgICAgICBidWlsZF92ZXJzaW9uX3JlbGVhc2U6ICcxMycsXFxyXFxuICAgICAgICAgICAgICAgIHBob25lTW9kZWw6IGRldmljZU1vZGVsLFxcclxcbiAgICAgICAgICAgICAgICBidWlsZF9tYW51ZmFjdHVyZXI6IGRldmljZU5hbWUsXFxyXFxuICAgICAgICAgICAgICAgIGJ1aWxkX3Nka19pbnQ6ICczMycsXFxyXFxuICAgICAgICAgICAgICAgIGNoYW5uZWw6ICdvZmZpY2lhbCcsXFxyXFxuICAgICAgICAgICAgICAgIHZlcnNpb25Db2RlOiAnMTAxNTAnLFxcclxcbiAgICAgICAgICAgICAgICB2ZXJzaW9uTmFtZTogJzEuMzguMCcsXFxyXFxuICAgICAgICAgICAgICAgIGluc3RhbGxGcm9tOiAnb3RoZXInLFxcclxcbiAgICAgICAgICAgICAgICBjb3VudHJ5OiAnUEwnLFxcclxcbiAgICAgICAgICAgIH0sXFxyXFxuICAgICAgICAgICAgYXBrX2V4dHJhOiB7XFxyXFxuICAgICAgICAgICAgICAgIGNoYW5uZWw6ICdvZmZpY2lhbCcsXFxyXFxuICAgICAgICAgICAgfSxcXHJcXG4gICAgICAgIH1cXHJcXG4gICAgICAgIGNvbnN0IGhlYWRlcnMgPSB7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HJcXG4gICAgICAgICd4LXBlZXItaWQnOiB4aWQsXFxyXFxuICAgICAgICAneC11c2VyLXJlZ2lvbic6ICcyJyxcXHJcXG4gICAgICAgICd4LXN5c3RlbS1sYW5ndWFnZSc6ICd6aC1DTicsXFxyXFxuICAgICAgICAneC1hbHQtY2FwYWJpbGl0eSc6ICczJyxcXHJcXG4gICAgICAgICdjb250ZW50LWxlbmd0aCc6IGxoLFxcclxcbiAgICAgICAgJ2FjY2VwdC1lbmNvZGluZyc6ICdnemlwJyxcXHJcXG4gICAgICAgICdjb250ZW50LXR5cGUnOiAnYXBwbGljYXRpb24vanNvbicsXFxyXFxuICAgIH1cXHJcXG4gICAgdHJ5IHtcXHJcXG4gICAgICAgIGNvbnN0IHJlc3BvbnNlID0gcG9zdCh1cmwsIHtcXHJcXG4gICAgICAgICAgICBoZWFkZXJzOiBoZWFkZXJzLFxcclxcbiAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KGRhdGEpLFxcclxcbiAgICAgICAgfSlcXHJcXG4gICAgICAgIGNvbnN0IHJlc3BvbnNlRGF0ZSA9IEpTT04ucGFyc2UocmVzcG9uc2UpXFxyXFxuICAgICAgICByZXR1cm4gcmVzcG9uc2VEYXRlXFxyXFxuICAgIH0gY2F0Y2ggKGVycm9yKSB7XFxyXFxuICAgICAgICBkZWJ1Z19sb2coZXJyb3IudG9TdHJpbmcoKSlcXHJcXG4gICAgICAgIHRocm93IGVycm9yXFxyXFxuICAgIH1cXHJcXG59XFxyXFxuXFxyXFxuLy8gID09PT09PT09PT09PT09PT09PT3nu5PmnZ89PT09PT09PT09PT09PT09PT09XFxyXFxuXCJ9XSIsImljb24iOiJodHRwOi8vYWxpc3Quam9lZ3UudGsvZC9ydWxlcy9QaWtQYWtfMS4yMi41LnBuZyIsInByb3h5IjoiIn0=
Add Comment
Please, Sign In to add comment