<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* fe/_global_variables.html.twig */
class __TwigTemplate_fea354075fbc50673d2126631e7ec21a extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "fe/_global_variables.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "fe/_global_variables.html.twig"));
// line 2
yield "<script>!function (n) { \"use strict\"; n.loadCSS || (n.loadCSS = function () { }); var t, o = loadCSS.relpreload = {}; o.support = function () { var e; try { e = n.document.createElement(\"link\").relList.supports(\"preload\") } catch (t) { e = !1 } return function () { return e } }(), o.bindMediaToggle = function (t) { var e = t.media || \"all\"; function a() { t.addEventListener ? t.removeEventListener(\"load\", a) : t.attachEvent && t.detachEvent(\"onload\", a), t.setAttribute(\"onload\", null), t.media = e } t.addEventListener ? t.addEventListener(\"load\", a) : t.attachEvent && t.attachEvent(\"onload\", a), setTimeout(function () { t.rel = \"stylesheet\", t.media = \"only x\" }), setTimeout(a, 3e3) }, o.poly = function () { if (!o.support()) for (var t = n.document.getElementsByTagName(\"link\"), e = 0; e < t.length; e++) { var a = t[e]; \"preload\" !== a.rel || \"style\" !== a.getAttribute(\"as\") || a.getAttribute(\"data-loadcss\") || (a.setAttribute(\"data-loadcss\", !0), o.bindMediaToggle(a)) } }, o.support() || (o.poly(), t = n.setInterval(o.poly, 500), n.addEventListener ? n.addEventListener(\"load\", function () { o.poly(), n.clearInterval(t) }) : n.attachEvent && n.attachEvent(\"onload\", function () { o.poly(), n.clearInterval(t) })), \"undefined\" != typeof exports ? exports.loadCSS = loadCSS : n.loadCSS = loadCSS }(\"undefined\" != typeof global ? global : this);</script>
";
// line 4
yield "<script>
// Global functions
function __(string) {
return typeof APP.messages[string] != \"undefined\" ? APP.messages[string] : string;
}
// Constants
var APP = {
currency: \"";
// line 12
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('App\CurrencyBundle\Twig\VarsRuntime')->getUserCurrencySymbol(), "html", null, true);
yield "\",
gtmEnhancedEcommerceCurrencyCode: \"EGP\",
cartLastUpdateHash: ";
// line 14
yield $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\ECommerceBundle\\Controller\\FrontEnd\\CartWidgetController::getCartLastUpdateHash"));
yield ",
isLoggedIn: ";
// line 15
yield (((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("true") : ("false"));
yield ",
cartUrls: {
list: \"";
// line 17
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fe_cart_widget_list_ajax");
yield "\",
addItem: \"";
// line 18
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fe_cart_widget_add_item_ajax");
yield "\",
updateQty: \"";
// line 19
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fe_cart_widget_update_qty_item_ajax");
yield "\",
removeItem: \"";
// line 20
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fe_cart_widget_remove_item_ajax");
yield "\",
removeFromCartAndAddToWishlist: \"";
// line 21
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fe_cart_widget_remove_from_cart_and_add_to_wishlist_ajax");
yield "\",
addCouponCode: \"";
// line 22
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fe_cart_widget_add_coupon_ajax");
yield "\",
removeCouponCode: \"";
// line 23
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fe_cart_widget_remove_coupon_ajax");
yield "\",
},
productUrls: {
variants: \"";
// line 26
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fe_product_variant_get_data_ajax");
yield "\",
},
newsletter: {
link: \"";
// line 29
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fe_subscribe");
yield "\",
_token: \"";
// line 30
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderCsrfToken("newsletter-token"), "html", null, true);
yield "\"
},
addressUrls: {
list: \"";
// line 33
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fe_shipping_address_list_api");
yield "\",
makeDefault: \"";
// line 34
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fe_shipping_address_make_default_api");
yield "\",
add: \"";
// line 35
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fe_shipping_address_new_api");
yield "\",
edit: \"";
// line 36
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fe_shipping_address_edit_api");
yield "\",
remove: \"";
// line 37
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fe_shipping_address_delete_api");
yield "\",
},
messages: {
\"Copied\": \"";
// line 40
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("copied_txt"), "html", null, true);
yield "\",
\"Add to Wishlist\": \"";
// line 41
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("add_to_wishlist_txt"), "html", null, true);
yield "\",
\"Save for Later\": \"";
// line 42
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("save_for_later_txt"), "html", null, true);
yield "\",
\"Remove from Wishlist\": \"";
// line 43
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("remove_from_wishlist_txt"), "html", null, true);
yield "\",
\"Delete\": \"";
// line 44
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("delete_txt"), "html", null, true);
yield "\",
\"Share\": \"";
// line 45
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("share_txt"), "html", null, true);
yield "\",
\"Out of Stock\": \"";
// line 46
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("out_of_stock_txt"), "html", null, true);
yield "\",
\"Add to Cart\": \"";
// line 47
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("add_to_cart_txt"), "html", null, true);
yield "\",
\"Ratings\": \"";
// line 48
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ratings_txt"), "html", null, true);
yield "\",
\"Saved\": \"";
// line 49
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("save_money_txt"), "html", null, true);
yield "\",
\"Please type correct email address\": \"";
// line 50
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("enter_correct_email_msg"), "html", null, true);
yield "\",
\"Please login first\": \"";
// line 51
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("please_login_first_msg"), "html", null, true);
yield "\",
\"Price not found\": \"";
// line 52
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("price_not_found_msg"), "html", null, true);
yield "\",
}
}
var APP_DOM = {
modals: {},
tooltips: {
refresh: () => {
}
}
}
var APP_DATA = {
cart: {}
}
</script>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "fe/_global_variables.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 191 => 52, 187 => 51, 183 => 50, 179 => 49, 175 => 48, 171 => 47, 167 => 46, 163 => 45, 159 => 44, 155 => 43, 151 => 42, 147 => 41, 143 => 40, 137 => 37, 133 => 36, 129 => 35, 125 => 34, 121 => 33, 115 => 30, 111 => 29, 105 => 26, 99 => 23, 95 => 22, 91 => 21, 87 => 20, 83 => 19, 79 => 18, 75 => 17, 70 => 15, 66 => 14, 61 => 12, 51 => 4, 48 => 2,);
}
public function getSourceContext(): Source
{
return new Source("{# START Load CSS #}
<script>!function (n) { \"use strict\"; n.loadCSS || (n.loadCSS = function () { }); var t, o = loadCSS.relpreload = {}; o.support = function () { var e; try { e = n.document.createElement(\"link\").relList.supports(\"preload\") } catch (t) { e = !1 } return function () { return e } }(), o.bindMediaToggle = function (t) { var e = t.media || \"all\"; function a() { t.addEventListener ? t.removeEventListener(\"load\", a) : t.attachEvent && t.detachEvent(\"onload\", a), t.setAttribute(\"onload\", null), t.media = e } t.addEventListener ? t.addEventListener(\"load\", a) : t.attachEvent && t.attachEvent(\"onload\", a), setTimeout(function () { t.rel = \"stylesheet\", t.media = \"only x\" }), setTimeout(a, 3e3) }, o.poly = function () { if (!o.support()) for (var t = n.document.getElementsByTagName(\"link\"), e = 0; e < t.length; e++) { var a = t[e]; \"preload\" !== a.rel || \"style\" !== a.getAttribute(\"as\") || a.getAttribute(\"data-loadcss\") || (a.setAttribute(\"data-loadcss\", !0), o.bindMediaToggle(a)) } }, o.support() || (o.poly(), t = n.setInterval(o.poly, 500), n.addEventListener ? n.addEventListener(\"load\", function () { o.poly(), n.clearInterval(t) }) : n.attachEvent && n.attachEvent(\"onload\", function () { o.poly(), n.clearInterval(t) })), \"undefined\" != typeof exports ? exports.loadCSS = loadCSS : n.loadCSS = loadCSS }(\"undefined\" != typeof global ? global : this);</script>
{# END Load CSS #}
<script>
// Global functions
function __(string) {
return typeof APP.messages[string] != \"undefined\" ? APP.messages[string] : string;
}
// Constants
var APP = {
currency: \"{{ userCurrencySymbol() }}\",
gtmEnhancedEcommerceCurrencyCode: \"EGP\",
cartLastUpdateHash: {{ render(controller(\"App\\\\ECommerceBundle\\\\Controller\\\\FrontEnd\\\\CartWidgetController::getCartLastUpdateHash\") ) }},
isLoggedIn: {{ is_granted('ROLE_USER') ? 'true' : 'false' }},
cartUrls: {
list: \"{{ path('fe_cart_widget_list_ajax') }}\",
addItem: \"{{ path('fe_cart_widget_add_item_ajax') }}\",
updateQty: \"{{ path('fe_cart_widget_update_qty_item_ajax') }}\",
removeItem: \"{{ path('fe_cart_widget_remove_item_ajax') }}\",
removeFromCartAndAddToWishlist: \"{{ path('fe_cart_widget_remove_from_cart_and_add_to_wishlist_ajax') }}\",
addCouponCode: \"{{ path('fe_cart_widget_add_coupon_ajax') }}\",
removeCouponCode: \"{{ path('fe_cart_widget_remove_coupon_ajax') }}\",
},
productUrls: {
variants: \"{{ path('fe_product_variant_get_data_ajax') }}\",
},
newsletter: {
link: \"{{ path('fe_subscribe') }}\",
_token: \"{{ csrf_token(\"newsletter-token\") }}\"
},
addressUrls: {
list: \"{{ path('fe_shipping_address_list_api') }}\",
makeDefault: \"{{ path('fe_shipping_address_make_default_api') }}\",
add: \"{{ path('fe_shipping_address_new_api') }}\",
edit: \"{{ path('fe_shipping_address_edit_api') }}\",
remove: \"{{ path('fe_shipping_address_delete_api') }}\",
},
messages: {
\"Copied\": \"{{ \"copied_txt\"|trans }}\",
\"Add to Wishlist\": \"{{ \"add_to_wishlist_txt\"|trans }}\",
\"Save for Later\": \"{{ \"save_for_later_txt\"|trans }}\",
\"Remove from Wishlist\": \"{{ \"remove_from_wishlist_txt\"|trans }}\",
\"Delete\": \"{{ \"delete_txt\"|trans }}\",
\"Share\": \"{{ \"share_txt\"|trans }}\",
\"Out of Stock\": \"{{ \"out_of_stock_txt\"|trans }}\",
\"Add to Cart\": \"{{ \"add_to_cart_txt\"|trans }}\",
\"Ratings\": \"{{ \"ratings_txt\"|trans }}\",
\"Saved\": \"{{ \"save_money_txt\"|trans }}\",
\"Please type correct email address\": \"{{ \"enter_correct_email_msg\"|trans }}\",
\"Please login first\": \"{{ \"please_login_first_msg\"|trans }}\",
\"Price not found\": \"{{ \"price_not_found_msg\"|trans }}\",
}
}
var APP_DOM = {
modals: {},
tooltips: {
refresh: () => {
}
}
}
var APP_DATA = {
cart: {}
}
</script>", "fe/_global_variables.html.twig", "/var/www/esorus-shop/templates/fe/_global_variables.html.twig");
}
}