File: /medikors/www/eng/wp-content/plugins/happy-elementor-addons-pro/assets/admin/js/marvin.min.js
!function(){"use strict";function e(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function t(t,n){if(!e(t,n))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function i(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e}var o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!function(e){e(window).on("elementor/frontend/init",function(){if(window.elementor){var t=elementor.hooks.addFilter,n=o?new l(marvin.storagekey,"https://happymonster.dev/storage/safari.php",e):new u(marvin.storagekey),i=new c(n);t("elements/widget/contextMenuGroups",function(e,t){return a.prepare(e,t,i)}),t("elements/section/contextMenuGroups",function(e,t){return a.prepare(e,t,i,!1)}),t("elements/column/contextMenuGroups",function(e,t){return a.prepare(e,t,i,!0)}),t("element/view",function(e,t,n){var o;return"column"===t.get("elType")?e.extend({initialize:function(){e.prototype.initialize.apply(this,arguments),o=this},emptyView:e.prototype.emptyView.extend({getContextMenuGroups:function(){var t=e.prototype.emptyView.prototype.getContextMenuGroups.apply(this,arguments);return a.prepareForBlankColumn(t,o,i)}})}):e})}})}(jQuery);var a=function(){function e(){t(this,e)}return i(e,null,[{key:"prepare",value:function(e,t,n,i){return e.push({name:"x-domain",actions:[{name:"x-copy",title:"X Copy",shortcut:'<i class="hm hm-happyaddons"></i>',callback:function(){var e=new s(t.model.get("widgetType"),t.model.toJSON({copyHtmlCache:!0}));n.copy(e)}},{name:"x-paste",title:"X Paste",shortcut:'<i class="hm hm-happyaddons"></i>',callback:function(){n.paste(t,i)}},{name:"live-paste",title:"Live Paste",shortcut:'<i class="hm hm-happyaddons"></i>',callback:function(){n.paste(t,i)}}]}),e}},{key:"prepareForBlankColumn",value:function(e,t,n){return e[0].actions.push({name:"x-paste",title:"X Paste",shortcut:'<i class="hm hm-happyaddons"></i>',callback:function(){n.paste(t,!0)},isEnabled:function(){return!0}}),e[0].actions.push({name:"live-paste",title:"Live Paste",shortcut:'<i class="hm hm-happyaddons"></i>',callback:function(){n.paste(t,!0)},isEnabled:function(){return!0}}),e[0].actions.push({name:"x-insert",title:"Insert Blank Section",shortcut:'<i class="hm hm-happyaddons"></i>',callback:function(){r.insert(t)},isEnabled:function(){return!0}}),e}}]),e}(),r=function(){function e(){t(this,e)}return i(e,null,[{key:"insert",value:function(e){elementor.channels.data.trigger("element:before:add",{elType:"section"}),e.addChildElement({id:elementor.helpers.getUniqueID(),elType:"section",settings:{},elements:[]},{edit:!0}),elementor.channels.data.trigger("element:after:add")}}]),e}(),s=function(){function e(n,i){t(this,e),this.widgetType=n,this.widgetCode=i}return i(e,[{key:"getWidgetType",value:function(){return this.widgetType}},{key:"getWidgetCode",value:function(){return this.widgetCode}},{key:"toJSON",value:function(){return{widgetType:this.widgetType,widgetCode:this.widgetCode}}}]),e}(),c=function(){function e(n){t(this,e),this.widgetStorage=n}return i(e,[{key:"copy",value:function(e){this.widgetStorage.save(e)}},{key:"paste",value:function(e,t){this.widgetStorage.fetch(function(n){var i=JSON.stringify(n.getWidgetCode()).replace('.png","id":','.png","id":xLock').replace('.jpg","id":','.jpg","id":xLock').replace('.gif","id":','.gif","id":xLock').replace('.jpeg","id":','.jpeg","id":xLock').replace('.svg","id":','.svg","id":xLock').replace(/xLock([\d]+)/g,'"x$1"');if(e.startTransport("copy"),elementorFrontend.storage.set("transfer",{type:"copy",elementsType:n.getWidgetType(),elements:[JSON.parse(i)]}),t){var o=e,a=elementorFrontend.storage.get("transfer").elements,r=0;a.forEach(function(e){o.addChildElement(e,{at:r,clone:!0}),r++})}else e.trigger("request:paste")})}}]),e}(),u=function(){function e(n){t(this,e),this.storageKey=n,xdLocalStorage.init({iframeUrl:"https://happyaddons.com/marvin/index.html",initCallback:function(){}})}return i(e,[{key:"save",value:function(e){xdLocalStorage.setItem(this.storageKey,JSON.stringify(e))}},{key:"fetch",value:function(e){return xdLocalStorage.getItem(this.storageKey,function(t){var n=JSON.parse(t.value),i=new s(n.widgetType,n.widgetCode);e(i)})}}]),e}(),l=function(){function e(n,i,o){t(this,e),this.storageKey=n,this.storageEndpoint=i,this.$=o}return i(e,[{key:"save",value:function(e){this.$.post(this.storageEndpoint,{key:this.storageKey,data:JSON.stringify(e)})}},{key:"fetch",value:function(e){this.$.get(this.storageEndpoint,{key:this.storageKey},function(t){var n=JSON.parse(t),i=new s(n.widgetType,n.widgetCode);e(i)})}}]),e}();window.HWidgetStorage=u,window.HSWidgetStorage=l,window.HClipBoard=c,window.HWidget=s}();