/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
elementor
/
assets
/
js
/
packages
/
editor-elements
/
Upload File
HOME
!function(){"use strict";var e={d:function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ELEMENT_STYLE_CHANGE_EVENT:function(){return de},addModelToParent:function(){return x},createElement:function(){return _},createElementStyle:function(){return fe},createElements:function(){return H},deleteElement:function(){return h},deleteElementStyle:function(){return ge},dropElement:function(){return R},duplicateElement:function(){return k},duplicateElements:function(){return P},findChildRecursive:function(){return i},findModelInDocument:function(){return T},generateElementId:function(){return j},getAllDescendants:function(){return B},getAnchoredAncestorId:function(){return oe},getAnchoredDescendantId:function(){return ne},getContainer:function(){return o},getCurrentDocumentContainer:function(){return M},getCurrentDocumentId:function(){return V},getElementChildrenWithFallback:function(){return s},getElementEditorSettings:function(){return d},getElementInteractions:function(){return ve},getElementLabel:function(){return q},getElementSetting:function(){return w},getElementSettings:function(){return v},getElementStyles:function(){return F},getElementType:function(){return p},getElements:function(){return W},getLinkInLinkRestriction:function(){return te},getSelectedElements:function(){return f},getWidgetsCache:function(){return m},isElementAnchored:function(){return re},moveElement:function(){return G},moveElements:function(){return Y},playElementInteractions:function(){return _e},removeElements:function(){return z},removeModelFromParent:function(){return O},replaceElement:function(){return K},resolveContainer:function(){return S},selectElement:function(){return r},shouldCreateNewLocalStyle:function(){return Ee},styleRerenderEvents:function(){return ue},updateElementEditorSettings:function(){return X},updateElementInteractions:function(){return ye},updateElementSettings:function(){return Z},updateElementStyle:function(){return we},useElementChildren:function(){return l},useElementEditorSettings:function(){return u},useParentElement:function(){return a},useSelectedElement:function(){return g},useSelectedElementSettings:function(){return y}});var n=window.elementorV2.editorV1Adapters;function o(e){const t=window,n=t.elementor?.getContainer?.(e);return n??null}const r=e=>{try{const t=o(e);(0,n.__privateRunCommand)("document/elements/select",{container:t})}catch{}};function i(e,t){const n=e.get("elements")??[];for(const e of n){if(t(e))return{model:e};const n=i(e,t);if(n)return n}return null}function s(e,t){return(e.get("elements")??[]).filter(e=>!t||t(e)).map(e=>({model:e}))}function c({model:e}){return{id:e.get("id"),editorSettings:e.get("editor_settings")??{}}}function l(e,t){return(0,n.__privateUseListenTo)([(0,n.v1ReadyEvent)(),(0,n.commandEndEvent)("document/elements/create"),(0,n.commandEndEvent)("document/elements/delete"),(0,n.commandEndEvent)("document/elements/update"),(0,n.commandEndEvent)("document/elements/set-settings")],()=>{const n=o(e),r=n?.model;return r?Object.entries(t).reduce((e,[t,n])=>{const o=i(r,e=>e.get("elType")===t);if(!o)return e[n]=[],e;const l=s(o.model,e=>e.get("elType")===n);return e[n]=l.map(c),e},{}):{}},[e])}function d(e){const t=o(e);return t?.model.get("editor_settings")??{}}const u=e=>(0,n.__privateUseListenTo)((0,n.windowEvent)("elementor/element/update_editor_settings"),()=>d(e),[e]);function a(e){return(0,n.__privateUseListenTo)([(0,n.commandEndEvent)("document/elements/create")],()=>{if(!e)return null;const t=window,n=t?.elementor?.getContainer?.(e);return n?n.parent:null},[e])}function m(){const e=window;return e?.elementor?.widgetsCache||null}function p(e){if(!e)return null;const t=m(),n=t?.[e];return n?.atomic_controls&&n?.atomic_props_schema?{key:e,controls:n.atomic_controls,propsSchema:n.atomic_props_schema,dependenciesPerTargetMapping:n.dependencies_per_target_mapping??{},title:n.title,styleStates:n.atomic_style_states??[],pseudoStates:n.atomic_pseudo_states??[]}:null}function f(){const e=window;return(e.elementor?.selection?.getElements?.()??[]).reduce((e,t)=>{const n=t.model.get("widgetType")||t.model.get("elType");return n&&e.push({id:t.model.get("id"),type:n}),e},[])}function E(){const e=f(),[t]=e,n=p(t?.type);return 1===e.length&&n&&t?{element:t,elementType:n}:{element:null,elementType:null}}function g(){return(0,n.__privateUseListenTo)([(0,n.commandEndEvent)("document/elements/select"),(0,n.commandEndEvent)("document/elements/deselect"),(0,n.commandEndEvent)("document/elements/select-all"),(0,n.commandEndEvent)("document/elements/deselect-all")],E)}const w=(e,t)=>{const n=o(e);return n?.settings?.get(t)??null},v=(e,t)=>Object.fromEntries(t.map(t=>[t,w(e,t)]));function y(){return(0,n.__privateUseListenTo)([(0,n.commandEndEvent)("document/elements/select"),(0,n.commandEndEvent)("document/elements/deselect"),(0,n.commandEndEvent)("document/elements/select-all"),(0,n.commandEndEvent)("document/elements/deselect-all"),(0,n.commandEndEvent)("document/elements/set-settings")],()=>{const{element:e,elementType:t}=E();return e&&t?{element:e,elementType:t,settings:v(e.id,Object.keys(t.propsSchema))}:{element:null,elementType:null,settings:null}})}function _({container:e,model:t,options:o}){return(0,n.__privateRunCommandSync)("document/elements/create",{container:e,model:t,options:{edit:!1,...o}})}var I=window.wp.i18n;function h({container:e,options:t={}}){(0,n.__privateRunCommandSync)("document/elements/delete",{container:e,options:t})}function C(e){return!!e&&(!e.view?.el||e.view.el.isConnected)}function S(e,t){const n=e.lookup?.();if(C(n))return n;const r=o(t);return C(r)?r:null}function b(){return window.$e?.components?.get?.("document")?.utils}function T(e){return b()?.findModelById?.(e)??null}function x(e,t,n){return b()?.addModelToParent?.(e,t,n)??!1}function O(e,t){return b()?.removeModelFromParent?.(e,t)??!1}const H=({elements:e,title:t,subtitle:o=(0,I.__)("Item added","elementor")})=>(0,n.undoable)({do:({elements:e})=>{const t=[];return e.forEach(({container:e,options:n,...o})=>{const r=e.lookup?.()??e;if(!r)throw new Error("Parent container not found");const i=_({container:r,...o,options:{...n,useHistory:!1}});t.push({container:i,parentContainer:r,model:i.model?.toJSON()||{},options:n,containerId:i.id,parentContainerId:r.id})}),{createdElements:t}},undo:(e,{createdElements:t})=>{[...t].reverse().forEach(({container:e,containerId:t,parentContainerId:n})=>{const o=S(e,t);o?h({container:o,options:{useHistory:!1}}):O(n,t)})},redo:(e,{createdElements:t})=>{const n=[];return t.forEach(({parentContainer:e,parentContainerId:t,model:o,options:r})=>{const i=S(e,t);if(i){const e=_({container:i,model:o,options:{...r,useHistory:!1}});return void n.push({container:e,parentContainer:i,model:e.model.toJSON(),options:r,containerId:e.id,parentContainerId:i.id})}x(t,o),n.push({container:e,parentContainer:e,model:o,options:r,containerId:o.id??"",parentContainerId:t})}),{createdElements:n}}},{title:t,subtitle:o})({elements:e});function R({containerId:e,model:t,options:r}){const i=o(e);if(!i)throw new Error(`Container with ID "${e}" not found`);return(0,n.__privateRunCommandSync)("preview/drop",{container:i,model:t,options:r})}function k({element:e,options:t={}}){const o=e.view?._index??0,r=!1!==t.clone?o+1:void 0;return(0,n.__privateRunCommandSync)("document/elements/duplicate",{container:e,options:{at:r,edit:!1,...t}})}const P=({elementIds:e,title:t,subtitle:r=(0,I.__)("Item duplicated","elementor"),onDuplicateElements:i,onRestoreElements:s})=>(0,n.undoable)({do:({elementIds:e})=>{i?.();const t=[];return e.forEach(e=>{const n=o(e);if(!n?.parent)return;const r=k({element:n,options:{useHistory:!1}});r.parent&&t.push({container:r,parentContainer:r.parent,model:r.model.toJSON(),at:r.view?._index,containerId:r.id,parentContainerId:r.parent.id})}),{duplicatedElements:t}},undo:(e,{duplicatedElements:t})=>{s?.(),[...t].reverse().forEach(({container:e,containerId:t,parentContainerId:n})=>{const o=S(e,t);o?h({container:o,options:{useHistory:!1}}):O(n,t)})},redo:(e,{duplicatedElements:t})=>{i?.();const n=[];return t.forEach(({parentContainer:e,parentContainerId:t,model:o,at:r})=>{const i=S(e,t);if(i){const e=_({container:i,model:o,options:{useHistory:!1,clone:!1,at:r}});return void n.push({container:e,parentContainer:i,model:o,at:r,containerId:e.id,parentContainerId:i.id})}x(t,o,{at:r}),n.push({container:e,parentContainer:e,model:o,at:r,containerId:o.id??"",parentContainerId:t})}),{duplicatedElements:n}}},{title:t,subtitle:r})({elementIds:e}),j=()=>{const e=window;return e.elementorCommon?.helpers?.getUniqueId?.()??`el-${Date.now()}-${Math.random().toString(36).substring(2,9)}`};function M(){const e=window;return e.elementor?.documents?.getCurrent?.()?.container??null}function V(){const e=window;try{return e.elementor?.documents?.getCurrentId?.()??null}catch{return null}}var A=window.elementorV2.utils;const L=(0,A.createError)({code:"element_not_found",message:"Element not found."}),N=(0,A.createError)({code:"style_not_found",message:"Style not found."}),$=(0,A.createError)({code:"element_type_not_exists",message:"Element type does not exist."}),D=(0,A.createError)({code:"element_label_not_exists",message:"Element label does not exist."}),U=(0,A.createError)({code:"element_parent_not_found",message:"Element parent not found."}),J=(0,A.createError)({code:"element_index_not_found",message:"Element index not found."});function q(e){e||(e=f()?.[0]?.id);const t=o(e),n=t?.model.get("widgetType")||t?.model.get("elType");if(!n)throw new $({context:{elementId:e}});const r=m()?.[n]?.title;if(!r)throw new D({context:{elementType:n}});return r}const F=e=>{const t=o(e);return t?.model.get("styles")||null};function B(e){return[e,...(e.children??[]).flatMap(e=>B(e))]}function W(e){const t=e?o(e):M();if(!t)return[];const n=[...t.model.get("elements")??[]].flatMap(e=>W(e.get("id")));return[t,...n]}function G({element:e,targetContainer:t,options:n={}}){const o=e.lookup?.(),r=t.lookup?.();if(!o)throw new Error(`Element not found: ${e.id}`);if(!r)throw new Error(`Target container not found: ${t.id}`);const i=o.model.toJSON();return h({container:o,options:{...n,useHistory:!1}}),_({container:r,model:i,options:{edit:!1,...n,useHistory:!1}})}const Y=({moves:e,title:t,subtitle:o=(0,I.__)("Elements moved","elementor"),onMoveElements:r,onRestoreElements:i})=>(0,n.undoable)({do:({moves:e})=>{const t=[];return r?.(),e.forEach(({element:e,targetContainer:n,options:o})=>{const r=e.lookup?.()??e,i=n.lookup?.()??n;if(!r)throw new Error("Element not found");if(!i)throw new Error("Target container not found");if(!r.parent)throw new Error("Element has no parent container");const s=r.parent,c=s.children?.indexOf(r)??-1,l=G({element:r,targetContainer:i,options:{...o,useHistory:!1}});t.push({element:l,originalContainer:s,originalIndex:c,targetContainer:i,options:o,elementId:l.id,originalContainerId:s.id,targetContainerId:i.id})}),{movedElements:t}},undo:(e,{movedElements:t})=>{i?.(),[...t].reverse().forEach(({element:e,elementId:t,originalContainer:n,originalContainerId:o,originalIndex:r})=>{const i=S(e,t),s=S(n,o);i&&s&&G({element:i,targetContainer:s,options:{useHistory:!1,at:r>=0?r:void 0}})})},redo:(e,{movedElements:t})=>{const n=[];return r?.(),t.forEach(({element:e,elementId:t,originalContainer:o,originalContainerId:r,originalIndex:i,targetContainer:s,targetContainerId:c,options:l})=>{const d=S(e,t),u=S(o,r),a=S(s,c);if(!d||!u||!a)return;const m=G({element:d,targetContainer:a,options:{...l,useHistory:!1}});n.push({element:m,originalContainer:u,originalIndex:i,targetContainer:a,options:l,elementId:m.id,originalContainerId:u.id,targetContainerId:a.id})}),{movedElements:n}}},{title:t,subtitle:o})({moves:e}),z=({elementIds:e,title:t,subtitle:r=(0,I.__)("Item removed","elementor"),onRemoveElements:i,onRestoreElements:s})=>(0,n.undoable)({do:({elementIds:e})=>{const t=[];return e.forEach(e=>{const n=o(e);n?.parent&&t.push({container:n,parent:n.parent,model:n.model.toJSON(),at:n.view?._index??0,containerId:n.id,parentId:n.parent.id})}),i?.(),t.forEach(({container:e})=>{h({container:e,options:{useHistory:!1}})}),{removedElements:t}},undo:(e,{removedElements:t})=>{s?.(),[...t].reverse().forEach(({parent:e,parentId:t,model:n,at:o})=>{const r=S(e,t);r?_({container:r,model:n,options:{useHistory:!1,at:o}}):x(t,n,{at:o})})},redo:(e,{removedElements:t})=>{i?.();const n=[];return t.forEach(({container:e,parent:t,model:o,at:r,containerId:i,parentId:s})=>{const c=S(e,i),l=S(t,s);if(c&&l)return h({container:c,options:{useHistory:!1}}),void n.push({container:c,parent:l,model:o,at:r,containerId:i,parentId:s});O(s,i),n.push({container:e,parent:t,model:o,at:r,containerId:i,parentId:s})}),{removedElements:n}}},{title:t,subtitle:r})({elementIds:e}),K=({currentElementId:e,newElement:t,withHistory:n=!0})=>{const r=o(e);if(!r)throw new L({context:{elementId:e}});const{container:i,index:s}=function(e,t){const{parent:n}=e;if(!n)throw new U({context:{elementId:e.id}});const o=e.view?._index??0;if(-1===o)throw new J({context:{elementId:e.id}});let r={container:n,index:o};return"document"===n.id&&"widget"===t.elType&&(r=function(e,t){return{container:_({container:e,model:{elType:Q},options:{at:t,useHistory:!1}}),index:0}}(n,o)),r}(r,t),c=_({container:i,model:t,options:{at:s,useHistory:n}});return h({container:r,options:{useHistory:n}}),c},Q="e-flexbox",X=({elementId:e,settings:t})=>{const r=o(e);if(!r)throw new Error(`Element with id ${e} not found`);const i=r.model.get("editor_settings")??{};r.model.set("editor_settings",{...i,...t}),(0,n.__privateRunCommandSync)("document/save/set-is-modified",{status:!0},{internal:!0})},Z=({id:e,props:t,withHistory:r=!0})=>{const i=o(e);if(!i)return;const s={container:i,settings:{...t}};r?(0,n.__privateRunCommandSync)("document/elements/settings",s):(0,n.__privateRunCommandSync)("document/elements/set-settings",s,{internal:!0})},ee="a, [data-action-link]";function te(e,t){const n=ne(e);if(n)return{shouldRestrict:!0,reason:"descendant",elementId:n};const o=function(e,t){const n=ce(e);if(!n)return!1;if(n.matches(ee))return!1;const o=t??w(e,"link")?.value;return!o?.destination&&null!==n.querySelector(ee)}(e,t);if(o)return{shouldRestrict:!0,reason:"descendant",elementId:e};const r=oe(e);return r?{shouldRestrict:!0,reason:"ancestor",elementId:r}:{shouldRestrict:!1}}function ne(e){const t=ce(e);if(!t)return null;for(const n of Array.from(t.querySelectorAll(ee))){const t=se(n);if(t!==e)return t}return null}function oe(e){const t=ce(e);if(!t||null===t.parentElement)return null;const n=t.parentElement.closest(ee);return n?se(n):null}function re(e){const t=ce(e);return!!t&&(!!t.matches(ee)||ie(t))}function ie(e){for(const t of Array.from(e.children))if(!le(t)){if(t.matches(ee))return!0;if(ie(t))return!0}return!1}function se(e){return e.closest("[data-id]")?.dataset.id||null}function ce(e){try{return o(e)?.view?.el||null}catch{return null}}function le(e){return e.hasAttribute("data-id")}const de="elementor/editor-v2/editor-elements/style",ue=[(0,n.commandEndEvent)("document/elements/create"),(0,n.commandEndEvent)("document/elements/duplicate"),(0,n.commandEndEvent)("document/elements/import"),(0,n.commandEndEvent)("document/elements/paste"),(0,n.windowEvent)(de)];var ae=window.elementorV2.editorProps,me=window.elementorV2.editorStyles;function pe(e,t){const r=o(e);if(!r)throw new L({context:{elementId:e}});const i=Object.keys(r.model.get("styles")??{}),s=function(e,t){const n=structuredClone(e.model.get("styles"))??{},o=Object.entries(t(n)).map(([e,t])=>(t.variants=function(e){return e.variants.filter(({props:e,custom_css:t})=>Object.keys(e).length>0||t?.raw)}(t),[e,t])).filter(([,e])=>!function(e){return 0===e.variants.length}(e)),r=Object.fromEntries(o);return e.model.set("styles",r),r}(r,t);return function(e,{oldIds:t,newIds:n}){const o=t.filter(e=>!n.includes(e)),r=structuredClone(function(e){return Object.entries(e.settings.toJSON()).filter(e=>{const[,t]=e;return ae.classesPropTypeUtil.isValid(t)})}(e));r.forEach(([,e])=>{e.value=e.value.filter(e=>!o.includes(e))}),Z({id:e.id,props:Object.fromEntries(r),withHistory:!1})}(r,{oldIds:i,newIds:Object.keys(s)}),window.dispatchEvent(new CustomEvent(de)),(0,n.__privateRunCommandSync)("document/save/set-is-modified",{status:!0},{internal:!0}),s}function fe({styleId:e,elementId:t,classesProp:n,label:o,meta:r,props:i,custom_css:s=null,additionalVariants:c=[]}){let l=e;return pe(t,e=>{l??=(0,me.generateId)(`e-${t}-`,Object.keys(e));const d=[{meta:r,props:i,custom_css:s},...c];return e[l]={id:l,label:o,type:"class",variants:d},function(e,t,n){const o=w(e,t),r=ae.classesPropTypeUtil.create(e=>[...e??[],n],{base:o});Z({id:e,props:{[t]:r},withHistory:!1})}(t,n,l),e}),l}function Ee(e){return!e?.styleId&&!e?.provider}function ge(e,t){pe(e,e=>(delete e[t],e))}function we(e){pe(e.elementId,t=>{const n=t[e.styleId];if(!n)throw new N({context:{styleId:e.styleId}});const o=(0,me.getVariantByMeta)(n,e.meta),r=("custom_css"in e?e.custom_css:o?.custom_css)??null;return o?(o.props=(0,ae.mergeProps)(o.props,e.props),o.custom_css=r?.raw?r:null):n.variants.push({meta:e.meta,props:e.props,custom_css:r}),t})}function ve(e){const t=o(e),n=t?.model?.get("interactions");return"string"==typeof n?JSON.parse(n):n}const ye=({elementId:e,interactions:t})=>{const r=o(e);if(!r)throw new Error(`Element with id ${e} not found`);r.model.set("interactions",t),window.dispatchEvent(new CustomEvent("elementor/element/update_interactions")),(0,n.__privateRunCommandSync)("document/save/set-is-modified",{status:!0},{internal:!0})},_e=(e,t)=>{window.top?.dispatchEvent(new CustomEvent("atomic/play_interactions",{detail:{elementId:e,interactionId:t}}))};(window.elementorV2=window.elementorV2||{}).editorElements=t}(),window.elementorV2.editorElements?.init?.();