(()=>{var t={12158:(t,e,o)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(o(99663)),r=i(o(22600));function i(t){return t&&t.__esModule?t:{default:t}} /** * 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 * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */var s=window.$,u=function(){function t(){(0,n.default)(this,t);var e=this;e.$hookStatus=s(".hook-switch-action"),e.$modulePositionsForm=s("#module-positions-form"),e.$hookStatus.on("change",(function(t){t.stopImmediatePropagation(),e.toogleHookStatus(s(this))}))}return(0,r.default)(t,[{key:"toogleHookStatus",value:function(t){s.ajax({type:"POST",headers:{"cache-control":"no-cache"},url:this.$modulePositionsForm.data("togglestatus-url"),data:{hookId:t.data("hook-id")},success:function(e){e.status?(window.showSuccessMessage(e.message),t.closest(".hook-panel").find(".module-list, .module-list-disabled").fadeTo(500,e.hook_status?1:.5)):window.showErrorMessage(e.message)}})}}]),t}();e.default=u},59591:(t,e,o)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=s(o(12424)),r=s(o(99663)),i=s(o(22600));function s(t){return t&&t.__esModule?t:{default:t}} /** * 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 * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */var u=window.$,a=function(){function t(){if((0,r.default)(this,t),0!==u("#position-filters").length){var e=this;e.$panelSelection=u("#modules-position-selection-panel"),e.$panelSelectionSingleSelection=u("#modules-position-single-selection"),e.$panelSelectionMultipleSelection=u("#modules-position-multiple-selection"),e.$panelSelectionOriginalY=e.$panelSelection.offset().top,e.$showModules=u("#show-modules"),e.$modulesList=u(".modules-position-checkbox"),e.$hookPosition=u("#hook-position"),e.$hookSearch=u("#hook-search"),e.$modulePositionsForm=u("#module-positions-form"),e.$moduleUnhookButton=u("#unhook-button-position-bottom"),e.$moduleButtonsUpdate=u(".module-buttons-update .btn"),e.handleList(),e.handleSortable(),u('input[name="general[enable_tos]"]').on("change",(function(){return e.handle()}))}}return(0,i.default)(t,[{key:"handleList",value:function(){var t=this;u(window).on("scroll",(function(){var e=u(window).scrollTop();t.$panelSelection.css("top",e<20?0:e-t.$panelSelectionOriginalY)})),t.$modulesList.on("change",(function(){var e=t.$modulesList.filter(":checked").length;0===e?(t.$moduleUnhookButton.hide(),t.$panelSelection.hide(),t.$panelSelectionSingleSelection.hide(),t.$panelSelectionMultipleSelection.hide()):1===e?(t.$moduleUnhookButton.show(),t.$panelSelection.show(),t.$panelSelectionSingleSelection.show(),t.$panelSelectionMultipleSelection.hide()):(t.$moduleUnhookButton.show(),t.$panelSelection.show(),t.$panelSelectionSingleSelection.hide(),t.$panelSelectionMultipleSelection.show(),u("#modules-position-selection-count").html(e))})),t.$panelSelection.find("button").click((function(){u('button[name="unhookform"]').trigger("click")})),t.$hooksList=[],u("section.hook-panel .hook-name").each((function(){var e=u(this);t.$hooksList.push({title:e.html(),element:e,container:e.parents(".hook-panel")})})),t.$showModules.select2(),t.$showModules.on("change",(function(){t.modulesPositionFilterHooks()})),t.$hookPosition.on("change",(function(){t.modulesPositionFilterHooks()})),t.$hookSearch.on("input",(function(){t.modulesPositionFilterHooks()})),t.$hookSearch.on("keypress",(function(t){return 13!==(t.keyCode||t.which)})),u(".hook-checker").on("click",(function(){u(".hook"+u(this).data("hook-id")).prop("checked",u(this).prop("checked"))})),t.$modulesList.on("click",(function(){u("#Ghook"+u(this).data("hook-id")).prop("checked",0===u(".hook"+u(this).data("hook-id")+":not(:checked)").length)})),t.$moduleButtonsUpdate.on("click",(function(){var e=u(this),o=e.closest(".module-item"),n=void 0;return 0===(n=e.data("way")?o.next(".module-item"):o.prev(".module-item")).length||(e.data("way")?o.insertAfter(n):o.insertBefore(n),t.updatePositions({hookId:e.data("hook-id"),moduleId:e.data("module-id"),way:e.data("way"),positions:[]},e.closest("ul"))),!1}))}},{key:"handleSortable",value:function(){var t=this;u(".sortable").sortable({forcePlaceholderSize:!0,start:function(t,e){u(this).data("previous-index",e.item.index())},update:function(e,o){var r=o.item.attr("id").split("_"),i=(0,n.default)(r,2),s={hookId:i[0],moduleId:i[1],way:u(this).data("previous-index")0&&(i=i.add(t.$hooksList[l].container),a.addClass("highlight")),""!==e&&-1!==t.$hooksList[l].title.toLowerCase().search(e.toLowerCase())&&(s=s.add(t.$hooksList[l].container),t.$hooksList[l].element.html(t.$hooksList[l].title.replace(n,'$1')));"all"===o&&""!==e?s.show():""===e&&"all"!==o?i.show():s.filter(i).show()}if(!t.$hookPosition.prop("checked"))for(var c=0;c{t.exports={default:o(3597),__esModule:!0}},40863:(t,e,o)=>{t.exports={default:o(21035),__esModule:!0}},32242:(t,e,o)=>{t.exports={default:o(33391),__esModule:!0}},99663:(t,e)=>{"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},22600:(t,e,o)=>{"use strict";e.__esModule=!0;var n,r=o(32242),i=(n=r)&&n.__esModule?n:{default:n};e.default=function(){function t(t,e){for(var o=0;o{"use strict";e.__esModule=!0;var n=i(o(40863)),r=i(o(26378));function i(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e){if(Array.isArray(t))return t;if((0,n.default)(Object(t)))return function(t,e){var o=[],n=!0,i=!1,s=void 0;try{for(var u,a=(0,r.default)(t);!(n=(u=a.next()).done)&&(o.push(u.value),!e||o.length!==e);n=!0);}catch(t){i=!0,s=t}finally{try{!n&&a.return&&a.return()}finally{if(i)throw s}}return o}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}},3597:(t,e,o)=>{o(73871),o(91867),t.exports=o(46459)},21035:(t,e,o)=>{o(73871),o(91867),t.exports=o(89553)},33391:(t,e,o)=>{o(31477);var n=o(34579).Object;t.exports=function(t,e,o){return n.defineProperty(t,e,o)}},85663:t=>{t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},79003:t=>{t.exports=function(){}},12159:(t,e,o)=>{var n=o(36727);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},57428:(t,e,o)=>{var n=o(7932),r=o(78728),i=o(16531);t.exports=function(t){return function(e,o,s){var u,a=n(e),l=r(a.length),c=i(s,l);if(t&&o!=o){for(;l>c;)if((u=a[c++])!=u)return!0}else for(;l>c;c++)if((t||c in a)&&a[c]===o)return t||c||0;return!t&&-1}}},14677:(t,e,o)=>{var n=o(32894),r=o(22939)("toStringTag"),i="Arguments"==n(function(){return arguments}());t.exports=function(t){var e,o,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(o=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),r))?o:i?n(e):"Object"==(s=n(e))&&"function"==typeof e.callee?"Arguments":s}},32894:t=>{var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},34579:t=>{var e=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=e)},19216:(t,e,o)=>{var n=o(85663);t.exports=function(t,e,o){if(n(t),void 0===e)return t;switch(o){case 1:return function(o){return t.call(e,o)};case 2:return function(o,n){return t.call(e,o,n)};case 3:return function(o,n,r){return t.call(e,o,n,r)}}return function(){return t.apply(e,arguments)}}},8333:t=>{t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},89666:(t,e,o)=>{t.exports=!o(7929)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},97467:(t,e,o)=>{var n=o(36727),r=o(33938).document,i=n(r)&&n(r.createElement);t.exports=function(t){return i?r.createElement(t):{}}},73338:t=>{t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},83856:(t,e,o)=>{var n=o(33938),r=o(34579),i=o(19216),s=o(41818),u=o(27069),a=function(t,e,o){var l,c,f,p=t&a.F,h=t&a.G,d=t&a.S,v=t&a.P,m=t&a.B,y=t&a.W,g=h?r:r[e]||(r[e]={}),k=g.prototype,w=h?n:d?n[e]:(n[e]||{}).prototype;for(l in h&&(o=e),o)(c=!p&&w&&void 0!==w[l])&&u(g,l)||(f=c?w[l]:o[l],g[l]=h&&"function"!=typeof w[l]?o[l]:m&&c?i(f,n):y&&w[l]==f?function(t){var e=function(e,o,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,o)}return new t(e,o,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(f):v&&"function"==typeof f?i(Function.call,f):f,v&&((g.virtual||(g.virtual={}))[l]=f,t&a.R&&k&&!k[l]&&s(k,l,f)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},7929:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},33938:t=>{var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},27069:t=>{var e={}.hasOwnProperty;t.exports=function(t,o){return e.call(t,o)}},41818:(t,e,o)=>{var n=o(4743),r=o(83101);t.exports=o(89666)?function(t,e,o){return n.f(t,e,r(1,o))}:function(t,e,o){return t[e]=o,t}},54881:(t,e,o)=>{var n=o(33938).document;t.exports=n&&n.documentElement},33758:(t,e,o)=>{t.exports=!o(89666)&&!o(7929)((function(){return 7!=Object.defineProperty(o(97467)("div"),"a",{get:function(){return 7}}).a}))},50799:(t,e,o)=>{var n=o(32894);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},36727:t=>{t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},33945:(t,e,o)=>{"use strict";var n=o(98989),r=o(83101),i=o(25378),s={};o(41818)(s,o(22939)("iterator"),(function(){return this})),t.exports=function(t,e,o){t.prototype=n(s,{next:r(1,o)}),i(t,e+" Iterator")}},45700:(t,e,o)=>{"use strict";var n=o(16227),r=o(83856),i=o(57470),s=o(41818),u=o(15449),a=o(33945),l=o(25378),c=o(95089),f=o(22939)("iterator"),p=!([].keys&&"next"in[].keys()),h="keys",d="values",v=function(){return this};t.exports=function(t,e,o,m,y,g,k){a(o,e,m);var w,S,x,$=function(t){if(!p&&t in M)return M[t];switch(t){case h:case d:return function(){return new o(this,t)}}return function(){return new o(this,t)}},_=e+" Iterator",b=y==d,L=!1,M=t.prototype,O=M[f]||M["@@iterator"]||y&&M[y],P=O||$(y),j=y?b?$("entries"):P:void 0,T="Array"==e&&M.entries||O;if(T&&(x=c(T.call(new t)))!==Object.prototype&&x.next&&(l(x,_,!0),n||"function"==typeof x[f]||s(x,f,v)),b&&O&&O.name!==d&&(L=!0,P=function(){return O.call(this)}),n&&!k||!p&&!L&&M[f]||s(M,f,P),u[e]=P,u[_]=v,y)if(w={values:b?P:$(d),keys:g?P:$(h),entries:j},k)for(S in w)S in M||i(M,S,w[S]);else r(r.P+r.F*(p||L),e,w);return w}},85084:t=>{t.exports=function(t,e){return{value:e,done:!!t}}},15449:t=>{t.exports={}},16227:t=>{t.exports=!0},98989:(t,e,o)=>{var n=o(12159),r=o(57856),i=o(73338),s=o(58989)("IE_PROTO"),u=function(){},a=function(){var t,e=o(97467)("iframe"),n=i.length;for(e.style.display="none",o(54881).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("