(self["webpackChunk"] = self["webpackChunk"] || []).push([["js/TicketApp"],{

/***/ "../../lib/bundles/FrontofficeBundle/Resources/public/js/TicketApp/TicketApp.js":
/*!**************************************************************************************!*\
  !*** ../../lib/bundles/FrontofficeBundle/Resources/public/js/TicketApp/TicketApp.js ***!
  \**************************************************************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

var _defineProperty = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js");
var _slicedToArray = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js");
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
/** Application "Prise de pari" (pour les paris classiques et bundles) */
TicketApp = function TicketApp(idCourse, criteresJeton) {
  var _this = this;
  var self = this,
    $ticketJeu = $('#tickets-de-jeu'),
    $selectionPari = $('#selection-pari');

  // Pour l'implémentation du pont entre interface et code
  this._course = idCourse; // Numéro (id) de la course
  this._mode = null; // Unitaire, Réduit ou Total (quand applicable)
  this._connector = null; // Le connecteur IHM <-> combinatoire
  this._prefill = null;
  this._view = 'desktop'; // Quelle vue
  this._autoHideTimer = null; // ID du timer pour la fermeture automatique en mode mobile
  this._originePanier = OrigineParis.WebDesktopPanier; // Origine pour le panier (dépendra de la vue)
  this._origineDirect = OrigineParis.WebDesktopDirect; // Origine pour la validation directe (dépendra de la vue)
  this._criteresJeton = criteresJeton;
  this._jetonClient = null;
  this._disableReduit = false;
  this._jetonEnabled = false;
  this._ticketIsValid = true;
  this._nbCombinaisonTotal = 0;
  this._libelleSummary = '';

  // Gestion de la monnaie
  $('.total-wrapper .total').addClass(ZEturfCurrency.cssClass);
  $selectionPari.find('.vertical-link').click(function (e) {
    if (ZEVolatilePreferences.getValue('confirmer_page_course_vers_vertical', true)) {
      e.preventDefault();
      var $linkElement = $(this);
      Modal.openModalHTMLWithDontShowAnymore(ZEturf.text.ticket_confirmation_page_vertical_titre, ZEturf.text.ticket_confirmation_page_vertical_corps, 'confirmer_page_course_vers_vertical', [{
        label: ZEturf.text.bouton.confirmer,
        class: 'close',
        callback: function callback() {
          window.location.href = $linkElement.attr('href');
        }
      }, Modal.buttons.annuler], 'modalWithDontShowAgainPreference');
      return false;
    }
  });

  // Lorsqu'on selectionne un pari avec un event tactile, on set une classe specifique qui sera utilisé pour
  // remettre le bon label dans _updateUI
  $selectionPari.find('button').on('touchstart', function (e) {
    return $(e.currentTarget).addClass('tapped');
  });

  // Handlers "changement de pari"
  $selectionPari.find('button').click(function () {
    var simpleGagnant = false,
      simplePlace = false;
    $.each($('.liste-pari .chk-change-pari'), function () {
      if (parseInt($(this).attr('value')) === 1) {
        simpleGagnant = true;
      }
      if (parseInt($(this).attr('value')) === 2) {
        simplePlace = true;
      }
    });
    var wholeGroup = simpleGagnant && simplePlace ? true : null;
    self.onBetChange(this.value, self._mode, wholeGroup);
  });
  $('.type-combine').find('button').click(function () {
    self.onModeChange(this.value);
    self._connector._updateTicket();
  });
  $('button.cart').click(function () {
    self.onPanier();
  });
  $('button.validate').click(function () {
    self.onEnvoiDirect();
  });
  $ticketJeu.find('input[name=use-jeton]').change(function (e) {
    if (!_this._ticketIsValid) {
      return;
    }
    _this._jetonEnabled = $(e.currentTarget).prop('checked');
    $ticketsDeJeu = $('#tickets-de-jeu');
    $ticketsDeJeu.find('.cart-btn-container *, .cart-btn-container').toggle(!_this._jetonEnabled).attr('disabled', _this._jetonEnabled);
    $ticketsDeJeu.find('.validate').attr('disabled', !_this._checkJetonValid());
    if (!_this._jetonEnabled && !_this._checkMontantJetonEnoughWithCurrentTicket()) {
      $ticketsDeJeu.find('.enable-jeton').addClass('read-only').attr('title', ZEturf.text.pari_ticket_montant_jeton_depassee);
    }
  });

  // Bouton panique
  $ticketJeu.find('button.panic').click(function () {
    self.onPanicButton();
  });

  // Voir les combinaisons
  $ticketJeu.find('button.recap-see').click(function () {
    self.onRecapSee();
  });

  // Déplier le ticket (mobile)
  $ticketJeu.find('button.show-ticket').click(function () {
    self.onMobileTicketShow();
  });
  var pariSelected = false;
  var prefill = window.location.search.match(/prefill=([A-Z0-9:\-]+)(&|$)/) || [];
  if (prefill.length) {
    this._prefill = this._readPrefill(prefill[1]);
    // Simule le clic-pari, ce qui va utiliser this._prefill comme s'il s'agissait
    // de s'initialiser avec un pari précedemment sélectionné.
    var $prefillBtn = $selectionPari.find('button[value=' + this._prefill.pari + ']:visible');
    if ($prefillBtn.length) {
      $prefillBtn.click();
      pariSelected = true;
    }
  }
  if (!pariSelected) {
    // Fais comme s'il n'y avait aucun pari de sélection... Ce qui est le cas !
    this.onTicketChange(false, []);
  }

  // Toutes les "input box" du ticket doivent sélectionner le texte complet
  // quand on les focus. On procède par délégation ce qui évite d'avoir X handlers qui trainent

  // apres une recherche faite sur cette fonction qui affiche une erreur au niveau de la console "setSelectionRange".
  // j'ai trouvé un article qui explique que c'est un bug au niveau des navigateurs, et a été fixé par un changement d'ordre d'ecriture.
  // lien vers l'article qui explique ce changemennt : https://bugs.chromium.org/p/chromium/issues/detail?id=32865.
  // ce code a été testé sur 4 navigateurs (safari 'mac', chromium, chrome, firefox).
  $ticketJeu.on('input', 'click', function () {
    this.setSelectionRange(0, 9999);
  });

  // Différents modes selon que l'on est mobile, desktop ou tablet.
  // On lit ça une fois pour toute à l'init car on ne supporte pas le changement en cours de route
  if (!Front.isDesktopView()) {
    this._view = Front.isMobileView() || Front.isSmallTabletView() ? 'mobile' : 'tablet';
    this._originePanier = OrigineParis.WebMobilePanier;
    this._origineDirect = OrigineParis.WebMobileDirect;
  }
  this._updateUI();
  this.initTutos();
  PariStateManager.restoreState(this);
  return this;
};
TicketApp.prototype._readPrefill = function (string) {
  var state = new ConnectorHelper.getSaveSlot();

  // Le prefill a la forme "TRI:1-2-3"
  var _string$split = string.split(':'),
    _string$split2 = _slicedToArray(_string$split, 2),
    pariIdentifier = _string$split2[0],
    runnerList = _string$split2[1];
  var pariId = parseInt(pariIdentifier);

  // Pari donné sous son nom court : on recherche l'identifiant numérique
  if (isNaN(pariId)) {
    PariZEturf.rules.ZEforEach(function (pari, data) {
      if (data.short === pariIdentifier) {
        state.pari = parseInt(pari);
      }
    });
  } else {
    state.pari = pariId;
  }

  // Id invalide -> utilise le SG
  if (!PariZEturf.getRules(state.pari) || !$("#selection-pari button[value=".concat(state.pari, "]")).length) {
    state.pari = PariZEturf.SimpleGagnant;
  }

  // Mémorise les runners
  if (runnerList) {
    var _iterator = _createForOfIteratorHelper(runnerList.split('-')),
      _step;
    try {
      for (_iterator.s(); !(_step = _iterator.n()).done;) {
        var runner = _step.value;
        // Evite les runners bidons et non-partants
        if (parseInt(runner) && $('tr button[value=' + runner + ']').length) {
          state.selections.push(runner);
          state.montants.push(ConfigurationMontantsParis.getMontantParDefaut(state.pari, 1));
        }
      }
    } catch (err) {
      _iterator.e(err);
    } finally {
      _iterator.f();
    }
  }
  return state;
};
TicketApp.prototype._setConnector = function (constructor, pari, mode, parisSimultanes, parisInitiaux) {
  var isSameGroup = pari && this._connector && parisSimultanes && parisSimultanes.indexOf(pari) !== -1;
  if (isSameGroup) {
    this._connector.getParis().forEach(function (pari) {
      isSameGroup &= parisSimultanes.indexOf(pari) !== -1;
    });
  }
  if (pari && this._mode === (mode || null) && isSameGroup) {
    // On peut utiliser le même connecteur
    // Unique pari ? pas touche
    if (this._connector.getParis().length > 1 || !this._connector.hasPari(pari)) {
      this._connector.hasPari(pari) ? this._connector.removePari(pari) : this._connector.addPari(pari);
    }
  } else {
    // Si un prefill existe, on l'utilise
    var state = this._prefill || null;

    // Changement de groupe de paris ou de mode : on doit réinstancier un connecteur
    if (this._connector) {
      // Déconnection si précédent connecteur, avec enregistrement de l'état
      // S'il s'agit juste d'un changement mode au sein du groupe simultané, on va reproduire
      // la sélection de paris
      if (isSameGroup) {
        parisInitiaux = this._connector.getParis();
      }
      state = state || this._connector.detach();
      this._connector = null;
    }

    // Si le pari ne sait pas enregistrer son état, on ne met un vide à la place
    if (pari) {
      state = state || ConnectorHelper.getSaveSlot();
      $('.flashmessage').hide();

      // Instancie le connecteur
      this._connector = new constructor({
        app: this,
        course: this._course,
        pari: pari,
        view: this._view,
        state: state,
        container: 'body' // Restreindre le périmètre du DOM
      });

      (parisInitiaux || parisSimultanes || [pari]).forEach(function (pari) {
        this._connector.addPari(pari);
      }, this);
    }
    this._mode = mode || null;
    this._prefill = null;
  }
  this.updateTicketSummary();
};
TicketApp.prototype.updateTicketSummary = function () {
  var _this2 = this;
  if (this._connector) {
    this.updateModeButtons();
    var currentParis = this._connector.getParis();
    var availableParis = $('.liste-pari button').map(function (i, b) {
      return parseInt(b.getAttribute('value'));
    }).toArray();
    var initData = {
      combinaisonCount: this._nbCombinaisonTotal,
      mode: this._mode,
      ordre: this._connector._ordre,
      availableParis: availableParis,
      currentParis: currentParis,
      disableReduit: this._disableReduit,
      libelle: this._libelleSummary,
      onModeChange: function onModeChange(mode) {
        return _this2.onModeChange(mode);
      },
      onReset: function onReset() {
        return _this2.onPanicButton();
      },
      onShowCombinaisons: function onShowCombinaisons() {
        return _this2.onRecapSee();
      },
      onShowTicket: function onShowTicket() {
        return _this2.onMobileTicketShow();
      },
      onSelectPari: function onSelectPari(pari) {
        _this2.onBetChange(pari, _this2._mode, currentParis.filter(function (pari) {
          return [PariZEturf.SimpleGagnant, PariZEturf.SimplePlace].includes(pari);
        }).length === 2);
      },
      onSelectOrdre: function onSelectOrdre(ordre) {
        return _this2._connector.onOrdre(ordre);
      }
    };
    TicketHelper.init(initData);
  } else {
    TicketHelper.clear();
  }
};
TicketApp.prototype._unsetConnector = function () {
  // // Supprime le connecteur existant
  this._setConnector();
  this._updateUI();
  this.onTicketChange(false, []);
};
TicketApp.prototype._updateUI = function () {
  // Le/les pari(s) sélectionné(s)
  var self = this,
    paris = this._connector ? this._connector.getParis() : [],
    $selectionPari = $('#selection-pari'),
    $ticketJeu = $('#tickets-de-jeu'),
    $typesCombines = $ticketJeu.find('.type-combine'),
    hideClass = paris.length ? '.pari-non-selectionne' : '.pari-selectionne',
    showClass = paris.length ? '.pari-selectionne' : '.pari-non-selectionne';
  $selectionPari.find('button').ZEsetClassIf(function () {
    return paris.indexOf(+this.value) !== -1;
  }, 'selected');

  // Sur mobile le mouseleave est trigger avec le touchend, le texte affiché n'est donc pas bon, ici si on a cliqué
  // avec un device tactile, on trigger manuellement pour toujours afficher le label du permier pari sélectionné
  if ($selectionPari.find('button.tapped').length !== 0) {
    $selectionPari.find('button.tapped').removeClass('tapped');
    $selectionPari.find('button.selected').first().trigger('mouseleave');
  }
  $ticketJeu.find('footer').find(hideClass).hide();
  $ticketJeu.find('footer').find(showClass).show();

  // Le mode
  this._connector && this._mode ? $typesCombines.show() : $typesCombines.hide();
  $('.type-combine button').ZEsetClassIf(function () {
    return self._mode === this.value;
  }, 'selected');
  if (!this._connector) {
    $('.lucky-btn').attr('disabled', true);
  }
  $selectionPari.ZEsetClassIf(!this._connector, 'no-selection');
  this._showMessagePromoPari();
  this._showMessageBoost();
};
TicketApp.prototype._checkJetonValid = function () {
  return this._isJetonEnabled() ? this._checkMontantJetonEnoughWithCurrentTicket() : true;
};
TicketApp.prototype._checkMontantJetonEnoughWithCurrentTicket = function () {
  var _this$_jetonClient;
  var valeurTicket = Combinaisons.roundingError(Combinaisons.getValeur(this._combinaisons));
  return valeurTicket <= ((_this$_jetonClient = this._jetonClient) === null || _this$_jetonClient === void 0 ? void 0 : _this$_jetonClient.jeton.montant);
};
TicketApp.prototype._unactiveJeton = function () {
  var $blocJeton = $('.enable-jeton');
  $blocJeton.addClass('hidden').find('input[name=use-jeton]').prop('checked', false).trigger('change');
};
TicketApp.prototype._updateJeton = function () {
  var _this3 = this;
  if (!this._ticketIsValid) {
    this._unactiveJeton();
    return;
  }
  var pari = this._combinaisons.length ? this._combinaisons[0].pari : null;
  Jeton.getJetonClient(_objectSpread(_objectSpread({}, this._criteresJeton), {}, _defineProperty({}, ZEturf.constant.TypeJetonCritere.PARI, pari))).then(function (jetonClient) {
    var $blocJeton = $('.enable-jeton');
    // On fait ce check a l'intérieur pour éviter les délais de résolution dues au fetch
    if (jetonClient && _this3._combinaisons.length === 1 && !PariZEturf.getRules(_this3._combinaisons[0].pari).bundle) {
      _this3._jetonClient = jetonClient;
      $blocJeton.removeClass('hidden').removeClass('read-only').removeAttr('title');
      if (!_this3._checkMontantJetonEnoughWithCurrentTicket()) {
        if (_this3._isJetonEnabled()) {
          Front.flashMessage.warning(ZEturf.text.pari_ticket_montant_jeton_depassee);
        } else {
          $('.enable-jeton').addClass('read-only').attr('title', ZEturf.text.pari_ticket_montant_jeton_depassee);
        }
      }
    } else {
      _this3._unactiveJeton();
    }
  });
};
TicketApp.prototype._isJetonEnabled = function () {
  return this._jetonEnabled && this._jetonClient;
};
TicketApp.prototype.onBetChange = function (pari, mode, wholeGroup) {
  // Typage propre pour le switch/case notamment
  pari = parseInt(pari);
  $ticketJeu = $('#tickets-de-jeu .ticket-de-jeu');
  $ticketJeu.find('.montant-ticket-min-info').addClass('hidden');
  if (PariZEturf.getRules(pari).show_min_ticket_info) {
    $ticketJeu.find('.montant-ticket-min-info .montant-ticket-min').html(Front.format(ConfigurationMontantsParis.getMontantTicketMin(pari)));
    $ticketJeu.find('.montant-ticket-min-info').removeClass('hidden');
  }
  $ticketJeu.removeClass(function (index, className) {
    return (className.match(/(^|\s)pari-\S+/g) || []).join(' ');
  }).addClass('pari-' + pari);
  switch (pari) {
    case PariZEturf.SimpleGagnant:
    case PariZEturf.SimplePlace:
      // SP et SG fonctionnent par paire
      this._setConnector(ConnectSimple, pari, null, [PariZEturf.SimpleGagnant, PariZEturf.SimplePlace], wholeGroup ? null : [pari]);
      break;
    case PariZEturf.ZEshow:
    case PariZEturf.ZEcouillon:
      this._setConnector(ConnectSimple, pari);
      break;
    case PariZEturf.JumeleGagnant:
    case PariZEturf.JumelePlace:
      mode = mode || PariCombineDesordre.modeUnitaire;
      switch (mode) {
        case PariCombineDesordre.modeReduit:
          this._setConnector(ConnectDesordreReduit, pari, mode, [PariZEturf.JumeleGagnant, PariZEturf.JumelePlace], [pari]);
          break;
        case PariCombineDesordre.modeTotal:
          this._setConnector(ConnectDesordreTotal, pari, mode, [PariZEturf.JumeleGagnant, PariZEturf.JumelePlace], [pari]);
          break;
        case PariCombineDesordre.modeUnitaire:
        default:
          this._setConnector(ConnectDesordreUnitaire, pari, mode, [PariZEturf.JumeleGagnant, PariZEturf.JumelePlace], [pari]);
          break;
      }
      break;
    case PariZEturf.Trio:
    case PariZEturf.ZE4:
    case PariZEturf.ZE5:
    case PariZEturf.ZE2sur4:
      mode = mode || PariCombineDesordre.modeUnitaire;
      switch (mode) {
        case PariCombineDesordre.modeReduit:
          this._setConnector(ConnectDesordreReduit, pari, mode);
          break;
        case PariCombineDesordre.modeTotal:
          this._setConnector(ConnectDesordreTotal, pari, mode);
          break;
        case PariCombineDesordre.modeUnitaire:
        default:
          this._setConnector(ConnectDesordreUnitaire, pari, mode);
          break;
      }
      break;
    case PariZEturf.JumeleOrdre:
    case PariZEturf.Triordre:
    case PariZEturf.ZE4ordre:
    case PariZEturf.Z3plus:
    case PariZEturf.Z4plus:
    case PariZEturf.Z5plus:
    case PariZEturf.ZE5Ordre:
      mode = mode || PariCombineDesordre.modeUnitaire;
      switch (mode) {
        case PariCombineDesordre.modeReduit:
          this._setConnector(ConnectOrdreReduit, pari, mode);
          break;
        case PariCombineDesordre.modeTotal:
          this._setConnector(ConnectOrdreTotal, pari, mode);
          break;
        case PariCombineDesordre.modeUnitaire:
        default:
          this._setConnector(ConnectOrdreUnitaire, pari, mode);
          break;
      }
      break;
    case PariZEturf.ZE234:
    case PariZEturf.ZE345:
      mode = mode || PariCombineDesordre.modeUnitaire;
      switch (mode) {
        case PariCombineDesordre.modeReduit:
          this._setConnector(ConnectBundleDesordreReduit, pari, mode);
          break;
        case PariCombineDesordre.modeTotal:
          this._setConnector(ConnectBundleDesordreTotal, pari, mode);
          break;
        case PariCombineDesordre.modeUnitaire:
        default:
          this._setConnector(ConnectBundleDesordreUnitaire, pari, mode);
          break;
      }
      break;
    case PariZEturf.SuperSimple:
      this._setConnector(ConnectBundleSimple, pari);
      break;
    default:
      throw 'Je ne sais pas comment jouer un pari ID ' + pari;
  }

  // On set une classe specifique sur le bouton du selecteur de pari de la page,
  // il sera utilisé pour remettre le bon label dans _updateUI
  $('#selection-pari').find("button[value=".concat(pari, "]")).addClass('tapped');
  this._updateUI();
  PariStateManager.saveStateFr(this);
};

/** Change le mode de sélection (pour les paris en base/combiné) */
TicketApp.prototype.onModeChange = function (mode) {
  if (this._connector && this._mode !== mode) {
    this.onBetChange(this._connector.getParis()[0], mode, true);
  }
  return this;
};
TicketApp.prototype._showMessageBoost = function () {
  $('#tickets-a-jouer .ticket-de-jeu .boost').remove();
  var $boostBtn = $('#selection-pari button.selected[data-boost]').first();
  if ($boostBtn.length) {
    $('#tickets-a-jouer .ticket-de-jeu .bandeau').before("\n\t\t\t<div class=\"boost\" data-pari=\"".concat($boostBtn.val(), "\">\n\t\t\t\t<div class=\"picto-pari\">\n\t\t\t\t\t<span class=\"paris-carre_30x25_").concat($boostBtn.val(), "\"></span>\n\t\t\t\t</div>\n\t\t\t\t").concat(ZEturf.text.pari_ticket_boost.replace('%montant%', $boostBtn.data('boost')), "\n\t\t\t</div>\n\t\t"));
  }
};

// Affiche le message de promotion sur un pari, si un seul pari est sélectionné et éligible
// Si on est sur de la multiselection, on affiche le message du premier pari en selection, sinon on n'affiche rien
TicketApp.prototype._showMessagePromoPari = function () {
  var _this4 = this;
  var $intitulePromoPariTicketJeu = $('#tickets-de-jeu .ticket-jeu-promo-pari');
  var btnPariSelectionnes = $('#selection-pari button.selected').toArray();
  var btnDisplayedPromoPari = btnPariSelectionnes.filter(function (btn) {
    return btn.dataset.operationsMarketing;
  });
  var displayPromo = btnDisplayedPromoPari.length > 0 && btnPariSelectionnes.length === 1;
  if (btnDisplayedPromoPari.length > 0) {
    if (this._combinaisons && !displayPromo) {
      var _iterator2 = _createForOfIteratorHelper(btnDisplayedPromoPari),
        _step2;
      try {
        var _loop = function _loop() {
          var btnPari = _step2.value;
          var pari = parseInt(btnPari.value);
          if (_this4._combinaisons.find(function (c) {
            return c.pari === pari;
          })) {
            displayPromo = true;
            btnDisplayedPromoPari = [btnPari];
            return "break";
          }
        };
        for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
          var _ret = _loop();
          if (_ret === "break") break;
        }
      } catch (err) {
        _iterator2.e(err);
      } finally {
        _iterator2.f();
      }
    }
  }
  $intitulePromoPariTicketJeu.html(displayPromo ? btnDisplayedPromoPari[0].dataset.operationsMarketing : '');
  $intitulePromoPariTicketJeu.toggle(displayPromo);
};
TicketApp.prototype.onTicketChange = function (isValid, combinaisons) {
  var $ticketsDeJeu = $('#tickets-de-jeu'),
    $totalWrapper = $('.total-wrapper'),
    $tutoValiderUnPari = $('.tuto_valider_un_pari'),
    nombreCombinaisonsValides = 0;
  this._combinaisons = isValid ? combinaisons : [];
  this._ticketIsValid = isValid;
  PariStateManager.saveStateFr(this);

  // Calcule le montant total du ticket, dont dépendra la possibilité de le valider ou non
  var valeurTicket = Combinaisons.roundingError(Combinaisons.getValeur(combinaisons || []));

  // Calcule le nombre de combinaisons (de premier niveau, les bundles comptent comme 1)
  this._combinaisons.forEach(function (combinaison) {
    if (combinaison.groupe) {
      // Bundle
      var combiBundle = 999999;
      combinaison.groupe.forEach(function (bundle) {
        combiBundle = Math.min(bundle.combinaisons.length, combiBundle);
      });
      nombreCombinaisonsValides += combiBundle;
    } else {
      nombreCombinaisonsValides += combinaison.combinaisons.length;
    }
  });
  var formattedValue = valeurTicket;
  if (this._connector) {
    var paris = this._connector.getParis();
    this._showMessagePromoPari();
    if (paris[0]) {
      formattedValue = ZEturfCurrency.formatMontantMiseForPari(valeurTicket, paris[0]);
      if (PariZEturf.getRules(paris[0]).show_min_ticket_info) {
        var hideMontantMinInfo = valeurTicket >= ConfigurationMontantsParis.getMontantTicketMin(paris[0]);
        $ticketJeu.find('.montant-ticket-min-info').toggleClass('hidden', hideMontantMinInfo);
      }
    }
  }
  isValid &= valeurTicket > 0 && this._checkJetonValid();
  if (isValid) {
    $('.flashmessage').hide();
  }
  $totalWrapper.find('.montant').val(formattedValue);
  $ticketsDeJeu.find('footer').find('button').attr('disabled', !isValid);
  $ticketsDeJeu.find('.validate').attr('disabled', !isValid);
  $ticketsDeJeu.find('.confirm.show-ticket').css('display', isValid ? 'initial' : 'none');
  if (valeurTicket && nombreCombinaisonsValides) {
    $totalWrapper.show();
    if ($tutoValiderUnPari.hasClass('tuto-available')) {
      $tutoValiderUnPari.show();
    }
  } else {
    $totalWrapper.hide();
    $tutoValiderUnPari.hide();
  }

  // Partie mobile : Affiche les combinaisons dans le récap mobile
  var combiRecap = {};

  // Liste, compte et groupe les combinaisons - on repart des combinaisons même incomplètes comme ça sert aussi lors de la construction des combinaisons
  (combinaisons || []).forEach(function (combinaison) {
    // On vire la notion de tous ordre dans le libellé affiché en mobile
    combiRecap[combinaison.libelle.split(' (').shift()] = true;
  });
  this._nbCombinaisonTotal = nombreCombinaisonsValides;
  // Si on pas de combi valides (a cause du montant de ticket min), on va récupérer le nombre de combinaisons total
  // pour l'affichage mobile afin de pouvoir modifier la mise min
  if (!this._nbCombinaisonTotal && combinaisons !== null && combinaisons !== void 0 && combinaisons.length && !PariZEturf.getRules(combinaisons[0].pari).bundle) {
    this._nbCombinaisonTotal = combinaisons.map(function (c) {
      return c.combinaisons.length;
    }).reduce(function (sum, count) {
      return sum + count;
    }, 0);
  }
  this._libelleSummary = Object.keys(combiRecap).join(' - ');
  var $montantTotal = $('#ticketTotal');
  $montantTotal.width(($montantTotal.val() || '').toString().length + 'ch');
  this._updateJeton();
  this.updateTicketSummary();
};
TicketApp.prototype.updateModeButtons = function () {
  var _PariZEturf$getRules;
  $('.type-combine button').attr('disabled', false);
  if (this._connector && ((_PariZEturf$getRules = PariZEturf.getRules(this._connector.getParis()[0])) === null || _PariZEturf$getRules === void 0 ? void 0 : _PariZEturf$getRules.runners) > 1 && [PariCombineDesordre.modeReduit, PariCombineDesordre.modeTotal].includes(this._mode)) {
    var _this$_connector$_mas;
    var refLogic = (_this$_connector$_mas = this._connector._masterLogic) !== null && _this$_connector$_mas !== void 0 ? _this$_connector$_mas : this._connector._logic;
    var selectedRunners = $.unique(refLogic.getBases().concat(refLogic.getCombines()));
    this._disableReduit = selectedRunners.length === $('.table-runners tr[data-runner]').length;
    var selectedMode = this._disableReduit ? PariCombineDesordre.modeTotal : PariCombineDesordre.modeReduit;
    $('.type-combine button').removeClass('selected');
    $(".type-combine button[value=\"".concat(selectedMode, "\"]")).addClass('selected');
    if (this._disableReduit) {
      $(".type-combine button[value=\"".concat(PariCombineDesordre.modeReduit, "\"]")).attr('disabled', true);
    }
    if (this._mode !== selectedMode) {
      this._mode = selectedMode;
      PariStateManager.saveStateFr(this);
    }
  } else {
    this._disableReduit = false;
  }
};
TicketApp.prototype.onPanicButton = function () {
  $('input[name=use-jeton]').prop('checked', false).trigger('change');
  this._jetonClient = null;
  if (this._connector) {
    PariStateManager.deleteStoredState();
    var paris = this._connector.getParis();
    var mode = this._mode ? PariCombineDesordre.modeUnitaire : null;

    // Fermer la popin quand elle est affichée
    if ($('body').hasClass('no-scroll')) {
      this.onMobileTicketShow();
    }

    // Enlève toute l'interface
    this._unsetConnector();

    // Réinstancie les mêmes paris
    paris.forEach(function (pari) {
      this.onBetChange(pari, mode, false);
    }, this);
  }
};
TicketApp.prototype.onRecapSee = function () {
  CartApp.showCombinaisons(Combinaisons.flatten(this._combinaisons || []));
};
TicketApp.prototype._cancelAutoHide = function () {
  if (this._autoHideTimer) {
    window.clearInterval(this._autoHideTimer);
    this._autoHideTimer = null;
    return true;
  } else {
    return false;
  }
};
TicketApp.prototype._autoHide = function () {
  var self = this;
  this._autoHideTimer = window.setInterval(function () {
    if (self._cancelAutoHide()) {
      self.onMobileTicketShow();
    }
  }, 3000); // 3 secondes
};

TicketApp.prototype.onPanier = function () {
  CartApp.addToCart(this._combinaisons, this._originePanier);
  this._unsetConnector();
  Front.flashMessage.success(ZEturf.text.pari_ticket_mis_au_panier);
  PariStateManager.deleteStoredState();
  if (this._view === 'mobile') {
    this._autoHide();
  }
  return this;
};
TicketApp.prototype._doEnvoiDirect = function () {
  var that = this;

  // Définit l'origine des paris
  this._combinaisons = Combinaisons.setOrigine(this._combinaisons, this._origineDirect);
  if (this._isJetonEnabled()) {
    var _iterator3 = _createForOfIteratorHelper(this._combinaisons),
      _step3;
    try {
      for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
        var combi = _step3.value;
        combi.jeton_client = this._jetonClient.id;
      }
    } catch (err) {
      _iterator3.e(err);
    } finally {
      _iterator3.f();
    }
  }
  var directSend = new CartSend(this._combinaisons, {
    readyToSend: function readyToSend() {
      // Envoie le ticket
      this.sendTicket();
    },
    updateDisplay: function updateDisplay() {
      // Décoche les NPs, et retire les cases à cocher
      this.getNps(that._course).forEach(function (np) {
        $('.base button[value=' + np + ']').parentsUntil('tr').parent().addClass('blur');
        $('.table-runners button[value=' + np + '].selected').click();
        $('.table-runners button[value=' + np + ']').remove();
      });
    },
    ticketSent: function ticketSent(isOK, errorCode) {
      if (isOK) {
        var combinaisons = that._combinaisons;
        that._unsetConnector();
        PariStateManager.deleteStoredState();
        if (Combinaisons.isSportechTotalisateur(combinaisons)) {
          Front.flashMessage.info(ZEturf.text.pari_ticket_demande_pris_en_compte);
        } else {
          Front.flashMessage.success(ZEturf.text.pari_ticket_bien_pris_en_compte);
        }

        // On supprime le jeton de la liste dispo coté client si le ticket a été envoyé avec succès
        if (that._isJetonEnabled()) {
          Jeton.removeJetonClient(that._jetonClient);
          that._jetonClient = null;
        }
        if (that._view === 'mobile') {
          var $ticketContentFooter = $('#tickets-a-jouer .ticket-de-jeu footer');
          $ticketContentFooter.hide();
          // Ferme la popin une fois le ticket soumis
          that._autoHide();
        }
        SessionNotification.checkSessionNotifications();
      } else if (errorCode === 'ticket.refused.redis_technical_error') {
        // Redis HS : ne pas donner envie de renvoyer le même pari ! On clear.
        that._unsetConnector();
      }
      ConnectorHelper.updateSelectedRunners();
    }
  });
  if (directSend._checkUserCanBet()) {
    directSend.init();
  }
};
TicketApp.prototype._showModalEnvoiDirect = function (titre, texte, preference) {
  var _this5 = this;
  Modal.openModalHTMLWithDontShowAnymore(titre, texte, preference, [{
    label: ZEturf.text.bouton.confirmer,
    class: 'close',
    callback: function callback() {
      Modal.close();
      _this5._doEnvoiDirect();
    }
  }, Modal.buttons.annuler], 'modalWithDontShowAgainPreference');
};
TicketApp.prototype.onEnvoiDirect = function () {
  if (this._isJetonEnabled() && this._combinaisons[0].montant < this._jetonClient.jeton.montant && ZEVolatilePreferences.getValue('confirmer_validation_montant_jeton_max_non_atteint', true)) {
    this._showModalEnvoiDirect(ZEturf.text.ticket_confirmation_pari_montant_jeton_non_atteint_titre, ZEturf.text.ticket_confirmation_pari_montant_jeton_non_atteint_corps, 'confirmer_validation_montant_jeton_max_non_atteint');
  } else if (ZEVolatilePreferences.getValue('confirmer_validation_sans_panier', true) && ![PariZEturf.Z3plus, PariZEturf.Z4plus, PariZEturf.Z5plus].includes(this._combinaisons[0].pari)) {
    this._showModalEnvoiDirect(ZEturf.text.ticket_confirmation_pari_sans_panier_titre, ZEturf.text.ticket_confirmation_pari_sans_panier_corps, 'confirmer_validation_sans_panier');
  } else {
    // Appui sur le bouton d'envoi direct, alors que la confirmation est désactivée :
    // on envoie.
    this._doEnvoiDirect();
  }
  return this;
};
TicketApp.prototype.onMobileTicketShow = function () {
  var $body = $('body'),
    $ticketJeu = $('#tickets-de-jeu'),
    $ticketContent = $('#tickets-a-jouer .ticket-de-jeu');

  // Si on attendait de fermer la popup automatiquement, on annule puisque l'utilisateur
  // vient de faire une action - pas de parasitage SVP
  this._cancelAutoHide();
  if ($ticketContent.hasClass('overlayed')) {
    $body.removeClass('no-scroll');
    $ticketJeu.find('.veil').hide();
    $ticketContent.removeClass('overlayed');
  } else {
    $body.addClass('no-scroll');
    $ticketJeu.find('.veil').show();
    $ticketContent.addClass('overlayed');
  }

  // Pour réafficher les controls au prochain ticket
  $ticketContent.find('footer').show();
};
TicketApp.prototype.onPageCourseStateChange = function (etat) {
  // Passage en course live : le ticket de jeu est complètement désactivé
  if (parseInt(etat) === 3) {
    this._unsetConnector();
  }
};
TicketApp.prototype.initTutos = function () {
  // Tuto "comment valider"
  var steps = [{
    element: $('.recap-details footer')[0],
    intro: ZEturf.text.tuto_validation_ticket.step1
  }, {
    element: $('.recap-details .validate')[0],
    intro: ZEturf.text.tuto_validation_ticket.step2
  }, {
    element: $('.recap-details .cart')[0],
    intro: ZEturf.text.tuto_validation_ticket.step3
  }];
  if (this._view !== 'mobile') {
    steps.push({
      element: $('.recap-details .recap-see')[0],
      intro: ZEturf.text.tuto_validation_ticket.step4
    });
  }
  Front.bindTuto('afficher_tuto_validation_ticket', $('#tickets-de-jeu .tuto_callforaction'), steps);

  // Tuto "Comment jour un pari ordre"
  steps = [];
  var ouSontLesOptions = this._view === 'mobile' ? '#ticket-summary' : '.recap-details';
  steps.push({
    element: $(ouSontLesOptions)[0],
    position: this._view === 'mobile' ? 'left' : 'top',
    intro: ZEturf.text.tuto_comment_jouer_ordre.step1
  }, {
    element: $(ouSontLesOptions + ' .type-combine [value=mode_unitaire]')[0],
    intro: ZEturf.text.tuto_comment_jouer_ordre.step2
  }, {
    element: $(ouSontLesOptions + ' .type-combine [value=mode_reduit]')[0],
    intro: ZEturf.text.tuto_comment_jouer_ordre.step3
  }, {
    element: $('#grille-de-jeu tr:nth(4) .base')[0],
    position: 'left',
    intro: ZEturf.text.tuto_comment_jouer_ordre.step4
  });
  if (this._view === 'desktop') {
    steps.push({
      element: $(ouSontLesOptions + ' .positioncombine')[0],
      intro: ZEturf.text.tuto_comment_jouer_ordre.step5
    });
  }
  steps.push({
    element: $('#grille-de-jeu tr:nth(6) .base')[0],
    position: 'left',
    intro: ZEturf.text.tuto_comment_jouer_ordre.step6
  });
  if (this._view === 'desktop') {
    steps.push({
      element: $(ouSontLesOptions + ' .ordres')[0],
      intro: ZEturf.text.tuto_comment_jouer_ordre.step7
    });
  }
  var tuto = Front.bindTuto('afficher_tuto_jeu_ordre', $('#selection-pari .tuto_pariordre'), steps);
  if (tuto) {
    tuto.onbeforechange(function (element) {
      var $element = $(element);
      // Pour avoir les bonnes colonnes de jeu visibles, il faut être dans le bon mode de jeu : on l'active
      // à l'étape correspondante du tuto
      if (['mode_reduit', 'mode_unitaire'].indexOf($element.attr('value')) !== -1) {
        $element.click();
      }
    });
  }
};
TicketApp.prototype.updateElementsSuperSimple = function (pari) {
  if (pari === PariZEturf.SuperSimple) {
    $('.details-super-simple').removeClass('hide moins').addClass('plus');
  }
};

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  \*****************************************************************/
/***/ (function(module) {

function _arrayLikeToArray(arr, len) {
  if (len == null || len > arr.length) len = arr.length;
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  return arr2;
}
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js":
/*!***************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  \***************************************************************/
/***/ (function(module) {

function _arrayWithHoles(arr) {
  if (Array.isArray(arr)) return arr;
}
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/defineProperty.js":
/*!***************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  \***************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "./node_modules/@babel/runtime/helpers/toPropertyKey.js");
function _defineProperty(obj, key, value) {
  key = toPropertyKey(key);
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }
  return obj;
}
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  \*********************************************************************/
/***/ (function(module) {

function _iterableToArrayLimit(arr, i) {
  var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  if (null != _i) {
    var _s,
      _e,
      _x,
      _r,
      _arr = [],
      _n = !0,
      _d = !1;
    try {
      if (_x = (_i = _i.call(arr)).next, 0 === i) {
        if (Object(_i) !== _i) return;
        _n = !1;
      } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
    } catch (err) {
      _d = !0, _e = err;
    } finally {
      try {
        if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
      } finally {
        if (_d) throw _e;
      }
    }
    return _arr;
  }
}
module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/nonIterableRest.js":
/*!****************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  \****************************************************************/
/***/ (function(module) {

function _nonIterableRest() {
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/slicedToArray.js":
/*!**************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  \**************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js");
var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "./node_modules/@babel/runtime/helpers/nonIterableRest.js");
function _slicedToArray(arr, i) {
  return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
}
module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/toPrimitive.js":
/*!************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  \************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var _typeof = (__webpack_require__(/*! ./typeof.js */ "./node_modules/@babel/runtime/helpers/typeof.js")["default"]);
function _toPrimitive(input, hint) {
  if (_typeof(input) !== "object" || input === null) return input;
  var prim = input[Symbol.toPrimitive];
  if (prim !== undefined) {
    var res = prim.call(input, hint || "default");
    if (_typeof(res) !== "object") return res;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (hint === "string" ? String : Number)(input);
}
module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/toPropertyKey.js":
/*!**************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  \**************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var _typeof = (__webpack_require__(/*! ./typeof.js */ "./node_modules/@babel/runtime/helpers/typeof.js")["default"]);
var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "./node_modules/@babel/runtime/helpers/toPrimitive.js");
function _toPropertyKey(arg) {
  var key = toPrimitive(arg, "string");
  return _typeof(key) === "symbol" ? key : String(key);
}
module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/typeof.js":
/*!*******************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  \*******************************************************/
/***/ (function(module) {

function _typeof(obj) {
  "@babel/helpers - typeof";

  return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
    return typeof obj;
  } : function (obj) {
    return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
}
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  \***************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
function _unsupportedIterableToArray(o, minLen) {
  if (!o) return;
  if (typeof o === "string") return arrayLikeToArray(o, minLen);
  var n = Object.prototype.toString.call(o).slice(8, -1);
  if (n === "Object" && o.constructor) n = o.constructor.name;
  if (n === "Map" || n === "Set") return Array.from(o);
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
}
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;

/***/ })

},
/******/ function(__webpack_require__) { // webpackRuntimeModules
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
/******/ var __webpack_exports__ = (__webpack_exec__("../../lib/bundles/FrontofficeBundle/Resources/public/js/TicketApp/TicketApp.js"));
/******/ }
]);
//# sourceMappingURL=TicketApp.js.map