97 lines
40 KiB
JavaScript
97 lines
40 KiB
JavaScript
window.manufacturer=function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=501)}({0:function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},1:function(e,t,n){"use strict";t.__esModule=!0;var o=n(19),i=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),(0,i.default)(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}()},10:function(e,t,n){var o=n(6),i=n(12);e.exports=n(2)?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},11:function(e,t,n){var o=n(4);e.exports=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e}},12:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},13:function(e,t,n){var o=n(4);e.exports=function(e,t){if(!o(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!o(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!o(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!o(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},130:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=function(e){return e&&e.__esModule?e:{default:e}}(o),r=window.$,a=function e(){(0,i.default)(this,e),r(document).on("click",".js-form-submit-btn",function(e){e.preventDefault();var t=r(this);if(!t.data("form-confirm-message")||!1!==confirm(t.data("form-confirm-message"))){var n="POST",o=null;if(t.data("method")){var i=t.data("method"),a=["GET","POST"].includes(i);n=a?i:"POST",a||(o=r("<input>",{type:"_hidden",name:"_method",value:n}))}var u=r("<form>",{action:t.data("form-submit-url"),method:n});o&&u.append(o),t.data("form-csrf-token")&&u.append(r("<input>",{type:"_hidden",name:"_csrf_token",value:t.data("form-csrf-token")})),u.appendTo("body").submit()}})};t.default=a},131:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=o(i),a=n(1),u=o(a),l=n(36),c=window.$,s=function(){function e(t){(0,r.default)(this,e),t=t||{},this.localeButtonSelector=t.localeButtonSelector||'.translationsLocales.nav .nav-item a[data-toggle="tab"]',this.localeNavigationSelector=t.localeNavigationSelector||".translationsLocales.nav",c("body").on("shown.bs.tab",this.localeButtonSelector,this.toggleLanguage.bind(this)),l.EventEmitter.on("languageSelected",this.toggleFields.bind(this))}return(0,u.default)(e,[{key:"toggleLanguage",value:function(e){var t=c(e.target),n=t.closest("form");l.EventEmitter.emit("languageSelected",{selectedLocale:t.data("locale"),form:n})}},{key:"toggleFields",value:function(e){c(this.localeNavigationSelector).each(function(t,n){var o=c(".nav-item a.active",n),i=o.data("locale");e.selectedLocale!==i&&c('.nav-item a[data-locale="'+e.selectedLocale+'"]',n).tab("show")})}}]),e}();t.default=s},15:function(e,t,n){var o=n(18);e.exports=function(e,t,n){if(o(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,i){return e.call(t,n,o,i)}}return function(){return e.apply(t,arguments)}}},16:function(e,t,n){var o=n(4),i=n(5).document,r=o(i)&&o(i.createElement);e.exports=function(e){return r?i.createElement(e):{}}},17:function(e,t,n){e.exports=!n(2)&&!n(7)(function(){return 7!=Object.defineProperty(n(16)("div"),"a",{get:function(){return 7}}).a})},18:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},19:function(e,t,n){e.exports={default:n(20),__esModule:!0}},2:function(e,t,n){e.exports=!n(7)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},20:function(e,t,n){n(21);var o=n(3).Object;e.exports=function(e,t,n){return o.defineProperty(e,t,n)}},21:function(e,t,n){var o=n(8);o(o.S+o.F*!n(2),"Object",{defineProperty:n(6).f})},22:function(e,t,n){var o=n(51),i=n(38);e.exports=function(e){return o(i(e))}},23:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=o(i),a=n(1),u=o(a),l=window.$,c=function(){function e(t){(0,r.default)(this,e),this.id=t,this.$container=l("#"+this.id+"_grid")}return(0,u.default)(e,[{key:"getId",value:function(){return this.id}},{key:"getContainer",value:function(){return this.$container}},{key:"getHeaderContainer",value:function(){return this.$container.closest(".js-grid-panel").find(".js-grid-header")}},{key:"addExtension",value:function(e){e.extend(this)}}]),e}();t.default=c},24:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=o(i),a=n(1),u=o(a),l=n(42),c=o(l),s=window.$,d=function(){function e(){(0,r.default)(this,e)}return(0,u.default)(e,[{key:"extend",value:function(e){e.getContainer().on("click",".js-reset-search",function(e){(0,c.default)(s(e.currentTarget).data("url"),s(e.currentTarget).data("redirect"))})}}]),e}();t.default=d},25:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=o(i),a=n(1),u=o(a),l=n(40),c=o(l),s=function(){function e(){(0,r.default)(this,e)}return(0,u.default)(e,[{key:"extend",value:function(e){var t=e.getContainer().find("table.table");new c.default(t).attach()}}]),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=s},26:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=o(i),a=n(1),u=o(a),l=function(){function e(){(0,r.default)(this,e)}return(0,u.default)(e,[{key:"extend",value:function(e){e.getHeaderContainer().on("click",".js-common_refresh_list-grid-action",function(){location.reload()})}}]),e}();t.default=l},27:function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},28:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=o(i),a=n(1),u=o(a),l=window.$,c=function(){function e(){(0,r.default)(this,e)}return(0,u.default)(e,[{key:"extend",value:function(e){var t=this;e.getHeaderContainer().on("click",".js-common_show_query-grid-action",function(){return t._onShowSqlQueryClick(e)}),e.getHeaderContainer().on("click",".js-common_export_sql_manager-grid-action",function(){return t._onExportSqlManagerClick(e)})}},{key:"_onShowSqlQueryClick",value:function(e){var t=l("#"+e.getId()+"_common_show_query_modal_form");this._fillExportForm(t,e);var n=l("#"+e.getId()+"_grid_common_show_query_modal");n.modal("show"),n.on("click",".btn-sql-submit",function(){return t.submit()})}},{key:"_onExportSqlManagerClick",value:function(e){var t=l("#"+e.getId()+"_common_show_query_modal_form");this._fillExportForm(t,e),t.submit()}},{key:"_fillExportForm",value:function(e,t){var n=t.getContainer().find(".js-grid-table").data("query");e.find('textarea[name="sql"]').val(n),e.find('input[name="name"]').val(this._getNameFromBreadcrumb())}},{key:"_getNameFromBreadcrumb",value:function(){var e=l(".header-toolbar").find(".breadcrumb-item"),t="";return e.each(function(e,n){var o=l(n),i=0<o.find("a").length?o.find("a").text():o.text();0<t.length&&(t=t.concat(" > ")),t=t.concat(i)}),t}}]),e}();t.default=c},3:function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},30:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=o(i),a=n(1),u=o(a),l=function(){function e(){(0,r.default)(this,e)}return(0,u.default)(e,[{key:"extend",value:function(e){var t=e.getContainer().find(".column-filters");t.find(".grid-search-button").prop("disabled",!0),t.find("input:not(.js-bulk-action-select-all), select").on("input dp.change",function(){t.find(".grid-search-button").prop("disabled",!1),t.find(".js-grid-reset-button").prop("hidden",!1)})}}]),e}();t.default=l},31:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=o(i),a=n(1),u=o(a),l=window.$,c=function(){function e(){(0,r.default)(this,e)}return(0,u.default)(e,[{key:"extend",value:function(e){this._handleBulkActionCheckboxSelect(e),this._handleBulkActionSelectAllCheckbox(e)}},{key:"_handleBulkActionSelectAllCheckbox",value:function(e){var t=this;e.getContainer().on("change",".js-bulk-action-select-all",function(n){var o=l(n.currentTarget),i=o.is(":checked");i?t._enableBulkActionsBtn(e):t._disableBulkActionsBtn(e),e.getContainer().find(".js-bulk-action-checkbox").prop("checked",i)})}},{key:"_handleBulkActionCheckboxSelect",value:function(e){var t=this;e.getContainer().on("change",".js-bulk-action-checkbox",function(){e.getContainer().find(".js-bulk-action-checkbox:checked").length>0?t._enableBulkActionsBtn(e):t._disableBulkActionsBtn(e)})}},{key:"_enableBulkActionsBtn",value:function(e){e.getContainer().find(".js-bulk-actions-btn").prop("disabled",!1)}},{key:"_disableBulkActionsBtn",value:function(e){e.getContainer().find(".js-bulk-actions-btn").prop("disabled",!0)}}]),e}();t.default=c},32:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=o(i),a=n(1),u=o(a),l=n(45),c=o(l),s=window.$,d=function(){function e(){var t=this;return(0,r.default)(this,e),{extend:function(e){return t.extend(e)}}}return(0,u.default)(e,[{key:"extend",value:function(e){var t=this;e.getContainer().on("click",".js-bulk-action-submit-btn",function(n){t.submit(n,e)})}},{key:"submit",value:function(e,t){var n=s(e.currentTarget),o=n.data("confirm-message"),i=n.data("confirmTitle");void 0!==o&&0<o.length?void 0!==i?this.showConfirmModal(n,t,o,i):confirm(o)&&this.postForm(n,t):this.postForm(n,t)}},{key:"showConfirmModal",value:function(e,t,n,o){var i=this,r=e.data("confirmButtonLabel"),a=e.data("closeButtonLabel"),u=e.data("confirmButtonClass");new c.default({id:t.getId()+"_grid_confirm_modal",confirmTitle:o,confirmMessage:n,confirmButtonLabel:r,closeButtonLabel:a,confirmButtonClass:u},function(){return i.postForm(e,t)}).show()}},{key:"postForm",value:function(e,t){var n=s("#"+t.getId()+"_filter_form");n.attr("action",e.data("form-url")),n.attr("method",e.data("form-method")),n.submit()}}]),e}();t.default=d},33:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=o(i),a=n(1),u=o(a),l=window.$,c=function(){function e(){(0,r.default)(this,e)}return(0,u.default)(e,[{key:"extend",value:function(e){this.initRowLinks(e),this.initConfirmableActions(e)}},{key:"initConfirmableActions",value:function(e){e.getContainer().on("click",".js-link-row-action",function(e){var t=l(e.currentTarget).data("confirm-message");t.length&&!confirm(t)&&e.preventDefault()})}},{key:"initRowLinks",value:function(e){l("tr",e.getContainer()).each(function(){var e=l(this);l(".js-link-row-action[data-clickable-row=1]:first",e).each(function(){var t=l(this),n=t.closest("td");l("td.clickable",e).not(n).addClass("cursor-pointer").click(function(){var e=t.data("confirm-message");e.length&&!confirm(e)||(document.location=t.attr("href"))})})})}}]),e}();t.default=c},34:function(e,t,n){var o=n(55),i=n(49);e.exports=Object.keys||function(e){return o(e,i)}},35:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=o(i),a=n(1),u=o(a),l=window.$,c=function(){function e(){(0,r.default)(this,e)}return(0,u.default)(e,[{key:"extend",value:function(e){e.getContainer().on("click",".js-submit-row-action",function(e){e.preventDefault();var t=l(e.currentTarget),n=t.data("confirm-message");if(!n.length||confirm(n)){var o=t.data("method"),i=["GET","POST"].includes(o),r=l("<form>",{action:t.data("url"),method:i?o:"POST"}).appendTo("body");i||r.append(l("<input>",{type:"_hidden",name:"_method",value:o})),r.submit()}})}}]),e}();t.default=c},36:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventEmitter=void 0;var o=n(53),i=function(e){return e&&e.__esModule?e:{default:e}}(o);t.EventEmitter=new i.default},38:function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},39:function(e,t){var n=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},4:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},40:function(e,t,n){"use strict";(function(e){function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=o(i),a=n(1),u=o(a),l=e.$,c=function(){function e(t){(0,r.default)(this,e),this.selector=".ps-sortable-column",this.columns=l(t).find(this.selector)}return(0,u.default)(e,[{key:"attach",value:function(){var e=this;this.columns.on("click",function(t){var n=l(t.delegateTarget);e._sortByColumn(n,e._getToggledSortDirection(n))})}},{key:"sortBy",value:function(e,t){var n=this.columns.is('[data-sort-col-name="'+e+'"]');if(!n)throw new Error('Cannot sort by "'+e+'": invalid column');this._sortByColumn(n,t)}},{key:"_sortByColumn",value:function(e,t){window.location=this._getUrl(e.data("sortColName"),"desc"===t?"desc":"asc",e.data("sortPrefix"))}},{key:"_getToggledSortDirection",value:function(e){return"asc"===e.data("sortDirection")?"desc":"asc"}},{key:"_getUrl",value:function(e,t,n){var o=new URL(window.location.href),i=o.searchParams;return n?(i.set(n+"[orderBy]",e),i.set(n+"[sortOrder]",t)):(i.set("orderBy",e),i.set("sortOrder",t)),o.toString()}}]),e}();t.default=c}).call(t,n(9))},42:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});/**
|
||
* 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 n=e.$,o=function(e,t){n.post(e).then(function(){return window.location.assign(t)})};t.default=o}).call(t,n(9))},43:function(e,t){var n=0,o=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+o).toString(36))}},44:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=o(i),a=n(1),u=o(a),l=n(36),c=window.$,s=function(){function e(t){(0,r.default)(this,e),t=t||{},this.localeItemSelector=t.localeItemSelector||".js-locale-item",this.localeButtonSelector=t.localeButtonSelector||".js-locale-btn",this.localeInputSelector=t.localeInputSelector||".js-locale-input",c("body").on("click",this.localeItemSelector,this.toggleLanguage.bind(this)),l.EventEmitter.on("languageSelected",this.toggleInputs.bind(this))}return(0,u.default)(e,[{key:"toggleLanguage",value:function(e){var t=c(e.target),n=t.closest("form");l.EventEmitter.emit("languageSelected",{selectedLocale:t.data("locale"),form:n})}},{key:"toggleInputs",value:function(e){var t=e.form,n=e.selectedLocale,o=t.find(this.localeButtonSelector),i=o.data("change-language-url");o.text(n),t.find(this.localeInputSelector).addClass("d-none"),t.find(this.localeInputSelector+".js-locale-"+n).removeClass("d-none"),i&&this._saveSelectedLanguage(i,n)}},{key:"_saveSelectedLanguage",value:function(e,t){c.post({url:e,data:{language_iso_code:t}})}}]),e}();t.default=s},45:function(e,t,n){"use strict";function o(e,t){var n=this,o=e.id,a=e.closable;this.modal=i(e),this.$modal=r(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("#"+o).remove()}),document.body.appendChild(this.modal.container)}function i(e){var t=e.id,n=void 0===t?"confirm_modal":t,o=e.confirmTitle,i=e.confirmMessage,r=void 0===i?"":i,a=e.closeButtonLabel,u=void 0===a?"Close":a,l=e.confirmButtonLabel,c=void 0===l?"Accept":l,s=e.confirmButtonClass,d=void 0===s?"btn-primary":s,f={};return f.container=document.createElement("div"),f.container.classList.add("modal","fade"),f.container.id=n,f.dialog=document.createElement("div"),f.dialog.classList.add("modal-dialog"),f.content=document.createElement("div"),f.content.classList.add("modal-content"),f.header=document.createElement("div"),f.header.classList.add("modal-header"),o&&(f.title=document.createElement("h4"),f.title.classList.add("modal-title"),f.title.innerHTML=o),f.closeIcon=document.createElement("button"),f.closeIcon.classList.add("close"),f.closeIcon.setAttribute("type","button"),f.closeIcon.dataset.dismiss="modal",f.closeIcon.innerHTML="×",f.body=document.createElement("div"),f.body.classList.add("modal-body","text-left","font-weight-normal"),f.message=document.createElement("p"),f.message.classList.add("confirm-message"),f.message.innerHTML=r,f.footer=document.createElement("div"),f.footer.classList.add("modal-footer"),f.closeButton=document.createElement("button"),f.closeButton.setAttribute("type","button"),f.closeButton.classList.add("btn","btn-outline-secondary","btn-lg"),f.closeButton.dataset.dismiss="modal",f.closeButton.innerHTML=u,f.confirmButton=document.createElement("button"),f.confirmButton.setAttribute("type","button"),f.confirmButton.classList.add("btn",d,"btn-lg","btn-confirm-submit"),f.confirmButton.dataset.dismiss="modal",f.confirmButton.innerHTML=c,o?f.header.append(f.title,f.closeIcon):f.header.appendChild(f.closeIcon),f.body.appendChild(f.message),f.footer.append(f.closeButton,f.confirmButton),f.content.append(f.header,f.body,f.footer),f.dialog.appendChild(f.content),f.container.appendChild(f.dialog),f}Object.defineProperty(t,"__esModule",{value:!0}),t.default=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 <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 r=window.$},46:function(e,t,n){var o=n(38);e.exports=function(e){return Object(o(e))}},47:function(e,t,n){var o=n(50)("keys"),i=n(43);e.exports=function(e){return o[e]||(o[e]=i(e))}},48:function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},49:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},5:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},50:function(e,t,n){var o=n(5),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});e.exports=function(e){return i[e]||(i[e]={})}},501:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var i=n(44),r=o(i),a=n(87),u=o(a),l=n(130),c=o(l),s=n(23),d=o(s),f=n(25),m=o(f),p=n(24),v=o(p),h=n(26),g=o(h),_=n(61),y=o(_),b=n(35),w=o(b),k=n(32),x=o(k),C=n(31),j=o(C),M=n(28),E=o(M),L=n(30),O=o(L),T=n(60),S=o(T),B=n(131),P=o(B),A=n(96),I=o(A),F=n(33),$=o(F);/**
|
||
* 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(){["manufacturer","manufacturer_address"].forEach(function(e){var t=new d.default(e);t.addExtension(new E.default),t.addExtension(new g.default),t.addExtension(new m.default),t.addExtension(new v.default),t.addExtension(new y.default),t.addExtension(new w.default),t.addExtension(new x.default),t.addExtension(new j.default),t.addExtension(new O.default),t.addExtension(new $.default)}),new r.default,new P.default,new I.default,new u.default({tokenFieldSelector:"input.js-taggable-field",options:{createTokensOnBlur:!0}}),new c.default,new S.default("#manufacturer_shop_association").enableAutoCheckChildren()})},51:function(e,t,n){var o=n(48);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==o(e)?e.split(""):Object(e)}},52:function(e,t){t.f={}.propertyIsEnumerable},53:function(e,t,n){"use strict";function o(e){console&&console.warn&&console.warn(e)}function i(){i.init.call(this)}function r(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function a(e,t,n,i){var a,u,l;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(u=e._events,void 0===u?(u=e._events=Object.create(null),e._eventsCount=0):(void 0!==u.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),u=e._events),l=u[t]),void 0===l)l=u[t]=n,++e._eventsCount;else if("function"==typeof l?l=u[t]=i?[n,l]:[l,n]:i?l.unshift(n):l.push(n),(a=r(e))>0&&l.length>a&&!l.warned){l.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=l.length,o(c)}return e}function u(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,h(this.listener,this.target,e))}function l(e,t,n){var o={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(o);return i.listener=n,o.wrapFn=i,i}function c(e,t,n){var o=e._events;if(void 0===o)return[];var i=o[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?m(i):d(i,i.length)}function s(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function d(e,t){for(var n=new Array(t),o=0;o<t;++o)n[o]=e[o];return n}function f(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function m(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}var p,v="object"==typeof Reflect?Reflect:null,h=v&&"function"==typeof v.apply?v.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};p=v&&"function"==typeof v.ownKeys?v.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var g=Number.isNaN||function(e){return e!==e};e.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var _=10;Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return _},set:function(e){if("number"!=typeof e||e<0||g(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");_=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||g(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return r(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var r;if(t.length>0&&(r=t[0]),r instanceof Error)throw r;var a=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw a.context=r,a}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)h(u,this,t);else for(var l=u.length,c=d(u,l),n=0;n<l;++n)h(c[n],this,t);return!0},i.prototype.addListener=function(e,t){return a(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return a(this,e,t,!0)},i.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,l(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,l(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,o,i,r,a;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(void 0===(o=this._events))return this;if(void 0===(n=o[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete o[e],o.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,r=n.length-1;r>=0;r--)if(n[r]===t||n[r].listener===t){a=n[r].listener,i=r;break}if(i<0)return this;0===i?n.shift():f(n,i),1===n.length&&(o[e]=n[0]),void 0!==o.removeListener&&this.emit("removeListener",e,a||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,o;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,r=Object.keys(n);for(o=0;o<r.length;++o)"removeListener"!==(i=r[o])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(o=t.length-1;o>=0;o--)this.removeListener(e,t[o]);return this},i.prototype.listeners=function(e){return c(this,e,!0)},i.prototype.rawListeners=function(e){return c(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):s.call(e,t)},i.prototype.listenerCount=s,i.prototype.eventNames=function(){return this._eventsCount>0?p(this._events):[]}},55:function(e,t,n){var o=n(27),i=n(22),r=n(58)(!1),a=n(47)("IE_PROTO");e.exports=function(e,t){var n,u=i(e),l=0,c=[];for(n in u)n!=a&&o(u,n)&&c.push(n);for(;t.length>l;)o(u,n=t[l++])&&(~r(c,n)||c.push(n));return c}},56:function(e,t,n){var o=n(39),i=Math.min;e.exports=function(e){return e>0?i(o(e),9007199254740991):0}},57:function(e,t){t.f=Object.getOwnPropertySymbols},58:function(e,t,n){var o=n(22),i=n(56),r=n(59);e.exports=function(e){return function(t,n,a){var u,l=o(t),c=i(l.length),s=r(a,c);if(e&&n!=n){for(;c>s;)if((u=l[s++])!=u)return!0}else for(;c>s;s++)if((e||s in l)&&l[s]===n)return e||s||0;return!e&&-1}}},59:function(e,t,n){var o=n(39),i=Math.max,r=Math.min;e.exports=function(e,t){return e=o(e),e<0?i(e+t,0):r(e,t)}},6:function(e,t,n){var o=n(11),i=n(17),r=n(13),a=Object.defineProperty;t.f=n(2)?Object.defineProperty:function(e,t,n){if(o(e),t=r(t,!0),o(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},60:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=o(i),a=n(1),u=o(a),l=window.$,c=function(){function e(t){var n=this;return(0,r.default)(this,e),this.$container=l(t),this.$container.on("click",".js-input-wrapper",function(e){var t=l(e.currentTarget);n._toggleChildTree(t)}),this.$container.on("click",".js-toggle-choice-tree-action",function(e){var t=l(e.currentTarget);n._toggleTree(t)}),{enableAutoCheckChildren:function(){return n.enableAutoCheckChildren()},enableAllInputs:function(){return n.enableAllInputs()},disableAllInputs:function(){return n.disableAllInputs()}}}return(0,u.default)(e,[{key:"enableAutoCheckChildren",value:function(){this.$container.on("change",'input[type="checkbox"]',function(e){var t=l(e.currentTarget);t.closest("li").find('ul input[type="checkbox"]').prop("checked",t.is(":checked"))})}},{key:"enableAllInputs",value:function(){this.$container.find("input").removeAttr("disabled")}},{key:"disableAllInputs",value:function(){this.$container.find("input").attr("disabled","disabled")}},{key:"_toggleChildTree",value:function(e){var t=e.closest("li");if(t.hasClass("expanded"))return void t.removeClass("expanded").addClass("collapsed");t.hasClass("collapsed")&&t.removeClass("collapsed").addClass("expanded")}},{key:"_toggleTree",value:function(e){var t=e.closest(".js-choice-tree-container"),n=e.data("action"),o={addClass:{expand:"expanded",collapse:"collapsed"},removeClass:{expand:"collapsed",collapse:"expanded"},nextAction:{expand:"collapse",collapse:"expand"},text:{expand:"collapsed-text",collapse:"expanded-text"},icon:{expand:"collapsed-icon",collapse:"expanded-icon"}};t.find("li").each(function(e,t){var i=l(t);i.hasClass(o.removeClass[n])&&i.removeClass(o.removeClass[n]).addClass(o.addClass[n])}),e.data("action",o.nextAction[n]),e.find(".material-icons").text(e.data(o.icon[n])),e.find(".js-toggle-text").text(e.data(o.text[n]))}}]),e}();t.default=c},61:function(e,t,n){"use strict";(function(e){function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=o(i),a=n(1),u=o(a),l=e.$,c=function(){function e(){(0,r.default)(this,e)}return(0,u.default)(e,[{key:"extend",value:function(e){var t=this;e.getContainer().find("table.table").find(".ps-togglable-row").on("click",function(e){e.preventDefault(),t._toggleValue(l(e.delegateTarget))})}},{key:"_toggleValue",value:function(e){var t=e.data("toggleUrl");this._submitAsForm(t)}},{key:"_submitAsForm",value:function(e){l("<form>",{action:e,method:"POST"}).appendTo("body").submit()}}]),e}();t.default=c}).call(t,n(9))},7:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},8:function(e,t,n){var o=n(5),i=n(3),r=n(15),a=n(10),u=function(e,t,n){var l,c,s,d=e&u.F,f=e&u.G,m=e&u.S,p=e&u.P,v=e&u.B,h=e&u.W,g=f?i:i[t]||(i[t]={}),_=g.prototype,y=f?o:m?o[t]:(o[t]||{}).prototype;f&&(n=t);for(l in n)(c=!d&&y&&void 0!==y[l])&&l in g||(s=c?y[l]:n[l],g[l]=f&&"function"!=typeof y[l]?n[l]:v&&c?r(s,o):h&&y[l]==s?function(e){var t=function(t,n,o){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,o)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(s):p&&"function"==typeof s?r(Function.call,s):s,p&&((g.virtual||(g.virtual={}))[l]=s,e&u.R&&_&&!_[l]&&a(_,l,s)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},80:function(e,t,n){e.exports={default:n(81),__esModule:!0}},81:function(e,t,n){n(85),e.exports=n(3).Object.assign},83:function(e,t,n){"use strict";var o=n(34),i=n(57),r=n(52),a=n(46),u=n(51),l=Object.assign;e.exports=!l||n(7)(function(){var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach(function(e){t[e]=e}),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=o})?function(e,t){for(var n=a(e),l=arguments.length,c=1,s=i.f,d=r.f;l>c;)for(var f,m=u(arguments[c++]),p=s?o(m).concat(s(m)):o(m),v=p.length,h=0;v>h;)d.call(m,f=p[h++])&&(n[f]=m[f]);return n}:l},85:function(e,t,n){var o=n(8);o(o.S+o.F,"Object",{assign:n(83)})},87:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=function(e){return e&&e.__esModule?e:{default:e}}(o),r=window.$,a=function e(t){var n=t.tokenFieldSelector,o=t.options,a=void 0===o?{}:o;(0,i.default)(this,e),r(n).tokenfield(a)};t.default=a},9:function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},96:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(80),r=o(i),a=n(0),u=o(a),l=n(1),c=o(l),s=(n(36),window),d=s.$,f=function(){function e(t){if((0,u.default)(this,e),t=t||{},this.tinyMCELoaded=!1,void 0===t.baseAdminUrl)if(void 0!==window.baseAdminDir)t.baseAdminUrl=window.baseAdminDir;else{var n=window.location.pathname.split("/");n.every(function(e){return""===e||(t.baseAdminUrl="/"+e+"/",!1)})}void 0===t.langIsRtl&&(t.langIsRtl=void 0!==window.lang_is_rtl&&"1"===window.lang_is_rtl),this.setupTinyMCE(t)}return(0,c.default)(e,[{key:"setupTinyMCE",value:function(e){"undefined"==typeof tinyMCE?this.loadAndInitTinyMCE(e):this.initTinyMCE(e)}},{key:"initTinyMCE",value:function(e){var t=this;e=(0,r.default)({selector:".rte",plugins:"align colorpicker link image filemanager table media placeholder advlist code table autoresize",browser_spellcheck:!0,toolbar1:"code,colorpicker,bold,italic,underline,strikethrough,blockquote,link,align,bullist,numlist,table,image,media,formatselect",toolbar2:"",external_filemanager_path:e.baseAdminUrl+"filemanager/",filemanager_title:"File manager",external_plugins:{filemanager:e.baseAdminUrl+"filemanager/plugin.min.js"},language:iso_user,content_style:e.langIsRtl?"body {direction:rtl;}":"",skin:"prestashop",menubar:!1,statusbar:!1,relative_urls:!1,convert_urls:!1,entity_encoding:"raw",extended_valid_elements:"em[class|name|id],@[role|data-*|aria-*]",valid_children:"+*[*]",valid_elements:"*[*]",rel_list:[{title:"nofollow",value:"nofollow"}],editor_selector:"autoload_rte",init_instance_callback:function(){t.changeToMaterial()},setup:function(e){t.setupEditor(e)}},e),void 0!==e.editor_selector&&(e.selector="."+e.editor_selector),d("body").on("click",".mce-btn, .mce-open, .mce-menu-item",function(){t.changeToMaterial()}),tinyMCE.init(e),this.watchTabChanges(e)}},{key:"setupEditor",value:function(e){var t=this;e.on("loadContent",function(e){t.handleCounterTiny(e.target.id)}),e.on("change",function(e){tinyMCE.triggerSave(),t.handleCounterTiny(e.target.id)}),e.on("blur",function(){tinyMCE.triggerSave()})}},{key:"watchTabChanges",value:function(e){d(e.selector).each(function(e,t){var n=d(t).closest(".translation-field"),o=d(t).closest(".translations.tabbable");if(n.length&&o.length){var i=n.data("locale");d('.nav-item a[data-locale="'+i+'"]',o).on("shown.bs.tab",function(){var e=(d(t).closest("form"),tinyMCE.get(t.id));e&&e.setContent(e.getContent())})}})}},{key:"loadAndInitTinyMCE",value:function(e){var t=this;if(!this.tinyMCELoaded){this.tinyMCELoaded=!0;var n=e.baseAdminUrl.split("/");n.splice(n.length-2,2);var o=n.join("/");window.tinyMCEPreInit={},window.tinyMCEPreInit.base=o+"/js/tiny_mce",window.tinyMCEPreInit.suffix=".min",d.getScript(o+"/js/tiny_mce/tinymce.min.js",function(){t.setupTinyMCE(e)})}}},{key:"changeToMaterial",value:function(){var e={"mce-i-code":'<i class="material-icons">code</i>',"mce-i-none":'<i class="material-icons">format_color_text</i>',"mce-i-bold":'<i class="material-icons">format_bold</i>',"mce-i-italic":'<i class="material-icons">format_italic</i>',"mce-i-underline":'<i class="material-icons">format_underlined</i>',"mce-i-strikethrough":'<i class="material-icons">format_strikethrough</i>',"mce-i-blockquote":'<i class="material-icons">format_quote</i>',"mce-i-link":'<i class="material-icons">link</i>',"mce-i-alignleft":'<i class="material-icons">format_align_left</i>',"mce-i-aligncenter":'<i class="material-icons">format_align_center</i>',"mce-i-alignright":'<i class="material-icons">format_align_right</i>',"mce-i-alignjustify":'<i class="material-icons">format_align_justify</i>',"mce-i-bullist":'<i class="material-icons">format_list_bulleted</i>',"mce-i-numlist":'<i class="material-icons">format_list_numbered</i>',"mce-i-image":'<i class="material-icons">image</i>',"mce-i-table":'<i class="material-icons">grid_on</i>',"mce-i-media":'<i class="material-icons">video_library</i>',"mce-i-browse":'<i class="material-icons">attachment</i>',"mce-i-checkbox":'<i class="mce-ico mce-i-checkbox"></i>'};d.each(e,function(e,t){d("."+e).replaceWith(t)})}},{key:"handleCounterTiny",value:function(e){var t=d("#"+e),n=t.attr("counter"),o=t.attr("counter_type"),i=tinyMCE.activeEditor.getBody().textContent.length;t.parent().find("span.currentLength").text(i),"recommended"!==o&&i>n?t.parent().find("span.maxLength").addClass("text-danger"):t.parent().find("span.maxLength").removeClass("text-danger")}}]),e}();t.default=f}}); |