Files
2024-11-05 12:22:50 +01:00

123 lines
55 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(()=>{var e={68840:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,r=o(85315),i=(n=r)&&n.__esModule?n:{default:n};t.default=function(e,t,o){var n=this,r=e.id,a=e.closable;this.modal=function(e){var t,o=e.id,n=void 0===o?"confirm-modal":o,r=e.confirmTitle,l=e.confirmMessage,a=void 0===l?"":l,s=e.closeButtonLabel,u=void 0===s?"Close":s,c=e.confirmButtonLabel,d=void 0===c?"Accept":c,m=e.confirmButtonClass,h=void 0===m?"btn-primary":m,f=e.customButtons,p=void 0===f?[]:f,g={};g.container=document.createElement("div"),g.container.classList.add("modal","fade"),g.container.id=n,g.dialog=document.createElement("div"),g.dialog.classList.add("modal-dialog"),g.content=document.createElement("div"),g.content.classList.add("modal-content"),g.header=document.createElement("div"),g.header.classList.add("modal-header"),r&&(g.title=document.createElement("h4"),g.title.classList.add("modal-title"),g.title.innerHTML=r);g.closeIcon=document.createElement("button"),g.closeIcon.classList.add("close"),g.closeIcon.setAttribute("type","button"),g.closeIcon.dataset.dismiss="modal",g.closeIcon.innerHTML="×",g.body=document.createElement("div"),g.body.classList.add("modal-body","text-left","font-weight-normal"),g.message=document.createElement("p"),g.message.classList.add("confirm-message"),g.message.innerHTML=a,g.footer=document.createElement("div"),g.footer.classList.add("modal-footer"),g.closeButton=document.createElement("button"),g.closeButton.setAttribute("type","button"),g.closeButton.classList.add("btn","btn-outline-secondary","btn-lg"),g.closeButton.dataset.dismiss="modal",g.closeButton.innerHTML=u,g.confirmButton=document.createElement("button"),g.confirmButton.setAttribute("type","button"),g.confirmButton.classList.add("btn",h,"btn-lg","btn-confirm-submit"),g.confirmButton.dataset.dismiss="modal",g.confirmButton.innerHTML=d,r?g.header.append(g.title,g.closeIcon):g.header.appendChild(g.closeIcon);return g.body.appendChild(g.message),(t=g.footer).append.apply(t,[g.closeButton].concat((0,i.default)(p),[g.confirmButton])),g.content.append(g.header,g.body,g.footer),g.dialog.appendChild(g.content),g.container.appendChild(g.dialog),g}(e),this.$modal=l(this.modal.container),this.show=function(){n.$modal.modal()},this.modal.confirmButton.addEventListener("click",t),this.$modal.modal({backdrop:!!a||"static",keyboard:void 0===a||a,closable:void 0===a||a,show:!1}),this.$modal.on("hidden.bs.modal",(function(){document.querySelector("#"+r).remove(),o&&o()})),document.body.appendChild(this.modal.container)};
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/
var l=window.$},60817:(e,t,o)=>{"use strict";var n=o(73609);Object.defineProperty(t,"__esModule",{value:!0});var r=s(o(88902)),i=s(o(99663)),l=s(o(22600)),a=s(o(68840));function s(e){return e&&e.__esModule?e:{default:e}}var u=window.$,c=function(e,t){var o=document.createEvent(t);o.initEvent(e,!0,!0),document.dispatchEvent(o)},d=function(){function e(){(0,i.default)(this,e),this.moduleActionMenuLinkSelector="button.module_action_menu_",this.moduleActionMenuInstallLinkSelector="button.module_action_menu_install",this.moduleActionMenuEnableLinkSelector="button.module_action_menu_enable",this.moduleActionMenuUninstallLinkSelector="button.module_action_menu_uninstall",this.moduleActionMenuDisableLinkSelector="button.module_action_menu_disable",this.moduleActionMenuEnableMobileLinkSelector="button.module_action_menu_enable_mobile",this.moduleActionMenuDisableMobileLinkSelector="button.module_action_menu_disable_mobile",this.moduleActionMenuResetLinkSelector="button.module_action_menu_reset",this.moduleActionMenuUpdateLinkSelector="button.module_action_menu_upgrade",this.moduleItemListSelector=".module-item-list",this.moduleItemGridSelector=".module-item-grid",this.moduleItemActionsSelector=".module-actions",this.moduleActionModalDisableLinkSelector="a.module_action_modal_disable",this.moduleActionModalResetLinkSelector="a.module_action_modal_reset",this.moduleActionModalUninstallLinkSelector="a.module_action_modal_uninstall",this.forceDeletionOption="#force_deletion",this.initActionButtons()}return(0,l.default)(e,[{key:"initActionButtons",value:function(){var e=this;u(document).on("click",this.forceDeletionOption,(function(){var t=u(e.moduleActionModalUninstallLinkSelector,u("div.module-item-list[data-tech-name='"+u(this).attr("data-tech-name")+"']"));!0===u(this).prop("checked")?t.attr("data-deletion","true"):t.removeAttr("data-deletion")})),u(document).on("click",this.moduleActionMenuInstallLinkSelector,(function(){return u("#modal-prestatrust").length&&u("#modal-prestatrust").modal("hide"),e.dispatchPreEvent("install",this)&&e.confirmAction("install",this)&&e.requestToController("install",u(this))})),u(document).on("click",this.moduleActionMenuEnableLinkSelector,(function(){return e.dispatchPreEvent("enable",this)&&e.confirmAction("enable",this)&&e.requestToController("enable",u(this))})),u(document).on("click",this.moduleActionMenuUninstallLinkSelector,(function(){return e.dispatchPreEvent("uninstall",this)&&e.confirmAction("uninstall",this)&&e.requestToController("uninstall",u(this))})),u(document).on("click",this.moduleActionMenuDisableLinkSelector,(function(){return e.dispatchPreEvent("disable",this)&&e.confirmAction("disable",this)&&e.requestToController("disable",u(this))})),u(document).on("click",this.moduleActionMenuEnableMobileLinkSelector,(function(){return e.dispatchPreEvent("enable_mobile",this)&&e.confirmAction("enable_mobile",this)&&e.requestToController("enable_mobile",u(this))})),u(document).on("click",this.moduleActionMenuDisableMobileLinkSelector,(function(){return e.dispatchPreEvent("disable_mobile",this)&&e.confirmAction("disable_mobile",this)&&e.requestToController("disable_mobile",u(this))})),u(document).on("click",this.moduleActionMenuResetLinkSelector,(function(){return e.dispatchPreEvent("reset",this)&&e.confirmAction("reset",this)&&e.requestToController("reset",u(this))})),u(document).on("click",this.moduleActionMenuUpdateLinkSelector,(function(t){var o=this;t.preventDefault();var n=u("#"+u(this).data("confirm_modal")),r=window.isShopMaintenance;if(1===n.length)return e.dispatchPreEvent("update",this)&&e.confirmAction("update",this)&&e.requestToController("update",u(this));var i=document.createElement("a");return i.classList.add("btn","btn-primary","btn-lg"),i.setAttribute("href",window.moduleURLs.maintenancePage),i.innerHTML=window.moduleTranslations.moduleModalUpdateMaintenance,new a.default({id:"confirm-module-update-modal",confirmTitle:window.moduleTranslations.singleModuleModalUpdateTitle,closeButtonLabel:window.moduleTranslations.moduleModalUpdateCancel,confirmButtonLabel:r?window.moduleTranslations.moduleModalUpdateUpgrade:window.moduleTranslations.upgradeAnywayButtonText,confirmButtonClass:r?"btn-primary":"btn-secondary",confirmMessage:r?"":window.moduleTranslations.moduleModalUpdateConfirmMessage,closable:!0,customButtons:r?[]:[i]},(function(){return e.dispatchPreEvent("update",o)&&e.confirmAction("update",o)&&e.requestToController("update",u(o))})).show(),!1})),u(document).on("click",this.moduleActionModalDisableLinkSelector,(function(){return e.requestToController("disable",u(e.moduleActionMenuDisableLinkSelector,u("div.module-item-list[data-tech-name='"+u(this).attr("data-tech-name")+"']")))})),u(document).on("click",this.moduleActionModalResetLinkSelector,(function(){return e.requestToController("reset",u(e.moduleActionMenuResetLinkSelector,u("div.module-item-list[data-tech-name='"+u(this).attr("data-tech-name")+"']")))})),u(document).on("click",this.moduleActionModalUninstallLinkSelector,(function(t){u(t.target).parents(".modal").on("hidden.bs.modal",(function(){return e.requestToController("uninstall",u(e.moduleActionMenuUninstallLinkSelector,u("div.module-item-list[data-tech-name='"+u(t.target).attr("data-tech-name")+"']")),u(t.target).attr("data-deletion"))}))}))}},{key:"getModuleItemSelector",value:function(){return u(this.moduleItemListSelector).length?this.moduleItemListSelector:this.moduleItemGridSelector}},{key:"confirmAction",value:function(e,t){var o=u("#"+u(t).data("confirm_modal"));return 1!==o.length||(o.first().modal("show"),!1)}},{key:"confirmPrestaTrust",value:function(e){var t=this,o=this.replacePrestaTrustPlaceholders(e);o.find(".pstrust-install").off("click").on("click",(function(){var n=u(t.moduleActionMenuInstallLinkSelector,'.module-item[data-tech-name="'+e.module.attributes.name+'"]'),r=n.parent("form");u("<input>").attr({type:"hidden",value:"1",name:"actionParams[confirmPrestaTrust]"}).appendTo(r),n.click(),o.modal("hide")})),o.modal()}},{key:"replacePrestaTrustPlaceholders",value:function(e){var t=u("#modal-prestatrust"),o=e.module.attributes;if("PrestaTrust"!==e.confirmation_subject||!t.length)return!1;var n=o.prestatrust.status?"success":"warning";return o.prestatrust.check_list.property?(t.find("#pstrust-btn-property-ok").show(),t.find("#pstrust-btn-property-nok").hide()):(t.find("#pstrust-btn-property-ok").hide(),t.find("#pstrust-btn-property-nok").show(),t.find("#pstrust-buy").attr("href",o.url).toggle(null!==o.url)),t.find("#pstrust-img").attr({src:o.img,alt:o.name}),t.find("#pstrust-name").text(o.displayName),t.find("#pstrust-author").text(o.author),t.find("#pstrust-label").attr("class","text-"+n).text(o.prestatrust.status?"OK":"KO"),t.find("#pstrust-message").attr("class","alert alert-"+n),t.find("#pstrust-message > p").text(o.prestatrust.message),t}},{key:"dispatchPreEvent",value:function(e,t){var o=n.Event("module_card_action_event");return u(t).trigger(o,[e]),!1===o.isPropagationStopped()&&!1===o.isImmediatePropagationStopped()&&!1!==o.result}},{key:"requestToController",value:function(e,t,o,n,i){var l=this,a=t.closest(this.moduleItemActionsSelector),s=t.closest("form"),d=u('<button class="btn-primary-reverse onclick unbind spinner "></button>'),m="//"+window.location.host+s.attr("action"),h=s.serializeArray();return"true"!==o&&!0!==o||h.push({name:"actionParams[deletion]",value:!0}),"true"!==n&&!0!==n||h.push({name:"actionParams[cacheClearEnabled]",value:0}),u.ajax({url:m,dataType:"json",method:"POST",data:h,beforeSend:function(){a.hide(),a.after(d)}}).done((function(t){if(void 0!==t)if(void 0===t.status||!1!==t.status){var o=(0,r.default)(t)[0];if(!1===t[o].status)return void 0!==t[o].confirmation_subject&&l.confirmPrestaTrust(t[o]),void u.growl.error({message:t[o].msg,fixed:!0});u.growl({message:t[o].msg,duration:6e3});var n=l.getModuleItemSelector().replace(".",""),i=null;"uninstall"===e?((i=a.closest("."+n)).remove(),c("Module Uninstalled","CustomEvent")):"disable"===e?((i=a.closest("."+n)).addClass(n+"-isNotActive"),i.attr("data-active","0"),c("Module Disabled","CustomEvent")):"enable"===e&&((i=a.closest("."+n)).removeClass(n+"-isNotActive"),i.attr("data-active","1"),c("Module Enabled","CustomEvent")),a.replaceWith(t[o].action_menu_html)}else u.growl.error({message:t.msg,fixed:!0});else u.growl.error({message:"No answer received from server",fixed:!0})})).fail((function(){var t=a.closest("module-item-list").data("techName");u.growl.error({message:"Could not perform action "+e+" for module "+t,fixed:!0})})).always((function(){a.fadeIn(),d.remove(),i&&i()})),!1}}]),e}();
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/t.default=d},5774:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=s(o(88902)),r=s(o(65425)),i=s(o(99663)),l=s(o(22600)),a=s(o(68840));function s(e){return e&&e.__esModule?e:{default:e}}var u=window.$,c=function(){function e(t){(0,i.default)(this,e),this.moduleCardController=t,this.DEFAULT_MAX_RECENTLY_USED=10,this.DEFAULT_MAX_PER_CATEGORIES=6,this.DISPLAY_GRID="grid",this.DISPLAY_LIST="list",this.CATEGORY_RECENTLY_USED="recently-used",this.currentCategoryDisplay={},this.currentDisplay="",this.isCategoryGridDisplayed=!1,this.currentTagsList=[],this.currentRefCategory=null,this.currentRefStatus=null,this.currentSorting=null,this.baseAddonsUrl="https://addons.prestashop.com/",this.pstaggerInput=null,this.lastBulkAction=null,this.isUploadStarted=!1,this.recentlyUsedSelector="#module-recently-used-list .modules-list",this.modulesList=[],this.addonsCardGrid=null,this.addonsCardList=null,this.moduleShortList=".module-short-list",this.seeMoreSelector=".see-more",this.seeLessSelector=".see-less",this.moduleItemGridSelector=".module-item-grid",this.moduleItemListSelector=".module-item-list",this.categorySelectorLabelSelector=".module-category-selector-label",this.categorySelector=".module-category-selector",this.categoryItemSelector=".module-category-menu",this.addonsLoginButtonSelector="#addons_login_btn",this.categoryResetBtnSelector=".module-category-reset",this.moduleInstallBtnSelector="input.module-install-btn",this.moduleSortingDropdownSelector=".module-sorting-author select",this.categoryGridSelector="#modules-categories-grid",this.categoryGridItemSelector=".module-category-item",this.addonItemGridSelector=".module-addons-item-grid",this.addonItemListSelector=".module-addons-item-list",this.upgradeAllSource=".module_action_menu_upgrade_all",this.upgradeContainer="#modules-list-container-update",this.upgradeAllTargets=this.upgradeContainer+" .module_action_menu_upgrade:visible",this.notificationContainer="#modules-list-container-notification",this.bulkActionDropDownSelector=".module-bulk-actions",this.bulkItemSelector=".module-bulk-menu",this.bulkActionCheckboxListSelector=".module-checkbox-bulk-list input",this.bulkActionCheckboxGridSelector=".module-checkbox-bulk-grid input",this.checkedBulkActionListSelector=this.bulkActionCheckboxListSelector+":checked",this.checkedBulkActionGridSelector=this.bulkActionCheckboxGridSelector+":checked",this.bulkActionCheckboxSelector="#module-modal-bulk-checkbox",this.bulkConfirmModalSelector="#module-modal-bulk-confirm",this.bulkConfirmModalActionNameSelector="#module-modal-bulk-confirm-action-name",this.bulkConfirmModalListSelector="#module-modal-bulk-confirm-list",this.bulkConfirmModalAckBtnSelector="#module-modal-confirm-bulk-ack",this.placeholderGlobalSelector=".module-placeholders-wrapper",this.placeholderFailureGlobalSelector=".module-placeholders-failure",this.placeholderFailureMsgSelector=".module-placeholders-failure-msg",this.placeholderFailureRetryBtnSelector="#module-placeholders-failure-retry",this.statusSelectorLabelSelector=".module-status-selector-label",this.statusItemSelector=".module-status-menu",this.statusResetBtnSelector=".module-status-reset",this.addonsConnectModalBtnSelector="#page-header-desc-configuration-addons_connect",this.addonsLogoutModalBtnSelector="#page-header-desc-configuration-addons_logout",this.addonsImportModalBtnSelector="#page-header-desc-configuration-add_module",this.dropZoneModalSelector="#module-modal-import",this.dropZoneModalFooterSelector="#module-modal-import .modal-footer",this.dropZoneImportZoneSelector="#importDropzone",this.addonsConnectModalSelector="#module-modal-addons-connect",this.addonsLogoutModalSelector="#module-modal-addons-logout",this.addonsConnectForm="#addons-connect-form",this.moduleImportModalCloseBtn="#module-modal-import-closing-cross",this.moduleImportStartSelector=".module-import-start",this.moduleImportProcessingSelector=".module-import-processing",this.moduleImportSuccessSelector=".module-import-success",this.moduleImportSuccessConfigureBtnSelector=".module-import-success-configure",this.moduleImportFailureSelector=".module-import-failure",this.moduleImportFailureRetrySelector=".module-import-failure-retry",this.moduleImportFailureDetailsBtnSelector=".module-import-failure-details-action",this.moduleImportSelectFileManualSelector=".module-import-start-select-manual",this.moduleImportFailureMsgDetailsSelector=".module-import-failure-details",this.moduleImportConfirmSelector=".module-import-confirm",this.initSortingDropdown(),this.initBOEventRegistering(),this.initCurrentDisplay(),this.initSortingDisplaySwitch(),this.initBulkDropdown(),this.initSearchBlock(),this.initCategorySelect(),this.initCategoriesGrid(),this.initActionButtons(),this.initAddonsSearch(),this.initAddonsConnect(),this.initAddModuleAction(),this.initDropzone(),this.initPageChangeProtection(),this.initPlaceholderMechanism(),this.initFilterStatusDropdown(),this.fetchModulesList(),this.getNotificationsCount(),this.initializeSeeMore()}return(0,l.default)(e,[{key:"initFilterStatusDropdown",value:function(){var e=this,t=u("body");t.on("click",e.statusItemSelector,(function(){e.currentRefStatus=parseInt(u(this).data("status-ref"),10),u(e.statusSelectorLabelSelector).text(u(this).text()),u(e.statusResetBtnSelector).show(),e.updateModuleVisibility()})),t.on("click",e.statusResetBtnSelector,(function(){u(e.statusSelectorLabelSelector).text(u(this).text()),u(this).hide(),e.currentRefStatus=null,e.updateModuleVisibility()}))}},{key:"initBulkDropdown",value:function(){var e=this,t=u("body");t.on("click",e.getBulkCheckboxesSelector(),(function(){var t=u(e.bulkActionDropDownSelector);u(e.getBulkCheckboxesCheckedSelector()).length>0?t.closest(".module-top-menu-item").removeClass("disabled"):t.closest(".module-top-menu-item").addClass("disabled")})),t.on("click",e.bulkItemSelector,(function(){if(0!==u(e.getBulkCheckboxesCheckedSelector()).length){e.lastBulkAction=u(this).data("ref");var t=e.buildBulkActionModuleList(),o=u(this).find(":checked").text().toLowerCase();u(e.bulkConfirmModalListSelector).html(t),u(e.bulkConfirmModalActionNameSelector).text(o),"bulk-uninstall"===e.lastBulkAction?u(e.bulkActionCheckboxSelector).show():u(e.bulkActionCheckboxSelector).hide(),u(e.bulkConfirmModalSelector).modal("show")}else u.growl.warning({message:window.translate_javascripts["Bulk Action - One module minimum"]})})),t.on("click",this.bulkConfirmModalAckBtnSelector,(function(t){t.preventDefault(),t.stopPropagation(),u(e.bulkConfirmModalSelector).modal("hide"),e.doBulkAction(e.lastBulkAction)}))}},{key:"initBOEventRegistering",value:function(){window.BOEvent.on("Module Disabled",this.onModuleDisabled,this),window.BOEvent.on("Module Uninstalled",this.updateTotalResults,this)}},{key:"onModuleDisabled",value:function(){var e=this;e.getModuleItemSelector(),u(".modules-list").each((function(){e.updateTotalResults()}))}},{key:"initPlaceholderMechanism",value:function(){var e=this;u(e.placeholderGlobalSelector).length&&e.ajaxLoadPage(),u("body").on("click",e.placeholderFailureRetryBtnSelector,(function(){u(e.placeholderFailureGlobalSelector).fadeOut(),u(e.placeholderGlobalSelector).fadeIn(),e.ajaxLoadPage()}))}},{key:"ajaxLoadPage",value:function(){var e=this;u.ajax({method:"GET",url:window.moduleURLs.catalogRefresh}).done((function(t){if(!0===t.status){void 0===t.domElements&&(t.domElements=null),void 0===t.msg&&(t.msg=null);var o=document.styleSheets[0],n="{display: none}",r=".modules-list",i=".module-sorting-menu",l=".modules-list,.module-sorting-menu";o.insertRule?o.insertRule(l+n,o.cssRules.length):o.addRule&&o.addRule(l,n,-1),u(e.placeholderGlobalSelector).fadeOut(800,(function(){u.each(t.domElements,(function(e,t){u(t.selector).append(t.content)})),u(r).fadeIn(800).css("display","flex"),u(i).fadeIn(800),u('[data-toggle="popover"]').popover(),e.initCurrentDisplay(),e.fetchModulesList()}))}else u(e.placeholderGlobalSelector).fadeOut(800,(function(){u(e.placeholderFailureMsgSelector).text(t.msg),u(e.placeholderFailureGlobalSelector).fadeIn(800)}))})).fail((function(t){u(e.placeholderGlobalSelector).fadeOut(800,(function(){u(e.placeholderFailureMsgSelector).text(t.statusText),u(e.placeholderFailureGlobalSelector).fadeIn(800)}))}))}},{key:"fetchModulesList",value:function(){var e=this,t=void 0,o=void 0;e.modulesList=[],u(".modules-list").each((function(){(t=u(this)).find(".module-item").each((function(){o=u(this),e.modulesList.push({domObject:o,id:o.data("id"),name:o.data("name").toLowerCase(),scoring:parseFloat(o.data("scoring")),logo:o.data("logo"),author:o.data("author").toLowerCase(),version:o.data("version"),description:o.data("description").toLowerCase(),techName:o.data("tech-name").toLowerCase(),childCategories:o.data("child-categories"),categories:String(o.data("categories")).toLowerCase(),type:o.data("type"),price:parseFloat(o.data("price")),active:parseInt(o.data("active"),10),access:o.data("last-access"),display:o.hasClass("module-item-list")?e.DISPLAY_LIST:e.DISPLAY_GRID,container:t}),e.isModulesPage()&&o.remove()}))})),e.addonsCardGrid=u(this.addonItemGridSelector),e.addonsCardList=u(this.addonItemListSelector),e.updateModuleVisibility(),u("body").trigger("moduleCatalogLoaded")}},{key:"updateModuleSorting",value:function(){var e=this;if(e.currentSorting){var t="asc",o=e.currentSorting,n=o.split("-");n.length>1&&(o=n[0],"desc"===n[1]&&(t="desc"));e.modulesList.sort((function(e,t){var n=e[o],i=t[o];return"access"===o&&(n=new Date(n).getTime(),i=new Date(i).getTime(),(n=(0,r.default)(n)?0:n)===(i=(0,r.default)(i)?0:i))?t.name.localeCompare(e.name):n<i?-1:n>i?1:0})),"desc"===t&&e.modulesList.reverse()}}},{key:"updateModuleContainerDisplay",value:function(){var e=this;u(".module-short-list").each((function(){var t=u(this),o=t.find(".module-item").length;e.currentRefCategory&&e.currentRefCategory!==String(t.find(".modules-list").data("name"))||null!==e.currentRefStatus&&0===o||0===o&&String(t.find(".modules-list").data("name"))===e.CATEGORY_RECENTLY_USED||e.currentTagsList.length>0&&0===o?t.hide():(t.show(),t.find(e.seeMoreSelector+", "+e.seeLessSelector).toggle(o>=e.DEFAULT_MAX_PER_CATEGORIES))}))}},{key:"updateModuleVisibility",value:function(){var e=this;e.updateModuleSorting(),e.isModulesPage()&&(u(e.recentlyUsedSelector).find(".module-item").remove(),u(".modules-list").find(".module-item").remove());for(var t=void 0,o=void 0,n=void 0,r=void 0,i=void 0,l=void 0,a=e.modulesList.length,s={},c=function(e,t){i=t.toLowerCase(),r|=-1!==o.name.indexOf(i)||-1!==o.description.indexOf(i)||-1!==o.author.indexOf(i)||-1!==o.techName.indexOf(i)},d=0;d<a;d+=1)(o=e.modulesList[d]).display===e.currentDisplay&&(t=!0,n=e.currentRefCategory===e.CATEGORY_RECENTLY_USED?e.CATEGORY_RECENTLY_USED:o.categories,null!==e.currentRefCategory&&(t&=n===e.currentRefCategory),null!==e.currentRefStatus&&(t&=o.active===e.currentRefStatus),e.currentTagsList.length&&(r=!1,u.each(e.currentTagsList,c),t&=r),e.currentDisplay!==e.DISPLAY_LIST||e.currentTagsList.length||(void 0===e.currentCategoryDisplay[n]&&(e.currentCategoryDisplay[n]=!1),s[n]||(s[n]=0),l=n===e.CATEGORY_RECENTLY_USED?e.DEFAULT_MAX_RECENTLY_USED:e.DEFAULT_MAX_PER_CATEGORIES,s[n]>=l&&(t&=e.currentCategoryDisplay[n]),s[n]+=1),t&&(e.currentRefCategory===e.CATEGORY_RECENTLY_USED?u(e.recentlyUsedSelector).append(o.domObject):o.container.append(o.domObject)));e.updateModuleContainerDisplay(),e.currentTagsList.length&&u(".modules-list").append(this.currentDisplay===e.DISPLAY_GRID?this.addonsCardGrid:this.addonsCardList),e.updateTotalResults()}},{key:"initPageChangeProtection",value:function(){var e=this;u(window).on("beforeunload",(function(){if(!0===e.isUploadStarted)return"It seems some critical operation are running, are you sure you want to change page? It might cause some unexepcted behaviors."}))}},{key:"buildBulkActionModuleList",value:function(){var e=this.getBulkCheckboxesCheckedSelector(),t=this.getModuleItemSelector(),o=0,n="",r=void 0;return u(e).each((function(){return 10===o?(n+="- ...",!1):(r=u(this).closest(t),n+="- "+r.data("name")+"<br/>",o+=1,!0)})),n}},{key:"initAddonsConnect",value:function(){var e=this;"#"===u(e.addonsConnectModalBtnSelector).attr("href")&&(u(e.addonsConnectModalBtnSelector).attr("data-toggle","modal"),u(e.addonsConnectModalBtnSelector).attr("data-target",e.addonsConnectModalSelector)),"#"===u(e.addonsLogoutModalBtnSelector).attr("href")&&(u(e.addonsLogoutModalBtnSelector).attr("data-toggle","modal"),u(e.addonsLogoutModalBtnSelector).attr("data-target",e.addonsLogoutModalSelector)),u("body").on("submit",e.addonsConnectForm,(function(t){t.preventDefault(),t.stopPropagation(),u.ajax({method:"POST",url:u(this).attr("action"),dataType:"json",data:u(this).serialize(),beforeSend:function(){u(e.addonsLoginButtonSelector).show(),u('button.btn[type="submit"]',e.addonsConnectForm).hide()}}).done((function(t){1===t.success?window.location.reload():(u.growl.error({message:t.message}),u(e.addonsLoginButtonSelector).hide(),u('button.btn[type="submit"]',e.addonsConnectForm).fadeIn())}))}))}},{key:"initAddModuleAction",value:function(){var e=u(this.addonsImportModalBtnSelector);e.attr("data-toggle","modal"),e.attr("data-target",this.dropZoneModalSelector)}},{key:"initDropzone",value:function(){var e=this,t=u("body"),o=u(".dropzone");t.on("click",this.moduleImportFailureRetrySelector,(function(){u(e.moduleImportSuccessSelector+","+e.moduleImportFailureSelector+","+e.moduleImportProcessingSelector).fadeOut((function(){setTimeout((function(){u(e.moduleImportStartSelector).fadeIn((function(){u(e.moduleImportFailureMsgDetailsSelector).hide(),u(e.moduleImportSuccessConfigureBtnSelector).hide(),o.removeAttr("style")}))}),550)}))})),t.on("hidden.bs.modal",this.dropZoneModalSelector,(function(){u(e.moduleImportSuccessSelector+", "+e.moduleImportFailureSelector).hide(),u(e.moduleImportStartSelector).show(),o.removeAttr("style"),u(e.moduleImportFailureMsgDetailsSelector).hide(),u(e.moduleImportSuccessConfigureBtnSelector).hide(),u(e.dropZoneModalFooterSelector).html(""),u(e.moduleImportConfirmSelector).hide()})),t.on("click",".dropzone:not("+this.moduleImportSelectFileManualSelector+", "+this.moduleImportSuccessConfigureBtnSelector+")",(function(e,t){void 0===t&&(e.stopPropagation(),e.preventDefault())})),t.on("click",this.moduleImportSelectFileManualSelector,(function(e){e.stopPropagation(),e.preventDefault(),u(".dz-hidden-input").trigger("click",["manual_select"])})),t.on("click",this.moduleImportModalCloseBtn,(function(){!0!==e.isUploadStarted&&u(e.dropZoneModalSelector).modal("hide")})),t.on("click",this.moduleImportSuccessConfigureBtnSelector,(function(e){e.stopPropagation(),e.preventDefault(),window.location=u(this).attr("href")})),t.on("click",this.moduleImportFailureDetailsBtnSelector,(function(){u(e.moduleImportFailureMsgDetailsSelector).slideDown()}));var n={url:window.moduleURLs.moduleImport,acceptedFiles:".zip, .tar",paramName:"file_uploaded",maxFilesize:50,uploadMultiple:!1,addRemoveLinks:!0,dictDefaultMessage:"",hiddenInputContainer:e.dropZoneImportZoneSelector,timeout:0,addedfile:function(){e.animateStartUpload()},processing:function(){},error:function(t,o){e.displayOnUploadError(o)},complete:function(t){if("error"!==t.status){var o=u.parseJSON(t.xhr.response);void 0===o.is_configurable&&(o.is_configurable=null),void 0===o.module_name&&(o.module_name=null),e.displayOnUploadDone(o)}e.isUploadStarted=!1}};o.dropzone(u.extend(n))}},{key:"animateStartUpload",value:function(){var e=this,t=u(".dropzone");e.isUploadStarted=!0,u(e.moduleImportStartSelector).hide(0),t.css("border","none"),u(e.moduleImportProcessingSelector).fadeIn()}},{key:"animateEndUpload",value:function(e){u(this.moduleImportProcessingSelector).finish().fadeOut(e)}},{key:"displayOnUploadDone",value:function(e){var t=this;t.animateEndUpload((function(){if(!0===e.status){if(!0===e.is_configurable){var o=window.moduleURLs.configurationPage.replace(/:number:/,e.module_name);u(t.moduleImportSuccessConfigureBtnSelector).attr("href",o),u(t.moduleImportSuccessConfigureBtnSelector).show()}u(t.moduleImportSuccessSelector).fadeIn()}else void 0!==e.confirmation_subject?t.displayPrestaTrustStep(e):(u(t.moduleImportFailureMsgDetailsSelector).html(e.msg),u(t.moduleImportFailureSelector).fadeIn())}))}},{key:"displayOnUploadError",value:function(e){var t=this;t.animateEndUpload((function(){u(t.moduleImportFailureMsgDetailsSelector).html(e),u(t.moduleImportFailureSelector).fadeIn()}))}},{key:"displayPrestaTrustStep",value:function(e){var t=this,o=t.moduleCardController.replacePrestaTrustPlaceholders(e),n=e.module.attributes.name;u(this.moduleImportConfirmSelector).html(o.find(".modal-body").html()).fadeIn(),u(this.dropZoneModalFooterSelector).html(o.find(".modal-footer").html()).fadeIn(),u(this.dropZoneModalFooterSelector).find(".pstrust-install").off("click").on("click",(function(){u(t.moduleImportConfirmSelector).hide(),u(t.dropZoneModalFooterSelector).html(""),t.animateStartUpload(),u.post(e.module.attributes.urls.install,{"actionParams[confirmPrestaTrust]":"1"}).done((function(e){t.displayOnUploadDone(e[n])})).fail((function(e){t.displayOnUploadError(e[n])})).always((function(){t.isUploadStarted=!1}))}))}},{key:"getBulkCheckboxesSelector",value:function(){return this.currentDisplay===this.DISPLAY_GRID?this.bulkActionCheckboxGridSelector:this.bulkActionCheckboxListSelector}},{key:"getBulkCheckboxesCheckedSelector",value:function(){return this.currentDisplay===this.DISPLAY_GRID?this.checkedBulkActionGridSelector:this.checkedBulkActionListSelector}},{key:"getModuleItemSelector",value:function(){return this.currentDisplay===this.DISPLAY_GRID?this.moduleItemGridSelector:this.moduleItemListSelector}},{key:"getNotificationsCount",value:function(){u.getJSON(window.moduleURLs.notificationsCount,this.updateNotificationsCount).fail((function(){console.error("Could not retrieve module notifications count.")}))}},{key:"updateNotificationsCount",value:function(e){var t={to_configure:u("#subtab-AdminModulesNotifications"),to_update:u("#subtab-AdminModulesUpdates")};(0,n.default)(t).forEach((function(o){0!==t[o].length&&t[o].find(".notification-counter").text(e[o])}))}},{key:"initAddonsSearch",value:function(){var e=this;u("body").on("click",e.addonItemGridSelector+", "+e.addonItemListSelector,(function(){var t="";e.currentTagsList.length&&(t=encodeURIComponent(e.currentTagsList.join(" "))),window.open(e.baseAddonsUrl+"search.php?search_query="+t,"_blank")}))}},{key:"initCategoriesGrid",value:function(){var e=this;u("body").on("click",this.categoryGridItemSelector,(function(t){t.stopPropagation(),t.preventDefault();var o=u(this).data("category-ref");return e.currentTagsList.length&&(e.pstaggerInput.resetTags(!1),e.currentTagsList=[]),u(e.categoryItemSelector+'[data-category-ref="'+o+'"]').length?(!0===e.isCategoryGridDisplayed&&(u(e.categoryGridSelector).fadeOut(),e.isCategoryGridDisplayed=!1),u(e.categoryItemSelector+'[data-category-ref="'+o+'"]').click(),!0):(console.warn("No category with ref ("+o+") seems to exist!"),!1)}))}},{key:"initCurrentDisplay",value:function(){this.currentDisplay=""===this.currentDisplay?this.DISPLAY_LIST:this.DISPLAY_GRID}},{key:"initSortingDropdown",value:function(){var e=this;e.currentSorting=u(this.moduleSortingDropdownSelector).find(":checked").attr("value"),e.currentSorting||(e.currentSorting="access-desc"),u("body").on("change",e.moduleSortingDropdownSelector,(function(){e.currentSorting=u(this).find(":checked").attr("value"),e.updateModuleVisibility()}))}},{key:"doBulkAction",value:function(e){var t=u("#force_bulk_deletion").prop("checked"),o={"bulk-uninstall":"uninstall","bulk-disable":"disable","bulk-enable":"enable","bulk-disable-mobile":"disable_mobile","bulk-enable-mobile":"enable_mobile","bulk-reset":"reset"};if(void 0===o[e])return u.growl.error({message:window.translate_javascripts["Bulk Action - Request not found"].replace("[1]",e)}),!1;var n=this.getBulkCheckboxesCheckedSelector(),r=o[e];if(u(n).length<=0)return console.warn(window.translate_javascripts["Bulk Action - One module minimum"]),!1;var i=[],l=void 0;return u(n).each((function(){l=u(this).data("tech-name"),i.push({techName:l,actionMenuObj:u(this).closest(".module-checkbox-bulk-list").next()})})),this.performModulesAction(i,r,t),!0}},{key:"performModulesAction",value:function(e,t,o){var n=this;if(void 0!==n.moduleCardController){var r,i,l,a=(r=e,i=[],l=void 0,u.each(r,(function(e,o){(l=u(n.moduleCardController.moduleActionMenuLinkSelector+t,o.actionMenuObj)).length>0?i.push(l):u.growl.error({message:window.translate_javascripts["Bulk Action - Request not available for module"].replace("[1]",t).replace("[2]",o.techName)})})),i);if(a.length){var s=a.length-1,c=u('<button class="btn-primary-reverse onclick unbind spinner "></button>');if(a.length>1){u.each(a,(function(e,t){e>=a.length-1||m(t,!0,h)}));var d=a[a.length-1].closest(n.moduleCardController.moduleItemActionsSelector);d.hide(),d.after(c)}else m(a[0])}}function m(e,r,i){n.moduleCardController.requestToController(t,e,o,r,i)}function h(){if((s-=1)<=0){c&&(c.remove(),c=null);var e=a[a.length-1];e.closest(n.moduleCardController.moduleItemActionsSelector).fadeIn(),m(e)}}}},{key:"initActionButtons",value:function(){var e=this,t=this;u("body").on("click",t.moduleInstallBtnSelector,(function(e){var t=u(this),o=u(t.next());e.preventDefault(),t.hide(),o.show(),u.ajax({url:t.data("url"),dataType:"json"}).done((function(){o.fadeOut()}))})),u("body").on("click",t.upgradeAllSource,(function(o){o.preventDefault();var n=window.isShopMaintenance,r=document.createElement("a");return r.classList.add("btn","btn-primary","btn-lg"),r.setAttribute("href",window.moduleURLs.maintenancePage),r.innerHTML=window.moduleTranslations.moduleModalUpdateMaintenance,new a.default({id:"confirm-module-update-modal",confirmTitle:window.moduleTranslations.singleModuleModalUpdateTitle,closeButtonLabel:window.moduleTranslations.moduleModalUpdateCancel,confirmButtonLabel:n?window.moduleTranslations.moduleModalUpdateUpgrade:window.moduleTranslations.upgradeAnywayButtonText,confirmButtonClass:n?"btn-primary":"btn-secondary",confirmMessage:n?"":window.moduleTranslations.moduleModalUpdateConfirmMessage,closable:!0,customButtons:n?[]:[r]},(function(){if(u(t.upgradeAllTargets).length<=0)return console.warn(window.translate_javascripts["Upgrade All Action - One module minimum"]),!1;var o=[],n=void 0;return u(t.upgradeAllTargets).each((function(){var e=u(this).closest(".module-item-list");n=e.data("tech-name"),o.push({techName:n,actionMenuObj:u(".module-actions",e)})})),e.performModulesAction(o,"upgrade"),!0})).show(),!0}))}},{key:"initCategorySelect",value:function(){var e=this,t=u("body");t.on("click",e.categoryItemSelector,(function(){e.currentRefCategory=u(this).data("category-ref"),e.currentRefCategory=e.currentRefCategory?String(e.currentRefCategory).toLowerCase():null,u(e.categorySelectorLabelSelector).text(u(this).data("category-display-name")),u(e.categoryResetBtnSelector).show(),e.updateModuleVisibility()})),t.on("click",e.categoryResetBtnSelector,(function(){var t=u(e.categorySelector).attr("aria-labelledby"),o=t.charAt(0).toUpperCase()+t.slice(1);u(e.categorySelectorLabelSelector).text(o),u(this).hide(),e.currentRefCategory=null,e.updateModuleVisibility()}))}},{key:"initSearchBlock",value:function(){var e=this,t=this;t.pstaggerInput=u("#module-search-bar").pstagger({onTagsChanged:function(e){t.currentTagsList=e,t.updateModuleVisibility()},onResetTags:function(){t.currentTagsList=[],t.updateModuleVisibility()},inputPlaceholder:window.translate_javascripts["Search - placeholder"],closingCross:!0,context:t}),u("body").on("click",".module-addons-search-link",(function(t){t.preventDefault(),t.stopPropagation(),window.open(u(e).attr("href"),"_blank")}))}},{key:"initSortingDisplaySwitch",value:function(){var e=this;u("body").on("click",".module-sort-switch",(function(){var t=u(this).data("switch"),o=u(this).hasClass("active-display");void 0!==t&&!1===o&&(e.switchSortingDisplayTo(t),e.currentDisplay=t)}))}},{key:"switchSortingDisplayTo",value:function(e){e===this.DISPLAY_GRID||e===this.DISPLAY_LIST?(u(".module-sort-switch").removeClass("module-sort-active"),u("#module-sort-"+e).addClass("module-sort-active"),this.currentDisplay=e,this.updateModuleVisibility()):console.error("Can't switch to undefined display property \""+e+'"')}},{key:"initializeSeeMore",value:function(){var e=this;u(e.moduleShortList+" "+e.seeMoreSelector).on("click",(function(){e.currentCategoryDisplay[u(this).data("category")]=!0,u(this).addClass("d-none"),u(this).closest(e.moduleShortList).find(e.seeLessSelector).removeClass("d-none"),e.updateModuleVisibility()})),u(e.moduleShortList+" "+e.seeLessSelector).on("click",(function(){e.currentCategoryDisplay[u(this).data("category")]=!1,u(this).addClass("d-none"),u(this).closest(e.moduleShortList).find(e.seeMoreSelector).removeClass("d-none"),e.updateModuleVisibility()}))}},{key:"updateTotalResults",value:function(){var e=function(e,t){var o=e.text().split(" ");o[0]=t,e.text(o.join(" "))},t=u(".module-short-list");if(t.length>0)t.each((function(){var t=u(this);e(t.find(".module-search-result-wording"),t.next(".modules-list").find(".module-item").length)}));else{var o=u(".modules-list").find(".module-item").length;e(u(".module-search-result-wording"),o);var n=this.currentDisplay===this.DISPLAY_LIST?this.addonItemListSelector:this.addonItemGridSelector;u(n).toggle(o!==this.modulesList.length/2),0===o&&u(".module-addons-search-link").attr("href",this.baseAddonsUrl+"search.php?search_query="+encodeURIComponent(this.currentTagsList.join(" ")))}}},{key:"isModulesPage",value:function(){return 0===u(this.upgradeContainer).length&&0===u(this.notificationContainer).length}}]),e}();
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/t.default=c},71423:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(o(99663)),r=i(o(22600));function i(e){return e&&e.__esModule?e:{default:e}}
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/var l=window.$,a=function(){function e(){(0,n.default)(this,e),e.handleImport(),e.handleEvents()}return(0,r.default)(e,null,[{key:"handleImport",value:function(){var e=l("#module-import");function t(){setTimeout((function(){e.removeClass("onclick"),e.addClass("validate",450,o)}),2250)}function o(){setTimeout((function(){e.removeClass("validate")}),1250)}e.click((function(){e.addClass("onclick",250,t)}))}},{key:"handleEvents",value:function(){l("body").on("click","a.module-read-more-grid-btn, a.module-read-more-list-btn",(function(e){e.preventDefault();var t=l(e.target).data("target");l.get(e.target.href,(function(e){l(t).html(e),l(t).modal()}))}))}}]),e}();t.default=a},24043:(e,t,o)=>{e.exports={default:o(47185),__esModule:!0}},65425:(e,t,o)=>{e.exports={default:o(24334),__esModule:!0}},32242:(e,t,o)=>{e.exports={default:o(33391),__esModule:!0}},88902:(e,t,o)=>{e.exports={default:o(98613),__esModule:!0}},99663:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},22600:(e,t,o)=>{"use strict";t.__esModule=!0;var n,r=o(32242),i=(n=r)&&n.__esModule?n:{default:n};t.default=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,i.default)(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}()},85315:(e,t,o)=>{"use strict";t.__esModule=!0;var n,r=o(24043),i=(n=r)&&n.__esModule?n:{default:n};t.default=function(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return(0,i.default)(e)}},47185:(e,t,o)=>{o(91867),o(2586),e.exports=o(34579).Array.from},24334:(e,t,o)=>{o(22960),e.exports=o(34579).Number.isNaN},33391:(e,t,o)=>{o(31477);var n=o(34579).Object;e.exports=function(e,t,o){return n.defineProperty(e,t,o)}},98613:(e,t,o)=>{o(40961),e.exports=o(34579).Object.keys},85663:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},12159:(e,t,o)=>{var n=o(36727);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},57428:(e,t,o)=>{var n=o(7932),r=o(78728),i=o(16531);e.exports=function(e){return function(t,o,l){var a,s=n(t),u=r(s.length),c=i(l,u);if(e&&o!=o){for(;u>c;)if((a=s[c++])!=a)return!0}else for(;u>c;c++)if((e||c in s)&&s[c]===o)return e||c||0;return!e&&-1}}},14677:(e,t,o)=>{var n=o(32894),r=o(22939)("toStringTag"),i="Arguments"==n(function(){return arguments}());e.exports=function(e){var t,o,l;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(o=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),r))?o:i?n(t):"Object"==(l=n(t))&&"function"==typeof t.callee?"Arguments":l}},32894:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},34579:e=>{var t=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=t)},52445:(e,t,o)=>{"use strict";var n=o(4743),r=o(83101);e.exports=function(e,t,o){t in e?n.f(e,t,r(0,o)):e[t]=o}},19216:(e,t,o)=>{var n=o(85663);e.exports=function(e,t,o){if(n(e),void 0===t)return e;switch(o){case 1:return function(o){return e.call(t,o)};case 2:return function(o,n){return e.call(t,o,n)};case 3:return function(o,n,r){return e.call(t,o,n,r)}}return function(){return e.apply(t,arguments)}}},8333:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},89666:(e,t,o)=>{e.exports=!o(7929)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},97467:(e,t,o)=>{var n=o(36727),r=o(33938).document,i=n(r)&&n(r.createElement);e.exports=function(e){return i?r.createElement(e):{}}},73338:e=>{e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},83856:(e,t,o)=>{var n=o(33938),r=o(34579),i=o(19216),l=o(41818),a=o(27069),s=function(e,t,o){var u,c,d,m=e&s.F,h=e&s.G,f=e&s.S,p=e&s.P,g=e&s.B,v=e&s.W,S=h?r:r[t]||(r[t]={}),b=S.prototype,y=h?n:f?n[t]:(n[t]||{}).prototype;for(u in h&&(o=t),o)(c=!m&&y&&void 0!==y[u])&&a(S,u)||(d=c?y[u]:o[u],S[u]=h&&"function"!=typeof y[u]?o[u]:g&&c?i(d,n):v&&y[u]==d?function(e){var t=function(t,o,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,o)}return new e(t,o,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):p&&"function"==typeof d?i(Function.call,d):d,p&&((S.virtual||(S.virtual={}))[u]=d,e&s.R&&b&&!b[u]&&l(b,u,d)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},7929:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},33938:e=>{var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},27069:e=>{var t={}.hasOwnProperty;e.exports=function(e,o){return t.call(e,o)}},41818:(e,t,o)=>{var n=o(4743),r=o(83101);e.exports=o(89666)?function(e,t,o){return n.f(e,t,r(1,o))}:function(e,t,o){return e[t]=o,e}},54881:(e,t,o)=>{var n=o(33938).document;e.exports=n&&n.documentElement},33758:(e,t,o)=>{e.exports=!o(89666)&&!o(7929)((function(){return 7!=Object.defineProperty(o(97467)("div"),"a",{get:function(){return 7}}).a}))},50799:(e,t,o)=>{var n=o(32894);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},45991:(e,t,o)=>{var n=o(15449),r=o(22939)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||i[r]===e)}},36727:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},95602:(e,t,o)=>{var n=o(12159);e.exports=function(e,t,o,r){try{return r?t(n(o)[0],o[1]):t(o)}catch(t){var i=e.return;throw void 0!==i&&n(i.call(e)),t}}},33945:(e,t,o)=>{"use strict";var n=o(98989),r=o(83101),i=o(25378),l={};o(41818)(l,o(22939)("iterator"),(function(){return this})),e.exports=function(e,t,o){e.prototype=n(l,{next:r(1,o)}),i(e,t+" Iterator")}},45700:(e,t,o)=>{"use strict";var n=o(16227),r=o(83856),i=o(57470),l=o(41818),a=o(15449),s=o(33945),u=o(25378),c=o(95089),d=o(22939)("iterator"),m=!([].keys&&"next"in[].keys()),h="keys",f="values",p=function(){return this};e.exports=function(e,t,o,g,v,S,b){s(o,t,g);var y,k,C,M=function(e){if(!m&&e in A)return A[e];switch(e){case h:case f:return function(){return new o(this,e)}}return function(){return new o(this,e)}},w=t+" Iterator",_=v==f,L=!1,A=e.prototype,I=A[d]||A["@@iterator"]||v&&A[v],x=I||M(v),T=v?_?M("entries"):x:void 0,D="Array"==t&&A.entries||I;if(D&&(C=c(D.call(new e)))!==Object.prototype&&C.next&&(u(C,w,!0),n||"function"==typeof C[d]||l(C,d,p)),_&&I&&I.name!==f&&(L=!0,x=function(){return I.call(this)}),n&&!b||!m&&!L&&A[d]||l(A,d,x),a[t]=x,a[w]=p,v)if(y={values:_?x:M(f),keys:S?x:M(h),entries:T},b)for(k in y)k in A||i(A,k,y[k]);else r(r.P+r.F*(m||L),t,y);return y}},96630:(e,t,o)=>{var n=o(22939)("iterator"),r=!1;try{var i=[7][n]();i.return=function(){r=!0},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!r)return!1;var o=!1;try{var i=[7],l=i[n]();l.next=function(){return{done:o=!0}},i[n]=function(){return l},e(i)}catch(e){}return o}},15449:e=>{e.exports={}},16227:e=>{e.exports=!0},98989:(e,t,o)=>{var n=o(12159),r=o(57856),i=o(73338),l=o(58989)("IE_PROTO"),a=function(){},s=function(){var e,t=o(97467)("iframe"),n=i.length;for(t.style.display="none",o(54881).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),s=e.F;n--;)delete s.prototype[i[n]];return s()};e.exports=Object.create||function(e,t){var o;return null!==e?(a.prototype=n(e),o=new a,a.prototype=null,o[l]=e):o=s(),void 0===t?o:r(o,t)}},4743:(e,t,o)=>{var n=o(12159),r=o(33758),i=o(33206),l=Object.defineProperty;t.f=o(89666)?Object.defineProperty:function(e,t,o){if(n(e),t=i(t,!0),n(o),r)try{return l(e,t,o)}catch(e){}if("get"in o||"set"in o)throw TypeError("Accessors not supported!");return"value"in o&&(e[t]=o.value),e}},57856:(e,t,o)=>{var n=o(4743),r=o(12159),i=o(46162);e.exports=o(89666)?Object.defineProperties:function(e,t){r(e);for(var o,l=i(t),a=l.length,s=0;a>s;)n.f(e,o=l[s++],t[o]);return e}},95089:(e,t,o)=>{var n=o(27069),r=o(66530),i=o(58989)("IE_PROTO"),l=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),n(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},12963:(e,t,o)=>{var n=o(27069),r=o(7932),i=o(57428)(!1),l=o(58989)("IE_PROTO");e.exports=function(e,t){var o,a=r(e),s=0,u=[];for(o in a)o!=l&&n(a,o)&&u.push(o);for(;t.length>s;)n(a,o=t[s++])&&(~i(u,o)||u.push(o));return u}},46162:(e,t,o)=>{var n=o(12963),r=o(73338);e.exports=Object.keys||function(e){return n(e,r)}},12584:(e,t,o)=>{var n=o(83856),r=o(34579),i=o(7929);e.exports=function(e,t){var o=(r.Object||{})[e]||Object[e],l={};l[e]=t(o),n(n.S+n.F*i((function(){o(1)})),"Object",l)}},83101:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},57470:(e,t,o)=>{e.exports=o(41818)},25378:(e,t,o)=>{var n=o(4743).f,r=o(27069),i=o(22939)("toStringTag");e.exports=function(e,t,o){e&&!r(e=o?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},58989:(e,t,o)=>{var n=o(20250)("keys"),r=o(65730);e.exports=function(e){return n[e]||(n[e]=r(e))}},20250:(e,t,o)=>{var n=o(34579),r=o(33938),i="__core-js_shared__",l=r[i]||(r[i]={});(e.exports=function(e,t){return l[e]||(l[e]=void 0!==t?t:{})})("versions",[]).push({version:n.version,mode:o(16227)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},90510:(e,t,o)=>{var n=o(11052),r=o(8333);e.exports=function(e){return function(t,o){var i,l,a=String(r(t)),s=n(o),u=a.length;return s<0||s>=u?e?"":void 0:(i=a.charCodeAt(s))<55296||i>56319||s+1===u||(l=a.charCodeAt(s+1))<56320||l>57343?e?a.charAt(s):i:e?a.slice(s,s+2):l-56320+(i-55296<<10)+65536}}},16531:(e,t,o)=>{var n=o(11052),r=Math.max,i=Math.min;e.exports=function(e,t){return(e=n(e))<0?r(e+t,0):i(e,t)}},11052:e=>{var t=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:t)(e)}},7932:(e,t,o)=>{var n=o(50799),r=o(8333);e.exports=function(e){return n(r(e))}},78728:(e,t,o)=>{var n=o(11052),r=Math.min;e.exports=function(e){return e>0?r(n(e),9007199254740991):0}},66530:(e,t,o)=>{var n=o(8333);e.exports=function(e){return Object(n(e))}},33206:(e,t,o)=>{var n=o(36727);e.exports=function(e,t){if(!n(e))return e;var o,r;if(t&&"function"==typeof(o=e.toString)&&!n(r=o.call(e)))return r;if("function"==typeof(o=e.valueOf)&&!n(r=o.call(e)))return r;if(!t&&"function"==typeof(o=e.toString)&&!n(r=o.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},65730:e=>{var t=0,o=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++t+o).toString(36))}},22939:(e,t,o)=>{var n=o(20250)("wks"),r=o(65730),i=o(33938).Symbol,l="function"==typeof i;(e.exports=function(e){return n[e]||(n[e]=l&&i[e]||(l?i:r)("Symbol."+e))}).store=n},83728:(e,t,o)=>{var n=o(14677),r=o(22939)("iterator"),i=o(15449);e.exports=o(34579).getIteratorMethod=function(e){if(null!=e)return e[r]||e["@@iterator"]||i[n(e)]}},2586:(e,t,o)=>{"use strict";var n=o(19216),r=o(83856),i=o(66530),l=o(95602),a=o(45991),s=o(78728),u=o(52445),c=o(83728);r(r.S+r.F*!o(96630)((function(e){Array.from(e)})),"Array",{from:function(e){var t,o,r,d,m=i(e),h="function"==typeof this?this:Array,f=arguments.length,p=f>1?arguments[1]:void 0,g=void 0!==p,v=0,S=c(m);if(g&&(p=n(p,f>2?arguments[2]:void 0,2)),null==S||h==Array&&a(S))for(o=new h(t=s(m.length));t>v;v++)u(o,v,g?p(m[v],v):m[v]);else for(d=S.call(m),o=new h;!(r=d.next()).done;v++)u(o,v,g?l(d,p,[r.value,v],!0):r.value);return o.length=v,o}})},22960:(e,t,o)=>{var n=o(83856);n(n.S,"Number",{isNaN:function(e){return e!=e}})},31477:(e,t,o)=>{var n=o(83856);n(n.S+n.F*!o(89666),"Object",{defineProperty:o(4743).f})},40961:(e,t,o)=>{var n=o(66530),r=o(46162);o(12584)("keys",(function(){return function(e){return r(n(e))}}))},91867:(e,t,o)=>{"use strict";var n=o(90510)(!0);o(45700)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,o=this._i;return o>=t.length?{value:void 0,done:!0}:(e=n(t,o),this._i+=e.length,{value:e,done:!1})}))},73609:e=>{"use strict";e.exports=window.jQuery}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}(()=>{"use strict";var e=r(o(60817)),t=r(o(5774)),n=r(o(71423));function r(e){return e&&e.__esModule?e:{default:e}}
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/
(0,window.$)((function(){var o=new e.default;new n.default,new t.default(o)}))})(),window.module={}})();