!function(e){"use strict";if(window.ugcCommerceElementorResetInitialized)return;window.ugcCommerceElementorResetInitialized=!0;const n=n=>{const o=n&&n.container?n.container:null,t=window.ugcCommerceElementor&&window.ugcCommerceElementor.defaults&&"object"==typeof window.ugcCommerceElementor.defaults?window.ugcCommerceElementor.defaults:{};if(o&&o.settings&&Object.keys(t).length&&(Object.keys(t).forEach(n=>{const r="productId"===n&&0===Number(t[n])?"":(i=t[n],Array.isArray(i)?i.slice():i&&"object"==typeof i?e.extend(!0,{},i):i);var i;o.settings.set(n,r)}),o.settings.trigger("change"),"function"==typeof o.render&&o.render(),window.elementor&&window.elementor.notifications&&"function"===window.elementor.notifications.showToast)){const e=window.ugcCommerceElementor&&window.ugcCommerceElementor.i18n&&window.ugcCommerceElementor.i18n.resetSuccess?window.ugcCommerceElementor.i18n.resetSuccess:"Settings reset to defaults.";window.elementor.notifications.showToast({message:e})}},o=()=>{window.elementor&&window.elementor.channels&&window.elementor.channels.editor&&window.elementor.channels.editor.on("ugcCommerceElementor:resetDefaults",n)};window.elementor&&window.elementor.channels&&window.elementor.channels.editor?o():e(window).on("elementor:init",o)}(jQuery);