<?php

/**
 * Debugger bluescreen template.
 *
 * This file is part of the Tracy (https://tracy.nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 *
 * @param  array $exception
 * @param  string $title
 * @param  string $nonce
 * @return void
 */

namespace Tracy;

$code = $exception->getCode() ? ' #' . $exception->getCode() : '';
$nonceAttr = $nonce ? ' nonce="' . Helpers::escapeHtml($nonce) . '"' : '';
?><!DOCTYPE html><!-- "' --></textarea></script></style></pre></xmp></a></iframe></noembed></noframes></noscript></option></select></template></title></table>
<html>
<head>
	<meta charset="utf-8">
	<meta name="robots" content="noindex">
	<meta name="generator" content="Tracy by Nette Framework">

	<title><?= Helpers::escapeHtml($title . ': ' . $exception->getMessage() . $code) ?></title>
	<?php if ($ex = $exception->getPrevious()): ?>
<!--<?php do { echo str_replace('--', '- ', Helpers::escapeHtml("\n\tcaused by " . Helpers::getClass($ex) . ': ' . $ex->getMessage() . ($ex->getCode() ? ' #' . $ex->getCode() : ''))); } while ($ex = $ex->getPrevious()); ?> -->
	<?php endif ?>

	<style type="text/css" class="tracy-debug">
	<?= str_replace('</', '<\/', $css) ?>
	</style>
	<script<?= $nonceAttr ?>>document.documentElement.className+=' tracy-js'</script>
</head>


<body>
<?php require __DIR__ . '/content.phtml' ?>

<script<?= $nonceAttr ?>>
(function() {
	<?php readfile(__DIR__ . '/../Toggle/toggle.js') ?>
	<?php readfile(__DIR__ . '/../Dumper/dumper.js') ?>
	<?php readfile(__DIR__ . '/bluescreen.js') ?>
})();
</script>
<script<?= $nonceAttr ?>>
Tracy && Tracy.Dumper.init(<?= str_replace('<!--', '<\!--', json_encode(Dumper::fetchLiveData())) ?>);
</script>
<script<?= $nonceAttr ?>>
Tracy && Tracy.BlueScreen.init();
</script>
</body>
</html>
