(()=>{var t={3867:(t,e,n)=>{var o,i,r,s,a,l,d=n(9567);
/*! jquery.tablednd.js 20-11-2020 */o=d,i=window,r=window.document,s="touchstart mousedown",a="touchmove mousemove",l="touchend mouseup",o(r).ready((function(){function t(t){for(var e={},n=t.match(/([^;:]+)/g)||[];n.length;)e[n.shift()]=n.shift().trim();return e}o("table").each((function(){"dnd"===o(this).data("table")&&o(this).tableDnD({onDragStyle:o(this).data("ondragstyle")&&t(o(this).data("ondragstyle"))||null,onDropStyle:o(this).data("ondropstyle")&&t(o(this).data("ondropstyle"))||null,onDragClass:void 0===o(this).data("ondragclass")?"tDnD_whileDrag":o(this).data("ondragclass"),onDrop:o(this).data("ondrop")&&new Function("table","row",o(this).data("ondrop")),onDragStart:o(this).data("ondragstart")&&new Function("table","row",o(this).data("ondragstart")),onDragStop:o(this).data("ondragstop")&&new Function("table","row",o(this).data("ondragstop")),scrollAmount:o(this).data("scrollamount")||5,sensitivity:o(this).data("sensitivity")||10,hierarchyLevel:o(this).data("hierarchylevel")||0,indentArtifact:o(this).data("indentartifact")||'
',autoWidthAdjust:o(this).data("autowidthadjust")||!0,autoCleanRelations:o(this).data("autocleanrelations")||!0,jsonPretifySeparator:o(this).data("jsonpretifyseparator")||"\t",serializeRegexp:o(this).data("serializeregexp")&&new RegExp(o(this).data("serializeregexp"))||/[^\-]*$/,serializeParamName:o(this).data("serializeparamname")||!1,dragHandle:o(this).data("draghandle")||null})}))})),d.tableDnD={currentTable:null,dragObject:null,mouseOffset:null,oldX:0,oldY:0,build:function(t){return this.each((function(){this.tableDnDConfig=o.extend({onDragStyle:null,onDropStyle:null,onDragClass:"tDnD_whileDrag",onDrop:null,onDragStart:null,onDragStop:null,scrollAmount:5,sensitivity:10,hierarchyLevel:0,indentArtifact:'
',autoWidthAdjust:!0,autoCleanRelations:!0,jsonPretifySeparator:"\t",serializeRegexp:/[^\-]*$/,serializeParamName:!1,dragHandle:null},t||{}),o.tableDnD.makeDraggable(this),this.tableDnDConfig.hierarchyLevel&&o.tableDnD.makeIndented(this)})),this},makeIndented:function(t){var e,n,i=t.tableDnDConfig,r=t.rows,s=o(r).first().find("td:first")[0],a=0,l=0;if(o(t).hasClass("indtd"))return null;n=o(t).addClass("indtd").attr("style"),o(t).css({whiteSpace:"nowrap"});for(var d=0;dt.vertical&&this.dragObject.parentNode.insertBefore(this.dragObject,e.nextSibling)||00&&o(e).find("td:first").children(":first").remove()&&o(e).data("level",--n),0>t.horizontal&&n=n&&o(e).children(":first").prepend(i.indentArtifact)&&o(e).data("level",++n)},mousemove:function(t){var e,n,i,r,s,a=o(o.tableDnD.dragObject),l=o.tableDnD.currentTable.tableDnDConfig;return t&&t.preventDefault(),!!o.tableDnD.dragObject&&("touchmove"===t.type&&event.preventDefault(),l.onDragClass&&a.addClass(l.onDragClass)||a.css(l.onDragStyle),r=(n=o.tableDnD.mouseCoords(t)).x-o.tableDnD.mouseOffset.x,s=n.y-o.tableDnD.mouseOffset.y,o.tableDnD.autoScroll(n),e=o.tableDnD.findDropTargetRow(a,s),i=o.tableDnD.findDragDirection(r,s),o.tableDnD.moveVerticle(i,e),o.tableDnD.moveHorizontal(i,e),!1)},findDragDirection:function(t,e){var n=this.currentTable.tableDnDConfig.sensitivity,o=this.oldX,i=this.oldY,r={horizontal:t>=o-n&&t<=o+n?0:t>o?-1:1,vertical:e>=i-n&&e<=i+n?0:e>i?-1:1};return 0!==r.horizontal&&(this.oldX=t),0!==r.vertical&&(this.oldY=e),r},findDropTargetRow:function(t,e){for(var n=0,i=this.currentTable.rows,r=this.currentTable.tableDnDConfig,s=0,a=null,l=0;ls-n&&e1&&o(this.currentTable.rows).each((function(){if((i=o(this).data("level"))>1)for(n=o(this).prev().data("level");i>n+1;)o(this).find("td:first").children(":first").remove(),o(this).data("level",--i)})),t.onDragClass&&o(e).removeClass(t.onDragClass)||o(e).css(t.onDropStyle),this.dragObject=null,t.onDrop&&this.originalOrder!==this.currentOrder()&&o(e).hide().fadeIn("fast")&&t.onDrop(this.currentTable,e),t.onDragStop&&t.onDragStop(this.currentTable,e),this.currentTable=null},mouseup:function(t){return t&&t.preventDefault(),o.tableDnD.processMouseup(),!1},jsonize:function(t){var e=this.currentTable;return t?JSON.stringify(this.tableData(e),null,e.tableDnDConfig.jsonPretifySeparator):JSON.stringify(this.tableData(e))},serialize:function(){return o.param(this.tableData(this.currentTable))},serializeTable:function(t){for(var e="",n=t.tableDnDConfig.serializeParamName||t.id,o=t.rows,i=0;i0&&(e+="&");var r=o[i].id;r&&t.tableDnDConfig&&t.tableDnDConfig.serializeRegexp&&(e+=n+"[]="+(r=r.match(t.tableDnDConfig.serializeRegexp)[0]))}return e},serializeTables:function(){var t=[];return o("table").each((function(){this.id&&t.push(o.param(o.tableDnD.tableData(this)))})),t.join("&")},tableData:function(t){var e,n,i,r,s=t.tableDnDConfig,a=[],l=0,d=0,c=null,h={};if(t||(t=this.currentTable),!t||!t.rows||!t.rows.length)return{error:{code:500,message:"Not a valid table."}};if(!t.id&&!s.serializeParamName)return{error:{code:500,message:"No serializable unique id provided."}};r=s.autoCleanRelations&&t.rows||o.makeArray(t.rows),e=function(t){return t&&s&&s.serializeRegexp?t.match(s.serializeRegexp)[0]:t},h[i=n=s.serializeParamName||t.id]=[],!s.autoCleanRelations&&o(r[0]).data("level")&&r.unshift({id:"undefined"});for(var u=0;ul)a.push([i,l]),i=e(r[u-1].id);else if(d=l&&(a[f][1]=0);l=d,o.isArray(h[i])||(h[i]=[]),(c=e(r[u].id))&&h[i].push(c)}else(c=e(r[u].id))&&h[i].push(c);return h}},d.fn.extend({tableDnD:o.tableDnD.build,tableDnDUpdate:o.tableDnD.updateTables,tableDnDSerialize:o.proxy(o.tableDnD.serialize,o.tableDnD),tableDnDSerializeAll:o.tableDnD.serializeTables,tableDnDData:o.proxy(o.tableDnD.tableData,o.tableDnD)})},9567:t=>{"use strict";t.exports=window.jQuery}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o](r,r.exports,n),r.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o);
/**
* 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)
*/
const{$:t}=window;class e{constructor(e){this.id=e,this.$container=t(`#${this.id}`)}getContainer(){return this.$container}addExtension(t){t.extend(this)}}
/**
* 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)
*/
const{$:i}=window;class r{extend(t){const e=t.getContainer();e.on("click",".js-remove-helper-block",(t=>{e.remove();const n=i(t.target),o=n.data("closeUrl"),r=n.data("cardName");o&&i.post(o,{close:1,name:r})}))}}
/**
* 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)
*/const s={deleteCategories:".js-delete-categories-bulk-action",deleteCategoriesModal:t=>`#${t}_grid_delete_categories_modal`,checkedCheckbox:".js-bulk-action-checkbox:checked",deleteCustomers:".js-delete-customers-bulk-action",deleteCustomerModal:t=>`#${t}_grid_delete_customers_modal`,submitDeleteCategories:".js-submit-delete-categories",submitDeleteCustomers:".js-submit-delete-customers",categoriesToDelete:"#delete_categories_categories_to_delete",customersToDelete:"#delete_customers_customers_to_delete",actionSelectAll:".js-bulk-action-select-all",bulkActionCheckbox:".js-bulk-action-checkbox",bulkActionBtn:".js-bulk-actions-btn",openTabsBtn:".js-bulk-action-btn.open_tabs",tableChoiceOptions:"table.table .js-choice-options",choiceOptions:".js-choice-options",modalFormSubmitBtn:".js-bulk-modal-form-submit-btn",submitAction:".js-bulk-action-submit-btn",ajaxAction:".js-bulk-action-ajax-btn",gridSubmitAction:".js-grid-action-submit-btn"},a={categoryDeleteAction:".js-delete-category-row-action",customerDeleteAction:".js-delete-customer-row-action",linkRowAction:".js-link-row-action",linkRowActionClickableFirst:".js-link-row-action[data-clickable-row=1]:first",clickableTd:"td.clickable"},l={showQuery:".js-common_show_query-grid-action",exportQuery:".js-common_export_sql_manager-grid-action",showModalForm:t=>`#${t}_common_show_query_modal_form`,showModalGrid:t=>`#${t}_grid_common_show_query_modal`,modalFormSubmitBtn:".js-bulk-modal-form-submit-btn",submitModalFormBtn:".js-submit-modal-form-btn",bulkInputsBlock:t=>`#${t}`,tokenInput:t=>`input[name="${t}[_token]"]`,ajaxBulkActionConfirmModal:(t,e)=>`${t}-ajax-${e}-confirm-modal`,ajaxBulkActionProgressModal:(t,e)=>`${t}-ajax-${e}-progress-modal`},d=t=>`${t}-grid-confirm-modal`,c=".js-grid-table",h=".js-drag-handle",u="js-drag-handle",f=t=>`#${t}_grid`,m=".js-grid-panel",b=".js-grid-header",p=t=>`.js-grid-table .js-${t}-position`,g=t=>`.js-${t}-position:first`,v=".ps-togglable-row",w="table.table",y=".header-toolbar",D=".breadcrumb-item",_=".js-reset-search",C=".column-filters",k=".grid-search-button",O=".grid-reset-button",x="input:not(.js-bulk-action-select-all), select",T=".js-common_refresh_list-grid-action",j=t=>`#${t}_filter_form`,E="position-row-while-drag",B=".btn-sql-submit",{$:A}=window;class S{constructor(t){this.id=t,this.$container=A(f(this.id))}getId(){return this.id}getContainer(){return this.$container}getHeaderContainer(){return this.$container.closest(m).find(b)}addExtension(t){t.extend(this)}}
/**
* 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)
*/
const{$:M}=window;const P=class{constructor(t){var e;this.selector=".ps-sortable-column",this.idTable=null!=(e=t.attr("id"))?e:"",this.columns=t.find(this.selector)}attach(){this.columns.on("click",(t=>{const e=M(t.delegateTarget);this.sortByColumn(e,this.getToggledSortDirection(e))}))}sortBy(t,e){if(!this.columns.is(`[data-sort-col-name="${t}"]`))throw new Error(`Cannot sort by "${t}": invalid column`);this.sortByColumn(this.columns,e)}sortByColumn(t,e){window.location.href=this.getUrl(t.data("sortColName"),"desc"===e?"desc":"asc",t.data("sortPrefix"))}getToggledSortDirection(t){return"asc"===t.data("sortDirection")?"desc":"asc"}getUrl(t,e,n){const o=new URL(window.location.href),i=o.searchParams;return n?(i.set(`${n}[orderBy]`,t),i.set(`${n}[sortOrder]`,e)):(i.set("orderBy",t),i.set("sortOrder",e)),o.hash=this.idTable,o.toString()}};
/**
* 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)
*/
class L{extend(t){const e=t.getContainer().find(w);new P(e).attach()}}
/**
* 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)
*/
const{$}=window,R=function(t,e){$.post(t).then((()=>window.location.assign(e)))},{$:I}=window;class z{extend(t){t.getContainer().on("click",_,(t=>{R(I(t.currentTarget).data("url"),I(t.currentTarget).data("redirect"))}))}}
/**
* 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)
*/
class F{extend(t){t.getHeaderContainer().on("click",T,(()=>{window.location.reload()}))}}
/**
* 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)
*/
const{$:H}=window;class N{extend(t){t.getContainer().find(w).find(v).on("click",(t=>{t.preventDefault(),this.toggleValue(H(t.delegateTarget))}))}toggleValue(t){const e=t.data("toggleUrl");this.submitAsForm(e)}submitAsForm(t){H("