var/cache/dev/twig/3d/3deaffbe8c643530151295d4779eae19.php line 226

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* base.html.twig */
  16. class __TwigTemplate_617ec1fefee131a3bd127e7f9aba92cf extends Template
  17. {
  18.     private Source $source;
  19.     /**
  20.      * @var array<string, Template>
  21.      */
  22.     private array $macros = [];
  23.     public function __construct(Environment $env)
  24.     {
  25.         parent::__construct($env);
  26.         $this->source $this->getSourceContext();
  27.         $this->parent false;
  28.         $this->blocks = [
  29.             'title' => [$this'block_title'],
  30.             'stylesheet' => [$this'block_stylesheet'],
  31.             'javascripts' => [$this'block_javascripts'],
  32.             'header' => [$this'block_header'],
  33.             'body' => [$this'block_body'],
  34.             'footer' => [$this'block_footer'],
  35.             'javascript' => [$this'block_javascript'],
  36.             'myscript' => [$this'block_myscript'],
  37.         ];
  38.     }
  39.     protected function doDisplay(array $context, array $blocks = []): iterable
  40.     {
  41.         $macros $this->macros;
  42.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""base.html.twig"));
  44.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""base.html.twig"));
  46.         // line 1
  47.         $context["route_name"] = CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'1$this->source); })()), "request", [], "any"falsefalsefalse1), "attributes", [], "any"falsefalsefalse1), "get", ["_route"], "method"falsefalsefalse1);
  48.         // line 2
  49.         yield "<!DOCTYPE html>
  50. <html lang=\"en\">
  51. <head>
  52.     <meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\"/>
  53.     <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
  54.     <meta name=\"description\" content=\"";
  55.         // line 8
  56.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("header.headerDescription", [], "header_page"), "html"nulltrue);
  57.         yield "\">
  58.     <meta name=\"keywords\" content=\"";
  59.         // line 9
  60.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("header.headerKeyword", [], "header_page"), "html"nulltrue);
  61.         yield "\">
  62.     <meta name=\"author\" content=\"Nkap Sarl\">
  63.     <!-- Balise meta robots -->
  64.     <meta name=\"robots\" content=\"index\">
  65.     <!-- Balise meta revisit-after -->
  66.     <meta name=\"revisit-after\" content=\"1 day\">
  67.     <title>Ayila'a | ";
  68.         // line 15
  69.         yield from $this->unwrap()->yieldBlock('title'$context$blocks);
  70.         yield "</title>
  71.     <link rel=\"icon\" href=\"";
  72.         // line 16
  73.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/logo_LogoCercle.40dd8ea1.png"), "html"nulltrue);
  74.         yield "\">
  75.         <!-- Google tag (gtag.js) -->
  76.     <script async src=\"https://www.googletagmanager.com/gtag/js?id=G-HB2H04MNE9\"></script>
  77.     <script>
  78.         window.dataLayer = window.dataLayer || [];
  79.         function gtag() {
  80.             dataLayer.push(arguments);
  81.         }
  82.         gtag('js', new Date());
  83.         gtag('config', 'G-HB2H04MNE9');
  84.     </script>
  85.     <!-- Google Tag Manager -->
  86.     <script>(function (w, d, s, l, i) {
  87.             w[l] = w[l] || [];
  88.             w[l].push({'gtm.start':new Date().getTime(), event: 'gtm.js'});
  89.             var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
  90.             j.async = true;
  91.             j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
  92.             f.parentNode.insertBefore(j, f);
  93.         })(window, document, 'script', 'dataLayer', 'GTM-5W58P9R6');
  94.     </script>
  95.     <!-- End Google Tag Manager -->
  96.     <!-- GOOGLE WEB FONT -->
  97.     <link rel=\"preconnect\" href=\"https://fonts.gstatic.com\">
  98.     <link href=\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap\"
  99.           rel=\"stylesheet\">
  100.     <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css\">
  101.     <!-- BASE CSS -->
  102.     <link href=\"";
  103.         // line 50
  104.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/bootstrap.min.css"), "html"nulltrue);
  105.         yield "\" rel=\"stylesheet\">
  106.     <link href=\"";
  107.         // line 51
  108.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/style.css"), "html"nulltrue);
  109.         yield "\" rel=\"stylesheet\">
  110.     <link href=\"";
  111.         // line 52
  112.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/vendors.css"), "html"nulltrue);
  113.         yield "\" rel=\"stylesheet\">
  114.     <link href=\"";
  115.         // line 53
  116.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/header.css"), "html"nulltrue);
  117.         yield "\" rel=\"stylesheet\">
  118.     <link href=\"";
  119.         // line 54
  120.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/custom.css"), "html"nulltrue);
  121.         yield "\" rel=\"stylesheet\">
  122.     <link href=\"";
  123.         // line 55
  124.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/my-style/style.css"), "html"nulltrue);
  125.         yield "\" rel=\"stylesheet\">
  126.     <link href=\"";
  127.         // line 56
  128.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/autocomplete-results-search.css"), "html"nulltrue);
  129.         yield "\" rel=\"stylesheet\">
  130.     <link rel=\"stylesheet\" href=\"https://site-assets.fontawesome.com/releases/v6.4.2/css/all.css\">
  131. ";
  132.         // line 60
  133.         yield "
  134.     <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css\">
  135.     <!-- YOUR CUSTOM CSS -->
  136.     <style>
  137.         body{
  138.             width: 100%;
  139.             margin: 0 auto;
  140.             box-sizing: border-box;
  141.         }
  142.         .nav-class-elements {
  143.             color: black !important;
  144.         }
  145.         .icones-second-bar {
  146.             width: 35px;
  147.         }
  148.         @media (min-width: 1024px) {
  149.             .icones-second-bar {
  150.                 width: 25px;
  151.             }
  152.         }
  153.     </style>
  154.     ";
  155.         // line 84
  156.         yield from $this->unwrap()->yieldBlock('stylesheet'$context$blocks);
  157.         // line 86
  158.         yield "
  159.     ";
  160.         // line 87
  161.         yield from $this->unwrap()->yieldBlock('javascripts'$context$blocks);
  162.         // line 90
  163.         yield "</head>
  164. <body>
  165. ";
  166.         // line 93
  167.         $context["user"] = $this->extensions['App\Twig\AuthExtension']->AuthGuard();
  168.         // line 94
  169.         $context["isAuthenticated"] = $this->extensions['App\Twig\AuthExtension']->isAuth();
  170.         // line 95
  171.         yield "<!-- Google Tag Manager (noscript) -->
  172. <noscript>
  173.     <iframe src=\"https://www.googletagmanager.com/ns.html?id=GTM-5W58P9R6\" height=\"0\" width=\"0\" style=\"display:none;visibility:hidden\"></iframe>
  174. </noscript>
  175. <!-- End Google Tag Manager (noscript) -->
  176. <!-- Meta Pixel Code -->
  177. <script>
  178.     !function(f,b,e,v,n,t,s)
  179.     {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  180.         n.callMethod.apply(n,arguments):n.queue.push(arguments)};
  181.         if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
  182.         n.queue=[];t=b.createElement(e);t.async=!0;
  183.         t.src=v;s=b.getElementsByTagName(e)[0];
  184.         s.parentNode.insertBefore(t,s)}(window, document,'script',
  185.         'https://connect.facebook.net/en_US/fbevents.js');
  186.     fbq('init', '405729078674868');
  187.     fbq('track', 'PageView');
  188. </script>
  189. <noscript>
  190.     <img height=\"1\" width=\"1\" style=\"display:none\" src=\"https://www.facebook.com/tr?id=405729078674868&ev=PageView&noscript=1\" />
  191. </noscript>
  192. <!-- End Meta Pixel Code -->
  193. <div id=\"toast-container\" class=\"toast-top-right\"></div>
  194. <div id=\"page\">
  195.     ";
  196.         // line 120
  197.         yield from $this->unwrap()->yieldBlock('header'$context$blocks);
  198.         // line 123
  199.         yield "
  200.     <!-- /header -->
  201.     <main>
  202.         ";
  203.         // line 127
  204.         yield from $this->unwrap()->yieldBlock('body'$context$blocks);
  205.         // line 128
  206.         yield "    </main>
  207.     <!--/main-->
  208.     ";
  209.         // line 131
  210.         yield from $this->unwrap()->yieldBlock('footer'$context$blocks);
  211.         // line 134
  212.         yield "    <!--/footer-->
  213. </div>
  214. <!-- page -->
  215. <!-- Sign In Popup -->
  216. <div id=\"sign-in-dialog\" class=\"zoom-anim-dialog mfp-hide\">
  217.     <div class=\"small-dialog-header\">
  218.         <h3>Sign In</h3>
  219.     </div>
  220.     <form>
  221.         <div class=\"sign-in-wrapper\">
  222.             <a href=\"#0\" class=\"social_bt facebook\">Login with Facebook</a>
  223.             <a href=\"#0\" class=\"social_bt google\">Login with Google</a>
  224.             <div class=\"divider\"><span>Or</span></div>
  225.             <div class=\"form-group\">
  226.                 <label>Email</label>
  227.                 <input type=\"email\" class=\"form-control\" name=\"email\" id=\"email\">
  228.                 <i class=\"icon_mail_alt\"></i>
  229.             </div>
  230.             <div class=\"form-group\">
  231.                 <label>Password</label>
  232.                 <input type=\"password\" class=\"form-control\" name=\"password\" id=\"password\" value=\"\">
  233.                 <i class=\"icon_lock_alt\"></i>
  234.             </div>
  235.             <div class=\"clearfix add_bottom_15\">
  236.                 <div class=\"checkboxes float-start\">
  237.                     <label class=\"container_check\">Remember me
  238.                         <input type=\"checkbox\">
  239.                         <span class=\"checkmark\"></span>
  240.                     </label>
  241.                 </div>
  242.                 <div class=\"float-end mt-1\"><a id=\"forgot\" href=\"javascript:void(0);\">Forgot Password?</a></div>
  243.             </div>
  244.             <div class=\"text-center\"><input type=\"submit\" value=\"Log In\" class=\"btn_1 full-width\"></div>
  245.             <div class=\"text-center\">
  246.                 Don’t have an account? <a href=\"register.html\">Sign up</a>
  247.             </div>
  248.             <div id=\"forgot_pw\">
  249.                 <div class=\"form-group\">
  250.                     <label>Please confirm login email below</label>
  251.                     <input type=\"email\" class=\"form-control\" name=\"email_forgot\" id=\"email_forgot\">
  252.                     <i class=\"icon_mail_alt\"></i>
  253.                 </div>
  254.                 <p>You will receive an email containing a link allowing you to reset your password to a new preferred
  255.                     one.</p>
  256.                 <div class=\"text-center\"><input type=\"submit\" value=\"Reset Password\" class=\"btn_1\"></div>
  257.             </div>
  258.         </div>
  259.     </form>
  260.     <!--form -->
  261. </div>
  262. <!-- /Sign In Popup -->
  263. <div id=\"toTop\" onclick=\"scrollToTop()\"></div>
  264. <script>
  265.     window.onscroll = function () {
  266.         scrollFunction();
  267.     };
  268.     function scrollFunction() {
  269.         if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
  270.             document.getElementById(\"toTop\").style.display = \"block\";
  271.         } else {
  272.             document.getElementById(\"toTop\").style.display = \"none\";
  273.         }
  274.     }
  275.     function scrollToTop() {
  276.         document.body.scrollTop = 0;
  277.         document.documentElement.scrollTop = 0;
  278.     }
  279. </script>
  280. <!-- Back to top button -->
  281. <!-- COMMON SCRIPTS -->
  282. <script src=\"";
  283.         // line 209
  284.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/common_scripts.js"), "html"nulltrue);
  285.         yield "\"></script>
  286. <script src=\"";
  287.         // line 210
  288.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/main.js"), "html"nulltrue);
  289.         yield "\"></script>
  290. <script src=\"";
  291.         // line 211
  292.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/jquery-3.6.3.min.js"), "html"nulltrue);
  293.         yield "\"></script>
  294. ";
  295.         // line 213
  296.         yield from $this->unwrap()->yieldBlock('javascript'$context$blocks);
  297.         // line 215
  298.         yield "
  299. <script>
  300.     window.onscroll = function () {
  301.         scrollFunction()
  302.     };
  303.     function scrollFunction() {
  304.         var numero = document.getElementById(\"nav-numero\")
  305.         var langue = document.getElementById(\"nav-langue\")
  306.         if (numero === null || langue === null) {
  307.             return;
  308.         }
  309.         // Vérifie si l'utilisateur a fait défiler vers le bas
  310.         if (window.pageYOffset > 0) {
  311.             // Ajoute la classe \"sticks\" à la div
  312.             numero.classList.add(\"nav-class-elements\");
  313.             langue.classList.add(\"nav-class-elements\");
  314.         } else {
  315.             // Retire la classe \"sticks\" de la div
  316.             numero.classList.remove(\"nav-class-elements\");
  317.             langue.classList.remove(\"nav-class-elements\");
  318.         }
  319.     }
  320. </script>
  321. <script src=\"";
  322.         // line 240
  323.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/header.js"), "html"nulltrue);
  324.         yield "\"></script>
  325. <script src=\"https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js\"></script>
  326. <script src=\"";
  327.         // line 243
  328.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/fontawesome.min.js"), "html"nulltrue);
  329.         yield "\"></script>
  330. <script src=\"//code.tidio.co/s9ka0c7yvmz5hlz1gh0addn7u7xo3esb.js\" async></script>
  331. <script>
  332.     \$(document).ready(function () {
  333.         toastr.options = {
  334.             // \"closeButton\": true,          // Afficher le bouton de fermeture
  335.             \"progressBar\": true,          // Afficher une barre de progression
  336.             \"positionClass\": \"toast-top-right\", // Position des messages flash
  337.             \"showDuration\": \"300\",        // Durée d'affichage en millisecondes
  338.             \"hideDuration\": \"1000\",       // Durée de disparition en millisecondes
  339.             \"timeOut\": \"5000\",            // Temps d'affichage avant la disparition automatique en millisecondes
  340.             \"extendedTimeOut\": \"1000\",    // Temps d'affichage supplémentaire si l'utilisateur survole le message en millisecondes
  341.             \"showEasing\": \"swing\",        // Animation d'affichage du message
  342.             \"hideEasing\": \"linear\",       // Animation de disparition du message
  343.             \"showMethod\": \"fadeIn\",       // Méthode d'affichage du message
  344.             \"hideMethod\": \"fadeOut\"       // Méthode de disparition du message
  345.         };
  346.     });
  347. </script>
  348. ";
  349.         // line 263
  350.         $context['_parent'] = $context;
  351.         $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'263$this->source); })()), "flashes", [], "any"falsefalsefalse263));
  352.         foreach ($context['_seq'] as $context["label"] => $context["messages"]) {
  353.             // line 264
  354.             yield "    ";
  355.             $context['_parent'] = $context;
  356.             $context['_seq'] = CoreExtension::ensureTraversable($context["messages"]);
  357.             foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
  358.                 // line 265
  359.                 yield "        ";
  360.                 if (($context["label"] == "success")) {
  361.                     // line 266
  362.                     yield "            <script>
  363.                 toastr.success('";
  364.                     // line 267
  365.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["message"], "html"nulltrue);
  366.                     yield "');
  367.             </script>
  368.             ";
  369.                 } elseif ((                // line 269
  370. $context["label"] == "danger")) {
  371.                     // line 270
  372.                     yield "            <script>
  373.                 toastr.error('";
  374.                     // line 271
  375.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["message"], "html"nulltrue);
  376.                     yield "');
  377.             </script>
  378.         ";
  379.                 }
  380.                 // line 274
  381.                 yield "    ";
  382.             }
  383.             $_parent $context['_parent'];
  384.             unset($context['_seq'], $context['_key'], $context['message'], $context['_parent']);
  385.             $context array_intersect_key($context$_parent) + $_parent;
  386.         }
  387.         $_parent $context['_parent'];
  388.         unset($context['_seq'], $context['label'], $context['messages'], $context['_parent']);
  389.         $context array_intersect_key($context$_parent) + $_parent;
  390.         // line 276
  391.         yield "
  392. ";
  393.         // line 277
  394.         yield from $this->unwrap()->yieldBlock('myscript'$context$blocks);
  395.         // line 280
  396.         yield "<script>
  397.     const nameInput = document.querySelector('input[name=\"name\"]');
  398.     const autocompleteNameResults = nameInput.parentNode.querySelector('.autocomplete-results');
  399.     const defaultImageUrl = \"";
  400.         // line 283
  401.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/autres/1-600.c14c1b04.jpg"), "html"nulltrue);
  402.         yield "\";
  403.     const cityInput = document.querySelector('input[name=\"city\"]');
  404.     const addressInput = document.querySelector('input[name=\"address\"]');
  405.     const autocompleteCityResults = cityInput.parentNode.querySelector('.autocomplete-results');
  406.     const autocompleteAddressResults = addressInput.parentNode.querySelector('.autocomplete-results');
  407.     var formId =  document.getElementById(\"searchFormInput\");
  408.     nameInput.addEventListener('input', function() {
  409.         const searchText = this.value;
  410.         if (searchText.length >= 3) {
  411.             fetch(search(searchText))
  412.                 .then(response => response.json())
  413.                 .then(data => {
  414.                     autocompleteNameResults.innerHTML = '';
  415.                     if (data['hydra:member']) {
  416.                         data['hydra:member'].forEach(item => {
  417.                             const li = document.createElement('li');
  418.                             const a = document.createElement('a'); // Création d'une balise a
  419.                             var REDIRECT_URL = \"";
  420.         // line 304
  421.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_services_attraction", ["id" => "attraction_id"]), "js"), "html"nulltrue);
  422.         yield "\";
  423.                             REDIRECT_URL = REDIRECT_URL.replace(\"attraction_id\", item.id);
  424.                             a.href = REDIRECT_URL; // Ajout de l'attribut href à la balise a
  425.                             a.style.color = \"black\";
  426.                             const imageUrl = item.url && item.url.length > 0 ? item.url : defaultImageUrl;
  427.                             // Création d'une balise image avec l'URL dynamique
  428.                             const image = document.createElement('img');
  429.                             image.src = imageUrl;
  430.                             image.alt = item.name;
  431.                             image.style.width = 'auto';
  432.                             image.style.borderRadius = '4px';
  433.                             image.style.verticalAlign = 'middle';
  434.                             image.style.maxHeight = '40px';
  435.                             // Ajout de l'image et du texte dans le li
  436.                             a.appendChild(image);
  437.                             a.insertAdjacentHTML('beforeend', `<span>\${item.name}</span>`);
  438.                             li.appendChild(a);
  439.                             autocompleteNameResults.appendChild(li);
  440.                         });
  441.                         // Afficher le bloc d'autocomplétion
  442.                         autocompleteNameResults.style.display = 'block';
  443.                     }
  444.                 })
  445.                 .catch(error => console.error('Erreur lors de la récupération des résultats d\\'autocomplétion pour le nom :', error));
  446.         } else {
  447.             // Cacher le bloc d'autocomplétion si la longueur de la saisie est inférieure à 5
  448.             autocompleteNameResults.style.display = 'none';
  449.         }
  450.     });
  451.     // Fonction pour gérer l'autocomplétion de la ville (city)
  452.     cityInput.addEventListener('input', function() {
  453.         const searchText = this.value;
  454.         let cities = []; // Réinitialise le tableau à chaque nouvelle saisie
  455.         if (searchText.length >= 3) {
  456.             fetch(addressSearch(null, searchText))
  457.                 .then(response => response.json())
  458.                 .then(data => {
  459.                     autocompleteCityResults.innerHTML = '';
  460.                     if (data['hydra:member']) {
  461.                         data['hydra:member'].forEach(item => {
  462.                             let stateInfo = item.state != null ? `\${item.state}, ` : '';
  463.                             let city = `\${stateInfo}\${item.city}`;
  464.                             // Vérifie si la ville existe déjà dans le tableau
  465.                             if (!cities.includes(city)) {
  466.                                 const li = document.createElement('li');
  467.                                 li.textContent = city;
  468.                                 autocompleteCityResults.appendChild(li);
  469.                                 // Ajoute la ville au tableau
  470.                                 cities.push(city);
  471.                             }
  472.                         });
  473.                         autocompleteCityResults.style.display = 'block';
  474.                     }
  475.                 })
  476.                 .catch(error => console.error('Erreur lors de la récupération des résultats d\\'autocomplétion pour la ville :', error));
  477.         } else {
  478.             autocompleteCityResults.style.display = 'none';
  479.         }
  480.     });
  481.     // Fonction pour gérer l'autocomplétion de l'adresse
  482.     addressInput.addEventListener('input', function() {
  483.         const searchText = this.value;
  484.         if (searchText.length >= 3) {
  485.             fetch(addressSearch(searchText))
  486.                 .then(response => response.json())
  487.                 .then(data => {
  488.                     autocompleteAddressResults.innerHTML = '';
  489.                     if (data['hydra:member']) {
  490.                         data['hydra:member'].forEach(item => {
  491.                             const li = document.createElement('li');
  492.                             let neighborhoodInfo = item.neighborhood != null ? `\${item.neighborhood}, ` : '';
  493.                             li.textContent = `\${neighborhoodInfo}\${item.address}`;
  494.                             autocompleteAddressResults.appendChild(li);
  495.                         });
  496.                         autocompleteAddressResults.style.display = 'block';
  497.                     }
  498.                 })
  499.                 .catch(error => console.error('Erreur lors de la récupération des résultats d\\'autocomplétion pour l\\'adresse :', error));
  500.         } else {
  501.             autocompleteAddressResults.style.display = 'none';
  502.         }
  503.     });
  504.     // Event listener pour sélectionner une ville depuis les résultats d'autocomplétion
  505.     autocompleteCityResults.addEventListener('click', function(event) {
  506.         const clickedElement = event.target.closest('li');
  507.         if (clickedElement) {
  508.             cityInput.value = clickedElement.textContent;
  509.             autocompleteCityResults.innerHTML = '';
  510.             autocompleteCityResults.style.display = 'none';
  511.         }
  512.     });
  513.     // Event listener pour sélectionner une adresse depuis les résultats d'autocomplétion
  514.     autocompleteAddressResults.addEventListener('click', function(event) {
  515.         const clickedElement = event.target.closest('li');
  516.         if (clickedElement) {
  517.             addressInput.value = clickedElement.textContent;
  518.             autocompleteAddressResults.innerHTML = '';
  519.             autocompleteAddressResults.style.display = 'none';
  520.         }
  521.     });
  522.     autocompleteNameResults.addEventListener('click', function(event) {
  523.         const clickedElement = event.target.closest('li'); // Récupération de l'élément li le plus proche
  524.         if (clickedElement) {
  525.             const spanElement = clickedElement.querySelector('span'); // Sélection du span à l'intérieur de l'élément li
  526.             if (spanElement) {
  527.                 nameInput.value = spanElement.textContent; // Récupération du texte du span
  528.                 autocompleteNameResults.innerHTML = '';
  529.                 autocompleteNameResults.style.display = 'none';
  530.                 var newUrl = \"";
  531.         // line 424
  532.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_search_page"), "js"), "html"nulltrue);
  533.         yield "?name=\" + encodeURIComponent(spanElement.textContent);
  534.                 // window.location.replace(newUrl);
  535.             }
  536.         }
  537.     });
  538.     function search(name = null) {
  539.         var BASE_PATH = \"";
  540.         // line 432
  541.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("search_attraction_with_api", ["name" => "name_id"]), "js"), "html"nulltrue);
  542.         yield "\";
  543.         BASE_PATH = BASE_PATH.replace(\"name_id\", name);
  544.         return BASE_PATH;
  545.     }
  546.     function addressSearch(address = null, city = null, page = 1) {
  547.         // Définition des paramètres de recherche
  548.         let BASE_PATH = \"\";
  549.         // Ajout des paramètres non nuls
  550.         if (city != null){
  551.             BASE_PATH = \"";
  552.         // line 442
  553.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("search_address_city_with_api", ["city" => "city_id"]), "js"), "html"nulltrue);
  554.         yield "\";
  555.             BASE_PATH = BASE_PATH.replace(\"city_id\", city);
  556.         }
  557.         if (address != null){
  558.             BASE_PATH = \"";
  559.         // line 447
  560.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("search_address_neighborhood_with_api", ["address" => "address_id"]), "js"), "html"nulltrue);
  561.         yield "\";
  562.             BASE_PATH = BASE_PATH.replace(\"address_id\", address);
  563.         }
  564.         return BASE_PATH;
  565.     }
  566.     formId.addEventListener(\"submit\", function(event) {
  567.         event.preventDefault(); // Empêche l'envoi du formulaire par défaut
  568.         var name = document.querySelector('input[name=\"name\"]').value;
  569.         var city = document.querySelector('input[name=\"city\"]').value;
  570.         var state = document.querySelector('input[name=\"city\"]').value;
  571.         var address = document.querySelector('input[name=\"address\"]').value;
  572.         var neighborhood = document.querySelector('input[name=\"address\"]').value;
  573.         // console.log(typeof name.length,typeof city.length,typeof address.length)
  574.         if(name !== \"\" || city !== \"\" || address !== \"\"){
  575.             // Construction de la nouvelle URL
  576.             var newUrl = \"";
  577.         // line 468
  578.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_search_page"), "js"), "html"nulltrue);
  579.         yield "?name=\" + encodeURIComponent(name) + \"&city=\" + encodeURIComponent(city) + \"&state=\" + encodeURIComponent(state) + \"&address=\" + encodeURIComponent(address) + \"&neighborhood=\" + encodeURIComponent(neighborhood);
  580.             // Redirection vers la nouvelle URL
  581.             window.location.replace(newUrl);
  582.             // window.location.href = newUrl;
  583.         }
  584.     });
  585.     document.addEventListener('click', function(event) {
  586.         const isClickInsideAutocomplete = autocompleteNameResults.contains(event.target)
  587.             || autocompleteCityResults.contains(event.target)
  588.             || autocompleteAddressResults.contains(event.target);
  589.         if (!isClickInsideAutocomplete) {
  590.             autocompleteNameResults.style.display = 'none';
  591.             autocompleteCityResults.style.display = 'none';
  592.             autocompleteAddressResults.style.display = 'none';
  593.         }
  594.     });
  595. </script>
  596. </body>
  597. </html>";
  598.         
  599.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  600.         
  601.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  602.         yield from [];
  603.     }
  604.     // line 15
  605.     /**
  606.      * @return iterable<null|scalar|\Stringable>
  607.      */
  608.     public function block_title(array $context, array $blocks = []): iterable
  609.     {
  610.         $macros $this->macros;
  611.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  612.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  613.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  614.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  615.         
  616.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  617.         
  618.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  619.         yield from [];
  620.     }
  621.     // line 84
  622.     /**
  623.      * @return iterable<null|scalar|\Stringable>
  624.      */
  625.     public function block_stylesheet(array $context, array $blocks = []): iterable
  626.     {
  627.         $macros $this->macros;
  628.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  629.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  630.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  631.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  632.         // line 85
  633.         yield "    ";
  634.         
  635.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  636.         
  637.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  638.         yield from [];
  639.     }
  640.     // line 87
  641.     /**
  642.      * @return iterable<null|scalar|\Stringable>
  643.      */
  644.     public function block_javascripts(array $context, array $blocks = []): iterable
  645.     {
  646.         $macros $this->macros;
  647.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  648.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  649.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  650.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  651.         // line 88
  652.         yield "        ";
  653.         yield $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackScriptTags("app");
  654.         yield "
  655.     ";
  656.         
  657.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  658.         
  659.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  660.         yield from [];
  661.     }
  662.     // line 120
  663.     /**
  664.      * @return iterable<null|scalar|\Stringable>
  665.      */
  666.     public function block_header(array $context, array $blocks = []): iterable
  667.     {
  668.         $macros $this->macros;
  669.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  670.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""header"));
  671.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  672.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""header"));
  673.         // line 121
  674.         yield "        ";
  675.         yield from         $this->loadTemplate("frontend/structure/header.html.twig""base.html.twig"121)->unwrap()->yield($context);
  676.         // line 122
  677.         yield "    ";
  678.         
  679.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  680.         
  681.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  682.         yield from [];
  683.     }
  684.     // line 127
  685.     /**
  686.      * @return iterable<null|scalar|\Stringable>
  687.      */
  688.     public function block_body(array $context, array $blocks = []): iterable
  689.     {
  690.         $macros $this->macros;
  691.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  692.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  693.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  694.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  695.         
  696.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  697.         
  698.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  699.         yield from [];
  700.     }
  701.     // line 131
  702.     /**
  703.      * @return iterable<null|scalar|\Stringable>
  704.      */
  705.     public function block_footer(array $context, array $blocks = []): iterable
  706.     {
  707.         $macros $this->macros;
  708.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  709.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""footer"));
  710.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  711.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""footer"));
  712.         // line 132
  713.         yield "        ";
  714.         yield from         $this->loadTemplate("frontend/structure/footer.html.twig""base.html.twig"132)->unwrap()->yield($context);
  715.         // line 133
  716.         yield "    ";
  717.         
  718.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  719.         
  720.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  721.         yield from [];
  722.     }
  723.     // line 213
  724.     /**
  725.      * @return iterable<null|scalar|\Stringable>
  726.      */
  727.     public function block_javascript(array $context, array $blocks = []): iterable
  728.     {
  729.         $macros $this->macros;
  730.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  731.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  732.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  733.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  734.         
  735.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  736.         
  737.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  738.         yield from [];
  739.     }
  740.     // line 277
  741.     /**
  742.      * @return iterable<null|scalar|\Stringable>
  743.      */
  744.     public function block_myscript(array $context, array $blocks = []): iterable
  745.     {
  746.         $macros $this->macros;
  747.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  748.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""myscript"));
  749.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  750.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""myscript"));
  751.         
  752.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  753.         
  754.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  755.         yield from [];
  756.     }
  757.     /**
  758.      * @codeCoverageIgnore
  759.      */
  760.     public function getTemplateName(): string
  761.     {
  762.         return "base.html.twig";
  763.     }
  764.     /**
  765.      * @codeCoverageIgnore
  766.      */
  767.     public function isTraitable(): bool
  768.     {
  769.         return false;
  770.     }
  771.     /**
  772.      * @codeCoverageIgnore
  773.      */
  774.     public function getDebugInfo(): array
  775.     {
  776.         return array (  842 => 277,  820 => 213,  809 => 133,  806 => 132,  793 => 131,  771 => 127,  760 => 122,  757 => 121,  744 => 120,  730 => 88,  717 => 87,  706 => 85,  693 => 84,  671 => 15,  636 => 468,  612 => 447,  604 => 442,  591 => 432,  580 => 424,  457 => 304,  433 => 283,  428 => 280,  426 => 277,  423 => 276,  413 => 274,  407 => 271,  404 => 270,  402 => 269,  397 => 267,  394 => 266,  391 => 265,  386 => 264,  382 => 263,  359 => 243,  353 => 240,  326 => 215,  324 => 213,  320 => 211,  316 => 210,  312 => 209,  235 => 134,  233 => 131,  228 => 128,  226 => 127,  220 => 123,  218 => 120,  191 => 95,  189 => 94,  187 => 93,  182 => 90,  180 => 87,  177 => 86,  175 => 84,  149 => 60,  144 => 56,  140 => 55,  136 => 54,  132 => 53,  128 => 52,  124 => 51,  120 => 50,  83 => 16,  79 => 15,  70 => 9,  66 => 8,  58 => 2,  56 => 1,);
  777.     }
  778.     public function getSourceContext(): Source
  779.     {
  780.         return new Source("{% set route_name = app.request.attributes.get('_route') %}
  781. <!DOCTYPE html>
  782. <html lang=\"en\">
  783. <head>
  784.     <meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\"/>
  785.     <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
  786.     <meta name=\"description\" content=\"{{ 'header.headerDescription'|trans([],'header_page') }}\">
  787.     <meta name=\"keywords\" content=\"{{ 'header.headerKeyword'|trans([],'header_page') }}\">
  788.     <meta name=\"author\" content=\"Nkap Sarl\">
  789.     <!-- Balise meta robots -->
  790.     <meta name=\"robots\" content=\"index\">
  791.     <!-- Balise meta revisit-after -->
  792.     <meta name=\"revisit-after\" content=\"1 day\">
  793.     <title>Ayila'a | {% block title %}{% endblock %}</title>
  794.     <link rel=\"icon\" href=\"{{ asset('build/images/logo_LogoCercle.40dd8ea1.png') }}\">
  795.         <!-- Google tag (gtag.js) -->
  796.     <script async src=\"https://www.googletagmanager.com/gtag/js?id=G-HB2H04MNE9\"></script>
  797.     <script>
  798.         window.dataLayer = window.dataLayer || [];
  799.         function gtag() {
  800.             dataLayer.push(arguments);
  801.         }
  802.         gtag('js', new Date());
  803.         gtag('config', 'G-HB2H04MNE9');
  804.     </script>
  805.     <!-- Google Tag Manager -->
  806.     <script>(function (w, d, s, l, i) {
  807.             w[l] = w[l] || [];
  808.             w[l].push({'gtm.start':new Date().getTime(), event: 'gtm.js'});
  809.             var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
  810.             j.async = true;
  811.             j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
  812.             f.parentNode.insertBefore(j, f);
  813.         })(window, document, 'script', 'dataLayer', 'GTM-5W58P9R6');
  814.     </script>
  815.     <!-- End Google Tag Manager -->
  816.     <!-- GOOGLE WEB FONT -->
  817.     <link rel=\"preconnect\" href=\"https://fonts.gstatic.com\">
  818.     <link href=\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap\"
  819.           rel=\"stylesheet\">
  820.     <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css\">
  821.     <!-- BASE CSS -->
  822.     <link href=\"{{ asset('assets/css/bootstrap.min.css') }}\" rel=\"stylesheet\">
  823.     <link href=\"{{ asset('assets/css/style.css') }}\" rel=\"stylesheet\">
  824.     <link href=\"{{ asset('assets/css/vendors.css') }}\" rel=\"stylesheet\">
  825.     <link href=\"{{ asset('assets/css/header.css') }}\" rel=\"stylesheet\">
  826.     <link href=\"{{ asset('assets/css/custom.css') }}\" rel=\"stylesheet\">
  827.     <link href=\"{{ asset('assets/css/my-style/style.css') }}\" rel=\"stylesheet\">
  828.     <link href=\"{{ asset('assets/css/autocomplete-results-search.css') }}\" rel=\"stylesheet\">
  829.     <link rel=\"stylesheet\" href=\"https://site-assets.fontawesome.com/releases/v6.4.2/css/all.css\">
  830. {#    <link href=\"{{ asset('assets/css/all.min.css') }}\" rel=\"stylesheet\">#}
  831. {#    <link href=\"{{ asset('assets/css/font-awesome.min.css') }}\" rel=\"stylesheet\">#}
  832.     <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css\">
  833.     <!-- YOUR CUSTOM CSS -->
  834.     <style>
  835.         body{
  836.             width: 100%;
  837.             margin: 0 auto;
  838.             box-sizing: border-box;
  839.         }
  840.         .nav-class-elements {
  841.             color: black !important;
  842.         }
  843.         .icones-second-bar {
  844.             width: 35px;
  845.         }
  846.         @media (min-width: 1024px) {
  847.             .icones-second-bar {
  848.                 width: 25px;
  849.             }
  850.         }
  851.     </style>
  852.     {% block stylesheet %}
  853.     {% endblock %}
  854.     {% block javascripts %}
  855.         {{ encore_entry_script_tags('app') }}
  856.     {% endblock %}
  857. </head>
  858. <body>
  859. {% set user = AuthGuard() %}
  860. {% set isAuthenticated = isAuth() %}
  861. <!-- Google Tag Manager (noscript) -->
  862. <noscript>
  863.     <iframe src=\"https://www.googletagmanager.com/ns.html?id=GTM-5W58P9R6\" height=\"0\" width=\"0\" style=\"display:none;visibility:hidden\"></iframe>
  864. </noscript>
  865. <!-- End Google Tag Manager (noscript) -->
  866. <!-- Meta Pixel Code -->
  867. <script>
  868.     !function(f,b,e,v,n,t,s)
  869.     {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  870.         n.callMethod.apply(n,arguments):n.queue.push(arguments)};
  871.         if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
  872.         n.queue=[];t=b.createElement(e);t.async=!0;
  873.         t.src=v;s=b.getElementsByTagName(e)[0];
  874.         s.parentNode.insertBefore(t,s)}(window, document,'script',
  875.         'https://connect.facebook.net/en_US/fbevents.js');
  876.     fbq('init', '405729078674868');
  877.     fbq('track', 'PageView');
  878. </script>
  879. <noscript>
  880.     <img height=\"1\" width=\"1\" style=\"display:none\" src=\"https://www.facebook.com/tr?id=405729078674868&ev=PageView&noscript=1\" />
  881. </noscript>
  882. <!-- End Meta Pixel Code -->
  883. <div id=\"toast-container\" class=\"toast-top-right\"></div>
  884. <div id=\"page\">
  885.     {% block header %}
  886.         {% include 'frontend/structure/header.html.twig' %}
  887.     {% endblock %}
  888.     <!-- /header -->
  889.     <main>
  890.         {% block body %}{% endblock %}
  891.     </main>
  892.     <!--/main-->
  893.     {% block footer %}
  894.         {% include 'frontend/structure/footer.html.twig' %}
  895.     {% endblock %}
  896.     <!--/footer-->
  897. </div>
  898. <!-- page -->
  899. <!-- Sign In Popup -->
  900. <div id=\"sign-in-dialog\" class=\"zoom-anim-dialog mfp-hide\">
  901.     <div class=\"small-dialog-header\">
  902.         <h3>Sign In</h3>
  903.     </div>
  904.     <form>
  905.         <div class=\"sign-in-wrapper\">
  906.             <a href=\"#0\" class=\"social_bt facebook\">Login with Facebook</a>
  907.             <a href=\"#0\" class=\"social_bt google\">Login with Google</a>
  908.             <div class=\"divider\"><span>Or</span></div>
  909.             <div class=\"form-group\">
  910.                 <label>Email</label>
  911.                 <input type=\"email\" class=\"form-control\" name=\"email\" id=\"email\">
  912.                 <i class=\"icon_mail_alt\"></i>
  913.             </div>
  914.             <div class=\"form-group\">
  915.                 <label>Password</label>
  916.                 <input type=\"password\" class=\"form-control\" name=\"password\" id=\"password\" value=\"\">
  917.                 <i class=\"icon_lock_alt\"></i>
  918.             </div>
  919.             <div class=\"clearfix add_bottom_15\">
  920.                 <div class=\"checkboxes float-start\">
  921.                     <label class=\"container_check\">Remember me
  922.                         <input type=\"checkbox\">
  923.                         <span class=\"checkmark\"></span>
  924.                     </label>
  925.                 </div>
  926.                 <div class=\"float-end mt-1\"><a id=\"forgot\" href=\"javascript:void(0);\">Forgot Password?</a></div>
  927.             </div>
  928.             <div class=\"text-center\"><input type=\"submit\" value=\"Log In\" class=\"btn_1 full-width\"></div>
  929.             <div class=\"text-center\">
  930.                 Don’t have an account? <a href=\"register.html\">Sign up</a>
  931.             </div>
  932.             <div id=\"forgot_pw\">
  933.                 <div class=\"form-group\">
  934.                     <label>Please confirm login email below</label>
  935.                     <input type=\"email\" class=\"form-control\" name=\"email_forgot\" id=\"email_forgot\">
  936.                     <i class=\"icon_mail_alt\"></i>
  937.                 </div>
  938.                 <p>You will receive an email containing a link allowing you to reset your password to a new preferred
  939.                     one.</p>
  940.                 <div class=\"text-center\"><input type=\"submit\" value=\"Reset Password\" class=\"btn_1\"></div>
  941.             </div>
  942.         </div>
  943.     </form>
  944.     <!--form -->
  945. </div>
  946. <!-- /Sign In Popup -->
  947. <div id=\"toTop\" onclick=\"scrollToTop()\"></div>
  948. <script>
  949.     window.onscroll = function () {
  950.         scrollFunction();
  951.     };
  952.     function scrollFunction() {
  953.         if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
  954.             document.getElementById(\"toTop\").style.display = \"block\";
  955.         } else {
  956.             document.getElementById(\"toTop\").style.display = \"none\";
  957.         }
  958.     }
  959.     function scrollToTop() {
  960.         document.body.scrollTop = 0;
  961.         document.documentElement.scrollTop = 0;
  962.     }
  963. </script>
  964. <!-- Back to top button -->
  965. <!-- COMMON SCRIPTS -->
  966. <script src=\"{{ asset('assets/js/common_scripts.js') }}\"></script>
  967. <script src=\"{{ asset('assets/js/main.js') }}\"></script>
  968. <script src=\"{{ asset('assets/js/jquery-3.6.3.min.js') }}\"></script>
  969. {#<script src=\"{{ asset('assets/js/bootstrap.bundle.js') }}\"></script>#}
  970. {% block javascript %}
  971. {% endblock %}
  972. <script>
  973.     window.onscroll = function () {
  974.         scrollFunction()
  975.     };
  976.     function scrollFunction() {
  977.         var numero = document.getElementById(\"nav-numero\")
  978.         var langue = document.getElementById(\"nav-langue\")
  979.         if (numero === null || langue === null) {
  980.             return;
  981.         }
  982.         // Vérifie si l'utilisateur a fait défiler vers le bas
  983.         if (window.pageYOffset > 0) {
  984.             // Ajoute la classe \"sticks\" à la div
  985.             numero.classList.add(\"nav-class-elements\");
  986.             langue.classList.add(\"nav-class-elements\");
  987.         } else {
  988.             // Retire la classe \"sticks\" de la div
  989.             numero.classList.remove(\"nav-class-elements\");
  990.             langue.classList.remove(\"nav-class-elements\");
  991.         }
  992.     }
  993. </script>
  994. <script src=\"{{ asset('assets/js/header.js') }}\"></script>
  995. <script src=\"https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js\"></script>
  996. <script src=\"{{ asset('assets/js/fontawesome.min.js') }}\"></script>
  997. <script src=\"//code.tidio.co/s9ka0c7yvmz5hlz1gh0addn7u7xo3esb.js\" async></script>
  998. <script>
  999.     \$(document).ready(function () {
  1000.         toastr.options = {
  1001.             // \"closeButton\": true,          // Afficher le bouton de fermeture
  1002.             \"progressBar\": true,          // Afficher une barre de progression
  1003.             \"positionClass\": \"toast-top-right\", // Position des messages flash
  1004.             \"showDuration\": \"300\",        // Durée d'affichage en millisecondes
  1005.             \"hideDuration\": \"1000\",       // Durée de disparition en millisecondes
  1006.             \"timeOut\": \"5000\",            // Temps d'affichage avant la disparition automatique en millisecondes
  1007.             \"extendedTimeOut\": \"1000\",    // Temps d'affichage supplémentaire si l'utilisateur survole le message en millisecondes
  1008.             \"showEasing\": \"swing\",        // Animation d'affichage du message
  1009.             \"hideEasing\": \"linear\",       // Animation de disparition du message
  1010.             \"showMethod\": \"fadeIn\",       // Méthode d'affichage du message
  1011.             \"hideMethod\": \"fadeOut\"       // Méthode de disparition du message
  1012.         };
  1013.     });
  1014. </script>
  1015. {% for label, messages in app.flashes %}
  1016.     {% for message in messages %}
  1017.         {% if label == \"success\" %}
  1018.             <script>
  1019.                 toastr.success('{{ message }}');
  1020.             </script>
  1021.             {% elseif label == \"danger\" %}
  1022.             <script>
  1023.                 toastr.error('{{ message }}');
  1024.             </script>
  1025.         {% endif %}
  1026.     {% endfor %}
  1027. {% endfor %}
  1028. {% block myscript %}
  1029. {% endblock %}
  1030. {#la section dedié à la recherche en utilisant autocomplete-results qui ne doit pas etre utiliser ailleur#}
  1031. <script>
  1032.     const nameInput = document.querySelector('input[name=\"name\"]');
  1033.     const autocompleteNameResults = nameInput.parentNode.querySelector('.autocomplete-results');
  1034.     const defaultImageUrl = \"{{ asset('build/images/autres/1-600.c14c1b04.jpg') }}\";
  1035.     const cityInput = document.querySelector('input[name=\"city\"]');
  1036.     const addressInput = document.querySelector('input[name=\"address\"]');
  1037.     const autocompleteCityResults = cityInput.parentNode.querySelector('.autocomplete-results');
  1038.     const autocompleteAddressResults = addressInput.parentNode.querySelector('.autocomplete-results');
  1039.     var formId =  document.getElementById(\"searchFormInput\");
  1040.     nameInput.addEventListener('input', function() {
  1041.         const searchText = this.value;
  1042.         if (searchText.length >= 3) {
  1043.             fetch(search(searchText))
  1044.                 .then(response => response.json())
  1045.                 .then(data => {
  1046.                     autocompleteNameResults.innerHTML = '';
  1047.                     if (data['hydra:member']) {
  1048.                         data['hydra:member'].forEach(item => {
  1049.                             const li = document.createElement('li');
  1050.                             const a = document.createElement('a'); // Création d'une balise a
  1051.                             var REDIRECT_URL = \"{{ path('app_services_attraction',{'id': 'attraction_id'})|escape('js') }}\";
  1052.                             REDIRECT_URL = REDIRECT_URL.replace(\"attraction_id\", item.id);
  1053.                             a.href = REDIRECT_URL; // Ajout de l'attribut href à la balise a
  1054.                             a.style.color = \"black\";
  1055.                             const imageUrl = item.url && item.url.length > 0 ? item.url : defaultImageUrl;
  1056.                             // Création d'une balise image avec l'URL dynamique
  1057.                             const image = document.createElement('img');
  1058.                             image.src = imageUrl;
  1059.                             image.alt = item.name;
  1060.                             image.style.width = 'auto';
  1061.                             image.style.borderRadius = '4px';
  1062.                             image.style.verticalAlign = 'middle';
  1063.                             image.style.maxHeight = '40px';
  1064.                             // Ajout de l'image et du texte dans le li
  1065.                             a.appendChild(image);
  1066.                             a.insertAdjacentHTML('beforeend', `<span>\${item.name}</span>`);
  1067.                             li.appendChild(a);
  1068.                             autocompleteNameResults.appendChild(li);
  1069.                         });
  1070.                         // Afficher le bloc d'autocomplétion
  1071.                         autocompleteNameResults.style.display = 'block';
  1072.                     }
  1073.                 })
  1074.                 .catch(error => console.error('Erreur lors de la récupération des résultats d\\'autocomplétion pour le nom :', error));
  1075.         } else {
  1076.             // Cacher le bloc d'autocomplétion si la longueur de la saisie est inférieure à 5
  1077.             autocompleteNameResults.style.display = 'none';
  1078.         }
  1079.     });
  1080.     // Fonction pour gérer l'autocomplétion de la ville (city)
  1081.     cityInput.addEventListener('input', function() {
  1082.         const searchText = this.value;
  1083.         let cities = []; // Réinitialise le tableau à chaque nouvelle saisie
  1084.         if (searchText.length >= 3) {
  1085.             fetch(addressSearch(null, searchText))
  1086.                 .then(response => response.json())
  1087.                 .then(data => {
  1088.                     autocompleteCityResults.innerHTML = '';
  1089.                     if (data['hydra:member']) {
  1090.                         data['hydra:member'].forEach(item => {
  1091.                             let stateInfo = item.state != null ? `\${item.state}, ` : '';
  1092.                             let city = `\${stateInfo}\${item.city}`;
  1093.                             // Vérifie si la ville existe déjà dans le tableau
  1094.                             if (!cities.includes(city)) {
  1095.                                 const li = document.createElement('li');
  1096.                                 li.textContent = city;
  1097.                                 autocompleteCityResults.appendChild(li);
  1098.                                 // Ajoute la ville au tableau
  1099.                                 cities.push(city);
  1100.                             }
  1101.                         });
  1102.                         autocompleteCityResults.style.display = 'block';
  1103.                     }
  1104.                 })
  1105.                 .catch(error => console.error('Erreur lors de la récupération des résultats d\\'autocomplétion pour la ville :', error));
  1106.         } else {
  1107.             autocompleteCityResults.style.display = 'none';
  1108.         }
  1109.     });
  1110.     // Fonction pour gérer l'autocomplétion de l'adresse
  1111.     addressInput.addEventListener('input', function() {
  1112.         const searchText = this.value;
  1113.         if (searchText.length >= 3) {
  1114.             fetch(addressSearch(searchText))
  1115.                 .then(response => response.json())
  1116.                 .then(data => {
  1117.                     autocompleteAddressResults.innerHTML = '';
  1118.                     if (data['hydra:member']) {
  1119.                         data['hydra:member'].forEach(item => {
  1120.                             const li = document.createElement('li');
  1121.                             let neighborhoodInfo = item.neighborhood != null ? `\${item.neighborhood}, ` : '';
  1122.                             li.textContent = `\${neighborhoodInfo}\${item.address}`;
  1123.                             autocompleteAddressResults.appendChild(li);
  1124.                         });
  1125.                         autocompleteAddressResults.style.display = 'block';
  1126.                     }
  1127.                 })
  1128.                 .catch(error => console.error('Erreur lors de la récupération des résultats d\\'autocomplétion pour l\\'adresse :', error));
  1129.         } else {
  1130.             autocompleteAddressResults.style.display = 'none';
  1131.         }
  1132.     });
  1133.     // Event listener pour sélectionner une ville depuis les résultats d'autocomplétion
  1134.     autocompleteCityResults.addEventListener('click', function(event) {
  1135.         const clickedElement = event.target.closest('li');
  1136.         if (clickedElement) {
  1137.             cityInput.value = clickedElement.textContent;
  1138.             autocompleteCityResults.innerHTML = '';
  1139.             autocompleteCityResults.style.display = 'none';
  1140.         }
  1141.     });
  1142.     // Event listener pour sélectionner une adresse depuis les résultats d'autocomplétion
  1143.     autocompleteAddressResults.addEventListener('click', function(event) {
  1144.         const clickedElement = event.target.closest('li');
  1145.         if (clickedElement) {
  1146.             addressInput.value = clickedElement.textContent;
  1147.             autocompleteAddressResults.innerHTML = '';
  1148.             autocompleteAddressResults.style.display = 'none';
  1149.         }
  1150.     });
  1151.     autocompleteNameResults.addEventListener('click', function(event) {
  1152.         const clickedElement = event.target.closest('li'); // Récupération de l'élément li le plus proche
  1153.         if (clickedElement) {
  1154.             const spanElement = clickedElement.querySelector('span'); // Sélection du span à l'intérieur de l'élément li
  1155.             if (spanElement) {
  1156.                 nameInput.value = spanElement.textContent; // Récupération du texte du span
  1157.                 autocompleteNameResults.innerHTML = '';
  1158.                 autocompleteNameResults.style.display = 'none';
  1159.                 var newUrl = \"{{ path('app_search_page') |escape('js') }}?name=\" + encodeURIComponent(spanElement.textContent);
  1160.                 // window.location.replace(newUrl);
  1161.             }
  1162.         }
  1163.     });
  1164.     function search(name = null) {
  1165.         var BASE_PATH = \"{{ path('search_attraction_with_api',{'name': 'name_id'})|escape('js') }}\";
  1166.         BASE_PATH = BASE_PATH.replace(\"name_id\", name);
  1167.         return BASE_PATH;
  1168.     }
  1169.     function addressSearch(address = null, city = null, page = 1) {
  1170.         // Définition des paramètres de recherche
  1171.         let BASE_PATH = \"\";
  1172.         // Ajout des paramètres non nuls
  1173.         if (city != null){
  1174.             BASE_PATH = \"{{ path('search_address_city_with_api',{'city': 'city_id'})|escape('js') }}\";
  1175.             BASE_PATH = BASE_PATH.replace(\"city_id\", city);
  1176.         }
  1177.         if (address != null){
  1178.             BASE_PATH = \"{{ path('search_address_neighborhood_with_api',{'address': 'address_id'})|escape('js') }}\";
  1179.             BASE_PATH = BASE_PATH.replace(\"address_id\", address);
  1180.         }
  1181.         return BASE_PATH;
  1182.     }
  1183.     formId.addEventListener(\"submit\", function(event) {
  1184.         event.preventDefault(); // Empêche l'envoi du formulaire par défaut
  1185.         var name = document.querySelector('input[name=\"name\"]').value;
  1186.         var city = document.querySelector('input[name=\"city\"]').value;
  1187.         var state = document.querySelector('input[name=\"city\"]').value;
  1188.         var address = document.querySelector('input[name=\"address\"]').value;
  1189.         var neighborhood = document.querySelector('input[name=\"address\"]').value;
  1190.         // console.log(typeof name.length,typeof city.length,typeof address.length)
  1191.         if(name !== \"\" || city !== \"\" || address !== \"\"){
  1192.             // Construction de la nouvelle URL
  1193.             var newUrl = \"{{ path('app_search_page') |escape('js') }}?name=\" + encodeURIComponent(name) + \"&city=\" + encodeURIComponent(city) + \"&state=\" + encodeURIComponent(state) + \"&address=\" + encodeURIComponent(address) + \"&neighborhood=\" + encodeURIComponent(neighborhood);
  1194.             // Redirection vers la nouvelle URL
  1195.             window.location.replace(newUrl);
  1196.             // window.location.href = newUrl;
  1197.         }
  1198.     });
  1199.     document.addEventListener('click', function(event) {
  1200.         const isClickInsideAutocomplete = autocompleteNameResults.contains(event.target)
  1201.             || autocompleteCityResults.contains(event.target)
  1202.             || autocompleteAddressResults.contains(event.target);
  1203.         if (!isClickInsideAutocomplete) {
  1204.             autocompleteNameResults.style.display = 'none';
  1205.             autocompleteCityResults.style.display = 'none';
  1206.             autocompleteAddressResults.style.display = 'none';
  1207.         }
  1208.     });
  1209. </script>
  1210. </body>
  1211. </html>""base.html.twig""/home/net/symfony/vhosts/test-ayilaa-frontend/templates/base.html.twig");
  1212.     }
  1213. }