Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@图书馆Pro@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi5Zu+5Lmm6aaGUHJvIiwiYXV0aG9yIjoiSm9lIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSIsInZlcnNpb24iOjksImNvbF90eXBlIjoibW92aWVfMyIsImNsYXNzX25hbWUiOiIiLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbmxldCBsYXlvdXQgPSBbXTtcbmxheW91dC5wdXNoKHtcbiAgICBjb2xfdHlwZTogXCJiaWdfYmxhbmtfYmxvY2tcIlxufSk7XG5sYXlvdXQucHVzaCh7XG4gICAgY29sX3R5cGU6IFwiYmlnX2JsYW5rX2Jsb2NrXCJcbn0pO1xubGF5b3V0LnB1c2goe1xuICAgIGNvbF90eXBlOiBcImJpZ19ibGFua19ibG9ja1wiXG59KTtcbmxheW91dC5wdXNoKHtcbiAgICBjb2xfdHlwZTogXCJiaWdfYmxhbmtfYmxvY2tcIlxufSk7XG5cbmxheW91dC5wdXNoKHtcbiAgICB0aXRsZTogJzxoMSBzdHlsZT1cInRleHQtYWxpZ246IGNlbnRlcjtcIj48YmlnPjxmb250IGNvbG9yPVwiI0ZFQkQ2RlwiPuWbvuS5pummhlBybzwvZm9udD48L2JpZz48YnI+PHNtYWxsPjxmb250IGNvbG9yPVwiI0ZCNkM3M1wiPuS9oOeahOengeS6uuWbvuS5pummhjwvZm9udD48L3NtYWxsPjwvaDE+JyxcbiAgICBjb2xfdHlwZTogXCJyaWNoX3RleHRcIlxufSk7XG5sYXlvdXQucHVzaCh7XG4gICAgY29sX3R5cGU6IFwiaW5wd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tleTogXFxcIjBkYWQ1NTFlYzBmODRlZDAyOTA3ZmY1YzQyZThlYzcwXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIHZhciByZXMgPSBKU09OLnBhcnNlKHBvc3QodSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaG9zdDogXFxcImZyb2RvLmRvdWJhbi5jb21cXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogXFxcIlJleHhhci1Db3JlLzAuMS4zIGFwaS1jbGllbnQvMSBjb20uZG91YmFuLmZyb2RvLzcuOS4wLmJldGEyKDIxNSkgQW5kcm9pZC8yNSBwcm9kdWN0L1RBUy1BTDAwIHZlbmRvci9IVUFXRUkgbW9kZWwvVEFTLUFMMDAgIHJvbS9hbmRyb2lkICBuZXR3b3JrL3dpZmkgIHBsYXRmb3JtL21vYmlsZSBjb20uZG91YmFuLmZyb2RvLzcuOS4wLmJldGEyKDIxNSkgUmV4eGFyLzEuMi4xNTEgIHBsYXRmb3JtL21vYmlsZSAxLjIuMTUxXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pKVxcbiAgICAgICAgICAgICAgICAgICAgZC51bnNoaWZ0KHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogcmVzLnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogcmVzLnBpYy5ub3JtYWwsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwieDU6Ly9cXFwiICsgcmVzLmluZm9fdXJsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IHJlcy5jYXJkX3N1YnRpdGxlICsgXFxcIlxcXFxuXFxcIiArIHN0YXIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJtb3ZpZV8xX3ZlcnRpY2FsX3BpY19ibHVyXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibGluZV9ibGFua1xcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB2YXIgaW50cm8gPSBg5L2c6ICF77yaJHtyZXMuYXV0aG9yLmpvaW4oXFxcIixcXFwiKX1cXFxcblxcXFxu57+76K+R77yaJHtyZXMudHJhbnNsYXRvci5qb2luKFxcXCIsXFxcIil9XFxcXG5cXFxcbueugOS7i++8miR7cmVzLmludHJvfVxcXFxuXFxcXG7kvZzogIXnroDku4vvvJoke3Jlcy5hdXRob3JfaW50cm99XFxcXG5cXFxcbuaRmOW9le+8miR7cmVzLmNhdGFsb2d9YFxcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogaW50cm8sXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJsb25nX3RleHRcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgc2V0UmVzdWx0KGQpXFxuICAgICAgICAgICAgICAgIH0sIGl0ZW0uaWQsIHN0YXIpXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pXFxuICAgIH0sXFxuICAgIFlsaWJyYXJ5OiBmdW5jdGlvbihrdywgcGFnZSkge1xcbiAgICAgICAgdmFyIHJlcyA9IEpTT04ucGFyc2UocG9zdChcXFwiaHR0cHM6Ly9hcGkueWxpYnJhcnkub3JnL2FwaS9zZWFyY2gvXFxcIiwge1xcbiAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICA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xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwic291cmNlXFxcIjogXFxcInpsaWJyYXJ5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzZXJ2ZXJzID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuc2VydmVyc1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlcnZlcnMudW5zaGlmdChcXFwiaXBmc+S4i+i9vVxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgc2VydmVycy51bnNoaWZ0KFxcXCLnmb7luqbkupHnm5jovazlrZhcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXMuaW5fbGliZ2VuKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlcnZlcnMudW5zaGlmdChcXFwiTGliZ2VuKOaOqOiNkClcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChzZXJ2ZXJzLCAxLCBcXFwi6YCJ5oup57q/6LevXFxcIikuc2VsZWN0KChyZXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXCJMaWJnZW4o5o6o6I2QKVxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiZG93bmxvYWQ6Ly9cXFwiICsgcGRmaChyZXF1ZXN0KFxcXCJodHRwOi8vbGlicmFyeS5sb2wvbWFpbi9cXFwiICsgcmVzLm1kNSksIFxcXCIjZG93bmxvYWQmJmEmJmhyZWZcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09IFxcXCLnmb7luqbkupHnm5jovazlrZhcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJhcGlcXFwiKS5iYWlkdShyZXMpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gXFxcImlwZnPkuIvovb1cXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYHg1Oi8vaHR0cHM6Ly9pcGZzLWNoZWNrZXIuMWtidG9vbC5jb20vJHtyZXMuaXBmc19jaWR9YFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0LmluY2x1ZGVzKFxcXCJpcGZzZ3cwMC5zdGFyaXZlcnBhbi5jb21cXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJkb3dubG9hZDovL1xcXCIgKyBpbnB1dCArIHJlcy5pcGZzX2NpZCArIFxcXCI7e1JlZmVyZXJAaHR0cHM6Ly93eC5zdGFyaXZlcnBhbi5jb20vfVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiZG93bmxvYWQ6Ly9cXFwiICsgaW5wdXQgKyByZXMuaXBmc19jaWRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHJlcylcXG4gICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2coZS5tZXNzYWdlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/op6PmnpDlpLHotKVcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sIGl0ZW0uaWQpXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pXFxuICAgIH0sXFxuICAgIFpoZWxwZXJfdjU6IGZ1bmN0aW9uKGt3LCBwYWdlKSB7XFxuICAgICAgICB2YXIgcmVzID0gSlNPTi5wYXJzZShwb3N0KFxcXCJodHRwczovL2FwaS52NS56aGVscGVyLm5ldC9hcGkvc2VhcmNoL1xcXCIsIHtcXG4gICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgIFxcXCJrZXl3b3JkXFxcIjoga3csXFxuICAgICAgICAgICAgICAgIFxcXCJwYWdlXFxcIjogcGFnZSxcXG4gICAgICAgICAgICAgICAgXFxcInNlbnNpdGl2ZVxcXCI6IGZhbHNlXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pKS5kYXRhXFxuICAgICAgICByZXMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS50aXRsZSxcXG4gICAgICAgICAgICAgICAgZGVzYzogYOKAnOKAnOKAneKAnTxzbWFsbD7kvZzogIU6JHtpdGVtLmF1dGhvcn0g5Ye654mI56S+OiR7aXRlbS5wdWJsaXNoZXI/aXRlbS5wdWJsaXNoZXI6XFxcIuaaguaXoFxcXCJ9IElTQk46JHtpdGVtLmlzYm4/aXRlbS5pc2JuOlxcXCLmmoLml6BcXFwifSDlh7rniYjml7bpl7Q6JHtpdGVtLnllYXI/aXRlbS55ZWFyOlxcXCLmmoLml6BcXFwifSDmlofku7bmoLzlvI86JHtpdGVtLmV4dGVuc2lvbn0g5paH5Lu25aSn5bCPOiR7JC5yZXF1aXJlKFxcXCJhcGlcXFwiKS5nZXRGaWxlU2l6ZShpdGVtLmZpbGVzaXplKX08L3NtYWxsPmAsXFxuICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVzID0gSlNPTi5wYXJzZShwb3N0KFxcXCJodHRwczovL2FwaS52NS56aGVscGVyLm5ldC9hcGkvZGV0YWlsL1xcXCIsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcImlkXFxcIjogaWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwic291cmNlXFxcIjogXFxcInpsaWJyYXJ5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzZXJ2ZXJzID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuc2VydmVyc1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlcnZlcnMudW5zaGlmdChcXFwiaXBmc+S4i+i9vVxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgc2VydmVycy51bnNoaWZ0KFxcXCLnmb7luqbkupHnm5jovazlrZhcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXMuaW5fbGliZ2VuKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlcnZlcnMudW5zaGlmdChcXFwiTGliZ2VuKOaOqOiNkClcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChzZXJ2ZXJzLCAxLCBcXFwi6YCJ5oup57q/6LevXFxcIikuc2VsZWN0KChyZXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXCJMaWJnZW4o5o6o6I2QKVxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiZG93bmxvYWQ6Ly9cXFwiICsgcGRmaChyZXF1ZXN0KFxcXCJodHRwOi8vbGlicmFyeS5sb2wvbWFpbi9cXFwiICsgcmVzLm1kNSksIFxcXCIjZG93bmxvYWQmJmEmJmhyZWZcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09IFxcXCLnmb7luqbkupHnm5jovazlrZhcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJhcGlcXFwiKS5iYWlkdShyZXMpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gXFxcImlwZnPkuIvovb1cXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYHg1Oi8vaHR0cHM6Ly9pcGZzLWNoZWNrZXIuMWtidG9vbC5jb20vJHtyZXMuaXBmc19jaWR9YFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0LmluY2x1ZGVzKFxcXCJpcGZzZ3cwMC5zdGFyaXZlcnBhbi5jb21cXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJkb3dubG9hZDovL1xcXCIgKyBpbnB1dCArIHJlcy5pcGZzX2NpZCArIFxcXCI7e1JlZmVyZXJAaHR0cHM6Ly93eC5zdGFyaXZlcnBhbi5jb20vfVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiZG93bmxvYWQ6Ly9cXFwiICsgaW5wdXQgKyByZXMuaXBmc19jaWRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHJlcylcXG4gICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt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ZXh0ZW5zaW9ufSDmlofku7blpKflsI86JHskLnJlcXVpcmUoXFxcImFwaVxcXCIpLmdldEZpbGVTaXplKGl0ZW0uZmlsZXNpemUpfTwvc21hbGw+YCxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGlkKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzZXJ2ZXJzID0gWydodHRwczovL3Rlc3QxLnpsaWIuZG93bmxvYWQnLCAnaHR0cHM6Ly90ZXN0Mi56bGliLmRvd25sb2FkJywgJ2h0dHBzOi8vemxpYi5qZzEyMTIzLm9uZSddXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoc2VydmVycywgMSwgXFxcIuivt+mAieaLqeS4i+i9vee6v+i3r1xcXCIpLnNlbGVjdCgoaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJkb3dubG9hZDovL1xcXCIgKyBpbnB1dCArIFxcXCIvZG93bmxvYWQvXFxcIiArIGlkICsgXFxcIi9cXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgaWQpXFxuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbG9nKGUubWVzc2FnZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6Kej5p6Q5aSx6LSlXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCBpdGVtLmlkKVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICB9LFxcbiAgICDpuKDmkak6IGZ1bmN0aW9uKGt3KSB7XFxuICAgICAgICB2YXIgaWQgPSBKU09OLnBhcnNlKHBvc3QoXFxcImh0dHBzOi8vd3d3NS5qaXVtb2RpYXJ5LmNvbS9pbml0X2h1YnMucGhwXFxcIiwge1xcbiAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgcToga3csXFxuICAgICAgICAgICAgICAgIHJlbW90ZV9pcDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgIHRpbWVfaW50OiBEYXRlLnBhcnNlKG5ldyBEYXRlKCkpICsgXFxcIlxcXCJcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KSkuaWRcXG4gICAgICAgIHZhciByZXMgPSBKU09OLnBhcnNlKHBvc3QoXFxcImh0dHBzOi8vd3d3NS5qaXVtb2RpYXJ5LmNvbS9hamF4X2ZldGNoX2h1YnMucGhwXFxcIiwge1xcbiAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IGlkLFxcbiAgICAgICAgICAgICAgICBzZXQ6IDBcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KSkuc291cmNlc1xcbiAgICAgICAgcmVzLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgaXRlbS5kZXRhaWxzLmRhdGEuZm9yRWFjaChpdGVtMiA9PiB7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuKAnOKAnOKAneKAnVxcXCIgKyBpdGVtMi50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLigJzigJzigJ3igJ1cXFwiICsgaXRlbTIuZGVzICsgXFxcIlxcXFxuXFxcIiArIGl0ZW0yLnZfZGVzLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBcXFwiaHR0cDpcXFwiICsgaXRlbTIuaW1nX2xpbmssXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogaXRlbTIuaW1nX2xpbmsgPyBcXFwibW92aWVfMV92ZXJ0aWNhbF9waWNcXFwiIDogXFxcInRleHRfMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IGl0ZW0yLmxpbmtcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSlcXG4gICAgfSxcXG4gICAgY2hlY2tMaWJnZW46IGZ1bmN0aW9uKCkge1xcbiAgICAgICAgdmFyIGRvbWFpbnMgPSBbXFxcImh0dHA6Ly9saWJnZW4ucnNcXFwiLCBcXFwiaHR0cDovL2xpYmdlbi5pc1xcXCIsIFxcXCJodHRwOi8vbGliZ2VuLnN0XFxcIl1cXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgZm9yIChpdGVtIG9mIGRvbWFpbnMpIHtcXG4gICAgICAgICAgICAgICAgdmFyIGNvZGUgPSBKU09OLnBhcnNlKHJlcXVlc3QoaXRlbSwge1xcbiAgICAgICAgICAgICAgICAgICAgd2l0aFN0YXR1c0NvZGU6IHRydWVcXG4gICAgICAgICAgICAgICAgfSkpLnN0YXR1c0NvZGVcXG4gICAgICAgICAgICAgICAgaWYgKGNvZGUgPT0gMjAwKSB7XFxuICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXCJsaWJnZW5cXFwiLCBpdGVtKVxcbiAgICAgICAgICAgICAgICAgICAgdG9hc3QoXFxcIuajgOa1i+WIsOWPr+eUqOmVnOWDj1xcXCIpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHRvYXN0KFxcXCLmiYDmnInplZzlg4/pg73ml6Dms5Xkvb/nlKjvvIzor7fmiZPlvIBUWuS9v+eUqFxcXCIpXFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgbG9nKGUubWVzc2FnZSlcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgTGliZ2VuOiBmdW5jdGlvbihrdywgcGFnZSkge1xcbiAgICAgICAgaWYgKGdldEl0ZW0oXFxcImxpYmdlblxcXCIsIFxcXCJcXFwiKSA9PSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgIHRvYXN0KFxcXCLml6Dlj6/nlKjplZzlg4/vvIzmraPlnKjmo4DmtYvkuK0uLi5cXFwiKVxcbiAgICAgICAgICAgICQucmVxdWlyZShcXFwiYXBpXFxcIikuY2hlY2tMaWJnZW4oKVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICB2YXIgdXJsID0gZ2V0SXRlbShcXFwibGliZ2VuXFxcIikgKyBcXFwiL3NlYXJjaC5waHA/cmVxPVxcXCIgKyBrdyArIFxcXCImcGFnZT1cXFwiICsgcGFnZVxcbiAgICAgICAgICAgIHZhciByID0gSlNPTi5wYXJzZShyZXF1ZXN0KHVybCwge1xcbiAgICAgICAgICAgICAgICB3aXRoSGVhZGVyczogdHJ1ZVxcbiAgICAgICAgICAgIH0pKVxcbiAgICAgICAgICAgIGlmIChyLnN0YXR1c0NvZGUgPT0gMjAwKSB7XFxuICAgICAgICAgICAgICAgIHZhciByZXMgPSByLmJvZHlcXG4gICAgICAgICAgICAgICAgdmFyIGxpc3QgPSBwZGZhKHJlcywgXFxcImJvZHkmJnRyXFxcIikuZmlsdGVyKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGl0ZW0uaW5jbHVkZXMoXFxcIm5vd3JhcFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGl0ZW1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgbGlzdC5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGxpID0gaXRlbS5tYXRjaChuZXcgUmVnRXhwKFxcXCI8dGQoLio/KTwvdGQ+XFxcIiwgXFxcImdcXFwiKSlcXG4gICAgICAgICAgICAgICAgICAgIHZhciBkZXNjID0gXFxcIuKAnOKAnOKAneKAnTxzbWFsbD5cXFwiICsgcGRmaChsaVsxXSwgXFxcImEmJlRleHRcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDM7IGkgPCBsaS5sZW5ndGggLSAzOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjICs9IFxcXCLvvJtcXFwiICsgcGRmaChsaVtpXSwgXFxcIlRleHRcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgZGVzYyArPSBcXFwiPC9zbWFsbD5cXFwiXFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGxpWzJdLCBcXFwiVGV4dFxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IGRlc2MsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGxpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiZG93bmxvYWQ6Ly9cXFwiICsgcGRmaChyZXF1ZXN0KHBkZmgobGlbOV0sIFxcXCJhJiZocmVmXFxcIikpLCBcXFwiI2Rvd25sb2FkJiZhJiZocmVmXFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBsaSlcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdG9hc3QoXFxcIumVnOWDj+WkseaViO+8jOmHjeaWsOajgOa1i+S4rS4uLlxcXCIpXFxuICAgICAgICAgICAgICAgICQucmVxdWlyZShcXFwiYXBpXFxcIikuY2hlY2tMaWJnZW4oKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAg572R55uYOiBmdW5jdGlvbihrdywgcGFnZSkge1xcbiAgICAgICAgdmFyIHJlcyA9IEpTT04ucGFyc2UocG9zdChcXFwiaHR0cHM6Ly9hcGkuYm9va3Bhbi5uZXQvYXBpL3NlYXJjaC9cXFwiLCB7XFxuICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICBcXFwia2V5d29yZFxcXCI6IGt3LFxcbiAgICAgICAgICAgICAgICBcXFwicGFnZVxcXCI6IHBhZ2UsXFxuICAgICAgICAgICAgICAgIFxcXCJzZW5zaXRpdmVcXFwiOiBmYWxzZVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KSkuZGF0YVxcbiAgICAgICAgcmVzLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0uaW5mbyxcXG4gICAgICAgICAgICAgICAgZGVzYzogXFxcIuKAnOKAnOKAneKAnTxzbWFsbD5cXFwiICsgaXRlbS5zb3VyY2UgKyBcXFwiPC9zbWFsbD5cXFwiLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaWQsIHNvdXJjZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVzID0gSlNPTi5wYXJzZShwb3N0KFxcXCJodHRwczovL2FwaS5ib29rcGFuLm5ldC9hcGkvZGV0YWlsL1xcXCIsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcImlkXFxcIjogaWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwic291cmNlXFxcIjogc291cmNlXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlcy5kb3dubG9hZF9saW5rKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkaWN0ID0ge31cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzLmRvd25sb2FkX2xpbmsudW5zaGlmdCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBcXFwi5Y6f572R6aG1XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogcmVzLnVybFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChyZXMuZG93bmxvYWRfbGluay5tYXAoZnVuY3Rpb24oaXRlbSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGl0ZW0ubmFtZVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSwgMSwgXFxcIuivt+mAieaLqeS4i+i9vee6v+i3r1xcXCIpLnNlbGVjdCgobGlua3MpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBsaW5rc1tsaW5rcy5tYXAoZnVuY3Rpb24oaXRlbSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBpdGVtLm5hbWVcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLmluZGV4T2YoaW5wdXQpXS51cmxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgcmVzLmRvd25sb2FkX2xpbmspXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlcy51cmxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbG9nKGUubWVzc2FnZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZ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dubG9hZDovL1xcXCIgKyBwZGZoKHJlcXVlc3QodXJsKSwgXFxcIi5kZXRhaWxfZG93bmxvYWRfYnRuX192N2I3ayYmaHJlZlxcXCIpXFxuICAgICAgICAgICAgICAgIH0sIFxcXCJodHRwczovL3d3dy5ib29rMTIzLmluZm9cXFwiICsgcGRmaChpdGVtLCBcXFwiYSYmaHJlZlxcXCIpKVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICB9LFxcbiAgICBiYWlkdTogZnVuY3Rpb24ocmVzKSB7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIGlmICghZmlsZUV4aXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL0pvZS9iYWlkdS50eHRcXFwiKSkge1xcbiAgICAgICAgICAgICAgICB0b2FzdChcXFwi6L+Y5pyq55m76ZmGXFxcIilcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQoKS5ydWxlKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChbe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImh0dHBzOi8vcGFuLmJhaWR1LmNvbS9cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwieDVfd2Vidmlld19zaW5nbGVcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCIxMDAlJiZmbG9hdFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVybCA9IGxvY2F0aW9uLmhyZWZcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1cmwuaW5jbHVkZXMoXFxcImh0dHBzOi8vcGFuLmJhaWR1LmNvbS93YXBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS53cml0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvSm9lL2JhaWR1LnR4dFxcXCIsIGZiYS5nZXRDb29raWUoXFxcIlxcXCIpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsZXJ0KFxcXCLlt7Lojrflj5bliLBjb29raWXvvIzov5Tlm57ljbPlj69cXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5iYWNrKClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVhOiBNT0JJTEVfVUEsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbkJhY2s6IHRydWVcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XSlcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB2YXIgYmRzdG9rZW4gPSBKU09OLnBhcnNlKHJlcXVlc3QoXFxcImh0dHBzOi8vcGFuLmJhaWR1LmNvbS9hcGkvZ2V0dGVtcGxhdGV2YXJpYWJsZT9maWVsZHM9WyUyMmJkc3Rva2VuJTIyXVxcXCIsIHtcXG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBDb29raWU6IHJlcXVlc3QoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvSm9lL2JhaWR1LnR4dFxcXCIpXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pKS5yZXN1bHQuYmRzdG9rZW5cXG4gICAgICAgICAgICAgICAgcmV0dXJuICQoXFxcIi/nlLXlrZDkuaYvXFxcIiArIHJlcy50aXRsZSArIFxcXCIuXFxcIiArIHJlcy5leHRlbnNpb24sIFxcXCLor7fovpPlhaXkv53lrZjot6/lvoRcXFwiKS5pbnB1dCgoYmRzdG9rZW4sIHJlcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlcyA9IEpTT04ucGFyc2UocG9zdChcXFwiaHR0cHM6Ly9wYW4uYmFpZHUuY29tL3Jlc3QvMi4wL3hwYW4vZmlsZT9tZXRob2Q9Y3JlYXRlJmJkc3Rva2VuPVxcXCIgKyBiZHN0b2tlbiwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQ29va2llOiByZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL0pvZS9iYWlkdS50eHRcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgYm9keToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplOiByZXMuZmlsZXNpemUgKyBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGF0aDogaW5wdXQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsb2NrX2xpc3Q6IFtyZXMubWQ1XSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcnR5cGU6IDBcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KSlcXG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXMuZXJybm8gPT0gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/ovazlrZjmiJDlip9cXFwiXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHJlcy5lcnJubyA9PSAtOCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/ovazlrZjlpLHotKXvvIzlt7Lnu4/kv53lrZjov4fov5nkuKrmlofku7bkuoZcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHJlcy5lcnJubyA9PSAyKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+i9rOWtmOWksei0pe+8jOmUmeivr+eahOi3r+W+hFxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbG9nKHJlcy5lcnJubylcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6L2s5a2Y5aSx6LSlXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCBiZHN0b2tlbiwgcmVzKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICBsb2coZS5tZXNzYWdlKVxcbiAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/ovazlrZjlpLHotKVcXFwiXFxuICAgICAgICB9XFxuICAgIH0sXFxuICAgIGNvbXB1dGVSYXRpbmc6IGZ1bmN0aW9uKGUsIHQpIHtcXG4gICAgICAgIGxldCBpID0gXFxcIlxcXCI7XFxuICAgICAgICBmb3IgKGxldCByID0gMDsgciA8IDU7IHIrKykgciA8IE1hdGgucm91bmQodCAvIChlIC8gNSkpID8gaSArPSBcXFwi4piFXFxcIiA6IGkgKz0gXFxcIuKYhlxcXCI7XFxuICAgICAgICByZXR1cm4gXFxcIuKAnOKAnOKAneKAnTxmb250IGNvbG9yPSNmZmFjMmQ+XFxcIiArIGkgKyBcXFwiPC9mb250PlxcXCI7XFxuICAgIH0sXFxuICAgIHNlcnZlcnM6IFtcXFwiaHR0cHM6Ly9pcGZzZ3cwMC5zdGFyaXZlcnBhbi5jb206OTA5NS9pcGZzL1xcXCIsIFxcXCJodHRwczovL2R3ZWIubGluay9pcGZzL1xcXCIsIFxcXCJodHRwczovL2lwZnMuanB1LmpwL2lwZnMvXFxcIiwgXFxcImh0dHBzOi8vY2YtaXBmcy5jb20vaXBmcy9cXFwiLCBcXFwiaHR0cHM6Ly9nYXRld2F5LnBpbmF0YS5jbG91ZC9pcGZzL1xcXCIsIFxcXCJodHRwczovL2lwZnMtZ2F0ZXdheS5jbG91ZC9pcGZzL1xcXCJdLFxcbiAgICBnZXRGaWxlU2l6ZTogZnVuY3Rpb24oc2l6ZSkge1xcbiAgICAgICAgaWYgKHNpemUgPD0gMCkge1xcbiAgICAgICAgICAgIHJldHVybiBcXFwiXFxcIjtcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCB1bml0Rm9ybSA9IFtcXFwiQnl0ZVxcXCIsIFxcXCJLQlxcXCIsIFxcXCJNQlxcXCIsIFxcXCJHQlxcXCIsIFxcXCJUQlxcXCJdO1xcbiAgICAgICAgZm9yIChsZXQgaSA9IDAsIGxlbiA9IHVuaXRGb3JtLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XFxuICAgICAgICAgICAgaWYgKHNpemUgPiAxMDI0KSB7XFxuICAgICAgICAgICAgICAgIHNpemUgLz0gMTAyNDtcXG4gICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHNpemUudG9GaXhlZCgyKS5yZXBsYWNlKC8oXFxcXC4wMCkkLywgXFxcIlxcXCIpICsgdW5pdEZvcm1baV07XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIFxcXCJFUlJPUjrmlbDlgLzov4flpKdcXFwiO1xcbiAgICB9XFxufVwifV0ifQ==
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement