window.module_card=function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=296)}({1:function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},296:function(t,e,n){"use strict";(function(t){var e=n(55),o=function(t){return t&&t.__esModule?t:{default:t}}(e);/** * 2007-2019 PrestaShop and Contributors * * 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.txt. * 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://www.prestashop.com for more information. * * @author PrestaShop SA * @copyright 2007-2019 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ (0,t.$)(function(){(new o.default).init()})}).call(e,n(1))},4:function(t,e){!function(){t.exports=window.jQuery}()},55:function(t,e,n){"use strict";(function(t){function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var n=0;n").attr({type:"hidden",value:"1",name:"actionParams[confirmPrestaTrust]"}).appendTo(i),o.click(),n.modal("hide")}),n.modal()}},{key:"_replacePrestaTrustPlaceholders",value:function(t){var e=r("#modal-prestatrust"),n=t.module.attributes;if("PrestaTrust"===t.confirmation_subject&&e.length){var o=n.prestatrust.status?"success":"warning";return n.prestatrust.check_list.property?(e.find("#pstrust-btn-property-ok").show(),e.find("#pstrust-btn-property-nok").hide()):(e.find("#pstrust-btn-property-ok").hide(),e.find("#pstrust-btn-property-nok").show(),e.find("#pstrust-buy").attr("href",n.url).toggle(null!==n.url)),e.find("#pstrust-img").attr({src:n.img,alt:n.name}),e.find("#pstrust-name").text(n.displayName),e.find("#pstrust-author").text(n.author),e.find("#pstrust-label").attr("class","text-"+o).text(n.prestatrust.status?"OK":"KO"),e.find("#pstrust-message").attr("class","alert alert-"+o),e.find("#pstrust-message > p").text(n.prestatrust.message),e}}},{key:"_dispatchPreEvent",value:function(e,n){var o=t.Event("module_card_action_event");return r(n).trigger(o,[e]),!1===o.isPropagationStopped()&&!1===o.isImmediatePropagationStopped()&&!1!==o.result}},{key:"_requestToController",value:function(t,e,n,i,a){var u=this,s=e.closest(this.moduleItemActionsSelector),c=e.closest("form"),d=r(''),m="//"+window.location.host+c.attr("action"),f=c.serializeArray();return"true"!==n&&!0!==n||f.push({name:"actionParams[deletion]",value:!0}),"true"!==i&&!0!==i||f.push({name:"actionParams[cacheClearEnabled]",value:0}),r.ajax({url:m,dataType:"json",method:"POST",data:f,beforeSend:function(){s.hide(),s.after(d)}}).done(function(e){if(void 0===(void 0===e?"undefined":o(e)))return void r.growl.error({message:"No answer received from server"});if(void 0!==e.status&&!1===e.status)return void r.growl.error({message:e.msg});var n=Object.keys(e)[0];if(!1===e[n].status)return void 0!==e[n].confirmation_subject&&u._confirmPrestaTrust(e[n]),void r.growl.error({message:e[n].msg});r.growl.notice({message:e[n].msg});var i=u._getModuleItemSelector().replace(".",""),a=null;"uninstall"==t?(a=s.closest("."+i),a.remove(),l.emitEvent("Module Uninstalled","CustomEvent")):"disable"==t?(a=s.closest("."+i),a.addClass(i+"-isNotActive"),a.attr("data-active","0"),l.emitEvent("Module Disabled","CustomEvent")):"enable"==t&&(a=s.closest("."+i),a.removeClass(i+"-isNotActive"),a.attr("data-active","1"),l.emitEvent("Module Enabled","CustomEvent")),s.replaceWith(e[n].action_menu_html)}).fail(function(){var e=s.closest("module-item-list"),n=e.data("techName");r.growl.error({message:"Could not perform action "+t+" for module "+n})}).always(function(){s.fadeIn(),d.remove(),a&&a()}),!1}}]),e}();e.default=a}).call(e,n(4))}});