<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* debug/live.html.twig */
class __TwigTemplate_f56a7c0169153d0174861da7d3dcfc7d extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'body' => [$this, 'block_body'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "debug/live.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "debug/live.html.twig"));
$this->parent = $this->load("base.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_body(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 4
yield " <div class=\"page\">
<div class=\"container header-page\">
<div class=\"row animated fadeIn delay-0-2s mb-3 mb-lg-5 align-items-center header-button\">
<div class=\"col-6\">
<div class=\"\">
\t<h2><svg class=\"icon-network\" style=\"width: 27px; position: relative; top: -5px;\" xmlns=\"http://www.w3.org/2000/svg\" width=\"35\" height=\"27\" fill=\"currentColor\" class=\"bi bi-wifi\" viewBox=\"0 0 16 16\">
\t\t\t\t\t\t <path d=\"M15.384 6.115a.485.485 0 0 0-.047-.736A12.444 12.444 0 0 0 8 3C5.259 3 2.723 3.882.663 5.379a.485.485 0 0 0-.048.736.518.518 0 0 0 .668.05A11.448 11.448 0 0 1 8 4c2.507 0 4.827.802 6.716 2.164.205.148.49.13.668-.049z\"/>
\t\t\t\t\t\t <path d=\"M13.229 8.271a.482.482 0 0 0-.063-.745A9.455 9.455 0 0 0 8 6c-1.905 0-3.68.56-5.166 1.526a.48.48 0 0 0-.063.745.525.525 0 0 0 .652.065A8.46 8.46 0 0 1 8 7a8.46 8.46 0 0 1 4.576 1.336c.206.132.48.108.653-.065zm-2.183 2.183c.226-.226.185-.605-.1-.75A6.473 6.473 0 0 0 8 9c-1.06 0-2.062.254-2.946.704-.285.145-.326.524-.1.75l.015.015c.16.16.407.19.611.09A5.478 5.478 0 0 1 8 10c.868 0 1.69.201 2.42.56.203.1.45.07.61-.091l.016-.015zM9.06 12.44c.196-.196.198-.52-.04-.66A1.99 1.99 0 0 0 8 11.5a1.99 1.99 0 0 0-1.02.28c-.238.14-.236.464-.04.66l.706.706a.5.5 0 0 0 .707 0l.707-.707z\"/>
\t\t\t\t\t\t</svg> Live</h2>
</div>
</div>
<div class=\"col-6 text-right\">
\t<div class=\"link-right\">
\t\t<button class=\"btn btn-secondary link-i-see d-none\">Recept</button>
\t</div>
\t</div>
\t<div class=\"col-12\">
\t\t<hr></hr>
\t</div>
</div>
</div>
<div class=\"container\">
\t<div class=\"row\">
\t\t<div class=\"col-12 col-md-6 col-lg-4 mb-3 mb-lg-0 col-xl-3 animated fadeIn delay-0-2s\">
\t\t\t<div class=\"card text-center\" id=\"current-position\">
\t\t\t\t\t \t<div class=\"card-header\">
\t\t\t\t\t \tCurrent position
\t\t\t\t\t \t</div>
\t\t\t\t\t \t";
// line 34
if ((($tmp = (isset($context["currentPosition"]) || array_key_exists("currentPosition", $context) ? $context["currentPosition"] : (function () { throw new RuntimeError('Variable "currentPosition" does not exist.', 34, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 35
yield "\t\t\t\t\t\t \t<div class=\"card-body\">
\t\t\t\t\t\t \t<h5 class=\"card-title\"><span class=\"value\">";
// line 36
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, (isset($context["currentPosition"]) || array_key_exists("currentPosition", $context) ? $context["currentPosition"] : (function () { throw new RuntimeError('Variable "currentPosition" does not exist.', 36, $this->source); })()), "datePrinted", [], "any", false, false, false, 36), "d-m-Y H:i:s"), "html", null, true);
yield "</span></h5>
\t\t\t\t\t\t \t<ul class=\"list-group list-group-flush\">
\t\t\t\t\t\t\t\t <li class=\"list-group-item latitude\">Latitude : <div class=\"value\">";
// line 38
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["currentPosition"]) || array_key_exists("currentPosition", $context) ? $context["currentPosition"] : (function () { throw new RuntimeError('Variable "currentPosition" does not exist.', 38, $this->source); })()), "latitude", [], "any", false, false, false, 38), "html", null, true);
yield "</div></li>
\t\t\t\t\t\t\t\t <li class=\"list-group-item longitude\">Longitude : <div class=\"value\">";
// line 39
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["currentPosition"]) || array_key_exists("currentPosition", $context) ? $context["currentPosition"] : (function () { throw new RuntimeError('Variable "currentPosition" does not exist.', 39, $this->source); })()), "longitude", [], "any", false, false, false, 39), "html", null, true);
yield "</div></li>
\t\t\t\t\t\t\t\t <li class=\"list-group-item\"><a href=\"/debug/information/position\" class=\"btn btn-primary mt-3\">Get last positions</a></li>
\t\t\t\t\t\t\t \t</ul>
\t\t\t\t\t\t\t \t
\t\t\t\t\t\t \t</div>
\t\t\t\t\t\t \t<div class=\"card-footer text-muted\">
\t\t\t\t\t\t \t<span class=\"value\">";
// line 45
yield (isset($context["currentAgo"]) || array_key_exists("currentAgo", $context) ? $context["currentAgo"] : (function () { throw new RuntimeError('Variable "currentAgo" does not exist.', 45, $this->source); })());
yield "</span> ago
\t\t\t\t\t\t \t</div>
\t\t\t\t\t \t";
} else {
// line 48
yield "\t\t\t\t\t \t\t<div class=\"text-center\">No data</div>
\t\t\t\t\t \t";
}
// line 50
yield "\t\t\t\t\t</div>
\t\t</div>
\t\t<div class=\"col-12 col-md-6 col-lg-4 mb-3 mb-lg-0 col-xl-3 animated fadeIn delay-0-2s\">
\t\t\t<div class=\"card text-center\" id=\"current-hobit\">
\t\t\t\t\t \t<div class=\"card-header\">
\t\t\t\t\t \tLast hobit
\t\t\t\t\t \t</div>
\t\t\t\t\t \t";
// line 59
if ((($tmp = (isset($context["lastHobit"]) || array_key_exists("lastHobit", $context) ? $context["lastHobit"] : (function () { throw new RuntimeError('Variable "lastHobit" does not exist.', 59, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 60
yield "\t\t\t\t\t\t \t<div class=\"card-body\">
\t\t\t\t\t\t \t<h5 class=\"card-title\"><span class=\"value\">";
// line 61
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, (isset($context["lastHobit"]) || array_key_exists("lastHobit", $context) ? $context["lastHobit"] : (function () { throw new RuntimeError('Variable "lastHobit" does not exist.', 61, $this->source); })()), "startDateTime", [], "any", false, false, false, 61), "d-m-Y H:i:s"), "html", null, true);
yield "</span></h5>
\t\t\t\t\t\t \t<ul class=\"list-group list-group-flush\">
\t\t\t\t\t\t\t\t <li class=\"list-group-item latitude\">Latitude : <div class=\"value\">";
// line 63
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["lastHobit"]) || array_key_exists("lastHobit", $context) ? $context["lastHobit"] : (function () { throw new RuntimeError('Variable "lastHobit" does not exist.', 63, $this->source); })()), "data", [], "any", false, false, false, 63), "latitude", [], "any", false, false, false, 63), "html", null, true);
yield "</div></li>
\t\t\t\t\t\t\t\t <li class=\"list-group-item longitude\">Longitude : <div class=\"value\">";
// line 64
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["lastHobit"]) || array_key_exists("lastHobit", $context) ? $context["lastHobit"] : (function () { throw new RuntimeError('Variable "lastHobit" does not exist.', 64, $this->source); })()), "data", [], "any", false, false, false, 64), "longitude", [], "any", false, false, false, 64), "html", null, true);
yield "</div></li>
\t\t\t\t\t\t\t\t <li class=\"list-group-item end\">End (or now) : <div class=\"value\">";
// line 65
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, (isset($context["lastHobit"]) || array_key_exists("lastHobit", $context) ? $context["lastHobit"] : (function () { throw new RuntimeError('Variable "lastHobit" does not exist.', 65, $this->source); })()), "endDateTime", [], "any", false, false, false, 65), "d-m-Y H:i:s"), "html", null, true);
yield "</div></li>
\t\t\t\t\t\t\t \t</ul>
\t\t\t\t\t\t\t \t
\t\t\t\t\t\t \t</div>
\t\t\t\t\t\t \t<div class=\"card-footer text-muted\">
\t\t\t\t\t\t \t<span class=\"value\">";
// line 70
yield (isset($context["currentHobitAgo"]) || array_key_exists("currentHobitAgo", $context) ? $context["currentHobitAgo"] : (function () { throw new RuntimeError('Variable "currentHobitAgo" does not exist.', 70, $this->source); })());
yield "</span> ago
\t\t\t\t\t\t \t</div>
\t\t\t\t\t \t";
} else {
// line 73
yield "\t\t\t\t\t \t\t<div class=\"text-center\">No data</div>
\t\t\t\t\t \t";
}
// line 75
yield "\t\t\t\t\t</div>
\t\t</div>
\t\t<div class=\"col-12 col-md-6 col-lg-4 mb-3 mb-lg-0 col-xl-3 \">
\t\t";
// line 79
if (((isset($context["newHobitAgo"]) || array_key_exists("newHobitAgo", $context) ? $context["newHobitAgo"] : (function () { throw new RuntimeError('Variable "newHobitAgo" does not exist.', 79, $this->source); })()) == false)) {
// line 80
yield " \t\t\t<div class=\"card text-center d-none animated fadeIn delay-0-2s\" id=\"new-hobit\">
\t\t\t";
} else {
// line 82
yield " \t\t\t\t<div class=\"card text-center animated fadeIn delay-0-2s\" id=\"new-hobit\">
\t\t\t\t";
}
// line 84
yield "\t\t\t\t\t \t<div class=\"card-header\">
\t\t\t\t\t \tScan hobit
\t\t\t\t\t \t</div>
\t\t\t\t\t \t<div class=\"card-body\">
\t\t\t\t\t \t<h5 class=\"card-title\">
\t\t\t\t \t\t<span class=\"value\">
\t\t\t\t \t\t\t";
// line 90
if ((($tmp = (isset($context["lastHobit"]) || array_key_exists("lastHobit", $context) ? $context["lastHobit"] : (function () { throw new RuntimeError('Variable "lastHobit" does not exist.', 90, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 91
yield "\t\t\t\t\t \t\t\tSince ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, (isset($context["lastHobit"]) || array_key_exists("lastHobit", $context) ? $context["lastHobit"] : (function () { throw new RuntimeError('Variable "lastHobit" does not exist.', 91, $this->source); })()), "endDateTime", [], "any", false, false, false, 91), "d-m-Y H:i:s"), "html", null, true);
yield "
\t\t\t\t \t\t\t";
}
// line 93
yield "\t\t\t\t \t\t</span></h5>
\t\t\t\t\t \t<div class=\"loader mt-lg-4\">
\t\t\t\t\t \t\t<div class=\"spinner-grow text-primary\" role=\"status\">
\t\t\t\t\t\t\t\t <span class=\"visually-hidden\">Loading...</span>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t \t</div>
\t\t\t\t\t \t</div>
\t\t\t\t\t \t<div class=\"card-footer text-muted\">
\t\t\t\t\t \t<span class=\"value\">";
// line 101
yield (isset($context["newHobitAgo"]) || array_key_exists("newHobitAgo", $context) ? $context["newHobitAgo"] : (function () { throw new RuntimeError('Variable "newHobitAgo" does not exist.', 101, $this->source); })());
yield "</span> ago
\t\t\t\t\t \t</div>
\t\t\t\t\t</div>
\t\t</div>
\t\t</div>
<div class=\"row mt-5\">
\t<div class=\"col-12\">
\t\t<h3 class=\"mb-3 animated fadeIn delay-0-2s\">Last positions</h3>
\t\t</div>
</div>
<div class=\"row\">
\t";
// line 114
if ((($tmp = (isset($context["positionGpsList"]) || array_key_exists("positionGpsList", $context) ? $context["positionGpsList"] : (function () { throw new RuntimeError('Variable "positionGpsList" does not exist.', 114, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 115
yield "\t \t\t";
$context["i"] = 1;
// line 116
yield "\t ";
$context["number"] = 1;
// line 117
yield "\t \t\t";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["positionGpsList"]) || array_key_exists("positionGpsList", $context) ? $context["positionGpsList"] : (function () { throw new RuntimeError('Variable "positionGpsList" does not exist.', 117, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["positionGps"]) {
// line 118
yield "\t <div class=\"col-12 col-md-6 col-lg-4 mb-3 mb-lg-5\">
\t <div class=\"card animated fadeIn delay-0-";
// line 119
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 119, $this->source); })()), "html", null, true);
yield "s\" style=\"width: 100%;\">
\t <div class=\"card-body\">
\t <h5 class=\"card-title\"><b>Position <span class=\"value\">";
// line 121
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["number"]) || array_key_exists("number", $context) ? $context["number"] : (function () { throw new RuntimeError('Variable "number" does not exist.', 121, $this->source); })()), "html", null, true);
yield "</span></b></h5>
\t <div class=\"card-text line mb-1\"><b>Date application : </b>";
// line 122
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["positionGps"], "datePrinted", [], "any", false, false, false, 122), "d-m-Y H:i:s"), "html", null, true);
yield "</div>
\t <div class=\"card-text line mb-1\"><b>Date server : </b>";
// line 123
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["positionGps"], "dateCreatedByServer", [], "any", false, false, false, 123), "d-m-Y H:i:s"), "html", null, true);
yield "</div>
\t <div class=\"card-text line mb-1\"><b>Latitude : </b>";
// line 124
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["positionGps"], "latitude", [], "any", false, false, false, 124), "html", null, true);
yield "</div>
\t <div class=\"card-text line mb-1\"><b>Longitude : </b>";
// line 125
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["positionGps"], "longitude", [], "any", false, false, false, 125), "html", null, true);
yield "</div>
\t <a href=\"/debug/information/positions/";
// line 126
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["positionGps"], "datePrinted", [], "any", false, false, false, 126), "Y-m-d"), "html", null, true);
yield "\" class=\"btn btn-primary mt-3\">All positions</a>
\t </div>
\t </div>
\t </div>
\t ";
// line 130
$context["i"] = ((isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 130, $this->source); })()) + 1);
// line 131
yield "\t ";
$context["number"] = ((isset($context["number"]) || array_key_exists("number", $context) ? $context["number"] : (function () { throw new RuntimeError('Variable "number" does not exist.', 131, $this->source); })()) + 1);
// line 132
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['positionGps'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
yield "
";
} else {
// line 134
yield "\t <div class=\"text-center animated fadeIn delay-0-4s\" style=\"font-size: 30px;\">No data...</div>
";
}
// line 136
yield "
</div>
</div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 142
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_javascripts(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 143
yield " ";
yield from $this->yieldParentBlock("javascripts", $context, $blocks);
yield "
<script>
\twindow.onload=function() {
\t\t var boucle = 1;
\t \tsetInterval(function(){
\t\t\t\t\$.get(
\t\t\t\t '";
// line 151
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("information_live_refresh_debug");
yield "',
\t\t\t \t{
\t\t\t \t},
\t\t\t\t function(data){
\t\t\t\t \tif(data['data']['dataHere']){
\t\t\t\t\t \tif(data['data']['currentPostition']['start'] != \$(\"body #current-position .card-title .value\").html()){
\t\t\t\t\t \t\t\$(\".icon-network\").removeClass(\"active\");
\t\t\t\t\t \t\t\$(\".icon-network\").addClass(\"active\");
\t\t\t\t\t \t\t\$(\".link-i-see\").removeClass(\"d-none\");
\t\t\t\t\t \t\tconst soundEffect = new Audio();
\t\t\t\t\t\t\t\t// onClick of first interaction on page before I need the sounds
\t\t\t\t\t\t\t\tsoundEffect.play();
\t\t\t\t\t\t\t\t// later on when you actually want to play a sound at any point without user interaction
\t\t\t\t\t\t\t\tsoundEffect.src = '/alert.mp3';
\t\t\t\t\t\t\t\tsoundEffect.play();
\t\t\t\t\t \t}
\t\t\t\t\t \t//Current position
\t\t\t\t\t \$(\"body #current-position .card-title .value\").html(data['data']['currentPostition']['start']);
\t\t\t\t\t \$(\"body #current-position .latitude .value\").html(data['data']['currentPostition']['latitude']);
\t\t\t\t\t \$(\"body #current-position .longitude .value\").html(data['data']['currentPostition']['longitude']);
\t\t\t\t\t \$(\"body #current-position .card-footer .value\").html(data['data']['currentAgo']);
\t\t\t\t\t //Current hobit
\t\t\t\t\t \$(\"body #current-hobit .card-title .value\").html(data['data']['lastHobit']['start']);
\t\t\t\t\t \$(\"body #current-hobit .latitude .value\").html(data['data']['lastHobit']['latitude']);
\t\t\t\t\t \$(\"body #current-hobit .longitude .value\").html(data['data']['lastHobit']['longitude']);
\t\t\t\t\t \$(\"body #current-hobit .end .value\").html(data['data']['lastHobit']['end']);
\t\t\t\t\t \$(\"body #current-hobit .card-footer .value\").html(data['data']['currentHobitAgo']);
\t\t\t\t\t //Current hobit
\t\t\t\t\t if(data['data']['newHobitAgo'] != false){
\t\t\t\t\t \t\$(\"body #new-hobit .card-title .value\").html(data['data']['currentPostition']['start']);
\t\t\t\t\t \t\$(\"body #new-hobit .card-footer .value\").html(data['data']['newHobitAgo']);
\t\t\t\t\t \t\$(\"body #new-hobit\").removeClass(\"d-none\");
\t\t\t\t\t \t}
\t\t\t\t\t \telse{
\t\t\t\t\t \t\t\$(\"body #new-hobit\").addClass(\"d-none\");
\t\t\t\t\t \t}
\t\t\t\t \t}
\t\t\t\t }
\t\t\t\t);
\t\t\t}, 1000);
\t\t\t};
\t\t\$(\"body\").on(\"click\", \".link-i-see\", function(){
\t\t\t\$(this).addClass(\"d-none\");
\t\t\t\$(\".icon-network\").removeClass(\"active\");
\t\t});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "debug/live.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 353 => 151, 341 => 143, 328 => 142, 313 => 136, 309 => 134, 300 => 132, 297 => 131, 295 => 130, 288 => 126, 284 => 125, 280 => 124, 276 => 123, 272 => 122, 268 => 121, 263 => 119, 260 => 118, 255 => 117, 252 => 116, 249 => 115, 247 => 114, 231 => 101, 221 => 93, 215 => 91, 213 => 90, 205 => 84, 201 => 82, 197 => 80, 195 => 79, 189 => 75, 185 => 73, 179 => 70, 171 => 65, 167 => 64, 163 => 63, 158 => 61, 155 => 60, 153 => 59, 142 => 50, 138 => 48, 132 => 45, 123 => 39, 119 => 38, 114 => 36, 111 => 35, 109 => 34, 77 => 4, 64 => 3, 41 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends 'base.html.twig' %}
{% block body %}
<div class=\"page\">
<div class=\"container header-page\">
<div class=\"row animated fadeIn delay-0-2s mb-3 mb-lg-5 align-items-center header-button\">
<div class=\"col-6\">
<div class=\"\">
\t<h2><svg class=\"icon-network\" style=\"width: 27px; position: relative; top: -5px;\" xmlns=\"http://www.w3.org/2000/svg\" width=\"35\" height=\"27\" fill=\"currentColor\" class=\"bi bi-wifi\" viewBox=\"0 0 16 16\">
\t\t\t\t\t\t <path d=\"M15.384 6.115a.485.485 0 0 0-.047-.736A12.444 12.444 0 0 0 8 3C5.259 3 2.723 3.882.663 5.379a.485.485 0 0 0-.048.736.518.518 0 0 0 .668.05A11.448 11.448 0 0 1 8 4c2.507 0 4.827.802 6.716 2.164.205.148.49.13.668-.049z\"/>
\t\t\t\t\t\t <path d=\"M13.229 8.271a.482.482 0 0 0-.063-.745A9.455 9.455 0 0 0 8 6c-1.905 0-3.68.56-5.166 1.526a.48.48 0 0 0-.063.745.525.525 0 0 0 .652.065A8.46 8.46 0 0 1 8 7a8.46 8.46 0 0 1 4.576 1.336c.206.132.48.108.653-.065zm-2.183 2.183c.226-.226.185-.605-.1-.75A6.473 6.473 0 0 0 8 9c-1.06 0-2.062.254-2.946.704-.285.145-.326.524-.1.75l.015.015c.16.16.407.19.611.09A5.478 5.478 0 0 1 8 10c.868 0 1.69.201 2.42.56.203.1.45.07.61-.091l.016-.015zM9.06 12.44c.196-.196.198-.52-.04-.66A1.99 1.99 0 0 0 8 11.5a1.99 1.99 0 0 0-1.02.28c-.238.14-.236.464-.04.66l.706.706a.5.5 0 0 0 .707 0l.707-.707z\"/>
\t\t\t\t\t\t</svg> Live</h2>
</div>
</div>
<div class=\"col-6 text-right\">
\t<div class=\"link-right\">
\t\t<button class=\"btn btn-secondary link-i-see d-none\">Recept</button>
\t</div>
\t</div>
\t<div class=\"col-12\">
\t\t<hr></hr>
\t</div>
</div>
</div>
<div class=\"container\">
\t<div class=\"row\">
\t\t<div class=\"col-12 col-md-6 col-lg-4 mb-3 mb-lg-0 col-xl-3 animated fadeIn delay-0-2s\">
\t\t\t<div class=\"card text-center\" id=\"current-position\">
\t\t\t\t\t \t<div class=\"card-header\">
\t\t\t\t\t \tCurrent position
\t\t\t\t\t \t</div>
\t\t\t\t\t \t{% if currentPosition %}
\t\t\t\t\t\t \t<div class=\"card-body\">
\t\t\t\t\t\t \t<h5 class=\"card-title\"><span class=\"value\">{{ currentPosition.datePrinted|date(\"d-m-Y H:i:s\") }}</span></h5>
\t\t\t\t\t\t \t<ul class=\"list-group list-group-flush\">
\t\t\t\t\t\t\t\t <li class=\"list-group-item latitude\">Latitude : <div class=\"value\">{{ currentPosition.latitude }}</div></li>
\t\t\t\t\t\t\t\t <li class=\"list-group-item longitude\">Longitude : <div class=\"value\">{{ currentPosition.longitude }}</div></li>
\t\t\t\t\t\t\t\t <li class=\"list-group-item\"><a href=\"/debug/information/position\" class=\"btn btn-primary mt-3\">Get last positions</a></li>
\t\t\t\t\t\t\t \t</ul>
\t\t\t\t\t\t\t \t
\t\t\t\t\t\t \t</div>
\t\t\t\t\t\t \t<div class=\"card-footer text-muted\">
\t\t\t\t\t\t \t<span class=\"value\">{{ currentAgo|raw }}</span> ago
\t\t\t\t\t\t \t</div>
\t\t\t\t\t \t{% else %}
\t\t\t\t\t \t\t<div class=\"text-center\">No data</div>
\t\t\t\t\t \t{% endif %}
\t\t\t\t\t</div>
\t\t</div>
\t\t<div class=\"col-12 col-md-6 col-lg-4 mb-3 mb-lg-0 col-xl-3 animated fadeIn delay-0-2s\">
\t\t\t<div class=\"card text-center\" id=\"current-hobit\">
\t\t\t\t\t \t<div class=\"card-header\">
\t\t\t\t\t \tLast hobit
\t\t\t\t\t \t</div>
\t\t\t\t\t \t{% if lastHobit %}
\t\t\t\t\t\t \t<div class=\"card-body\">
\t\t\t\t\t\t \t<h5 class=\"card-title\"><span class=\"value\">{{ lastHobit.startDateTime|date(\"d-m-Y H:i:s\") }}</span></h5>
\t\t\t\t\t\t \t<ul class=\"list-group list-group-flush\">
\t\t\t\t\t\t\t\t <li class=\"list-group-item latitude\">Latitude : <div class=\"value\">{{ lastHobit.data.latitude }}</div></li>
\t\t\t\t\t\t\t\t <li class=\"list-group-item longitude\">Longitude : <div class=\"value\">{{ lastHobit.data.longitude }}</div></li>
\t\t\t\t\t\t\t\t <li class=\"list-group-item end\">End (or now) : <div class=\"value\">{{ lastHobit.endDateTime|date(\"d-m-Y H:i:s\") }}</div></li>
\t\t\t\t\t\t\t \t</ul>
\t\t\t\t\t\t\t \t
\t\t\t\t\t\t \t</div>
\t\t\t\t\t\t \t<div class=\"card-footer text-muted\">
\t\t\t\t\t\t \t<span class=\"value\">{{ currentHobitAgo|raw }}</span> ago
\t\t\t\t\t\t \t</div>
\t\t\t\t\t \t{% else %}
\t\t\t\t\t \t\t<div class=\"text-center\">No data</div>
\t\t\t\t\t \t{% endif %}
\t\t\t\t\t</div>
\t\t</div>
\t\t<div class=\"col-12 col-md-6 col-lg-4 mb-3 mb-lg-0 col-xl-3 \">
\t\t{% if newHobitAgo == false %}
\t\t\t<div class=\"card text-center d-none animated fadeIn delay-0-2s\" id=\"new-hobit\">
\t\t\t{% else %}
\t\t\t\t<div class=\"card text-center animated fadeIn delay-0-2s\" id=\"new-hobit\">
\t\t\t\t{% endif %}
\t\t\t\t\t \t<div class=\"card-header\">
\t\t\t\t\t \tScan hobit
\t\t\t\t\t \t</div>
\t\t\t\t\t \t<div class=\"card-body\">
\t\t\t\t\t \t<h5 class=\"card-title\">
\t\t\t\t \t\t<span class=\"value\">
\t\t\t\t \t\t\t{% if lastHobit %}
\t\t\t\t\t \t\t\tSince {{ lastHobit.endDateTime|date(\"d-m-Y H:i:s\") }}
\t\t\t\t \t\t\t{% endif %}
\t\t\t\t \t\t</span></h5>
\t\t\t\t\t \t<div class=\"loader mt-lg-4\">
\t\t\t\t\t \t\t<div class=\"spinner-grow text-primary\" role=\"status\">
\t\t\t\t\t\t\t\t <span class=\"visually-hidden\">Loading...</span>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t \t</div>
\t\t\t\t\t \t</div>
\t\t\t\t\t \t<div class=\"card-footer text-muted\">
\t\t\t\t\t \t<span class=\"value\">{{ newHobitAgo|raw }}</span> ago
\t\t\t\t\t \t</div>
\t\t\t\t\t</div>
\t\t</div>
\t\t</div>
<div class=\"row mt-5\">
\t<div class=\"col-12\">
\t\t<h3 class=\"mb-3 animated fadeIn delay-0-2s\">Last positions</h3>
\t\t</div>
</div>
<div class=\"row\">
\t{% if positionGpsList %}
\t \t\t{% set i = 1 %}
\t {% set number = 1 %}
\t \t\t{% for positionGps in positionGpsList %}
\t <div class=\"col-12 col-md-6 col-lg-4 mb-3 mb-lg-5\">
\t <div class=\"card animated fadeIn delay-0-{{ i }}s\" style=\"width: 100%;\">
\t <div class=\"card-body\">
\t <h5 class=\"card-title\"><b>Position <span class=\"value\">{{ number }}</span></b></h5>
\t <div class=\"card-text line mb-1\"><b>Date application : </b>{{ positionGps.datePrinted|date(\"d-m-Y H:i:s\") }}</div>
\t <div class=\"card-text line mb-1\"><b>Date server : </b>{{ positionGps.dateCreatedByServer|date(\"d-m-Y H:i:s\") }}</div>
\t <div class=\"card-text line mb-1\"><b>Latitude : </b>{{ positionGps.latitude }}</div>
\t <div class=\"card-text line mb-1\"><b>Longitude : </b>{{ positionGps.longitude }}</div>
\t <a href=\"/debug/information/positions/{{ positionGps.datePrinted|date(\"Y-m-d\") }}\" class=\"btn btn-primary mt-3\">All positions</a>
\t </div>
\t </div>
\t </div>
\t {% set i = i + 1 %}
\t {% set number = number + 1 %}
{% endfor %}
{% else %}
\t <div class=\"text-center animated fadeIn delay-0-4s\" style=\"font-size: 30px;\">No data...</div>
{% endif %}
</div>
</div>
</div>
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script>
\twindow.onload=function() {
\t\t var boucle = 1;
\t \tsetInterval(function(){
\t\t\t\t\$.get(
\t\t\t\t '{{ path(\"information_live_refresh_debug\") }}',
\t\t\t \t{
\t\t\t \t},
\t\t\t\t function(data){
\t\t\t\t \tif(data['data']['dataHere']){
\t\t\t\t\t \tif(data['data']['currentPostition']['start'] != \$(\"body #current-position .card-title .value\").html()){
\t\t\t\t\t \t\t\$(\".icon-network\").removeClass(\"active\");
\t\t\t\t\t \t\t\$(\".icon-network\").addClass(\"active\");
\t\t\t\t\t \t\t\$(\".link-i-see\").removeClass(\"d-none\");
\t\t\t\t\t \t\tconst soundEffect = new Audio();
\t\t\t\t\t\t\t\t// onClick of first interaction on page before I need the sounds
\t\t\t\t\t\t\t\tsoundEffect.play();
\t\t\t\t\t\t\t\t// later on when you actually want to play a sound at any point without user interaction
\t\t\t\t\t\t\t\tsoundEffect.src = '/alert.mp3';
\t\t\t\t\t\t\t\tsoundEffect.play();
\t\t\t\t\t \t}
\t\t\t\t\t \t//Current position
\t\t\t\t\t \$(\"body #current-position .card-title .value\").html(data['data']['currentPostition']['start']);
\t\t\t\t\t \$(\"body #current-position .latitude .value\").html(data['data']['currentPostition']['latitude']);
\t\t\t\t\t \$(\"body #current-position .longitude .value\").html(data['data']['currentPostition']['longitude']);
\t\t\t\t\t \$(\"body #current-position .card-footer .value\").html(data['data']['currentAgo']);
\t\t\t\t\t //Current hobit
\t\t\t\t\t \$(\"body #current-hobit .card-title .value\").html(data['data']['lastHobit']['start']);
\t\t\t\t\t \$(\"body #current-hobit .latitude .value\").html(data['data']['lastHobit']['latitude']);
\t\t\t\t\t \$(\"body #current-hobit .longitude .value\").html(data['data']['lastHobit']['longitude']);
\t\t\t\t\t \$(\"body #current-hobit .end .value\").html(data['data']['lastHobit']['end']);
\t\t\t\t\t \$(\"body #current-hobit .card-footer .value\").html(data['data']['currentHobitAgo']);
\t\t\t\t\t //Current hobit
\t\t\t\t\t if(data['data']['newHobitAgo'] != false){
\t\t\t\t\t \t\$(\"body #new-hobit .card-title .value\").html(data['data']['currentPostition']['start']);
\t\t\t\t\t \t\$(\"body #new-hobit .card-footer .value\").html(data['data']['newHobitAgo']);
\t\t\t\t\t \t\$(\"body #new-hobit\").removeClass(\"d-none\");
\t\t\t\t\t \t}
\t\t\t\t\t \telse{
\t\t\t\t\t \t\t\$(\"body #new-hobit\").addClass(\"d-none\");
\t\t\t\t\t \t}
\t\t\t\t \t}
\t\t\t\t }
\t\t\t\t);
\t\t\t}, 1000);
\t\t\t};
\t\t\$(\"body\").on(\"click\", \".link-i-see\", function(){
\t\t\t\$(this).addClass(\"d-none\");
\t\t\t\$(\".icon-network\").removeClass(\"active\");
\t\t});
</script>
{% endblock %}", "debug/live.html.twig", "/var/www/vhosts/webpro-developpement.fr/follow.webpro-developpement.fr/public/templates/debug/live.html.twig");
}
}