text: /**
   * @category    Magento 2
   * @package     Sendinblue_Sendinblue
   * URL:  https:www.sendinblue.com
   */
  define([
      'jquery',
      'Magento_Customer/js/customer-data',
      'mage/cookies'
  ], function ($, customerData) {
      'use strict';
  
      /**
       * @param {Object} config
       */
      return function (config) {
          var allowServices = false,
              allowedCookies,
              allowedWebsites;
  
          if (config.isCookieRestrictionModeEnabled) {
              allowedCookies = $.mage.cookies.get(config.cookieName);
  
              if (allowedCookies !== null) {
                  allowedWebsites = JSON.parse(allowedCookies);
  
                  if (allowedWebsites[config.currentWebsite] === 1) {
                      allowServices = true;
                  }
              }
          } else {
              allowServices = true;
          }
  
          if (allowServices && config.apikey != "") {
              let customer = customerData.get('customer');
              (function() {
                  window.sib = { equeue: [], client_key: config.apikey };
                  window.sib.email_id = customer.email;
                  window.sendinblue = {}; for (var j = ['track', 'identify', 'trackLink', 'page'], i = 0; i < j.length; i++) { (function(k) { window.sendinblue[k] = function() { var arg = Array.prototype.slice.call(arguments); (window.sib[k] || function() { var t = {}; t[k] = arg; window.sib.equeue.push(t);})(arg[0], arg[1], arg[2]);};})(j[i]);}var n = document.createElement("script"),i = document.getElementsByTagName("script")[0]; n.type = "text/javascript", n.id = "sendinblue-js", n.async = !0, n.src = "https://sibautomation.com/sa.js?key=" + window.sib.client_key, i.parentNode.insertBefore(n, i), window.sendinblue.page();
              })();
          }
      }
  });
  