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2xldCBDb25GaWcuKn0vKVswXTsKICAgICAgICAgICAgbG9nKGNvbikKICAgICAgICAgICAgZXZhbChjb24gKyAnXG5ydWxlLkNvbkZpZz1Db25GaWcnKQoKICAgICAgICAgICAgZnVuY3Rpb24gZWMoc3RyLCB1aWQpIHsKICAgICAgICAgICAgICAgIGV2YWwoZ2V0Q3J5cHRvSlMoKSk7CiAgICAgICAgICAgICAgICByZXR1cm4gQ3J5cHRvSlMuZW5jLlV0Zjguc3RyaW5naWZ5KENyeXB0b0pTLkFFUy5kZWNyeXB0KHN0ciwgQ3J5cHRvSlMuZW5jLlV0ZjgucGFyc2UoJzI4OTAnICsgdWlkICsgJ3RCOTU5QycpLCB7CiAgICAgICAgICAgICAgICAgICAgaXY6IENyeXB0b0pTLmVuYy5VdGY4LnBhcnNlKCcyRjEzMUJFOTEyNDc4NjZFJyksCiAgICAgICAgICAgICAgICAgICAgbW9kZTogQ3J5cHRvSlMubW9kZS5DQkMsCiAgICAgICAgICAgICAgICAgICAgcGFkZGluZzogQ3J5cHRvSlMucGFkLlBrY3M3CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIC8vbG9nKHJ1bGUuQ29uRmlnLnVybCkKICAgICAgICAgICAgLy9sb2cocnVsZS5Db25GaWcuY29uZmlnLnVpZCkKICAgICAgICAgICAgbGV0IHB1cmwgPSBlYyhydWxlLkNvbkZpZy51cmwsIHJ1bGUuQ29uRmlnLmNvbmZpZy51aWQpOwogICAgICAgICAgICAvL2xvZyhwdXJsKQogICAgICAgICAgICBpbnB1dCA9IHsKICAgICAgICAgICAgICAgIGp4OiAwLAogICAgICAgICAgICAgICAgdXJsOiBwdXJsLAogICAgICAgICAgICAgICAgcGFyc2U6IDAsCiAgICAgICAgICAgICAgICAvL2hlYWRlcnM6eydPcmlnaW4nOidodHRwOi8vangueHlrcy5saW5rJ30KICAgICAgICAgICAgfQogICAgICAgIH0gZWxzZSBpZiAoL20zdTh8bXA0Ly50ZXN0KHVybCkpIHsKICAgICAgICAgICAgaW5wdXQgPSB1cmw7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgaW5wdXQKICAgICAgICB9CiAgICB9KSwKCn0= |