JezK
Edit File: editor-document.min.js
(function(){var t=Object.defineProperty,__name=(r,i)=>t(r,`name`,{value:i,configurable:!0});function _classCallCheck(t,r){if(!(t instanceof r))throw TypeError(`Cannot call a class as a function`)}function _typeof(t){"@babel/helpers - typeof";return _typeof=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(t){return typeof t}:function(t){return t&&typeof Symbol==`function`&&t.constructor===Symbol&&t!==Symbol.prototype?`symbol`:typeof t},_typeof(t)}function toPrimitive(t,r){if(_typeof(t)!=`object`||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r||`default`);if(_typeof(a)!=`object`)return a;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(r===`string`?String:Number)(t)}function toPropertyKey(t){var r=toPrimitive(t,`string`);return _typeof(r)==`symbol`?r:r+``}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,`value`in a&&(a.writable=!0),Object.defineProperty(t,toPropertyKey(a.key),a)}}function _createClass(t,r,i){return r&&_defineProperties(t.prototype,r),i&&_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function _assertThisInitialized(t){if(t===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t}function _possibleConstructorReturn(t,r){if(r&&(_typeof(r)==`object`||typeof r==`function`))return r;if(r!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return _assertThisInitialized(t)}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _setPrototypeOf(t,r){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},_setPrototypeOf(t,r)}function _inherits(t,r){if(typeof r!=`function`&&r!==null)throw TypeError(`Super expression must either be null or a function`);t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&_setPrototypeOf(t,r)}function _defineProperty(t,r,i){return(r=toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function _superPropBase(t,r){for(;!{}.hasOwnProperty.call(t,r)&&(t=_getPrototypeOf(t))!==null;);return t}function _get(){return _get=typeof Reflect<`u`&&Reflect.get?Reflect.get.bind():function(t,r,i){var a=_superPropBase(t,r);if(a){var o=Object.getOwnPropertyDescriptor(a,r);return o.get?o.get.call(arguments.length<3?t:i):o.value}},_get.apply(null,arguments)}function _superPropGet$2(t,r,i,a){var o=_get(_getPrototypeOf(1&a?t.prototype:t),r,i);return 2&a&&typeof o==`function`?function(t){return o.apply(i,t)}:o}__name(_superPropGet$2,`_superPropGet`);var r=function(){function InstanceType(){var t=this;_classCallCheck(this,InstanceType);for(var r=this instanceof InstanceType?this.constructor:void 0,i=[];r.__proto__&&r.__proto__.name;)i.push(r.__proto__),r=r.__proto__;i.reverse().forEach(function(r){return t instanceof r})}return _createClass(InstanceType,null,[{key:Symbol.hasInstance,value:function value(t){var r=_superPropGet$2(InstanceType,Symbol.hasInstance,this,2)([t]);if(t&&!t.constructor.getInstanceType)return r;if(t&&(t.instanceTypes||(t.instanceTypes=[]),r||this.getInstanceType()===t.constructor.getInstanceType()&&(r=!0),r)){var i=this.getInstanceType===InstanceType.getInstanceType?`BaseInstanceType`:this.getInstanceType();t.instanceTypes.indexOf(i)===-1&&t.instanceTypes.push(i)}return!r&&t&&(r=t.instanceTypes&&Array.isArray(t.instanceTypes)&&t.instanceTypes.indexOf(this.getInstanceType())!==-1),r}},{key:`getInstanceType`,value:function getInstanceType(){elementorModules.ForceMethodImplementation()}}])}();function _createForOfIteratorHelper(t,r){var i=typeof Symbol<`u`&&t[Symbol.iterator]||t[`@@iterator`];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray$1(t))||r&&t&&typeof t.length==`number`){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var c,l=!0,u=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();return l=t.done,t},e:function e(t){u=!0,c=t},f:function f(){try{l||i.return==null||i.return()}finally{if(u)throw c}}}}function _unsupportedIterableToArray$1(t,r){if(t){if(typeof t==`string`)return _arrayLikeToArray$1(t,r);var i={}.toString.call(t).slice(8,-1);return i===`Object`&&t.constructor&&(i=t.constructor.name),i===`Map`||i===`Set`?Array.from(t):i===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray$1(t,r):void 0}}__name(_unsupportedIterableToArray$1,`_unsupportedIterableToArray`);function _arrayLikeToArray$1(t,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,a=Array(r);i<r;i++)a[i]=t[i];return a}__name(_arrayLikeToArray$1,`_arrayLikeToArray`);var i=__name((function(t,r){r=Array.isArray(r)?r:[r];var i=_createForOfIteratorHelper(r),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;if(t.constructor.name===o.prototype[Symbol.toStringTag])return!0}}catch(t){i.e(t)}finally{i.f()}return!1}),`default`);function _callSuper$6(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$6()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$6,`_callSuper`);function _isNativeReflectConstruct$6(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$6=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$6,`_isNativeReflectConstruct`);var a=function(t){function ArgsObject(t){var r;return _classCallCheck(this,ArgsObject),r=_callSuper$6(this,ArgsObject),r.args=t,r}return _inherits(ArgsObject,t),_createClass(ArgsObject,[{key:`requireArgument`,value:function requireArgument(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.args;if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`${t} is required.`)}},{key:`requireArgumentType`,value:function requireArgumentType(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.args;if(this.requireArgument(t,i),_typeof(i[t])!==r)throw Error(`${t} invalid type: ${r}.`)}},{key:`requireArgumentInstance`,value:function requireArgumentInstance(t,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.args;if(this.requireArgument(t,a),!(a[t]instanceof r)&&!i(a[t],r))throw Error(`${t} invalid instance.`)}},{key:`requireArgumentConstructor`,value:function requireArgumentConstructor(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.args;if(this.requireArgument(t,i),i[t].constructor.toString()!==r.prototype.constructor.toString())throw Error(`${t} invalid constructor type.`)}}],[{key:`getInstanceType`,value:function getInstanceType(){return`ArgsObject`}}])}(r);function _arrayWithHoles(t){if(Array.isArray(t))return t}function _iterableToArrayLimit(t,r){var i=t==null?null:typeof Symbol<`u`&&t[Symbol.iterator]||t[`@@iterator`];if(i!=null){var a,o,c,l,u=[],d=!0,p=!1;try{if(c=(i=i.call(t)).next,r===0){if(Object(i)!==i)return;d=!1}else for(;!(d=(a=c.call(i)).done)&&(u.push(a.value),u.length!==r);d=!0);}catch(t){p=!0,o=t}finally{try{if(!d&&i.return!=null&&(l=i.return(),Object(l)!==l))return}finally{if(p)throw o}}return u}}function _arrayLikeToArray(t,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,a=Array(r);i<r;i++)a[i]=t[i];return a}function _unsupportedIterableToArray(t,r){if(t){if(typeof t==`string`)return _arrayLikeToArray(t,r);var i={}.toString.call(t).slice(8,-1);return i===`Object`&&t.constructor&&(i=t.constructor.name),i===`Map`||i===`Set`?Array.from(t):i===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _nonIterableRest(){throw TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _slicedToArray(t,r){return _arrayWithHoles(t)||_iterableToArrayLimit(t,r)||_unsupportedIterableToArray(t,r)||_nonIterableRest()}var o=function(){function Console(){_classCallCheck(this,Console)}return _createClass(Console,null,[{key:`error`,value:function error(t){$e.devTools&&$e.devTools.log.error(t),t instanceof $e.modules.HookBreak||console.error(t)}},{key:`warn`,value:function warn(){for(var t,r=`font-size: 12px; background-image: url("${elementorWebCliConfig.urls.assets}images/logo-icon.png"); background-repeat: no-repeat; background-size: contain;`,i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];a.unshift(`%c %c`,r,``),(t=console).warn.apply(t,a)}}])}(),c=function softDeprecated(t,r,i){elementorWebCliConfig.isDebug&&u(`soft`,t,r,i)},l=function hardDeprecated(t,r,i){u(`hard`,t,r,i)},u=function deprecatedMessage(t,r,i,a){var c=`\`${r}\` is ${t} deprecated since ${i}`;a&&(c+=` - Use \`${a}\` instead`),o.warn(c)},d=function(){function Deprecation(){_classCallCheck(this,Deprecation)}return _createClass(Deprecation,null,[{key:`deprecated`,value:function deprecated(t,r,i){this.isHardDeprecated(r)?l(t,r,i):c(t,r,i)}},{key:`parseVersion`,value:function parseVersion(t){var r=t.split(`.`);if(r.length<3||r.length>4)throw RangeError(`Invalid Semantic Version string provided`);var i=_slicedToArray(r,4),a=i[0],o=i[1],c=i[2],l=i[3];return{major1:parseInt(a),major2:parseInt(o),minor:parseInt(c),build:l===void 0?``:l}}},{key:`getTotalMajor`,value:function getTotalMajor(t){var r=parseInt(`${t.major1}${t.major2}0`);return r=Number((r/10).toFixed(0)),t.major2>9&&(r=t.major2-9),r}},{key:`compareVersion`,value:function compareVersion(t,r){var i=this;return[this.parseVersion(t),this.parseVersion(r)].map(function(t){return i.getTotalMajor(t)}).reduce(function(t,r){return t-r})}},{key:`isSoftDeprecated`,value:function isSoftDeprecated(t){return this.compareVersion(t,elementorWebCliConfig.version)<=4}},{key:`isHardDeprecated`,value:function isHardDeprecated(t){var r=this.compareVersion(t,elementorWebCliConfig.version);return r<0||r>=8}}])}();function _callSuper$5(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$5()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$5,`_callSuper`);function _isNativeReflectConstruct$5(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$5=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$5,`_isNativeReflectConstruct`);var p=function(t){function CommandInfra(){var t,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(_classCallCheck(this,CommandInfra),t=_callSuper$5(this,CommandInfra,[r]),!t.constructor.registerConfig)throw RangeError("Doing it wrong: Each command type should have `registerConfig`.");return t.command=t.constructor.getCommand(),t.component=t.constructor.getComponent(),t.initialize(r),r=t.args,t.validateArgs(r),t}return _inherits(CommandInfra,t),_createClass(CommandInfra,[{key:`currentCommand`,get:function get(){return d.deprecated(`this.currentCommand`,`3.7.0`,`this.command`),this.command}},{key:`initialize`,value:function initialize(){arguments.length>0&&arguments[0]!==void 0&&arguments[0]}},{key:`validateArgs`,value:function validateArgs(){arguments.length>0&&arguments[0]!==void 0&&arguments[0]}},{key:`apply`,value:function apply(){arguments.length>0&&arguments[0]!==void 0&&arguments[0],elementorModules.ForceMethodImplementation()}},{key:`run`,value:function run(){return this.apply(this.args)}},{key:`onBeforeRun`,value:function onBeforeRun(){arguments.length>0&&arguments[0]!==void 0&&arguments[0]}},{key:`onAfterRun`,value:function onAfterRun(){arguments.length>0&&arguments[0]!==void 0&&arguments[0],arguments.length>1&&arguments[1]}},{key:`onBeforeApply`,value:function onBeforeApply(){arguments.length>0&&arguments[0]!==void 0&&arguments[0]}},{key:`onAfterApply`,value:function onAfterApply(){arguments.length>0&&arguments[0]!==void 0&&arguments[0],arguments.length>1&&arguments[1]}},{key:`onCatchApply`,value:function onCatchApply(t){}}],[{key:`getInstanceType`,value:function getInstanceType(){return`CommandInfra`}},{key:`getInfo`,value:function getInfo(){return{}}},{key:`getCommand`,value:function getCommand(){return this.registerConfig.command}},{key:`getComponent`,value:function getComponent(){return this.registerConfig.component}},{key:`setRegisterConfig`,value:function setRegisterConfig(t){this.registerConfig=Object.freeze(t)}}])}(a);_defineProperty(p,`registerConfig`,null);function _callSuper$4(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$4()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$4,`_callSuper`);function _isNativeReflectConstruct$4(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$4=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$4,`_isNativeReflectConstruct`);var m=function(t){function CommandBase(){return _classCallCheck(this,CommandBase),_callSuper$4(this,CommandBase,arguments)}return _inherits(CommandBase,t),_createClass(CommandBase,[{key:`onBeforeRun`,value:function onBeforeRun(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$e.hooks.runUIBefore(this.command,t)}},{key:`onAfterRun`,value:function onAfterRun(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;$e.hooks.runUIAfter(this.command,t,r)}},{key:`onBeforeApply`,value:function onBeforeApply(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$e.hooks.runDataDependency(this.command,t)}},{key:`onAfterApply`,value:function onAfterApply(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return $e.hooks.runDataAfter(this.command,t,r)}},{key:`onCatchApply`,value:function onCatchApply(t){this.runCatchHooks(t)}},{key:`runCatchHooks`,value:function runCatchHooks(t){$e.hooks.runDataCatch(this.command,this.args,t),$e.hooks.runUICatch(this.command,this.args,t)}},{key:`requireContainer`,value:function requireContainer(){var t=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.args;if(d.deprecated(`requireContainer()`,`3.7.0`,"Extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase`"),!r.container&&!r.containers)throw Error(`container or containers are required.`);if(r.container&&r.containers)throw Error(`container and containers cannot go together please select one of them.`);(r.containers||[r.container]).forEach(function(r){t.requireArgumentInstance(`container`,elementorModules.editor.Container,{container:r})})}}],[{key:`getInstanceType`,value:function getInstanceType(){return`CommandBase`}}])}(p);function _callSuper$3(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$3()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$3,`_callSuper`);function _isNativeReflectConstruct$3(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$3=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$3,`_isNativeReflectConstruct`);var h=function(t){function CommandContainerBase(){return _classCallCheck(this,CommandContainerBase),_callSuper$3(this,CommandContainerBase,arguments)}return _inherits(CommandContainerBase,t),_createClass(CommandContainerBase,[{key:`requireContainer`,value:function requireContainer(){var t=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.args;if(!r.container&&!r.containers)throw Error(`container or containers are required.`);if(r.container&&r.containers)throw Error(`container and containers cannot go together please select one of them.`);(r.containers||[r.container]).forEach(function(r){t.requireArgumentInstance(`container`,elementorModules.editor.Container,{container:r})})}}],[{key:`getInstanceType`,value:function getInstanceType(){return`CommandContainerBase`}}])}(m);function _callSuper$2(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$2()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$2,`_callSuper`);function _isNativeReflectConstruct$2(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$2=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$2,`_isNativeReflectConstruct`);var g=function(t){function CommandContainerInternalBase(t){return _classCallCheck(this,CommandContainerInternalBase),_callSuper$2(this,CommandContainerInternalBase,[t,$e.commandsInternal])}return _inherits(CommandContainerInternalBase,t),_createClass(CommandContainerInternalBase,null,[{key:`getInstanceType`,value:function getInstanceType(){return`CommandContainerInternalBase`}}])}(h);function _callSuper$1(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct$1()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}__name(_callSuper$1,`_callSuper`);function _isNativeReflectConstruct$1(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct$1=function _isNativeReflectConstruct(){return!!t})()}__name(_isNativeReflectConstruct$1,`_isNativeReflectConstruct`);function _superPropGet$1(t,r,i,a){var o=_get(_getPrototypeOf(1&a?t.prototype:t),r,i);return 2&a&&typeof o==`function`?function(t){return o.apply(i,t)}:o}__name(_superPropGet$1,`_superPropGet`);var v=function(t){function CommandHistoryBase(){return _classCallCheck(this,CommandHistoryBase),_callSuper$1(this,CommandHistoryBase,arguments)}return _inherits(CommandHistoryBase,t),_createClass(CommandHistoryBase,[{key:`initialize`,value:function initialize(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.options,i=(r===void 0?{}:r).useHistory;(i===void 0||i)&&(this.history=this.getHistory(t),this.historyId=!1)}},{key:`getHistory`,value:function getHistory(){arguments.length>0&&arguments[0]!==void 0&&arguments[0],elementorModules.ForceMethodImplementation()}},{key:`isHistoryActive`,value:function isHistoryActive(){return elementor.documents.getCurrent().history.getActive()}},{key:`onBeforeRun`,value:function onBeforeRun(t){_superPropGet$1(CommandHistoryBase,`onBeforeRun`,this,3)([t]),this.history&&this.isHistoryActive()&&(this.historyId=$e.internal(`document/history/start-log`,this.history))}},{key:`onAfterRun`,value:function onAfterRun(t,r){_superPropGet$1(CommandHistoryBase,`onAfterRun`,this,3)([t,r]),this.history&&this.isHistoryActive()&&$e.internal(`document/history/end-log`,{id:this.historyId})}},{key:`onAfterApply`,value:function onAfterApply(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;_superPropGet$1(CommandHistoryBase,`onAfterApply`,this,3)([t,r]),this.isDataChanged()&&$e.internal(`document/save/set-is-modified`,{status:!0})}},{key:`onCatchApply`,value:function onCatchApply(t){t instanceof $e.modules.HookBreak&&this.historyId&&$e.internal(`document/history/delete-log`,{id:this.historyId}),_superPropGet$1(CommandHistoryBase,`onCatchApply`,this,3)([t])}},{key:`isDataChanged`,value:function isDataChanged(){return!0}}],[{key:`getInstanceType`,value:function getInstanceType(){return`CommandHistoryBase`}}])}(h);function _callSuper(t,r,i){return r=_getPrototypeOf(r),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(r,i||[],_getPrototypeOf(t).constructor):r.apply(t,i))}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t})()}function _superPropGet(t,r,i,a){var o=_get(_getPrototypeOf(1&a?t.prototype:t),r,i);return 2&a&&typeof o==`function`?function(t){return o.apply(i,t)}:o}var y=function getDefaultDebounceDelay(){var t=800;return elementor.config.document&&elementor.config.document.debounceDelay!==void 0&&(t=elementor.config.document.debounceDelay),t},b=function(t){function CommandHistoryDebounceBase(){return _classCallCheck(this,CommandHistoryDebounceBase),_callSuper(this,CommandHistoryDebounceBase,arguments)}return _inherits(CommandHistoryDebounceBase,t),_createClass(CommandHistoryDebounceBase,[{key:`initialize`,value:function initialize(t){var r=t.options,i=r===void 0?{}:r;_superPropGet(CommandHistoryDebounceBase,`initialize`,this,3)([t]),this.constructor.debounce||(this.constructor.debounce=_.debounce(function(t){return t()},y())),($e.commands.currentTrace.length===1||i.debounce)&&(this.isDebounceRequired=!0)}},{key:`onBeforeRun`,value:function onBeforeRun(t){$e.modules.CommandBase.prototype.onBeforeRun.call(this,t),this.history&&this.isHistoryActive()&&$e.internal(`document/history/add-transaction`,this.history)}},{key:`onAfterRun`,value:function onAfterRun(t,r){$e.modules.CommandBase.prototype.onAfterRun.call(this,t,r),this.isHistoryActive()&&(this.isDebounceRequired?this.constructor.debounce(function(){return $e.internal(`document/history/end-transaction`)}):$e.internal(`document/history/end-transaction`))}},{key:`onCatchApply`,value:function onCatchApply(t){$e.modules.CommandBase.prototype.onCatchApply.call(this,t),t instanceof $e.modules.HookBreak&&this.history&&(this.isDebounceRequired?this.constructor.debounce(function(){return $e.internal(`document/history/clear-transaction`)}):$e.internal(`document/history/clear-transaction`))}}],[{key:`getInstanceType`,value:function getInstanceType(){return`CommandHistoryDebounceBase`}}])}(v);_defineProperty(b,`debounce`,void 0),$e.modules.editor={CommandContainerBase:h,CommandContainerInternalBase:g,document:{CommandHistoryBase:v,CommandHistoryDebounceBase:b}},$e.modules.document={get CommandHistory(){return elementorDevTools.deprecation.deprecated(`$e.modules.document.CommandHistory`,`3.7.0`,`$e.modules.editor.document.CommandHistoryBase`),$e.modules.editor.document.CommandHistoryBase},get CommandHistoryDebounce(){return elementorDevTools.deprecation.deprecated(`$e.modules.CommandHistoryDebounce`,`3.7.0`,`$e.modules.editor.document.CommandHistoryDebounceBase`),$e.modules.editor.document.CommandHistoryDebounceBase}}})();