Phalcon Framework 5.11.0

ParseError: Unclosed '{' on line 29

/srv/sites/simplyfit.shtest.pl/cache/_srv_sites_simplyfit.shtest.pl_themes_simplyfit_layouts_headers_default.twig.php (31)
# Phalcon\Mvc\View\Engine\Volt -> render
# Phalcon\Mvc\View -> engineRender
# Phalcon\Mvc\View -> partial
# Phalcon\Mvc\View\Engine\AbstractEngine -> partial
/srv/sites/simplyfit.shtest.pl/cache/_srv_sites_simplyfit.shtest.pl_themes_simplyfit_articles_frontend_index.twig.php (60)
<!DOCTYPE html>
<html lang="pl">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0, maximum-scale=2.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <meta name="description" content="Tworzymy brandy, strony i aplikacje, które są skuteczne. Naszą specjalnością jest projektowanie intuicyjnych interfejsów i user experience. Dbamy, aby każdy detal wspierał Twoje cele biznesowe i budował pozytywne emocje użytkowników.">
 
  <meta property="og:image" content="/assets/img/og-assets/link-og.png">
  <meta property="og:type" content="website">
  <meta property="og:title" content="Simplyfit">
  <meta property="og:description" content="Simplyfit">
 
  <title> Artykuły | Simplyfit </title>
 
  <link rel="apple-touch-icon" sizes="180x180" href="/assets/favicon/apple-touch-icon.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon/favicon-32x32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon/favicon-16x16.png">
 
  <link rel="preload" href="/assets/fonts/dm-sans/DMSans-VariableFont.woff2" as="font" type="font/woff2" crossorigin>
  <link rel="preload" href="/assets/fonts/dm-sans/DMSans-Italic-VariableFont.woff2" as="font" type="font/woff2" crossorigin>
  <link rel="preload" href="/assets/css/global.min.css?v=1" as="style" fetchpriority="high">
 
  <!-- critical css -->
  <style>
    @font-face {
      font-family: 'DM Sans';
      src: url('/assets/fonts/dm-sans/DMSans-VariableFont.woff2') format('woff2 supports variations'), url('/assets/fonts/dm-sans/DMSans-VariableFont.woff2') format('woff2-variations');
      font-weight: 100 1000;
      font-style: normal;
      font-display: swap;
    }
 
    @font-face {
      font-family: 'DM Sans';
      src: url('/assets/fonts/dm-sans/DMSans-Italic-VariableFont.woff2') format('woff2 supports variations'), url('/assets/fonts/dm-sans/DMSans-Italic-VariableFont.woff2') format('woff2-variations');
      font-weight: 100 1000;
      font-style: italic;
      font-display: swap;
    }
 
    .keen-slider:not([data-keen-slider-disabled]) {overflow: hidden; position: relative; touch-action: pan-y; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; -webkit-user-select: none; user-select: none; display: flex; align-content: flex-start; width: 100%; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;}
    .keen-slider:not([data-keen-slider-disabled]) .keen-slider__slide {overflow: hidden; position: relative; width: 100%; min-height: 100%;}
    .keen-slider:not([data-keen-slider-disabled])[data-keen-slider-reverse] {flex-direction: row-reverse;}
    .keen-slider:not([data-keen-slider-disabled])[data-keen-slider-v] {flex-wrap: wrap;}
    .keen-slider__slide {min-width: calc(100% + 0px); max-width: calc(100% + 0px); transform: translate3d(0, 0, 0);}
  </style>
  <!-- end of critical css -->
 
  <link rel="stylesheet" href="/assets/css/global.min.css?v=1">
  
  <link rel="stylesheet" href="/assets/css/pages/page-article-listing.css?v=1">
 
</head>
 
<body class="page-body">
<?= $this->system->getFrontMessages() ?>
 
 
  <?= $this->partial('layouts/headers/default') ?>
 
 
<div class="global-popup-cart">
  <div class="wrapper">
    <div class="top">
      <div class="title f-32">Dodano do koszyka</div>
      <a href="#" class="btn-close">
        <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
          <rect x="1" y="1" width="38" height="38" rx="19" stroke="#494949" stroke-width="2"/>
          <path d="M13.9999 26L25.9999 14M13.9999 14L25.9999 26" stroke="#494949" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
        </svg>
      </a>
    </div>
    <div class="middle cart-items f-14"></div>
    <div class="bottom">
      <div class="total f-18">
        Suma: <span class="f-32 summary-price"></span>
      </div>
      <a href="<?= $this->url->get(['for' => 'sale-cart']) ?>" class="global-btn-primary">
        <span class="btn-text f-24">Przejdź do koszyka</span>
      </a>
    </div>
  </div>
</div>
 
<dialog class="popup_overlay choose-cart-subs">
  <div class="popup_wrapper">
    <form class="choose-cart-kcal" method="post">
      <div class="cart-kcal-top">
        <div class="cart-kcal-title">Zakup jadłospisu lub paczki</div>
        <a href="#" class="cart-kcal-close">
          <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
            <rect x="1" y="1" width="38" height="38" rx="19" stroke="#494949" stroke-width="2"/>
            <path d="M14 26L26 14M14 14L26 26" stroke="#494949" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
          </svg>
        </a>
      </div>
      <div class="cart-kcal-body-text">
        <svg width="20" height="23" viewBox="0 0 20 23" fill="none" xmlns="http://www.w3.org/2000/svg">
          <path d="M14.174 2.78022C13.4643 2.14082 12.7202 1.46879 11.9627 0.736369C11.3815 0.174571 10.5967 -0.0857919 9.81806 0.0250668C9.06354 0.131027 8.39223 0.587539 7.9855 1.27129C6.91046 3.18092 6.15037 5.27178 5.73806 7.45363C5.57628 7.20531 5.43276 6.94414 5.30877 6.67232C4.88163 5.71571 3.80583 5.30827 2.90589 5.76231C2.688 5.87222 2.49308 6.02748 2.33265 6.21886C0.819938 7.86202 -0.0186604 10.0754 0.000447676 12.3743C-0.0425455 17.2065 3.01521 21.449 7.41552 22.6626C8.23425 22.8815 9.07483 22.9948 9.91905 23C9.94611 23 10.2338 22.9971 10.3501 22.9885C15.7342 22.8031 20.0067 18.1062 20 12.3801C19.9964 8.03745 17.2981 5.60247 14.174 2.78022ZM9.89652 21.076C9.22533 21.0217 8.56204 20.7327 8.06126 20.3033C7.27707 19.7135 6.75815 18.8485 6.63454 17.8521C6.48121 16.2971 7.38309 14.2638 9.22558 11.9669C9.41878 11.7271 9.70142 11.5896 9.99849 11.5911C10.2917 11.5889 10.5705 11.726 10.7587 11.965C12.447 14.0951 13.3741 16.0603 13.3741 17.4993C13.3689 19.3897 11.9788 20.8852 10.2086 21.0674C10.1309 21.0754 9.99844 21.0875 9.89652 21.076ZM15.0272 19.2526C14.974 19.2967 14.9154 19.3322 14.8613 19.3744C15.0694 18.7732 15.1765 18.1379 15.1778 17.4973C15.1778 15.0748 13.5229 12.4788 12.1359 10.7274C11.6052 10.0593 10.8247 9.67355 10.0021 9.67283H9.99844C9.17422 9.67125 8.39083 10.0543 7.85564 10.7206C5.6506 13.4662 4.63783 15.9328 4.84523 18.0523C4.89448 18.5444 5.01272 19.0258 5.19606 19.4807C3.05452 17.8313 1.79267 15.1854 1.80688 12.3743C1.78946 10.5481 2.46695 8.79189 3.68543 7.50436C3.89346 7.96407 4.14326 8.40103 4.43128 8.8091C4.82684 9.37755 5.5026 9.64133 6.1502 9.48014C6.81048 9.32488 7.32315 8.77131 7.45881 8.06711C7.82114 6.0313 8.51355 4.0779 9.5051 2.29414C9.6271 2.09022 9.82863 1.95514 10.0543 1.92602C10.3066 1.88994 10.5609 1.97455 10.7488 2.15704C11.5226 2.90479 12.2819 3.59501 13.0034 4.24403C16.0138 6.9618 18.19 8.92513 18.19 12.3801C18.1977 15.0688 17.0301 17.6088 15.0299 19.2545L15.0272 19.2526Z" fill="#6B27FF"/>
        </svg>
        <span>Aby dokonać zakupu - wybierz kaloryczność:</span>
      </div>
      <div class="cart-kcal-subs"></div>
      <div class="cart-kcal-valid">Prosimy wybrać kaloryczność</div>
      <div class="cart-kcal-btn">
        <a href="#" class="cart-kcal-submit">
          <svg width="552" height="65" viewBox="0 0 552 65" fill="none" xmlns="http://www.w3.org/2000/svg">
            <path d="M437.519 0C445.022 2.39862e-05 452.374 2.10838 458.736 6.08496L464.538 9.71094C474.534 15.9583 487.337 15.6779 497.05 9L542.356 9.98633C542.748 9.99493 543.099 10.2314 543.254 10.5918L551.842 30.6309C551.943 30.8677 551.95 31.1347 551.859 31.376L543.237 54.3662C543.094 54.7489 542.732 55.0057 542.323 55.0146L497.05 56C487.337 49.3221 474.534 49.0417 464.538 55.2891L458.736 58.915C452.374 62.8916 445.022 65 437.519 65H32.5C14.5507 65 0 50.4493 0 32.5C0 14.5507 14.5507 1.85236e-07 32.5 0H437.519Z" fill="#9FC119"/>
            <path d="M552 32.5C552 50.4493 537.449 65 519.5 65C501.551 65 487 50.4493 487 32.5C487 14.5507 501.551 0 519.5 0C537.449 0 552 14.5507 552 32.5Z" fill="#9FC119"/>
            <path d="M520.732 29.2824C520.488 29.2823 520.254 29.1868 520.081 29.0168C519.908 28.8467 519.811 28.6161 519.811 28.3756V21.7259C519.811 21.4854 519.908 21.2547 520.081 21.0847C520.254 20.9146 520.488 20.8191 520.732 20.8191C520.976 20.8191 521.21 20.9146 521.382 21.0847C521.555 21.2547 521.652 21.4854 521.652 21.7259V28.3756C521.652 28.6161 521.555 28.8467 521.382 29.0168C521.21 29.1868 520.976 29.2823 520.732 29.2824Z" fill="black"/>
            <path d="M524.106 25.9575H517.358C517.114 25.9575 516.879 25.862 516.707 25.6919C516.534 25.5219 516.437 25.2912 516.437 25.0508C516.437 24.8103 516.534 24.5796 516.707 24.4096C516.879 24.2395 517.114 24.144 517.358 24.144H524.106C524.35 24.144 524.584 24.2395 524.756 24.4096C524.929 24.5796 525.026 24.8103 525.026 25.0508C525.026 25.2912 524.929 25.5219 524.756 25.6919C524.584 25.862 524.35 25.9575 524.106 25.9575Z" fill="black"/>
            <path d="M529.013 41.3729H513.063C512.168 41.3729 511.31 41.0226 510.678 40.399C510.045 39.7755 509.689 38.9298 509.689 38.048C509.689 37.1662 510.045 36.3205 510.678 35.6969C511.31 35.0734 512.168 34.7231 513.063 34.7231H526.56C526.804 34.7231 527.038 34.8187 527.21 34.9887C527.383 35.1588 527.48 35.3894 527.48 35.6299C527.48 35.8704 527.383 36.101 527.21 36.2711C527.038 36.4411 526.804 36.5367 526.56 36.5367H513.063C512.657 36.5367 512.266 36.6959 511.979 36.9793C511.691 37.2628 511.53 37.6472 511.53 38.048C511.53 38.4488 511.691 38.8332 511.979 39.1166C512.266 39.4001 512.657 39.5593 513.063 39.5593H529.013C529.257 39.5593 529.491 39.6548 529.664 39.8249C529.837 39.9949 529.934 40.2256 529.934 40.4661C529.934 40.7066 529.837 40.9372 529.664 41.1073C529.491 41.2773 529.257 41.3729 529.013 41.3729Z" fill="black"/>
            <path d="M515.517 45C514.971 45 514.437 44.8405 513.983 44.5415C513.53 44.2426 513.176 43.8178 512.967 43.3207C512.758 42.8236 512.703 42.2766 512.81 41.7489C512.916 41.2212 513.179 40.7365 513.565 40.3561C513.951 39.9756 514.443 39.7165 514.979 39.6116C515.514 39.5066 516.069 39.5605 516.574 39.7664C517.078 39.9723 517.509 40.3209 517.813 40.7683C518.116 41.2157 518.278 41.7416 518.278 42.2796C518.277 43.0009 517.986 43.6923 517.468 44.2022C516.951 44.7122 516.249 44.9991 515.517 45ZM515.517 41.3729C515.335 41.3729 515.157 41.426 515.006 41.5257C514.855 41.6253 514.737 41.7669 514.667 41.9326C514.597 42.0983 514.579 42.2807 514.615 42.4566C514.65 42.6325 514.738 42.794 514.867 42.9208C514.995 43.0477 515.159 43.134 515.338 43.169C515.516 43.204 515.701 43.186 515.869 43.1174C516.037 43.0488 516.181 42.9326 516.282 42.7834C516.383 42.6343 516.437 42.459 516.437 42.2796C516.437 42.0393 516.34 41.8088 516.167 41.6389C515.995 41.4689 515.761 41.3732 515.517 41.3729Z" fill="black"/>
            <path d="M525.946 45C525.4 45 524.866 44.8405 524.412 44.5415C523.958 44.2426 523.605 43.8178 523.396 43.3207C523.187 42.8236 523.132 42.2766 523.239 41.7489C523.345 41.2212 523.608 40.7365 523.994 40.3561C524.38 39.9756 524.872 39.7165 525.407 39.6116C525.943 39.5066 526.498 39.5605 527.002 39.7664C527.507 39.9723 527.938 40.3209 528.241 40.7683C528.545 41.2157 528.707 41.7416 528.707 42.2796C528.706 43.0009 528.415 43.6923 527.897 44.2022C527.38 44.7122 526.678 44.9991 525.946 45ZM525.946 41.3729C525.764 41.3729 525.586 41.426 525.435 41.5257C525.283 41.6253 525.166 41.7669 525.096 41.9326C525.026 42.0983 525.008 42.2807 525.044 42.4566C525.079 42.6325 525.167 42.794 525.295 42.9208C525.424 43.0477 525.588 43.134 525.767 43.169C525.945 43.204 526.13 43.186 526.298 43.1174C526.466 43.0488 526.61 42.9326 526.711 42.7834C526.812 42.6343 526.866 42.459 526.866 42.2796C526.866 42.0393 526.769 41.8088 526.596 41.6389C526.424 41.4689 526.19 41.3732 525.946 41.3729Z" fill="black"/>
            <path d="M526.534 36.5367H514.087C513.584 36.5368 513.097 36.3631 512.712 36.0458C512.326 35.7285 512.065 35.2878 511.975 34.8005L510.145 24.9108C510.102 24.6744 510.156 24.4308 510.295 24.2335C510.434 24.0362 510.646 23.9013 510.886 23.8583C511.126 23.8154 511.373 23.8678 511.574 24.0043C511.774 24.1407 511.912 24.3499 511.956 24.5861L513.786 34.4752C513.799 34.5446 513.836 34.6075 513.891 34.6528C513.946 34.6981 514.015 34.723 514.087 34.7231H526.534C526.87 34.7222 527.195 34.6135 527.462 34.4137C527.729 34.2138 527.922 33.9336 528.013 33.6156L530.148 26.0384C530.161 25.9936 530.163 25.9464 530.154 25.9006C530.146 25.8547 530.126 25.8116 530.098 25.7744C530.069 25.7373 530.032 25.7072 529.99 25.6865C529.947 25.6658 529.901 25.6551 529.853 25.6553H529.013C528.769 25.6553 528.535 25.5597 528.363 25.3897C528.19 25.2196 528.093 24.989 528.093 24.7485C528.093 24.508 528.19 24.2774 528.363 24.1073C528.535 23.9372 528.769 23.8417 529.013 23.8417H529.853C530.184 23.8418 530.511 23.9173 530.807 24.0623C531.104 24.2073 531.363 24.418 531.563 24.6778C531.763 24.9376 531.9 25.2395 531.962 25.5599C532.024 25.8803 532.01 26.2106 531.921 26.5249L529.786 34.1015C529.587 34.8009 529.162 35.4171 528.575 35.8566C527.988 36.2961 527.272 36.5349 526.534 36.5367Z" fill="black"/>
            <path d="M513.062 36.5367C512.847 36.5363 512.638 36.4616 512.473 36.3256C512.308 36.1896 512.196 36.0009 512.157 35.7923L509.797 22.9975C509.79 22.9576 509.774 22.9196 509.752 22.8857C509.729 22.8518 509.7 22.8228 509.665 22.8003L506.418 20.6668C506.316 20.6013 506.228 20.5166 506.16 20.4176C506.091 20.3185 506.043 20.207 506.019 20.0895C505.994 19.972 505.994 19.851 506.017 19.7333C506.04 19.6156 506.087 19.5036 506.155 19.4038C506.222 19.304 506.309 19.2184 506.41 19.152C506.512 19.0855 506.625 19.0395 506.745 19.0166C506.864 18.9938 506.987 18.9945 507.106 19.0187C507.225 19.043 507.339 19.0903 507.439 19.1579L510.686 21.2914C510.925 21.4493 511.13 21.6527 511.288 21.8898C511.447 22.1268 511.555 22.3927 511.607 22.6716L513.969 35.4676C514.013 35.7043 513.959 35.9484 513.82 36.1461C513.681 36.3438 513.468 36.479 513.227 36.5219C513.173 36.5318 513.117 36.5368 513.062 36.5367Z" fill="black"/>
            <path d="M142.006 41V24.2H147.838C149.79 24.2 151.406 24.552 152.686 25.256C153.966 25.944 154.91 26.92 155.518 28.184C156.142 29.432 156.454 30.904 156.454 32.6C156.454 34.296 156.142 35.776 155.518 37.04C154.91 38.288 153.966 39.264 152.686 39.968C151.422 40.656 149.806 41 147.838 41H142.006ZM145.246 38.216H147.67C149.046 38.216 150.134 37.992 150.934 37.544C151.734 37.096 152.302 36.456 152.638 35.624C152.974 34.776 153.142 33.768 153.142 32.6C153.142 31.416 152.974 30.408 152.638 29.576C152.302 28.728 151.734 28.08 150.934 27.632C150.134 27.184 149.046 26.96 147.67 26.96H145.246V38.216ZM164.803 41.288C163.667 41.288 162.635 41.024 161.707 40.496C160.795 39.968 160.067 39.232 159.523 38.288C158.979 37.344 158.707 36.264 158.707 35.048C158.707 33.816 158.979 32.736 159.523 31.808C160.067 30.864 160.803 30.128 161.731 29.6C162.659 29.072 163.691 28.808 164.827 28.808C165.979 28.808 167.019 29.072 167.947 29.6C168.875 30.128 169.603 30.864 170.131 31.808C170.675 32.736 170.947 33.816 170.947 35.048C170.947 36.28 170.675 37.368 170.131 38.312C169.587 39.24 168.851 39.968 167.923 40.496C167.011 41.024 165.971 41.288 164.803 41.288ZM164.827 38.48C165.339 38.48 165.803 38.352 166.219 38.096C166.651 37.84 166.995 37.456 167.251 36.944C167.523 36.432 167.659 35.8 167.659 35.048C167.659 34.28 167.531 33.648 167.275 33.152C167.019 32.64 166.675 32.256 166.243 32C165.827 31.744 165.363 31.616 164.851 31.616C164.339 31.616 163.867 31.744 163.435 32C163.003 32.256 162.659 32.64 162.403 33.152C162.147 33.648 162.019 34.28 162.019 35.048C162.019 35.8 162.147 36.432 162.403 36.944C162.659 37.456 162.995 37.84 163.411 38.096C163.843 38.352 164.315 38.48 164.827 38.48ZM179.165 41.288C178.061 41.288 177.061 41.016 176.165 40.472C175.285 39.928 174.589 39.184 174.077 38.24C173.565 37.28 173.309 36.208 173.309 35.024C173.309 33.824 173.565 32.76 174.077 31.832C174.589 30.888 175.285 30.152 176.165 29.624C177.061 29.08 178.061 28.808 179.165 28.808C180.045 28.808 180.813 28.976 181.469 29.312C182.141 29.632 182.677 30.08 183.077 30.656V23.72H186.317V41H183.437L183.077 39.344C182.837 39.696 182.533 40.024 182.165 40.328C181.813 40.616 181.389 40.848 180.893 41.024C180.397 41.2 179.821 41.288 179.165 41.288ZM179.885 38.456C180.525 38.456 181.093 38.312 181.589 38.024C182.085 37.72 182.469 37.312 182.741 36.8C183.029 36.288 183.173 35.704 183.173 35.048C183.173 34.376 183.029 33.784 182.741 33.272C182.469 32.76 182.085 32.36 181.589 32.072C181.093 31.784 180.525 31.64 179.885 31.64C179.261 31.64 178.693 31.784 178.181 32.072C177.685 32.36 177.301 32.76 177.029 33.272C176.757 33.784 176.621 34.368 176.621 35.024C176.621 35.696 176.757 36.288 177.029 36.8C177.301 37.312 177.685 37.72 178.181 38.024C178.693 38.312 179.261 38.456 179.885 38.456ZM193.547 41.288C192.539 41.288 191.699 41.128 191.027 40.808C190.371 40.488 189.883 40.056 189.563 39.512C189.243 38.968 189.083 38.368 189.083 37.712C189.083 36.976 189.267 36.336 189.635 35.792C190.019 35.232 190.595 34.792 191.363 34.472C192.131 34.152 193.099 33.992 194.267 33.992H197.267C197.267 33.416 197.179 32.944 197.003 32.576C196.843 32.192 196.587 31.912 196.235 31.736C195.899 31.544 195.467 31.448 194.939 31.448C194.315 31.448 193.779 31.584 193.331 31.856C192.899 32.128 192.627 32.544 192.515 33.104H189.371C189.467 32.224 189.763 31.464 190.259 30.824C190.755 30.184 191.411 29.688 192.227 29.336C193.043 28.984 193.947 28.808 194.939 28.808C196.075 28.808 197.059 29 197.891 29.384C198.723 29.752 199.363 30.304 199.811 31.04C200.275 31.76 200.507 32.64 200.507 33.68V41H197.771L197.411 39.152C197.251 39.472 197.043 39.76 196.787 40.016C196.547 40.272 196.267 40.496 195.947 40.688C195.627 40.88 195.267 41.024 194.867 41.12C194.467 41.232 194.027 41.288 193.547 41.288ZM194.315 38.792C194.747 38.792 195.123 38.72 195.443 38.576C195.779 38.416 196.059 38.208 196.283 37.952C196.523 37.696 196.707 37.4 196.835 37.064C196.979 36.728 197.075 36.368 197.123 35.984H194.627C194.131 35.984 193.723 36.048 193.403 36.176C193.099 36.288 192.875 36.456 192.731 36.68C192.587 36.888 192.515 37.136 192.515 37.424C192.515 37.712 192.587 37.96 192.731 38.168C192.875 38.376 193.083 38.536 193.355 38.648C193.627 38.744 193.947 38.792 194.315 38.792ZM201.132 46.28V43.52H202.116C202.628 43.52 202.988 43.416 203.196 43.208C203.42 43 203.532 42.664 203.532 42.2V29.096H206.772V42.176C206.772 43.168 206.596 43.96 206.244 44.552C205.908 45.16 205.428 45.6 204.804 45.872C204.18 46.144 203.444 46.28 202.596 46.28H201.132ZM205.164 27.368C204.572 27.368 204.092 27.2 203.724 26.864C203.356 26.512 203.172 26.072 203.172 25.544C203.172 25.016 203.356 24.584 203.724 24.248C204.092 23.896 204.572 23.72 205.164 23.72C205.756 23.72 206.236 23.896 206.604 24.248C206.972 24.584 207.156 25.016 207.156 25.544C207.156 26.072 206.972 26.512 206.604 26.864C206.236 27.2 205.756 27.368 205.164 27.368ZM221.048 41.288C219.944 41.288 218.944 41.016 218.048 40.472C217.168 39.928 216.472 39.184 215.96 38.24C215.448 37.28 215.192 36.208 215.192 35.024C215.192 33.824 215.448 32.76 215.96 31.832C216.472 30.888 217.168 30.152 218.048 29.624C218.944 29.08 219.944 28.808 221.048 28.808C221.928 28.808 222.696 28.976 223.352 29.312C224.024 29.632 224.56 30.08 224.96 30.656V23.72H228.2V41H225.32L224.96 39.344C224.72 39.696 224.416 40.024 224.048 40.328C223.696 40.616 223.272 40.848 222.776 41.024C222.28 41.2 221.704 41.288 221.048 41.288ZM221.768 38.456C222.408 38.456 222.976 38.312 223.472 38.024C223.968 37.72 224.352 37.312 224.624 36.8C224.912 36.288 225.056 35.704 225.056 35.048C225.056 34.376 224.912 33.784 224.624 33.272C224.352 32.76 223.968 32.36 223.472 32.072C222.976 31.784 222.408 31.64 221.768 31.64C221.144 31.64 220.576 31.784 220.064 32.072C219.568 32.36 219.184 32.76 218.912 33.272C218.64 33.784 218.504 34.368 218.504 35.024C218.504 35.696 218.64 36.288 218.912 36.8C219.184 37.312 219.568 37.72 220.064 38.024C220.576 38.312 221.144 38.456 221.768 38.456ZM237.038 41.288C235.902 41.288 234.87 41.024 233.942 40.496C233.03 39.968 232.302 39.232 231.758 38.288C231.214 37.344 230.942 36.264 230.942 35.048C230.942 33.816 231.214 32.736 231.758 31.808C232.302 30.864 233.038 30.128 233.966 29.6C234.894 29.072 235.926 28.808 237.062 28.808C238.214 28.808 239.254 29.072 240.182 29.6C241.11 30.128 241.838 30.864 242.366 31.808C242.91 32.736 243.182 33.816 243.182 35.048C243.182 36.28 242.91 37.368 242.366 38.312C241.822 39.24 241.086 39.968 240.158 40.496C239.246 41.024 238.206 41.288 237.038 41.288ZM237.062 38.48C237.574 38.48 238.038 38.352 238.454 38.096C238.886 37.84 239.23 37.456 239.486 36.944C239.758 36.432 239.894 35.8 239.894 35.048C239.894 34.28 239.766 33.648 239.51 33.152C239.254 32.64 238.91 32.256 238.478 32C238.062 31.744 237.598 31.616 237.086 31.616C236.574 31.616 236.102 31.744 235.67 32C235.238 32.256 234.894 32.64 234.638 33.152C234.382 33.648 234.254 34.28 234.254 35.048C234.254 35.8 234.382 36.432 234.638 36.944C234.894 37.456 235.23 37.84 235.646 38.096C236.078 38.352 236.55 38.48 237.062 38.48ZM259.496 41L254.312 34.448L258.896 29.096H262.736L256.784 35.792V33.224L263.528 41H259.496ZM251.552 41V23.72H254.792V41H251.552ZM270.131 41.288C268.995 41.288 267.963 41.024 267.035 40.496C266.123 39.968 265.395 39.232 264.851 38.288C264.307 37.344 264.035 36.264 264.035 35.048C264.035 33.816 264.307 32.736 264.851 31.808C265.395 30.864 266.131 30.128 267.059 29.6C267.987 29.072 269.019 28.808 270.155 28.808C271.307 28.808 272.347 29.072 273.275 29.6C274.203 30.128 274.931 30.864 275.459 31.808C276.003 32.736 276.275 33.816 276.275 35.048C276.275 36.28 276.003 37.368 275.459 38.312C274.915 39.24 274.179 39.968 273.251 40.496C272.339 41.024 271.299 41.288 270.131 41.288ZM270.155 38.48C270.667 38.48 271.131 38.352 271.547 38.096C271.979 37.84 272.323 37.456 272.579 36.944C272.851 36.432 272.987 35.8 272.987 35.048C272.987 34.28 272.859 33.648 272.603 33.152C272.347 32.64 272.003 32.256 271.571 32C271.155 31.744 270.691 31.616 270.179 31.616C269.667 31.616 269.195 31.744 268.763 32C268.331 32.256 267.987 32.64 267.731 33.152C267.475 33.648 267.347 34.28 267.347 35.048C267.347 35.8 267.475 36.432 267.731 36.944C267.987 37.456 268.323 37.84 268.739 38.096C269.171 38.352 269.643 38.48 270.155 38.48ZM283.965 41.288C282.909 41.288 281.973 41.112 281.157 40.76C280.357 40.408 279.709 39.928 279.213 39.32C278.733 38.696 278.453 37.992 278.373 37.208H281.613C281.677 37.496 281.813 37.768 282.021 38.024C282.229 38.264 282.493 38.456 282.813 38.6C283.133 38.744 283.501 38.816 283.917 38.816C284.365 38.816 284.717 38.76 284.973 38.648C285.245 38.52 285.445 38.36 285.573 38.168C285.717 37.96 285.789 37.752 285.789 37.544C285.789 37.224 285.685 36.984 285.477 36.824C285.285 36.648 285.005 36.504 284.637 36.392C284.269 36.28 283.829 36.16 283.317 36.032C282.789 35.904 282.253 35.76 281.709 35.6C281.181 35.44 280.693 35.24 280.245 35C279.797 34.744 279.437 34.424 279.165 34.04C278.893 33.656 278.757 33.168 278.757 32.576C278.757 31.872 278.949 31.24 279.333 30.68C279.733 30.104 280.293 29.648 281.013 29.312C281.749 28.976 282.621 28.808 283.629 28.808C285.069 28.808 286.213 29.136 287.061 29.792C287.925 30.448 288.429 31.352 288.573 32.504H285.525C285.445 32.12 285.237 31.824 284.901 31.616C284.581 31.408 284.157 31.304 283.629 31.304C283.069 31.304 282.637 31.408 282.333 31.616C282.045 31.824 281.901 32.08 281.901 32.384C281.901 32.608 282.005 32.8 282.213 32.96C282.421 33.12 282.709 33.264 283.077 33.392C283.461 33.504 283.901 33.616 284.397 33.728C285.261 33.936 286.037 34.16 286.725 34.4C287.413 34.624 287.965 34.96 288.381 35.408C288.813 35.856 289.029 36.512 289.029 37.376C289.045 38.112 288.845 38.776 288.429 39.368C288.013 39.96 287.429 40.432 286.677 40.784C285.925 41.12 285.021 41.288 283.965 41.288ZM290.932 41V38.408L296.932 31.784H291.004V29.096H300.628V31.688L294.556 38.312H300.748V41H290.932ZM304.838 46.28L307.814 39.656H307.094L302.222 29.096H305.75L309.23 36.728L312.35 29.096H315.806L308.27 46.28H304.838ZM325.731 41L320.547 34.448L325.131 29.096H328.971L323.019 35.792V33.224L329.763 41H325.731ZM317.787 41V23.72H321.027V41H317.787ZM335.297 41.288C334.289 41.288 333.449 41.128 332.777 40.808C332.121 40.488 331.633 40.056 331.313 39.512C330.993 38.968 330.833 38.368 330.833 37.712C330.833 36.976 331.017 36.336 331.385 35.792C331.769 35.232 332.345 34.792 333.113 34.472C333.881 34.152 334.849 33.992 336.017 33.992H339.017C339.017 33.416 338.929 32.944 338.753 32.576C338.593 32.192 338.337 31.912 337.985 31.736C337.649 31.544 337.217 31.448 336.689 31.448C336.065 31.448 335.529 31.584 335.081 31.856C334.649 32.128 334.377 32.544 334.265 33.104H331.121C331.217 32.224 331.513 31.464 332.009 30.824C332.505 30.184 333.161 29.688 333.977 29.336C334.793 28.984 335.697 28.808 336.689 28.808C337.825 28.808 338.809 29 339.641 29.384C340.473 29.752 341.113 30.304 341.561 31.04C342.025 31.76 342.257 32.64 342.257 33.68V41H339.521L339.161 39.152C339.001 39.472 338.793 39.76 338.537 40.016C338.297 40.272 338.017 40.496 337.697 40.688C337.377 40.88 337.017 41.024 336.617 41.12C336.217 41.232 335.777 41.288 335.297 41.288ZM336.065 38.792C336.497 38.792 336.873 38.72 337.193 38.576C337.529 38.416 337.809 38.208 338.033 37.952C338.273 37.696 338.457 37.4 338.585 37.064C338.729 36.728 338.825 36.368 338.873 35.984H336.377C335.881 35.984 335.473 36.048 335.153 36.176C334.849 36.288 334.625 36.456 334.481 36.68C334.337 36.888 334.265 37.136 334.265 37.424C334.265 37.712 334.337 37.96 334.481 38.168C334.625 38.376 334.833 38.536 335.105 38.648C335.377 38.744 335.697 38.792 336.065 38.792Z" fill="black"/>
          </svg>
        </a>
      </div>
      <a href="#" class="cart-kcal-btm">
        <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
          <rect x="1" y="1" width="38" height="38" rx="19" stroke="#494949" stroke-width="2"/>
          <path d="M18.5529 23.1302C17.8625 23.1302 17.298 22.5796 17.2808 21.8894L17.242 20.3399C17.2292 19.8282 17.6405 19.4065 18.1523 19.4065H18.2194C18.8245 19.4065 19.3908 19.3755 19.9183 19.3135C20.4614 19.2359 20.9346 19.0962 21.338 18.8945C21.7414 18.6773 22.0594 18.3825 22.2921 18.0102C22.5249 17.6223 22.6412 17.1258 22.6412 16.5207C22.6412 15.9777 22.5326 15.52 22.3154 15.1476C22.0982 14.7753 21.7879 14.4882 21.3845 14.2865C20.9966 14.0848 20.5312 13.984 19.9881 13.984C19.4451 13.984 18.9719 14.0848 18.5685 14.2865C18.1651 14.4882 17.8548 14.7753 17.6376 15.1476C17.6283 15.1637 17.6191 15.1798 17.6102 15.1961C17.2574 15.8382 16.7179 16.4742 15.9852 16.4742C15.2526 16.4742 14.6353 15.8701 14.8196 15.161C14.9282 14.7432 15.0918 14.3508 15.3103 13.984C15.7448 13.2548 16.3654 12.6885 17.1721 12.2851C17.9789 11.8662 18.9254 11.6567 20.0114 11.6567C21.0509 11.6567 21.9741 11.8507 22.7809 12.2385C23.5877 12.6264 24.216 13.185 24.666 13.9142C25.1159 14.6279 25.3409 15.4967 25.3409 16.5207C25.3409 17.6068 25.1081 18.4989 24.6427 19.1971C24.1772 19.8953 23.5256 20.415 22.6878 20.7564C21.8655 21.0977 20.9191 21.2684 19.8485 21.2684L19.8246 21.9053C19.799 22.5891 19.2372 23.1302 18.5529 23.1302ZM18.5452 28.3433C18.0332 28.3433 17.6066 28.1804 17.2652 27.8545C16.9394 27.5287 16.7765 27.1408 16.7765 26.6909C16.7765 26.2099 16.9394 25.8065 17.2652 25.4807C17.6066 25.1549 18.0332 24.992 18.5452 24.992C19.0728 24.992 19.4994 25.1549 19.8252 25.4807C20.1511 25.8065 20.314 26.2099 20.314 26.6909C20.314 27.1408 20.1511 27.5287 19.8252 27.8545C19.4994 28.1804 19.0728 28.3433 18.5452 28.3433Z" fill="#494949"/>
        </svg>
        <span>Nie wiesz, ile kcal wybrać?</span>
      </a>
    </form>
  </div>
</dialog>
 
<script>
  let popupToggleLock = false;
 
  function openCart() {
    if (popupToggleLock) {
      return;
    }
 
    popupToggleLock = true;
    document.querySelector('.global-popup-cart').style = "display: flex";
    setTimeout(() => {
      popupToggleLock = false;
      document.querySelector('.global-popup-cart').classList.add('active');
    }, 1);
  }
 
  function closeCart() {
    if (popupToggleLock) {
      return;
    }
 
    popupToggleLock = true;
    document.querySelector('.global-popup-cart').classList.remove('active');
    setTimeout(() => {
      document.querySelector('.global-popup-cart').style = "display: none";
      popupToggleLock = false;
    }, 800);
  }
 
  document.querySelector('.global-popup-cart .btn-close').onclick = function (e) {
    e.preventDefault();
    closeCart();
  }
 
  const html = {
    group: `<div class="group">
        <div class="provider">od {profile}</div>
        <div class="items"></div>
      </div>`,
    item_menu: `<div class="item">
        <picture class="picture">
          <source srcset="{photo_webp}" type="image/webp">
          <source srcset="{photo_png}" type="image/png">
          <img class="img" src="{photo_png}" alt="" width="177" height="100" loading="lazy">
        </picture>
        <div class="right">
          <div class="top">
            <div class="left">
              <div class="category">GOTOWY JADŁOSPIS</div>
              <div class="name f-16">{name}</div>
            </div>
            <a href="#" class="remove-from-cart" data-id="{id}" data-mid="{mid}">
              <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
                <rect width="36" height="36" rx="18" fill="white"/>
                <g opacity="0.5">
                  <path fill-rule="evenodd" clip-rule="evenodd" d="M16.2896 8.73891H19.671C19.8874 8.73877 20.0759 8.73865 20.2539 8.76708C20.9572 8.87939 21.5658 9.31804 21.8948 9.94973C21.978 10.1096 22.0375 10.2885 22.1058 10.4938L22.2175 10.8287C22.2364 10.8854 22.2418 10.9015 22.2463 10.9141C22.4215 11.3982 22.8755 11.7255 23.3901 11.7385C23.4037 11.7389 23.4202 11.7389 23.4803 11.7389H26.4803C26.8945 11.7389 27.2303 12.0747 27.2303 12.4889C27.2303 12.9031 26.8945 13.2389 26.4803 13.2389H9.48022C9.06601 13.2389 8.73022 12.9031 8.73022 12.4889C8.73022 12.0747 9.06601 11.7389 9.48022 11.7389H12.4803C12.5404 11.7389 12.5569 11.7389 12.5705 11.7385C13.0851 11.7255 13.5391 11.3983 13.7142 10.9141C13.7189 10.9014 13.7241 10.8857 13.7431 10.8287L13.8547 10.4939C13.923 10.2885 13.9826 10.1096 14.0658 9.94973C14.3948 9.31804 15.0034 8.87939 15.7067 8.76708C15.8847 8.73865 16.0732 8.73877 16.2896 8.73891ZM14.9884 11.7389C15.0399 11.6379 15.0855 11.5329 15.1248 11.4244C15.1367 11.3914 15.1484 11.3563 15.1634 11.3112L15.2632 11.0118C15.3544 10.7383 15.3754 10.6825 15.3962 10.6425C15.5059 10.432 15.7088 10.2858 15.9432 10.2483C15.9877 10.2412 16.0472 10.2389 16.3355 10.2389H19.625C19.9133 10.2389 19.9729 10.2412 20.0174 10.2483C20.2518 10.2858 20.4547 10.432 20.5644 10.6425C20.5852 10.6825 20.6062 10.7383 20.6973 11.0118L20.7971 11.3111L20.8358 11.4244C20.8751 11.533 20.9207 11.6379 20.9722 11.7389H14.9884Z" fill="#494949"/>
                  <path d="M11.8953 14.939C11.8678 14.5257 11.5104 14.213 11.0971 14.2406C10.6838 14.2681 10.3711 14.6255 10.3986 15.0388L10.8621 21.9905C10.9476 23.2733 11.0166 24.3094 11.1786 25.1225C11.347 25.9678 11.6334 26.6739 12.225 27.2273C12.8166 27.7808 13.5402 28.0196 14.3948 28.1314C15.2168 28.2389 16.2552 28.2389 17.5408 28.2389H18.4197C19.7053 28.2389 20.7437 28.2389 21.5658 28.1314C22.4204 28.0196 23.144 27.7808 23.7356 27.2273C24.3272 26.6739 24.6136 25.9678 24.782 25.1225C24.944 24.3094 25.013 23.2733 25.0985 21.9905L25.562 15.0388C25.5895 14.6255 25.2768 14.2681 24.8635 14.2406C24.4502 14.213 24.0928 14.5257 24.0653 14.939L23.6053 21.8381C23.5155 23.186 23.4515 24.1238 23.3109 24.8294C23.1745 25.5139 22.9842 25.8762 22.7108 26.132C22.4374 26.3877 22.0632 26.5536 21.3712 26.6441C20.6578 26.7374 19.7178 26.7389 18.367 26.7389H17.5936C16.2428 26.7389 15.3028 26.7374 14.5894 26.6441C13.8974 26.5536 13.5232 26.3877 13.2498 26.132C12.9764 25.8762 12.7861 25.5139 12.6497 24.8294C12.5091 24.1238 12.4451 23.186 12.3553 21.8381L11.8953 14.939Z" fill="#494949"/>
                  <path d="M15.4057 16.7426C15.8178 16.7014 16.1854 17.0021 16.2266 17.4143L16.7266 22.4143C16.7678 22.8264 16.4671 23.194 16.0549 23.2352C15.6428 23.2764 15.2753 22.9757 15.234 22.5635L14.734 17.5635C14.6928 17.1514 14.9935 16.7838 15.4057 16.7426Z" fill="#494949"/>
                  <path d="M20.5549 16.7426C20.9671 16.7838 21.2678 17.1514 21.2266 17.5635L20.7266 22.5635C20.6854 22.9757 20.3178 23.2764 19.9057 23.2352C19.4935 23.194 19.1928 22.8264 19.234 22.4143L19.734 17.4143C19.7752 17.0021 20.1428 16.7014 20.5549 16.7426Z" fill="#494949"/>
                </g>
              </svg>
            </a>
          </div>
          <div class="bottom">
            <div class="calories f-13">
              {energy}, {days}
            </div>
            <div class="price">
              {promo}
              <div class="total f-24">
                {price}
              </div>
            </div>
          </div>
        </div>
        <div class="mobile">
          <div class="top f-16">{name}</div>
          <div class="bottom">
            <div class="price">
              {promo}
              <div class="total f-30">
                {price}
              </div>
            </div>
            <a href="#" class="remove-from-cart" data-id="{id}" data-mid="{mid}">
              <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
                <rect width="36" height="36" rx="18" fill="white"/>
                <g opacity="0.5">
                  <path fill-rule="evenodd" clip-rule="evenodd" d="M16.2896 8.73891H19.671C19.8874 8.73877 20.0759 8.73865 20.2539 8.76708C20.9572 8.87939 21.5658 9.31804 21.8948 9.94973C21.978 10.1096 22.0375 10.2885 22.1058 10.4938L22.2175 10.8287C22.2364 10.8854 22.2418 10.9015 22.2463 10.9141C22.4215 11.3982 22.8755 11.7255 23.3901 11.7385C23.4037 11.7389 23.4202 11.7389 23.4803 11.7389H26.4803C26.8945 11.7389 27.2303 12.0747 27.2303 12.4889C27.2303 12.9031 26.8945 13.2389 26.4803 13.2389H9.48022C9.06601 13.2389 8.73022 12.9031 8.73022 12.4889C8.73022 12.0747 9.06601 11.7389 9.48022 11.7389H12.4803C12.5404 11.7389 12.5569 11.7389 12.5705 11.7385C13.0851 11.7255 13.5391 11.3983 13.7142 10.9141C13.7189 10.9014 13.7241 10.8857 13.7431 10.8287L13.8547 10.4939C13.923 10.2885 13.9826 10.1096 14.0658 9.94973C14.3948 9.31804 15.0034 8.87939 15.7067 8.76708C15.8847 8.73865 16.0732 8.73877 16.2896 8.73891ZM14.9884 11.7389C15.0399 11.6379 15.0855 11.5329 15.1248 11.4244C15.1367 11.3914 15.1484 11.3563 15.1634 11.3112L15.2632 11.0118C15.3544 10.7383 15.3754 10.6825 15.3962 10.6425C15.5059 10.432 15.7088 10.2858 15.9432 10.2483C15.9877 10.2412 16.0472 10.2389 16.3355 10.2389H19.625C19.9133 10.2389 19.9729 10.2412 20.0174 10.2483C20.2518 10.2858 20.4547 10.432 20.5644 10.6425C20.5852 10.6825 20.6062 10.7383 20.6973 11.0118L20.7971 11.3111L20.8358 11.4244C20.8751 11.533 20.9207 11.6379 20.9722 11.7389H14.9884Z" fill="#494949"/>
                  <path d="M11.8953 14.939C11.8678 14.5257 11.5104 14.213 11.0971 14.2406C10.6838 14.2681 10.3711 14.6255 10.3986 15.0388L10.8621 21.9905C10.9476 23.2733 11.0166 24.3094 11.1786 25.1225C11.347 25.9678 11.6334 26.6739 12.225 27.2273C12.8166 27.7808 13.5402 28.0196 14.3948 28.1314C15.2168 28.2389 16.2552 28.2389 17.5408 28.2389H18.4197C19.7053 28.2389 20.7437 28.2389 21.5658 28.1314C22.4204 28.0196 23.144 27.7808 23.7356 27.2273C24.3272 26.6739 24.6136 25.9678 24.782 25.1225C24.944 24.3094 25.013 23.2733 25.0985 21.9905L25.562 15.0388C25.5895 14.6255 25.2768 14.2681 24.8635 14.2406C24.4502 14.213 24.0928 14.5257 24.0653 14.939L23.6053 21.8381C23.5155 23.186 23.4515 24.1238 23.3109 24.8294C23.1745 25.5139 22.9842 25.8762 22.7108 26.132C22.4374 26.3877 22.0632 26.5536 21.3712 26.6441C20.6578 26.7374 19.7178 26.7389 18.367 26.7389H17.5936C16.2428 26.7389 15.3028 26.7374 14.5894 26.6441C13.8974 26.5536 13.5232 26.3877 13.2498 26.132C12.9764 25.8762 12.7861 25.5139 12.6497 24.8294C12.5091 24.1238 12.4451 23.186 12.3553 21.8381L11.8953 14.939Z" fill="#494949"/>
                  <path d="M15.4057 16.7426C15.8178 16.7014 16.1854 17.0021 16.2266 17.4143L16.7266 22.4143C16.7678 22.8264 16.4671 23.194 16.0549 23.2352C15.6428 23.2764 15.2753 22.9757 15.234 22.5635L14.734 17.5635C14.6928 17.1514 14.9935 16.7838 15.4057 16.7426Z" fill="#494949"/>
                  <path d="M20.5549 16.7426C20.9671 16.7838 21.2678 17.1514 21.2266 17.5635L20.7266 22.5635C20.6854 22.9757 20.3178 23.2764 19.9057 23.2352C19.4935 23.194 19.1928 22.8264 19.234 22.4143L19.734 17.4143C19.7752 17.0021 20.1428 16.7014 20.5549 16.7426Z" fill="#494949"/>
                </g>
              </svg>
            </a>
          </div>
        </div>
      </div>`,
    item_pack: `<div class="item">
        <picture class="picture">
          <source srcset="{photo_webp}" type="image/webp">
          <source srcset="{photo_png}" type="image/png">
          <img class="img" src="{photo_png}" alt="" width="177" height="100" loading="lazy">
        </picture>
        <div class="right">
          <div class="top">
            <div class="left">
              <div class="category">GOTOWA PACZKA POTRAW</div>
              <div class="name f-16">{name}</div>
            </div>
            <a href="#" class="remove-from-cart" data-id="{id}" data-mid="{mid}">
              <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
                <rect width="36" height="36" rx="18" fill="white"/>
                <g opacity="0.5">
                  <path fill-rule="evenodd" clip-rule="evenodd" d="M16.2896 8.73891H19.671C19.8874 8.73877 20.0759 8.73865 20.2539 8.76708C20.9572 8.87939 21.5658 9.31804 21.8948 9.94973C21.978 10.1096 22.0375 10.2885 22.1058 10.4938L22.2175 10.8287C22.2364 10.8854 22.2418 10.9015 22.2463 10.9141C22.4215 11.3982 22.8755 11.7255 23.3901 11.7385C23.4037 11.7389 23.4202 11.7389 23.4803 11.7389H26.4803C26.8945 11.7389 27.2303 12.0747 27.2303 12.4889C27.2303 12.9031 26.8945 13.2389 26.4803 13.2389H9.48022C9.06601 13.2389 8.73022 12.9031 8.73022 12.4889C8.73022 12.0747 9.06601 11.7389 9.48022 11.7389H12.4803C12.5404 11.7389 12.5569 11.7389 12.5705 11.7385C13.0851 11.7255 13.5391 11.3983 13.7142 10.9141C13.7189 10.9014 13.7241 10.8857 13.7431 10.8287L13.8547 10.4939C13.923 10.2885 13.9826 10.1096 14.0658 9.94973C14.3948 9.31804 15.0034 8.87939 15.7067 8.76708C15.8847 8.73865 16.0732 8.73877 16.2896 8.73891ZM14.9884 11.7389C15.0399 11.6379 15.0855 11.5329 15.1248 11.4244C15.1367 11.3914 15.1484 11.3563 15.1634 11.3112L15.2632 11.0118C15.3544 10.7383 15.3754 10.6825 15.3962 10.6425C15.5059 10.432 15.7088 10.2858 15.9432 10.2483C15.9877 10.2412 16.0472 10.2389 16.3355 10.2389H19.625C19.9133 10.2389 19.9729 10.2412 20.0174 10.2483C20.2518 10.2858 20.4547 10.432 20.5644 10.6425C20.5852 10.6825 20.6062 10.7383 20.6973 11.0118L20.7971 11.3111L20.8358 11.4244C20.8751 11.533 20.9207 11.6379 20.9722 11.7389H14.9884Z" fill="#494949"/>
                  <path d="M11.8953 14.939C11.8678 14.5257 11.5104 14.213 11.0971 14.2406C10.6838 14.2681 10.3711 14.6255 10.3986 15.0388L10.8621 21.9905C10.9476 23.2733 11.0166 24.3094 11.1786 25.1225C11.347 25.9678 11.6334 26.6739 12.225 27.2273C12.8166 27.7808 13.5402 28.0196 14.3948 28.1314C15.2168 28.2389 16.2552 28.2389 17.5408 28.2389H18.4197C19.7053 28.2389 20.7437 28.2389 21.5658 28.1314C22.4204 28.0196 23.144 27.7808 23.7356 27.2273C24.3272 26.6739 24.6136 25.9678 24.782 25.1225C24.944 24.3094 25.013 23.2733 25.0985 21.9905L25.562 15.0388C25.5895 14.6255 25.2768 14.2681 24.8635 14.2406C24.4502 14.213 24.0928 14.5257 24.0653 14.939L23.6053 21.8381C23.5155 23.186 23.4515 24.1238 23.3109 24.8294C23.1745 25.5139 22.9842 25.8762 22.7108 26.132C22.4374 26.3877 22.0632 26.5536 21.3712 26.6441C20.6578 26.7374 19.7178 26.7389 18.367 26.7389H17.5936C16.2428 26.7389 15.3028 26.7374 14.5894 26.6441C13.8974 26.5536 13.5232 26.3877 13.2498 26.132C12.9764 25.8762 12.7861 25.5139 12.6497 24.8294C12.5091 24.1238 12.4451 23.186 12.3553 21.8381L11.8953 14.939Z" fill="#494949"/>
                  <path d="M15.4057 16.7426C15.8178 16.7014 16.1854 17.0021 16.2266 17.4143L16.7266 22.4143C16.7678 22.8264 16.4671 23.194 16.0549 23.2352C15.6428 23.2764 15.2753 22.9757 15.234 22.5635L14.734 17.5635C14.6928 17.1514 14.9935 16.7838 15.4057 16.7426Z" fill="#494949"/>
                  <path d="M20.5549 16.7426C20.9671 16.7838 21.2678 17.1514 21.2266 17.5635L20.7266 22.5635C20.6854 22.9757 20.3178 23.2764 19.9057 23.2352C19.4935 23.194 19.1928 22.8264 19.234 22.4143L19.734 17.4143C19.7752 17.0021 20.1428 16.7014 20.5549 16.7426Z" fill="#494949"/>
                </g>
              </svg>
            </a>
          </div>
          <div class="bottom">
            <div class="calories f-13">
              {energy}, {days}
            </div>
            <div class="price">
              {promo}
              <div class="total f-24">
                {price}
              </div>
            </div>
          </div>
        </div>
        <div class="mobile">
          <div class="top f-16">{name}</div>
          <div class="bottom">
            <div class="price">
              {promo}
              <div class="total f-30">
                {price}
              </div>
            </div>
            <a href="#" class="remove-from-cart" data-id="{id}" data-mid="{mid}">
              <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
                <rect width="36" height="36" rx="18" fill="white"/>
                <g opacity="0.5">
                  <path fill-rule="evenodd" clip-rule="evenodd" d="M16.2896 8.73891H19.671C19.8874 8.73877 20.0759 8.73865 20.2539 8.76708C20.9572 8.87939 21.5658 9.31804 21.8948 9.94973C21.978 10.1096 22.0375 10.2885 22.1058 10.4938L22.2175 10.8287C22.2364 10.8854 22.2418 10.9015 22.2463 10.9141C22.4215 11.3982 22.8755 11.7255 23.3901 11.7385C23.4037 11.7389 23.4202 11.7389 23.4803 11.7389H26.4803C26.8945 11.7389 27.2303 12.0747 27.2303 12.4889C27.2303 12.9031 26.8945 13.2389 26.4803 13.2389H9.48022C9.06601 13.2389 8.73022 12.9031 8.73022 12.4889C8.73022 12.0747 9.06601 11.7389 9.48022 11.7389H12.4803C12.5404 11.7389 12.5569 11.7389 12.5705 11.7385C13.0851 11.7255 13.5391 11.3983 13.7142 10.9141C13.7189 10.9014 13.7241 10.8857 13.7431 10.8287L13.8547 10.4939C13.923 10.2885 13.9826 10.1096 14.0658 9.94973C14.3948 9.31804 15.0034 8.87939 15.7067 8.76708C15.8847 8.73865 16.0732 8.73877 16.2896 8.73891ZM14.9884 11.7389C15.0399 11.6379 15.0855 11.5329 15.1248 11.4244C15.1367 11.3914 15.1484 11.3563 15.1634 11.3112L15.2632 11.0118C15.3544 10.7383 15.3754 10.6825 15.3962 10.6425C15.5059 10.432 15.7088 10.2858 15.9432 10.2483C15.9877 10.2412 16.0472 10.2389 16.3355 10.2389H19.625C19.9133 10.2389 19.9729 10.2412 20.0174 10.2483C20.2518 10.2858 20.4547 10.432 20.5644 10.6425C20.5852 10.6825 20.6062 10.7383 20.6973 11.0118L20.7971 11.3111L20.8358 11.4244C20.8751 11.533 20.9207 11.6379 20.9722 11.7389H14.9884Z" fill="#494949"/>
                  <path d="M11.8953 14.939C11.8678 14.5257 11.5104 14.213 11.0971 14.2406C10.6838 14.2681 10.3711 14.6255 10.3986 15.0388L10.8621 21.9905C10.9476 23.2733 11.0166 24.3094 11.1786 25.1225C11.347 25.9678 11.6334 26.6739 12.225 27.2273C12.8166 27.7808 13.5402 28.0196 14.3948 28.1314C15.2168 28.2389 16.2552 28.2389 17.5408 28.2389H18.4197C19.7053 28.2389 20.7437 28.2389 21.5658 28.1314C22.4204 28.0196 23.144 27.7808 23.7356 27.2273C24.3272 26.6739 24.6136 25.9678 24.782 25.1225C24.944 24.3094 25.013 23.2733 25.0985 21.9905L25.562 15.0388C25.5895 14.6255 25.2768 14.2681 24.8635 14.2406C24.4502 14.213 24.0928 14.5257 24.0653 14.939L23.6053 21.8381C23.5155 23.186 23.4515 24.1238 23.3109 24.8294C23.1745 25.5139 22.9842 25.8762 22.7108 26.132C22.4374 26.3877 22.0632 26.5536 21.3712 26.6441C20.6578 26.7374 19.7178 26.7389 18.367 26.7389H17.5936C16.2428 26.7389 15.3028 26.7374 14.5894 26.6441C13.8974 26.5536 13.5232 26.3877 13.2498 26.132C12.9764 25.8762 12.7861 25.5139 12.6497 24.8294C12.5091 24.1238 12.4451 23.186 12.3553 21.8381L11.8953 14.939Z" fill="#494949"/>
                  <path d="M15.4057 16.7426C15.8178 16.7014 16.1854 17.0021 16.2266 17.4143L16.7266 22.4143C16.7678 22.8264 16.4671 23.194 16.0549 23.2352C15.6428 23.2764 15.2753 22.9757 15.234 22.5635L14.734 17.5635C14.6928 17.1514 14.9935 16.7838 15.4057 16.7426Z" fill="#494949"/>
                  <path d="M20.5549 16.7426C20.9671 16.7838 21.2678 17.1514 21.2266 17.5635L20.7266 22.5635C20.6854 22.9757 20.3178 23.2764 19.9057 23.2352C19.4935 23.194 19.1928 22.8264 19.234 22.4143L19.734 17.4143C19.7752 17.0021 20.1428 16.7014 20.5549 16.7426Z" fill="#494949"/>
                </g>
              </svg>
            </a>
          </div>
        </div>
      </div>`,
    item_ebook: `<div class="item">
        <picture class="picture">
          <source srcset="{photo_webp}" type="image/webp">
          <source srcset="{photo_png}" type="image/png">
          <img class="img" src="{photo_png}" alt="" width="177" height="100" loading="lazy">
        </picture>
        <div class="right">
          <div class="top">
            <div class="left">
              <div class="category">E-BOOK</div>
              <div class="name f-16">{name}</div>
            </div>
            <a href="#" class="remove-from-cart" data-id="{id}" data-mid="{mid}">
              <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
                <rect width="36" height="36" rx="18" fill="white"/>
                <g opacity="0.5">
                  <path fill-rule="evenodd" clip-rule="evenodd" d="M16.2896 8.73891H19.671C19.8874 8.73877 20.0759 8.73865 20.2539 8.76708C20.9572 8.87939 21.5658 9.31804 21.8948 9.94973C21.978 10.1096 22.0375 10.2885 22.1058 10.4938L22.2175 10.8287C22.2364 10.8854 22.2418 10.9015 22.2463 10.9141C22.4215 11.3982 22.8755 11.7255 23.3901 11.7385C23.4037 11.7389 23.4202 11.7389 23.4803 11.7389H26.4803C26.8945 11.7389 27.2303 12.0747 27.2303 12.4889C27.2303 12.9031 26.8945 13.2389 26.4803 13.2389H9.48022C9.06601 13.2389 8.73022 12.9031 8.73022 12.4889C8.73022 12.0747 9.06601 11.7389 9.48022 11.7389H12.4803C12.5404 11.7389 12.5569 11.7389 12.5705 11.7385C13.0851 11.7255 13.5391 11.3983 13.7142 10.9141C13.7189 10.9014 13.7241 10.8857 13.7431 10.8287L13.8547 10.4939C13.923 10.2885 13.9826 10.1096 14.0658 9.94973C14.3948 9.31804 15.0034 8.87939 15.7067 8.76708C15.8847 8.73865 16.0732 8.73877 16.2896 8.73891ZM14.9884 11.7389C15.0399 11.6379 15.0855 11.5329 15.1248 11.4244C15.1367 11.3914 15.1484 11.3563 15.1634 11.3112L15.2632 11.0118C15.3544 10.7383 15.3754 10.6825 15.3962 10.6425C15.5059 10.432 15.7088 10.2858 15.9432 10.2483C15.9877 10.2412 16.0472 10.2389 16.3355 10.2389H19.625C19.9133 10.2389 19.9729 10.2412 20.0174 10.2483C20.2518 10.2858 20.4547 10.432 20.5644 10.6425C20.5852 10.6825 20.6062 10.7383 20.6973 11.0118L20.7971 11.3111L20.8358 11.4244C20.8751 11.533 20.9207 11.6379 20.9722 11.7389H14.9884Z" fill="#494949"/>
                  <path d="M11.8953 14.939C11.8678 14.5257 11.5104 14.213 11.0971 14.2406C10.6838 14.2681 10.3711 14.6255 10.3986 15.0388L10.8621 21.9905C10.9476 23.2733 11.0166 24.3094 11.1786 25.1225C11.347 25.9678 11.6334 26.6739 12.225 27.2273C12.8166 27.7808 13.5402 28.0196 14.3948 28.1314C15.2168 28.2389 16.2552 28.2389 17.5408 28.2389H18.4197C19.7053 28.2389 20.7437 28.2389 21.5658 28.1314C22.4204 28.0196 23.144 27.7808 23.7356 27.2273C24.3272 26.6739 24.6136 25.9678 24.782 25.1225C24.944 24.3094 25.013 23.2733 25.0985 21.9905L25.562 15.0388C25.5895 14.6255 25.2768 14.2681 24.8635 14.2406C24.4502 14.213 24.0928 14.5257 24.0653 14.939L23.6053 21.8381C23.5155 23.186 23.4515 24.1238 23.3109 24.8294C23.1745 25.5139 22.9842 25.8762 22.7108 26.132C22.4374 26.3877 22.0632 26.5536 21.3712 26.6441C20.6578 26.7374 19.7178 26.7389 18.367 26.7389H17.5936C16.2428 26.7389 15.3028 26.7374 14.5894 26.6441C13.8974 26.5536 13.5232 26.3877 13.2498 26.132C12.9764 25.8762 12.7861 25.5139 12.6497 24.8294C12.5091 24.1238 12.4451 23.186 12.3553 21.8381L11.8953 14.939Z" fill="#494949"/>
                  <path d="M15.4057 16.7426C15.8178 16.7014 16.1854 17.0021 16.2266 17.4143L16.7266 22.4143C16.7678 22.8264 16.4671 23.194 16.0549 23.2352C15.6428 23.2764 15.2753 22.9757 15.234 22.5635L14.734 17.5635C14.6928 17.1514 14.9935 16.7838 15.4057 16.7426Z" fill="#494949"/>
                  <path d="M20.5549 16.7426C20.9671 16.7838 21.2678 17.1514 21.2266 17.5635L20.7266 22.5635C20.6854 22.9757 20.3178 23.2764 19.9057 23.2352C19.4935 23.194 19.1928 22.8264 19.234 22.4143L19.734 17.4143C19.7752 17.0021 20.1428 16.7014 20.5549 16.7426Z" fill="#494949"/>
                </g>
              </svg>
            </a>
          </div>
          <div class="bottom">
            <div class="calories f-13">
              Format PDF
            </div>
            <div class="price">
              {promo}
              <div class="total f-24">
                {price}
              </div>
            </div>
          </div>
        </div>
        <div class="mobile">
          <div class="top f-16">{name}</div>
          <div class="bottom">
            <div class="price">
              {promo}
              <div class="total f-30">
                {price}
              </div>
            </div>
            <a href="#" class="remove-from-cart" data-id="{id}" data-mid="{mid}">
              <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
                <rect width="36" height="36" rx="18" fill="white"/>
                <g opacity="0.5">
                  <path fill-rule="evenodd" clip-rule="evenodd" d="M16.2896 8.73891H19.671C19.8874 8.73877 20.0759 8.73865 20.2539 8.76708C20.9572 8.87939 21.5658 9.31804 21.8948 9.94973C21.978 10.1096 22.0375 10.2885 22.1058 10.4938L22.2175 10.8287C22.2364 10.8854 22.2418 10.9015 22.2463 10.9141C22.4215 11.3982 22.8755 11.7255 23.3901 11.7385C23.4037 11.7389 23.4202 11.7389 23.4803 11.7389H26.4803C26.8945 11.7389 27.2303 12.0747 27.2303 12.4889C27.2303 12.9031 26.8945 13.2389 26.4803 13.2389H9.48022C9.06601 13.2389 8.73022 12.9031 8.73022 12.4889C8.73022 12.0747 9.06601 11.7389 9.48022 11.7389H12.4803C12.5404 11.7389 12.5569 11.7389 12.5705 11.7385C13.0851 11.7255 13.5391 11.3983 13.7142 10.9141C13.7189 10.9014 13.7241 10.8857 13.7431 10.8287L13.8547 10.4939C13.923 10.2885 13.9826 10.1096 14.0658 9.94973C14.3948 9.31804 15.0034 8.87939 15.7067 8.76708C15.8847 8.73865 16.0732 8.73877 16.2896 8.73891ZM14.9884 11.7389C15.0399 11.6379 15.0855 11.5329 15.1248 11.4244C15.1367 11.3914 15.1484 11.3563 15.1634 11.3112L15.2632 11.0118C15.3544 10.7383 15.3754 10.6825 15.3962 10.6425C15.5059 10.432 15.7088 10.2858 15.9432 10.2483C15.9877 10.2412 16.0472 10.2389 16.3355 10.2389H19.625C19.9133 10.2389 19.9729 10.2412 20.0174 10.2483C20.2518 10.2858 20.4547 10.432 20.5644 10.6425C20.5852 10.6825 20.6062 10.7383 20.6973 11.0118L20.7971 11.3111L20.8358 11.4244C20.8751 11.533 20.9207 11.6379 20.9722 11.7389H14.9884Z" fill="#494949"/>
                  <path d="M11.8953 14.939C11.8678 14.5257 11.5104 14.213 11.0971 14.2406C10.6838 14.2681 10.3711 14.6255 10.3986 15.0388L10.8621 21.9905C10.9476 23.2733 11.0166 24.3094 11.1786 25.1225C11.347 25.9678 11.6334 26.6739 12.225 27.2273C12.8166 27.7808 13.5402 28.0196 14.3948 28.1314C15.2168 28.2389 16.2552 28.2389 17.5408 28.2389H18.4197C19.7053 28.2389 20.7437 28.2389 21.5658 28.1314C22.4204 28.0196 23.144 27.7808 23.7356 27.2273C24.3272 26.6739 24.6136 25.9678 24.782 25.1225C24.944 24.3094 25.013 23.2733 25.0985 21.9905L25.562 15.0388C25.5895 14.6255 25.2768 14.2681 24.8635 14.2406C24.4502 14.213 24.0928 14.5257 24.0653 14.939L23.6053 21.8381C23.5155 23.186 23.4515 24.1238 23.3109 24.8294C23.1745 25.5139 22.9842 25.8762 22.7108 26.132C22.4374 26.3877 22.0632 26.5536 21.3712 26.6441C20.6578 26.7374 19.7178 26.7389 18.367 26.7389H17.5936C16.2428 26.7389 15.3028 26.7374 14.5894 26.6441C13.8974 26.5536 13.5232 26.3877 13.2498 26.132C12.9764 25.8762 12.7861 25.5139 12.6497 24.8294C12.5091 24.1238 12.4451 23.186 12.3553 21.8381L11.8953 14.939Z" fill="#494949"/>
                  <path d="M15.4057 16.7426C15.8178 16.7014 16.1854 17.0021 16.2266 17.4143L16.7266 22.4143C16.7678 22.8264 16.4671 23.194 16.0549 23.2352C15.6428 23.2764 15.2753 22.9757 15.234 22.5635L14.734 17.5635C14.6928 17.1514 14.9935 16.7838 15.4057 16.7426Z" fill="#494949"/>
                  <path d="M20.5549 16.7426C20.9671 16.7838 21.2678 17.1514 21.2266 17.5635L20.7266 22.5635C20.6854 22.9757 20.3178 23.2764 19.9057 23.2352C19.4935 23.194 19.1928 22.8264 19.234 22.4143L19.734 17.4143C19.7752 17.0021 20.1428 16.7014 20.5549 16.7426Z" fill="#494949"/>
                </g>
              </svg>
            </a>
          </div>
        </div>
      </div>`,
    item_visit: `<div class="item">
        <svg width="177" height="100" viewBox="0 0 177 100" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
          <rect y="0.00201416" width="177" height="99.12" rx="15.9702" fill="white"/>
          <path d="M106.869 30.9405C102.16 28.3961 98.1891 29.195 94.3488 29.977C92.9491 30.2862 91.5334 30.5178 90.1082 30.6708C90.0505 30.0262 89.9572 29.402 89.8453 28.7913C90.8681 29.0635 91.9215 29.2038 92.98 29.2086C95.9802 29.2023 98.8746 28.0993 101.118 26.1073C103.362 24.1153 104.799 21.3717 105.161 18.3933C105.208 18.0251 105.133 17.6517 104.947 17.3303C104.761 17.0088 104.475 16.7572 104.133 16.6139C102.644 15.9754 101.042 15.6386 99.4221 15.6231C97.8018 15.6076 96.1945 15.9136 94.6932 16.5235C93.192 17.1334 91.8267 18.0351 90.6763 19.1762C89.5259 20.3174 88.6133 21.6754 87.9913 23.1716C86.7168 20.5095 84.969 18.1012 82.833 16.0644C82.4956 15.7656 82.0533 15.6132 81.6035 15.6406C81.1537 15.6679 80.7332 15.8728 80.4345 16.2102C80.1358 16.5476 79.9833 16.9899 80.0107 17.4397C80.038 17.8895 80.243 18.31 80.5804 18.6087C83.8874 21.8406 86.0341 26.0744 86.6869 30.6521C85.33 30.4945 83.982 30.268 82.6481 29.9736C78.8095 29.1916 74.8453 28.3859 70.1281 30.9371C67.5195 32.2386 65.2617 34.1476 63.5446 36.5034C61.8275 38.8593 60.7014 41.5931 60.261 44.4749H116.746C116.304 41.5927 115.176 38.8589 113.457 36.5036C111.738 34.1483 109.479 32.2404 106.869 30.9405Z" fill="#EDEDED"/>
          <path d="M69.7156 78.6407C71.0285 80.1832 72.6652 81.4174 74.5093 82.2553C76.3535 83.0932 78.3596 83.5143 80.3851 83.4885C82.0167 83.4538 83.643 83.2882 85.2482 82.9932C86.3215 82.7899 87.4084 82.6663 88.4999 82.6235C89.5915 82.6663 90.6783 82.7899 91.7516 82.9932C95.9922 83.6717 101.788 84.5928 107.284 78.6407C110.024 75.5675 112.211 72.0425 113.747 68.2223H63.2529C64.7889 72.0425 66.9755 75.5675 69.7156 78.6407Z" fill="#EDEDED"/>
          <path d="M119.033 47.8673H115.64V54.6523C115.64 55.1022 115.461 55.5336 115.143 55.8517C114.825 56.1699 114.394 56.3486 113.944 56.3486C113.494 56.3486 113.063 56.1699 112.745 55.8517C112.426 55.5336 112.248 55.1022 112.248 54.6523V47.8673H105.463V56.3486C105.463 56.7984 105.284 57.2299 104.966 57.548C104.648 57.8661 104.216 58.0448 103.766 58.0448C103.317 58.0448 102.885 57.8661 102.567 57.548C102.249 57.2299 102.07 56.7984 102.07 56.3486V47.8673H95.2852V54.6523C95.2852 55.1022 95.1065 55.5336 94.7884 55.8517C94.4703 56.1699 94.0388 56.3486 93.589 56.3486C93.1391 56.3486 92.7076 56.1699 92.3895 55.8517C92.0714 55.5336 91.8927 55.1022 91.8927 54.6523V47.8673H85.1077V56.3486C85.1077 56.7984 84.929 57.2299 84.6109 57.548C84.2928 57.8661 83.8613 58.0448 83.4114 58.0448C82.9616 58.0448 82.5301 57.8661 82.212 57.548C81.8939 57.2299 81.7152 56.7984 81.7152 56.3486V47.8673H74.9302V54.6523C74.9302 55.1022 74.7515 55.5336 74.4334 55.8517C74.1153 56.1699 73.6838 56.3486 73.2339 56.3486C72.7841 56.3486 72.3526 56.1699 72.0345 55.8517C71.7164 55.5336 71.5377 55.1022 71.5377 54.6523V47.8673H64.7527V56.3486C64.7527 56.7984 64.574 57.2299 64.2559 57.548C63.9378 57.8661 63.5063 58.0448 63.0564 58.0448C62.6066 58.0448 62.1751 57.8661 61.857 57.548C61.5389 57.2299 61.3602 56.7984 61.3602 56.3486V47.8673H57.9677C57.0679 47.8673 56.2051 48.2247 55.5688 48.861C54.9326 49.4972 54.5752 50.3601 54.5752 51.2598V61.4373C54.5752 62.3371 54.9326 63.2 55.5688 63.8362C56.2051 64.4724 57.0679 64.8298 57.9677 64.8298H119.033C119.932 64.8298 120.795 64.4724 121.432 63.8362C122.068 63.2 122.425 62.3371 122.425 61.4373V51.2598C122.425 50.3601 122.068 49.4972 121.432 48.861C120.795 48.2247 119.932 47.8673 119.033 47.8673Z" fill="#EDEDED"/>
        </svg>
        <div class="right">
          <div class="top">
            <div class="left">
              <div class="category">WIZYTA</div>
              <div class="name f-16">{name}</div>
            </div>
            <a href="#" class="remove-from-cart" data-id="{id}" data-sid="{sid}">
              <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
                <rect width="36" height="36" rx="18" fill="white"/>
                <g opacity="0.5">
                  <path fill-rule="evenodd" clip-rule="evenodd" d="M16.2896 8.73891H19.671C19.8874 8.73877 20.0759 8.73865 20.2539 8.76708C20.9572 8.87939 21.5658 9.31804 21.8948 9.94973C21.978 10.1096 22.0375 10.2885 22.1058 10.4938L22.2175 10.8287C22.2364 10.8854 22.2418 10.9015 22.2463 10.9141C22.4215 11.3982 22.8755 11.7255 23.3901 11.7385C23.4037 11.7389 23.4202 11.7389 23.4803 11.7389H26.4803C26.8945 11.7389 27.2303 12.0747 27.2303 12.4889C27.2303 12.9031 26.8945 13.2389 26.4803 13.2389H9.48022C9.06601 13.2389 8.73022 12.9031 8.73022 12.4889C8.73022 12.0747 9.06601 11.7389 9.48022 11.7389H12.4803C12.5404 11.7389 12.5569 11.7389 12.5705 11.7385C13.0851 11.7255 13.5391 11.3983 13.7142 10.9141C13.7189 10.9014 13.7241 10.8857 13.7431 10.8287L13.8547 10.4939C13.923 10.2885 13.9826 10.1096 14.0658 9.94973C14.3948 9.31804 15.0034 8.87939 15.7067 8.76708C15.8847 8.73865 16.0732 8.73877 16.2896 8.73891ZM14.9884 11.7389C15.0399 11.6379 15.0855 11.5329 15.1248 11.4244C15.1367 11.3914 15.1484 11.3563 15.1634 11.3112L15.2632 11.0118C15.3544 10.7383 15.3754 10.6825 15.3962 10.6425C15.5059 10.432 15.7088 10.2858 15.9432 10.2483C15.9877 10.2412 16.0472 10.2389 16.3355 10.2389H19.625C19.9133 10.2389 19.9729 10.2412 20.0174 10.2483C20.2518 10.2858 20.4547 10.432 20.5644 10.6425C20.5852 10.6825 20.6062 10.7383 20.6973 11.0118L20.7971 11.3111L20.8358 11.4244C20.8751 11.533 20.9207 11.6379 20.9722 11.7389H14.9884Z" fill="#494949"/>
                  <path d="M11.8953 14.939C11.8678 14.5257 11.5104 14.213 11.0971 14.2406C10.6838 14.2681 10.3711 14.6255 10.3986 15.0388L10.8621 21.9905C10.9476 23.2733 11.0166 24.3094 11.1786 25.1225C11.347 25.9678 11.6334 26.6739 12.225 27.2273C12.8166 27.7808 13.5402 28.0196 14.3948 28.1314C15.2168 28.2389 16.2552 28.2389 17.5408 28.2389H18.4197C19.7053 28.2389 20.7437 28.2389 21.5658 28.1314C22.4204 28.0196 23.144 27.7808 23.7356 27.2273C24.3272 26.6739 24.6136 25.9678 24.782 25.1225C24.944 24.3094 25.013 23.2733 25.0985 21.9905L25.562 15.0388C25.5895 14.6255 25.2768 14.2681 24.8635 14.2406C24.4502 14.213 24.0928 14.5257 24.0653 14.939L23.6053 21.8381C23.5155 23.186 23.4515 24.1238 23.3109 24.8294C23.1745 25.5139 22.9842 25.8762 22.7108 26.132C22.4374 26.3877 22.0632 26.5536 21.3712 26.6441C20.6578 26.7374 19.7178 26.7389 18.367 26.7389H17.5936C16.2428 26.7389 15.3028 26.7374 14.5894 26.6441C13.8974 26.5536 13.5232 26.3877 13.2498 26.132C12.9764 25.8762 12.7861 25.5139 12.6497 24.8294C12.5091 24.1238 12.4451 23.186 12.3553 21.8381L11.8953 14.939Z" fill="#494949"/>
                  <path d="M15.4057 16.7426C15.8178 16.7014 16.1854 17.0021 16.2266 17.4143L16.7266 22.4143C16.7678 22.8264 16.4671 23.194 16.0549 23.2352C15.6428 23.2764 15.2753 22.9757 15.234 22.5635L14.734 17.5635C14.6928 17.1514 14.9935 16.7838 15.4057 16.7426Z" fill="#494949"/>
                  <path d="M20.5549 16.7426C20.9671 16.7838 21.2678 17.1514 21.2266 17.5635L20.7266 22.5635C20.6854 22.9757 20.3178 23.2764 19.9057 23.2352C19.4935 23.194 19.1928 22.8264 19.234 22.4143L19.734 17.4143C19.7752 17.0021 20.1428 16.7014 20.5549 16.7426Z" fill="#494949"/>
                </g>
              </svg>
            </a>
          </div>
          <div class="bottom">
            <div class="calories f-13">
              {date} {time}
            </div>
            <div class="price">
              <div class="total f-24">
                {price}
              </div>
            </div>
          </div>
        </div>
        <div class="mobile">
          <div class="top f-16">{name} {date} {time}</div>
          <div class="bottom">
            <div class="price">
              <div class="total f-30">
                {price}
              </div>
            </div>
            <a href="#" class="remove-from-cart" data-id="{id}" data-sid="{sid}">
              <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
                <rect width="36" height="36" rx="18" fill="white"/>
                <g opacity="0.5">
                  <path fill-rule="evenodd" clip-rule="evenodd" d="M16.2896 8.73891H19.671C19.8874 8.73877 20.0759 8.73865 20.2539 8.76708C20.9572 8.87939 21.5658 9.31804 21.8948 9.94973C21.978 10.1096 22.0375 10.2885 22.1058 10.4938L22.2175 10.8287C22.2364 10.8854 22.2418 10.9015 22.2463 10.9141C22.4215 11.3982 22.8755 11.7255 23.3901 11.7385C23.4037 11.7389 23.4202 11.7389 23.4803 11.7389H26.4803C26.8945 11.7389 27.2303 12.0747 27.2303 12.4889C27.2303 12.9031 26.8945 13.2389 26.4803 13.2389H9.48022C9.06601 13.2389 8.73022 12.9031 8.73022 12.4889C8.73022 12.0747 9.06601 11.7389 9.48022 11.7389H12.4803C12.5404 11.7389 12.5569 11.7389 12.5705 11.7385C13.0851 11.7255 13.5391 11.3983 13.7142 10.9141C13.7189 10.9014 13.7241 10.8857 13.7431 10.8287L13.8547 10.4939C13.923 10.2885 13.9826 10.1096 14.0658 9.94973C14.3948 9.31804 15.0034 8.87939 15.7067 8.76708C15.8847 8.73865 16.0732 8.73877 16.2896 8.73891ZM14.9884 11.7389C15.0399 11.6379 15.0855 11.5329 15.1248 11.4244C15.1367 11.3914 15.1484 11.3563 15.1634 11.3112L15.2632 11.0118C15.3544 10.7383 15.3754 10.6825 15.3962 10.6425C15.5059 10.432 15.7088 10.2858 15.9432 10.2483C15.9877 10.2412 16.0472 10.2389 16.3355 10.2389H19.625C19.9133 10.2389 19.9729 10.2412 20.0174 10.2483C20.2518 10.2858 20.4547 10.432 20.5644 10.6425C20.5852 10.6825 20.6062 10.7383 20.6973 11.0118L20.7971 11.3111L20.8358 11.4244C20.8751 11.533 20.9207 11.6379 20.9722 11.7389H14.9884Z" fill="#494949"/>
                  <path d="M11.8953 14.939C11.8678 14.5257 11.5104 14.213 11.0971 14.2406C10.6838 14.2681 10.3711 14.6255 10.3986 15.0388L10.8621 21.9905C10.9476 23.2733 11.0166 24.3094 11.1786 25.1225C11.347 25.9678 11.6334 26.6739 12.225 27.2273C12.8166 27.7808 13.5402 28.0196 14.3948 28.1314C15.2168 28.2389 16.2552 28.2389 17.5408 28.2389H18.4197C19.7053 28.2389 20.7437 28.2389 21.5658 28.1314C22.4204 28.0196 23.144 27.7808 23.7356 27.2273C24.3272 26.6739 24.6136 25.9678 24.782 25.1225C24.944 24.3094 25.013 23.2733 25.0985 21.9905L25.562 15.0388C25.5895 14.6255 25.2768 14.2681 24.8635 14.2406C24.4502 14.213 24.0928 14.5257 24.0653 14.939L23.6053 21.8381C23.5155 23.186 23.4515 24.1238 23.3109 24.8294C23.1745 25.5139 22.9842 25.8762 22.7108 26.132C22.4374 26.3877 22.0632 26.5536 21.3712 26.6441C20.6578 26.7374 19.7178 26.7389 18.367 26.7389H17.5936C16.2428 26.7389 15.3028 26.7374 14.5894 26.6441C13.8974 26.5536 13.5232 26.3877 13.2498 26.132C12.9764 25.8762 12.7861 25.5139 12.6497 24.8294C12.5091 24.1238 12.4451 23.186 12.3553 21.8381L11.8953 14.939Z" fill="#494949"/>
                  <path d="M15.4057 16.7426C15.8178 16.7014 16.1854 17.0021 16.2266 17.4143L16.7266 22.4143C16.7678 22.8264 16.4671 23.194 16.0549 23.2352C15.6428 23.2764 15.2753 22.9757 15.234 22.5635L14.734 17.5635C14.6928 17.1514 14.9935 16.7838 15.4057 16.7426Z" fill="#494949"/>
                  <path d="M20.5549 16.7426C20.9671 16.7838 21.2678 17.1514 21.2266 17.5635L20.7266 22.5635C20.6854 22.9757 20.3178 23.2764 19.9057 23.2352C19.4935 23.194 19.1928 22.8264 19.234 22.4143L19.734 17.4143C19.7752 17.0021 20.1428 16.7014 20.5549 16.7426Z" fill="#494949"/>
                </g>
              </svg>
            </a>
          </div>
        </div>
      </div>`,
    promo: `<div class="lowest f-13">
        Najniższa cena: <span class="f-16">{price}</span>
        <a class="tooltip-wrapper" href="#" title="Tooltip">
          <svg class="tooltip-icon" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
            <rect width="18" height="18" rx="9" fill="#494949"/>
            <path d="M9.9375 5.3623C9.9375 5.88007 9.51777 6.2998 9 6.2998C8.48223 6.2998 8.0625 5.88007 8.0625 5.3623C8.0625 4.84454 8.48223 4.4248 9 4.4248C9.51777 4.4248 9.9375 4.84454 9.9375 5.3623Z" fill="white"/>
            <path d="M9 13.6123C8.58579 13.6123 8.25 13.2765 8.25 12.8623V8.3623C8.25 7.94809 8.58579 7.6123 9 7.6123C9.41421 7.6123 9.75 7.94809 9.75 8.3623V12.8623C9.75 13.2765 9.41421 13.6123 9 13.6123Z" fill="white"/>
          </svg>
          <span class="tooltip-box align-left">Najniższa cena z ostatnich 30 dni.</span>
        </a>
      </div>`,
    empty: `<div class="global-empty-cart-info" style="margin-top: 24px;">
        <div class="content-box">
          <svg class="single-icon" xmlns="http://www.w3.org/2000/svg" width="70" height="70" viewBox="0 0 70 70" fill="none">
            <path d="M35 13.8086C23.3151 13.8086 13.8086 23.3151 13.8086 35C13.8086 46.6849 23.3151 56.1914 35 56.1914C46.6849 56.1914 56.1914 46.6849 56.1914 35C56.1914 23.3151 46.6849 13.8086 35 13.8086Z" fill="#DBDBDB"/>
            <path d="M59.7488 10.2512C53.1381 3.64068 44.3488 0 35 0C25.6512 0 16.8619 3.64068 10.2512 10.2512C3.64068 16.8619 0 25.6512 0 35C0 44.3488 3.64068 53.1381 10.2512 59.7488C16.8619 66.3593 25.6512 70 35 70C44.3488 70 53.1381 66.3593 59.7488 59.7488C66.3593 53.1381 70 44.3488 70 35C70 25.6512 66.3593 16.8619 59.7488 10.2512ZM35 60.293C21.0535 60.293 9.70703 48.9465 9.70703 35C9.70703 21.0535 21.0535 9.70703 35 9.70703C48.9465 9.70703 60.293 21.0535 60.293 35C60.293 48.9465 48.9465 60.293 35 60.293Z" fill="#DBDBDB"/>
            <circle cx="19.2754" cy="35.0252" r="1.42525" fill="#F5F5F5"/>
            <circle cx="44.4751" cy="34.3253" r="1.42525" fill="#F5F5F5"/>
            <circle cx="37.4751" cy="49.7253" r="1.42525" fill="#F5F5F5"/>
            <circle cx="28.7503" cy="43.1005" r="3.20051" fill="#F5F5F5"/>
            <circle cx="33.2836" cy="34.3336" r="2.13367" fill="#F5F5F5"/>
            <circle cx="47.9838" cy="42.0337" r="2.13367" fill="#F5F5F5"/>
          </svg>
 
          <div class="text-box">
            <p class="info-heading f-16 bold">Twój koszyk jest pusty</p>
            <p class="info-desc f-16">Nie poddawaj się, dodaj produkty i&nbsp;zacznij zdrowy plan z&nbsp;Simplyfit.</p>
          </div>
        </div>
      </div>`
  }
 
  function prepareCartItems(data) {
    const cart = document.querySelector('.cart-items');
    const excludedKeys = <?= json_encode($this->uparams->cart->excluded) ?>;
    const isPageCart = document.querySelector('.page-cart');
 
    cart.innerHTML = '';
 
    let hasElems = false;
    if (data.elems && Object.keys(data.elems).length > 0) {
      hasElems = true;
      Object.entries(data.elems).forEach(([uid, elems]) => {
        if (!excludedKeys.includes(uid)) {
          const groupEl = document.createElement('div');
          groupEl.innerHTML = html.group.replace(/{profile}/gi, elems.n);
          const groupNode = groupEl.firstElementChild;
 
          const itemsContainer = groupNode.querySelector('.items');
 
          Object.entries(elems.p).forEach(([key, elem]) => {
            const itemEl = document.createElement('div');
 
            if (elem.otype !== 4) {
              itemEl.innerHTML = html[elem.type]
                .replace(/{id}/gi, elem.id)
                .replace(/{mid}/gi, elem.mid)
                .replace(/{name}/gi, elem.name)
                .replace(/{price}/gi, elem.price_promo ? elem.price_promo : elem.price)
                .replace(/{promo}/gi, elem.price_promo ? html.promo.replace(/{price}/gi, elem.price) : '')
                .replace(/{date}/gi, elem.date ?? '')
                .replace(/{energy}/gi, elem.energy ?? '')
                .replace(/{days}/gi, elem.days ?? '')
                .replace(/{photo_webp}/gi, elem.photo_webp ?? '')
                .replace(/{photo_png}/gi, elem.photo_png ?? '');
            } else {
              itemEl.innerHTML = html[elem.type]
                .replace(/{id}/gi, elem.visit_id)
                .replace(/{sid}/gi, elem.id)
                .replace(/{name}/gi, elem.name)
                .replace(/{price}/gi, (elem.price_max) ? elem.price_min + ' - ' + elem.price_max : elem.price_min)
                .replace(/{date}/gi, elem.date ?? '')
                .replace(/{time}/gi, elem.time ?? '');
            }
 
            itemsContainer.appendChild(itemEl.firstElementChild);
          });
 
          cart.appendChild(groupNode);
        }
      });
    } else {
      cart.innerHTML = html.empty;
    }
 
    const summaryPrice = document.querySelectorAll('.summary-price');
    if (summaryPrice) {
      summaryPrice.forEach(el => {
        if (hasElems && data.elems.summ_raw === 0) {
          el.closest('.total').style.display = 'none';
        } else {
          el.closest('.total').style.display = 'block';
          el.innerHTML = (data.elems.summ) ? data.elems.summ : '0,00 zł';
        }
      });
    }
 
    if (isPageCart) {
      if (hasElems && data.elems.summ_raw === 0) {
        const norefundInput = document.querySelector('.norefund-input');
        const btnGoToPayment = document.querySelector('.btn-go-to-payment');
 
        if (btnGoToPayment) {
          norefundInput.remove();
          btnGoToPayment.querySelector('.btn-text').innerText = 'Zarezerwuj';
          btnGoToPayment.setAttribute('href', '<?= $this->url->get(['for' => 'sale-cart-reserv']) ?>');
          btnGoToPayment.setAttribute('title', 'Zarezerwuj');
        }
      }
 
      let x = 1;
      document.querySelectorAll('.groups .group').forEach(group => {
        group.querySelector('.tally .nth').innerText = x;
        group.querySelector('.tally .total').innerText = data.elems.count;
 
        x++;
      });
 
      if (window.flutter_inappwebview) {
        window.flutter_inappwebview.callHandler('cartUpdated', document.querySelectorAll('.page-cart .item').length);
      }
 
      const inpCoupon = document.querySelector('.input-coupon');
      const btnCoupon = document.querySelector('.btn-coupon');
      const currCoupon = document.querySelector('.curr-coupon');
 
      if (hasElems && data.elems.summ_raw === 0) {
        if (inpCoupon) { inpCoupon.closest('.bottom').remove(); }
      } else {
        if (data.elems.disc) {
          if (inpCoupon) { inpCoupon.classList.remove('active'); }
          if (btnCoupon) { btnCoupon.classList.add('inactive'); }
          if (currCoupon) { currCoupon.classList.add('active'); }
 
          if (currCoupon) {
            currCoupon.querySelector('.coupon').innerHTML = `Kod rabatowy: ${data.elems.disc} - ${data.elems.dis}`;
          }
        } else {
          if (inpCoupon) { inpCoupon.classList.remove('active'); }
          if (btnCoupon) { btnCoupon.classList.remove('inactive'); }
          if (currCoupon) { currCoupon.classList.remove('active'); }
 
          if (inpCoupon) {
            inpCoupon.querySelector('input').value = '';
          }
        }
      }
    }
  }
 
  function getCart() {
    const url = '<?= $this->url->get(['for' => 'sale-get-cart']) ?>';
 
    fetch(url)
      .then(resp => resp.json())
      .then(data => {
        if (data.success) {
          prepareCartItems(data);
        }
      });
  }
 
  document.addEventListener('DOMContentLoaded', function () {
    const btnCheckCart = document.querySelector('.btn-check-basket');
 
    if (btnCheckCart) {
      btnCheckCart.onclick = function (e) {
        e.preventDefault();
        openCart();
      }
    }
 
    getCart();
  });
 
  const dialogSubs = document.querySelector('.choose-cart-subs');
 
  document.onclick = function (e) {
    let target = e.target;
    if (e.target.tagName !== 'a') {
      target = e.target.closest('a');
    }
 
    if (target) {
      if (target.classList.contains('cart-kcal-submit')) {
        e.preventDefault();
        e.stopPropagation();
        e.stopImmediatePropagation();
 
        const validation = document.querySelector('.cart-kcal-valid');
 
        const form = target.closest('form');
 
        const urlAdd = form.action;
        const formData = new FormData(form);
 
        validation.classList.remove('invalid');
 
        if ([...formData.entries()].length > 0) {
          fetch(urlAdd, {
            method: 'POST',
            body: formData,
          })
            .then(resp => resp.json())
            .then(data => {
              if (data.success) {
                dialogSubs.close();
                prepareCartItems(data);
                openCart();
              } else {
                addFlashMessage(data.msg, 'error');
              }
            });
        } else {
          validation.classList.add('invalid');
        }
      }
 
      if (target.classList.contains('cart-kcal-close')) {
        e.preventDefault();
        e.stopPropagation();
        e.stopImmediatePropagation();
 
        dialogSubs.close();
      }
 
      if (target.classList.contains('btn-submit') && target.classList.contains('cart')) {
        e.preventDefault();
        e.stopPropagation();
        e.stopImmediatePropagation();
 
        const form = document.getElementById('add-to-cart-form');
 
        const urlAdd = form.action;
 
        if (form.method.toString().toLowerCase() === 'post') {
          const formData = new FormData(form);
 
          fetch(urlAdd, {
            method: 'POST',
            body: formData,
          })
            .then(resp => resp.json())
            .then(data => {
              if (data.success) {
                prepareCartItems(data);
                openCart();
              }
            });
        } else {
          fetch(urlAdd)
            .then(resp => resp.json())
            .then(data => {
              if (data.success) {
                prepareCartItems(data);
                openCart();
              }
            });
        }
      }
 
      if (target.classList.contains('btn-add-to-basket')) {
        e.preventDefault();
        e.stopPropagation();
        e.stopImmediatePropagation();
 
        const id = target.dataset.id;
        const source = target.dataset.source;
 
        const urlCheck = '<?= $this->url->get(['for' => 'sale-add-to-cart-check', 'id' => 'id']) ?>';
        const urlAdd = '<?= $this->url->get(['for' => 'sale-add-to-cart', 'id' => 'id']) ?>?source=' + source;
 
        fetch(urlCheck.replace(/id/gi, id))
          .then(resp => resp.json())
          .then(data => {
            if (data.success) {
              if ([3, 4].includes(data.type)) {
                fetch(urlAdd.replace(/id/gi, id))
                  .then(resp => resp.json())
                  .then(data => {
                    if (data.success) {
                      prepareCartItems(data);
                      openCart();
                    } else {
                      addFlashMessage(data.msg, 'error');
                    }
                  });
              } else {
                const kcalSubs = document.querySelector('.cart-kcal-subs');
 
                if (kcalSubs) {
                  kcalSubs.innerHTML = '';
 
                  data.subs.forEach(sub => {
                    kcalSubs.insertAdjacentHTML('beforeend', `<label for="subs-${sub.id}">
                      <input id="subs-${sub.id}" class="radio-checkbox" type="radio" name="mid" value="${sub.id}">
                      <div class="bubble">${sub.energy} kcal</div>
                    </label>`);
                  });
                }
 
                dialogSubs.querySelector('form').action = urlAdd.replace(/id/gi, id);
                dialogSubs.showModal();
              }
            }
          });
      }
 
      if (target.classList.contains('remove-from-cart')) {
        e.preventDefault();
        e.stopPropagation();
        e.stopImmediatePropagation();
 
        const id = target.dataset.id;
        const mid = target.dataset.mid;
        const sid = target.dataset.sid;
 
        const url = (mid) ? '<?= $this->url->get(['for' => 'sale-remove-from-cart', 'id' => 'id', 'mid' => 'mid']) ?>' : '<?= $this->url->get(['for' => 'sale-remove-from-cart-visit', 'id' => 'id', 'sid' => 'sid']) ?>';
        const isPageCart = document.querySelector('.page-cart');
 
        fetch(url.replace(/mid/gi, mid).replace(/sid/gi, sid).replace(/id/gi, id))
          .then(resp => resp.json())
          .then(data => {
            if (data.success) {
              if (isPageCart) {
                const groups = target.closest('.groups');
                const group = target.closest('.group');
                const items = target.closest('.items');
 
                target.closest('.item').remove();
                if (items.querySelectorAll('.item').length === 0) {
                  group.remove();
                }
 
                if (groups.querySelectorAll('.group').length === 0) {
                  groups.insertAdjacentHTML('beforeend', html.empty);
 
                  const noRefundInput = document.querySelector('.norefund-input');
                  if (noRefundInput) {
                    noRefundInput.remove();
                  }
 
                  const btnToPayment = document.querySelector('.btn-go-to-payment');
                  if (btnToPayment) {
                    btnToPayment.remove();
                  }
 
                  const discountElement = document.querySelector('.discount-element');
                  if (discountElement) {
                    discountElement.closest('.bottom').remove();
                  }
 
                  const breakElement = document.querySelector('.break-element');
                  if (breakElement) {
                    breakElement.remove();
                  }
                }
              }
              prepareCartItems(data);
            }
          });
      }
    }
  }
</script>
 
 
  <main class="page-main">
    <section class="global-page-intro-banner container-box section-space">
      <div class="banner-content">
        <ul class="global-breadcrumbs-box">
          <li class="single-breadcrumb">
            <a class="breadcrumb-content" href="/" title="Przejdź do strony głównej">
              <svg class="single-icon" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
                <path d="M10.707 2.293C10.5195 2.10553 10.2652 2.00021 10 2.00021C9.73485 2.00021 9.48054 2.10553 9.29301 2.293L2.29301 9.293C2.11085 9.4816 2.01006 9.7342 2.01234 9.9964C2.01461 10.2586 2.11978 10.5094 2.30519 10.6948C2.4906 10.8802 2.74141 10.9854 3.00361 10.9877C3.26581 10.99 3.51841 10.8892 3.70701 10.707L4.00001 10.414V17C4.00001 17.2652 4.10537 17.5196 4.2929 17.7071C4.48044 17.8946 4.73479 18 5.00001 18H7.00001C7.26523 18 7.51958 17.8946 7.70712 17.7071C7.89465 17.5196 8.00001 17.2652 8.00001 17V15C8.00001 14.7348 8.10537 14.4804 8.2929 14.2929C8.48044 14.1054 8.73479 14 9.00001 14H11C11.2652 14 11.5196 14.1054 11.7071 14.2929C11.8947 14.4804 12 14.7348 12 15V17C12 17.2652 12.1054 17.5196 12.2929 17.7071C12.4804 17.8946 12.7348 18 13 18H15C15.2652 18 15.5196 17.8946 15.7071 17.7071C15.8947 17.5196 16 17.2652 16 17V10.414L16.293 10.707C16.4816 10.8892 16.7342 10.99 16.9964 10.9877C17.2586 10.9854 17.5094 10.8802 17.6948 10.6948C17.8802 10.5094 17.9854 10.2586 17.9877 9.9964C17.99 9.7342 17.8892 9.4816 17.707 9.293L10.707 2.293Z" fill="#EFE7FF"/>
              </svg>
            </a>
          </li>
 
          <li class="single-breadcrumb">
            <svg class="icon-separator" xmlns="http://www.w3.org/2000/svg" width="7" height="11" viewBox="0 0 7 11">
              <path fill-rule="evenodd" clip-rule="evenodd" d="M1.29299 10.707C1.10552 10.5195 1.0002 10.2652 1.0002 10C1.0002 9.73484 1.10552 9.48053 1.29299 9.293L4.58599 6L1.29299 2.707C1.19748 2.61475 1.1213 2.50441 1.06889 2.3824C1.01648 2.2604 0.988893 2.12918 0.987739 1.9964C0.986585 1.86362 1.01189 1.73194 1.06217 1.60905C1.11245 1.48615 1.1867 1.3745 1.28059 1.28061C1.37449 1.18671 1.48614 1.11246 1.60904 1.06218C1.73193 1.0119 1.86361 0.986595 1.99639 0.987749C2.12917 0.988903 2.26039 1.01649 2.38239 1.0689C2.5044 1.12131 2.61474 1.19749 2.70699 1.293L6.70699 5.293C6.89446 5.48053 6.99978 5.73484 6.99978 6C6.99978 6.26516 6.89446 6.51947 6.70699 6.707L2.70699 10.707C2.51946 10.8945 2.26515 10.9998 1.99999 10.9998C1.73483 10.9998 1.48052 10.8945 1.29299 10.707Z" fill="#EFE7FF"/>
            </svg>
          </li>
 
          <li class="single-breadcrumb">
            <p class="breadcrumb-content f-16">Artykuły</p>
          </li>
        </ul>
 
        <div class="text-box">
          <h1 class="page-title f-40">Artykuły</h1>
        </div>
 
        <div class="decoration-icon-box">
          <svg class="icon" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
            <path d="M17.25 23.375C17.25 24.0654 16.6904 24.625 16 24.625H8.625C7.93463 24.625 7.375 24.0654 7.375 23.375C7.375 22.6846 7.93463 22.125 8.625 22.125H16C16.6904 22.125 17.25 22.6846 17.25 23.375ZM32 7.50938V22.1458C32 24.0651 31.2526 25.8693 29.8955 27.2264L27.2264 29.8956C25.8693 31.2526 24.0651 32 22.1458 32H7.50938C3.35869 32 0 28.6409 0 24.4906V7.50938C0 3.35869 3.35906 0 7.50938 0H24.4906C28.6413 0 32 3.35906 32 7.50938ZM29.3323 23.3958H25.8958C24.5173 23.3958 23.3958 24.5173 23.3958 25.8958V29.3323C24.1684 29.1198 24.8766 28.7098 25.4586 28.1278L28.1278 25.4586C28.7098 24.8766 29.1198 24.1684 29.3323 23.3958ZM29.5 7.50938C29.5 4.74056 27.2593 2.5 24.4906 2.5H7.50938C4.74056 2.5 2.5 4.74069 2.5 7.50938V24.4906C2.5 27.2594 4.74069 29.5 7.50938 29.5H20.8958V25.8958C20.8958 23.1388 23.1388 20.8958 25.8958 20.8958H29.5V7.50938ZM23.375 14.75H8.625C7.93463 14.75 7.375 15.3096 7.375 16C7.375 16.6904 7.93463 17.25 8.625 17.25H23.375C24.0654 17.25 24.625 16.6904 24.625 16C24.625 15.3096 24.0654 14.75 23.375 14.75ZM23.375 7.375H8.625C7.93463 7.375 7.375 7.93463 7.375 8.625C7.375 9.31538 7.93463 9.875 8.625 9.875H23.375C24.0654 9.875 24.625 9.31538 24.625 8.625C24.625 7.93463 24.0654 7.375 23.375 7.375Z" fill="white"/>
          </svg>
        </div>
 
        <img class="img-decoration" src="/assets/img/pages/page-article-listing/page-article-listing-intro-banner-img-1.webp" alt="" width="929" height="366">
      </div>
    </section>
 
    <section class="section-articles-listing container-box section-shift-top">
      <div class="section-content">
        <div class="filters-box">
          <div class="grid-box">
            <?php foreach ($categories as $id => $category) { ?>
                <a href="?kategorie=<?= ($this->isIncluded($id, $filterCategories) ? join(',', SH\Views\Filters::exclude($filterCategories, $id)) : join(',', SH\Views\Filters::push($filterCategories, $id))) ?>"
                   class="single-filter f-16 show<?php if ($this->isIncluded($id, $filterCategories)) { ?> active<?php } ?>"
                   data-category-id="<?= $id ?>">#<?= $category ?></a>
            <?php } ?>
 
            <a href="#" class="btn-show-all-filters" title="Pokaż wszystkie kategorie do filtrowania artykułów">
              <svg class="btn-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
                <path d="M20.5 11.75C20.5 9.56196 19.6312 7.46319 18.084 5.91602C16.5368 4.36884 14.438 3.5 12.25 3.5C10.062 3.5 7.96319 4.36884 6.41602 5.91602C4.86884 7.46319 4 9.56196 4 11.75C4 12.8334 4.21333 13.9063 4.62793 14.9072C5.04253 15.9081 5.64995 16.8179 6.41602 17.584C7.18209 18.3501 8.09186 18.9575 9.09277 19.3721C10.0937 19.7867 11.1666 20 12.25 20C13.3334 20 14.4063 19.7867 15.4072 19.3721C16.4081 18.9575 17.3179 18.3501 18.084 17.584C18.8501 16.8179 19.4575 15.9081 19.8721 14.9072C20.2867 13.9063 20.5 12.8334 20.5 11.75ZM11.5 14.75V12.5H9.25C8.83579 12.5 8.5 12.1642 8.5 11.75C8.5 11.3358 8.83579 11 9.25 11H11.5V8.75C11.5 8.33579 11.8358 8 12.25 8C12.6642 8 13 8.33579 13 8.75V11H15.25C15.6642 11 16 11.3358 16 11.75C16 12.1642 15.6642 12.5 15.25 12.5H13V14.75C13 15.1642 12.6642 15.5 12.25 15.5C11.8358 15.5 11.5 15.1642 11.5 14.75ZM22 11.75C22 13.0304 21.7478 14.2985 21.2578 15.4814C20.7678 16.6643 20.0498 17.7392 19.1445 18.6445C18.2392 19.5498 17.1643 20.2678 15.9814 20.7578C14.7985 21.2478 13.5304 21.5 12.25 21.5C10.9696 21.5 9.70148 21.2478 8.51855 20.7578C7.33573 20.2678 6.26078 19.5498 5.35547 18.6445C4.45016 17.7392 3.73217 16.6643 3.24219 15.4814C2.7522 14.2985 2.5 13.0304 2.5 11.75C2.5 9.16414 3.52699 6.68395 5.35547 4.85547C7.18395 3.02699 9.66414 2 12.25 2C14.8359 2 17.3161 3.02699 19.1445 4.85547C20.973 6.68395 22 9.16414 22 11.75Z" fill="#494949"/>
              </svg>
 
              <span class="btn-text f-16">Pokaż wszystkie kategorie</span>
            </a>
          </div>
 
          <a class="btn-clear-filter" href="/artykuly" title="Wyczyść wszystkie aktywne filtry">
            <svg class="btn-icon" xmlns="http://www.w3.org/2000/svg" width="6" height="7" viewBox="0 0 6 7" fill="none">
              <path d="M1.93934 3.25L0.34835 4.84099C0.0554563 5.13389 0.0554563 5.60876 0.34835 5.90165C0.641243 6.19455 1.11612 6.19455 1.40901 5.90165L3 4.31066L4.59099 5.90165C4.88388 6.19455 5.35876 6.19455 5.65165 5.90165C5.94454 5.60876 5.94454 5.13389 5.65165 4.84099L4.06066 3.25L5.65165 1.65901C5.94454 1.36612 5.94454 0.891245 5.65165 0.598351C5.35876 0.305458 4.88388 0.305458 4.59099 0.598351L3 2.18934L1.40901 0.598351C1.11612 0.305458 0.641243 0.305458 0.34835 0.598351C0.0554563 0.891245 0.0554564 1.36612 0.34835 1.65901L1.93934 3.25Z" fill="#ED7474"/>
            </svg>
 
            <span class="btn-text f-16">Wyczyść</span>
          </a>
        </div>
 
        <div class="search-result">
            <?= $this->partial('articles/frontend/_listing') ?>
        </div>
      </div>
    </section>
  </main>
 
<script>
    // ─── Konfiguracja ────────────────────────────────────────────────────────────
    const CONFIG_ART = {
        visibleFiltersCount: 10,
        breakpoint: 992,
        textExpanded: 'Zwiń wszystkie kategorie',
        textCollapsed: 'Pokaż wszystkie kategorie',
        svgExpanded: `<svg class="btn-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M20.5 11.75C20.5 9.56196 19.6312 7.46319 18.084 5.91602C16.5368 4.36884 14.438 3.5 12.25 3.5C10.062 3.5 7.96319 4.36884 6.41602 5.91602C4.86884 7.46319 4 9.56196 4 11.75C4 12.8334 4.21333 13.9063 4.62793 14.9072C5.04253 15.9081 5.64995 16.8179 6.41602 17.584C7.18209 18.3501 8.09186 18.9575 9.09277 19.3721C10.0937 19.7867 11.1666 20 12.25 20C13.3334 20 14.4063 19.7867 15.4072 19.3721C16.4081 18.9575 17.3179 18.3501 18.084 17.584C18.8501 16.8179 19.4575 15.9081 19.8721 14.9072C20.2867 13.9063 20.5 12.8334 20.5 11.75ZM15.7803 13.2803L12.25 9.75L8.71967 13.2803C8.42678 13.5732 7.95191 13.5732 7.65902 13.2803C7.36612 12.9874 7.36612 12.5126 7.65902 12.2197L11.7197 8.15902C12.0126 7.86612 12.4874 7.86612 12.7803 8.15902L16.841 12.2197C17.1339 12.5126 17.1339 12.9874 16.841 13.2803C16.5481 13.5732 16.0732 13.5732 15.7803 13.2803Z" fill="#494949"/></svg>`,
        svgCollapsed: `<svg class="btn-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M20.5 11.75C20.5 9.56196 19.6312 7.46319 18.084 5.91602C16.5368 4.36884 14.438 3.5 12.25 3.5C10.062 3.5 7.96319 4.36884 6.41602 5.91602C4.86884 7.46319 4 9.56196 4 11.75C4 12.8334 4.21333 13.9063 4.62793 14.9072C5.04253 15.9081 5.64995 16.8179 6.41602 17.584C7.18209 18.3501 8.09186 18.9575 9.09277 19.3721C10.0937 19.7867 11.1666 20 12.25 20C13.3334 20 14.4063 19.7867 15.4072 19.3721C16.4081 18.9575 17.3179 18.3501 18.084 17.584C18.8501 16.8179 19.4575 15.9081 19.8721 14.9072C20.2867 13.9063 20.5 12.8334 20.5 11.75ZM11.5 14.75V12.5H9.25C8.83579 12.5 8.5 12.1642 8.5 11.75C8.5 11.3358 8.83579 11 9.25 11H11.5V8.75C11.5 8.33579 11.8358 8 12.25 8C12.6642 8 13 8.33579 13 8.75V11H15.25C15.6642 11 16 11.3358 16 11.75C16 12.1642 15.6642 12.5 15.25 12.5H13V14.75C13 15.1642 12.6642 15.5 12.25 15.5C11.8358 15.5 11.5 15.1642 11.5 14.75ZM22 11.75C22 13.0304 21.7478 14.2985 21.2578 15.4814C20.7678 16.6643 20.0498 17.7392 19.1445 18.6445C18.2392 19.5498 17.1643 20.2678 15.9814 20.7578C14.7985 21.2478 13.5304 21.5 12.25 21.5C10.9696 21.5 9.70148 21.2478 8.51855 20.7578C7.33573 20.2678 6.26078 19.5498 5.35547 18.6445C4.45016 17.7392 3.73217 16.6643 3.24219 15.4814C2.7522 14.2985 2.5 13.0304 2.5 11.75C2.5 9.16414 3.52699 6.68395 5.35547 4.85547C7.18395 3.02699 9.66414 2 12.25 2C14.8359 2 17.3161 3.02699 19.1445 4.85547C20.973 6.68395 22 9.16414 22 11.75Z" fill="#494949"/></svg>`
    };
 
    // ─── Stan ────────────────────────────────────────────────────────────────────
    let isExpanded = false;
    let lastBreakpointState = null;
    let resizeTimer = null;
    let resizeListenerAdded = false;
    let ajaxInProgress = false;
 
    const isDesktop = () => window.innerWidth > CONFIG_ART.breakpoint;
 
    // ─── DOM helpers ─────────────────────────────────────────────────────────────
    function getDOM() {
        const gridBox = document.querySelector('.grid-box');
        return {
            gridBox,
            toggleBtn:    gridBox?.querySelector('.btn-show-all-filters') ?? null,
            btnText:      gridBox?.querySelector('.btn-show-all-filters .btn-text') ?? null,
            filters:      gridBox ? [...gridBox.querySelectorAll('.single-filter')] : [],
            filterPopup:  document.querySelector('.popup-filters-categories'),
            searchResult: document.querySelector('.search-result'),
        };
    }
 
    // ─── Toggle przycisk rozwijania filtrów ──────────────────────────────────────
    function updateButton(expanded) {
        const { toggleBtn, btnText } = getDOM();
        if (!toggleBtn || !btnText) return;
        toggleBtn.querySelector('.btn-icon')?.remove();
        toggleBtn.insertAdjacentHTML('afterbegin', expanded ? CONFIG_ART.svgExpanded : CONFIG_ART.svgCollapsed);
        btnText.textContent = expanded ? CONFIG_ART.textExpanded : CONFIG_ART.textCollapsed;
        toggleBtn.setAttribute('title', expanded ? CONFIG_ART.textExpanded : CONFIG_ART.textCollapsed);
    }
 
    function resetToDefaultState() {
        isExpanded = false;
        const { filters } = getDOM();
        filters.forEach((f, i) => f.classList.toggle('show', i < CONFIG_ART.visibleFiltersCount));
        updateButton(false);
    }
 
    function handleDesktop() {
        const { filters } = getDOM();
        filters.forEach((f, i) => f.classList.toggle('show', isExpanded || i < CONFIG_ART.visibleFiltersCount));
        updateButton(isExpanded);
    }
 
    function handleMobile() {
        updateButton(false);
        const { filters } = getDOM();
        filters.forEach(f => f.classList.remove('show'));
    }
 
    function initFilterToggle() {
        const { gridBox, toggleBtn, filters, filterPopup } = getDOM();
        if (!gridBox || !toggleBtn || !filters.length) return;
 
        isExpanded = false;
        const currentIsDesktop = isDesktop();
        lastBreakpointState = currentIsDesktop;
 
        if (currentIsDesktop) {
            resetToDefaultState();
        } else {
            handleMobile();
        }
 
        const freshBtn = toggleBtn.cloneNode(true);
        toggleBtn.replaceWith(freshBtn);
 
        freshBtn.addEventListener('click', (e) => {
            e.preventDefault();
            if (isDesktop()) {
                isExpanded = !isExpanded;
                handleDesktop();
            } else {
                filterPopup?.showModal();
            }
        });
 
        if (!resizeListenerAdded) {
            resizeListenerAdded = true;
            window.addEventListener('resize', () => {
                clearTimeout(resizeTimer);
                resizeTimer = setTimeout(() => {
                    const cur = isDesktop();
                    const changed = lastBreakpointState !== cur;
                    if (cur) {
                        changed ? resetToDefaultState() : handleDesktop();
                    } else {
                        handleMobile();
                    }
                    lastBreakpointState = cur;
                }, 150);
            });
        }
    }
 
    // ─── Zarządzanie stanem filtrów po stronie klienta ───────────────────────────
    function getActiveFilterIds() {
        return [...document.querySelectorAll('.single-filter[data-category-id].active')]
            .map(el => el.dataset.categoryId);
    }
 
    function buildListingUrl(activeIds, page) {
        const params = new URLSearchParams();
        if (page && page > 1) params.set('str', page);
        if (activeIds.length) params.set('kategorie', activeIds.join(','));
        const qs = params.toString();
        return '/artykuly' + (qs ? '?' + qs : '');
    }
 
    function rebuildFilterHrefs(activeIds) {
        document.querySelectorAll('.single-filter[data-category-id]').forEach(filter => {
            const id = filter.dataset.categoryId;
            const isActive = activeIds.includes(id);
            const toggled = isActive ? activeIds.filter(x => x !== id) : [...activeIds, id];
            filter.setAttribute('href', buildListingUrl(toggled, 1));
            filter.classList.toggle('active', isActive);
        });
        const clearBtn = document.querySelector('.btn-clear-filter');
        if (clearBtn) clearBtn.setAttribute('href', '/artykuly');
    }
 
    function syncFiltersFromUrl(url) {
        const params = new URLSearchParams(new URL(url, window.location.href).search);
        const kat = params.get('kategorie');
        const activeIds = kat ? kat.split(',') : [];
        rebuildFilterHrefs(activeIds);
    }
 
    // ─── AJAX – ładuje tylko zawartość _listing.twig ──────────────────────────────
    async function loadListing(url, pushState = true) {
        if (ajaxInProgress) return;
        ajaxInProgress = true;
 
        const { searchResult } = getDOM();
        if (searchResult) searchResult.classList.add('is-loading');
 
        try {
            const response = await fetch(url, {
                headers: { 'X-Requested-With': 'XMLHttpRequest' }
            });
            if (!response.ok) throw new Error('HTTP ' + response.status);
 
            // Serwer zwraca tylko wyrenderowany _listing.twig
            const html = await response.text();
            if (searchResult) searchResult.innerHTML = html;
 
            if (pushState) history.pushState({ url }, '', url);
 
            // Zaktualizuj stany aktywnych filtrów na podstawie nowego URL
            syncFiltersFromUrl(url);
 
            // Reinicjalizacja logiki rozwijania (nowe elementy filtrów po syncFiltersFromUrl)
            initFilterToggle();
 
            // Płynne przewinięcie do sekcji artykułów
            document.querySelector('.section-articles-listing')
                ?.scrollIntoView({ behavior: 'smooth', block: 'start' });
 
        } catch (err) {
            window.location.href = url;
        } finally {
            ajaxInProgress = false;
            document.querySelector('.search-result')?.classList.remove('is-loading');
        }
    }
 
    // ─── Event delegation ────────────────────────────────────────────────────────
    document.addEventListener('click', (e) => {
        // Kliknięcie w filtr kategorii
        const filterLink = e.target.closest('a.single-filter[data-category-id]');
        if (filterLink) {
            e.preventDefault();
            const activeIds = getActiveFilterIds();
            const id = filterLink.dataset.categoryId;
            const isActive = filterLink.classList.contains('active');
            const newActive = isActive ? activeIds.filter(x => x !== id) : [...activeIds, id];
            const url = buildListingUrl(newActive, 1);
            rebuildFilterHrefs(newActive);
            loadListing(url);
            return;
        }
 
        // Wyczyść filtry
        const clearBtn = e.target.closest('a.btn-clear-filter');
        if (clearBtn) {
            e.preventDefault();
            rebuildFilterHrefs([]);
            loadListing('/artykuly');
            return;
        }
 
        // Paginacja
        const pageLink = e.target.closest('a.single-pagination, a.btn-go-prev, a.btn-go-next');
        if (pageLink) {
            if (pageLink.classList.contains('disabled') || pageLink.classList.contains('pagination-separator')) return;
            const href = pageLink.getAttribute('href');
            if (!href || href === '#') return;
            e.preventDefault();
            loadListing(new URL(href, window.location.href).href);
        }
    });
 
    // ─── Historia przeglądarki (wstecz / dalej) ──────────────────────────────────
    window.addEventListener('popstate', () => {
        const url = window.location.href;
        syncFiltersFromUrl(url);
        loadListing(url, false);
    });
 
    // ─── Start ───────────────────────────────────────────────────────────────────
    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', initFilterToggle);
    } else {
        initFilterToggle();
    }
</script>
 
 
<script src="/assets/js/utils.js?v=1" async></script>
 
 
 
 
  <?= $this->partial('layouts/footers/default') ?>
 
 
</body>
</html>
                            
# Phalcon\Mvc\View\Engine\Volt -> render
# Phalcon\Mvc\View -> engineRender
# Phalcon\Mvc\View -> processRender
# Phalcon\Mvc\View -> render
/srv/sites/simplyfit.shtest.pl/app/vendor/Dispatcher/Plugin.php (120)
<?php
 
namespace SH\Dispatcher;
 
use Phalcon\Di\Injectable;
use Phalcon\Events\Event;
use Phalcon\Http\ResponseInterface;
use Phalcon\Mvc\Dispatcher;
use SH\Application;
 
/**
 * Class Plugin
 * @package SH\Dispatcher
 * @property Application $application
 */
class Plugin extends Injectable
{
    function beforeDispatch(Event $event, Dispatcher $dispatcher): bool
    {
        $controllerClass = $dispatcher->getControllerClass();
        $activeMethod = $dispatcher->getActiveMethod();
 
        if (str_contains($controllerClass, 'FrontendController') || str_contains($controllerClass, 'AclController')) {
            return true;
            $user = $this->user->getIdentity();
 
            if ($user) {
                if ($user->role && $user->role !== 'su') {
                    $annotations = $this->annotations->get($controllerClass);
 
                    if ($annotations->getClassAnnotations() && $annotations->getClassAnnotations()->has('Acl')) {
                        $aclResource = $annotations->getClassAnnotations()->get('Acl');
                        $aclResource = $aclResource->getNamedParameter('label');
 
                        $aclMethod = $annotations->getMethodsAnnotations();
 
                        if (isset($aclMethod[$activeMethod])) {
                            $aclMethod = $aclMethod[$activeMethod];
 
                            if ($aclMethod->has('Acl')) {
                                $aclMethod = $aclMethod->get('Acl');
                                $aclMethod = $aclMethod->getNamedParameter('label');
 
                                if ($this->acl->isAllowed($user->role, $aclResource, $aclMethod) === false) {
                                    $this->response->redirect('/403');
 
                                    return false;
                                } else {
                                    return true;
                                }
                            }
                        }
                    }
                }
            }
        } else {
            $annotations = $this->annotations->get($controllerClass);
 
            if ($annotations->getClassAnnotations() && $annotations->getClassAnnotations()->has('Acl')) {
                $aclResource = $annotations->getClassAnnotations()->get('Acl');
                $aclResource = $aclResource->getNamedParameter('label');
 
                $aclMethod = $annotations->getMethodsAnnotations();
 
                if (isset($aclMethod[$activeMethod])) {
                    $aclMethod = $aclMethod[$activeMethod];
 
                    if ($aclMethod->has('Acl')) {
                        $aclMethod = $aclMethod->get('Acl');
                        $aclMethod = $aclMethod->getNamedParameter('label');
 
                        if ($this->acl->isAllowed($this->auth->getRoleName(), $aclResource, $aclMethod) === false) {
                            if ($this->auth->isGuest) {
                                $this->response->redirect('/admin/auth/login');
                            } else {
                                $this->response->redirect('/admin/main/code403');
                            }
 
                            return false;
                        } else {
                            return true;
                        }
                    }
                }
            }
 
 
        }
 
        return true;
    }
 
    function beforeDispatchLoop(Event $event, Dispatcher $dispatcher)
    {
        $module = $this->application->getModule($dispatcher->getModuleName());
 
        if (is_array($module) && isset($module['className'])) {
            $module = $this->di->get($module['className']);
        }
        $namespace = $module->getNamespace();
        $namespace .= '\controllers';
 
        $dispatcher->setNamespaceName($namespace);
    }
 
    function afterDispatchLoop(Event $event, Dispatcher $dispatcher)
    {
        $results = $dispatcher->getReturnedValue();
 
        if ($results instanceof ResponseInterface || $results === false) {
            $this->view->disable();
        } else {
            if (is_array($results) || is_null($results)) {
                if ($results) {
                    $this->view->setVars($results);
                } else {
                    $results = [];
                }
 
                $this->view->render($this->router->getModuleName() . '/' . $dispatcher->getControllerName(), $dispatcher->getActionName(), $results);
            }
        }
    }
}
                            
# SH\Dispatcher\Plugin -> afterDispatchLoop
# Phalcon\Events\Manager -> fireQueue
# Phalcon\Events\Manager -> fire
# Phalcon\Dispatcher\AbstractDispatcher -> dispatch
# Phalcon\Mvc\Application -> handle
/srv/sites/simplyfit.shtest.pl/app/vendor/Application.php (34)
<?php
 
namespace SH;
 
use Phalcon\Application\Exception;
 
//use const SH\IS_ADMIN;
 
/**
 * Class Application
 * @package SH
 * @property \SH\Views\MenuGenerator $MenuGenerator
 * @property \Phalcon\Autoload\Loader $loader
 */
class Application extends \Phalcon\Mvc\Application
{
    protected $_moduleNamespace = '';
 
    public function handle($uri = ''): \Phalcon\Http\ResponseInterface|bool
    {
        $nameSpaces = $this->loader->getNamespaces();
 
        if (isset($nameSpaces['app\modules\\']) === false) {
            throw new Exception("namespace app modules not defined");
        }
 
        $key = array_key_first((array)$nameSpaces['app\modules\\']);
        $this->_moduleNamespace = $nameSpaces['app\modules\\'][$key];
        $dirs = scandir($this->_moduleNamespace);
 
        $modules = $this->handleModules($this->_moduleNamespace, $dirs);
        $this->registerModules($modules);
 
        return parent::handle($uri);
    }
 
    protected function handleModules(string $path, array $dirs): array
    {
        $modules = [];
 
        foreach ($dirs as $dir) {
            $modulePath = "{$path}{$dir}";
            if (is_dir($modulePath) === false) {
                continue;
            } else {
                if (in_array($dir, ['.', '..'])) {
                    continue;
                } else {
                    if (file_exists($modulePath . "/Web.php") === false) {
                        continue;
                    }
                }
            }
 
            $moduleClass = str_replace($this->_moduleNamespace, '', $modulePath);
            $moduleClass = str_replace('/', '\\', $moduleClass);
            $moduleClass = 'app\modules\\' . $moduleClass . '\Web';
 
            $module = $this->getDI()->get($moduleClass);
            $module->registerAutoloaders($this->getDI());
            $module->registerServices($this->getDI());
 
            if (file_exists($modulePath . '/params/router.php')) {
                require_once $modulePath . '/params/router.php';
            }
 
            if (file_exists($modulePath . '/params/router_api.php')) {
                require_once $modulePath . '/params/router_api.php';
            }
 
            if (IS_ADMIN) {
                if (file_exists($modulePath . '/params/menu.php')) {
                    require_once $modulePath . '/params/menu.php';
                }
            }
 
            $modules[$dir] = ["className" => $moduleClass];
 
            $subModules = "{$modulePath}/modules/";
            if (is_dir($subModules)) {
                $subDirs = scandir($subModules);
                $subModules = $this->handleModules($subModules, $subDirs);
 
                $modules = array_merge($modules, $subModules);
            }
        }
 
 
        return $modules;
    }
}
                            
# SH\Application -> handle
/srv/sites/simplyfit.shtest.pl/public/index.php (54)
<?php
 
function dump ($stuff) {
    echo '<pre>' . print_r($stuff, true) . '</pre>'; 
}
 
function dd ($stuff) {
    dump($stuff);
}
 
date_default_timezone_set('Europe/Warsaw');
 
$admin_dir = 'admin';
 
defined('BASE_PATH') or define('BASE_PATH', dirname(__DIR__));
defined('APP_PATH') or define('APP_PATH', BASE_PATH . '/app');
const IS_CONSOLE = false;
 
if (preg_match('/^\/' . $admin_dir . '\/$/', $_SERVER['REQUEST_URI'])) {
    header('Location: /admin');
    die;
}
 
if (preg_match('/' . $admin_dir . '/', $_SERVER['REQUEST_URI'])) {
    defined('IS_ADMIN') or define('IS_ADMIN', true);
} else {
    defined('IS_ADMIN') or define('IS_ADMIN', false);
}
 
try {
    $loader = include APP_PATH . '/config/web/loader.php';
 
    $di = new Phalcon\Di\Di();
    $di->setShared('loader', $loader);
 
    include APP_PATH . '/config/web/services.php';
 
    $config = $di->get('config');
 
    if ($config->application->isDevelopment) {
        error_reporting(E_ALL);
        ini_set('display_errors', 1);
 
        $debug = new \Phalcon\Support\Debug();
        $debug->listen();
    }
 
    /**
     * Handle the request
     */
    $application = new \SH\Application($di);
    $di->setShared('application', $application);
 
    $application->handle($_SERVER['REQUEST_URI'])->send();
} catch (\Exception $e) {
    echo $e->getMessage();
}
                            
Key
Value
_url /artykuly
kategorie 32,63,72
Key
Value
USER www-data
HOME /var/www
SCRIPT_NAME /index.php
REQUEST_URI /artykuly?kategorie=32%2C63%2C72
QUERY_STRING _url=/artykuly&kategorie=32%2C63%2C72
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_QUERY_STRING _url=/artykuly&kategorie=32%2C63%2C72
REDIRECT_URL /artykuly
REMOTE_PORT 36446
SCRIPT_FILENAME /srv/sites/simplyfit.shtest.pl/public/index.php
SERVER_ADMIN admin@smartheads.pl
CONTEXT_DOCUMENT_ROOT /srv/sites/simplyfit.shtest.pl/public
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /srv/sites/simplyfit.shtest.pl/public
REMOTE_ADDR 216.73.216.191
SERVER_PORT 443
SERVER_ADDR 100.100.0.130
SERVER_NAME simplyfit.shtest.pl
SERVER_SOFTWARE Apache/2.4.52 (Ubuntu)
SERVER_SIGNATURE <address>Apache/2.4.52 (Ubuntu) Server at simplyfit.shtest.pl Port 443</address>\n
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
HTTP_HOST simplyfit.shtest.pl
HTTP_ACCEPT_ENCODING gzip, br, zstd, deflate
HTTP_COOKIE PHPSESSID=e3132d72a20fb21ae0a39e8fa11d44c3
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_ACCEPT */*
proxy-nokeepalive 1
SSL_TLS_SNI simplyfit.shtest.pl
HTTPS on
UNIQUE_ID aiNa9anZQHUAhXv9VLi0AwAAAQk
REDIRECT_STATUS 200
REDIRECT_SSL_TLS_SNI simplyfit.shtest.pl
REDIRECT_HTTPS on
REDIRECT_UNIQUE_ID aiNa9anZQHUAhXv9VLi0AwAAAQk
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1780701941.8636
REQUEST_TIME 1780701941
#
Path
0 /srv/sites/simplyfit.shtest.pl/public/index.php
1 /srv/sites/simplyfit.shtest.pl/app/config/web/loader.php
2 /srv/sites/simplyfit.shtest.pl/app/config/web/services.php
3 /srv/sites/simplyfit.shtest.pl/app/vendor/Auth.php
4 /srv/sites/simplyfit.shtest.pl/app/vendor/Query/Builder.php
5 /srv/sites/simplyfit.shtest.pl/app/vendor/DatabaseManager.php
6 /srv/sites/simplyfit.shtest.pl/app/config/web/config.php
7 /srv/sites/simplyfit.shtest.pl/app/vendor/Application.php
8 /srv/sites/simplyfit.shtest.pl/app/modules/acl/Web.php
9 /srv/sites/simplyfit.shtest.pl/app/vendor/Info/NamespaceInfo.php
10 /srv/sites/simplyfit.shtest.pl/app/vendor/Info/AclInfo.php
11 /srv/sites/simplyfit.shtest.pl/app/modules/admins/Web.php
12 /srv/sites/simplyfit.shtest.pl/app/modules/auth/Web.php
13 /srv/sites/simplyfit.shtest.pl/app/modules/auth/params/router.php
14 /srv/sites/simplyfit.shtest.pl/app/modules/auth/params/router_api.php
15 /srv/sites/simplyfit.shtest.pl/app/modules/categories/Web.php
16 /srv/sites/simplyfit.shtest.pl/app/modules/categories/params/router.php
17 /srv/sites/simplyfit.shtest.pl/app/modules/cities/Web.php
18 /srv/sites/simplyfit.shtest.pl/app/modules/cities/params/router.php
19 /srv/sites/simplyfit.shtest.pl/app/modules/config/Web.php
20 /srv/sites/simplyfit.shtest.pl/app/modules/config/modules/settlements/Web.php
21 /srv/sites/simplyfit.shtest.pl/app/modules/contact/Web.php
22 /srv/sites/simplyfit.shtest.pl/app/modules/contact/params/router.php
23 /srv/sites/simplyfit.shtest.pl/app/modules/dietician/Web.php
24 /srv/sites/simplyfit.shtest.pl/app/modules/diets/Web.php
25 /srv/sites/simplyfit.shtest.pl/app/modules/diets/params/router.php
26 /srv/sites/simplyfit.shtest.pl/app/modules/main/Web.php
27 /srv/sites/simplyfit.shtest.pl/app/modules/main/params/router.php
28 /srv/sites/simplyfit.shtest.pl/app/modules/main/params/router_api.php
29 /srv/sites/simplyfit.shtest.pl/app/modules/pages/Web.php
30 /srv/sites/simplyfit.shtest.pl/app/modules/pages/params/router.php
31 /srv/sites/simplyfit.shtest.pl/app/modules/pages/modules/articles/Web.php
32 /srv/sites/simplyfit.shtest.pl/app/modules/pages/modules/articles/params/router.php
33 /srv/sites/simplyfit.shtest.pl/app/modules/pages/modules/home/Web.php
34 /srv/sites/simplyfit.shtest.pl/app/modules/pages/modules/seo/Web.php
35 /srv/sites/simplyfit.shtest.pl/app/modules/pages/modules/sites/Web.php
36 /srv/sites/simplyfit.shtest.pl/app/modules/payout/Web.php
37 /srv/sites/simplyfit.shtest.pl/app/modules/previews/Web.php
38 /srv/sites/simplyfit.shtest.pl/app/modules/previews/params/router.php
39 /srv/sites/simplyfit.shtest.pl/app/modules/profile/Web.php
40 /srv/sites/simplyfit.shtest.pl/app/modules/profile/params/router.php
41 /srv/sites/simplyfit.shtest.pl/app/modules/promotions/Web.php
42 /srv/sites/simplyfit.shtest.pl/app/modules/reviews/Web.php
43 /srv/sites/simplyfit.shtest.pl/app/modules/reviews/params/router.php
44 /srv/sites/simplyfit.shtest.pl/app/modules/sale/Web.php
45 /srv/sites/simplyfit.shtest.pl/app/modules/sale/params/router.php
46 /srv/sites/simplyfit.shtest.pl/app/modules/sale/params/router_api.php
47 /srv/sites/simplyfit.shtest.pl/app/modules/sale/modules/orders/Web.php
48 /srv/sites/simplyfit.shtest.pl/app/modules/sale/modules/orderssf/Web.php
49 /srv/sites/simplyfit.shtest.pl/app/modules/static/Web.php
50 /srv/sites/simplyfit.shtest.pl/app/modules/static/params/router.php
51 /srv/sites/simplyfit.shtest.pl/app/modules/stats/Web.php
52 /srv/sites/simplyfit.shtest.pl/app/modules/uploader/Web.php
53 /srv/sites/simplyfit.shtest.pl/app/modules/uploader/params/router.php
54 /srv/sites/simplyfit.shtest.pl/app/modules/user/Web.php
55 /srv/sites/simplyfit.shtest.pl/app/modules/user/params/router.php
56 /srv/sites/simplyfit.shtest.pl/app/modules/user/params/router_api.php
57 /srv/sites/simplyfit.shtest.pl/app/modules/visits/Web.php
58 /srv/sites/simplyfit.shtest.pl/app/modules/visits/params/router.php
59 /srv/sites/simplyfit.shtest.pl/app/modules/widgets/Web.php
60 /srv/sites/simplyfit.shtest.pl/app/config/params.php
61 /srv/sites/simplyfit.shtest.pl/app/vendor/Dispatcher/Plugin.php
62 /srv/sites/simplyfit.shtest.pl/app/modules/pages/modules/articles/controllers/FrontendController.php
63 /srv/sites/simplyfit.shtest.pl/app/vendor/Controllers/FrontendController.php
64 /srv/sites/simplyfit.shtest.pl/app/vendor/Controllers/Controller.php
65 /srv/sites/simplyfit.shtest.pl/app/translation/pl.php
66 /srv/sites/simplyfit.shtest.pl/app/config/uparams.php
67 /srv/sites/simplyfit.shtest.pl/app/modules/pages/models/ArticlesTable.php
68 /srv/sites/simplyfit.shtest.pl/app/modules/categories/models/CategoriesTable.php
69 /srv/sites/simplyfit.shtest.pl/app/vendor/Views/Filters.php
70 /srv/sites/simplyfit.shtest.pl/cache/_srv_sites_simplyfit.shtest.pl_themes_simplyfit_articles_frontend_index.twig.php
71 /srv/sites/simplyfit.shtest.pl/app/vendor/Views/System.php
Memory
Usage 2097152