<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;
/* home/index.html.twig */
class __TwigTemplate_03df87744905b25c1438013a9e013bb532336e4be64556eccb37881b1b0dd8c0 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'css' => [$this, 'block_css'],
'breadcrumb' => [$this, 'block_breadcrumb'],
'content' => [$this, 'block_content'],
'javascript_script' => [$this, 'block_javascript_script'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "home/index.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "home/index.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "home/index.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 2
public function block_css($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "css"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "css"));
// line 3
echo " <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.min.css\" integrity=\"sha512-mSYUmp1HYZDFaVKK//63EcZq4iFWFjxSL+Z3T/aCt4IO9Cejm03q3NKKYN6pFQzY0SBOr8h+eCIAZHPXcpZaNw==\" crossorigin=\"anonymous\" />
<style type=\"text/css\">
\t.total-bl{
color: #000;
font-weight: 600;
text-align: center;
}
.pswp__caption__center {text-align: center;}
.pswp{
z-index: 9999;
}
.galerie-item{
\tdisplay: flex;
\talign-items: flex-start;
\tflex-wrap: wrap;
}
.galerie-item >*{
\twidth: 116px;
\t\tmargin-right: 8px;
}
.thumbnail-galerie i {
\t\t position: absolute;
\t\t right: 7px;
\t\t top: 11px;
\t\t font-size: 15px;
\t\t color: #1ab394;
\t\t}
.rounded-galerie {
\t\t position: absolute;
\t\t margin-top: -25px;
\t\t margin-left: auto;
\t\t border: 4px solid white;
\t\t height: 46px;
\t\twidth: 46px;
\t\t margin-right: auto;
\t\t left: 0;
\t\t right: 0;
\t\t z-index: 1;
\t\t}
.heure-galerie{
\ttext-align: center;
\t\t margin-top: 14px;
\t\t font-size: 11px;
}
.thumbnail-galerie{
\theight: 110px;
}
.thumbnail-detail{padding: 12px 20px}
\t
\t\t.progress-bar{
\t\t\twidth: 789.01px;
\t\t position: relative;
\t\t height: 21px;
\t\t\tbackground: #1ab394;
\t\t}
\t\t.progress-bar .progress-val {
\t\t\tposition: absolute;
\t\t right: 9px;
\t\t font-size: 14px;
\t\t font-weight: bold;
\t\t color: #000;
\t\t}
\t\t.td-name{
\t\t\tdisplay: block;
\t\t padding-left: 8px;
\t\t padding-right: 20px;
\t\t overflow: hidden;
\t\t text-overflow: ellipsis;
\t\t white-space: nowrap;
\t\t}
\t\t.btn-trash{
\t\t\tposition: absolute;
\t\t\tdisplay: none;
\t\t\ttext-align: center;
\t\t\tbottom: -15px;
\t\t\tleft: 0;
\t\t\tright: 0;
\t\t\tmargin: auto;
\t\t}
\t\t.galerie-item .parent:hover .btn-trash{display: inline-block;}
\t\t.video-wrapper video{
max-width: 971px!important;
max-height: 600px!important;
display: block;
margin: auto;
margin-top: 25px;
}
\t
.row-sum-month {
display: flex;
align-items: center;
justify-content: space-between;
}
.row-sum-month > * {
flex: 1;
text-align: center;
font-weight: bold;
font-size: 15px;
margin-top: 2px;
}
\t
.btnShowMore{
cursor: pointer;
margin: auto;
max-width: 110px;
}
#section_more_galerie .icon-plus {
padding-top: 80px;
position: relative;
text-align: center;
}
#section_more_galerie .icon-plus span {
position: absolute;
top: 0;
left: 50%;
width: 24px;
height: 24px;
margin-left: -12px;
border-left: 1px solid #000;
border-bottom: 1px solid #000;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-animation: sdb07 2s infinite;
animation: sdb07 2s infinite;
opacity: 0;
box-sizing: border-box;
}
#section_more_galerie .icon-plus span:nth-of-type(1) {
-webkit-animation-delay: 0s;
animation-delay: 0s;
}
#section_more_galerie .icon-plus span:nth-of-type(2) {
top: 16px;
-webkit-animation-delay: .15s;
animation-delay: .15s;
}
#section_more_galerie .icon-plus span:nth-of-type(3) {
top: 32px;
-webkit-animation-delay: .3s;
animation-delay: .3s;
}
@-webkit-keyframes sdb07 {
0% {
opacity: 0;
}
50% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@keyframes sdb07 {
0% {
opacity: 0;
}
50% {
opacity: 1;
}
100% {
opacity: 0;
}
}
.caro-nav{
display: flex;
align-items: center;
justify-content: space-between;
position: absolute;
top: 45%;
left: 0;
right: 0;
transform: translateY(-50%);
z-index: 999;
font-size: 41px;
background: red;
height: 0;
}
.caro-nav > *{
color: #1ab394;
cursor: pointer;
width: 46px;
height: 46px;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 50%;
}
.galerie-item.active{
display: flex;
}
.galerie-item{display: none;}
.item-dossier{
border: 1px solid;
border-radius: 10px;
margin-left: 7px;
padding: 6px 17px;
color: #676a6c;
}
</style>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 208
public function block_breadcrumb($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "breadcrumb"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "breadcrumb"));
// line 209
echo "
<div class=\"row wrapper border-bottom white-bg page-heading\">
<div class=\"col-lg-10\">
<h1>Accueil</h1>
</div>
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 218
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 219
echo " <div class=\"row\">
<div class=\"col-lg-12\">
\t";
// line 221
$this->loadTemplate("flashes.html.twig", "home/index.html.twig", 221)->display($context);
// line 222
echo "
\t<div class=\"ibox \">
\t<div class=\"ibox-title\">
<h5>Dernières images ";
// line 225
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 225, $this->source); })()), "environment", [], "any", false, false, false, 225), "html", null, true);
echo "</h5>
</div>
<div class=\"ibox-content\">
<div class=\"carousel-container\" style=\"position: relative;\">
\t <div class=\"row galerie-container\">
\t
\t </div>
<div class=\"caro-nav\">
<span class=\"nav-left\">
<i class=\"fas fa-chevron-left\"></i>
</span>
<span class=\"nav-right\">
<i class=\"fas fa-chevron-right\"></i>
</span>
</div>
</div>
<div class=\"btnShowMore\" style=\"display: none;\">
<div id=\"section_more_galerie\" style=\"height: 51px;\">
<div class=\"icon-plus\"><span></span><span></div>
</div>
<div class=\"text-center\" style=\"font-size: 17px\">Voir plus</div>
</div>
\t </div>
\t </div>
<div class=\"ibox\">
<div class=\"ibox-content\">
<h2 style=\"margin-bottom: 22px\">Liste document en attente</h2>
<div class=\"row\">
";
// line 255
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["countDocumentAttente"]) || array_key_exists("countDocumentAttente", $context) ? $context["countDocumentAttente"] : (function () { throw new RuntimeError('Variable "countDocumentAttente" does not exist.', 255, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
echo "
<a class=\"col-lg-3 item-dossier\" href=\"";
// line 256
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("email_document_preview_list", ["dossier" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "entity", [], "any", false, false, false, 256), "dossier", [], "any", false, false, false, 256)]), "html", null, true);
echo "\">
<h3 style=\"text-transform:capitalize;\">";
// line 257
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "dossier", [], "any", false, false, false, 257), "html", null, true);
echo " : <span>";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "entity", [], "any", false, false, false, 257), "nb", [], "any", false, false, false, 257), "html", null, true);
echo "</span></h3>
</a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 260
echo " </div>
</div>
</div>
<div class=\"ibox\">
<div class=\"ibox-content\">
";
// line 266
echo twig_include($this->env, $context, "home/filter.html.twig");
echo "
</div>
</div>
<div class=\"ibox \">
\t<div class=\"ibox-title\">
<h5>Achats-Ventes</h5>
</div>
<div class=\"ibox-content\">
<h2 class=\"achat-vente-recap\" style=\"font-size: 25px;font-weight: bold;margin-bottom: 17px;text-align: center;\"></h2>
\t <div>
\t <canvas id=\"myChartAchat\" height=\"350\"></canvas>
\t </div>
\t <div class=\"row-sum-month\">
";
// line 280
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["tauxMargin"]) || array_key_exists("tauxMargin", $context) ? $context["tauxMargin"] : (function () { throw new RuntimeError('Variable "tauxMargin" does not exist.', 280, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 281
echo " <span class=\"month\">";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo "%</span>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 283
echo " </div>
\t </div>
\t </div>
\t <div class=\"ibox \">
\t<div class=\"ibox-title\">
<h5>Marge</h5>
</div>
<div class=\"ibox-content\">
\t<h2 class=\"marge-year text-center\" style=\"font-size: 25px;font-weight: bold;margin-bottom: 17px;\"></h2>
\t<h5 class=\"text-center marge-resultat\" style=\"font-size: 17px\"></h5>
\t <div style=\"min-height: 1000px;\">
\t <canvas id=\"chartMarge\" height=\"500\"></canvas>
\t </div>
\t </div>
\t </div>
\t <div class=\"ibox \">
\t<div class=\"ibox-title\">
<h5>Gallery ";
// line 304
echo twig_escape_filter($this->env, (isset($context["currentMonth"]) || array_key_exists("currentMonth", $context) ? $context["currentMonth"] : (function () { throw new RuntimeError('Variable "currentMonth" does not exist.', 304, $this->source); })()), "html", null, true);
echo "</h5>
</div>
<div class=\"ibox-content\">
\t<div class=\"table-responsive\">
\t<table class=\"table\">
\t\t<thead>
\t\t\t<tr>
\t\t\t\t<th width=\"175px\"></th>
\t\t\t\t<th></th>
\t\t\t\t<th width=\"150px\" style=\"text-align: right;\">Photos</th>
\t\t\t\t<th width=\"150px\" style=\"text-align: right;\">Classement</th>
\t\t\t</tr>
\t\t</thead>
\t\t<tbody>
\t\t\t";
// line 318
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["galleryUser"]) || array_key_exists("galleryUser", $context) ? $context["galleryUser"] : (function () { throw new RuntimeError('Variable "galleryUser" does not exist.', 318, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["gal"]) {
// line 319
echo " \t\t\t<tr>
\t\t\t\t<td>
\t\t\t\t\t<div class=\"td-name\">
\t\t\t\t\t\t<span>
\t \t\t\t\t\t\t\t\t\t";
// line 323
if ((twig_in_filter(twig_get_attribute($this->env, $this->source, $context["gal"], "uid", [], "any", false, false, false, 323), twig_get_array_keys_filter((isset($context["utilisateurs"]) || array_key_exists("utilisateurs", $context) ? $context["utilisateurs"] : (function () { throw new RuntimeError('Variable "utilisateurs" does not exist.', 323, $this->source); })()))) && twig_get_attribute($this->env, $this->source, (isset($context["utilisateurs"]) || array_key_exists("utilisateurs", $context) ? $context["utilisateurs"] : (function () { throw new RuntimeError('Variable "utilisateurs" does not exist.', 323, $this->source); })()), twig_get_attribute($this->env, $this->source, $context["gal"], "uid", [], "any", false, false, false, 323), [], "array", false, false, false, 323))) {
echo "
\t <img data-file=\"data:image/jpeg;base64,";
// line 324
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["utilisateurs"]) || array_key_exists("utilisateurs", $context) ? $context["utilisateurs"] : (function () { throw new RuntimeError('Variable "utilisateurs" does not exist.', 324, $this->source); })()), twig_get_attribute($this->env, $this->source, $context["gal"], "uid", [], "any", false, false, false, 324), [], "array", false, false, false, 324), "html", null, true);
echo "\" src=\"data:image/jpeg;base64,";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["utilisateurs"]) || array_key_exists("utilisateurs", $context) ? $context["utilisateurs"] : (function () { throw new RuntimeError('Variable "utilisateurs" does not exist.', 324, $this->source); })()), twig_get_attribute($this->env, $this->source, $context["gal"], "uid", [], "any", false, false, false, 324), [], "array", false, false, false, 324), "html", null, true);
echo "\"
\t class=\"entreprise-img rounded-img\">
\t ";
}
// line 327
echo "\t </span>
\t\t\t\t\t\t<span>
\t\t\t\t\t\t\t";
// line 329
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["gal"], "firstname", [], "any", false, false, false, 329), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["gal"], "lastname", [], "any", false, false, false, 329), "html", null, true);
echo "
\t\t\t\t\t\t</span>
\t \t\t\t\t</div>
\t \t\t\t</td>
\t\t\t\t<td>
\t\t\t\t\t<div class=\"progress-container\" data-nbr-photo=\"";
// line 334
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["gal"], "nbr_gallery", [], "any", false, false, false, 334), "html", null, true);
echo "\">
\t\t\t\t\t\t<div class=\"progress-bar\">
\t\t\t\t\t\t\t<span class=\"progress-val\">";
// line 336
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["gal"], "nbr_gallery", [], "any", false, false, false, 336), "html", null, true);
echo "</span>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</td>
\t\t\t\t<td style=\"text-align: right;\">";
// line 340
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["gal"], "nbr_gallery", [], "any", false, false, false, 340), "html", null, true);
echo "</td>
\t\t\t\t<td style=\"text-align: right;\">";
// line 341
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 341), "html", null, true);
echo "</td>
\t\t\t</tr>
\t\t\t";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['gal'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 344
echo " \t\t</tbody>
\t</table>
\t</div>
\t </div>
\t </div>
</div>
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 356
public function block_javascript_script($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript_script"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript_script"));
// line 357
echo " <script type=\"text/javascript\"src=\"https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js\"></script>
<script type=\"text/javascript\"src=\"https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js\"></script>
<script type=\"text/javascript\"src=\"https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js\"></script>
<script src=\"https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js\"></script>
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/photoswipe.min.js\"></script>
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/photoswipe-ui-default.min.js\"></script>
<script type=\"text/javascript\">
\t\$maxPhotoVal = ";
// line 365
echo json_encode((isset($context["maxPhotoVal"]) || array_key_exists("maxPhotoVal", $context) ? $context["maxPhotoVal"] : (function () { throw new RuntimeError('Variable "maxPhotoVal" does not exist.', 365, $this->source); })()));
echo ";
\t\$('.progress-container').each(function( index ) {
\$barWidth = parseFloat(\$(this).width()) ;
\$nbrPhoto = parseFloat(\$(this).data('nbr-photo'));
\$progress = \$(this).find('.progress-bar');
if(\$maxPhotoVal > 0)
\t\$progressWidth = (\$nbrPhoto*\$barWidth)/\$maxPhotoVal;
else
\t\$progressWidth = 0;
\$(this).find('.progress-bar').css('width', \$progressWidth);
})
var valChart = ";
// line 380
echo json_encode((isset($context["valChart"]) || array_key_exists("valChart", $context) ? $context["valChart"] : (function () { throw new RuntimeError('Variable "valChart" does not exist.', 380, $this->source); })()));
echo ";
var valChartNonLie = ";
// line 381
echo json_encode((isset($context["valChartNonLie"]) || array_key_exists("valChartNonLie", $context) ? $context["valChartNonLie"] : (function () { throw new RuntimeError('Variable "valChartNonLie" does not exist.', 381, $this->source); })()));
echo ";
var valChartFact = ";
// line 382
echo json_encode((isset($context["valChartFact"]) || array_key_exists("valChartFact", $context) ? $context["valChartFact"] : (function () { throw new RuntimeError('Variable "valChartFact" does not exist.', 382, $this->source); })()));
echo ";
var valChartFactClient = ";
// line 383
echo json_encode((isset($context["valChartFactClient"]) || array_key_exists("valChartFactClient", $context) ? $context["valChartFactClient"] : (function () { throw new RuntimeError('Variable "valChartFactClient" does not exist.', 383, $this->source); })()));
echo ";
var valChartAmortMensAssurance = ";
// line 384
echo json_encode((isset($context["valChartAmortMensAssurance"]) || array_key_exists("valChartAmortMensAssurance", $context) ? $context["valChartAmortMensAssurance"] : (function () { throw new RuntimeError('Variable "valChartAmortMensAssurance" does not exist.', 384, $this->source); })()));
echo ";
var valChartCoutGb = ";
// line 385
echo json_encode((isset($context["valChartCoutGb"]) || array_key_exists("valChartCoutGb", $context) ? $context["valChartCoutGb"] : (function () { throw new RuntimeError('Variable "valChartCoutGb" does not exist.', 385, $this->source); })()));
echo ";
var ctxA = document.getElementById('myChartAchat').getContext('2d');
let datasets = [
{
label: \"BL HT: ";
// line 390
((twig_get_attribute($this->env, $this->source, (isset($context["montant"]) || array_key_exists("montant", $context) ? $context["montant"] : (function () { throw new RuntimeError('Variable "montant" does not exist.', 390, $this->source); })()), "sum_ht", [], "array", false, false, false, 390)) ? (print (twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["montant"]) || array_key_exists("montant", $context) ? $context["montant"] : (function () { throw new RuntimeError('Variable "montant" does not exist.', 390, $this->source); })()), "sum_ht", [], "array", false, false, false, 390), 2, ",", ""), "html", null, true))) : (print ("0")));
echo "€\",
data: valChart,
backgroundColor: 'rgb(50 163 243)',
hoverBackgroundColor: 'rgb(50 163 243)',
hoverBorderColor: 'rgb(50 163 243)',
borderColor: 'rgb(50 163 243)',
fontColor: \"blue\",
borderWidth: 1
},
{
label: \"BL NON LIE: ";
// line 400
((twig_get_attribute($this->env, $this->source, (isset($context["montantBlNonRelie"]) || array_key_exists("montantBlNonRelie", $context) ? $context["montantBlNonRelie"] : (function () { throw new RuntimeError('Variable "montantBlNonRelie" does not exist.', 400, $this->source); })()), "sum_ht", [], "array", false, false, false, 400)) ? (print (twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["montantBlNonRelie"]) || array_key_exists("montantBlNonRelie", $context) ? $context["montantBlNonRelie"] : (function () { throw new RuntimeError('Variable "montantBlNonRelie" does not exist.', 400, $this->source); })()), "sum_ht", [], "array", false, false, false, 400), 2, ",", ""), "html", null, true))) : (print ("0")));
echo "€\",
data: valChartNonLie,
backgroundColor: 'rgb(173 255 47)',
hoverBackgroundColor: 'rgb(173 255 47)',
hoverBorderColor: 'rgb(173 255 47)',
borderColor: 'rgb(173 255 47)',
fontColor: \"greenyellow\",
borderWidth: 1
},
{
label: \"Facturation HT: ";
// line 410
((twig_get_attribute($this->env, $this->source, (isset($context["montantFact"]) || array_key_exists("montantFact", $context) ? $context["montantFact"] : (function () { throw new RuntimeError('Variable "montantFact" does not exist.', 410, $this->source); })()), "sum_ht", [], "array", false, false, false, 410)) ? (print (twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["montantFact"]) || array_key_exists("montantFact", $context) ? $context["montantFact"] : (function () { throw new RuntimeError('Variable "montantFact" does not exist.', 410, $this->source); })()), "sum_ht", [], "array", false, false, false, 410), 2, ",", ""), "html", null, true))) : (print ("0")));
echo "€\",
data: valChartFact,
backgroundColor: 'rgb(24 166 137)',
hoverBackgroundColor: 'rgb(24 166 137)',
hoverBorderColor: 'rgb(24 166 137)',
borderColor: 'rgb(24 166 137)',
borderWidth: 1
},
{
label: \"Cout Global: ";
// line 419
(((isset($context["sumCoutGb"]) || array_key_exists("sumCoutGb", $context) ? $context["sumCoutGb"] : (function () { throw new RuntimeError('Variable "sumCoutGb" does not exist.', 419, $this->source); })())) ? (print (twig_escape_filter($this->env, twig_number_format_filter($this->env, (isset($context["sumCoutGb"]) || array_key_exists("sumCoutGb", $context) ? $context["sumCoutGb"] : (function () { throw new RuntimeError('Variable "sumCoutGb" does not exist.', 419, $this->source); })()), 2, ",", ""), "html", null, true))) : (print ("0")));
echo "€\",
data: valChartCoutGb,
backgroundColor: 'orange',
borderColor: 'orange',
borderWidth: 1
},
{
label: \"Facture client HT: ";
// line 426
((twig_get_attribute($this->env, $this->source, (isset($context["montantFactClient"]) || array_key_exists("montantFactClient", $context) ? $context["montantFactClient"] : (function () { throw new RuntimeError('Variable "montantFactClient" does not exist.', 426, $this->source); })()), "sum_ht", [], "array", false, false, false, 426)) ? (print (twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["montantFactClient"]) || array_key_exists("montantFactClient", $context) ? $context["montantFactClient"] : (function () { throw new RuntimeError('Variable "montantFactClient" does not exist.', 426, $this->source); })()), "sum_ht", [], "array", false, false, false, 426), 2, ",", ""), "html", null, true))) : (print ("0")));
echo "€\",
data: valChartFactClient,
backgroundColor: 'pink',
borderColor: 'pink',
borderWidth: 1
}
];
";
// line 434
if (0 === twig_compare((isset($context["isgestionFinancements"]) || array_key_exists("isgestionFinancements", $context) ? $context["isgestionFinancements"] : (function () { throw new RuntimeError('Variable "isgestionFinancements" does not exist.', 434, $this->source); })()), 1)) {
// line 435
echo " datasets.push({
label: \"Mensualité avec assurance: ";
// line 436
((twig_get_attribute($this->env, $this->source, (isset($context["sumMontantAmortMensAssurance"]) || array_key_exists("sumMontantAmortMensAssurance", $context) ? $context["sumMontantAmortMensAssurance"] : (function () { throw new RuntimeError('Variable "sumMontantAmortMensAssurance" does not exist.', 436, $this->source); })()), "mensualite_avec_assurance", [], "array", false, false, false, 436)) ? (print (twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["sumMontantAmortMensAssurance"]) || array_key_exists("sumMontantAmortMensAssurance", $context) ? $context["sumMontantAmortMensAssurance"] : (function () { throw new RuntimeError('Variable "sumMontantAmortMensAssurance" does not exist.', 436, $this->source); })()), "mensualite_avec_assurance", [], "array", false, false, false, 436), 2, ",", ""), "html", null, true))) : (print ("0")));
echo "€\",
data: valChartAmortMensAssurance,
backgroundColor: 'rgb(255, 90, 196)',
hoverBackgroundColor: 'rgb(255, 90, 196)',
hoverBorderColor: 'rgb(255, 90, 196)',
borderColor: 'rgb(255, 90, 196)',
borderWidth: 1
});
";
}
// line 445
echo " var data = {
labels: [\"jan\", \"Fév\", 'Mars', 'Avr', 'Mais', 'Juin', 'Juil', 'Aout', 'sep', 'Oct', 'Nov', 'Déc'],
datasets: datasets
};
\$('.achat-vente-recap').text(\"";
// line 449
echo twig_escape_filter($this->env, twig_capitalize_string_filter($this->env, (isset($context["full_month"]) || array_key_exists("full_month", $context) ? $context["full_month"] : (function () { throw new RuntimeError('Variable "full_month" does not exist.', 449, $this->source); })())), "html", null, true);
echo " - Taux de Marge ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, (isset($context["tauxMarginCumulle"]) || array_key_exists("tauxMarginCumulle", $context) ? $context["tauxMarginCumulle"] : (function () { throw new RuntimeError('Variable "tauxMarginCumulle" does not exist.', 449, $this->source); })()), 2, ",", ""), "html", null, true);
echo "%\");
var myChart = new Chart(ctxA, {
type: 'bar',
data: data,
options: {
\tbarValueSpacing: 40,
responsive: true,
maintainAspectRatio: false,
\t\t\t \"hover\": {
\t\t\t \"animationDuration\": 0
\t\t\t },
\t\t\t \"animation\": {
\t\t\t \"duration\": 1,
\t\t\t \"onComplete\": function() {
\t\t\t var chartInstance = this.chart,
\t\t\t ctx = chartInstance.ctx;
\t\t\t ctx.font = Chart.helpers.fontString(Chart.defaults.global.defaultFontSize, Chart.defaults.global.defaultFontStyle, Chart.defaults.global.defaultFontFamily);
\t\t\t ctx.textAlign = 'center';
\t\t\t ctx.textBaseline = 'bottom';
\t\t\t this.data.datasets.forEach(function(dataset, i) {
\t\t\t var meta = chartInstance.controller.getDatasetMeta(i);
\t\t\t meta.data.forEach(function(bar, index) {
\t\t\t var data = dataset.data[index];
\t\t\t ctx.fillText(data, bar._model.x, bar._model.y - 5);
\t\t\t });
\t\t\t });
\t\t\t }
\t\t\t },
\t\t\t tooltips: {
\t\t\t\t \"enabled\": true,
\t\t callbacks: {
\t\t label: function(tooltipItem, data) {
\t\t var label = data.datasets[tooltipItem.datasetIndex].label || '';
\t\t if (label) {
\t\t label += ': ';
\t\t }
\t\t label += Math.round(tooltipItem.yLabel * 100) / 100;
\t\t return Math.round(tooltipItem.yLabel * 100) / 100;
\t\t }
\t\t }
\t\t\t },
\t\t\t scales: {
\t\t\t \ty: {
beginAtZero: true
},
\t\t\t yAxes: [{
\t\t\t display: false,
\t\t\t gridLines: {
\t\t\t display: false
\t\t\t },
\t\t\t ticks: {
\t\t\t display: false,
\t\t\t beginAtZero: true,
\t\t\t min:0
\t\t\t }
\t\t\t }],
\t\t\t xAxes: [{
\t\t\t gridLines: {
\t\t\t display: false
\t\t\t },
\t\t\t ticks: {
\t\t\t beginAtZero: true
\t\t\t }
\t\t\t }]
\t\t\t },
\t\t\t title: {
display: false,
fontSize: '25',
text: '";
// line 521
echo twig_escape_filter($this->env, twig_capitalize_string_filter($this->env, (isset($context["full_month"]) || array_key_exists("full_month", $context) ? $context["full_month"] : (function () { throw new RuntimeError('Variable "full_month" does not exist.', 521, $this->source); })())), "html", null, true);
echo "'
}
\t\t\t}
});
/* CHART MARGE */
var chartMarge = ";
// line 527
echo json_encode((isset($context["chartMarge"]) || array_key_exists("chartMarge", $context) ? $context["chartMarge"] : (function () { throw new RuntimeError('Variable "chartMarge" does not exist.', 527, $this->source); })()));
echo ";
var chartColor = ";
// line 528
echo json_encode((isset($context["chartColor"]) || array_key_exists("chartColor", $context) ? $context["chartColor"] : (function () { throw new RuntimeError('Variable "chartColor" does not exist.', 528, $this->source); })()));
echo ";
var ctxM = document.getElementById('chartMarge').getContext('2d');
\$('.marge-resultat').text(\"Marge: ";
// line 530
(((isset($context["sumMarge"]) || array_key_exists("sumMarge", $context) ? $context["sumMarge"] : (function () { throw new RuntimeError('Variable "sumMarge" does not exist.', 530, $this->source); })())) ? (print (twig_escape_filter($this->env, twig_number_format_filter($this->env, (isset($context["sumMarge"]) || array_key_exists("sumMarge", $context) ? $context["sumMarge"] : (function () { throw new RuntimeError('Variable "sumMarge" does not exist.', 530, $this->source); })()), 2, ",", ""), "html", null, true))) : (print ("0")));
echo "€ / M-1: ";
(((isset($context["sumMarge_1"]) || array_key_exists("sumMarge_1", $context) ? $context["sumMarge_1"] : (function () { throw new RuntimeError('Variable "sumMarge_1" does not exist.', 530, $this->source); })())) ? (print (twig_escape_filter($this->env, twig_number_format_filter($this->env, (isset($context["sumMarge_1"]) || array_key_exists("sumMarge_1", $context) ? $context["sumMarge_1"] : (function () { throw new RuntimeError('Variable "sumMarge_1" does not exist.', 530, $this->source); })()), 2, ",", ""), "html", null, true))) : (print ("0")));
echo "€\");
\$('.marge-year').text(\"";
// line 531
echo twig_escape_filter($this->env, twig_capitalize_string_filter($this->env, (isset($context["full_month"]) || array_key_exists("full_month", $context) ? $context["full_month"] : (function () { throw new RuntimeError('Variable "full_month" does not exist.', 531, $this->source); })())), "html", null, true);
echo "\");
var data2 = {
labels: [\"jan\", \"Fév\", 'Mars', 'Avr', 'Mais', 'Juin', 'Juil', 'Aout', 'sep', 'Oct', 'Nov', 'Déc'],
datasets: [
\t{
\t label: \"Marge: ";
// line 537
(((isset($context["sumMarge"]) || array_key_exists("sumMarge", $context) ? $context["sumMarge"] : (function () { throw new RuntimeError('Variable "sumMarge" does not exist.', 537, $this->source); })())) ? (print (twig_escape_filter($this->env, twig_number_format_filter($this->env, (isset($context["sumMarge"]) || array_key_exists("sumMarge", $context) ? $context["sumMarge"] : (function () { throw new RuntimeError('Variable "sumMarge" does not exist.', 537, $this->source); })()), 2, ",", ""), "html", null, true))) : (print ("0")));
echo "€ / M-1: ";
(((isset($context["sumMarge_1"]) || array_key_exists("sumMarge_1", $context) ? $context["sumMarge_1"] : (function () { throw new RuntimeError('Variable "sumMarge_1" does not exist.', 537, $this->source); })())) ? (print (twig_escape_filter($this->env, twig_number_format_filter($this->env, (isset($context["sumMarge_1"]) || array_key_exists("sumMarge_1", $context) ? $context["sumMarge_1"] : (function () { throw new RuntimeError('Variable "sumMarge_1" does not exist.', 537, $this->source); })()), 2, ",", ""), "html", null, true))) : (print ("0")));
echo "€\",
\t data: chartMarge,
\t backgroundColor: chartColor,
\t borderColor: chartColor,
\t borderWidth: 1
\t }
]
};
var myChartMarge = new Chart(ctxM, {
type: 'bar',
data: data2,
options: {
\tlegend: {
\t\t display: false,
\t\t labels: {
\t\t fontColor: 'rgb(255, 99, 132)'
\t\t }
\t\t },
\tbarValueSpacing: 40,
responsive: true,
maintainAspectRatio: false,
\t\t\t \"hover\": {
\t\t\t \"animationDuration\": 0
\t\t\t },
\t\t\t \"animation\": {
\t\t\t \"duration\": 1,
\t\t\t \"onComplete\": function() {
\t\t\t var chartInstance = this.chart,
\t\t\t ctx = chartInstance.ctx;
\t\t\t ctx.font = Chart.helpers.fontString(Chart.defaults.global.defaultFontSize, Chart.defaults.global.defaultFontStyle, Chart.defaults.global.defaultFontFamily);
\t\t\t ctx.textAlign = 'center';
\t\t\t ctx.textBaseline = 'bottom';
\t\t\t this.data.datasets.forEach(function(dataset, i) {
\t\t\t var meta = chartInstance.controller.getDatasetMeta(i);
\t\t\t meta.data.forEach(function(bar, index) {
\t\t\t var data2 = dataset.data[index];
\t\t\t ctx.fillText(data2, bar._model.x, bar._model.y - 5);
\t\t\t });
\t\t\t });
\t\t\t }
\t\t\t },
\t\t\t tooltips: {
\t\t\t\t \"enabled\": true,
\t\t callbacks: {
\t\t label: function(tooltipItem, data) {
\t\t var label = data.datasets[tooltipItem.datasetIndex].label || '';
\t\t if (label) {
\t\t label += ': ';
\t\t }
\t\t label += Math.round(tooltipItem.yLabel * 100) / 100;
\t\t return \"\";
\t\t }
\t\t }
\t\t\t },
\t\t\t scales: {
\t\t\t \ty: {
beginAtZero: true
},
\t\t\t yAxes: [{
\t\t\t display: false,
\t\t\t gridLines: {
\t\t\t display: false
\t\t\t },
\t\t\t ticks: {
\t\t\t display: false,
\t\t\t beginAtZero: true,
\t\t\t }
\t\t\t }],
\t\t\t xAxes: [{
\t\t\t gridLines: {
\t\t\t display: false
\t\t\t },
\t\t\t ticks: {
\t\t\t beginAtZero: true
\t\t\t }
\t\t\t }]
\t\t\t },
\t\t\t title: {
display: false,
fontSize: '25',
text: '";
// line 621
echo twig_escape_filter($this->env, twig_capitalize_string_filter($this->env, (isset($context["full_month"]) || array_key_exists("full_month", $context) ? $context["full_month"] : (function () { throw new RuntimeError('Variable "full_month" does not exist.', 621, $this->source); })())), "html", null, true);
echo "'
}
\t\t\t}
});
function loadGalerie(page){
\$.ajax({
url: \"";
// line 629
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("load_galerie_xhr");
echo "\",
type: \"GET\",
async: true,
dataType: \"json\",
data: {
page:page
},
success: function(response, status) {
if(response.status == 200){
\$('.galerie-item').removeClass('active');
\$('.galerie-container').append(response.preview);
}
else if(response.status == 500){
toastr.error(response.message);
}
else if(response.status == 300){
\$('.caro-nav .nav-right').css('display', 'none');
}
},
error: function(xhr, textStatus, errorThrown) {
toastr.error(\"Ooops..., Quelque chose s'est mal passée\");
}
});
}
\$page = 0;
loadGalerie(\$page);
\$page++;
\$('.caro-nav .nav-left').click(function(){
var listItem = \$( \".galerie-item.active\" );
var idx = \$( \".galerie-item\" ).index( listItem );
\$prevElt = \$('.galerie-item')[idx-1];
if(\$prevElt){
\$('.galerie-item').removeClass('active');
\$('.galerie-item').eq(idx-1).addClass('active');
\$stape = \$('.galerie-item.active').attr('data-page');
reloadInitGalerie(\$stape);
}
});
\$('.caro-nav .nav-right').click(function(){
loadGalerie(\$page);
\$page++;
});
function reloadInitGalerie(page){
var container = [];
// Loop over gallery items and push it to the array
\$('.galerie-item-'+page).find('.parent').each(function() {
var \$link = \$(this).find('.thumbnail-galerie');
if (\$link.data('type') == 'video') {
var item = {
html: \$link.data('video')
};
console.log('enter');
} else {
let img = new Image();
img.onload = function() {
};
img.src = \$link.data('url');
var item = {
src: \$link.data('url'),
w: \$link.data('width'),
h: \$link.data('height'),
title: \$link.data('caption')
};
}
container.push(item);
});
// Define click event on gallery item
\$('.thumbnail-galerie').click(function(event) {
// Prevent location change
event.preventDefault();
";
// line 725
echo "
// Define object and gallery options
var \$pswp = \$('.pswp')[0],
options = {
index: \$(this).parent('.parent').index(),
bgOpacity: 0.85,
showHideOpacity: true,
shareButtons: [
{id:'facebook', label:'Partager sur Facebook', url:'https://www.facebook.com/sharer/sharer.php?u={{url}}'},
{id:'twitter', label:'Tweeter', url:'https://twitter.com/intent/tweet?text={{text}}&url={{url}}'},
{id:'pinterest', label:'Epingler', url:'http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}'},
{id:'download', label:'Télécharger l\\'image', url:'{{raw_image_url}}', download:true}
]
};
";
echo "
// Initialize PhotoSwipe
var gallery = new PhotoSwipe(\$pswp, PhotoSwipeUI_Default, container, options);
gallery.init();
gallery.listen('beforeChange', function() {
var currItem = \$(gallery.currItem.container);
\$('.thumbnail-galerie').removeClass('active');
var currItemIframe = currItem.find('.thumbnail-galerie').addClass('active');
\$('.thumbnail-galerie').each(function() {
if (!\$(this).hasClass('active')) {
\$(this).attr('data-url', \$(this).attr('data-url'));
}
});
});
gallery.listen('close', function() {
\$('.thumbnail-galerie').each(function() {
\$(this).attr('data-url', \$(this).attr('data-url'));
});
});
});
}
chrome.tabs.onCreated.addListener(function (newTab) {
chrome.tabs.getAllInWindow(newTab.windowId, function(tabs) {
var duplicateTab = null;
tabs.forEach(function(otherTab) {
// Grab the domain from the otherTab
var otherDomain = otherTab.url.replace(/(?:(?:http)s?:\\/\\/)?(.*?\\..{2,3}(\\..{2})?)(?:.*)/i, '\$1');
// Create a new RegEx pattern with it
otherDomain = new RegExp(otherDomain, 'i');
// Then test to see if it matches the newTab.url
if (otherTab.id !== newTab.id && otherDomain.test(newTab.url)) {
duplicateTab = otherTab;
}
});
if (duplicateTab) {
chrome.tabs.update(duplicateTab.id, {\"selected\": true});
chrome.tabs.remove(newTab.id);
}
});
});
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "home/index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 1010 => 725, 925 => 629, 914 => 621, 825 => 537, 816 => 531, 810 => 530, 805 => 528, 801 => 527, 792 => 521, 715 => 449, 709 => 445, 697 => 436, 694 => 435, 692 => 434, 681 => 426, 671 => 419, 659 => 410, 646 => 400, 633 => 390, 625 => 385, 621 => 384, 617 => 383, 613 => 382, 609 => 381, 605 => 380, 587 => 365, 577 => 357, 567 => 356, 547 => 344, 530 => 341, 526 => 340, 519 => 336, 514 => 334, 504 => 329, 500 => 327, 492 => 324, 488 => 323, 482 => 319, 465 => 318, 448 => 304, 425 => 283, 416 => 281, 412 => 280, 395 => 266, 387 => 260, 376 => 257, 372 => 256, 366 => 255, 333 => 225, 328 => 222, 326 => 221, 322 => 219, 312 => 218, 295 => 209, 285 => 208, 71 => 3, 61 => 2, 38 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block css %}
<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.min.css\" integrity=\"sha512-mSYUmp1HYZDFaVKK//63EcZq4iFWFjxSL+Z3T/aCt4IO9Cejm03q3NKKYN6pFQzY0SBOr8h+eCIAZHPXcpZaNw==\" crossorigin=\"anonymous\" />
<style type=\"text/css\">
\t.total-bl{
color: #000;
font-weight: 600;
text-align: center;
}
.pswp__caption__center {text-align: center;}
.pswp{
z-index: 9999;
}
.galerie-item{
\tdisplay: flex;
\talign-items: flex-start;
\tflex-wrap: wrap;
}
.galerie-item >*{
\twidth: 116px;
\t\tmargin-right: 8px;
}
.thumbnail-galerie i {
\t\t position: absolute;
\t\t right: 7px;
\t\t top: 11px;
\t\t font-size: 15px;
\t\t color: #1ab394;
\t\t}
.rounded-galerie {
\t\t position: absolute;
\t\t margin-top: -25px;
\t\t margin-left: auto;
\t\t border: 4px solid white;
\t\t height: 46px;
\t\twidth: 46px;
\t\t margin-right: auto;
\t\t left: 0;
\t\t right: 0;
\t\t z-index: 1;
\t\t}
.heure-galerie{
\ttext-align: center;
\t\t margin-top: 14px;
\t\t font-size: 11px;
}
.thumbnail-galerie{
\theight: 110px;
}
.thumbnail-detail{padding: 12px 20px}
\t
\t\t.progress-bar{
\t\t\twidth: 789.01px;
\t\t position: relative;
\t\t height: 21px;
\t\t\tbackground: #1ab394;
\t\t}
\t\t.progress-bar .progress-val {
\t\t\tposition: absolute;
\t\t right: 9px;
\t\t font-size: 14px;
\t\t font-weight: bold;
\t\t color: #000;
\t\t}
\t\t.td-name{
\t\t\tdisplay: block;
\t\t padding-left: 8px;
\t\t padding-right: 20px;
\t\t overflow: hidden;
\t\t text-overflow: ellipsis;
\t\t white-space: nowrap;
\t\t}
\t\t.btn-trash{
\t\t\tposition: absolute;
\t\t\tdisplay: none;
\t\t\ttext-align: center;
\t\t\tbottom: -15px;
\t\t\tleft: 0;
\t\t\tright: 0;
\t\t\tmargin: auto;
\t\t}
\t\t.galerie-item .parent:hover .btn-trash{display: inline-block;}
\t\t.video-wrapper video{
max-width: 971px!important;
max-height: 600px!important;
display: block;
margin: auto;
margin-top: 25px;
}
\t
.row-sum-month {
display: flex;
align-items: center;
justify-content: space-between;
}
.row-sum-month > * {
flex: 1;
text-align: center;
font-weight: bold;
font-size: 15px;
margin-top: 2px;
}
\t
.btnShowMore{
cursor: pointer;
margin: auto;
max-width: 110px;
}
#section_more_galerie .icon-plus {
padding-top: 80px;
position: relative;
text-align: center;
}
#section_more_galerie .icon-plus span {
position: absolute;
top: 0;
left: 50%;
width: 24px;
height: 24px;
margin-left: -12px;
border-left: 1px solid #000;
border-bottom: 1px solid #000;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-animation: sdb07 2s infinite;
animation: sdb07 2s infinite;
opacity: 0;
box-sizing: border-box;
}
#section_more_galerie .icon-plus span:nth-of-type(1) {
-webkit-animation-delay: 0s;
animation-delay: 0s;
}
#section_more_galerie .icon-plus span:nth-of-type(2) {
top: 16px;
-webkit-animation-delay: .15s;
animation-delay: .15s;
}
#section_more_galerie .icon-plus span:nth-of-type(3) {
top: 32px;
-webkit-animation-delay: .3s;
animation-delay: .3s;
}
@-webkit-keyframes sdb07 {
0% {
opacity: 0;
}
50% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@keyframes sdb07 {
0% {
opacity: 0;
}
50% {
opacity: 1;
}
100% {
opacity: 0;
}
}
.caro-nav{
display: flex;
align-items: center;
justify-content: space-between;
position: absolute;
top: 45%;
left: 0;
right: 0;
transform: translateY(-50%);
z-index: 999;
font-size: 41px;
background: red;
height: 0;
}
.caro-nav > *{
color: #1ab394;
cursor: pointer;
width: 46px;
height: 46px;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 50%;
}
.galerie-item.active{
display: flex;
}
.galerie-item{display: none;}
.item-dossier{
border: 1px solid;
border-radius: 10px;
margin-left: 7px;
padding: 6px 17px;
color: #676a6c;
}
</style>
{% endblock %}
{% block breadcrumb %}
<div class=\"row wrapper border-bottom white-bg page-heading\">
<div class=\"col-lg-10\">
<h1>Accueil</h1>
</div>
</div>
{% endblock %}
{% block content %}
<div class=\"row\">
<div class=\"col-lg-12\">
\t{% include 'flashes.html.twig' %}
\t<div class=\"ibox \">
\t<div class=\"ibox-title\">
<h5>Dernières images {{ app.environment }}</h5>
</div>
<div class=\"ibox-content\">
<div class=\"carousel-container\" style=\"position: relative;\">
\t <div class=\"row galerie-container\">
\t
\t </div>
<div class=\"caro-nav\">
<span class=\"nav-left\">
<i class=\"fas fa-chevron-left\"></i>
</span>
<span class=\"nav-right\">
<i class=\"fas fa-chevron-right\"></i>
</span>
</div>
</div>
<div class=\"btnShowMore\" style=\"display: none;\">
<div id=\"section_more_galerie\" style=\"height: 51px;\">
<div class=\"icon-plus\"><span></span><span></div>
</div>
<div class=\"text-center\" style=\"font-size: 17px\">Voir plus</div>
</div>
\t </div>
\t </div>
<div class=\"ibox\">
<div class=\"ibox-content\">
<h2 style=\"margin-bottom: 22px\">Liste document en attente</h2>
<div class=\"row\">
{% for item in countDocumentAttente %}
<a class=\"col-lg-3 item-dossier\" href=\"{{ path('email_document_preview_list', {'dossier':item.entity.dossier}) }}\">
<h3 style=\"text-transform:capitalize;\">{{item.dossier}} : <span>{{item.entity.nb}}</span></h3>
</a>
{% endfor %}
</div>
</div>
</div>
<div class=\"ibox\">
<div class=\"ibox-content\">
{{ include('home/filter.html.twig') }}
</div>
</div>
<div class=\"ibox \">
\t<div class=\"ibox-title\">
<h5>Achats-Ventes</h5>
</div>
<div class=\"ibox-content\">
<h2 class=\"achat-vente-recap\" style=\"font-size: 25px;font-weight: bold;margin-bottom: 17px;text-align: center;\"></h2>
\t <div>
\t <canvas id=\"myChartAchat\" height=\"350\"></canvas>
\t </div>
\t <div class=\"row-sum-month\">
{% for i in tauxMargin %}
<span class=\"month\">{{i}}%</span>
{% endfor %}
</div>
\t </div>
\t </div>
\t <div class=\"ibox \">
\t<div class=\"ibox-title\">
<h5>Marge</h5>
</div>
<div class=\"ibox-content\">
\t<h2 class=\"marge-year text-center\" style=\"font-size: 25px;font-weight: bold;margin-bottom: 17px;\"></h2>
\t<h5 class=\"text-center marge-resultat\" style=\"font-size: 17px\"></h5>
\t <div style=\"min-height: 1000px;\">
\t <canvas id=\"chartMarge\" height=\"500\"></canvas>
\t </div>
\t </div>
\t </div>
\t <div class=\"ibox \">
\t<div class=\"ibox-title\">
<h5>Gallery {{currentMonth}}</h5>
</div>
<div class=\"ibox-content\">
\t<div class=\"table-responsive\">
\t<table class=\"table\">
\t\t<thead>
\t\t\t<tr>
\t\t\t\t<th width=\"175px\"></th>
\t\t\t\t<th></th>
\t\t\t\t<th width=\"150px\" style=\"text-align: right;\">Photos</th>
\t\t\t\t<th width=\"150px\" style=\"text-align: right;\">Classement</th>
\t\t\t</tr>
\t\t</thead>
\t\t<tbody>
\t\t\t{% for gal in galleryUser %}
\t\t\t<tr>
\t\t\t\t<td>
\t\t\t\t\t<div class=\"td-name\">
\t\t\t\t\t\t<span>
\t \t\t\t\t\t\t\t\t\t{% if gal.uid in utilisateurs|keys and utilisateurs[gal.uid] %}
\t <img data-file=\"data:image/jpeg;base64,{{ utilisateurs[gal.uid]}}\" src=\"data:image/jpeg;base64,{{ utilisateurs[gal.uid]}}\"
\t class=\"entreprise-img rounded-img\">
\t {% endif %}
\t </span>
\t\t\t\t\t\t<span>
\t\t\t\t\t\t\t{{gal.firstname}} {{gal.lastname}}
\t\t\t\t\t\t</span>
\t \t\t\t\t</div>
\t \t\t\t</td>
\t\t\t\t<td>
\t\t\t\t\t<div class=\"progress-container\" data-nbr-photo=\"{{gal.nbr_gallery}}\">
\t\t\t\t\t\t<div class=\"progress-bar\">
\t\t\t\t\t\t\t<span class=\"progress-val\">{{gal.nbr_gallery}}</span>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</td>
\t\t\t\t<td style=\"text-align: right;\">{{gal.nbr_gallery}}</td>
\t\t\t\t<td style=\"text-align: right;\">{{loop.index}}</td>
\t\t\t</tr>
\t\t\t{% endfor %}
\t\t</tbody>
\t</table>
\t</div>
\t </div>
\t </div>
</div>
</div>
{% endblock %}
{% block javascript_script %}
<script type=\"text/javascript\"src=\"https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js\"></script>
<script type=\"text/javascript\"src=\"https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js\"></script>
<script type=\"text/javascript\"src=\"https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js\"></script>
<script src=\"https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js\"></script>
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/photoswipe.min.js\"></script>
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/photoswipe-ui-default.min.js\"></script>
<script type=\"text/javascript\">
\t\$maxPhotoVal = {{ maxPhotoVal|json_encode()|raw }};
\t\$('.progress-container').each(function( index ) {
\$barWidth = parseFloat(\$(this).width()) ;
\$nbrPhoto = parseFloat(\$(this).data('nbr-photo'));
\$progress = \$(this).find('.progress-bar');
if(\$maxPhotoVal > 0)
\t\$progressWidth = (\$nbrPhoto*\$barWidth)/\$maxPhotoVal;
else
\t\$progressWidth = 0;
\$(this).find('.progress-bar').css('width', \$progressWidth);
})
var valChart = {{ valChart|json_encode()|raw }};
var valChartNonLie = {{ valChartNonLie|json_encode()|raw }};
var valChartFact = {{ valChartFact|json_encode()|raw }};
var valChartFactClient = {{ valChartFactClient|json_encode()|raw }};
var valChartAmortMensAssurance = {{ valChartAmortMensAssurance|json_encode()|raw }};
var valChartCoutGb = {{ valChartCoutGb|json_encode()|raw }};
var ctxA = document.getElementById('myChartAchat').getContext('2d');
let datasets = [
{
label: \"BL HT: {{ montant['sum_ht'] ? montant['sum_ht']|number_format(2, ',', '') : \"0\" }}€\",
data: valChart,
backgroundColor: 'rgb(50 163 243)',
hoverBackgroundColor: 'rgb(50 163 243)',
hoverBorderColor: 'rgb(50 163 243)',
borderColor: 'rgb(50 163 243)',
fontColor: \"blue\",
borderWidth: 1
},
{
label: \"BL NON LIE: {{ montantBlNonRelie['sum_ht'] ? montantBlNonRelie['sum_ht']|number_format(2, ',', '') : \"0\" }}€\",
data: valChartNonLie,
backgroundColor: 'rgb(173 255 47)',
hoverBackgroundColor: 'rgb(173 255 47)',
hoverBorderColor: 'rgb(173 255 47)',
borderColor: 'rgb(173 255 47)',
fontColor: \"greenyellow\",
borderWidth: 1
},
{
label: \"Facturation HT: {{ montantFact['sum_ht'] ? montantFact['sum_ht']|number_format(2, ',', '') : \"0\" }}€\",
data: valChartFact,
backgroundColor: 'rgb(24 166 137)',
hoverBackgroundColor: 'rgb(24 166 137)',
hoverBorderColor: 'rgb(24 166 137)',
borderColor: 'rgb(24 166 137)',
borderWidth: 1
},
{
label: \"Cout Global: {{ sumCoutGb ? sumCoutGb|number_format(2, ',', '') : \"0\" }}€\",
data: valChartCoutGb,
backgroundColor: 'orange',
borderColor: 'orange',
borderWidth: 1
},
{
label: \"Facture client HT: {{ montantFactClient['sum_ht'] ? montantFactClient['sum_ht']|number_format(2, ',', '') : \"0\" }}€\",
data: valChartFactClient,
backgroundColor: 'pink',
borderColor: 'pink',
borderWidth: 1
}
];
{% if isgestionFinancements == 1 %}
datasets.push({
label: \"Mensualité avec assurance: {{ sumMontantAmortMensAssurance['mensualite_avec_assurance'] ? sumMontantAmortMensAssurance['mensualite_avec_assurance']|number_format(2, ',', '') : \"0\" }}€\",
data: valChartAmortMensAssurance,
backgroundColor: 'rgb(255, 90, 196)',
hoverBackgroundColor: 'rgb(255, 90, 196)',
hoverBorderColor: 'rgb(255, 90, 196)',
borderColor: 'rgb(255, 90, 196)',
borderWidth: 1
});
{% endif %}
var data = {
labels: [\"jan\", \"Fév\", 'Mars', 'Avr', 'Mais', 'Juin', 'Juil', 'Aout', 'sep', 'Oct', 'Nov', 'Déc'],
datasets: datasets
};
\$('.achat-vente-recap').text(\"{{full_month|capitalize}} - Taux de Marge {{tauxMarginCumulle|number_format(2, ',', '')}}%\");
var myChart = new Chart(ctxA, {
type: 'bar',
data: data,
options: {
\tbarValueSpacing: 40,
responsive: true,
maintainAspectRatio: false,
\t\t\t \"hover\": {
\t\t\t \"animationDuration\": 0
\t\t\t },
\t\t\t \"animation\": {
\t\t\t \"duration\": 1,
\t\t\t \"onComplete\": function() {
\t\t\t var chartInstance = this.chart,
\t\t\t ctx = chartInstance.ctx;
\t\t\t ctx.font = Chart.helpers.fontString(Chart.defaults.global.defaultFontSize, Chart.defaults.global.defaultFontStyle, Chart.defaults.global.defaultFontFamily);
\t\t\t ctx.textAlign = 'center';
\t\t\t ctx.textBaseline = 'bottom';
\t\t\t this.data.datasets.forEach(function(dataset, i) {
\t\t\t var meta = chartInstance.controller.getDatasetMeta(i);
\t\t\t meta.data.forEach(function(bar, index) {
\t\t\t var data = dataset.data[index];
\t\t\t ctx.fillText(data, bar._model.x, bar._model.y - 5);
\t\t\t });
\t\t\t });
\t\t\t }
\t\t\t },
\t\t\t tooltips: {
\t\t\t\t \"enabled\": true,
\t\t callbacks: {
\t\t label: function(tooltipItem, data) {
\t\t var label = data.datasets[tooltipItem.datasetIndex].label || '';
\t\t if (label) {
\t\t label += ': ';
\t\t }
\t\t label += Math.round(tooltipItem.yLabel * 100) / 100;
\t\t return Math.round(tooltipItem.yLabel * 100) / 100;
\t\t }
\t\t }
\t\t\t },
\t\t\t scales: {
\t\t\t \ty: {
beginAtZero: true
},
\t\t\t yAxes: [{
\t\t\t display: false,
\t\t\t gridLines: {
\t\t\t display: false
\t\t\t },
\t\t\t ticks: {
\t\t\t display: false,
\t\t\t beginAtZero: true,
\t\t\t min:0
\t\t\t }
\t\t\t }],
\t\t\t xAxes: [{
\t\t\t gridLines: {
\t\t\t display: false
\t\t\t },
\t\t\t ticks: {
\t\t\t beginAtZero: true
\t\t\t }
\t\t\t }]
\t\t\t },
\t\t\t title: {
display: false,
fontSize: '25',
text: '{{full_month|capitalize}}'
}
\t\t\t}
});
/* CHART MARGE */
var chartMarge = {{ chartMarge|json_encode()|raw }};
var chartColor = {{ chartColor|json_encode()|raw }};
var ctxM = document.getElementById('chartMarge').getContext('2d');
\$('.marge-resultat').text(\"Marge: {{ sumMarge ? sumMarge|number_format(2, ',', '') : \"0\" }}€ / M-1: {{ sumMarge_1 ? sumMarge_1|number_format(2, ',', '') : \"0\" }}€\");
\$('.marge-year').text(\"{{full_month|capitalize}}\");
var data2 = {
labels: [\"jan\", \"Fév\", 'Mars', 'Avr', 'Mais', 'Juin', 'Juil', 'Aout', 'sep', 'Oct', 'Nov', 'Déc'],
datasets: [
\t{
\t label: \"Marge: {{ sumMarge ? sumMarge|number_format(2, ',', '') : \"0\" }}€ / M-1: {{ sumMarge_1 ? sumMarge_1|number_format(2, ',', '') : \"0\" }}€\",
\t data: chartMarge,
\t backgroundColor: chartColor,
\t borderColor: chartColor,
\t borderWidth: 1
\t }
]
};
var myChartMarge = new Chart(ctxM, {
type: 'bar',
data: data2,
options: {
\tlegend: {
\t\t display: false,
\t\t labels: {
\t\t fontColor: 'rgb(255, 99, 132)'
\t\t }
\t\t },
\tbarValueSpacing: 40,
responsive: true,
maintainAspectRatio: false,
\t\t\t \"hover\": {
\t\t\t \"animationDuration\": 0
\t\t\t },
\t\t\t \"animation\": {
\t\t\t \"duration\": 1,
\t\t\t \"onComplete\": function() {
\t\t\t var chartInstance = this.chart,
\t\t\t ctx = chartInstance.ctx;
\t\t\t ctx.font = Chart.helpers.fontString(Chart.defaults.global.defaultFontSize, Chart.defaults.global.defaultFontStyle, Chart.defaults.global.defaultFontFamily);
\t\t\t ctx.textAlign = 'center';
\t\t\t ctx.textBaseline = 'bottom';
\t\t\t this.data.datasets.forEach(function(dataset, i) {
\t\t\t var meta = chartInstance.controller.getDatasetMeta(i);
\t\t\t meta.data.forEach(function(bar, index) {
\t\t\t var data2 = dataset.data[index];
\t\t\t ctx.fillText(data2, bar._model.x, bar._model.y - 5);
\t\t\t });
\t\t\t });
\t\t\t }
\t\t\t },
\t\t\t tooltips: {
\t\t\t\t \"enabled\": true,
\t\t callbacks: {
\t\t label: function(tooltipItem, data) {
\t\t var label = data.datasets[tooltipItem.datasetIndex].label || '';
\t\t if (label) {
\t\t label += ': ';
\t\t }
\t\t label += Math.round(tooltipItem.yLabel * 100) / 100;
\t\t return \"\";
\t\t }
\t\t }
\t\t\t },
\t\t\t scales: {
\t\t\t \ty: {
beginAtZero: true
},
\t\t\t yAxes: [{
\t\t\t display: false,
\t\t\t gridLines: {
\t\t\t display: false
\t\t\t },
\t\t\t ticks: {
\t\t\t display: false,
\t\t\t beginAtZero: true,
\t\t\t }
\t\t\t }],
\t\t\t xAxes: [{
\t\t\t gridLines: {
\t\t\t display: false
\t\t\t },
\t\t\t ticks: {
\t\t\t beginAtZero: true
\t\t\t }
\t\t\t }]
\t\t\t },
\t\t\t title: {
display: false,
fontSize: '25',
text: '{{full_month|capitalize}}'
}
\t\t\t}
});
function loadGalerie(page){
\$.ajax({
url: \"{{path('load_galerie_xhr')}}\",
type: \"GET\",
async: true,
dataType: \"json\",
data: {
page:page
},
success: function(response, status) {
if(response.status == 200){
\$('.galerie-item').removeClass('active');
\$('.galerie-container').append(response.preview);
}
else if(response.status == 500){
toastr.error(response.message);
}
else if(response.status == 300){
\$('.caro-nav .nav-right').css('display', 'none');
}
},
error: function(xhr, textStatus, errorThrown) {
toastr.error(\"Ooops..., Quelque chose s'est mal passée\");
}
});
}
\$page = 0;
loadGalerie(\$page);
\$page++;
\$('.caro-nav .nav-left').click(function(){
var listItem = \$( \".galerie-item.active\" );
var idx = \$( \".galerie-item\" ).index( listItem );
\$prevElt = \$('.galerie-item')[idx-1];
if(\$prevElt){
\$('.galerie-item').removeClass('active');
\$('.galerie-item').eq(idx-1).addClass('active');
\$stape = \$('.galerie-item.active').attr('data-page');
reloadInitGalerie(\$stape);
}
});
\$('.caro-nav .nav-right').click(function(){
loadGalerie(\$page);
\$page++;
});
function reloadInitGalerie(page){
var container = [];
// Loop over gallery items and push it to the array
\$('.galerie-item-'+page).find('.parent').each(function() {
var \$link = \$(this).find('.thumbnail-galerie');
if (\$link.data('type') == 'video') {
var item = {
html: \$link.data('video')
};
console.log('enter');
} else {
let img = new Image();
img.onload = function() {
};
img.src = \$link.data('url');
var item = {
src: \$link.data('url'),
w: \$link.data('width'),
h: \$link.data('height'),
title: \$link.data('caption')
};
}
container.push(item);
});
// Define click event on gallery item
\$('.thumbnail-galerie').click(function(event) {
// Prevent location change
event.preventDefault();
{% verbatim %}
// Define object and gallery options
var \$pswp = \$('.pswp')[0],
options = {
index: \$(this).parent('.parent').index(),
bgOpacity: 0.85,
showHideOpacity: true,
shareButtons: [
{id:'facebook', label:'Partager sur Facebook', url:'https://www.facebook.com/sharer/sharer.php?u={{url}}'},
{id:'twitter', label:'Tweeter', url:'https://twitter.com/intent/tweet?text={{text}}&url={{url}}'},
{id:'pinterest', label:'Epingler', url:'http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}'},
{id:'download', label:'Télécharger l\\'image', url:'{{raw_image_url}}', download:true}
]
};
{% endverbatim %}
// Initialize PhotoSwipe
var gallery = new PhotoSwipe(\$pswp, PhotoSwipeUI_Default, container, options);
gallery.init();
gallery.listen('beforeChange', function() {
var currItem = \$(gallery.currItem.container);
\$('.thumbnail-galerie').removeClass('active');
var currItemIframe = currItem.find('.thumbnail-galerie').addClass('active');
\$('.thumbnail-galerie').each(function() {
if (!\$(this).hasClass('active')) {
\$(this).attr('data-url', \$(this).attr('data-url'));
}
});
});
gallery.listen('close', function() {
\$('.thumbnail-galerie').each(function() {
\$(this).attr('data-url', \$(this).attr('data-url'));
});
});
});
}
chrome.tabs.onCreated.addListener(function (newTab) {
chrome.tabs.getAllInWindow(newTab.windowId, function(tabs) {
var duplicateTab = null;
tabs.forEach(function(otherTab) {
// Grab the domain from the otherTab
var otherDomain = otherTab.url.replace(/(?:(?:http)s?:\\/\\/)?(.*?\\..{2,3}(\\..{2})?)(?:.*)/i, '\$1');
// Create a new RegEx pattern with it
otherDomain = new RegExp(otherDomain, 'i');
// Then test to see if it matches the newTab.url
if (otherTab.id !== newTab.id && otherDomain.test(newTab.url)) {
duplicateTab = otherTab;
}
});
if (duplicateTab) {
chrome.tabs.update(duplicateTab.id, {\"selected\": true});
chrome.tabs.remove(newTab.id);
}
});
});
</script>
{% endblock %}
", "home/index.html.twig", "/var/www/fmdaOcr/templates/home/index.html.twig");
}
}