@emailmaker/emailmaker 1.0.58 → 1.0.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +1 -1
  2. package/asset-manifest.json +21 -23
  3. package/emailmaker-esm.js +1 -1
  4. package/emailmaker.d.ts +6 -10
  5. package/emailmaker.js +1 -1
  6. package/iframe/css/sandbox.css +1 -1
  7. package/iframe/{iframe-eblock.764252e02f79a12d1232.html → iframe-eblock.1ef394c83ed0138fa7e1.html} +1 -1
  8. package/iframe/{iframe.764252e02f79a12d1232.html → iframe.1ef394c83ed0138fa7e1.html} +1 -1
  9. package/iframe/js/cssbeautify.js +1 -1
  10. package/iframe/sandbox-eblock.js +1 -1
  11. package/iframe/sandbox.js +1 -1
  12. package/package.json +1 -1
  13. package/plugin.html +1 -1
  14. package/plugin_blocks_test.html +1 -1
  15. package/plugin_default.html +1 -1
  16. package/plugin_idigital.html +1 -1
  17. package/plugin_s.html +1 -1
  18. package/static/css/2574.1bf580ef.css +1 -0
  19. package/static/js/{3142.506128bd.js → 1122.f394e510.js} +1 -1
  20. package/static/js/1729.a0be903e.chunk.js +1 -0
  21. package/static/js/189.d4e5c06f.js +1 -0
  22. package/static/js/2574.2f48eb7a.js +1 -0
  23. package/static/js/4529.2f2fc56b.js +1 -0
  24. package/static/js/5211.e473201c.js +1 -0
  25. package/static/js/7291.37dee66e.js +1 -0
  26. package/static/js/7967.28137472.js +1 -0
  27. package/static/js/8995.410bef51.js +1 -0
  28. package/static/js/{emailmaker_core.f3e957c5.js → emailmaker_core.f09929d2.js} +1 -1
  29. package/translations.pot +505 -426
  30. package/static/css/2055.377300a1.css +0 -1
  31. package/static/js/1729.48808a7e.chunk.js +0 -1
  32. package/static/js/189.367ef47a.js +0 -1
  33. package/static/js/2055.dbc72d9d.js +0 -1
  34. package/static/js/4529.32d541e6.js +0 -1
  35. package/static/js/5211.638a9803.js +0 -1
  36. package/static/js/5641.2fa58425.js +0 -1
  37. package/static/js/7291.e86fd181.js +0 -1
  38. package/static/js/78.911fb968.js +0 -1
  39. package/static/js/8995.1e4e2d7e.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[7291],{68031:(e,o,t)=>{t.d(o,{A:()=>p});var i=t(92810),l=t(12280),d=t(20984),s=t(81e3),r=t(66726),a=t(73170),n=t(87984),m=t(98885),c=t(23287),u=t(85163),b=t(62303),h=t(45695),g=t(70082);const x=({form:e,elementSettings:o,imgParent:t,name:x="align",setAlignStateHandle:p=e=>{}})=>{const{__:f}=(0,c.s9)(),A=(0,h.XW)(),[j,v]=(0,i.useState)(o[x]),[B,S]=(0,i.useState)(null);(0,i.useEffect)((()=>{var e,o;null!==(e=window)&&void 0!==e&&null!==(o=e.navigator)&&void 0!==o&&o.userAgent.includes("Macintosh")&&S(!0)}),[]);const _=t=>{const i=t.target.value;p(i);const l={[x]:""};i!==j?v(i):(v(""),e.setFieldsValue(l),A({operation:u.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:l}))};return(0,g.jsx)(l.A.Item,{name:x,children:(0,g.jsx)(d.Ay.Group,{disabled:t&&!o.parent,children:(0,g.jsxs)(s.A,{size:8,children:[(0,g.jsx)(r.A,{placement:"bottom",title:f(B?"Text align left ( \u2318+Shift+L )":"Text align left ( Ctrl+Shift+L )"),children:(0,g.jsx)(d.Ay.Button,{value:"left",onClick:_,children:(0,g.jsx)(a.A,{})})}),(0,g.jsx)(r.A,{placement:"bottom",title:f(B?"Text align center ( \u2318+Shift+E )":"Text align center ( Ctrl+Shift+E )"),children:(0,g.jsx)(d.Ay.Button,{value:"center",onClick:_,children:(0,g.jsx)(n.A,{})})}),(0,g.jsx)(r.A,{placement:"bottom",title:f(B?"Text align right ( \u2318+Shift+R )":"Text align right ( Ctrl+Shift+R )"),children:(0,g.jsx)(d.Ay.Button,{value:"right",onClick:_,children:(0,g.jsx)(m.A,{})})}),(0,g.jsx)(r.A,{placement:"bottom",title:f(B?"Text align justify ( \u2318+Shift+J )":"Text align justify ( Ctrl+Shift+J )"),children:(0,g.jsx)(d.Ay.Button,{value:"justify",onClick:_,children:(0,g.jsx)(b.A,{icon:"Justify"})})})]})})})};x.defaultProps={imgParent:!1};const p=x},21519:(e,o,t)=>{t.d(o,{A:()=>w});t(92810);var i=t(95838),l=t(2018),d=t(7744),s=t(12280),r=t(78159),a=t(20984),n=t(81e3),m=t(66726),c=t(38587),u=t(12751),b=t(14473),h=t(37822),g=t(68285),x=t(57032),p=t(26461),f=t(69118),A=t(10930),j=t(38883),v=t.n(j),B=t(23287),S=t(45934),_=t(26238),R=t(65983),k=t(70082);const{useToken:y}=i.A,w=({borders:e,namePrefix:o=""})=>{const t=(0,S.d4)(R.uJ),{__:i,_x:j}=(0,B.s9)(),w=e=>(null===e||void 0===e?void 0:e.width)||(null===e||void 0===e?void 0:e.style)||(null===e||void 0===e?void 0:e.color),{token:P}=y();return(0,k.jsxs)(l.A,{gutter:30,children:[(0,k.jsxs)(d.A,{span:12,className:"selected-td-form__border-col",children:[(0,k.jsx)(s.A.Item,{name:o+"borderColor",className:"form-item-margin-xs",children:(0,k.jsx)(_.A,{placeholder:i("Color"),usedColors:t.usedColors})}),(0,k.jsx)(s.A.Item,{name:o+"borderWidth",className:"form-item-margin-xs",children:(0,k.jsx)(r.A,{min:0,placeholder:j("Width","border"),addonAfter:"px"})}),(0,k.jsx)(s.A.Item,{name:o+"borderStyle",className:"form-item-margin-xs",children:(0,k.jsx)(a.Ay.Group,{children:(0,k.jsxs)(n.A,{size:8,children:[(0,k.jsx)(m.A,{placement:"bottom",title:i("None"),children:(0,k.jsx)(a.Ay.Button,{value:"",children:(0,k.jsx)(c.A,{})})}),(0,k.jsx)(m.A,{placement:"bottom",title:i("Solid"),children:(0,k.jsx)(a.Ay.Button,{value:"solid",children:(0,k.jsx)(u.A,{})})}),(0,k.jsx)(m.A,{placement:"bottom",title:i("Dashed"),children:(0,k.jsx)(a.Ay.Button,{value:"dashed",children:(0,k.jsx)(b.A,{})})}),(0,k.jsx)(m.A,{placement:"bottom",title:i("Dotted"),children:(0,k.jsx)(a.Ay.Button,{value:"dotted",children:(0,k.jsx)(h.A,{})})})]})})})]}),(0,k.jsx)(d.A,{span:12,style:{textAlign:"center"},children:(0,k.jsx)(s.A.Item,{label:"",name:o+"borderPosition",labelCol:{span:8},children:(0,k.jsx)(a.Ay.Group,{children:(0,k.jsxs)(n.A,{size:P.formItemMarginBottomXS,direction:"vertical",children:[(0,k.jsx)(l.A,{children:(0,k.jsx)(m.A,{placement:"top",title:i("Above"),children:(0,k.jsx)(a.Ay.Button,{value:"top",style:{margin:"auto"},className:v()("",{"selected-td-form__border-radio":w(null===e||void 0===e?void 0:e.top)}),children:(0,k.jsx)(g.A,{})})})}),(0,k.jsx)(l.A,{children:(0,k.jsxs)(n.A,{size:P.formItemMarginBottomXS,children:[(0,k.jsx)(m.A,{placement:"left",title:i("On the left"),children:(0,k.jsx)(a.Ay.Button,{value:"left",className:v()("",{"selected-td-form__border-radio":w(null===e||void 0===e?void 0:e.left)}),children:(0,k.jsx)(x.A,{})})}),(0,k.jsx)(m.A,{placement:"top",title:i("Around"),children:(0,k.jsx)(a.Ay.Button,{value:"all",className:v()("",{"selected-td-form__border-radio":w(null===e||void 0===e?void 0:e.all)}),children:(0,k.jsx)(p.A,{})})}),(0,k.jsx)(m.A,{placement:"right",title:i("On the right"),children:(0,k.jsx)(a.Ay.Button,{value:"right",className:v()("",{"selected-td-form__border-radio":w(null===e||void 0===e?void 0:e.right)}),children:(0,k.jsx)(f.A,{})})})]})}),(0,k.jsx)(l.A,{children:(0,k.jsx)(m.A,{placement:"bottom",title:i("Below"),children:(0,k.jsx)(a.Ay.Button,{value:"bottom",className:v()("",{"selected-td-form__border-radio":w(null===e||void 0===e?void 0:e.bottom)}),style:{margin:"auto"},children:(0,k.jsx)(A.A,{})})})})]})})})})]})}},71495:(e,o,t)=>{t.d(o,{A:()=>v});t(92810);var i=t(2018),l=t(7744),d=t(81e3),s=t(12280),r=t(43005),a=t(66726),n=t(1728),m=t(82051),c=t(11696),u=t(87042),b=t(38883),h=t.n(b),g=t(23287),x=t(88647),p=t(44997),f=t(45695),A=t(85163),j=t(70082);const v=({form:e,oneBorderRadiusValue:o,setOneBorderRadiusValue:t,elementSettings:b,namePrefix:v=""})=>{const{__:B}=(0,g.s9)(),S=(0,f.XW)();return(0,j.jsxs)(i.A,{gutter:10,children:[(0,j.jsx)(l.A,{span:12,children:(0,j.jsx)(d.A,{size:10,align:"start",children:(0,j.jsx)(s.A.Item,{name:v+"borderRadiusAll",children:(0,j.jsx)(p.A,{min:0,placeholder:B("Border radius"),prefix:(0,j.jsx)(x.h,{className:"selected-td-form__icon-radius"}),disabled:!o,addonAfter:"px"})})})}),(0,j.jsx)(l.A,{span:12,children:(0,j.jsx)(r.Ay,{className:h()("selected-td-form__button",{"selected-td-form__button--active":!o}),onClick:()=>{const i=e.getFieldsValue(!0);let l;if(o)e.setFieldsValue({borderRadiusTopLeft:i.borderRadiusAll||null,borderRadiusBottomLeft:i.borderRadiusAll||null,borderRadiusTopRight:i.borderRadiusAll||null,borderRadiusBottomRight:i.borderRadiusAll||null}),l={borderRadius:{[A.wF.borderRadiusTopLeft]:i.borderRadiusAll||0,[A.wF.borderRadiusBottomLeft]:i.borderRadiusAll||0,[A.wF.borderRadiusTopRight]:i.borderRadiusAll||0,[A.wF.borderRadiusBottomRight]:i.borderRadiusAll||0}};else{const o=i.borderRadiusTopLeft===i.borderRadiusBottomLeft&&i.borderRadiusTopLeft===i.borderRadiusTopRight&&i.borderRadiusTopLeft===i.borderRadiusBottomRight;o?(e.setFieldsValue({borderRadiusAll:o?i.borderRadiusTopLeft:null}),l={borderRadius:{[A.wF.borderRadiusAll]:i.borderRadiusTopLeft}}):(e.setFieldsValue({borderRadiusAll:null,borderRadiusTopLeft:null,borderRadiusBottomLeft:null,borderRadiusTopRight:null,borderRadiusBottomRight:null}),l={borderRadius:{[A.wF.borderRadiusAll]:0,[A.wF.borderRadiusTopLeft]:0,[A.wF.borderRadiusBottomLeft]:0,[A.wF.borderRadiusTopRight]:0,[A.wF.borderRadiusBottomRight]:0}})}S({operation:A.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:b.type,settings:{borderRadius:{...b.borderRadius,...l.borderRadius}}}),t((e=>!e))},children:(0,j.jsx)(x.h,{className:"selected-td-form__icon-radius"})})}),(0,j.jsx)(l.A,{children:(0,j.jsxs)(i.A,{gutter:10,style:{marginTop:-10},children:[(0,j.jsxs)(l.A,{span:12,children:[(0,j.jsx)(a.A,{placement:"bottom",title:B("Top left corner"),children:(0,j.jsx)(s.A.Item,{hidden:o,name:v+"borderRadiusTopLeft",className:"form-item-margin-xs",children:(0,j.jsx)(p.A,{min:0,prefix:(0,j.jsx)(n.A,{}),style:{minHeight:10},addonAfter:"px"})})}),(0,j.jsx)(a.A,{placement:"bottom",title:B("Bottom left corner"),children:(0,j.jsx)(s.A.Item,{hidden:o,name:v+"borderRadiusBottomLeft",children:(0,j.jsx)(p.A,{min:0,prefix:(0,j.jsx)(m.A,{}),style:{minHeight:10},addonAfter:"px"})})})]}),(0,j.jsxs)(l.A,{span:12,children:[(0,j.jsx)(a.A,{placement:"bottom",title:B("Top right corner"),children:(0,j.jsx)(s.A.Item,{hidden:o,name:v+"borderRadiusTopRight",className:"form-item-margin-xs",children:(0,j.jsx)(p.A,{min:0,prefix:(0,j.jsx)(c.A,{}),style:{minHeight:10},addonAfter:"px"})})}),(0,j.jsx)(a.A,{placement:"bottom",title:B("Bottom right corner"),children:(0,j.jsx)(s.A.Item,{hidden:o,name:v+"borderRadiusBottomRight",children:(0,j.jsx)(p.A,{min:0,prefix:(0,j.jsx)(u.A,{}),style:{minHeight:10},addonAfter:"px"})})})]})]})})]})}},40187:(e,o,t)=>{t.d(o,{A:()=>p});var i=t(92810),l=t(12280),d=t(20984),s=t(81e3),r=t(66726),a=t(23287),n=t(73170),m=t(87984),c=t(98885),u=t(85163),b=t(62303),h=t(45695),g=t(70082);const x=({form:e,elementSettings:o,imgParent:t,name:x="mobileAlign"})=>{var p;const{__:f}=(0,a.s9)(),[A,j]=(0,i.useState)(null===(p=o[x])||void 0===p?void 0:p.value),v=(0,h.XW)(),B=t=>{const i=t.target.value,l={[x]:{classNamePrefix:"em-mob-text_align-",value:""}};i!==A?j(i):(j(""),e.setFieldsValue(l),v({operation:u.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:l}))};return(0,g.jsx)(l.A.Item,{name:x,children:(0,g.jsx)(d.Ay.Group,{disabled:t&&!o.parent,children:(0,g.jsxs)(s.A,{size:8,children:[(0,g.jsx)(r.A,{placement:"bottom",title:f("Text align left"),children:(0,g.jsx)(d.Ay.Button,{value:"left",onClick:B,children:(0,g.jsx)(n.A,{})})}),(0,g.jsx)(r.A,{placement:"bottom",title:f("Text align center"),children:(0,g.jsx)(d.Ay.Button,{value:"center",onClick:B,children:(0,g.jsx)(m.A,{})})}),(0,g.jsx)(r.A,{placement:"bottom",title:f("Text align right"),children:(0,g.jsx)(d.Ay.Button,{value:"right",onClick:B,children:(0,g.jsx)(c.A,{})})}),(0,g.jsx)(r.A,{placement:"bottom",title:f("Text align justify"),children:(0,g.jsx)(d.Ay.Button,{value:"justify",onClick:B,children:(0,g.jsx)(b.A,{icon:"Justify"})})})]})})})};x.defaultProps={imgParent:!1};const p=x},65655:(e,o,t)=>{t.d(o,{A:()=>n});t(92810);var i=t(66726),l=t(12280),d=t(7166),s=t(23287),r=t(44997),a=t(70082);const n=()=>{const{__:e}=(0,s.s9)();return(0,a.jsx)(i.A,{trigger:["hover"],title:e("The font-size CSS property sets the size of the font."),placement:"top",children:(0,a.jsx)(l.A.Item,{name:"mobileFontSize",children:(0,a.jsx)(r.A,{min:0,placeholder:e("Font size"),prefix:(0,a.jsx)(d.A,{}),addonAfter:"px"})})})}},95955:(e,o,t)=>{t.d(o,{A:()=>g});var i=t(92810),l=t(95838),d=t(12280),s=t(81e3),r=t(8701),a=t(11007),n=t(23287),m=t(85163),c=t(44997),u=t(45695),b=t(70082);const{useToken:h}=l.A,g=({form:e,name:o,elementSettings:t,isPicture:l})=>{var g;const{__:x}=(0,n.s9)(),p=(0,u.XW)(),f=(0,i.useRef)(),A=(0,i.useRef)(),[j,v]=(0,i.useState)("auto"===(null===(g=t.mobileHeight)||void 0===g?void 0:g.value)),{token:B}=h();return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.A.Item,{name:o,style:{marginBottom:B.formItemMarginBottomXS/2},children:(0,b.jsx)(c.A,{ref:f,min:0,placeholder:x("Height"),onChange:e=>{v(!1)},prefix:(0,b.jsx)(a.A,{}),addonAfter:"px"})}),!l&&(0,b.jsxs)(s.A,{size:8,align:"end",children:[(0,b.jsx)(r.A,{ref:A,size:"small",checked:j,onChange:o=>{f.current.value=null,e.setFieldsValue({mobileHeight:"",mobileHeightDim:"px"}),v((e=>!e)),p({operation:m.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:{mobileHeight:{classNamePrefix:"em-mob-height-",value:j?null:"auto",dim:""}}})},id:"auto-height"}),(0,b.jsx)("div",{className:"ant-form-item-switch-label-small",style:{position:"relative",top:2},children:(0,b.jsx)("label",{htmlFor:"auto-height",children:x("Auto")})})]})]})}},73721:(e,o,t)=>{t.d(o,{A:()=>h});var i=t(92810),l=t(12280),d=t(66726),s=t(43005),r=t(23287),a=t(85163),n=t(45695),m=t(38883),c=t.n(m),u=t(70082);const b=({form:e,elementSettings:o,name:t,icon:m,tooltipTitle:b=null,showTooltip:h=!0})=>{const{__:g}=(0,r.s9)(),x=e.getFieldValue(t),p=(0,n.XW)(),[f,A]=(0,i.useState)(o[t]);(0,i.useEffect)((()=>{o[t]!==e.getFieldValue(t)&&(e.setFieldValue(t,o[t]),A(o[t]))}),[o,e,t]),(0,i.useEffect)((()=>{f!==x&&A(x)}),[x,f,t]);const j=()=>{const i={[t]:!f};e.setFieldValue(t,!f),p({operation:a.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:i}),A((e=>!e))};return(0,u.jsx)(l.A.Item,{name:t,children:h?(0,u.jsx)(d.A,{placement:"bottom",title:b||g(`${t.substring(4)}`),children:(0,u.jsx)(s.Ay,{className:c()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":f}),onClick:j,children:m})}):(0,u.jsx)(s.Ay,{className:c()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":f}),onClick:j,children:m})})};b.defaultProps={imgParent:!1};const h=b},26021:(e,o,t)=>{t.d(o,{A:()=>b});var i=t(92810),l=t(12280),d=t(20984),s=t(81e3),r=t(66726),a=t(23287),n=t(62303),m=t(85163),c=t(45695),u=t(70082);const b=({form:e,elementSettings:o,tooltipTitle:t,disabled:b=!1})=>{const{__:h}=(0,a.s9)(),g=(0,c.XW)(),[x,p]=(0,i.useState)(o.valign),f=t=>{const i=t.target.value,l={valign:""};i!==x?p(i):(p(""),e.setFieldsValue(l),g({operation:m.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:l}))};return(0,u.jsx)(l.A.Item,{name:"valign",children:(0,u.jsx)(d.Ay.Group,{disabled:b,children:(0,u.jsxs)(s.A,{size:8,children:[(0,u.jsx)(r.A,{placement:"bottom",title:h("Align top"),children:(0,u.jsx)(d.Ay.Button,{value:"top",onClick:f,children:(0,u.jsx)(n.A,{icon:"AlignVerticalTop"})})}),(0,u.jsx)(r.A,{placement:"bottom",title:h("Center vertically"),children:(0,u.jsx)(d.Ay.Button,{value:"middle",onClick:f,children:(0,u.jsx)(n.A,{icon:"AlignVerticalCenter"})})}),(0,u.jsx)(r.A,{placement:"bottom",title:h("Align bottom"),children:(0,u.jsx)(d.Ay.Button,{value:"bottom",onClick:f,children:(0,u.jsx)(n.A,{icon:"AlignVerticalBottom"})})})]})})})}},34275:(e,o,t)=>{t.d(o,{A:()=>a});t(92810);var i=t(38883),l=t.n(i),d=t(3185),s=(t(37981),t(70082));const r=({className:e,selectedElement:o,formSettings:t,emailElementType:i})=>(0,s.jsx)("div",{className:l()("selected-element-panel",{[e]:e}),style:{height:"100%"},children:(0,s.jsx)(d.A,{className:l()("selected-element-panel__content SelectedElementPanel",{"column-settings-show":!!o.floatBlocks&&o.floatBlocks.items.length>1}),emailElementType:i,formSettings:t})});r.defaultProps={className:null,selectedElement:{parent:!1}};const a=r},3185:(e,o,t)=>{t.d(o,{A:()=>Qo});var i=t(92810),l=t(99215),d=t(38883),s=t.n(d),r=t(45934),a=t(65983),n=t(7760),m=t(64617),c=t(95838),u=t(12280),b=t(66726),h=t(29234),g=t(2018),x=t(7744),p=t(71086),f=t(43005),A=t(79579),j=t(81e3),v=t(55039),B=t(7228),S=t(62767),_=t(11007),R=t(54316),k=t(4815),y=t(6890),w=t(14523),P=t.n(w),N=t(49343),T=t(21519),E=t(71495),I=t(20984),C=t(23287),L=t(62303),O=t(85163),F=t(45695),V=t(70082);const D=({form:e,elementSettings:o,imgParent:t,name:l="align"})=>{const{__:d}=(0,C.s9)(),s=(0,F.XW)(),[r,a]=(0,i.useState)(o[l]),n=t=>{const i=t.target.value,d={[l]:""};i!==r?a(i):(a(""),e.setFieldsValue(d),s({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:d}))};return(0,V.jsx)(u.A.Item,{name:l,children:(0,V.jsx)(I.Ay.Group,{disabled:t&&!o.parent,children:(0,V.jsxs)(j.A,{size:8,children:[(0,V.jsx)(b.A,{placement:"bottom",title:d("Align left"),children:(0,V.jsx)(I.Ay.Button,{value:"left",onClick:n,children:(0,V.jsx)(L.A,{icon:"AlignHorizontalLeft"})})}),(0,V.jsx)(b.A,{placement:"bottom",title:d("Center horizontally"),children:(0,V.jsx)(I.Ay.Button,{value:"center",onClick:n,children:(0,V.jsx)(L.A,{icon:"AlignHorizontalCenter"})})}),(0,V.jsx)(b.A,{placement:"bottom",title:d("Align right "),children:(0,V.jsx)(I.Ay.Button,{value:"right",onClick:n,children:(0,V.jsx)(L.A,{icon:"AlignHorizontalRight"})})})]})})})};D.defaultProps={imgParent:!1};const M=D;var W=t(26021),X=t(37005),H=t(29258),z=t(44997),G=t(26238);const U=()=>{const{__:e}=(0,C.s9)(),o=(0,r.d4)(a.uJ);return(0,V.jsx)(V.Fragment,{children:(0,V.jsxs)(g.A,{gutter:10,children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{placement:"bottom",title:e("Horizontal offset"),children:(0,V.jsx)(u.A.Item,{name:"boxShadowHOffset",className:"form-item-margin-xs",children:(0,V.jsx)(z.A,{placeholder:e("Horizontal offset"),prefix:(0,V.jsx)(H.A,{}),addonAfter:"px"})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{placement:"bottom",title:e("Vertical offset"),children:(0,V.jsx)(u.A.Item,{name:"boxShadowVOffset",className:"form-item-margin-xs",children:(0,V.jsx)(z.A,{placeholder:e("Vertical offset"),prefix:(0,V.jsx)(L.A,{icon:"VerticalOffset"}),addonAfter:"px"})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{placement:"bottom",title:e("Blur radius"),children:(0,V.jsx)(u.A.Item,{name:"boxShadowBlurRadius",className:"form-item-margin-xs",children:(0,V.jsx)(z.A,{min:0,placeholder:e("Blur radius"),prefix:(0,V.jsx)(L.A,{icon:"Blur",style:{fontSize:16,marginLeft:-2}}),addonAfter:"px"})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{placement:"bottom",title:e("Spread radius"),children:(0,V.jsx)(u.A.Item,{name:"boxShadowSpreadRadius",className:"form-item-margin-xs",children:(0,V.jsx)(z.A,{placeholder:e("Spread radius"),prefix:(0,V.jsx)(L.A,{icon:"ZoomOutMap"}),addonAfter:"px"})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(j.A,{size:10,align:"start",children:(0,V.jsx)(u.A.Item,{name:"boxShadowColor",children:(0,V.jsx)(G.A,{usedColors:o.usedColors})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{title:e("Shadow inside or outside of the element"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"boxShadowInset",valuePropName:"value",children:(0,V.jsx)(X.A,{style:{width:"100%"},options:[{label:e("Outside"),value:!1},{label:e("Inside"),value:!0}]})})},"inset")})]})})};var Y=t(81662),q=t(8701);const{Option:$}=Y.A,K=(0,V.jsxs)(Y.A,{className:"select-after",getPopupContainer:e=>e.parentNode,children:[(0,V.jsx)($,{value:"px",children:"px"}),(0,V.jsx)($,{value:"%",children:"%"})]}),{useToken:J}=c.A,Z=({form:e,name:o,elementSettings:t,isPicture:l})=>{var d;const{__:s}=(0,C.s9)(),r=(0,F.XW)(),a=(0,i.useRef)(),n=(0,i.useRef)(),[m,c]=(0,i.useState)("auto"===(null===(d=t[o])||void 0===d?void 0:d.value)),{token:b}=J(),[h,g]=(0,i.useState)("");return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(u.A.Item,{name:o,style:{marginBottom:b.formItemMarginBottomXS/2},children:(0,V.jsx)(z.A,{ref:a,min:0,max:h,placeholder:s("Width"),onChange:t=>{c(!1),g("%"===e.getFieldsValue(!0)[o+"Dim"]?100:"")},prefix:(0,V.jsx)(S.A,{}),addonAfter:(0,V.jsx)(u.A.Item,{name:o+"Dim",noStyle:!0,children:K})})}),!l&&(0,V.jsxs)(j.A,{size:8,align:"end",children:[(0,V.jsx)(q.A,{ref:n,size:"small",checked:m,onChange:i=>{a.current.value=null,e.setFieldsValue({[o]:"",[o+"Dim"]:"px"}),c((e=>!e)),r({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:{[o]:{classNamePrefix:"em-mob-width-",value:m?null:"auto",dim:""}}})},id:"auto-width"}),(0,V.jsx)("div",{className:"ant-form-item-switch-label-small",style:{position:"relative",top:2},children:(0,V.jsx)("label",{htmlFor:"auto-width",children:s("Auto")})})]})]})};var Q=t(95955),ee=t(78159),oe=t(38587),te=t(12751),ie=t(14473),le=t(37822),de=t(68285),se=t(57032),re=t(26461),ae=t(69118),ne=t(10930);const{useToken:me}=c.A,ce=({mobileBorders:e})=>{const{__:o}=(0,C.s9)(),t=(0,r.d4)(a.uJ),i=e=>(null===e||void 0===e?void 0:e.width)||(null===e||void 0===e?void 0:e.style)||(null===e||void 0===e?void 0:e.color),{token:l}=me();return(0,V.jsxs)(g.A,{gutter:30,children:[(0,V.jsxs)(x.A,{span:12,className:"selected-td-form__border-col",children:[(0,V.jsx)(u.A.Item,{name:"mobileBorderColor",className:"form-item-margin-xs",children:(0,V.jsx)(G.A,{usedColors:t.usedColors})}),(0,V.jsx)(u.A.Item,{name:"mobileBorderWidth",className:"form-item-margin-xs",children:(0,V.jsx)(ee.A,{min:0,placeholder:o("Border width"),addonAfter:"px"})}),(0,V.jsx)(u.A.Item,{name:"mobileBorderStyle",className:"form-item-margin-xs",children:(0,V.jsx)(I.Ay.Group,{children:(0,V.jsxs)(j.A,{size:8,children:[(0,V.jsx)(b.A,{placement:"bottom",title:o("None"),children:(0,V.jsx)(I.Ay.Button,{value:"",children:(0,V.jsx)(oe.A,{})})}),(0,V.jsx)(b.A,{placement:"bottom",title:o("Solid"),children:(0,V.jsx)(I.Ay.Button,{value:"solid",children:(0,V.jsx)(te.A,{})})}),(0,V.jsx)(b.A,{placement:"bottom",title:o("Dashed"),children:(0,V.jsx)(I.Ay.Button,{value:"dashed",children:(0,V.jsx)(ie.A,{})})}),(0,V.jsx)(b.A,{placement:"bottom",title:o("Dotted"),children:(0,V.jsx)(I.Ay.Button,{value:"dotted",children:(0,V.jsx)(le.A,{})})})]})})})]}),(0,V.jsx)(x.A,{span:12,style:{textAlign:"center"},children:(0,V.jsx)(u.A.Item,{label:"",name:"mobileBorderPosition",labelCol:{span:8},children:(0,V.jsx)(I.Ay.Group,{children:(0,V.jsxs)(j.A,{size:l.formItemMarginBottomXS,direction:"vertical",children:[(0,V.jsx)(g.A,{children:(0,V.jsx)(b.A,{placement:"top",title:o("Above"),children:(0,V.jsx)(I.Ay.Button,{value:"top",style:{margin:"auto"},className:s()("",{"selected-td-form__border-radio":i(null===e||void 0===e?void 0:e.top)}),children:(0,V.jsx)(de.A,{})})})}),(0,V.jsx)(g.A,{children:(0,V.jsxs)(j.A,{size:l.formItemMarginBottomXS,children:[(0,V.jsx)(b.A,{placement:"left",title:o("On the left"),children:(0,V.jsx)(I.Ay.Button,{value:"left",className:s()("",{"selected-td-form__border-radio":i(null===e||void 0===e?void 0:e.left)}),children:(0,V.jsx)(se.A,{})})}),(0,V.jsx)(b.A,{placement:"top",title:o("Around"),children:(0,V.jsx)(I.Ay.Button,{value:"all",className:s()("",{"selected-td-form__border-radio":i(null===e||void 0===e?void 0:e.all)}),children:(0,V.jsx)(re.A,{})})}),(0,V.jsx)(b.A,{placement:"right",title:o("On the right"),children:(0,V.jsx)(I.Ay.Button,{value:"right",className:s()("",{"selected-td-form__border-radio":i(null===e||void 0===e?void 0:e.right)}),children:(0,V.jsx)(ae.A,{})})})]})}),(0,V.jsx)(g.A,{children:(0,V.jsx)(b.A,{placement:"bottom",title:o("Below"),children:(0,V.jsx)(I.Ay.Button,{value:"bottom",className:s()("",{"selected-td-form__border-radio":i(null===e||void 0===e?void 0:e.bottom)}),style:{margin:"auto"},children:(0,V.jsx)(ne.A,{})})})})]})})})})]})};var ue=t(1728),be=t(82051),he=t(11696),ge=t(87042),xe=t(88647);const pe=({form:e,oneMobileBorderRadiusValue:o,setOneMobileBorderRadiusValue:t})=>{const{__:i}=(0,C.s9)();return(0,V.jsxs)(g.A,{gutter:10,children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(j.A,{size:10,align:"start",children:(0,V.jsx)(u.A.Item,{name:"mobileBorderRadiusAll",children:(0,V.jsx)(z.A,{min:0,placeholder:i("Border radius"),prefix:(0,V.jsx)(xe.h,{className:"selected-td-form__icon-radius"}),disabled:!o,addonAfter:"px"})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button",{"selected-td-form__button--active":!o}),onClick:()=>{const i=e.getFieldsValue(!0);o&&e.setFieldsValue({mobileRadiusTopLeft:i.mobileBorderRadiusAll,mobileRadiusBottomLeft:i.mobileBorderRadiusAll,mobileRadiusTopRight:i.mobileBorderRadiusAll,mobileRadiusBottomRight:i.mobileBorderRadiusAll}),t((e=>!e))},children:(0,V.jsx)(xe.h,{className:"selected-td-form__icon-radius"})})}),(0,V.jsx)(x.A,{children:(0,V.jsxs)(g.A,{gutter:10,style:{marginTop:-10},children:[(0,V.jsxs)(x.A,{span:12,children:[(0,V.jsx)(b.A,{placement:"bottom",title:i("Top left corner"),children:(0,V.jsx)(u.A.Item,{hidden:o,name:"mobileRadiusTopLeft",className:"form-item-margin-xs",children:(0,V.jsx)(z.A,{min:0,prefix:(0,V.jsx)(ue.A,{}),style:{minHeight:10},addonAfter:"px"})})}),(0,V.jsx)(b.A,{placement:"bottom",title:i("Bottom left corner"),children:(0,V.jsx)(u.A.Item,{hidden:o,name:"mobileRadiusBottomLeft",children:(0,V.jsx)(z.A,{min:0,prefix:(0,V.jsx)(be.A,{}),style:{minHeight:10},addonAfter:"px"})})})]}),(0,V.jsxs)(x.A,{span:12,children:[(0,V.jsx)(b.A,{placement:"bottom",title:i("Top right corner"),children:(0,V.jsx)(u.A.Item,{hidden:o,name:"mobileRadiusTopRight",className:"form-item-margin-xs",children:(0,V.jsx)(z.A,{min:0,prefix:(0,V.jsx)(he.A,{}),style:{minHeight:10},addonAfter:"px"})})}),(0,V.jsx)(b.A,{placement:"bottom",title:i("Bottom right corner"),children:(0,V.jsx)(u.A.Item,{hidden:o,name:"mobileRadiusBottomRight",children:(0,V.jsx)(z.A,{min:0,prefix:(0,V.jsx)(ge.A,{}),style:{minHeight:10},addonAfter:"px"})})})]})]})})]})},fe=({form:e,elementSettings:o})=>{const{__:t}=(0,C.s9)(),l=(0,i.useRef)(),d=(0,r.d4)(a.uJ),[s,n]=(0,i.useState)(!o.mobileBoxShadow||0===o.mobileBoxShadow.hOffset&&0===o.mobileBoxShadow.vOffset&&0===o.mobileBoxShadow.blurRadius&&0===o.mobileBoxShadow.spreadRadius&&0===o.mobileBoxShadow.spreadRadius),m=(0,F.XW)(),c=e=>{n(!1)};return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("div",{style:{float:"right",marginTop:-9,marginRight:50},children:(0,V.jsxs)(j.A,{size:8,align:"end",children:[(0,V.jsx)(q.A,{ref:l,size:"small",checked:s,onChange:t=>{n((e=>!e)),e.setFieldsValue({mobileBoxShadowHOffset:s?"":0,mobileBoxShadowVOffset:s?"":0,mobileBoxShadowBlurRadius:s?"":0,mobileBoxShadowSpreadRadius:s?"":0,mobileBoxShadowColor:"",mobileBoxShadowInset:!1}),m({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:{mobileBoxShadow:{classNamePrefix:"em-mob-box_shadow-",hOffset:s?null:0,vOffset:s?null:0,blurRadius:s?null:0,spreadRadius:s?null:0,color:null,inset:!1}}})},id:"without-shadow"}),(0,V.jsx)("div",{className:"ant-form-item-switch-label-small",style:{position:"relative",top:2},children:(0,V.jsx)("label",{htmlFor:"without-shadow",children:t("Without shadow")})})]})}),(0,V.jsx)("p",{style:{paddingBottom:"8px",margin:"-30px 0 0"},children:"\xa0"}),(0,V.jsxs)(g.A,{gutter:10,children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{placement:"bottom",title:t("Horizontal offset"),children:(0,V.jsx)(u.A.Item,{name:"mobileBoxShadowHOffset",className:"form-item-margin-xs",children:(0,V.jsx)(z.A,{min:0,placeholder:t("Horizontal offset"),prefix:(0,V.jsx)(H.A,{}),addonAfter:"px",onChange:c})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{placement:"bottom",title:t("Vertical offset"),children:(0,V.jsx)(u.A.Item,{name:"mobileBoxShadowVOffset",className:"form-item-margin-xs",children:(0,V.jsx)(z.A,{min:0,placeholder:t("Vertical offset"),prefix:(0,V.jsx)(H.A,{style:{transform:"rotate(90deg)"}}),addonAfter:"px",onChange:c})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{placement:"bottom",title:t("Blur radius"),children:(0,V.jsx)(u.A.Item,{name:"mobileBoxShadowBlurRadius",className:"form-item-margin-xs",children:(0,V.jsx)(z.A,{min:0,placeholder:t("Blur radius"),prefix:(0,V.jsx)(L.A,{icon:"Blur",style:{fontSize:16,marginLeft:-2}}),addonAfter:"px",onChange:c})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{placement:"bottom",title:t("Spread radius"),children:(0,V.jsx)(u.A.Item,{name:"mobileBoxShadowSpreadRadius",className:"form-item-margin-xs",children:(0,V.jsx)(z.A,{placeholder:t("Spread radius"),prefix:(0,V.jsx)(L.A,{icon:"ZoomOutMap"}),addonAfter:"px",onChange:c})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(j.A,{size:10,align:"start",children:(0,V.jsx)(u.A.Item,{name:"mobileBoxShadowColor",children:(0,V.jsx)(G.A,{usedColors:d.usedColors})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{title:t("Shadow inside or outside of the element"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"mobileBoxShadowInset",valuePropName:"checked",children:(0,V.jsx)(X.A,{style:{width:"100%"},options:[{label:t("Outside"),value:!1},{label:t("Inside"),value:!0}]})})},"inset")})]})]})},Ae=({form:e,elementSettings:o,imgParent:t,name:l="mobileAlign"})=>{var d;const{__:s}=(0,C.s9)(),[r,a]=(0,i.useState)(null===(d=o[l])||void 0===d?void 0:d.value),n=(0,F.XW)(),m=t=>{const i=t.target.value,d={[l]:{classNamePrefix:"em-mob-text_align-",value:""}};i!==r?a(i):(a(""),e.setFieldsValue(d),n({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:d}))};return(0,V.jsx)(u.A.Item,{name:l,children:(0,V.jsx)(I.Ay.Group,{disabled:t&&!o.parent,children:(0,V.jsxs)(j.A,{size:8,children:[(0,V.jsx)(b.A,{placement:"bottom",title:s("Align left"),children:(0,V.jsx)(I.Ay.Button,{value:"left",onClick:m,children:(0,V.jsx)(L.A,{icon:"AlignHorizontalLeft"})})}),(0,V.jsx)(b.A,{placement:"bottom",title:s("Center horizontally"),children:(0,V.jsx)(I.Ay.Button,{value:"center",onClick:m,children:(0,V.jsx)(L.A,{icon:"AlignHorizontalCenter"})})}),(0,V.jsx)(b.A,{placement:"bottom",title:s("Align right "),children:(0,V.jsx)(I.Ay.Button,{value:"right",onClick:m,children:(0,V.jsx)(L.A,{icon:"AlignHorizontalRight"})})}),(0,V.jsx)(b.A,{placement:"bottom",title:s("Text align justify"),children:(0,V.jsx)(I.Ay.Button,{value:"justify",onClick:m,children:(0,V.jsx)(L.A,{icon:"Justify"})})})]})})})};Ae.defaultProps={imgParent:!1};const je=Ae,ve=({form:e,elementSettings:o,tooltipTitle:t})=>{var l;const{__:d}=(0,C.s9)(),[s,r]=(0,i.useState)(null===(l=o.mobileVerticalAlign)||void 0===l?void 0:l.value),a=(0,F.XW)(),n=t=>{const i=t.target.value,l={mobileVerticalAlign:{classNamePrefix:"em-mob-vertical_align",value:""}};i!==s?r(i):(r(""),e.setFieldsValue(l),a({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:l}))};return(0,V.jsx)(u.A.Item,{name:"mobileVerticalAlign",children:(0,V.jsx)(I.Ay.Group,{children:(0,V.jsxs)(j.A,{size:8,children:[(0,V.jsx)(b.A,{placement:"bottom",title:d("Align top"),children:(0,V.jsx)(I.Ay.Button,{value:"top",onClick:n,children:(0,V.jsx)(L.A,{icon:"AlignVerticalTop"})})}),(0,V.jsx)(b.A,{placement:"bottom",title:d("Center vertically"),children:(0,V.jsx)(I.Ay.Button,{value:"middle",onClick:n,children:(0,V.jsx)(L.A,{icon:"AlignVerticalCenter"})})}),(0,V.jsx)(b.A,{placement:"bottom",title:d("Align bottom"),children:(0,V.jsx)(I.Ay.Button,{value:"bottom",onClick:n,children:(0,V.jsx)(L.A,{icon:"AlignVerticalBottom"})})})]})})})};var Be=t(68912),Se=t(50295);const _e=({form:e,elementSettings:o})=>{const{__:t}=(0,C.s9)();return(0,V.jsx)(u.A.Item,{name:"show",children:(0,V.jsx)(I.Ay.Group,{children:(0,V.jsxs)(j.A,{size:8,children:[(0,V.jsx)(I.Ay.Button,{value:"all",children:t("Both")}),(0,V.jsx)(b.A,{placement:"top",title:t("Desktop"),children:(0,V.jsx)(I.Ay.Button,{value:"desktop",children:(0,V.jsx)(Be.A,{})})}),(0,V.jsx)(b.A,{placement:"top",title:t("Mobile"),children:(0,V.jsx)(I.Ay.Button,{value:"mobile",children:(0,V.jsx)(Se.A,{})})})]})})})};_e.defaultProps={};const Re=_e;var ke=t(94104),ye=t(7166),we=t(6391),Pe=t(69372);const{useToken:Ne}=c.A,Te=({form:e,elementSettings:o,handleChangeValues:t})=>{const{__:l}=(0,C.s9)(),d=(0,i.useRef)(),{token:r}=Ne(),[a,n]=(0,i.useState)(!1),[m,c]=(0,i.useState)(!1),[h,p]=(0,i.useState)(!1),[A,v]=(0,i.useState)(!1),[B,S]=(0,i.useState)(!1);(0,i.useEffect)((()=>{let e=new URL("https://emailmaker.ru/?"+o.countdown);n(e.searchParams.get("font1").endsWith("-b")||e.searchParams.get("font1").endsWith("-bi")),c(e.searchParams.get("font1").endsWith("-i")||e.searchParams.get("font1").endsWith("-bi")),p(e.searchParams.get("font2").endsWith("-b")||e.searchParams.get("font2").endsWith("-bi")),v(e.searchParams.get("font2").endsWith("-i")||e.searchParams.get("font2").endsWith("-bi")),S("true"===e.searchParams.get("tp"))}),[o]);const _=[{value:"-12",label:l("-12:00 Apia")},{value:"-11",label:l("-11:00 Pago Pago, Midway Atoll")},{value:"-10",label:l("-10:00 Honolulu, Anchorage")},{value:"-9",label:l("-9:00 Anchorage, Yukon")},{value:"-8",label:l("-8:00 Los Angeles, Vancouver")},{value:"-7",label:l("-7:00 Denver, Phoenix")},{value:"-6",label:l("-6:00 Mexico City, Guadalajara")},{value:"-5",label:l("-5:00 New York, Toronto, Havana")},{value:"-4",label:l("-4:00 Caracas, Santo Domingo")},{value:"-3",label:l("-3:00 Buenos Aires, Santiago, Montevideo")},{value:"-2",label:l("-2:00 South Georgia, Saint Helena")},{value:"-1",label:l("-1:00 Azores, Cape Verde")},{value:"0",label:l("+0:00 London, Lisbon, Dublin")},{value:"1",label:l("+1:00 Paris, Berlin, Rome")},{value:"2",label:l("+2:00 Athens, Kiev, Istanbul")},{value:"3",label:l("+3:00 Istanbul, Doha, Baghdad")},{value:"4",label:l("+4:00 Baku, Dubai, Tbilisi")},{value:"5",label:l("+5:00 Karachi, Tashkent, Islamabad")},{value:"6",label:l("+6:00 Almaty, Dhaka, Bishkek")},{value:"7",label:l("+7:00 Bangkok, Ho Chi Minh City, Jakarta")},{value:"8",label:l("+8:00 Beijing, Hong Kong, Singapore")},{value:"9",label:l("+9:00 Tokyo, Seoul, Jayapura")},{value:"10",label:l("+10:00 Sydney, Melbourne, Port Moresby")},{value:"11",label:l("+11:00 Honiara, Nuku'alofa, Apia")}],R=[{value:"20",label:l("20 c")},{value:"40",label:l("40 c")},{value:"60",label:l("60 c")}],k=[{value:"arial",label:"Arial"},{value:"courier-new",label:"Courier New"},{value:"georgia",label:"Georgia"},{value:"helvetica",label:"Helvetica"},{value:"tahoma",label:"Tahoma"},{value:"times-new-roman",label:"Times New Roman"},{value:"trebuchet-ms",label:"Trebuchet MS"},{value:"verdana",label:"Verdana"},{value:"open-sans",label:"Open Sans"},{value:"roboto",label:"Roboto"}],y=e=>{var o;e.target.closest(".ant-picker-dropdown")||(null===(o=d.current)||void 0===o||o.blur())};(0,i.useEffect)((()=>(window.addEventListener("scroll",y,!0),()=>{window.removeEventListener("scroll",y,!0)})));return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(g.A,{gutter:10,children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(u.A.Item,{label:l("End time"),name:"countdownTime",children:(0,V.jsx)(ke.A,{ref:d,format:"DD.MM.YYYY HH:mm",disabledDate:e=>e&&e<P()().endOf("day")-864e5,showTime:!0,getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),allowClear:!1,allowEmpty:!1})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(u.A.Item,{label:l("Time zone"),name:"countdownTimeZone",style:{width:"100%"},children:(0,V.jsx)(Y.A,{placeholder:l("Select the time zone"),getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel"),children:_.map((e=>(0,V.jsx)(Y.A.Option,{value:e.value,children:e.label},e.value)))})})})]}),(0,V.jsxs)(g.A,{gutter:20,children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(u.A.Item,{label:l("Background color"),name:"countdownBackgroundColor",className:"countdown-color",children:(0,V.jsx)(G.A,{placeholder:l("Background color"),isDisabled:B,usedColors:o.usedColors})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsxs)(j.A,{size:10,align:"baseline",style:{paddingTop:29},children:[(0,V.jsx)(u.A.Item,{name:"countdownTransparency",valuePropName:"checked",children:(0,V.jsx)(q.A,{size:"small",id:"countdownTransparency",onChange:e=>{S(e)}})}),(0,V.jsx)("span",{style:{position:"relative",top:2},children:(0,V.jsx)("label",{htmlFor:"countdownTransparency",children:l("Transparency")})})]})})]}),(0,V.jsx)("div",{className:"form-group-title",style:{paddingTop:0,paddingBottom:8},children:l("Countdown font settings")}),(0,V.jsxs)(g.A,{gutter:10,children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(u.A.Item,{name:"countdownNumbersFont",style:{marginBottom:r.formItemMarginBottomXS},children:(0,V.jsx)(Y.A,{getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel"),options:k})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(u.A.Item,{name:"countdownNumbersColor",className:"countdown-color",style:{marginBottom:r.formItemMarginBottomXS},children:(0,V.jsx)(G.A,{usedColors:o.usedColors})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(u.A.Item,{name:"countdownNumbersFontSize",children:(0,V.jsx)(ee.A,{min:12,placeholder:l("Font size"),prefix:(0,V.jsx)(ye.A,{}),addonAfter:"px"})})}),(0,V.jsx)(x.A,{span:3,children:(0,V.jsx)(b.A,{placement:"bottom",title:l("Strong"),children:(0,V.jsx)(u.A.Item,{name:"countdownNumbersStrong",children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":a}),onClick:()=>{const o=!a;e.setFieldValue("countdownNumbersStrong",o),t({countdownNumbersStrong:o}),n(o)},children:(0,V.jsx)(we.A,{className:"selected-td-form__icon-radius"})})})})}),(0,V.jsx)(x.A,{span:3,children:(0,V.jsx)(b.A,{placement:"bottom",title:l("Italic"),children:(0,V.jsx)(u.A.Item,{name:"countdownNumbersItalic",children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":m}),onClick:()=>{const o=!m;e.setFieldValue("countdownNumbersItalic",o),t({countdownNumbersItalic:o}),c(o)},children:(0,V.jsx)(Pe.A,{className:"selected-td-form__icon-radius"})})})})})]}),(0,V.jsx)("div",{className:"form-group-title",style:{paddingTop:0,paddingBottom:8},children:l("Time units font settings")}),(0,V.jsxs)(g.A,{gutter:10,children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(u.A.Item,{name:"countdownLabelsFont",style:{marginBottom:r.formItemMarginBottomXS},children:(0,V.jsx)(Y.A,{getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel"),options:k})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(u.A.Item,{name:"countdownLabelsColor",className:"countdown-color",style:{marginBottom:r.formItemMarginBottomXS},children:(0,V.jsx)(G.A,{usedColors:o.usedColors})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(u.A.Item,{name:"countdownLabelsFontSize",children:(0,V.jsx)(ee.A,{min:8,placeholder:l("Font size"),addonAfter:"px",prefix:(0,V.jsx)(ye.A,{})})})}),(0,V.jsx)(x.A,{span:3,children:(0,V.jsx)(b.A,{placement:"bottom",title:l("Strong"),children:(0,V.jsx)(u.A.Item,{name:"countdownLabelsStrong",children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":h}),onClick:()=>{const o=!h;e.setFieldValue("countdownLabelsStrong",o),t({countdownLabelsStrong:o}),p(o)},children:(0,V.jsx)(we.A,{className:"selected-td-form__icon-radius"})})})})}),(0,V.jsx)(x.A,{span:3,children:(0,V.jsx)(b.A,{placement:"bottom",title:l("Italic"),children:(0,V.jsx)(u.A.Item,{name:"countdownLabelsItalic",children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":A}),onClick:()=>{const o=!A;e.setFieldValue("countdownLabelsItalic",o),t({countdownLabelsItalic:o}),v(o)},children:(0,V.jsx)(Pe.A,{className:"selected-td-form__icon-radius"})})})})})]}),(0,V.jsxs)(g.A,{gutter:10,style:{marginBottom:4},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(u.A.Item,{label:l("Language"),name:"countdownLanguage",style:{width:"100%"},children:(0,V.jsx)(Y.A,{getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel"),options:[{value:"ru_RU",label:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439"},{value:"en_US",label:"English"},{value:"uk_UA",label:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430"},{value:"pt_BR",label:"Portugu\xeas"},{value:"fr-CA",label:"Fran\xe7ais"},{value:"de_DE",label:"Deutsch"},{value:"pl_PL",label:"Polski"},{value:"es_ES",label:"Espa\xf1ol"},{value:"tr_TR",label:"T\xfcrk\xe7e"},{value:"lt_LT",label:"Lietuvi\u0173 kalba"},{value:"lv_LV",label:"Latvie\u0161u valoda"},{value:"et_EE",label:"Eesti keel"},{value:"hu_HU",label:"Magyar"},{value:"el_GR",label:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac"},{value:"it_IT",label:"Italiano"}]})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(u.A.Item,{label:l("Duration"),name:"countdownDuration",style:{width:"100%"},children:(0,V.jsx)(Y.A,{getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel"),options:R})})})]})]})};var Ee=t(85778),Ie=t(85085),Ce=t(13417),Le=t(12108);const{useToken:Oe}=c.A,Fe=({form:e,elementSettings:o})=>{const{__:t}=(0,C.s9)(),{token:i}=Oe();return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(b.A,{trigger:["hover"],title:t("URL of the video clip."),placement:"right",children:(0,V.jsx)(u.A.Item,{name:"videoSource",className:"selected-image-form__alt",children:(0,V.jsx)(v.A,{allowClear:!0,placeholder:t("Video URL"),prefix:(0,V.jsx)(Ee.A,{})})})}),(0,V.jsx)(u.A.Item,{label:t("Play button"),name:"videoPlayButton",style:{width:"100%",marginBottom:i.formItemMarginBottomMD+4},children:(0,V.jsxs)(Y.A,{getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel"),children:[(0,V.jsxs)(Y.A.Option,{value:"youtube_red",children:[(0,V.jsx)(Ie.A,{style:{color:"#FF0000"}})," ",t("Youtube Red")]}),(0,V.jsxs)(Y.A.Option,{value:"youtube_black",children:[(0,V.jsx)(Ie.A,{})," ",t("Youtube Black")]}),(0,V.jsxs)(Y.A.Option,{value:"youtube_white",children:[(0,V.jsx)(Ie.A,{style:{color:"#aaa"}})," ",t("Youtube White")]}),(0,V.jsxs)(Y.A.Option,{value:"vimeo",children:[(0,V.jsx)(L.A,{icon:"Vimeo"})," ",t("Vimeo")]}),(0,V.jsxs)(Y.A.Option,{value:"white_circle",children:[(0,V.jsx)(Ce.A,{style:{color:"#aaa"}})," ",t("White circle")]}),(0,V.jsxs)(Y.A.Option,{value:"black_circle",children:[(0,V.jsx)(Ce.A,{})," ",t("Black circle")]}),(0,V.jsxs)(Y.A.Option,{value:"white_circle_outlined",children:[(0,V.jsx)(Le.A,{style:{color:"#aaa"}})," ",t("White circle outlined")]}),(0,V.jsxs)(Y.A.Option,{value:"black_circle_outlined",children:[(0,V.jsx)(Le.A,{})," ",t("Black circle outlined")]}),(0,V.jsxs)(Y.A.Option,{value:"none",children:[" ",t("Without button")]})]})})]})},Ve=()=>{const{__:e}=(0,C.s9)();return(0,V.jsx)(u.A.Item,{name:"ampShow",children:(0,V.jsx)(I.Ay.Group,{children:(0,V.jsxs)(j.A,{size:8,children:[(0,V.jsx)(I.Ay.Button,{value:"all",children:e("Both")}),(0,V.jsx)(b.A,{placement:"top",title:e("AMP"),children:(0,V.jsx)(I.Ay.Button,{value:"amp",children:"AMP"})}),(0,V.jsx)(b.A,{placement:"top",title:e("HTML"),children:(0,V.jsx)(I.Ay.Button,{value:"html",children:"HTML"})})]})})})};Ve.defaultProps={};const De=Ve;var Me=t(64037),We=t(63531),Xe=t(64936),He=t(47358),ze=t(86286),Ge=t(77532),Ue=t(56991),Ye=t(71157),qe=t(32269),$e=t(47520),Ke=t(18398);t(37981);const{useToken:Je}=c.A,Ze=({elementSettings:e})=>{const{__:o}=(0,C.s9)(),{token:t}=Je(),[l]=u.A.useForm();let d=(0,r.wA)();const a=(0,Ue.rD)(),{projectId:n}=(0,m.g)(),c=(0,Ye.hN)(),w=(0,F.XW)(),I=(0,F.K9)(),D=(0,r.d4)(He.Ct),X=(0,r.d4)(He.CS),H=(0,r.d4)(ze.C1),G=(0,r.d4)(He.Fv),Y=(0,r.d4)(He.yy),[q]=(0,We.dS)(),[$,K]=(0,We.tb)(),J=(0,i.useRef)(null),ee=(0,i.useRef)(null),oe=(0,i.useRef)(null),te=(0,i.useRef)(null),ie=(0,i.useRef)(null),le=(0,i.useRef)(null),de=(0,i.useRef)(null),se=(0,i.useRef)(null),re=(0,i.useRef)(null),[ae,ne]=(0,i.useState)({}),[me,ue]=(0,i.useState)({}),[be,he]=(0,i.useState)({}),[ge,xe]=(0,i.useState)({}),[Ae,Be]=(0,i.useState)(!0),[Se,_e]=(0,i.useState)(!0),[ke,ye]=(0,i.useState)(""),[we,Pe]=(0,i.useState)(""),[Ne,Ee]=(0,i.useState)(""),[Ie,Ce]=(0,i.useState)(!1),[Le,Oe]=(0,i.useState)(!1),[Ve,Ze]=(0,i.useState)(!1),[Qe,eo]=(0,i.useState)(!1),[oo,to]=(0,i.useState)(!1),[io,lo]=(0,i.useState)(!1),[so,ro]=(0,i.useState)(!1),[ao,no]=(0,i.useState)(!1),[mo,co]=(0,i.useState)("https://"),[uo,bo]=(0,i.useState)(),[ho,go]=(0,i.useState)(!1),[xo,po]=(0,i.useState)(null),[fo,Ao]=(0,i.useState)({start:0,end:0}),[jo,vo]=(0,i.useState)(!1),[Bo,So]=(0,i.useState)(!1),_o=G&&"bottom"!==Y;(0,i.useEffect)((()=>{ho&&re.current&&re.current.focus()}),[ho]);const Ro=(0,r.d4)(Ke.GH);(0,i.useEffect)((()=>{var e;null!==Ro&&void 0!==Ro&&null!==(e=Ro.items)&&void 0!==e&&e.length&&bo((0,Ue.cM)(Ro.items,o,((e,o)=>{go(!1),I(O.Ru.SANDBOX_ADD_MERGETAG,e),o.stopPropagation(),o.preventDefault()})))}),[Ro,bo,o,go,I]);(0,i.useEffect)((()=>{const e=({target:e})=>{e.closest('[id="merge_tags_wrapper"]')||po(e)},o=({target:e})=>{e.closest(".merge-tags")||e.closest("#merge_tags_button")||go(!1)};return window.addEventListener("focusin",e),window.addEventListener("click",o),()=>{window.removeEventListener("focusin",e),window.addEventListener("click",o)}}),[]);const ko=({target:e})=>{if(e&&!jo){const{selectionStart:o,selectionEnd:t}=e;Ao({start:o,end:t})}vo(!1)};(0,i.useEffect)((()=>{if(e){var o,t,i,d,s,r,a,n,m,c,u,b,h,g,x,p,f,A,j,v,B,S,_,R,k,y,w,N,T,E,I,C,L;const V=e.border,D=e.mobileBorder,M=e.boxShadow,W=e.mobileBoxShadow;ne(V),ue(D),he(M),xe(W);const X=Object.keys(V).find((e=>{var o,t,i;return(null===(o=V[e])||void 0===o?void 0:o.width)||(null===(t=V[e])||void 0===t?void 0:t.style)||(null===(i=V[e])||void 0===i?void 0:i.color)})),H=Object.keys(D).find((e=>{var o,t,i;return(null===(o=D[e])||void 0===o?void 0:o.width)||(null===(t=D[e])||void 0===t?void 0:t.style)||(null===(i=D[e])||void 0===i?void 0:i.color)}));if(e.link&&co((0,$e.TW)(e.link,"https://")),l.setFieldsValue({...e,link:e.link?e.link:"https://",width:null===(o=e.width)||void 0===o?void 0:o.value,widthDim:null===(t=e.width)||void 0===t?void 0:t.dim,height:null===(i=e.height)||void 0===i?void 0:i.value,heightDim:null===(d=e.height)||void 0===d?void 0:d.dim,borderPosition:X||"all",borderWidth:null!==(null===(s=V[X])||void 0===s?void 0:s.width)?null===(r=V[X])||void 0===r?void 0:r.width:"",borderColor:(null===(a=V[X])||void 0===a?void 0:a.color)||"",borderStyle:(null===(n=V[X])||void 0===n?void 0:n.style)||"",borderRadiusAll:(0,$e.ok)(e.borderRadius.all),borderRadiusTopLeft:(0,$e.ok)(e.borderRadius.topLeft),borderRadiusBottomLeft:(0,$e.ok)(e.borderRadius.bottomLeft),borderRadiusTopRight:(0,$e.ok)(e.borderRadius.topRight),borderRadiusBottomRight:(0,$e.ok)(e.borderRadius.bottomRight),boxShadowInset:(0,$e.ok)(null===(m=e.boxShadow)||void 0===m?void 0:m.inset)||!1,boxShadowHOffset:(0,$e.ok)(null===(c=e.boxShadow)||void 0===c?void 0:c.hOffset),boxShadowVOffset:(0,$e.ok)(null===(u=e.boxShadow)||void 0===u?void 0:u.vOffset),boxShadowBlurRadius:(0,$e.ok)(null===(b=e.boxShadow)||void 0===b?void 0:b.blurRadius),boxShadowSpreadRadius:(0,$e.ok)(null===(h=e.boxShadow)||void 0===h?void 0:h.spreadRadius),boxShadowColor:(0,$e.ok)(null===(g=e.boxShadow)||void 0===g?void 0:g.color),mobileWidth:(0,$e.xc)(null===(x=e.mobileWidth)||void 0===x?void 0:x.value),mobileWidthDim:null===(p=e.mobileWidth)||void 0===p?void 0:p.dim,mobileHeight:(0,$e.xc)(null===(f=e.mobileHeight)||void 0===f?void 0:f.value),mobileHeightDim:null===(A=e.mobileHeight)||void 0===A?void 0:A.dim,mobileBorderPosition:H||"all",mobileBorderWidth:null!==(null===(j=D[H])||void 0===j?void 0:j.width)?null===(v=D[H])||void 0===v?void 0:v.width:"",mobileBorderColor:(null===(B=D[H])||void 0===B?void 0:B.color)||"",mobileBorderStyle:(null===(S=D[H])||void 0===S?void 0:S.style)||"",mobileBorderRadiusAll:(0,$e.ok)(e.mobileBorderRadius.all),mobileRadiusTopLeft:(0,$e.ok)(null!==e.mobileBorderRadius.topLeft?e.mobileBorderRadius.topLeft:e.mobileBorderRadius.all),mobileRadiusBottomLeft:(0,$e.ok)(null!==e.mobileBorderRadius.bottomLeft?e.mobileBorderRadius.bottomLeft:e.mobileBorderRadius.all),mobileRadiusTopRight:(0,$e.ok)(null!==e.mobileBorderRadius.topRight?e.mobileBorderRadius.topRight:e.mobileBorderRadius.all),mobileRadiusBottomRight:(0,$e.ok)(null!==e.mobileBorderRadius.bottomRight?e.mobileBorderRadius.bottomRight:e.mobileBorderRadius.all),mobileBoxShadowInset:(0,$e.ok)(null===(_=e.mobileBoxShadow)||void 0===_?void 0:_.inset)||!1,mobileBoxShadowHOffset:(0,$e.ok)(null===(R=e.mobileBoxShadow)||void 0===R?void 0:R.hOffset),mobileBoxShadowVOffset:(0,$e.ok)(null===(k=e.mobileBoxShadow)||void 0===k?void 0:k.vOffset),mobileBoxShadowBlurRadius:(0,$e.ok)(null===(y=e.mobileBoxShadow)||void 0===y?void 0:y.blurRadius),mobileBoxShadowSpreadRadius:(0,$e.ok)(null===(w=e.mobileBoxShadow)||void 0===w?void 0:w.spreadRadius),mobileBoxShadowColor:(0,$e.ok)(null===(N=e.mobileBoxShadow)||void 0===N?void 0:N.color),mobileAlign:(0,$e.ok)(null===(T=e.mobileAlign)||void 0===T?void 0:T.value),mobileVerticalAlign:(0,$e.ok)(null===(E=e.mobileVerticalAlign)||void 0===E?void 0:E.value),show:e.show?e.show:"all",altSrc:e.src}),e.countdown){let o=new URL("https://emailmaker.ru/?"+e.countdown),t=o.searchParams.get("font1"),i=!1,d=!1;t.endsWith("-b")?(t=t.substring(0,t.length-2),i=!0):t.endsWith("-i")?(t=t.substring(0,t.length-2),d=!0):t.endsWith("-bi")&&(t=t.substring(0,t.length-3),i=!0,d=!0);let s=o.searchParams.get("font2"),r=!1,a=!1;s.endsWith("-b")?(s=s.substring(0,s.length-2),r=!0):s.endsWith("-i")?(s=s.substring(0,s.length-2),a=!0):s.endsWith("-bi")&&(s=s.substring(0,s.length-3),r=!0,a=!0),l.setFieldsValue({countdownTime:P()(new Date(Date.parse(o.searchParams.get("time"))+36e5*o.searchParams.get("timezone")+(new Date).getTimezoneOffset()/60*36e5).toISOString()),countdownDuration:o.searchParams.get("frames")||20,countdownTimeZone:o.searchParams.get("timezone"),countdownLanguage:o.searchParams.get("locale").replace("-","_"),countdownBackgroundColor:"#"+o.searchParams.get("bg"),countdownTransparency:"true"===o.searchParams.get("tp")?"checked":"",countdownNumbersFont:t,countdownNumbersFontSize:o.searchParams.get("size1")/2,countdownNumbersFontSizeDim:"px",countdownNumbersColor:"#"+o.searchParams.get("color1"),countdownLabelsFont:s,countdownLabelsFontSize:o.searchParams.get("size2")/2,countdownLabelsFontSizeDim:"px",countdownLabelsColor:"#"+o.searchParams.get("color2"),countdownNumbersStrong:i,countdownNumbersItalic:d,countdownLabelsStrong:r,countdownLabelsItalic:a})}var O,F;if(e.video)l.setFieldsValue({videoPlayButton:null!==(O=e.video.playButton)&&void 0!==O?O:"youtube_red",videoSource:null!==(F=e.video.source)&&void 0!==F?F:""});!(0,$e.ok)(e.borderRadius.all)&&((0,$e.ok)(e.borderRadius.topLeft)||(0,$e.ok)(e.borderRadius.bottomLeft)||(0,$e.ok)(e.borderRadius.topRight)||(0,$e.ok)(e.borderRadius.bottomRight))?Be(!1):Be(!0),(0,$e.ok)(e.mobileBorderRadius.topLeft)||(0,$e.ok)(e.mobileBorderRadius.bottomLeft)||(0,$e.ok)(e.mobileBorderRadius.topRight)||(0,$e.ok)(e.mobileBorderRadius.bottomRight)?_e(!1):_e(!0),Ce(!(null===(I=V[X])||void 0===I||!I.width)),Oe(!(null===(C=D[H])||void 0===C||!C.width)),Ze(!!e.borderRadius.all||!!e.borderRadius.topLeft||!!e.borderRadius.bottomLeft||!!e.borderRadius.topRight||!!e.borderRadius.bottomRight),eo(!!e.mobileBorderRadius.all||!!e.mobileBorderRadius.topLeft||!!e.mobileBorderRadius.bottomLeft||!!e.mobileBorderRadius.topRight||!!e.mobileBorderRadius.bottomRight),to(!!e.boxShadow),lo(!!e.mobileBoxShadow.blurRadius||!!e.mobileBoxShadow.color||!!e.mobileBoxShadow.hOffset||!!e.mobileBoxShadow.inset||!!e.mobileBoxShadow.spreadRadius||!!e.mobileBoxShadow.vOffset),ro(!!e.mobileWidth.value||!!e.mobileHeight.value),ye(e.link),Pe(e.alt),Ee(e.title),So(null===(L=e.imgReplacer)||void 0===L?void 0:L.length)}}),[l,e]);const yo=async(e,o,t)=>{const i={};i.user_id=H.id,i.folder=e,o&&("image/gif"!==o.type&&(o=await(0,y.A)(o,{maxSizeMB:a.compressMaxSize||.45,maxWidthOrHeight:a.compressMaxWidthOrHeight||2e3})),i.file=o),t&&(i.page_url=t);const l=await q(i);var d,s,r;if(l.error)c.fromError("IMAGE_UPLOAD_ERROR",o,l.error,!0);else if(400!==(null===(d=l.data.data)||void 0===d?void 0:d.status))return null===(s=l.data)||void 0===s||null===(r=s[0])||void 0===r?void 0:r.file_url},wo=((e,o)=>{let t;return function(...i){clearTimeout(t),t=setTimeout((()=>{clearTimeout(t),e(...i)}),o)}})((()=>{const o=l.getFieldsValue(!0);let t=new URL("https://cdt3.emcdn.ru/timer/?"+e.countdown),i=o.countdownNumbersFont;o.countdownNumbersStrong&&o.countdownNumbersItalic?i+="-bi":o.countdownNumbersStrong?i+="-b":o.countdownNumbersItalic&&(i+="-i");let d=o.countdownLabelsFont;o.countdownLabelsStrong&&o.countdownLabelsItalic?d+="-bi":o.countdownLabelsStrong?d+="-b":o.countdownLabelsItalic&&(d+="-i"),t.searchParams.set("time",new Date(o.countdownTime.$d-36e5*o.countdownTimeZone-(new Date).getTimezoneOffset()/60*36e5).toISOString()),t.searchParams.set("bg",o.countdownBackgroundColor.substring(1)||"#FFFFFF"),t.searchParams.set("tp",!!o.countdownTransparency),t.searchParams.set("font1",i),t.searchParams.set("size1",2*o.countdownNumbersFontSize||12),t.searchParams.set("color1",o.countdownNumbersColor.substring(1)||"#000000"),t.searchParams.set("font2",d),t.searchParams.set("size2",2*o.countdownLabelsFontSize||8),t.searchParams.set("color2",o.countdownLabelsColor.substring(1)||"#959595"),t.searchParams.set("spacing",Math.round(.4*o.countdownNumbersFontSize)||5),t.searchParams.set("locale",o.countdownLanguage.replace("_","-")),t.searchParams.set("timezone",o.countdownTimeZone),t.searchParams.set("frames",o.countdownDuration),$({link:JSON.stringify({target:t.href})}),no(!0)}),500),Po=(o,...t)=>{const i=l.getFieldsValue(!0),s=Object.keys(o)[0];let r;switch(s){case"link":let e=o[s];"https://http"===e.substring(0,12)&&(e=e.substring(8,e.length),l.setFieldValue("link",e)),r={link:e};break;case"boxShadowInset":case"boxShadowHOffset":case"boxShadowVOffset":case"boxShadowBlurRadius":case"boxShadowSpreadRadius":case"boxShadowColor":r={boxShadow:{hOffset:i.boxShadowHOffset,vOffset:i.boxShadowVOffset,blurRadius:i.boxShadowBlurRadius,spreadRadius:i.boxShadowSpreadRadius,color:i.boxShadowColor,inset:i.boxShadowInset}};break;case"borderStyle":r={border:{[i.borderPosition]:{...ae[i.borderPosition],style:o[s]}}},"all"===i.borderPosition?ne((e=>({...O.iV,[i.borderPosition]:{...e[i.borderPosition],style:o[s]}}))):ne((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],style:o[s]}})));break;case"borderColor":r={border:{[i.borderPosition]:{...ae[i.borderPosition],color:o[s]}}},"all"===i.borderPosition?ne((e=>({...O.iV,[i.borderPosition]:{...e[i.borderPosition],color:o[s]}}))):ne((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],color:o[s]}})));break;case"borderWidth":r={border:{[i.borderPosition]:{...ae[i.borderPosition],width:o[s]}}},"all"===i.borderPosition?ne((e=>({...O.iV,[i.borderPosition]:{...e[i.borderPosition],width:o[s]}}))):ne((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],width:o[s]}})));break;case"borderPosition":l.setFieldsValue({borderWidth:ae[o[s]].width||"",borderColor:ae[o[s]].color||"",borderStyle:ae[o[s]].style||""});break;case"width":r={[s]:{value:o[s],dim:i.widthDim}};break;case"widthDim":r={width:{value:i.width,dim:o[s]}};break;case"height":r={[s]:{value:o[s],dim:i.heightDim}};break;case"heightDim":r={height:{value:i.height,dim:o[s]}};break;case"borderRadiusAll":case"borderRadiusTopLeft":case"borderRadiusBottomLeft":case"borderRadiusTopRight":case"borderRadiusBottomRight":r={borderRadius:{[O.wF[s]]:+o[s]}};break;case"mobileWidth":r={[s]:{classNamePrefix:"em-mob-width-",value:o[s],dim:i.mobileWidthDim}};break;case"mobileWidthDim":r={mobileWidth:{classNamePrefix:"em-mob-width-",value:i.mobileWidth,dim:o[s]}};break;case"mobileHeight":r={[s]:{classNamePrefix:"em-mob-height-",value:o[s],dim:i.mobileHeightDim}};break;case"mobileHeightDim":r={mobileHeight:{classNamePrefix:"em-mob-height-",value:i.mobileHeight,dim:o[s]}};break;case"mobileBorderStyle":r={mobileBorder:{[i.mobileBorderPosition]:{...me[i.mobileBorderPosition],style:o[s],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?ue((e=>({...O.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:o[s],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):ue((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:o[s],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderColor":r={mobileBorder:{[i.mobileBorderPosition]:{...me[i.mobileBorderPosition],color:o[s],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?ue((e=>({...O.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:o[s],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):ue((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:o[s],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderWidth":r={mobileBorder:{[i.mobileBorderPosition]:{...me[i.mobileBorderPosition],width:o[s],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?ue((e=>({...O.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:o[s],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):ue((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:o[s],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderPosition":l.setFieldsValue({mobileBorderWidth:me[o[s]].width||"",mobileBorderColor:me[o[s]].color||"",mobileBorderStyle:me[o[s]].style||""});break;case"mobileBorderRadiusAll":case"mobileRadiusTopLeft":case"mobileRadiusBottomLeft":case"mobileRadiusTopRight":case"mobileRadiusBottomRight":r={mobileBorderRadius:{[$e.NW[s]]:o[s],classNamePrefix:"em-mob-border_radius_"+$e.NW[s]+"-"}};break;case"mobileBoxShadowInset":case"mobileBoxShadowHOffset":case"mobileBoxShadowVOffset":case"mobileBoxShadowBlurRadius":case"mobileBoxShadowSpreadRadius":case"mobileBoxShadowColor":r={mobileBoxShadow:{hOffset:i.mobileBoxShadowHOffset,vOffset:i.mobileBoxShadowVOffset,blurRadius:i.mobileBoxShadowBlurRadius,spreadRadius:i.mobileBoxShadowSpreadRadius,color:i.mobileBoxShadowColor,inset:i.mobileBoxShadowInset,classNamePrefix:"em-mob-box_shadow-"}};break;case"mobileAlign":r={[s]:{classNamePrefix:"em-mob-text_align-",value:o[s]}};break;case"mobileVerticalAlign":r={[s]:{classNamePrefix:"em-mob-vertical_align-",value:o[s]}};break;case"countdownTime":case"countdownTimeZone":case"countdownBackgroundColor":case"countdownNumbersFont":case"countdownNumbersFontSize":case"countdownNumbersColor":case"countdownLabelsFont":case"countdownLabelsFontSize":case"countdownLabelsColor":case"countdownLanguage":case"countdownDuration":case"countdownTransparency":case"countdownNumbersStrong":case"countdownNumbersItalic":case"countdownLabelsStrong":case"countdownLabelsItalic":wo();break;case"videoSource":case"videoPlayButton":(async()=>{const e=l.getFieldsValue(!0);e.videoSource&&yo("tmp",null,e.videoSource).then((o=>{var t=document.createElement("canvas"),i=t.getContext("2d"),l=new Image,s=new Image;let r=o,m="https://emcdn.ru/app/"+e.videoPlayButton+".png";l.crossOrigin="Anonymous",s.crossOrigin="Anonymous";let c=!1,u=!1;l.onload=function(){i.clearRect(0,0,t.width,t.height),i.drawImage(l,0,0,t.width,t.height),c=!0},l.src=r,s.onload=function(){var e=t.width/2-s.width/2,o=t.height/2-s.height/2;i.drawImage(s,e,o,s.width,s.height),u=!0},s.src=m;let b=setInterval((function(){if(c&&u){t.width=Math.max(l.width,s.width),t.height=Math.max(l.height,s.height),i.clearRect(0,0,t.width,t.height),i.drawImage(l,0,0,l.width,l.height);var e=t.width/2-s.width/2,o=t.height/2-s.height/2;i.drawImage(s,e,o,s.width,s.height),t.toBlob((async function(e){const o=await(0,y.A)(new File([e],"image.jpeg",{type:"image/jpeg"}),{maxSizeMB:a.compressMaxSize||.45,maxWidthOrHeight:a.compressMaxWidthOrHeight||2e3});yo(n,o).then((e=>{d((0,Ge.tm)(e))}))}),"image/jpg",1),clearInterval(b)}}),300)}))})(),i.link=i.videoSource,w({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:"video",settings:{video:{source:i.videoSource,playButton:i.videoPlayButton},link:i.link}});break;default:r=o}"borderPosition"!==s&&"mobileBorderPosition"!==s&&-1===s.indexOf("countdown")&&"videoSource"!==s&&"videoPlayButton"!==s&&w({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:r})};(0,i.useEffect)((()=>{K.isError&&((0,qe.p6)(K,c),no(!1))}),[K,c]),(0,i.useEffect)((()=>{if(K.isSuccess&&ao){var o;if(400===(null===(o=K.data.data)||void 0===o?void 0:o.status))c.error({message:(0,V.jsx)("div",{dangerouslySetInnerHTML:{__html:K.data.code}}),description:(0,V.jsx)("div",{dangerouslySetInnerHTML:{__html:K.data.message}}),placement:"bottomRight"});else{let o=new URL(K.data.target),t={countdown:{link:K.data.link,params:o.search.substring(1)}};w({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:t})}no(!1)}}),[K,ao,e,c,w]);(0,Me.A)((o=>{const t=o.data.operation;t===O.Ru.APPLICATION_OPEN_IMAGE_AI_POPUP?(d((0,Ge.tm)(e.src)),d((0,Xe.qf)(O.lx.UPLOAD_IMAGE_MODAL_AI))):t===O.Ru.APPLICATION_OPEN_IMAGE_UPLOAD_POPUP?(d((0,Ge.tm)(e.src)),d((0,Xe.qf)(O.lx.UPLOAD_IMAGE_MODAL_UPLOAD))):t===O.Ru.APPLICATION_OPEN_IMAGE_EDIT_POPUP?(d((0,Ge.tm)(e.src)),d((0,Xe.qf)(O.lx.UPLOAD_IMAGE_MODAL_EDIT))):t===O.Ru.APPLICATION_OPEN_IMAGE_GIF_POPUP?(d((0,Ge.tm)(e.src)),d((0,Xe.qf)(O.lx.UPLOAD_IMAGE_MODAL_GIF))):t===O.Ru.APPLICATION_OPEN_IMAGE_STOCK_POPUP?(d((0,Ge.tm)(e.src)),d((0,Xe.qf)(O.lx.UPLOAD_IMAGE_MODAL_STOCK))):t===O.Ru.APPLICATION_CLOSE_IMAGE_EDIT_POPUP&&(d((0,Xe.Os)()),d((0,Xe.Oo)()))}));const No=()=>{ke?(ye(""),l.setFieldValue("link",""),w({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{link:""}})):(ye(J.current&&J.current.input.value?J.current.input.value:"..."),setTimeout((()=>{J.current.focus()})))},To=e=>{""===e.target.value?ye("..."):(ee.current.classList.add("selected-td-form__button--active"),ye(e.target.value));const o=e.target.value;"https://"===o.substring(0,8)?co("https://"):"mailto:"===o.substring(0,7)?co("mailto:"):"tel:"===o.substring(0,4)?co("tel:"):"sms:"===o.substring(0,4)?co("sms:"):"ftp://"===o.substring(0,6)?co("ftp://"):"skype:"===o.substring(0,6)?co("skype:"):"viber:"===o.substring(0,6)?co("viber:"):co("")},Eo=()=>{const o=l.getFieldsValue(!0);we?(Pe(""),o.alt="",w({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{alt:""}})):(Pe(oe.current&&oe.current.input.value?oe.current.input.value:"..."),setTimeout((()=>{oe.current.focus()})))},Io=e=>{""===e.target.value?Pe("..."):(te.current.classList.add("selected-td-form__button--active"),Pe(e.target.value))},Co=()=>{const o=l.getFieldsValue(!0);Ne?(Ee(""),o.title="",w({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{title:""}})):(Ee(ie.current&&ie.current.input.value?ie.current.input.value:"..."),setTimeout((()=>{ie.current.focus()})))},Lo=e=>{""===e.target.value?Ee("..."):(le.current.classList.add("selected-td-form__button--active"),Ee(e.target.value))};return(0,V.jsxs)(u.A,{form:l,layout:"vertical",name:"selected_image_form",initialValues:{src:"",width:"",height:"",widthDim:"",heightDim:"",alt:"",align:"left",border:"",boxShadow:"",show:"all",borderPosition:"",borderColor:"",borderWidth:"",borderStyle:"",mobileWidth:"",mobileWidthDim:"",mobileHeight:"",mobileHeightDim:"",mobileBorder:"",mobileBorderPosition:"",mobileBorderColor:"",mobileBorderWidth:"",mobileBorderStyle:"",mobileBoxShadow:"",mobileAlign:"left",mobileVerticalAlign:"",link:"https://",imgReplacer:"",countdownNumbersStrong:!1,countdownNumbersItalic:!1,countdownLabelsStrong:!1,countdownLabelsItalic:!1},onValuesChange:Po,autoComplete:"off",className:"element-controls",children:[!_o&&(0,V.jsx)(b.A,{title:o("To change the appearance of the element on the mobile device, edit the fields below. If the fields remain empty, the desktop styles will be applied to the mobile version."),placement:"bottom",children:(0,V.jsx)(h.A,{className:"selected_form-mobile-props-title",message:o("Appearance on mobile devices"),type:"info"})}),D===O.ND&&X.styles?(0,V.jsx)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",children:(0,V.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[(0,V.jsxs)(g.A,{gutter:30,style:{paddingBottom:4},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(je,{form:l,elementSettings:e,imgParent:!0})}),(0,V.jsx)(x.A,{span:12,align:"right",children:(0,V.jsx)(ve,{form:l,elementSettings:e})})]}),!!e.showOnMobile&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider",style:{marginBottom:"countdown"===e.type?15:24}}),"countdown"===e.type&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Te,{form:l,elementSettings:e}),(0,V.jsx)(p.A,{className:"selected-td-form__divider",style:{marginBottom:24}})]}),"video"===e.type&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Fe,{form:l,elementSettings:e}),(0,V.jsx)(p.A,{className:"selected-td-form__divider",style:{marginBottom:24}})]}),("img"===e.type||"video"===e.type)&&(0,V.jsx)(u.A.Item,{style:{marginBottom:0},children:(0,V.jsx)(N.A,{form:l,label:o("Image path"),name:"src",placeholder:o("Image path"),elementSettings:e,tooltipTitle:""})}),(0,V.jsxs)(j.A,{size:8,style:{marginBottom:we||ke||Ne?t.formItemMarginBottomXS:t.formItemMarginBottomMD+4},children:[(0,V.jsx)(b.A,{title:ke||o("Hyperlink URL"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button",{"selected-td-form__button--active":!!ke}),icon:(0,V.jsx)(B.A,{className:"selected-td-form__icon-radius"}),onClick:No,ref:ee})}),(0,V.jsx)(b.A,{title:we||o("Alternative text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button",{"selected-td-form__button--active":!!we}),onClick:Eo,ref:te,children:(0,V.jsx)("span",{className:"addon-text-content",children:"Alt"})})}),a.formFieldImageTitleEnabled&&(0,V.jsx)(b.A,{title:Ne||o("Tooltip text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button",{"selected-td-form__button--active":!!Ne}),onClick:Co,ref:le,children:(0,V.jsx)("span",{className:"addon-text-content",children:"Title"})})})]}),(!!ke||!!we||!!Ne)&&(0,V.jsxs)("div",{style:{marginBottom:t.formItemMarginBottomMD+4},children:[!!ke&&(0,V.jsx)(b.A,{trigger:["hover"],title:o("Hyperlink URL"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"link",className:"selected-image-form__alt",style:{marginBottom:t.formItemMarginBottomXS},children:(0,V.jsx)(v.A,{ref:J,allowClear:!0,placeholder:o("Hyperlink URL"),prefix:(0,V.jsx)(B.A,{}),onChange:To})})}),!!we&&(0,V.jsx)(b.A,{trigger:["hover"],title:o("Alternative text"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"alt",className:"selected-image-form__alt",style:{marginBottom:t.formItemMarginBottomXS},children:(0,V.jsx)(v.A,{placeholder:o("Alternative text"),allowClear:!0,prefix:(0,V.jsx)("span",{className:"addon-text-content",children:"Alt"}),onChange:Io,ref:oe})})}),a.formFieldImageTitleEnabled&&!!Ne&&(0,V.jsx)(b.A,{trigger:["hover"],title:o("Tooltip text"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"title",className:"selected-image-form__alt",style:{marginBottom:t.formItemMarginBottomXS},children:(0,V.jsx)(v.A,{placeholder:o("Tooltip text"),allowClear:!0,prefix:(0,V.jsx)("span",{className:"addon-text-content",children:"Title"}),onChange:Lo,ref:ie})})})]})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Size")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{ro((e=>!e)),so&&(o.mobileWidth="",o.mobileHeight="",w({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileWidth:{value:null,dim:"px",classNamePrefix:"em-mob-width-"},mobileHeight:{value:null,dim:"px",classNamePrefix:"em-mob-height-"}}}))}))},children:so?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),so&&(0,V.jsxs)(g.A,{gutter:10,style:{paddingBottom:24},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(Z,{form:l,name:"mobileWidth",elementSettings:e,isPicture:"true"})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(Q.A,{form:l,name:"mobileHeight",elementSettings:e,isPicture:"true"})})]}),a.formFieldBorderEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Borders")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{Oe((e=>!e)),Le&&(o.mobileBorderWidth=null,o.mobileBorderColor="",o.mobileBorderStyle=""),ue((e=>({...O.iV,[o.mobileBorderPosition]:{...e[o.mobileBorderPosition],width:o.mobileBorderWidth,color:o.mobileBorderColor,style:o.mobileBorderStyle}}))),w({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorder:{all:{color:o.mobileBorderColor,style:o.mobileBorderStyle,width:o.mobileBorderWidth,classNamePrefix:"em-mob-border_"+o.mobileBorderPosition+"-"}}}})}))},children:Le?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Le&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(ce,{mobileBorders:me})})]}),a.formFieldBorderRadiusEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Border radius")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{eo((e=>!e)),o.mobileBorderRadiusAll=Qe?null:5,w({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorderRadius:{all:o.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})}))},children:Qe?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Qe&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(pe,{form:l,oneMobileBorderRadiusValue:Se,setOneMobileBorderRadiusValue:_e})})]}),a.formFieldBoxShadowEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Box shadow")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{lo((e=>!e)),io?(o.mobileBoxShadowInset=!1,o.mobileBoxShadowHOffset=null,o.mobileBoxShadowVOffset=null,o.mobileBoxShadowBlurRadius=null,o.mobileBoxShadowSpreadRadius=null,o.mobileBoxShadowColor=""):(o.mobileBoxShadowInset=!1,o.mobileBoxShadowHOffset=5,o.mobileBoxShadowVOffset=5,o.mobileBoxShadowBlurRadius=10,o.mobileBoxShadowSpreadRadius=-5,o.mobileBoxShadowColor="#000000"),w({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBoxShadow:{blurRadius:o.mobileBoxShadowBlurRadius,color:o.mobileBoxShadowColor,hOffset:o.mobileBoxShadowHOffset,inset:o.mobileBoxShadowInset,spreadRadius:o.mobileBoxShadowSpreadRadius,vOffset:o.mobileBoxShadowVOffset,classNamePrefix:"em-mob-box_shadow-"}}})}))},children:io?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),io&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(fe,{mobileBoxShadow:ge,form:l,elementSettings:e})})]}),a.formFieldVisibilityEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Display control")}),(0,V.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(Re,{elementSettings:e,form:l})})})]}),a.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,V.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(De,{})})})]})]})}):(0,V.jsx)("div",{id:"selected_element_form_desktop_props",children:(0,V.jsxs)("div",{className:"selected_form-props-wrapper",children:[(0,V.jsxs)(g.A,{gutter:10,style:{marginBottom:4},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(M,{form:l,elementSettings:e,imgParent:!0})}),(0,V.jsx)(x.A,{span:12,align:"right",children:(0,V.jsx)(W.A,{form:l,elementSettings:e})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider",style:{marginBottom:"countdown"===e.type?15:24}}),"countdown"===e.type&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Te,{form:l,elementSettings:e,handleChangeValues:Po}),(0,V.jsx)(p.A,{className:"selected-td-form__divider",style:{marginBottom:24}})]}),uo&&(0,V.jsx)(x.A,{span:24,id:"merge_tags_wrapper",children:(0,V.jsxs)(u.A.Item,{style:{marginBottom:24},children:[(0,V.jsx)(f.Ay,{id:"merge_tags_button",icon:(0,V.jsx)(L.A,{icon:"MergeTags"}),style:{width:"100%",display:ho?"none":"block"},onClick:()=>go(!0),children:o("Merge tags")}),(0,V.jsx)(A.A,{ref:re,popupClassName:"merge-tags",options:uo,placeholder:o("Start typing the title"),showSearch:{filter:(e,o)=>o.some((o=>o.label.toLowerCase().indexOf(e.toLowerCase())>-1)),render:(e,o)=>{const t=o.map(((o,t)=>{const i=o.label.split(new RegExp(`(${e})`,"gi"));return(0,V.jsxs)("span",{children:[0!==t&&(0,V.jsx)("span",{children:"\xa0/\xa0"}),i.map(((o,t)=>o.toLowerCase()===e.toLowerCase()?(0,V.jsx)("span",{style:{color:"red"},children:o},t):o))]},o.value)}));return(0,V.jsx)("div",{title:o.map((e=>e.label)).join(" / "),children:t})}},spellCheck:"false",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),onChange:(o,t)=>{if(go(!1),o){const i=Ro.syntax.length>1?uo.findIndex((e=>e.key===t[0].key)):0,d=Ro.syntax[i].replace("%value%",o[o.length-1]);"selected_image_form_title"===(null===xo||void 0===xo?void 0:xo.getAttribute("id"))||"selected_image_form_alt"===(null===xo||void 0===xo?void 0:xo.getAttribute("id"))||"selected_image_form_link"===(null===xo||void 0===xo?void 0:xo.getAttribute("id"))||"selected_image_form_imgReplacer"===(null===xo||void 0===xo?void 0:xo.getAttribute("id"))?((o,t)=>{const i=document.getElementById(t);if(i){var d,s;const r="selected_image_form_",a=t.substring(t.indexOf(r)+r.length),n=null===(d=i.value)||void 0===d?void 0:d.substring(0,fo.start),m=null===(s=i.value)||void 0===s?void 0:s.substring(fo.end);w({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{...e,[a]:n+o+m}}),l.setFieldValue(a,n+o+m),i.focus(),setTimeout((()=>{i.selectionStart=fo.start,i.selectionEnd=fo.start+o.length}),400),vo(!0)}})(d,null===xo||void 0===xo?void 0:xo.getAttribute("id")):(l.setFieldValue("imgReplacer",d),w({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{imgReplacer:d}}))}},style:{display:ho?"block":"none"},open:ho,onKeyDown:e=>{"Escape"===e.key&&go(!1)}})]})}),"video"===e.type&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Fe,{form:l,elementSettings:e}),(0,V.jsx)(p.A,{className:"selected-td-form__divider",style:{marginBottom:24}})]}),("img"===e.type||"video"===e.type)&&(0,V.jsx)(u.A.Item,{style:{marginBottom:0},children:(0,V.jsx)(N.A,{form:l,label:o("Image path"),name:"src",placeholder:o("Image path"),elementSettings:e,tooltipTitle:""})}),(0,V.jsxs)(j.A,{size:8,style:{marginBottom:we||ke||Ne||Bo?t.formItemMarginBottomXS:t.formItemMarginBottomMD+4},children:[(0,V.jsx)(b.A,{title:we||o("Alternative text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button",{"selected-td-form__button--active":!!we}),onClick:Eo,ref:te,children:(0,V.jsx)("span",{className:"addon-text-content",children:"Alt"})})}),a.formFieldImageTitleEnabled&&(0,V.jsx)(b.A,{title:Ne||o("Tooltip text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button",{"selected-td-form__button--active":!!Ne}),onClick:Co,ref:le,children:(0,V.jsx)("span",{className:"addon-text-content",children:"Title"})})}),(0,V.jsx)(b.A,{title:ke||o("Hyperlink URL"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button",{"selected-td-form__button--active":!!ke}),icon:(0,V.jsx)(B.A,{className:"selected-td-form__icon-radius"}),onClick:No,ref:ee})}),(0,V.jsx)(b.A,{title:o("Image replacer"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button",{"selected-td-form__button--active":Bo}),icon:(0,V.jsx)(L.A,{icon:"Replacer",className:"selected-td-form__icon-radius"}),onClick:()=>{So(!Bo),Bo?(l.setFieldValue("imgReplacer",""),w({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{imgReplacer:""}})):setTimeout((()=>de.current.focus()))},ref:se})})]}),(!!ke||!!we||!!Ne||!!Bo)&&(0,V.jsxs)("div",{style:{marginBottom:t.formItemMarginBottomMD+4},children:[!!ke&&(0,V.jsx)(b.A,{trigger:["hover"],title:o("Hyperlink URL"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"link",className:"selected-image-form__alt",style:{marginBottom:t.formItemMarginBottomXS},children:(0,V.jsx)(v.A,{addonBefore:(0,V.jsx)($e.Ai,{linkProtocol:mo,handleLinkProtocolsChange:e=>{l.setFieldValue("link","mergetag"!==e?e:""),co(e)},__:o}),placeholder:o("Hyperlink URL"),allowClear:!0,ref:J,onChange:To,onSelect:ko,prefix:(0,V.jsx)($e.RM,{linkProtocol:mo})})})}),!!we&&(0,V.jsx)(b.A,{trigger:["hover"],title:o("Alternative text"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"alt",className:"selected-image-form__alt",style:{marginBottom:t.formItemMarginBottomXS},children:(0,V.jsx)(v.A,{placeholder:o("Alternative text"),allowClear:!0,prefix:(0,V.jsx)("span",{className:"addon-text-content",children:"Alt"}),onChange:Io,ref:oe,onSelect:ko})})}),a.formFieldImageTitleEnabled&&!!Ne&&(0,V.jsx)(b.A,{trigger:["hover"],title:o("Tooltip text"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"title",className:"selected-image-form__alt",style:{marginBottom:t.formItemMarginBottomXS},children:(0,V.jsx)(v.A,{placeholder:o("Enter the title of the image"),allowClear:!0,prefix:(0,V.jsx)("span",{className:"addon-text-content",children:"Title"}),onChange:Lo,ref:ie,onSelect:ko})})}),!!Bo&&(0,V.jsx)(b.A,{trigger:["hover"],title:o("Image src"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"imgReplacer",className:"selected-image-form__alt",style:{marginBottom:t.formItemMarginBottomXS},children:(0,V.jsx)(v.A,{placeholder:o("\u0421ode that will replace the image `src`"),allowClear:!0,prefix:(0,V.jsx)("span",{className:"addon-text-content",children:o("Image src")}),onChange:e=>{""!==e.target.value&&se.current.classList.add("selected-td-form__button--active")},ref:de,onSelect:ko})})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Size")}),(0,V.jsxs)(g.A,{gutter:t.marginSM,style:{marginBottom:4},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{title:o("Width"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"width",style:{marginBottom:t.formItemMarginBottomXS},children:(0,V.jsx)(z.A,{min:0,max:e.maxWidth,placeholder:o("Width"),prefix:(0,V.jsx)(S.A,{}),addonAfter:"px"})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{title:o("Height"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"height",children:(0,V.jsx)(z.A,{min:0,placeholder:o("Height"),prefix:(0,V.jsx)(_.A,{}),addonAfter:"px"})})})})]}),a.formFieldBorderEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Borders")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{Ce((e=>!e)),Ie&&(o.borderWidth=null,o.borderColor="",o.borderStyle=""),ne((e=>({...O.iV,[o.borderPosition]:{...e[o.borderPosition],width:o.borderWidth,color:o.borderColor,style:o.borderStyle}}))),w({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{border:{all:{color:o.borderColor,style:o.borderStyle,width:o.borderWidth}}}})}))},children:Ie?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Ie&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(T.A,{borders:ae})})]}),a.formFieldBorderRadiusEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Border radius")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{Ze((e=>!e)),o.borderRadiusAll=Ve?0:5,w({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{borderRadius:{all:o.borderRadiusAll}}})}))},children:Ve?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Ve&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(E.A,{form:l,oneBorderRadiusValue:Ae,setOneBorderRadiusValue:Be,elementSettings:e})})]}),a.formFieldBoxShadowEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Box shadow")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{to((e=>!e)),oo?(o.boxShadowInset=!1,o.boxShadowHOffset=0,o.boxShadowVOffset=0,o.boxShadowBlurRadius=0,o.boxShadowSpreadRadius=0,o.boxShadowColor=""):(o.boxShadowInset=!1,o.boxShadowHOffset=5,o.boxShadowVOffset=5,o.boxShadowBlurRadius=10,o.boxShadowSpreadRadius=-5,o.boxShadowColor="#000000"),w({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{boxShadow:{blurRadius:o.boxShadowBlurRadius,color:o.boxShadowColor,hOffset:o.boxShadowHOffset,inset:o.boxShadowInset,spreadRadius:o.boxShadowSpreadRadius,vOffset:o.boxShadowVOffset}}})}))},children:oo?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),oo&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(U,{boxShadow:be})})]}),a.formFieldVisibilityEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Display control")}),(0,V.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(Re,{elementSettings:e,form:l})})})]}),a.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,V.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(De,{})})})]})]})})]})};var Qe=t(40857);const{useToken:eo}=c.A,oo=({form:e,elementSettings:o,label:t})=>{var l;const{__:d}=(0,C.s9)(),s=(0,i.useRef)(),[r,a]=(0,i.useState)("none"===(null===(l=o.mobileBackgroundColor)||void 0===l?void 0:l.value)),{token:n}=eo(),m=(0,F.XW)();return(0,V.jsx)(V.Fragment,{children:(0,V.jsxs)(b.A,{trigger:["hover"],title:d("Background color"),placement:"left",children:[(0,V.jsx)(u.A.Item,{name:"mobileBackgroundColor",style:{marginBottom:n.formItemMarginBottomXS/2},children:(0,V.jsx)(G.A,{onChange:e=>{a(!1)},placeholder:t,usedColors:o.usedColors})}),(0,V.jsxs)(j.A,{size:8,align:"end",children:[(0,V.jsx)(q.A,{ref:s,size:"small",checked:r,onChange:t=>{e.setFieldsValue({mobileBackgroundColor:""}),a((e=>!e)),m({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:{mobileBackgroundColor:{classNamePrefix:"em-mob-background_color-",value:r?"":"none"}}})},id:"without-background-color"}),(0,V.jsx)("div",{className:"ant-form-item-switch-label-small",style:{position:"relative",top:2},children:(0,V.jsx)("label",{htmlFor:"without-background-color",children:d("Without background color")})})]})]})})};t(9439);const to=(e,o)=>{const{__:t}=(0,C.s9)();return(0,V.jsx)(b.A,{title:t("During export, the element is converted into an image."),children:(0,V.jsxs)(j.A,{size:10,align:"baseline",children:[(0,V.jsx)(u.A.Item,{name:"exportAsPicture",valuePropName:"checked",children:(0,V.jsx)(q.A,{size:"small",id:"convern-in-image"})}),(0,V.jsx)("span",{className:"ant-form-item-switch-label",style:{position:"relative",top:2},children:(0,V.jsx)("label",{htmlFor:"convern-in-image",children:t("Convert into an image")})})]})},"exportAsPicture")},{Option:io}=Y.A,lo=(0,V.jsxs)(Y.A,{className:"select-after",getPopupContainer:e=>e.parentNode,children:[(0,V.jsx)(io,{value:"px",children:"px"}),(0,V.jsx)(io,{value:"%",children:"%"})]}),{useToken:so}=c.A,ro=({elementSettings:e})=>{const{__:o}=(0,C.s9)(),t=(0,F.XW)(),[l]=u.A.useForm(),[d,s]=(0,i.useState)({}),[a,n]=(0,i.useState)({}),[m,c]=(0,i.useState)(!0),[A,j]=(0,i.useState)({}),[v,B]=(0,i.useState)({}),[_,y]=(0,i.useState)(!0),w=(0,r.d4)(He.Ct),P=(0,r.d4)(He.CS),I=(0,Ue.rD)(),[D,W]=(0,i.useState)(""===e.backgroundImage[0].value),{token:X}=so(),H=(0,r.d4)(He.Fv),q=(0,r.d4)(He.yy),$=H&&"bottom"!==q,[K,J]=(0,i.useState)(!1),[Q,ee]=(0,i.useState)(!1),[oe,te]=(0,i.useState)(!1),[ie,le]=(0,i.useState)(!1),[de,se]=(0,i.useState)(!1),[re,ae]=(0,i.useState)(!1),[ne,me]=(0,i.useState)(!1),[ue,be]=(0,i.useState)(!1),[he,ge]=(0,i.useState)(!1),[xe,Ae]=(0,i.useState)(!1),[ve,Be]=(0,i.useState)(!1),Se=[{label:o("Not defined"),value:"none"},{label:o("Do not repeat background (no-repeat)"),value:"no-repeat"},{label:o("Repeat background (repeat)"),value:"repeat"},{label:o("Repeat background horizontally (repeat-x)"),value:"repeat-x"},{label:o("Repeat background vertically (repeat-y)"),value:"repeat-y"}],_e=[{label:o("Not defined"),value:""},{label:o("Contain"),value:"contain"},{label:o("Cover"),value:"cover"}];(0,i.useEffect)((()=>{if(e){var o,t,i,d,r,a,m,u,b,h,g,x,p,f,A,v,S,_,R,k,w,P,N,T,E,I,C,L,O,F,V,D,M,X,H,z,G,U,Y;const q=e.border,$=e.boxShadow,K=e.mobileBorder,Z=e.mobileBoxShadow;s(q),n($),j(K),B(Z);const Q=Object.keys(q).find((e=>{var o,t,i;return(null===(o=q[e])||void 0===o?void 0:o.width)||(null===(t=q[e])||void 0===t?void 0:t.style)||(null===(i=q[e])||void 0===i?void 0:i.color)})),oe=Object.keys(K).find((e=>{var o,t,i;return(null===(o=K[e])||void 0===o?void 0:o.width)||(null===(t=K[e])||void 0===t?void 0:t.style)||(null===(i=K[e])||void 0===i?void 0:i.color)}));l.setFieldsValue({...e,width:null===(o=e.width)||void 0===o?void 0:o.value,widthDim:null===(t=e.width)||void 0===t?void 0:t.dim,maxWidth:null===(i=e.maxWidth)||void 0===i?void 0:i.value,maxWidthDim:null===(d=e.maxWidth)||void 0===d?void 0:d.dim,minWidth:null===(r=e.minWidth)||void 0===r?void 0:r.value,minWidthDim:null===(a=e.minWidth)||void 0===a?void 0:a.dim,backgroundImage:e.backgroundImage[0].value,show:e.show?e.show:"all",borderPosition:Q||"all",borderWidth:(null===(m=q[Q])||void 0===m?void 0:m.width)||"",borderColor:(null===(u=q[Q])||void 0===u?void 0:u.color)||"",borderStyle:(null===(b=q[Q])||void 0===b?void 0:b.style)||"",borderRadiusAll:(0,$e.ok)(e.borderRadius.all),borderRadiusTopLeft:(0,$e.ok)(e.borderRadius.topLeft),borderRadiusBottomLeft:(0,$e.ok)(e.borderRadius.bottomLeft),borderRadiusTopRight:(0,$e.ok)(e.borderRadius.topRight),borderRadiusBottomRight:(0,$e.ok)(e.borderRadius.bottomRight),boxShadowInset:(0,$e.ok)(null===(h=e.boxShadow)||void 0===h?void 0:h.inset)||!1,boxShadowHOffset:(0,$e.ok)(null===(g=e.boxShadow)||void 0===g?void 0:g.hOffset),boxShadowVOffset:(0,$e.ok)(null===(x=e.boxShadow)||void 0===x?void 0:x.vOffset),boxShadowBlurRadius:(0,$e.ok)(null===(p=e.boxShadow)||void 0===p?void 0:p.blurRadius),boxShadowSpreadRadius:(0,$e.ok)(null===(f=e.boxShadow)||void 0===f?void 0:f.spreadRadius),boxShadowColor:(0,$e.ok)(null===(A=e.boxShadow)||void 0===A?void 0:A.color),mobileWidth:(0,$e.xc)(null===(v=e.mobileWidth)||void 0===v?void 0:v.value),mobileWidthDim:null===(S=e.mobileWidth)||void 0===S?void 0:S.dim,mobileAlign:null===(_=e.mobileAlign)||void 0===_?void 0:_.value,mobileBorderPosition:oe||"all",mobileBorderWidth:null!==(null===(R=K[oe])||void 0===R?void 0:R.width)?null===(k=K[oe])||void 0===k?void 0:k.width:"",mobileBorderColor:(null===(w=K[oe])||void 0===w?void 0:w.color)||"",mobileBorderStyle:(null===(P=K[oe])||void 0===P?void 0:P.style)||"",mobileBorderRadiusAll:(0,$e.ok)(e.mobileBorderRadius.all),mobileRadiusTopLeft:(0,$e.ok)(null!==e.mobileBorderRadius.topLeft?e.mobileBorderRadius.topLeft:e.mobileBorderRadius.all),mobileRadiusBottomLeft:(0,$e.ok)(null!==e.mobileBorderRadius.bottomLeft?e.mobileBorderRadius.bottomLeft:e.mobileBorderRadius.all),mobileRadiusTopRight:(0,$e.ok)(null!==e.mobileBorderRadius.topRight?e.mobileBorderRadius.topRight:e.mobileBorderRadius.all),mobileRadiusBottomRight:(0,$e.ok)(null!==e.mobileBorderRadius.bottomRight?e.mobileBorderRadius.bottomRight:e.mobileBorderRadius.all),mobileBoxShadowInset:(0,$e.ok)(null===(N=e.mobileBoxShadow)||void 0===N?void 0:N.inset)||!1,mobileBoxShadowHOffset:(0,$e.ok)(null===(T=e.mobileBoxShadow)||void 0===T?void 0:T.hOffset),mobileBoxShadowVOffset:(0,$e.ok)(null===(E=e.mobileBoxShadow)||void 0===E?void 0:E.vOffset),mobileBoxShadowBlurRadius:(0,$e.ok)(null===(I=e.mobileBoxShadow)||void 0===I?void 0:I.blurRadius),mobileBoxShadowSpreadRadius:(0,$e.ok)(null===(C=e.mobileBoxShadow)||void 0===C?void 0:C.spreadRadius),mobileBoxShadowColor:(0,$e.ok)(null===(L=e.mobileBoxShadow)||void 0===L?void 0:L.color),mobileBackgroundColor:(0,$e.ok)("none"!==(null===(O=e.mobileBackgroundColor)||void 0===O?void 0:O.value)?null===(F=e.mobileBackgroundColor)||void 0===F?void 0:F.value:""),mobileBackgroundImage:"none"!==e.mobileBackgroundImage[0].value?e.mobileBackgroundImage[0].value:"",mobileBackgroundPositionX:(0,$e.ok)(null===(V=e.mobileBackgroundPositionX)||void 0===V?void 0:V.value),mobileBackgroundPositionY:(0,$e.ok)(null===(D=e.mobileBackgroundPositionY)||void 0===D?void 0:D.value),mobileBackgroundRepeat:null!==(M=e.mobileBackgroundRepeat)&&void 0!==M&&M.value?null===(X=e.mobileBackgroundRepeat)||void 0===X?void 0:X.value:"none",exportAsPicture:null===e||void 0===e?void 0:e.exportAsPicture}),!(0,$e.ok)(e.borderRadius.all)&&((0,$e.ok)(e.borderRadius.topLeft)||(0,$e.ok)(e.borderRadius.bottomLeft)||(0,$e.ok)(e.borderRadius.topRight)||(0,$e.ok)(e.borderRadius.bottomRight))?c(!1):c(!0),(0,$e.ok)(e.mobileBorderRadius.topLeft)||(0,$e.ok)(e.mobileBorderRadius.bottomLeft)||(0,$e.ok)(e.mobileBorderRadius.topRight)||(0,$e.ok)(e.mobileBorderRadius.bottomRight)?y(!1):y(!0),W(""===e.backgroundImage[0].value),J(!(null===(H=q[Q])||void 0===H||!H.width)),ee(!(null===(z=K[oe])||void 0===z||!z.width)),te(!!e.borderRadius.all||!!e.borderRadius.topLeft||!!e.borderRadius.bottomLeft||!!e.borderRadius.topRight||!!e.borderRadius.bottomRight),le(!!e.mobileBorderRadius.all||!!e.mobileBorderRadius.topLeft||!!e.mobileBorderRadius.bottomLeft||!!e.mobileBorderRadius.topRight||!!e.mobileBorderRadius.bottomRight),se(!!e.boxShadow),ae(!!e.mobileBoxShadow.blurRadius||!!e.mobileBoxShadow.color||!!e.mobileBoxShadow.hOffset||!!e.mobileBoxShadow.inset||!!e.mobileBoxShadow.spreadRadius||!!e.mobileBoxShadow.vOffset),me(!(null===(G=e.width)||void 0===G||!G.value)||!(null===(U=e.minWidth)||void 0===U||!U.value)||!(null===(Y=e.maxWidth)||void 0===Y||!Y.value)),be(!!e.mobileWidth.value),ge(!!e.backgroundColor||!!e.backgroundImage[0].value||!!e.backgroundPositionY||!!e.backgroundPositionX||"repeat"!==e.backgroundRepeat||!e.backgroundRepeat,!!e.backgroundSize),Ae(!!e.mobileBackgroundColor.value),Be(!!e.exportAsPicture)}}),[l,e]);return(0,V.jsxs)(u.A,{form:l,layout:"vertical",name:"selected_table_form",initialValues:{backgroundColor:"",backgroundImage:"",backgroundPositionX:"",backgroundPositionY:"",backgroundRepeat:"",backgroundSize:"",exportAsPicture:!1,show:"all",width:{value:"",dim:""},maxWidth:{value:"",dim:""},minWidth:{value:"",dim:""},align:"",mobileAlign:"",border:"",boxShadow:"",borderPosition:"",borderColor:"",borderWidth:"",borderStyle:"",borderRadiusAll:"",RadiusTopLeft:"",RadiusBottomLeft:"",RadiusTopRight:"",RadiusBottomRight:"",mobileWidth:"",mobileWidthDim:"",mobileBorder:"",mobileBorderPosition:"",mobileBorderColor:"",mobileBorderWidth:"",mobileBorderStyle:"",mobileBoxShadow:"",mobileBackgroundColor:"",mobileBackgroundImage:""},onValuesChange:o=>{const i=l.getFieldsValue(!0),r=Object.keys(o)[0];let a;switch(r){case"exportAsPicture":a={exportAsPicture:i.exportAsPicture};break;case"boxShadowInset":case"boxShadowHOffset":case"boxShadowVOffset":case"boxShadowBlurRadius":case"boxShadowSpreadRadius":case"boxShadowColor":a={boxShadow:{hOffset:i.boxShadowHOffset,vOffset:i.boxShadowVOffset,blurRadius:i.boxShadowBlurRadius,spreadRadius:i.boxShadowSpreadRadius,color:i.boxShadowColor,inset:i.boxShadowInset}};break;case"borderStyle":a={border:{[i.borderPosition]:{...d[i.borderPosition],style:o[r]}}},"all"===i.borderPosition?s((e=>({...O.iV,[i.borderPosition]:{...e[i.borderPosition],style:o[r]}}))):s((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],style:o[r]}})));break;case"borderColor":a={border:{[i.borderPosition]:{...d[i.borderPosition],color:o[r]}}},"all"===i.borderPosition?s((e=>({...O.iV,[i.borderPosition]:{...e[i.borderPosition],color:o[r]}}))):s((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],color:o[r]}})));break;case"borderWidth":a={border:{[i.borderPosition]:{...d[i.borderPosition],width:o[r]}}},"all"===i.borderPosition?s((e=>({...O.iV,[i.borderPosition]:{...e[i.borderPosition],width:o[r]}}))):s((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],width:o[r]}})));break;case"borderPosition":l.setFieldsValue({borderWidth:d[o[r]].width||"",borderColor:d[o[r]].color||"",borderStyle:d[o[r]].style||""});break;case"width":a={[r]:{value:o[r],dim:i.widthDim}};break;case"widthDim":a={width:{value:i.width,dim:o[r]}};break;case"maxWidth":a={[r]:{value:o[r],dim:i.maxWidthDim}};break;case"maxWidthDim":a={maxWidth:{value:i.maxWidth,dim:o[r]}};break;case"minWidth":a={[r]:{value:o[r],dim:i.minWidthDim}};break;case"minWidthDim":a={minWidth:{value:i.minWidth,dim:o[r]}};break;case"backgroundImage":W(""===o[r]),a={[r]:[{...e.backgroundImage[0],value:o[r]}],backgroundSize:"cover"};break;case"borderRadiusAll":case"borderRadiusTopLeft":case"borderRadiusBottomLeft":case"borderRadiusTopRight":case"borderRadiusBottomRight":a={borderRadius:{[O.wF[r]]:+o[r]}};break;case"mobileWidth":a={[r]:{classNamePrefix:"em-mob-width-",value:o[r],dim:i.mobileWidthDim}};break;case"mobileWidthDim":a={mobileWidth:{classNamePrefix:"em-mob-width-",value:i.mobileWidth,dim:o[r]}};break;case"mobileBorderStyle":a={mobileBorder:{[i.mobileBorderPosition]:{...A[i.mobileBorderPosition],style:o[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?j((e=>({...O.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:o[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):j((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:o[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderColor":a={mobileBorder:{[i.mobileBorderPosition]:{...A[i.mobileBorderPosition],color:o[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?j((e=>({...O.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:o[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):j((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:o[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderWidth":a={mobileBorder:{[i.mobileBorderPosition]:{...A[i.mobileBorderPosition],width:o[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?j((e=>({...O.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:o[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):j((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:o[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderPosition":l.setFieldsValue({mobileBorderWidth:A[o[r]].width||"",mobileBorderColor:A[o[r]].color||"",mobileBorderStyle:A[o[r]].style||""});break;case"mobileBorderRadiusAll":case"mobileRadiusTopLeft":case"mobileRadiusBottomLeft":case"mobileRadiusTopRight":case"mobileRadiusBottomRight":a={mobileBorderRadius:{[$e.NW[r]]:o[r],classNamePrefix:"em-mob-border_radius_"+$e.NW[r]+"-"}};break;case"mobileBoxShadowInset":case"mobileBoxShadowHOffset":case"mobileBoxShadowVOffset":case"mobileBoxShadowBlurRadius":case"mobileBoxShadowSpreadRadius":case"mobileBoxShadowColor":a={mobileBoxShadow:{hOffset:i.mobileBoxShadowHOffset,vOffset:i.mobileBoxShadowVOffset,blurRadius:i.mobileBoxShadowBlurRadius,spreadRadius:i.mobileBoxShadowSpreadRadius,color:i.mobileBoxShadowColor,inset:i.mobileBoxShadowInset,classNamePrefix:"em-mob-box_shadow-"}};break;case"mobileBackgroundColor":a={[r]:{classNamePrefix:"em-mob-background_color-",value:o[r]}};break;case"mobileBackgroundImage":a={[r]:[{...e.mobileBackgroundImage[0],classNamePrefix:"em-mob-background_image-",value:o[r]}]};break;case"mobileBackgroundPositionX":a={[r]:{classNamePrefix:"em-mob-background_position_x-",value:o[r]}};break;case"mobileBackgroundPositionY":a={[r]:{classNamePrefix:"em-mob-background_position_x-",value:o[r]}};break;case"mobileBackgroundRepeat":a={[r]:{classNamePrefix:"em-mob-background_repeat-",value:o[r]}};break;case"mobileAlign":a={[r]:{classNamePrefix:"em-mob-table_align-",value:o[r]}};break;default:a=o}"borderPosition"!==r&&t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:a})},autoComplete:"off",className:"element-controls",children:[!$&&(0,V.jsx)(b.A,{title:o("To change the appearance of the element on the mobile device, edit the fields below. If the fields remain empty, the desktop styles will be applied to the mobile version."),placement:"bottom",children:(0,V.jsx)(h.A,{className:"selected_form-mobile-props-title",message:o("Appearance on mobile devices"),type:"info"})}),w===O.ND&&P.styles?(0,V.jsx)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",children:(0,V.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[(0,V.jsx)("div",{style:{paddingBottom:4},children:(0,V.jsx)(je,{form:l,elementSettings:e})}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Size")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{be((e=>!e)),ue&&(o.mobileWidth="",t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileWidth:{value:null,dim:"px",classNamePrefix:"em-mob-width-"}}}))}))},children:ue?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),ue&&(0,V.jsx)(V.Fragment,{children:(0,V.jsx)(g.A,{gutter:10,children:(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Table width"),placement:"left",children:(0,V.jsx)("div",{style:{marginBottom:X.formItemMarginBottomMD+4},children:(0,V.jsx)(Z,{form:l,name:"mobileWidth",elementSettings:e})})})})})}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Background")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{Ae((e=>!e)),o.mobileBackgroundColor=xe?"":"#E5E5E5",t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBackgroundColor:{classNamePrefix:"em-mob-background_color-",value:o.mobileBackgroundColor}}})}))},children:xe?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),xe&&(0,V.jsx)("div",{style:{marginBottom:(I.formTableFieldBackgroundImageEnabled,X.formItemMarginBottomMD+4)},children:(0,V.jsx)(oo,{form:l,elementSettings:e})}),!1,I.formFieldBorderEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Borders")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{ee((e=>!e)),Q&&(o.mobileBorderWidth=null,o.mobileBorderColor="",o.mobileBorderStyle=""),j((e=>({...O.iV,[o.mobileBorderPosition]:{...e[o.mobileBorderPosition],width:o.mobileBorderWidth,color:o.mobileBorderColor,style:o.mobileBorderStyle}}))),t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorder:{all:{color:o.mobileBorderColor,style:o.mobileBorderStyle,width:o.mobileBorderWidth,classNamePrefix:"em-mob-border_"+o.mobileBorderPosition+"-"}}}})}))},children:Q?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Q&&(0,V.jsx)("div",{style:{paddingBottom:4},children:(0,V.jsx)(ce,{mobileBorders:A})})]}),I.formFieldBorderRadiusEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Border radius")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{le((e=>!e)),o.mobileBorderRadiusAll=ie?null:5,t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorderRadius:{all:o.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})}))},children:ie?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),ie&&(0,V.jsx)("div",{style:{paddingBottom:4},children:(0,V.jsx)(pe,{form:l,oneMobileBorderRadiusValue:_,setOneMobileBorderRadiusValue:y})})]}),I.formFieldBoxShadowEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Box shadow")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{ae((e=>!e)),re?(o.mobileBoxShadowInset=!1,o.mobileBoxShadowHOffset=null,o.mobileBoxShadowVOffset=null,o.mobileBoxShadowBlurRadius=null,o.mobileBoxShadowSpreadRadius=null,o.mobileBoxShadowColor=""):(o.mobileBoxShadowInset=!1,o.mobileBoxShadowHOffset=5,o.mobileBoxShadowVOffset=5,o.mobileBoxShadowBlurRadius=10,o.mobileBoxShadowSpreadRadius=-5,o.mobileBoxShadowColor="#000000"),t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBoxShadow:{blurRadius:o.mobileBoxShadowBlurRadius,color:o.mobileBoxShadowColor,hOffset:o.mobileBoxShadowHOffset,inset:o.mobileBoxShadowInset,spreadRadius:o.mobileBoxShadowSpreadRadius,vOffset:o.mobileBoxShadowVOffset,classNamePrefix:"em-mob-box_shadow-"}}})}))},children:re?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),re&&(0,V.jsx)("div",{style:{paddingBottom:4},children:(0,V.jsx)(fe,{mobileBoxShadow:v,form:l,elementSettings:e})})]}),I.formFieldVisibilityEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Display control")}),(0,V.jsx)(g.A,{gutter:20,children:(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)("div",{style:{paddingBottom:4},children:(0,V.jsx)(Re,{elementSettings:e,form:l})})})})]}),I.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,V.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(De,{})})})]})]})}):(0,V.jsx)("div",{id:"selected_element_form_desktop_props",children:(0,V.jsxs)("div",{className:"selected_form-props-wrapper",children:[(0,V.jsx)("div",{style:{paddingBottom:4},children:(0,V.jsx)(M,{form:l,elementSettings:e,tooltipTitle:o("The align attribute sets the horizontal alignment of the table.")})}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Size")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{me((e=>!e)),ne&&(o.width="",o.minWidth="",o.maxWidth="",t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{width:{value:null,dim:"px"},minWidth:{value:null,dim:"px"},maxWidth:{value:null,dim:"px"}}}))}))},children:ne?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),ne&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(b.A,{trigger:["hover"],title:o("Table width"),placement:"left",children:(0,V.jsx)(u.A.Item,{name:"width",style:{marginBottom:X.formItemMarginBottomXS},children:(0,V.jsx)(z.A,{min:0,placeholder:o("Width"),prefix:(0,V.jsx)(S.A,{}),addonAfter:(0,V.jsx)(u.A.Item,{name:"widthDim",noStyle:!0,children:lo}),style:{width:"100%"}})})}),(0,V.jsxs)(g.A,{gutter:10,style:{marginBottom:4},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Minimum width"),placement:"left",children:(0,V.jsx)(u.A.Item,{name:"minWidth",children:(0,V.jsx)(z.A,{min:0,placeholder:o("Table min width"),prefix:(0,V.jsx)(L.A,{icon:"MinWidth"}),addonAfter:(0,V.jsx)(u.A.Item,{name:"minWidthDim",noStyle:!0,children:lo})})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Maximum width"),placement:"top",children:(0,V.jsx)(u.A.Item,{name:"maxWidth",children:(0,V.jsx)(z.A,{min:0,placeholder:o("Table max width"),prefix:(0,V.jsx)(L.A,{icon:"MaxWidth"}),addonAfter:(0,V.jsx)(u.A.Item,{name:"maxWidthDim",noStyle:!0,children:lo})})})})})]})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Background")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{ge((e=>!e)),he?(o.backgroundColor="",o.backgroundImage="",o.backgroundPositionX="",o.backgroundPositionY="",o.backgroundRepeat="none",o.backgroundSize="",W(!0)):(o.backgroundColor="#E5E5E5",o.backgroundSize="",o.backgroundRepeat="none"),t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{backgroundColor:o.backgroundColor,backgroundImage:[{type:"url",value:o.backgroundImage}],backgroundPositionX:o.backgroundPositionX,backgroundPositionY:o.backgroundPositionY,backgroundRepeat:o.backgroundRepeat,backgroundSize:o.backgroundSize}})}))},children:he?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),he&&(0,V.jsxs)(g.A,{gutter:10,style:{marginBottom:D?16:0},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Background color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,V.jsx)(u.A.Item,{name:"backgroundColor",style:{marginBottom:I.formTableFieldBackgroundImageEnabled?X.formItemMarginBottomXS:X.formItemMarginBottomMD+4},children:(0,V.jsx)(G.A,{placeholder:o("Background color"),usedColors:e.usedColors})})})}),I.formTableFieldBackgroundImageEnabled&&(0,V.jsxs)(x.A,{span:D?12:24,children:[(0,V.jsx)("div",{style:{paddingBottom:D?4:0},children:(0,V.jsx)(N.A,{form:l,label:o("Background image"),name:"backgroundImage",tooltipTitle:o("Background image"),placeholder:"Background image link/route"})}),!D&&(0,V.jsxs)(u.A.Item,{style:{marginBottom:"0"},children:[(0,V.jsxs)(g.A,{gutter:10,children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Horizontal position"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"backgroundPositionX",style:{marginBottom:X.formItemMarginBottomXS},children:(0,V.jsx)(z.A,{placeholder:o("Horizontal position"),prefix:(0,V.jsx)(L.A,{icon:"BgPositionHorizontal"})})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Vertical position"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"backgroundPositionY",style:{marginBottom:X.formItemMarginBottomXS},children:(0,V.jsx)(z.A,{placeholder:o("Vertical position"),prefix:(0,V.jsx)(L.A,{icon:"BgPositionVertical"})})})})})]}),(0,V.jsxs)(g.A,{gutter:10,children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Background image repeat"),placement:"top",children:(0,V.jsx)(u.A.Item,{name:"backgroundRepeat",style:{marginBottom:X.formItemMarginBottomMD+4},children:(0,V.jsx)(Y.A,{placeholder:"Please choose",options:Se,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Background image size"),placement:"top",children:(0,V.jsx)(u.A.Item,{name:"backgroundSize",style:{marginBottom:X.formItemMarginBottomMD+4},children:(0,V.jsx)(Y.A,{placeholder:"Please choose",options:_e,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})})})})]})]})]})]}),I.formFieldBorderEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Borders")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{J((e=>!e)),K&&(o.borderWidth=null,o.borderColor="",o.borderStyle=""),s((e=>({...O.iV,[o.borderPosition]:{...e[o.borderPosition],width:o.borderWidth,color:o.borderColor,style:o.borderStyle}}))),t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{border:{all:{color:o.borderColor,style:o.borderStyle,width:o.borderWidth}}}})}))},children:K?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),K&&(0,V.jsx)("div",{style:{paddingBottom:4},children:(0,V.jsx)(T.A,{borders:d})})]}),I.formFieldBorderRadiusEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Border radius")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{te((e=>!e)),o.borderRadiusAll=oe?0:5,t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{borderRadius:{all:o.borderRadiusAll}}})}))},children:oe?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),oe&&(0,V.jsx)("div",{style:{paddingBottom:4},children:(0,V.jsx)(E.A,{form:l,oneBorderRadiusValue:m,setOneBorderRadiusValue:c,elementSettings:e})})]}),I.formFieldBoxShadowEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Box shadow")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{se((e=>!e)),de?(o.boxShadowInset=!1,o.boxShadowHOffset=0,o.boxShadowVOffset=0,o.boxShadowBlurRadius=0,o.boxShadowSpreadRadius=0,o.boxShadowColor=""):(o.boxShadowInset=!1,o.boxShadowHOffset=5,o.boxShadowVOffset=5,o.boxShadowBlurRadius=10,o.boxShadowSpreadRadius=-5,o.boxShadowColor="#000000"),t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{boxShadow:{blurRadius:o.boxShadowBlurRadius,color:o.boxShadowColor,hOffset:o.boxShadowHOffset,inset:o.boxShadowInset,spreadRadius:o.boxShadowSpreadRadius,vOffset:o.boxShadowVOffset}}})}))},children:de?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),de&&(0,V.jsx)("div",{style:{paddingBottom:4},children:(0,V.jsx)(U,{boxShadow:a})})]}),I.formFieldExportAsPictureEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Export settings")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{Be((e=>!e)),ve&&(o.exportAsPicture=!1,t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{exportAsPicture:!1}}))}))},children:ve?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),ve&&(0,V.jsx)(to,{form:l,elementSettings:e})]}),I.formFieldVisibilityEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Display control")}),(0,V.jsx)(g.A,{gutter:20,children:(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)("div",{style:{paddingBottom:4},children:(0,V.jsx)(Re,{elementSettings:e,form:l})})})})]}),I.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,V.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(De,{})})})]})]})})]})};var ao=t(90042),no=t(46929),mo=t(77416);const co=({elementSettings:e})=>{const{__:o}=(0,C.s9)(),t=(0,F.XW)(),[l]=u.A.useForm(),d=(0,Ue.rD)(),s=(0,r.d4)(He.Fv),a=(0,r.d4)(He.yy),[n,m]=(0,i.useState)({});(0,i.useEffect)((()=>{e&&l.setFieldsValue(e)}),[l,e]);return(0,V.jsx)(u.A,{form:l,layout:"vertical",name:"selected_link_form",initialValues:{href:"https://",target:"",textStrong:!1,textItalic:!1,textStrikethrough:!1,textUnderline:!1,textReplacer:""},onValuesChange:o=>{t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:o})},autoComplete:"off",className:"element-controls",children:s&&"bottom"!==a?(0,V.jsx)(mo.A,{form:l,elementSettings:e,showAddParagraph:!1}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(b.A,{trigger:["hover"],title:o("Hyperlink URL"),placement:"left",children:(0,V.jsx)(u.A.Item,{name:"href",style:{marginBottom:24,paddingRight:10},children:(0,V.jsx)(v.A,{allowClear:!0,placeholder:"href",prefix:(0,V.jsx)(B.A,{}),onSelect:({target:e})=>{const{selectionStart:o,selectionEnd:t}=e;e&&m({target:e,selection:{start:o,end:t}})}})})}),d.formLinkFieldInsertImageEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Actions with the chosen text")}),(0,V.jsx)(u.A.Item,{children:(0,V.jsx)(f.Ay,{icon:(0,V.jsx)(ao.A,{}),onClick:()=>{return e="add_img",void t({operation:O.Ru.SANDBOX_ELEMENT_TEXT,action:e});var e},children:o("Add inline image")})})]}),(0,V.jsx)(no.A,{form:l,elementSettings:e,showAddParagraph:!1,linkTarget:n})]})})};var uo=t(90847),bo=t(58013),ho=t(26786);const go=({form:e,elementSettings:o})=>{const{__:t}=(0,C.s9)(),l=(0,F.XW)(),[d,s]=(0,i.useState)(o.direction),r=t=>{const i=t.target.value,r={direction:""};i!==d?s(i):(s(""),e.setFieldsValue(r),l({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:r}))};return(0,V.jsx)(u.A.Item,{name:"direction",children:(0,V.jsx)(I.Ay.Group,{children:(0,V.jsxs)(j.A,{size:8,children:[(0,V.jsx)(b.A,{placement:"top",title:t("Right to left"),children:(0,V.jsx)(I.Ay.Button,{value:"rtl",onClick:r,children:(0,V.jsx)(bo.A,{})})}),(0,V.jsx)(b.A,{placement:"top",title:t("Left to right"),children:(0,V.jsx)(I.Ay.Button,{value:"ltr",onClick:r,children:(0,V.jsx)(ho.A,{})})})]})})})};go.defaultProps={};const xo=go;var po=t(68031);const{useToken:fo}=c.A,Ao=({form:e,elementSettings:o,mobilePaddingsExt:t,setMobilePaddingsExt:i})=>{const{__:l}=(0,C.s9)(),{token:d}=fo(),r=(0,F.XW)();return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(x.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"},children:[(0,V.jsx)("div",{className:"padding-collapsed",style:{display:t?"block":"none"},children:(0,V.jsx)(b.A,{title:l("Horizontal padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"mobilePaddingLeftRight",children:(0,V.jsx)(z.A,{min:0,placeholder:l("Horizontal"),prefix:(0,V.jsx)(L.A,{icon:"PaddingLeftRight"}),addonAfter:"px"})})})}),(0,V.jsxs)("div",{className:"padding-extended",style:{display:t?"none":"block"},children:[(0,V.jsx)(b.A,{trigger:["hover"],title:l("Left padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"mobilePaddingLeft",style:{marginBottom:d.formItemMarginBottomXS},children:(0,V.jsx)(z.A,{min:0,placeholder:l("Left"),prefix:(0,V.jsx)(L.A,{icon:"PaddingLeft"}),addonAfter:"px"})})}),(0,V.jsx)(b.A,{trigger:["hover"],title:l("Right padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"mobilePaddingRight",children:(0,V.jsx)(z.A,{min:0,placeholder:l("Right"),prefix:(0,V.jsx)(L.A,{icon:"PaddingRight"}),addonAfter:"px"})})})]})]}),(0,V.jsxs)(x.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"},children:[(0,V.jsx)("div",{className:"padding-collapsed",style:{display:t?"block":"none"},children:(0,V.jsx)(b.A,{title:l("Vertical padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"mobilePaddingTopBottom",children:(0,V.jsx)(z.A,{min:0,placeholder:l("Vertical"),prefix:(0,V.jsx)(L.A,{icon:"PaddingTopBottom"}),addonAfter:"px"})})})}),(0,V.jsxs)("div",{className:"padding-extended",style:{display:t?"none":"block"},children:[(0,V.jsx)(b.A,{trigger:["hover"],title:l("Top padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"mobilePaddingTop",style:{marginBottom:d.formItemMarginBottomXS},children:(0,V.jsx)(z.A,{min:0,placeholder:l("Top"),prefix:(0,V.jsx)(L.A,{icon:"PaddingTop"}),addonAfter:"px"})})}),(0,V.jsx)(b.A,{trigger:["hover"],title:l("Bottom padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"mobilePaddingBottom",children:(0,V.jsx)(z.A,{min:0,placeholder:l("Bottom"),prefix:(0,V.jsx)(L.A,{icon:"PaddingBottom"}),addonAfter:"px"})})})]})]}),(0,V.jsx)(x.A,{span:4,style:{width:45,flex:"auto",maxWidth:"none"},children:(0,V.jsx)(b.A,{title:l("Individual padding"),placement:"bottom",children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button",{"selected-td-form__button--active":!t}),onClick:()=>{i((e=>!e));const l=e.getFieldsValue(!0);t||(l.mobilePaddingLeftRight=l.mobilePaddingLeft,l.mobilePaddingTopBottom=l.mobilePaddingTop,l.mobilePaddingRight=l.mobilePaddingLeft,l.mobilePaddingBottom=l.mobilePaddingTop,r({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:{mobilePadding:{top:""!==l.mobilePaddingTop?l.mobilePaddingTop:null,bottom:""!==l.mobilePaddingTopBottom?l.mobilePaddingTopBottom:null,left:""!==l.mobilePaddingLeft?l.mobilePaddingLeft:null,right:""!==l.mobilePaddingRight?l.mobilePaddingRight:null,classNamePrefix:"em-mob-padding_"}}}))},children:(0,V.jsx)(L.A,{icon:"PaddingSwitcher"})})})})]})},jo=({form:e,elementSettings:o})=>{var t;const{__:l}=(0,C.s9)(),[d,s]=(0,i.useState)(null===(t=o.mobileDirection)||void 0===t?void 0:t.value),r=(0,F.XW)(),a=t=>{const i=t.target.value,l={mobileDirection:{classNamePrefix:"em-mob-direction-",value:""}};i!==d?s(i):(s(""),e.setFieldsValue(l),r({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:l}))};return(0,V.jsx)(u.A.Item,{name:"mobileDirection",children:(0,V.jsx)(I.Ay.Group,{children:(0,V.jsxs)(j.A,{size:8,children:[(0,V.jsx)(b.A,{placement:"top",title:l("Right to left"),children:(0,V.jsx)(I.Ay.Button,{value:"rtl",onClick:a,children:(0,V.jsx)(bo.A,{})})}),(0,V.jsx)(b.A,{placement:"top",title:l("Left to right"),children:(0,V.jsx)(I.Ay.Button,{value:"ltr",onClick:a,children:(0,V.jsx)(ho.A,{})})})]})})})};jo.defaultProps={};const vo=jo,{Option:Bo}=Y.A,So=(0,V.jsxs)(Y.A,{className:"select-after",getPopupContainer:e=>e.parentNode,children:[(0,V.jsx)(Bo,{value:"px",children:"px"}),(0,V.jsx)(Bo,{value:"%",children:"%"})]}),{useToken:_o}=c.A,Ro=({elementSettings:e})=>{const{__:o}=(0,C.s9)(),t=(0,F.XW)(),l=(0,r.wA)(),[d]=u.A.useForm(),[m,c]=(0,i.useState)(""),[A,j]=(0,i.useState)({}),[B,y]=(0,i.useState)({}),[w,P]=(0,i.useState)({}),[I,D]=(0,i.useState)({}),[M,X]=(0,i.useState)(!0),[H,q]=(0,i.useState)(!0),$=(0,r.d4)(He.Ct),K=(0,r.d4)(He.CS),J=(0,r.d4)(a.Hs),ee=(0,Ue.rD)(),[oe,te]=(0,i.useState)(""===e.backgroundImage[0].value),{token:ie}=_o(),le=(0,r.d4)(He.Fv),de=(0,r.d4)(He.yy),se=le&&"bottom"!==de,[re,ae]=(0,i.useState)(!1),[ne,me]=(0,i.useState)(!1),[ue,be]=(0,i.useState)(!1),[he,ge]=(0,i.useState)(!1),[xe,Ae]=(0,i.useState)(!1),[Be,Se]=(0,i.useState)(!1),[_e,ke]=(0,i.useState)(!1),[ye,we]=(0,i.useState)(!1),[Pe,Ne]=(0,i.useState)(!1),[Te,Ee]=(0,i.useState)(!1),[Ie,Ce]=(0,i.useState)(!1),[Le,Oe]=(0,i.useState)(!1),[Fe,Ve]=(0,i.useState)(!1),[Me,We]=(0,i.useState)(!1),Xe=J.hasOwnProperty("type")?O.IE:O.Tm,ze=[{label:o("Not defined"),value:"none"},{label:o("Do not repeat background (no-repeat)"),value:"no-repeat"},{label:o("Repeat background (repeat)"),value:"repeat"},{label:o("Repeat background horizontally (repeat-x)"),value:"repeat-x"},{label:o("Repeat background vertically (repeat-y)"),value:"repeat-y"}],Ge=[{label:o("Not defined"),value:""},{label:o("Contain"),value:"contain"},{label:o("Cover"),value:"cover"}];(0,i.useEffect)((()=>{if(e){var o,t,i,l,s,r,a,n,m,c,u,b,h,g,x,p,f,A,v,B,S,_,R,k,w,N,T,E,I,C,L,O,F,V,M,W,H,z,G,U,Y,$,K,J,Z,Q,ee,oe,ie,le,de,se,re;const ne=e.border,ce=e.boxShadow,ue=e.mobileBorder,he=e.mobileBoxShadow;j(ne),P(ce),y(ue),D(he);const xe=Object.keys(ne).find((e=>{var o,t,i;return(null===(o=ne[e])||void 0===o?void 0:o.width)||(null===(t=ne[e])||void 0===t?void 0:t.style)||(null===(i=ne[e])||void 0===i?void 0:i.color)})),pe=Object.keys(ue).find((e=>{var o,t,i;return(null===(o=ue[e])||void 0===o?void 0:o.width)||(null===(t=ue[e])||void 0===t?void 0:t.style)||(null===(i=ue[e])||void 0===i?void 0:i.color)}));d.setFieldsValue({...e,width:null===(o=e.width)||void 0===o?void 0:o.value,widthDim:null===(t=e.width)||void 0===t?void 0:t.dim,height:null===(i=e.height)||void 0===i?void 0:i.value,heightDim:null===(l=e.height)||void 0===l?void 0:l.dim,backgroundImage:e.backgroundImage[0].value,show:e.show?e.show:"all",borderPosition:xe||"all",borderWidth:(null===(s=ne[xe])||void 0===s?void 0:s.width)||"",borderColor:(null===(r=ne[xe])||void 0===r?void 0:r.color)||"",borderStyle:(null===(a=ne[xe])||void 0===a?void 0:a.style)||"",paddingTop:(0,$e.ok)(null===(n=e.padding)||void 0===n?void 0:n.all)||(0,$e.ok)(null===(m=e.padding)||void 0===m?void 0:m.top),paddingLeft:(0,$e.ok)(null===(c=e.padding)||void 0===c?void 0:c.all)||(0,$e.ok)(null===(u=e.padding)||void 0===u?void 0:u.left),paddingRight:(0,$e.ok)(null===(b=e.padding)||void 0===b?void 0:b.all)||(0,$e.ok)(null===(h=e.padding)||void 0===h?void 0:h.right),paddingBottom:(0,$e.ok)(null===(g=e.padding)||void 0===g?void 0:g.all)||(0,$e.ok)(null===(x=e.padding)||void 0===x?void 0:x.bottom),paddingLeftRight:(0,$e.ok)(null===(p=e.padding)||void 0===p?void 0:p.left)||(0,$e.ok)(null===(f=e.padding)||void 0===f?void 0:f.right),paddingTopBottom:(0,$e.ok)(null===(A=e.padding)||void 0===A?void 0:A.top)||(0,$e.ok)(null===(v=e.padding)||void 0===v?void 0:v.bottom),borderRadiusAll:(0,$e.ok)(e.borderRadius.all),borderRadiusTopLeft:(0,$e.ok)(e.borderRadius.topLeft),borderRadiusBottomLeft:(0,$e.ok)(e.borderRadius.bottomLeft),borderRadiusTopRight:(0,$e.ok)(e.borderRadius.topRight),borderRadiusBottomRight:(0,$e.ok)(e.borderRadius.bottomRight),boxShadowInset:(0,$e.ok)(null===(B=e.boxShadow)||void 0===B?void 0:B.inset)||!1,boxShadowHOffset:(0,$e.ok)(null===(S=e.boxShadow)||void 0===S?void 0:S.hOffset),boxShadowVOffset:(0,$e.ok)(null===(_=e.boxShadow)||void 0===_?void 0:_.vOffset),boxShadowBlurRadius:(0,$e.ok)(null===(R=e.boxShadow)||void 0===R?void 0:R.blurRadius),boxShadowSpreadRadius:(0,$e.ok)(null===(k=e.boxShadow)||void 0===k?void 0:k.spreadRadius),boxShadowColor:(0,$e.ok)(null===(w=e.boxShadow)||void 0===w?void 0:w.color),mobileWidth:(0,$e.xc)(null===(N=e.mobileWidth)||void 0===N?void 0:N.value),mobileWidthDim:null===(T=e.mobileWidth)||void 0===T?void 0:T.dim,mobileHeight:(0,$e.xc)(null===(E=e.mobileHeight)||void 0===E?void 0:E.value),mobileHeightDim:null===(I=e.mobileHeight)||void 0===I?void 0:I.dim,mobileBorderPosition:pe||"all",mobileBorderWidth:null!==(null===(C=ue[pe])||void 0===C?void 0:C.width)?null===(L=ue[pe])||void 0===L?void 0:L.width:"",mobileBorderColor:(null===(O=ue[pe])||void 0===O?void 0:O.color)||"",mobileBorderStyle:(null===(F=ue[pe])||void 0===F?void 0:F.style)||"",mobileBorderRadiusAll:(0,$e.ok)(e.mobileBorderRadius.all),mobileRadiusTopLeft:(0,$e.ok)(null!==e.mobileBorderRadius.topLeft?e.mobileBorderRadius.topLeft:e.mobileBorderRadius.all),mobileRadiusBottomLeft:(0,$e.ok)(null!==e.mobileBorderRadius.bottomLeft?e.mobileBorderRadius.bottomLeft:e.mobileBorderRadius.all),mobileRadiusTopRight:(0,$e.ok)(null!==e.mobileBorderRadius.topRight?e.mobileBorderRadius.topRight:e.mobileBorderRadius.all),mobileRadiusBottomRight:(0,$e.ok)(null!==e.mobileBorderRadius.bottomRight?e.mobileBorderRadius.bottomRight:e.mobileBorderRadius.all),mobileBoxShadowInset:(0,$e.ok)(null===(V=e.mobileBoxShadow)||void 0===V?void 0:V.inset)||!1,mobileBoxShadowHOffset:(0,$e.ok)(null===(M=e.mobileBoxShadow)||void 0===M?void 0:M.hOffset),mobileBoxShadowVOffset:(0,$e.ok)(null===(W=e.mobileBoxShadow)||void 0===W?void 0:W.vOffset),mobileBoxShadowBlurRadius:(0,$e.ok)(null===(H=e.mobileBoxShadow)||void 0===H?void 0:H.blurRadius),mobileBoxShadowSpreadRadius:(0,$e.ok)(null===(z=e.mobileBoxShadow)||void 0===z?void 0:z.spreadRadius),mobileBoxShadowColor:(0,$e.ok)(null===(G=e.mobileBoxShadow)||void 0===G?void 0:G.color),mobileAlign:(0,$e.ok)(null===(U=e.mobileAlign)||void 0===U?void 0:U.value),mobileVerticalAlign:(0,$e.ok)(null===(Y=e.mobileVerticalAlign)||void 0===Y?void 0:Y.value),mobileBackgroundColor:(0,$e.ok)("none"!==(null===($=e.mobileBackgroundColor)||void 0===$?void 0:$.value)?null===(K=e.mobileBackgroundColor)||void 0===K?void 0:K.value:""),mobileBackgroundImage:"none"!==e.mobileBackgroundImage[0].value?e.mobileBackgroundImage[0].value:"",mobileBackgroundPositionX:(0,$e.ok)(null===(J=e.mobileBackgroundPositionX)||void 0===J?void 0:J.value),mobileBackgroundPositionY:(0,$e.ok)(null===(Z=e.mobileBackgroundPositionY)||void 0===Z?void 0:Z.value),mobileBackgroundRepeat:null!==(Q=e.mobileBackgroundRepeat)&&void 0!==Q&&Q.value?null===(ee=e.mobileBackgroundRepeat)||void 0===ee?void 0:ee.value:"none",mobilePaddingTop:(0,$e.ok)(e.mobilePadding.all)||(0,$e.ok)(e.mobilePadding.top),mobilePaddingLeft:(0,$e.ok)(e.mobilePadding.all)||(0,$e.ok)(e.mobilePadding.left),mobilePaddingRight:(0,$e.ok)(e.mobilePadding.all)||(0,$e.ok)(e.mobilePadding.right),mobilePaddingBottom:(0,$e.ok)(e.mobilePadding.all)||(0,$e.ok)(e.mobilePadding.bottom),mobilePaddingTopBottom:(0,$e.ok)(e.mobilePadding.top)||(0,$e.ok)(e.mobilePadding.bottom),mobilePaddingLeftRight:(0,$e.ok)(e.mobilePadding.left)||(0,$e.ok)(e.mobilePadding.right),exportAsPicture:null===e||void 0===e?void 0:e.exportAsPicture}),!(0,$e.ok)(e.borderRadius.all)&&((0,$e.ok)(e.borderRadius.topLeft)||(0,$e.ok)(e.borderRadius.bottomLeft)||(0,$e.ok)(e.borderRadius.topRight)||(0,$e.ok)(e.borderRadius.bottomRight))?X(!1):X(!0),(0,$e.ok)(e.mobileBorderRadius.topLeft)||(0,$e.ok)(e.mobileBorderRadius.bottomLeft)||(0,$e.ok)(e.mobileBorderRadius.topRight)||(0,$e.ok)(e.mobileBorderRadius.bottomRight)?q(!1):q(!0),te(""===e.backgroundImage[0].value),(0,$e.ok)(e.padding.all)||!((0,$e.ok)(e.padding.top)||(0,$e.ok)(e.padding.right)||(0,$e.ok)(e.padding.bottom)||(0,$e.ok)(e.padding.left))||e.padding.top===e.padding.bottom&&e.padding.right===e.padding.left?ae(!0):ae(!1),(0,$e.ok)(e.mobilePadding.all)||!((0,$e.ok)(e.mobilePadding.top)||(0,$e.ok)(e.mobilePadding.right)||(0,$e.ok)(e.mobilePadding.bottom)||(0,$e.ok)(e.mobilePadding.left))||e.mobilePadding.top===e.mobilePadding.bottom&&e.mobilePadding.right===e.mobilePadding.left?me(!0):me(!1),be(!(null===(oe=ne[xe])||void 0===oe||!oe.width)||!(null===(ie=ne[xe])||void 0===ie||!ie.style)||!(null===(le=ne[xe])||void 0===le||!le.color)),ge(!(null===(de=ue[pe])||void 0===de||!de.width)||!(null===(se=ue[pe])||void 0===se||!se.style)||!(null===(re=ue[pe])||void 0===re||!re.color)),Ae(!!e.borderRadius.all||!!e.borderRadius.topLeft||!!e.borderRadius.bottomLeft||!!e.borderRadius.topRight||!!e.borderRadius.bottomRight),Se(!!e.mobileBorderRadius.all||!!e.mobileBorderRadius.topLeft||!!e.mobileBorderRadius.bottomLeft||!!e.mobileBorderRadius.topRight||!!e.mobileBorderRadius.bottomRight),ke(!!e.boxShadow),we(!!e.mobileBoxShadow.blurRadius||!!e.mobileBoxShadow.color||!!e.mobileBoxShadow.hOffset||!!e.mobileBoxShadow.inset||!!e.mobileBoxShadow.spreadRadius||!!e.mobileBoxShadow.vOffset),Ne(!!e.width.value&&"column"!==e.type||!!e.height.value),Ee(!!e.mobileWidth.value||!!e.mobileHeight.value),Ce(!!e.backgroundColor||!!e.backgroundImage[0].value||!!e.backgroundPositionY||!!e.backgroundPositionX||"repeat"!==e.backgroundRepeat||!e.backgroundRepeat,!!e.backgroundSize),Oe(!!e.mobileBackgroundColor.value),Ve(!!e.exportAsPicture),We(!!e.mobilePadding.all||0===e.mobilePadding.all||!!e.mobilePadding.top||0===e.mobilePadding.top||!!e.mobilePadding.bottom||0===e.mobilePadding.bottom||!!e.mobilePadding.left||0===e.mobilePadding.left||!!e.mobilePadding.right||0===e.mobilePadding.right)}}),[d,e]);const Ye=(0,i.useCallback)((e=>{l(Xe===O.Tm?(0,a.A9)(e):(0,n.A9)(e))}),[l,Xe]);return(0,V.jsxs)(u.A,{form:d,layout:"vertical",name:"selected_td_form",initialValues:{backgroundColor:"",backgroundImage:"",backgroundPositionX:"",backgroundPositionY:"",backgroundRepeat:"",backgroundSize:"",exportAsPicture:!1,width:"",height:"",widthDim:"",heightDim:"",align:"",valign:"",border:"",show:"all",borderPosition:"",borderColor:"",borderWidth:"",borderStyle:"",paddingTop:"",paddingLeft:"",paddingRight:"",paddingBottom:"",borderRadiusAll:"",borderRadiusTopLeft:"",borderRadiusBottomLeft:"",borderRadiusTopRight:"",borderRadiusBottomRight:"",direction:"",boxShadowInset:"",boxShadowHOffset:"",boxShadowVOffset:"",boxShadowBlurRadius:"",boxShadowSpreadRadius:"",boxShadowColor:"",mobileWidth:"",mobileWidthDim:"",mobileHeight:"",mobileHeightDim:"",mobileBorder:"",mobileBorderPosition:"",mobileBorderColor:"",mobileBorderWidth:"",mobileBorderStyle:"",mobileBoxShadow:"",mobileAlign:"",mobileVerticalAlign:"",mobileBackgroundColor:"",mobileBackgroundImage:"",mobilePaddingTop:"",mobilePaddingLeft:"",mobilePaddingRight:"",mobilePaddingBottom:"",textStrong:!1,textItalic:!1,textStrikethrough:!1,textUnderline:!1},onValuesChange:o=>{const i=d.getFieldsValue(!0),l=Object.keys(o)[0];let s;switch(c("%"===d.getFieldsValue(!0).widthDim?100:""),l){case"exportAsPicture":s={exportAsPicture:i.exportAsPicture};break;case"boxShadowInset":case"boxShadowHOffset":case"boxShadowVOffset":case"boxShadowBlurRadius":case"boxShadowSpreadRadius":case"boxShadowColor":s={boxShadow:{hOffset:i.boxShadowHOffset,vOffset:i.boxShadowVOffset,blurRadius:i.boxShadowBlurRadius,spreadRadius:i.boxShadowSpreadRadius,color:i.boxShadowColor,inset:i.boxShadowInset}};break;case"borderStyle":s={border:{[i.borderPosition]:{...A[i.borderPosition],style:o[l]}}},"all"===i.borderPosition?j((e=>({...O.iV,[i.borderPosition]:{...e[i.borderPosition],style:o[l]}}))):j((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],style:o[l]}})));break;case"borderColor":s={border:{[i.borderPosition]:{...A[i.borderPosition],color:o[l]}}},"all"===i.borderPosition?j((e=>({...O.iV,[i.borderPosition]:{...e[i.borderPosition],color:o[l]}}))):j((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],color:o[l]}})));break;case"borderWidth":s={border:{[i.borderPosition]:{...A[i.borderPosition],width:o[l]}}},"all"===i.borderPosition?j((e=>({...O.iV,[i.borderPosition]:{...e[i.borderPosition],width:o[l]}}))):j((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],width:o[l]}})));break;case"borderPosition":d.setFieldsValue({borderWidth:A[o[l]].width||"",borderColor:A[o[l]].color||"",borderStyle:A[o[l]].style||""});break;case"width":s={[l]:{value:o[l],dim:i.widthDim}};break;case"height":s={[l]:{value:o[l],dim:i.heightDim}};break;case"widthDim":s={width:{value:i.width,dim:o[l]}};break;case"heightDim":s={height:{value:i.height,dim:o[l]}};break;case"backgroundImage":te(""===o[l]),s={[l]:[{...e.backgroundImage[0],value:o[l]}],backgroundSize:"cover"};break;case"paddingTop":case"paddingLeft":case"paddingRight":case"paddingBottom":s={padding:{left:i.paddingLeft,right:i.paddingRight,top:i.paddingTop,bottom:i.paddingBottom,[$e.yy[l]]:+o[l]}};break;case"paddingTopBottom":s={padding:{left:i.paddingLeft,right:i.paddingRight,top:+o[l],bottom:+o[l]}},i.paddingTop=i.paddingBottom=+o[l];break;case"paddingLeftRight":s={padding:{top:i.paddingTop,bottom:i.paddingBottom,left:+o[l],right:+o[l]}},i.paddingLeft=i.paddingRight=+o[l];break;case"borderRadiusAll":s={borderRadius:{[O.wF[l]]:+o[l]}};break;case"borderRadiusTopLeft":case"borderRadiusBottomLeft":case"borderRadiusTopRight":case"borderRadiusBottomRight":s={borderRadius:{topLeft:i.borderRadiusTopLeft,bottomLeft:i.borderRadiusBottomLeft,topRight:i.borderRadiusTopRight,bottomRight:i.borderRadiusBottomRight,[O.wF[l]]:+o[l]}};break;case"mobileWidth":s={[l]:{classNamePrefix:"em-mob-width-",value:o[l],dim:i.mobileWidthDim}};break;case"mobileWidthDim":s={mobileWidth:{classNamePrefix:"em-mob-width-",value:i.mobileWidth,dim:o[l]}};break;case"mobileHeight":s={[l]:{classNamePrefix:"em-mob-height-",value:o[l],dim:i.mobileHeightDim}};break;case"mobileHeightDim":s={mobileHeight:{classNamePrefix:"em-mob-height-",value:i.mobileHeight,dim:o[l]}};break;case"mobileBorderStyle":s={mobileBorder:{[i.mobileBorderPosition]:{...B[i.mobileBorderPosition],style:o[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?y((e=>({...O.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:o[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):y((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:o[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderColor":s={mobileBorder:{[i.mobileBorderPosition]:{...B[i.mobileBorderPosition],color:o[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?y((e=>({...O.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:o[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):y((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:o[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderWidth":s={mobileBorder:{[i.mobileBorderPosition]:{...B[i.mobileBorderPosition],width:o[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?y((e=>({...O.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:o[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):y((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:o[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderPosition":d.setFieldsValue({mobileBorderWidth:B[o[l]].width||"",mobileBorderColor:B[o[l]].color||"",mobileBorderStyle:B[o[l]].style||""});break;case"mobileBorderRadiusAll":case"mobileRadiusTopLeft":case"mobileRadiusBottomLeft":case"mobileRadiusTopRight":case"mobileRadiusBottomRight":s={mobileBorderRadius:{[$e.NW[l]]:o[l],classNamePrefix:"em-mob-border_radius_"+$e.NW[l]+"-"}};break;case"mobileBoxShadowInset":case"mobileBoxShadowHOffset":case"mobileBoxShadowVOffset":case"mobileBoxShadowBlurRadius":case"mobileBoxShadowSpreadRadius":case"mobileBoxShadowColor":s={mobileBoxShadow:{hOffset:i.mobileBoxShadowHOffset,vOffset:i.mobileBoxShadowVOffset,blurRadius:i.mobileBoxShadowBlurRadius,spreadRadius:i.mobileBoxShadowSpreadRadius,color:i.mobileBoxShadowColor,inset:i.mobileBoxShadowInset,classNamePrefix:"em-mob-box_shadow-"}};break;case"mobileAlign":s={[l]:{classNamePrefix:"em-mob-text_align-",value:o[l]}};break;case"mobileVerticalAlign":s={[l]:{classNamePrefix:"em-mob-vertical_align-",value:o[l]}};break;case"mobileBackgroundColor":s={[l]:{classNamePrefix:"em-mob-background_color-",value:o[l]}};break;case"mobileBackgroundImage":s={[l]:[{...e.mobileBackgroundImage[0],classNamePrefix:"em-mob-background_image-",value:o[l]}]};break;case"mobileBackgroundPositionX":s={[l]:{classNamePrefix:"em-mob-background_position_x-",value:o[l]}};break;case"mobileBackgroundPositionY":s={[l]:{classNamePrefix:"em-mob-background_position_x-",value:o[l]}};break;case"mobileBackgroundRepeat":s={[l]:{classNamePrefix:"em-mob-background_repeat-",value:o[l]}};break;case"mobilePaddingTop":case"mobilePaddingLeft":case"mobilePaddingRight":case"mobilePaddingBottom":s={mobilePadding:{all:null,top:""!==i.mobilePaddingTop?i.mobilePaddingTop:null,right:""!==i.mobilePaddingRight?i.mobilePaddingRight:null,bottom:""!==i.mobilePaddingBottom?i.mobilePaddingBottom:null,left:""!==i.mobilePaddingLeft?i.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobilePaddingTopBottom":i.mobilePaddingTop=i.mobilePaddingBottom=o[l],s={mobilePadding:{all:null,top:""!==i.mobilePaddingTop?i.mobilePaddingTop:null,right:""!==i.mobilePaddingRight?i.mobilePaddingRight:null,bottom:""!==i.mobilePaddingBottom?i.mobilePaddingBottom:null,left:""!==i.mobilePaddingLeft?i.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobilePaddingLeftRight":i.mobilePaddingLeft=i.mobilePaddingRight=o[l],s={mobilePadding:{all:null,top:""!==i.mobilePaddingTop?i.mobilePaddingTop:null,right:""!==i.mobilePaddingRight?i.mobilePaddingRight:null,bottom:""!==i.mobilePaddingBottom?i.mobilePaddingBottom:null,left:""!==i.mobilePaddingLeft?i.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;default:s=o}"borderPosition"!==l&&(t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:s}),Ye({...e,...s,activateSection:null,changeKey:l}))},autoComplete:"off",className:"element-controls",children:[!se&&(0,V.jsx)(b.A,{title:o("To change the appearance of the element on the mobile device, edit the fields below. If the fields remain empty, the desktop styles will be applied to the mobile version."),placement:"bottom",children:(0,V.jsx)(h.A,{className:"selected_form-mobile-props-title",message:o("Appearance on mobile devices"),type:"info"})}),$===O.ND&&K.styles?(0,V.jsx)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",style:{display:$===O.ND&&K.styles?"block":"none"},children:(0,V.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[(0,V.jsxs)(g.A,{gutter:20,children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(je,{form:d,elementSettings:e,imgParent:!0})}),ee.formCellFieldVerticalAlignEnabled&&"group"!==e.type&&("structure"!==e.type||"structure"===e.type&&1===e.floatBlocks.items.length)&&(0,V.jsx)(x.A,{span:12,style:{textAlign:"right"},children:(0,V.jsx)(ve,{form:d,elementSettings:e})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),ee.formCellFieldPaddingsEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Padding")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{We((e=>!e)),Me&&(o.mobilePaddingLeftRight="",o.mobilePaddingLeft="",o.mobilePaddingRight="",o.mobilePaddingTopBottom="",o.mobilePaddingTop="",o.mobilePaddingBottom="",t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobilePadding:{all:null,top:null,right:null,bottom:null,left:null,classNamePrefix:"em-mob-padding_"}}}))}))},children:Me?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Me&&(0,V.jsx)(g.A,{gutter:10,style:{paddingBottom:4},children:(0,V.jsx)(V.Fragment,{children:(0,V.jsx)(Ao,{form:d,elementSettings:e,mobilePaddingsExt:ne,setMobilePaddingsExt:me})})}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"})]}),"group"!==e.type&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Size")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{Ee((e=>!e)),Te&&(o.mobileWidth="",o.mobileHeight="",t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileWidth:{value:null,dim:"px",classNamePrefix:"em-mob-width-"},mobileHeight:{value:null,dim:"px",classNamePrefix:"em-mob-height-"}}}))}))},children:Te?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Te&&(0,V.jsxs)(g.A,{gutter:10,style:{paddingBottom:9},children:["structure"!==e.type&&(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)("div",{style:{marginBottom:15},children:(0,V.jsx)(Z,{form:d,name:"mobileWidth",elementSettings:e})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)("div",{style:{marginBottom:15},children:(0,V.jsx)(Q.A,{form:d,name:"mobileHeight",elementSettings:e})})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"})]}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Background")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{Oe((e=>!e)),o.mobileBackgroundColor=Le?"":"#E5E5E5",t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBackgroundColor:{classNamePrefix:"em-mob-background_color-",value:o.mobileBackgroundColor}}})}))},children:Le?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Le&&(0,V.jsx)(V.Fragment,{children:(0,V.jsx)("div",{style:{marginBottom:(ee.formCellFieldBackgroundImageEnabled,ie.formItemMarginBottomMD+4)},children:(0,V.jsx)(oo,{form:d,elementSettings:e,label:o("Background color")})})}),!1,ee.formFieldBorderEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Borders")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{ge((e=>!e)),he&&(o.mobileBorderWidth=null,o.mobileBorderColor="",o.mobileBorderStyle=""),y((e=>({...O.iV,[o.mobileBorderPosition]:{...e[o.mobileBorderPosition],width:o.mobileBorderWidth,color:o.mobileBorderColor,style:o.mobileBorderStyle}}))),t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorder:{all:{color:o.mobileBorderColor,style:o.mobileBorderStyle,width:o.mobileBorderWidth,classNamePrefix:"em-mob-border_"+o.mobileBorderPosition+"-"}}}})}))},children:he?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),he&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(ce,{mobileBorders:B})})]}),ee.formFieldBorderRadiusEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Border radius")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{Se((e=>!e)),o.mobileBorderRadiusAll=Be?null:5,t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorderRadius:{all:o.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})}))},children:Be?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Be&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(pe,{form:d,oneMobileBorderRadiusValue:H,setOneMobileBorderRadiusValue:q})})]}),ee.formFieldBoxShadowEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Box shadow")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{we((e=>!e)),ye?(o.mobileBoxShadowInset=!1,o.mobileBoxShadowHOffset=null,o.mobileBoxShadowVOffset=null,o.mobileBoxShadowBlurRadius=null,o.mobileBoxShadowSpreadRadius=null,o.mobileBoxShadowColor=""):(o.mobileBoxShadowInset=!1,o.mobileBoxShadowHOffset=5,o.mobileBoxShadowVOffset=5,o.mobileBoxShadowBlurRadius=10,o.mobileBoxShadowSpreadRadius=-5,o.mobileBoxShadowColor="#000000"),t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBoxShadow:{blurRadius:o.mobileBoxShadowBlurRadius,color:o.mobileBoxShadowColor,hOffset:o.mobileBoxShadowHOffset,inset:o.mobileBoxShadowInset,spreadRadius:o.mobileBoxShadowSpreadRadius,vOffset:o.mobileBoxShadowVOffset,classNamePrefix:"em-mob-box_shadow-"}}})}))},children:ye?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),ye&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(fe,{mobileBoxShadow:I,form:d,elementSettings:e})})]}),ee.formFieldVisibilityEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("group"!==e.type?"Display control & Direction":"Display control")}),(0,V.jsxs)(g.A,{gutter:20,style:{marginBottom:4},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(Re,{elementSettings:e,form:d})}),"group"!==e.type&&(0,V.jsx)(x.A,{span:12,style:{textAlign:"group"!==e.type?"right":"left"},children:(0,V.jsx)(vo,{elementSettings:e,form:d})})]})]}),ee.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,V.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(De,{})})})]})]})}):(0,V.jsx)("div",{id:"selected_element_form_desktop_props",children:(0,V.jsxs)("div",{className:"selected_form-props-wrapper",children:[(0,V.jsxs)(g.A,{gutter:10,style:{paddingBottom:4},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(po.A,{form:d,elementSettings:e})}),ee.formCellFieldVerticalAlignEnabled&&"group"!==e.type&&("structure"!==e.type||"structure"===e.type&&1===e.floatBlocks.items.length)&&(0,V.jsx)(x.A,{span:12,style:{textAlign:"right"},children:(0,V.jsx)(W.A,{form:d,elementSettings:e})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),ee.formCellFieldPaddingsEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("div",{className:"form-group-title",children:o("Padding")}),(0,V.jsx)(g.A,{gutter:10,style:{paddingBottom:4},children:(0,V.jsxs)(V.Fragment,{children:["group"!==e.type&&"column"!==e.type&&(0,V.jsxs)(x.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"},children:[(0,V.jsx)("div",{className:"padding-collapsed",style:{display:re?"block":"none"},children:(0,V.jsx)(b.A,{title:o("Horizontal padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"paddingLeftRight",children:(0,V.jsx)(z.A,{min:0,placeholder:o("Horizontal"),prefix:(0,V.jsx)(L.A,{icon:"PaddingLeftRight"}),addonAfter:"px"})})})}),(0,V.jsxs)("div",{className:"padding-extended",style:{display:re?"none":"block"},children:[(0,V.jsx)(b.A,{trigger:["hover"],title:o("Left padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"paddingLeft",style:{marginBottom:ie.formItemMarginBottomXS},children:(0,V.jsx)(z.A,{min:0,placeholder:o("Left"),prefix:(0,V.jsx)(L.A,{icon:"PaddingLeft"}),addonAfter:"px"})})}),(0,V.jsx)(b.A,{trigger:["hover"],title:o("Right padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"paddingRight",children:(0,V.jsx)(z.A,{min:0,placeholder:o("Right"),prefix:(0,V.jsx)(L.A,{icon:"PaddingRight"}),addonAfter:"px"})})})]})]}),(0,V.jsxs)(x.A,{span:10,style:{width:"group"!==e.type&&"column"!==e.type?156:45,flex:"auto",maxWidth:"none"},children:[(0,V.jsx)("div",{className:"padding-collapsed",style:{display:re?"block":"none"},children:(0,V.jsx)(b.A,{title:o("Vertical padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"paddingTopBottom",children:(0,V.jsx)(z.A,{min:0,placeholder:o("Vertical"),prefix:(0,V.jsx)(L.A,{icon:"PaddingTopBottom"}),addonAfter:"px"})})})}),(0,V.jsxs)("div",{className:"padding-extended",style:{display:re?"none":"block"},children:[(0,V.jsx)(b.A,{trigger:["hover"],title:o("Top padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"paddingTop",style:{marginBottom:ie.formItemMarginBottomXS},children:(0,V.jsx)(z.A,{min:0,placeholder:o("Top"),prefix:(0,V.jsx)(L.A,{icon:"PaddingTop"}),addonAfter:"px"})})}),(0,V.jsx)(b.A,{trigger:["hover"],title:o("Bottom padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"paddingBottom",children:(0,V.jsx)(z.A,{min:0,placeholder:o("Bottom"),prefix:(0,V.jsx)(L.A,{icon:"PaddingBottom"}),addonAfter:"px"})})})]})]}),(0,V.jsx)(x.A,{span:4,style:{width:45,flex:"auto",maxWidth:"none"},children:(0,V.jsx)(b.A,{title:o("Individual padding"),placement:"bottom",children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button",{"selected-td-form__button--active":!re}),onClick:()=>{ae((e=>!e));const o=d.getFieldsValue(!0);re||(o.paddingLeftRight=o.paddingLeft,o.paddingTopBottom=o.paddingTop,o.paddingRight=o.paddingLeft,o.paddingBottom=o.paddingTop,t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{padding:{top:o.paddingTopBottom,bottom:o.paddingTopBottom,left:o.paddingLeftRight,right:o.paddingLeftRight}}}))},children:(0,V.jsx)(L.A,{icon:"PaddingSwitcher"})})})})]})}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"})]}),"group"!==e.type&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Size")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{Ne((e=>!e)),Pe&&(o.width="",o.height="",t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{width:{value:null,dim:"px"},height:{value:null,dim:"px"}}}))}))},children:Pe?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Pe&&(0,V.jsxs)(g.A,{gutter:10,style:{paddingBottom:4},children:["structure"!==e.type&&"column"!==e.type&&(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{title:o("Width"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"width",style:{marginBottom:ie.formItemMarginBottomXS},children:(0,V.jsx)(z.A,{min:0,max:m,placeholder:o("Width"),prefix:(0,V.jsx)(S.A,{}),addonAfter:(0,V.jsx)(u.A.Item,{name:"widthDim",noStyle:!0,children:So})})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{title:o("Height"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"height",children:(0,V.jsx)(z.A,{min:0,placeholder:o("Height"),prefix:(0,V.jsx)(_.A,{}),addonAfter:"px"})})})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"})]}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Background")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{Ce((e=>!e)),Ie?(o.backgroundColor="",o.backgroundImage="",o.backgroundPositionX="",o.backgroundPositionY="",o.backgroundRepeat="none",o.backgroundSize="",te(!0)):(o.backgroundColor="#E5E5E5",o.backgroundSize="",o.backgroundRepeat="none"),t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{backgroundColor:o.backgroundColor,backgroundImage:[{type:"url",value:o.backgroundImage}],backgroundPositionX:o.backgroundPositionX,backgroundPositionY:o.backgroundPositionY,backgroundRepeat:o.backgroundRepeat,backgroundSize:o.backgroundSize}})}))},children:Ie?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Ie&&(0,V.jsxs)(g.A,{gutter:10,style:{marginBottom:oe?16:0},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Background color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,V.jsx)(u.A.Item,{name:"backgroundColor",style:{marginBottom:ee.formCellFieldBackgroundImageEnabled?ie.formItemMarginBottomXS:ie.formItemMarginBottomMD+4},children:(0,V.jsx)(G.A,{placeholder:o("Background color"),usedColors:e.usedColors})})})}),ee.formCellFieldBackgroundImageEnabled&&(0,V.jsxs)(x.A,{span:oe?12:24,children:[(0,V.jsx)(N.A,{form:d,label:o("Background image"),name:"backgroundImage",tooltipTitle:o("Background image"),placeholder:"Background image link/route"}),!oe&&(0,V.jsxs)(u.A.Item,{style:{marginBottom:"0"},children:[(0,V.jsxs)(g.A,{gutter:10,children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Horizontal position"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"backgroundPositionX",style:{marginBottom:ie.formItemMarginBottomXS},children:(0,V.jsx)(v.A,{placeholder:o("Horizontal position"),prefix:(0,V.jsx)(L.A,{icon:"BgPositionHorizontal"})})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Vertical position"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"backgroundPositionY",style:{marginBottom:ie.formItemMarginBottomXS},children:(0,V.jsx)(v.A,{placeholder:o("Vertical position"),prefix:(0,V.jsx)(L.A,{icon:"BgPositionVertical"})})})})})]}),(0,V.jsxs)(g.A,{gutter:10,children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Background image repeat"),placement:"top",children:(0,V.jsx)(u.A.Item,{name:"backgroundRepeat",style:{marginBottom:ie.formItemMarginBottomMD+4},children:(0,V.jsx)(Y.A,{placeholder:o("Please choose"),options:ze,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Background image size"),placement:"top",children:(0,V.jsx)(u.A.Item,{name:"backgroundSize",style:{marginBottom:ie.formItemMarginBottomMD+4},children:(0,V.jsx)(Y.A,{placeholder:o("Please choose"),options:Ge,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})})})})]})]})]})]}),ee.formFieldBorderEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Borders")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{be((e=>!e)),ue&&(o.borderWidth=null,o.borderColor="",o.borderStyle=""),j((e=>({...O.iV,[o.borderPosition]:{...e[o.borderPosition],width:o.borderWidth,color:o.borderColor,style:o.borderStyle}}))),t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{border:{all:{color:o.borderColor,style:o.borderStyle,width:o.borderWidth}}}})}))},children:ue?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),ue&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(T.A,{borders:A})})]}),ee.formFieldBorderRadiusEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Border radius")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{Ae((e=>!e)),o.borderRadiusAll=xe?0:5,t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{borderRadius:{all:o.borderRadiusAll}}})}))},children:xe?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),xe&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(E.A,{form:d,oneBorderRadiusValue:M,setOneBorderRadiusValue:X,elementSettings:e})})]}),ee.formFieldBoxShadowEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Box shadow")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{ke((e=>!e)),_e?(o.boxShadowInset=!1,o.boxShadowHOffset=0,o.boxShadowVOffset=0,o.boxShadowBlurRadius=0,o.boxShadowSpreadRadius=0,o.boxShadowColor=""):(o.boxShadowInset=!1,o.boxShadowHOffset=5,o.boxShadowVOffset=5,o.boxShadowBlurRadius=10,o.boxShadowSpreadRadius=-5,o.boxShadowColor="#000000"),t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{boxShadow:{blurRadius:o.boxShadowBlurRadius,color:o.boxShadowColor,hOffset:o.boxShadowHOffset,inset:o.boxShadowInset,spreadRadius:o.boxShadowSpreadRadius,vOffset:o.boxShadowVOffset}}})}))},children:_e?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),_e&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(U,{boxShadow:w})})]}),ee.formFieldExportAsPictureEnabled&&"group"!==e.type&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Export settings")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{Ve((e=>!e)),Fe&&(o.exportAsPicture=!1,t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{exportAsPicture:!1}}))}))},children:Fe?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Fe&&(0,V.jsx)(V.Fragment,{children:(0,V.jsx)(to,{form:d,elementSettings:e})})]}),ee.formFieldVisibilityEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("group"!==e.type?"Display control & Direction":"Display control")}),(0,V.jsxs)(g.A,{gutter:20,style:{marginBottom:4},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(Re,{elementSettings:e,form:d})}),"group"!==e.type&&(0,V.jsx)(x.A,{span:12,style:{textAlign:"group"!==e.type?"right":"left"},children:(0,V.jsx)(xo,{elementSettings:e,form:d})})]})]}),ee.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,V.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(De,{})})})]})]})})]})};var ko=t(40187);const{Option:yo}=Y.A,wo=(0,V.jsxs)(Y.A,{className:"select-after",getPopupContainer:e=>e.parentNode,children:[(0,V.jsx)(yo,{value:"px",children:"px"}),(0,V.jsx)(yo,{value:"%",children:"%"})]}),{useToken:Po}=c.A,No=({elementSettings:e})=>{const{__:o}=(0,C.s9)(),t=(0,F.XW)(),[l]=u.A.useForm(),[d,a]=(0,i.useState)({}),[n,m]=(0,i.useState)({}),[c,A]=(0,i.useState)(!0),[j,B]=(0,i.useState)({}),[y,w]=(0,i.useState)({}),[P,I]=(0,i.useState)(!0),D=(0,r.d4)(He.Ct),M=(0,r.d4)(He.CS),X=(0,Ue.rD)(),[H,q]=(0,i.useState)(""===e.backgroundImage[0].value),{token:$}=Po(),K=(0,r.d4)(He.Fv),J=(0,r.d4)(He.yy),ee=K&&"bottom"!==J,[oe,te]=(0,i.useState)(!1),[ie,le]=(0,i.useState)(!1),[de,se]=(0,i.useState)(!1),[re,ae]=(0,i.useState)(!1),[ne,me]=(0,i.useState)(!1),[ue,be]=(0,i.useState)(!1),[he,ge]=(0,i.useState)(!1),[xe,Ae]=(0,i.useState)(!1),[je,Be]=(0,i.useState)(!1),[Se,_e]=(0,i.useState)(!1),[ke,ye]=(0,i.useState)(!1),[we,Pe]=(0,i.useState)(!1),[Ne,Te]=(0,i.useState)(!1),[Ee,Ie]=(0,i.useState)(!1),[Ce,Le]=(0,i.useState)(!1),[Oe,Fe]=(0,i.useState)(""),Ve=[{label:o("Not defined"),value:"none"},{label:o("Do not repeat background (no-repeat)"),value:"no-repeat"},{label:o("Repeat background (repeat)"),value:"repeat"},{label:o("Repeat background horizontally (repeat-x)"),value:"repeat-x"},{label:o("Repeat background vertically (repeat-y)"),value:"repeat-y"}],Me=[{label:o("Not defined"),value:""},{label:o("Contain"),value:"contain"},{label:o("Cover"),value:"cover"}];(0,i.useEffect)((()=>{if(e){var o,t,i,d,s,r,n,c,u,b,h,g,x,p,f,j,v,S,_,R,k,y,P,N,T,E,C,L,O,F,V,D,M,W,X,H,z,G,U,Y,$,K,J,Z,Q,ee,oe,ie,de,re,ne;const ce=e.border,ue=e.boxShadow,he=e.mobileBorder,xe=e.mobileBoxShadow;a(ce),m(ue),B(he),w(xe);const pe=Object.keys(ce).find((e=>{var o,t,i;return(null===(o=ce[e])||void 0===o?void 0:o.width)||(null===(t=ce[e])||void 0===t?void 0:t.style)||(null===(i=ce[e])||void 0===i?void 0:i.color)})),fe=Object.keys(he).find((e=>{var o,t,i;return(null===(o=he[e])||void 0===o?void 0:o.width)||(null===(t=he[e])||void 0===t?void 0:t.style)||(null===(i=he[e])||void 0===i?void 0:i.color)}));l.setFieldsValue({...e,width:null===(o=e.width)||void 0===o?void 0:o.value,widthDim:null===(t=e.width)||void 0===t?void 0:t.dim,height:null===(i=e.height)||void 0===i?void 0:i.value,heightDim:null===(d=e.height)||void 0===d?void 0:d.dim,maxWidth:null===(s=e.maxWidth)||void 0===s?void 0:s.value,maxWidthDim:null===(r=e.maxWidth)||void 0===r?void 0:r.dim,minWidth:null===(n=e.minWidth)||void 0===n?void 0:n.value,minWidthDim:null===(c=e.minWidth)||void 0===c?void 0:c.dim,backgroundImage:e.backgroundImage[0].value,show:e.show?e.show:"all",borderPosition:pe||"all",borderWidth:(null===(u=ce[pe])||void 0===u?void 0:u.width)||"",borderColor:(null===(b=ce[pe])||void 0===b?void 0:b.color)||"",borderStyle:(null===(h=ce[pe])||void 0===h?void 0:h.style)||"",paddingTop:(0,$e.ok)(e.padding.all)||(0,$e.ok)(e.padding.top),paddingLeft:(0,$e.ok)(e.padding.all)||(0,$e.ok)(e.padding.left),paddingRight:(0,$e.ok)(e.padding.all)||(0,$e.ok)(e.padding.right),paddingBottom:(0,$e.ok)(e.padding.all)||(0,$e.ok)(e.padding.bottom),paddingLeftRight:(0,$e.ok)(null===(g=e.padding)||void 0===g?void 0:g.left)||(0,$e.ok)(null===(x=e.padding)||void 0===x?void 0:x.right),paddingTopBottom:(0,$e.ok)(null===(p=e.padding)||void 0===p?void 0:p.top)||(0,$e.ok)(null===(f=e.padding)||void 0===f?void 0:f.bottom),borderRadiusAll:(0,$e.ok)(e.borderRadius.all),borderRadiusTopLeft:(0,$e.ok)(e.borderRadius.topLeft),borderRadiusBottomLeft:(0,$e.ok)(e.borderRadius.bottomLeft),borderRadiusTopRight:(0,$e.ok)(e.borderRadius.topRight),borderRadiusBottomRight:(0,$e.ok)(e.borderRadius.bottomRight),boxShadowInset:(0,$e.ok)(null===(j=e.boxShadow)||void 0===j?void 0:j.inset)||!1,boxShadowHOffset:(0,$e.ok)(null===(v=e.boxShadow)||void 0===v?void 0:v.hOffset),boxShadowVOffset:(0,$e.ok)(null===(S=e.boxShadow)||void 0===S?void 0:S.vOffset),boxShadowBlurRadius:(0,$e.ok)(null===(_=e.boxShadow)||void 0===_?void 0:_.blurRadius),boxShadowSpreadRadius:(0,$e.ok)(null===(R=e.boxShadow)||void 0===R?void 0:R.spreadRadius),boxShadowColor:(0,$e.ok)(null===(k=e.boxShadow)||void 0===k?void 0:k.color),mobileWidth:(0,$e.xc)(null===(y=e.mobileWidth)||void 0===y?void 0:y.value),mobileWidthDim:null===(P=e.mobileWidth)||void 0===P?void 0:P.dim,mobileHeight:(0,$e.xc)(null===(N=e.mobileHeight)||void 0===N?void 0:N.value),mobileHeightDim:null===(T=e.mobileHeight)||void 0===T?void 0:T.dim,mobileBorderPosition:fe||"all",mobileBorderWidth:null!==(null===(E=he[fe])||void 0===E?void 0:E.width)?null===(C=he[fe])||void 0===C?void 0:C.width:"",mobileBorderColor:(null===(L=he[fe])||void 0===L?void 0:L.color)||"",mobileBorderStyle:(null===(O=he[fe])||void 0===O?void 0:O.style)||"",mobileBorderRadiusAll:(0,$e.ok)(e.mobileBorderRadius.all),mobileRadiusTopLeft:(0,$e.ok)(null!==e.mobileBorderRadius.topLeft?e.mobileBorderRadius.topLeft:e.mobileBorderRadius.all),mobileRadiusBottomLeft:(0,$e.ok)(null!==e.mobileBorderRadius.bottomLeft?e.mobileBorderRadius.bottomLeft:e.mobileBorderRadius.all),mobileRadiusTopRight:(0,$e.ok)(null!==e.mobileBorderRadius.topRight?e.mobileBorderRadius.topRight:e.mobileBorderRadius.all),mobileRadiusBottomRight:(0,$e.ok)(null!==e.mobileBorderRadius.bottomRight?e.mobileBorderRadius.bottomRight:e.mobileBorderRadius.all),mobileBoxShadowInset:(0,$e.ok)(null===(F=e.mobileBoxShadow)||void 0===F?void 0:F.inset)||!1,mobileBoxShadowHOffset:(0,$e.ok)(null===(V=e.mobileBoxShadow)||void 0===V?void 0:V.hOffset),mobileBoxShadowVOffset:(0,$e.ok)(null===(D=e.mobileBoxShadow)||void 0===D?void 0:D.vOffset),mobileBoxShadowBlurRadius:(0,$e.ok)(null===(M=e.mobileBoxShadow)||void 0===M?void 0:M.blurRadius),mobileBoxShadowSpreadRadius:(0,$e.ok)(null===(W=e.mobileBoxShadow)||void 0===W?void 0:W.spreadRadius),mobileBoxShadowColor:(0,$e.ok)(null===(X=e.mobileBoxShadow)||void 0===X?void 0:X.color),mobileAlign:(0,$e.ok)(null===(H=e.mobileAlign)||void 0===H?void 0:H.value),mobileVerticalAlign:(0,$e.ok)(null===(z=e.mobileVerticalAlign)||void 0===z?void 0:z.value),mobileDirection:(0,$e.ok)(null===(G=e.mobileDirection)||void 0===G?void 0:G.value),mobileBackgroundColor:(0,$e.ok)("none"!==(null===(U=e.mobileBackgroundColor)||void 0===U?void 0:U.value)?null===(Y=e.mobileBackgroundColor)||void 0===Y?void 0:Y.value:""),mobileBackgroundImage:"none"!==e.mobileBackgroundImage[0].value?e.mobileBackgroundImage[0].value:"",mobileBackgroundPositionX:(0,$e.ok)(null===($=e.mobileBackgroundPositionX)||void 0===$?void 0:$.value),mobileBackgroundPositionY:(0,$e.ok)(null===(K=e.mobileBackgroundPositionY)||void 0===K?void 0:K.value),mobileBackgroundRepeat:null!==(J=e.mobileBackgroundRepeat)&&void 0!==J&&J.value?null===(Z=e.mobileBackgroundRepeat)||void 0===Z?void 0:Z.value:"none",mobilePaddingTop:(0,$e.ok)(e.mobilePadding.all)||(0,$e.ok)(e.mobilePadding.top),mobilePaddingLeft:(0,$e.ok)(e.mobilePadding.all)||(0,$e.ok)(e.mobilePadding.left),mobilePaddingRight:(0,$e.ok)(e.mobilePadding.all)||(0,$e.ok)(e.mobilePadding.right),mobilePaddingBottom:(0,$e.ok)(e.mobilePadding.all)||(0,$e.ok)(e.mobilePadding.bottom),mobilePaddingTopBottom:(0,$e.ok)(e.mobilePadding.top)||(0,$e.ok)(e.mobilePadding.bottom),mobilePaddingLeftRight:(0,$e.ok)(e.mobilePadding.left)||(0,$e.ok)(e.mobilePadding.right),exportAsPicture:null===e||void 0===e?void 0:e.exportAsPicture}),!(0,$e.ok)(e.borderRadius.all)&&((0,$e.ok)(e.borderRadius.topLeft)||(0,$e.ok)(e.borderRadius.bottomLeft)||(0,$e.ok)(e.borderRadius.topRight)||(0,$e.ok)(e.borderRadius.bottomRight))?A(!1):A(!0),!(0,$e.ok)(e.mobileBorderRadius.all)&&((0,$e.ok)(e.mobileBorderRadius.topLeft)||(0,$e.ok)(e.mobileBorderRadius.bottomLeft)||(0,$e.ok)(e.mobileBorderRadius.topRight)||(0,$e.ok)(e.mobileBorderRadius.bottomRight))?I(!1):I(!0),q(""===e.backgroundImage[0].value),(0,$e.ok)(e.padding.all)||!((0,$e.ok)(e.padding.top)||(0,$e.ok)(e.padding.right)||(0,$e.ok)(e.padding.bottom)||(0,$e.ok)(e.padding.left))||e.padding.top===e.padding.bottom&&e.padding.right===e.padding.left?te(!0):te(!1),(0,$e.ok)(e.mobilePadding.all)||!((0,$e.ok)(e.mobilePadding.top)||(0,$e.ok)(e.mobilePadding.right)||(0,$e.ok)(e.mobilePadding.bottom)||(0,$e.ok)(e.mobilePadding.left))||e.mobilePadding.top===e.mobilePadding.bottom&&e.mobilePadding.right===e.mobilePadding.left?le(!0):le(!1),se(!(null===(Q=ce[pe])||void 0===Q||!Q.width)),ae(!(null===(ee=he[fe])||void 0===ee||!ee.width)),me(!!e.borderRadius.all||!!e.borderRadius.topLeft||!!e.borderRadius.bottomLeft||!!e.borderRadius.topRight||!!e.borderRadius.bottomRight),be(!!e.mobileBorderRadius.all||!!e.mobileBorderRadius.topLeft||!!e.mobileBorderRadius.bottomLeft||!!e.mobileBorderRadius.topRight||!!e.mobileBorderRadius.bottomRight),ge(!!e.boxShadow),Ae(!!e.mobileBoxShadow.blurRadius||!!e.mobileBoxShadow.color||!!e.mobileBoxShadow.hOffset||!!e.mobileBoxShadow.inset||!!e.mobileBoxShadow.spreadRadius||!!e.mobileBoxShadow.vOffset),Be(!!e.width.value||!!e.height.value||!!e.minWidth.value||!!e.maxWidth.value),_e(!!e.mobileWidth.value||!!e.mobileHeight.value),ye(!!e.backgroundColor||!!e.backgroundImage[0].value||!!e.backgroundPositionY||!!e.backgroundPositionX||"repeat"!==e.backgroundRepeat||!e.backgroundRepeat,!!e.backgroundSize),Pe(!!e.mobileBackgroundColor.value),Te(!!e.exportAsPicture),Ie(!(null===(oe=e.padding)||void 0===oe||!oe.all)||!(null===(ie=e.padding)||void 0===ie||!ie.top)||!(null===(de=e.padding)||void 0===de||!de.bottom)||!(null===(re=e.padding)||void 0===re||!re.left)||!(null===(ne=e.padding)||void 0===ne||!ne.right)),Le(!!e.mobilePadding.all||!!e.mobilePadding.top||!!e.mobilePadding.bottom||!!e.mobilePadding.left||!!e.mobilePadding.right)}}),[l,e]);return(0,V.jsxs)(u.A,{form:l,layout:"vertical",name:"selected_div_form",initialValues:{backgroundColor:"",backgroundImage:"",backgroundPositionX:"",backgroundPositionY:"",backgroundRepeat:"",backgroundSize:"",exportAsPicture:!1,width:"",height:"",widthDim:"",heightDim:"",maxWidth:{value:"",dim:""},minWidth:{value:"",dim:""},align:"",valign:"",border:"",boxShadow:"",show:"all",borderPosition:"",borderColor:"",borderWidth:"",borderStyle:"",paddingTop:"",paddingLeft:"",paddingRight:"",paddingBottom:"",borderRadiusAll:"",borderRadiusTopLeft:"",borderRadiusBottomLeft:"",borderRadiusTopRight:"",borderRadiusBottomRight:"",direction:"",mobileWidth:"",mobileWidthDim:"",mobileHeight:"",mobileHeightDim:"",mobileBorder:"",mobileBorderPosition:"",mobileBorderColor:"",mobileBorderWidth:"",mobileBorderStyle:"",mobileBoxShadow:"",mobileAlign:"",mobileDirection:"",mobileVerticalAlign:"",mobileBackgroundColor:"",mobileBackgroundImage:"",mobilePaddingTop:"",mobilePaddingLeft:"",mobilePaddingRight:"",mobilePaddingBottom:""},onValuesChange:o=>{const i=l.getFieldsValue(!0),s=Object.keys(o)[0];let r;switch(Fe("%"===l.getFieldsValue(!0).widthDim?100:""),s){case"exportAsPicture":r={exportAsPicture:i.exportAsPicture};break;case"boxShadowInset":case"boxShadowHOffset":case"boxShadowVOffset":case"boxShadowBlurRadius":case"boxShadowSpreadRadius":case"boxShadowColor":r={boxShadow:{hOffset:i.boxShadowHOffset,vOffset:i.boxShadowVOffset,blurRadius:i.boxShadowBlurRadius,spreadRadius:i.boxShadowSpreadRadius,color:i.boxShadowColor,inset:i.boxShadowInset}};break;case"borderStyle":r={border:{[i.borderPosition]:{...d[i.borderPosition],style:o[s]}}},"all"===i.borderPosition?a((e=>({...O.iV,[i.borderPosition]:{...e[i.borderPosition],style:o[s]}}))):a((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],style:o[s]}})));break;case"borderColor":r={border:{[i.borderPosition]:{...d[i.borderPosition],color:o[s]}}},"all"===i.borderPosition?a((e=>({...O.iV,[i.borderPosition]:{...e[i.borderPosition],color:o[s]}}))):a((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],color:o[s]}})));break;case"borderWidth":r={border:{[i.borderPosition]:{...d[i.borderPosition],width:o[s]}}},"all"===i.borderPosition?a((e=>({...O.iV,[i.borderPosition]:{...e[i.borderPosition],width:o[s]}}))):a((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],width:o[s]}})));break;case"borderPosition":l.setFieldsValue({borderWidth:d[o[s]].width||"",borderColor:d[o[s]].color||"",borderStyle:d[o[s]].style||""});break;case"width":r={[s]:{value:o[s],dim:i.widthDim}};break;case"height":r={[s]:{value:o[s],dim:i.heightDim}};break;case"widthDim":r={width:{value:i.width,dim:o[s]}};break;case"heightDim":r={height:{value:i.height,dim:o[s]}};break;case"maxWidth":r={[s]:{value:o[s],dim:i.maxWidthDim}};break;case"maxWidthDim":r={maxWidth:{value:i.maxWidth,dim:o[s]}};break;case"minWidth":r={[s]:{value:o[s],dim:i.minWidthDim}};break;case"minWidthDim":r={minWidth:{value:i.minWidth,dim:o[s]}};break;case"backgroundImage":q(""===o[s]),r={[s]:[{...e.backgroundImage[0],value:o[s]}],backgroundSize:"cover"};break;case"paddingTop":case"paddingLeft":case"paddingRight":case"paddingBottom":r={padding:{[$e.yy[s]]:+o[s]}};break;case"paddingTopBottom":r={padding:{top:+o[s],bottom:+o[s]}},i.paddingTop=i.paddingBottom=+o[s];break;case"paddingLeftRight":r={padding:{left:+o[s],right:+o[s]}},i.paddingLeft=i.paddingRight=+o[s];break;case"borderRadiusAll":case"borderRadiusTopLeft":case"borderRadiusBottomLeft":case"borderRadiusTopRight":case"borderRadiusBottomRight":r={borderRadius:{[O.wF[s]]:+o[s]}};break;case"mobileWidth":r={[s]:{classNamePrefix:"em-mob-width-",value:o[s],dim:i.mobileWidthDim}};break;case"mobileWidthDim":r={mobileWidth:{classNamePrefix:"em-mob-width-",value:i.mobileWidth,dim:o[s]}};break;case"mobileHeight":r={[s]:{classNamePrefix:"em-mob-height-",value:o[s],dim:i.mobileHeightDim}};break;case"mobileHeightDim":r={mobileHeight:{classNamePrefix:"em-mob-height-",value:i.mobileHeight,dim:o[s]}};break;case"mobileBorderStyle":r={mobileBorder:{[i.mobileBorderPosition]:{...j[i.mobileBorderPosition],style:o[s],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?B((e=>({...O.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:o[s],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):B((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:o[s],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderColor":r={mobileBorder:{[i.mobileBorderPosition]:{...j[i.mobileBorderPosition],color:o[s],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?B((e=>({...O.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:o[s],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):B((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:o[s],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderWidth":r={mobileBorder:{[i.mobileBorderPosition]:{...j[i.mobileBorderPosition],width:o[s],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?B((e=>({...O.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:o[s],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):B((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:o[s],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderPosition":l.setFieldsValue({mobileBorderWidth:j[o[s]].width||"",mobileBorderColor:j[o[s]].color||"",mobileBorderStyle:j[o[s]].style||""});break;case"mobileBorderRadiusAll":case"mobileRadiusTopLeft":case"mobileRadiusBottomLeft":case"mobileRadiusTopRight":case"mobileRadiusBottomRight":r={mobileBorderRadius:{[$e.NW[s]]:o[s],classNamePrefix:"em-mob-border_radius_"+$e.NW[s]+"-"}};break;case"mobileBoxShadowInset":case"mobileBoxShadowHOffset":case"mobileBoxShadowVOffset":case"mobileBoxShadowBlurRadius":case"mobileBoxShadowSpreadRadius":case"mobileBoxShadowColor":r={mobileBoxShadow:{hOffset:i.mobileBoxShadowHOffset,vOffset:i.mobileBoxShadowVOffset,blurRadius:i.mobileBoxShadowBlurRadius,spreadRadius:i.mobileBoxShadowSpreadRadius,color:i.mobileBoxShadowColor,inset:i.mobileBoxShadowInset,classNamePrefix:"em-mob-box_shadow-"}};break;case"mobileAlign":r={[s]:{classNamePrefix:"em-mob-text_align-",value:o[s]}};break;case"mobileVerticalAlign":r={[s]:{classNamePrefix:"em-mob-vertical_align-",value:o[s]}};break;case"mobileBackgroundColor":r={[s]:{classNamePrefix:"em-mob-background_color-",value:o[s]}};break;case"mobileBackgroundImage":r={[s]:[{...e.mobileBackgroundImage[0],classNamePrefix:"em-mob-background_image-",value:o[s]}]};break;case"mobileBackgroundPositionX":r={[s]:{classNamePrefix:"em-mob-background_position_x-",value:o[s]}};break;case"mobileBackgroundPositionY":r={[s]:{classNamePrefix:"em-mob-background_position_x-",value:o[s]}};break;case"mobileBackgroundRepeat":r={[s]:{classNamePrefix:"em-mob-background_repeat-",value:o[s]}};break;case"mobilePaddingTop":case"mobilePaddingLeft":case"mobilePaddingRight":case"mobilePaddingBottom":r={mobilePadding:{all:null,top:""!==i.mobilePaddingTop?i.mobilePaddingTop:null,right:""!==i.mobilePaddingRight?i.mobilePaddingRight:null,bottom:""!==i.mobilePaddingBottom?i.mobilePaddingBottom:null,left:""!==i.mobilePaddingLeft?i.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobilePaddingTopBottom":i.mobilePaddingTop=i.mobilePaddingBottom=o[s],r={mobilePadding:{all:null,top:""!==i.mobilePaddingTop?i.mobilePaddingTop:null,right:""!==i.mobilePaddingRight?i.mobilePaddingRight:null,bottom:""!==i.mobilePaddingBottom?i.mobilePaddingBottom:null,left:""!==i.mobilePaddingLeft?i.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobilePaddingLeftRight":i.mobilePaddingLeft=i.mobilePaddingRight=o[s],r={mobilePadding:{all:null,top:""!==i.mobilePaddingTop?i.mobilePaddingTop:null,right:""!==i.mobilePaddingRight?i.mobilePaddingRight:null,bottom:""!==i.mobilePaddingBottom?i.mobilePaddingBottom:null,left:""!==i.mobilePaddingLeft?i.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobileDirection":r={[s]:{classNamePrefix:"em-mob-direction-",value:o[s]}};break;default:r=o}"borderPosition"!==s&&t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:r})},autoComplete:"off",className:"element-controls",children:[!ee&&(0,V.jsx)(b.A,{title:o("To change the appearance of the element on the mobile device, edit the fields below. If the fields remain empty, the desktop styles will be applied to the mobile version."),placement:"bottom",children:(0,V.jsx)(h.A,{className:"selected_form-mobile-props-title",message:o("Appearance on mobile devices"),type:"info"})}),D===O.ND&&M.styles?(0,V.jsx)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",children:(0,V.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[(0,V.jsxs)(g.A,{gutter:20,style:{paddingBottom:4},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(ko.A,{form:l,elementSettings:e,imgParent:!0})}),(0,V.jsx)(x.A,{span:12,style:{textAlign:"right"},children:(0,V.jsx)(ve,{form:l,elementSettings:e})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),X.formCellFieldPaddingsEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Padding")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{Le((e=>!e)),Ce&&(o.mobilePaddingLeftRight="",o.mobilePaddingLeft="",o.mobilePaddingRight="",o.mobilePaddingTopBottom="",o.mobilePaddingTop="",o.mobilePaddingBottom="",t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobilePadding:{all:null,top:null,right:null,bottom:null,left:null,classNamePrefix:"em-mob-padding_"}}}))}))},children:Ce?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Ce&&(0,V.jsx)(g.A,{gutter:10,style:{paddingBottom:4},children:(0,V.jsx)(V.Fragment,{children:(0,V.jsx)(Ao,{form:l,elementSettings:e,mobilePaddingsExt:ie,setMobilePaddingsExt:le})})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Size")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{setTimeout((()=>{_e((e=>!e))}))},children:Se?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Se&&(0,V.jsxs)(g.A,{gutter:10,style:{paddingBottom:8},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)("div",{style:{marginBottom:2*$.formItemMarginBottomXS},children:(0,V.jsx)(Z,{form:l,name:"mobileWidth",elementSettings:e})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)("div",{style:{marginBottom:$.formItemMarginBottomXS},children:(0,V.jsx)(Q.A,{form:l,name:"mobileHeight",elementSettings:e})})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Background")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{Pe((e=>!e)),o.mobileBackgroundColor=we?"":"#E5E5E5",t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBackgroundColor:{classNamePrefix:"em-mob-background_color-",value:o.mobileBackgroundColor}}})}))},children:we?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),we&&(0,V.jsx)("div",{style:{marginBottom:(X.formDivFieldBackgroundImageEnabled,$.formItemMarginBottomMD+4)},children:(0,V.jsx)(oo,{form:l,elementSettings:e,label:o("Background color")})}),!1,X.formFieldBorderEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Borders")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{ae((e=>!e)),re&&(o.mobileBorderWidth=null,o.mobileBorderColor="",o.mobileBorderStyle=""),B((e=>({...O.iV,[o.mobileBorderPosition]:{...e[o.mobileBorderPosition],width:o.mobileBorderWidth,color:o.mobileBorderColor,style:o.mobileBorderStyle}}))),t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorder:{all:{color:o.mobileBorderColor,style:o.mobileBorderStyle,width:o.mobileBorderWidth,classNamePrefix:"em-mob-border_"+o.mobileBorderPosition+"-"}}}})}))},children:re?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),re&&(0,V.jsx)("div",{style:{paddingBottom:4},children:(0,V.jsx)(ce,{mobileBorders:j})})]}),X.formFieldBorderRadiusEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Border radius")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{be((e=>!e)),o.mobileBorderRadiusAll=ue?null:5,t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorderRadius:{all:o.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})}))},children:ue?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),ue&&(0,V.jsx)("div",{style:{paddingBottom:4},children:(0,V.jsx)(pe,{form:l,oneMobileBorderRadiusValue:P,setOneMobileBorderRadiusValue:I})})]}),X.formFieldBoxShadowEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Box shadow")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{Ae((e=>!e)),xe?(o.mobileBoxShadowInset=!1,o.mobileBoxShadowHOffset=null,o.mobileBoxShadowVOffset=null,o.mobileBoxShadowBlurRadius=null,o.mobileBoxShadowSpreadRadius=null,o.mobileBoxShadowColor=""):(o.mobileBoxShadowInset=!1,o.mobileBoxShadowHOffset=5,o.mobileBoxShadowVOffset=5,o.mobileBoxShadowBlurRadius=10,o.mobileBoxShadowSpreadRadius=-5,o.mobileBoxShadowColor="#000000"),t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBoxShadow:{blurRadius:o.mobileBoxShadowBlurRadius,color:o.mobileBoxShadowColor,hOffset:o.mobileBoxShadowHOffset,inset:o.mobileBoxShadowInset,spreadRadius:o.mobileBoxShadowSpreadRadius,vOffset:o.mobileBoxShadowVOffset,classNamePrefix:"em-mob-box_shadow-"}}})}))},children:xe?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),xe&&(0,V.jsx)("div",{style:{paddingBottom:4},children:(0,V.jsx)(fe,{mobileBoxShadow:y,form:l,elementSettings:e})})]}),X.formFieldVisibilityEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Display control & Direction")}),(0,V.jsxs)(g.A,{gutter:20,style:{paddingBottom:4},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(Re,{elementSettings:e,form:l})}),(0,V.jsx)(x.A,{span:12,style:{textAlign:"right"},children:(0,V.jsx)(vo,{elementSettings:e,form:l})})]})]}),X.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,V.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(De,{})})})]})]})}):(0,V.jsxs)("div",{id:"selected_element_form_desktop_props",children:[(0,V.jsx)(h.A,{className:"selected_form-desktop-props-title",message:o("Appearance on mobile devices"),type:"info"}),(0,V.jsxs)("div",{className:"selected_form-props-wrapper",children:[(0,V.jsxs)(g.A,{gutter:20,style:{marginBottom:4},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(po.A,{form:l,elementSettings:e})}),(0,V.jsx)(x.A,{span:12,style:{textAlign:"right"},children:(0,V.jsx)(W.A,{form:l,elementSettings:e})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),X.formCellFieldPaddingsEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Padding")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{Ie((e=>!e)),Ee&&(o.paddingLeftRight="",o.paddingLeft="",o.paddingRight="",o.paddingTopBottom="",o.paddingTop="",o.paddingBottom="",t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{padding:{all:0}}}))}))},children:Ee?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Ee&&(0,V.jsx)(g.A,{gutter:10,style:{marginBottom:4},children:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(x.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"},children:[(0,V.jsx)("div",{className:"padding-collapsed",style:{display:oe?"block":"none"},children:(0,V.jsx)(b.A,{title:o("Horizontal padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"paddingLeftRight",children:(0,V.jsx)(z.A,{min:0,placeholder:o("Horizontal"),prefix:(0,V.jsx)(L.A,{icon:"PaddingLeftRight"}),addonAfter:"px"})})})}),(0,V.jsxs)("div",{className:"padding-extended",style:{display:oe?"none":"block"},children:[(0,V.jsx)(b.A,{trigger:["hover"],title:o("Left padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"paddingLeft",style:{marginBottom:$.formItemMarginBottomXS},children:(0,V.jsx)(z.A,{min:0,placeholder:o("Left"),prefix:(0,V.jsx)(L.A,{icon:"PaddingLeft"}),addonAfter:"px"})})}),(0,V.jsx)(b.A,{trigger:["hover"],title:o("Right padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"paddingRight",children:(0,V.jsx)(z.A,{min:0,placeholder:o("Right"),prefix:(0,V.jsx)(L.A,{icon:"PaddingRight"}),addonAfter:"px"})})})]})]}),(0,V.jsxs)(x.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"},children:[(0,V.jsx)("div",{className:"padding-collapsed",style:{display:oe?"block":"none"},children:(0,V.jsx)(b.A,{title:o("Vertical padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"paddingTopBottom",children:(0,V.jsx)(z.A,{min:0,placeholder:o("Vertical"),prefix:(0,V.jsx)(L.A,{icon:"PaddingTopBottom"}),addonAfter:"px"})})})}),(0,V.jsxs)("div",{className:"padding-extended",style:{display:oe?"none":"block"},children:[(0,V.jsx)(b.A,{trigger:["hover"],title:o("Top padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"paddingTop",style:{marginBottom:$.formItemMarginBottomXS},children:(0,V.jsx)(z.A,{min:0,placeholder:o("Top"),prefix:(0,V.jsx)(L.A,{icon:"PaddingTop"}),addonAfter:"px"})})}),(0,V.jsx)(b.A,{trigger:["hover"],title:o("Bottom padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"paddingBottom",children:(0,V.jsx)(z.A,{min:0,placeholder:o("Bottom"),prefix:(0,V.jsx)(L.A,{icon:"PaddingBottom"}),addonAfter:"px"})})})]})]}),(0,V.jsx)(x.A,{span:4,style:{width:45,flex:"auto",maxWidth:"none"},children:(0,V.jsx)(b.A,{title:o("Individual padding"),placement:"bottom",children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button",{"selected-td-form__button--active":!oe}),onClick:()=>{te((e=>!e));const o=l.getFieldsValue(!0);oe||(o.paddingLeftRight=o.paddingLeft,o.paddingTopBottom=o.paddingTop,o.paddingRight=o.paddingLeft,o.paddingBottom=o.paddingTop,t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{padding:{top:o.paddingTopBottom,bottom:o.paddingTopBottom,left:o.paddingLeftRight,right:o.paddingLeftRight}}}))},children:(0,V.jsx)(L.A,{icon:"PaddingSwitcher"})})})})]})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Size")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{setTimeout((()=>{Be((e=>!e))}))},children:je?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),je&&(0,V.jsxs)(g.A,{gutter:10,style:{marginBottom:4},children:[(0,V.jsxs)(x.A,{span:12,children:[(0,V.jsx)(b.A,{trigger:["hover"],title:o("Width"),placement:"bottom",children:(0,V.jsxs)(u.A.Item,{name:"width",className:"form-item-margin-xs",children:[" ",(0,V.jsx)(z.A,{min:0,max:Oe,placeholder:o("Width"),prefix:(0,V.jsx)(S.A,{}),addonAfter:(0,V.jsx)(u.A.Item,{name:"widthDim",noStyle:!0,children:wo})})]})}),(0,V.jsx)(b.A,{trigger:["hover"],title:o("Height"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"height",children:(0,V.jsx)(z.A,{min:0,placeholder:o("Height"),prefix:(0,V.jsx)(_.A,{}),addonAfter:"px"})})})]}),(0,V.jsxs)(x.A,{span:12,children:[(0,V.jsx)(b.A,{trigger:["hover"],title:o("Minimum width"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"minWidth",className:"form-item-margin-xs",children:(0,V.jsx)(z.A,{min:0,placeholder:o("Min width"),prefix:(0,V.jsx)(L.A,{icon:"MinWidth"}),addonAfter:(0,V.jsx)(u.A.Item,{name:"minWidthDim",noStyle:!0,children:wo})})})}),(0,V.jsx)(b.A,{trigger:["hover"],title:o("Maximum width"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"maxWidth",className:"form-item-margin-xs",children:(0,V.jsx)(z.A,{min:0,placeholder:o("Max width"),prefix:(0,V.jsx)(L.A,{icon:"MaxWidth"}),addonAfter:(0,V.jsx)(u.A.Item,{name:"maxWidthDim",noStyle:!0,children:wo})})})})]})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Background")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{ye((e=>!e)),ke?(o.backgroundColor="",o.backgroundImage="",o.backgroundPositionX="",o.backgroundPositionY="",o.backgroundRepeat="none",o.backgroundSize="",q(!0)):(o.backgroundColor="#E5E5E5",o.backgroundSize="",o.backgroundRepeat="none"),t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{backgroundColor:o.backgroundColor,backgroundImage:[{type:"url",value:o.backgroundImage}],backgroundPositionX:o.backgroundPositionX,backgroundPositionY:o.backgroundPositionY,backgroundRepeat:o.backgroundRepeat,backgroundSize:o.backgroundSize}})}))},children:ke?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),ke&&(0,V.jsxs)(g.A,{gutter:10,style:{marginBottom:H?16:0},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Background color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,V.jsx)(u.A.Item,{name:"backgroundColor",style:{marginBottom:X.formDivFieldBackgroundImageEnabled?$.formItemMarginBottomXS:$.formItemMarginBottomMD+4},children:(0,V.jsx)(G.A,{placeholder:o("Background color"),usedColors:e.usedColors})})})}),X.formDivFieldBackgroundImageEnabled&&(0,V.jsxs)(x.A,{span:H?12:24,children:[(0,V.jsx)("div",{style:{paddingBottom:H?4:0},children:(0,V.jsx)(N.A,{form:l,label:o("Background image"),name:"backgroundImage",tooltipTitle:o("Background image"),placeholder:"Background image link/route"})}),!H&&(0,V.jsxs)(u.A.Item,{style:{marginBottom:"0"},children:[(0,V.jsxs)(g.A,{gutter:10,children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Horizontal position"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"backgroundPositionX",style:{marginBottom:$.formItemMarginBottomXS},children:(0,V.jsx)(v.A,{placeholder:o("Horizontal position"),prefix:(0,V.jsx)(L.A,{icon:"BgPositionHorizontal"})})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Vertical position"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"backgroundPositionY",style:{marginBottom:$.formItemMarginBottomXS},children:(0,V.jsx)(v.A,{placeholder:o("Vertical position"),prefix:(0,V.jsx)(L.A,{icon:"BgPositionVertical"})})})})})]}),(0,V.jsxs)(g.A,{gutter:10,children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Background image repeat"),placement:"top",children:(0,V.jsx)(u.A.Item,{name:"backgroundRepeat",style:{marginBottom:$.formItemMarginBottomMD+4},children:(0,V.jsx)(Y.A,{placeholder:o("Please choose"),options:Ve,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Background image size"),placement:"top",children:(0,V.jsx)(u.A.Item,{name:"backgroundSize",style:{marginBottom:$.formItemMarginBottomMD+4},children:(0,V.jsx)(Y.A,{placeholder:o("Please choose"),options:Me,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})})})})]})]})]})]}),X.formFieldBorderEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Borders")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{se((e=>!e)),de&&(o.borderWidth=null,o.borderColor="",o.borderStyle=""),a((e=>({...O.iV,[o.borderPosition]:{...e[o.borderPosition],width:o.borderWidth,color:o.borderColor,style:o.borderStyle}}))),t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{border:{all:{color:o.borderColor,style:o.borderStyle,width:o.borderWidth}}}})}))},children:de?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),de&&(0,V.jsx)("div",{style:{paddingBottom:4},children:(0,V.jsx)(T.A,{borders:d})})]}),X.formFieldBorderRadiusEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Border radius")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{me((e=>!e)),o.borderRadiusAll=ne?0:5,t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{borderRadius:{all:o.borderRadiusAll}}})}))},children:ne?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),ne&&(0,V.jsx)("div",{style:{paddingBottom:4},children:(0,V.jsx)(E.A,{form:l,oneBorderRadiusValue:c,setOneBorderRadiusValue:A,elementSettings:e})})]}),X.formFieldBoxShadowEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Box shadow")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{ge((e=>!e)),he?(o.boxShadowInset=!1,o.boxShadowHOffset=0,o.boxShadowVOffset=0,o.boxShadowBlurRadius=0,o.boxShadowSpreadRadius=0,o.boxShadowColor=""):(o.boxShadowInset=!1,o.boxShadowHOffset=5,o.boxShadowVOffset=5,o.boxShadowBlurRadius=10,o.boxShadowSpreadRadius=-5,o.boxShadowColor="#000000"),t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{boxShadow:{blurRadius:o.boxShadowBlurRadius,color:o.boxShadowColor,hOffset:o.boxShadowHOffset,inset:o.boxShadowInset,spreadRadius:o.boxShadowSpreadRadius,vOffset:o.boxShadowVOffset}}})}))},children:he?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),he&&(0,V.jsx)("div",{style:{paddingBottom:4},children:(0,V.jsx)(U,{boxShadow:n})})]}),X.formFieldExportAsPictureEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Export settings")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{Te((e=>!e)),Ne&&(o.exportAsPicture=!1,t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{exportAsPicture:!1}}))}))},children:Ne?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Ne&&(0,V.jsx)(to,{form:l,elementSettings:e})]}),X.formFieldVisibilityEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Display control & Direction")}),(0,V.jsxs)(g.A,{gutter:20,style:{paddingBottom:4},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(Re,{elementSettings:e,form:l})}),(0,V.jsx)(x.A,{span:12,style:{textAlign:"right"},children:(0,V.jsx)(xo,{elementSettings:e,form:l})})]})]}),X.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,V.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(De,{})})})]})]})]})]})};var To=t(28777);const{Option:Eo}=Y.A,Io=(0,V.jsxs)(Y.A,{className:"select-after",getPopupContainer:e=>e.parentNode,children:[(0,V.jsx)(Eo,{value:"px",children:"px"}),(0,V.jsx)(Eo,{value:"%",children:"%"})]}),Co=(0,V.jsx)(Y.A,{className:"select-after",getPopupContainer:e=>e.parentNode,children:(0,V.jsx)(Eo,{value:"px",children:"px"})});let Lo=0;const Oo=({elementSettings:e})=>{const{__:o}=(0,C.s9)(),t=(0,F.XW)(),[l]=u.A.useForm(),d=(0,r.d4)(He.Ct),s=(0,r.d4)(He.CS),a=(0,r.d4)(He.Fv),n=(0,r.d4)(He.yy),m=(0,Ue.rD)(),c=a&&"bottom"!==n;(0,i.useEffect)((()=>{const o=e=>e&&"auto"!==e?e:0===e?"0":"";var t,i,d,s,r,a,n,m,c,u,b,h,g,x;e&&(l.setFieldsValue({...e,width:null===(t=e.width)||void 0===t?void 0:t.value,widthDim:null===(i=e.width)||void 0===i?void 0:i.dim,gap:null===(d=e.gap)||void 0===d?void 0:d.value,gapDim:null===(s=e.gap)||void 0===s?void 0:s.dim,maxWidth:null===(r=e.maxWidth)||void 0===r?void 0:r.value,maxWidthDim:null===(a=e.maxWidth)||void 0===a?void 0:a.dim,minWidth:null===(n=e.minWidth)||void 0===n?void 0:n.value,minWidthDim:null===(m=e.minWidth)||void 0===m?void 0:m.dim,show:e.show?e.show:"all",mobileWidth:o(null===(c=e.mobileWidth)||void 0===c?void 0:c.value),mobileWidthDim:null===(u=e.mobileWidth)||void 0===u?void 0:u.dim,mobileContentWidth:o(null===(b=e.mobileContentWidth)||void 0===b?void 0:b.value),mobileContentWidthDim:null===(h=e.mobileContentWidth)||void 0===h?void 0:h.dim,mobileVerticalAlign:(x=null===(g=e.mobileVerticalAlign)||void 0===g?void 0:g.value,x||(0===x?"0":""))}),Lo=e.width.value+e.gap.value)}),[l,e]);return(0,V.jsxs)(u.A,{form:l,layout:"vertical",name:"selected_float_block_form",initialValues:{width:{value:"",dim:""},gap:{value:"",dim:"px"},valign:"",show:"all",mobileWidth:"",mobileWidthDim:"",mobileContentWidth:"",mobileContentWidthDim:"",mobileVerticalAlign:""},onValuesChange:o=>{const i=l.getFieldsValue(!0),d=Object.keys(o)[0];let s;switch(d){case"width":Lo=o[d]+i.gap,s={[d]:{value:o[d],dim:i.widthDim},gap:{value:i.gap}};break;case"widthDim":s={width:{value:i.width,dim:o[d]},gap:{value:i.gap}};break;case"gap":i.width=Lo-o[d],s={[d]:{value:o[d],dim:"px"}};break;case"mobileWidth":s={[d]:{classNamePrefix:"em-mob-width-",value:o[d],dim:i.mobileWidthDim}};break;case"mobileWidthDim":s={mobileWidth:{classNamePrefix:"em-mob-width-",value:i.mobileWidth,dim:o[d]}};break;case"mobileContentWidth":s={[d]:{classNamePrefix:"em-mob-width-",value:o[d],dim:i.mobileContentWidthDim}};break;case"mobileContentWidthDim":s={mobileContentWidth:{classNamePrefix:"em-mob-width-",value:i.mobileContentWidth,dim:o[d]}};break;case"mobileVerticalAlign":s={[d]:{classNamePrefix:"em-mob-vertical_align-",value:o[d]}};break;default:s=o}t({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:s})},autoComplete:"off",className:"element-controls",children:[c&&(0,V.jsx)(b.A,{title:o("To change the appearance of the element on the mobile device, edit the fields below. If the fields remain empty, the desktop styles will be applied to the mobile version."),placement:"bottom",children:(0,V.jsx)(h.A,{className:"selected_form-mobile-props-title",message:o("Appearance on mobile devices"),type:"info"})}),d===O.ND&&s.styles?(0,V.jsxs)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",style:{display:d===O.ND&&s.styles?"block":"none"},children:[(0,V.jsx)(b.A,{title:o("To change the appearance of the element on the mobile device, edit the fields below. If the fields remain empty, the desktop styles will be applied to the mobile version."),placement:"bottom",children:(0,V.jsx)(h.A,{className:"selected_form-mobile-props-title",message:o("Appearance on mobile devices"),type:"info"})}),(0,V.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[(0,V.jsxs)(g.A,{gutter:10,style:{marginBottom:20},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(Z,{form:l,name:"mobileWidth",elementSettings:e})}),(0,V.jsx)(x.A,{span:12})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Alignments")}),(0,V.jsx)(ve,{form:l,elementSettings:e}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Display control")}),(0,V.jsx)(Re,{elementSettings:e,form:l}),m.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,V.jsx)(De,{})]})]})]}):(0,V.jsx)("div",{id:"selected_element_form_desktop_props",children:(0,V.jsxs)("div",{className:"selected_form-props-wrapper",children:[(0,V.jsx)(u.A.Item,{style:{marginBottom:"0"},children:(0,V.jsxs)(g.A,{gutter:10,children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Float block width"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"width",children:(0,V.jsx)(ee.A,{min:0,placeholder:o("Float block width"),prefix:(0,V.jsx)(S.A,{}),addonAfter:(0,V.jsx)(u.A.Item,{name:"widthDim",noStyle:!0,children:Io})})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:o("Column gap"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"gap",children:(0,V.jsx)(ee.A,{min:0,placeholder:o("Column gap"),prefix:(0,V.jsx)(To.A,{}),addonAfter:(0,V.jsx)(u.A.Item,{name:"widthDim",noStyle:!0,children:Co})})})})})]})}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Vertical alignment")}),(0,V.jsx)(W.A,{form:l,elementSettings:e}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:o("Display control")}),(0,V.jsx)(Re,{elementSettings:e,form:l}),m.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,V.jsx)(De,{})]})]})})]})};var Fo=t(65655);const{Option:Vo}=Y.A,Do=(0,V.jsxs)(Y.A,{className:"select-after",getPopupContainer:e=>e.parentNode,children:[(0,V.jsx)(Vo,{value:"px",children:"px"}),(0,V.jsx)(Vo,{value:"%",children:"%"})]}),{useToken:Mo}=c.A,Wo=({elementSettings:e})=>{var o;const{__:t}=(0,C.s9)(),l=(0,F.XW)(),[d]=u.A.useForm(),[a,n]=(0,i.useState)({}),[m,c]=(0,i.useState)({}),[A,j]=(0,i.useState)(!0),[B,y]=(0,i.useState)({}),[w,P]=(0,i.useState)({}),[I,D]=(0,i.useState)(!0),W=(0,r.d4)(He.Ct),X=(0,r.d4)(He.CS),H=(0,Ue.rD)(),[q,$]=(0,i.useState)(""===(null===(o=e.backgroundImage)||void 0===o?void 0:o[0].value)),K=(0,r.d4)(He.Fv),J=(0,r.d4)(He.yy),ee=K&&"bottom"!==J,{token:oe}=Mo(),te=(0,i.useRef)(null),ie=(0,i.useRef)(null),[le,de]=(0,i.useState)(!1),[se,re]=(0,i.useState)(!1),[ae,ne]=(0,i.useState)(!1),[me,ue]=(0,i.useState)(!1),[be,he]=(0,i.useState)(!1),[ge,xe]=(0,i.useState)(!1),[Ae,ve]=(0,i.useState)(!1),[Be,Se]=(0,i.useState)(!1),[_e,ke]=(0,i.useState)(!1),[ye,we]=(0,i.useState)(!1),[Pe,Ne]=(0,i.useState)(!1),[Te,Ee]=(0,i.useState)(!1),[Ie,Ce]=(0,i.useState)(!1),[Le,Oe]=(0,i.useState)(!1),[Fe,Ve]=(0,i.useState)(""),[Me,We]=(0,i.useState)("https://"),[Xe,ze]=(0,i.useState)({}),[Ge,Ye]=(0,i.useState)(!1),qe=[{label:t("Not defined"),value:"none"},{label:t("Do not repeat background (no-repeat)"),value:"no-repeat"},{label:t("Repeat background (repeat)"),value:"repeat"},{label:t("Repeat background horizontally (repeat-x)"),value:"repeat-x"},{label:t("Repeat background vertically (repeat-y)"),value:"repeat-y"}],Ke=[{label:t("Not defined"),value:""},{label:t("Contain"),value:"contain"},{label:t("Cover"),value:"cover"}];(0,i.useEffect)((()=>{if(e){var o,t,i,l,s,r,a,m,u,b,h,g,x,p,f,A,v,B,S,_,R,k,w,N,T,E,I,C,L,O,F,V,M,W,X,H,z,G,U,Y,q,K,J,Z,Q,ee,oe,te,ie,le,se,ae,me,ce,be,ge,pe,fe,Ae,je,Be,_e,Re,ye,Pe,Te,Ie,Le,Fe,Ve,De,Me,Xe,He,ze,Ge,Ue,Ye,qe,Ke,Je,Ze,Qe,eo,oo,to,io,lo,so,ro,ao,no,mo,co,uo,bo,ho,go,xo,po,fo,Ao,jo,vo,Bo,So,_o,Ro,ko,yo;const wo=e.border||{},Po=e.boxShadow||{},No=e.mobileBorder||{},To=e.mobileBoxShadow||{},Eo=e.mobileBorderRadius||{},Io=e.mobilePadding||{},Co=e.mobileBoxShadow||{},Lo=e.mobileAlign||{},Oo=e.mobileBackgroundImage||[];n(wo),c(Po),y(No),P(To);const Fo=Object.keys(wo).find((e=>{var o,t,i;return(null===(o=wo[e])||void 0===o?void 0:o.width)||(null===(t=wo[e])||void 0===t?void 0:t.style)||(null===(i=wo[e])||void 0===i?void 0:i.color)})),Vo=Object.keys(No).find((e=>{var o,t,i;return(null===(o=No[e])||void 0===o?void 0:o.width)||(null===(t=No[e])||void 0===t?void 0:t.style)||(null===(i=No[e])||void 0===i?void 0:i.color)}));e.href&&("https://"===e.href.substring(0,8)||"http://"===e.href.substring(0,7)?We("https://"):"mailto:"===e.href.substring(0,7)?We("mailto:"):"tel:"===e.href.substring(0,4)?We("tel:"):"sms:"===e.href.substring(0,4)?We("sms:"):"ftp://"===e.href.substring(0,6)?We("ftp://"):"skype:"===e.href.substring(0,6)?We("skype:"):"viber:"===e.href.substring(0,6)?We("viber:"):We("")),d.setFieldsValue({...e,href:e.href?e.href:"https://",width:null===(o=e.width)||void 0===o?void 0:o.value,widthDim:null===(t=e.width)||void 0===t?void 0:t.dim,height:null===(i=e.height)||void 0===i?void 0:i.value,heightDim:null===(l=e.height)||void 0===l?void 0:l.dim,backgroundImage:null===(s=e.backgroundImage)||void 0===s?void 0:s[0].value,show:e.show?e.show:"all",borderPosition:Fo||"all",borderWidth:(null===(r=wo[Fo])||void 0===r?void 0:r.width)||"",borderColor:(null===(a=wo[Fo])||void 0===a?void 0:a.color)||"",borderStyle:(null===(m=wo[Fo])||void 0===m?void 0:m.style)||"",paddingTop:(0,$e.ok)(null===(u=e.padding)||void 0===u?void 0:u.all)||(0,$e.ok)(null===(b=e.padding)||void 0===b?void 0:b.top),paddingLeft:(0,$e.ok)(null===(h=e.padding)||void 0===h?void 0:h.all)||(0,$e.ok)(null===(g=e.padding)||void 0===g?void 0:g.left),paddingRight:(0,$e.ok)(null===(x=e.padding)||void 0===x?void 0:x.all)||(0,$e.ok)(null===(p=e.padding)||void 0===p?void 0:p.right),paddingBottom:(0,$e.ok)(null===(f=e.padding)||void 0===f?void 0:f.all)||(0,$e.ok)(null===(A=e.padding)||void 0===A?void 0:A.bottom),paddingLeftRight:(0,$e.ok)(null===(v=e.padding)||void 0===v?void 0:v.left)||(0,$e.ok)(null===(B=e.padding)||void 0===B?void 0:B.right),paddingTopBottom:(0,$e.ok)(null===(S=e.padding)||void 0===S?void 0:S.top)||(0,$e.ok)(null===(_=e.padding)||void 0===_?void 0:_.bottom),borderRadiusAll:(0,$e.ok)(null===(R=e.borderRadius)||void 0===R?void 0:R.all),borderRadiusTopLeft:(0,$e.ok)(null===(k=e.borderRadius)||void 0===k?void 0:k.topLeft),borderRadiusBottomLeft:(0,$e.ok)(null===(w=e.borderRadius)||void 0===w?void 0:w.bottomLeft),borderRadiusTopRight:(0,$e.ok)(null===(N=e.borderRadius)||void 0===N?void 0:N.topRight),borderRadiusBottomRight:(0,$e.ok)(null===(T=e.borderRadius)||void 0===T?void 0:T.bottomRight),boxShadowInset:(0,$e.ok)(null===(E=e.boxShadow)||void 0===E?void 0:E.inset)||!1,boxShadowHOffset:(0,$e.ok)(null===(I=e.boxShadow)||void 0===I?void 0:I.hOffset),boxShadowVOffset:(0,$e.ok)(null===(C=e.boxShadow)||void 0===C?void 0:C.vOffset),boxShadowBlurRadius:(0,$e.ok)(null===(L=e.boxShadow)||void 0===L?void 0:L.blurRadius),boxShadowSpreadRadius:(0,$e.ok)(null===(O=e.boxShadow)||void 0===O?void 0:O.spreadRadius),boxShadowColor:(0,$e.ok)(null===(F=e.boxShadow)||void 0===F?void 0:F.color),mobileWidth:(0,$e.xc)(null===(V=e.mobileWidth)||void 0===V?void 0:V.value),mobileWidthDim:null===(M=e.mobileWidth)||void 0===M?void 0:M.dim,mobileHeight:(0,$e.xc)(null===(W=e.mobileHeight)||void 0===W?void 0:W.value),mobileHeightDim:null===(X=e.mobileHeight)||void 0===X?void 0:X.dim,mobileBorderPosition:Vo||"all",mobileBorderWidth:null!==(null===(H=No[Vo])||void 0===H?void 0:H.width)?null===(z=No[Vo])||void 0===z?void 0:z.width:"",mobileBorderColor:(null===(G=No[Vo])||void 0===G?void 0:G.color)||"",mobileBorderStyle:(null===(U=No[Vo])||void 0===U?void 0:U.style)||"",mobileBorderRadiusAll:(0,$e.ok)(null===(Y=e.mobileBorderRadius)||void 0===Y?void 0:Y.all),mobileRadiusTopLeft:(0,$e.ok)(null!==(null===(q=e.mobileBorderRadius)||void 0===q?void 0:q.topLeft)?null===(K=e.mobileBorderRadius)||void 0===K?void 0:K.topLeft:null===(J=e.mobileBorderRadius)||void 0===J?void 0:J.all),mobileRadiusBottomLeft:(0,$e.ok)(null!==(null===(Z=e.mobileBorderRadius)||void 0===Z?void 0:Z.bottomLeft)?null===(Q=e.mobileBorderRadius)||void 0===Q?void 0:Q.bottomLeft:null===(ee=e.mobileBorderRadius)||void 0===ee?void 0:ee.all),mobileRadiusTopRight:(0,$e.ok)(null!==(null===(oe=e.mobileBorderRadius)||void 0===oe?void 0:oe.topRight)?null===(te=e.mobileBorderRadius)||void 0===te?void 0:te.topRight:null===(ie=e.mobileBorderRadius)||void 0===ie?void 0:ie.all),mobileRadiusBottomRight:(0,$e.ok)(null!==(null===(le=e.mobileBorderRadius)||void 0===le?void 0:le.bottomRight)?null===(se=e.mobileBorderRadius)||void 0===se?void 0:se.bottomRight:null===(ae=e.mobileBorderRadius)||void 0===ae?void 0:ae.all),mobileBoxShadowInset:(0,$e.ok)(null===Co||void 0===Co?void 0:Co.inset)||!1,mobileBoxShadowHOffset:(0,$e.ok)(null===Co||void 0===Co?void 0:Co.hOffset),mobileBoxShadowVOffset:(0,$e.ok)(null===Co||void 0===Co?void 0:Co.vOffset),mobileBoxShadowBlurRadius:(0,$e.ok)(null===Co||void 0===Co?void 0:Co.blurRadius),mobileBoxShadowSpreadRadius:(0,$e.ok)(null===Co||void 0===Co?void 0:Co.spreadRadius),mobileBoxShadowColor:(0,$e.ok)(null===Co||void 0===Co?void 0:Co.color),mobileAlign:(0,$e.ok)(null===Lo||void 0===Lo?void 0:Lo.value),mobileVerticalAlign:(0,$e.ok)(null===(me=e.mobileVerticalAlign)||void 0===me?void 0:me.value),mobileBackgroundColor:(0,$e.ok)("none"!==(null===(ce=e.mobileBackgroundColor)||void 0===ce?void 0:ce.value)?null===(be=e.mobileBackgroundColor)||void 0===be?void 0:be.value:""),mobileBackgroundImage:"none"!==(null===(ge=Oo[0])||void 0===ge?void 0:ge.value)?null===(pe=Oo[0])||void 0===pe?void 0:pe.value:"",mobileBackgroundPositionX:(0,$e.ok)(null===(fe=e.mobileBackgroundPositionX)||void 0===fe?void 0:fe.value),mobileBackgroundPositionY:(0,$e.ok)(null===(Ae=e.mobileBackgroundPositionY)||void 0===Ae?void 0:Ae.value),mobileBackgroundRepeat:null!==(je=e.mobileBackgroundRepeat)&&void 0!==je&&je.value?null===(Be=e.mobileBackgroundRepeat)||void 0===Be?void 0:Be.value:"none",mobilePaddingTop:(0,$e.ok)(Io.all)||(0,$e.ok)(Io.top),mobilePaddingLeft:(0,$e.ok)(Io.all)||(0,$e.ok)(Io.left),mobilePaddingRight:(0,$e.ok)(Io.all)||(0,$e.ok)(Io.right),mobilePaddingBottom:(0,$e.ok)(Io.all)||(0,$e.ok)(Io.bottom),mobilePaddingTopBottom:(0,$e.ok)(Io.top)||(0,$e.ok)(Io.bottom),mobilePaddingLeftRight:(0,$e.ok)(Io.left)||(0,$e.ok)(Io.right),exportAsPicture:null===e||void 0===e?void 0:e.exportAsPicture,mobileFontSize:(0,$e.ok)(null===(_e=e.mobileFontSize)||void 0===_e?void 0:_e.value)}),!(0,$e.ok)(null===(Re=e.borderRadius)||void 0===Re?void 0:Re.all)&&((0,$e.ok)(null===(ye=e.borderRadius)||void 0===ye?void 0:ye.topLeft)||(0,$e.ok)(null===(Pe=e.borderRadius)||void 0===Pe?void 0:Pe.bottomLeft)||(0,$e.ok)(null===(Te=e.borderRadius)||void 0===Te?void 0:Te.topRight)||(0,$e.ok)(null===(Ie=e.borderRadius)||void 0===Ie?void 0:Ie.bottomRight))?j(!1):j(!0),(0,$e.ok)(Eo.topLeft)||(0,$e.ok)(Eo.bottomLeft)||(0,$e.ok)(Eo.topRight)||(0,$e.ok)(Eo.bottomRight)?D(!1):D(!0),$(""===(null===(Le=e.backgroundImage)||void 0===Le?void 0:Le[0].value)),(0,$e.ok)(null===(Fe=e.padding)||void 0===Fe?void 0:Fe.all)||!((0,$e.ok)(null===(Ve=e.padding)||void 0===Ve?void 0:Ve.top)||(0,$e.ok)(null===(De=e.padding)||void 0===De?void 0:De.right)||(0,$e.ok)(null===(Me=e.padding)||void 0===Me?void 0:Me.bottom)||(0,$e.ok)(null===(Xe=e.padding)||void 0===Xe?void 0:Xe.left))||(null===(He=e.padding)||void 0===He?void 0:He.top)===(null===(ze=e.padding)||void 0===ze?void 0:ze.bottom)&&(null===(Ge=e.padding)||void 0===Ge?void 0:Ge.right)===(null===(Ue=e.padding)||void 0===Ue?void 0:Ue.left)?de(!0):de(!1),(0,$e.ok)(Io.all)||!((0,$e.ok)(Io.top)||(0,$e.ok)(Io.right)||(0,$e.ok)(Io.bottom)||(0,$e.ok)(Io.left))||Io.top===Io.bottom&&Io.right===Io.left?re(!0):re(!1),ne(!(null===(Ye=wo[Fo])||void 0===Ye||!Ye.width)),ue(!(null===(qe=No[Vo])||void 0===qe||!qe.width)),he(!(null===(Ke=e.borderRadius)||void 0===Ke||!Ke.all)||!(null===(Je=e.borderRadius)||void 0===Je||!Je.topLeft)||!(null===(Ze=e.borderRadius)||void 0===Ze||!Ze.bottomLeft)||!(null===(Qe=e.borderRadius)||void 0===Qe||!Qe.topRight)||!(null===(eo=e.borderRadius)||void 0===eo||!eo.bottomRight)),xe(!(null===(oo=e.mobileBorderRadius)||void 0===oo||!oo.all)||!(null===(to=e.mobileBorderRadius)||void 0===to||!to.topLeft)||!(null===(io=e.mobileBorderRadius)||void 0===io||!io.bottomLeft)||!(null===(lo=e.mobileBorderRadius)||void 0===lo||!lo.topRight)||!(null===(so=e.mobileBorderRadius)||void 0===so||!so.bottomRight)),ve(!!e.boxShadow),Se(!(null===(ro=e.mobileBoxShadow)||void 0===ro||!ro.blurRadius)||!(null===(ao=e.mobileBoxShadow)||void 0===ao||!ao.color)||!(null===(no=e.mobileBoxShadow)||void 0===no||!no.hOffset)||!(null===(mo=e.mobileBoxShadow)||void 0===mo||!mo.inset)||!(null===(co=e.mobileBoxShadow)||void 0===co||!co.spreadRadius)||!(null===(uo=e.mobileBoxShadow)||void 0===uo||!uo.vOffset)),ke(!(null===(bo=e.mobileWidth)||void 0===bo||!bo.value)||!(null===(ho=e.mobileHeight)||void 0===ho||!ho.value)),we(!!e.backgroundColor||!(null===(go=e.backgroundImage)||void 0===go||!go[0].value)||!!e.backgroundPositionY||!!e.backgroundPositionX||"repeat"!==e.backgroundRepeat||!e.backgroundRepeat,!!e.backgroundSize),Ne(!(null===(xo=e.mobileBackgroundColor)||void 0===xo||!xo.value)),Ee(!(null===(po=e.mobileFontSize)||void 0===po||!po.value)||!!e.showOnMobile),Ce(!(null===(fo=e.padding)||void 0===fo||!fo.all)||!(null===(Ao=e.padding)||void 0===Ao||!Ao.top)||!(null===(jo=e.padding)||void 0===jo||!jo.bottom)||!(null===(vo=e.padding)||void 0===vo||!vo.left)||!(null===(Bo=e.padding)||void 0===Bo||!Bo.right)),Oe(!(null===(So=e.mobilePadding)||void 0===So||!So.all)||!(null===(_o=e.mobilePadding)||void 0===_o||!_o.top)||!(null===(Ro=e.mobilePadding)||void 0===Ro||!Ro.bottom)||!(null===(ko=e.mobilePadding)||void 0===ko||!ko.left)||!(null===(yo=e.mobilePadding)||void 0===yo||!yo.right))}}),[d,e,ee]);const Je=e=>{d.setFieldValue("href","mergetag"!==e?e:""),We(e)},Ze=({target:e})=>{const{selectionStart:o,selectionEnd:t}=e;e&&ze({target:e,selection:{start:o,end:t}})};return(0,i.useEffect)((()=>{var o;Ye(!(null===(o=e.textReplacer)||void 0===o||!o.length))}),[e]),(0,V.jsxs)(u.A,{form:d,layout:"vertical",name:"selected_button_form",initialValues:{backgroundColor:"",backgroundImage:"",backgroundPositionX:"",backgroundPositionY:"",backgroundRepeat:"",backgroundSize:"",exportAsPicture:!1,width:"",height:"",widthDim:"",heightDim:"",align:"",valign:"",border:"",boxShadow:"",show:"all",borderPosition:"",borderColor:"",borderWidth:"",borderStyle:"",paddingTop:"",paddingLeft:"",paddingRight:"",paddingBottom:"",borderRadiusAll:"",RadiusTopLeft:"",RadiusBottomLeft:"",RadiusTopRight:"",RadiusBottomRight:"",mobileWidth:"",mobileWidthDim:"",mobileHeight:"",mobileHeightDim:"",mobileBorder:"",mobileBorderPosition:"",mobileBorderColor:"",mobileBorderWidth:"",mobileBorderStyle:"",mobileBoxShadow:"",mobileAlign:"",mobileVerticalAlign:"",mobileBackgroundColor:"",mobileBackgroundImage:"",mobilePaddingTop:"",mobilePaddingLeft:"",mobilePaddingRight:"",mobilePaddingBottom:"",borderRadiusTopLeft:"",borderRadiusBottomLeft:"",borderRadiusTopRight:"",borderRadiusBottomRight:"",href:"https://"},onValuesChange:o=>{const t=d.getFieldsValue(!0),i=Object.keys(o)[0];let s;switch(Ve("%"===d.getFieldsValue(!0).widthDim?100:""),i){case"exportAsPicture":s={exportAsPicture:t.exportAsPicture};break;case"boxShadowInset":case"boxShadowHOffset":case"boxShadowVOffset":case"boxShadowBlurRadius":case"boxShadowSpreadRadius":case"boxShadowColor":s={boxShadow:{hOffset:t.boxShadowHOffset,vOffset:t.boxShadowVOffset,blurRadius:t.boxShadowBlurRadius,spreadRadius:t.boxShadowSpreadRadius,color:t.boxShadowColor,inset:t.boxShadowInset}};break;case"borderStyle":s={border:{[t.borderPosition]:{...a[t.borderPosition],style:o[i]}}},"all"===t.borderPosition?n((e=>({...O.iV,[t.borderPosition]:{...e[t.borderPosition],style:o[i]}}))):n((e=>({...e,[t.borderPosition]:{...e[t.borderPosition],style:o[i]}})));break;case"borderColor":s={border:{[t.borderPosition]:{...a[t.borderPosition],color:o[i]}}},"all"===t.borderPosition?n((e=>({...O.iV,[t.borderPosition]:{...e[t.borderPosition],color:o[i]}}))):n((e=>({...e,[t.borderPosition]:{...e[t.borderPosition],color:o[i]}})));break;case"borderWidth":s={border:{[t.borderPosition]:{...a[t.borderPosition],width:o[i]}}},"all"===t.borderPosition?n((e=>({...O.iV,[t.borderPosition]:{...e[t.borderPosition],width:o[i]}}))):n((e=>({...e,[t.borderPosition]:{...e[t.borderPosition],width:o[i]}})));break;case"borderPosition":d.setFieldsValue({borderWidth:a[o[i]].width||"",borderColor:a[o[i]].color||"",borderStyle:a[o[i]].style||""});break;case"width":s={[i]:{value:o[i],dim:t.widthDim}};break;case"height":s={[i]:{value:o[i],dim:t.heightDim}};break;case"widthDim":s={width:{value:t.width,dim:o[i]}};break;case"heightDim":s={height:{value:t.height,dim:o[i]}};break;case"backgroundImage":$(""===o[i]),s={[i]:[{...e.backgroundImage[0],value:o[i]}],backgroundSize:"cover"};break;case"paddingTop":case"paddingLeft":case"paddingRight":case"paddingBottom":s={padding:{[$e.yy[i]]:+o[i]}};break;case"paddingTopBottom":s={padding:{top:+o[i],bottom:+o[i]}},t.paddingTop=t.paddingBottom=+o[i];break;case"paddingLeftRight":s={padding:{left:+o[i],right:+o[i]}},t.paddingLeft=t.paddingRight=+o[i];break;case"borderRadiusAll":case"borderRadiusTopLeft":case"borderRadiusBottomLeft":case"borderRadiusTopRight":case"borderRadiusBottomRight":s={borderRadius:{[O.wF[i]]:+o[i]}};break;case"mobileWidth":s={[i]:{classNamePrefix:"em-mob-width-",value:o[i],dim:t.mobileWidthDim}};break;case"mobileWidthDim":s={mobileWidth:{classNamePrefix:"em-mob-width-",value:t.mobileWidth,dim:o[i]}};break;case"mobileHeight":s={[i]:{classNamePrefix:"em-mob-height-",value:o[i],dim:t.mobileHeightDim},mobileLineHeight:{classNamePrefix:"em-mob-line_height-",value:o[i],dim:t.mobileHeightDim}};break;case"mobileHeightDim":s={mobileHeight:{classNamePrefix:"em-mob-height-",value:t.mobileHeight,dim:o[i]}};break;case"mobileBorderStyle":s={mobileBorder:{[t.mobileBorderPosition]:{...B[t.mobileBorderPosition],style:o[i],classNamePrefix:"em-mob-border_"+t.mobileBorderPosition+"-"}}},"all"===t.mobileBorderPosition?y((e=>({...O.iV,[t.mobileBorderPosition]:{...e[t.mobileBorderPosition],style:o[i],classNamePrefix:"em-mob-border_"+t.mobileBorderPosition+"-"}}))):y((e=>({...e,[t.mobileBorderPosition]:{...e[t.mobileBorderPosition],style:o[i],classNamePrefix:"em-mob-border_"+t.mobileBorderPosition+"-"}})));break;case"mobileBorderColor":s={mobileBorder:{[t.mobileBorderPosition]:{...B[t.mobileBorderPosition],color:o[i],classNamePrefix:"em-mob-border_"+t.mobileBorderPosition+"-"}}},"all"===t.mobileBorderPosition?y((e=>({...O.iV,[t.mobileBorderPosition]:{...e[t.mobileBorderPosition],color:o[i],classNamePrefix:"em-mob-border_"+t.mobileBorderPosition+"-"}}))):y((e=>({...e,[t.mobileBorderPosition]:{...e[t.mobileBorderPosition],color:o[i],classNamePrefix:"em-mob-border_"+t.mobileBorderPosition+"-"}})));break;case"mobileBorderWidth":s={mobileBorder:{[t.mobileBorderPosition]:{...B[t.mobileBorderPosition],width:o[i],classNamePrefix:"em-mob-border_"+t.mobileBorderPosition+"-"}}},"all"===t.mobileBorderPosition?y((e=>({...O.iV,[t.mobileBorderPosition]:{...e[t.mobileBorderPosition],width:o[i],classNamePrefix:"em-mob-border_"+t.mobileBorderPosition+"-"}}))):y((e=>({...e,[t.mobileBorderPosition]:{...e[t.mobileBorderPosition],width:o[i],classNamePrefix:"em-mob-border_"+t.mobileBorderPosition+"-"}})));break;case"mobileBorderPosition":d.setFieldsValue({mobileBorderWidth:B[o[i]].width||"",mobileBorderColor:B[o[i]].color||"",mobileBorderStyle:B[o[i]].style||""});break;case"mobileBorderRadiusAll":case"mobileRadiusTopLeft":case"mobileRadiusBottomLeft":case"mobileRadiusTopRight":case"mobileRadiusBottomRight":s={mobileBorderRadius:{[$e.NW[i]]:o[i],classNamePrefix:"em-mob-border_radius_"+$e.NW[i]+"-"}};break;case"mobileBoxShadowInset":case"mobileBoxShadowHOffset":case"mobileBoxShadowVOffset":case"mobileBoxShadowBlurRadius":case"mobileBoxShadowSpreadRadius":case"mobileBoxShadowColor":s={mobileBoxShadow:{hOffset:t.mobileBoxShadowHOffset,vOffset:t.mobileBoxShadowVOffset,blurRadius:t.mobileBoxShadowBlurRadius,spreadRadius:t.mobileBoxShadowSpreadRadius,color:t.mobileBoxShadowColor,inset:t.mobileBoxShadowInset,classNamePrefix:"em-mob-box_shadow-"}};break;case"mobileAlign":s={[i]:{classNamePrefix:"em-mob-table_align-",value:o[i]}};break;case"mobileTextAlign":s={[i]:{classNamePrefix:"em-mob-text_align-",value:o[i]}};break;case"mobileVerticalAlign":s={[i]:{classNamePrefix:"em-mob-vertical_align-",value:o[i]}};break;case"mobileBackgroundColor":s={[i]:{classNamePrefix:"em-mob-background_color-",value:o[i]}};break;case"mobileBackgroundPositionX":s={[i]:{classNamePrefix:"em-mob-background_position_x-",value:o[i]}};break;case"mobileBackgroundPositionY":s={[i]:{classNamePrefix:"em-mob-background_position_x-",value:o[i]}};break;case"mobileBackgroundRepeat":s={[i]:{classNamePrefix:"em-mob-background_repeat-",value:o[i]}};break;case"mobilePaddingTop":case"mobilePaddingLeft":case"mobilePaddingRight":case"mobilePaddingBottom":s={mobilePadding:{all:null,top:""!==t.mobilePaddingTop?t.mobilePaddingTop:null,right:""!==t.mobilePaddingRight?t.mobilePaddingRight:null,bottom:""!==t.mobilePaddingBottom?t.mobilePaddingBottom:null,left:""!==t.mobilePaddingLeft?t.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobilePaddingTopBottom":t.mobilePaddingTop=t.mobilePaddingBottom=o[i],s={mobilePadding:{all:null,top:""!==t.mobilePaddingTop?t.mobilePaddingTop:null,right:""!==t.mobilePaddingRight?t.mobilePaddingRight:null,bottom:""!==t.mobilePaddingBottom?t.mobilePaddingBottom:null,left:""!==t.mobilePaddingLeft?t.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobilePaddingLeftRight":t.mobilePaddingLeft=t.mobilePaddingRight=o[i],s={mobilePadding:{all:null,top:""!==t.mobilePaddingTop?t.mobilePaddingTop:null,right:""!==t.mobilePaddingRight?t.mobilePaddingRight:null,bottom:""!==t.mobilePaddingBottom?t.mobilePaddingBottom:null,left:""!==t.mobilePaddingLeft?t.mobilePaddingLeft:null,classNamePrefix:"em-mob-padding_"}};break;case"mobileFontSize":s={[i]:{classNamePrefix:"em-mob-font_size-",value:o[i],dim:t.mobileFontSizeDim}};break;case"href":let l=o[i];"https://http"===l.substring(0,12)&&(l=l.substring(8,l.length),t.href=l),s={[i]:l},"https://"===o[i].substring(0,8)||"http://"===o[i].substring(0,7)?We("https://"):"mailto:"===o[i].substring(0,7)?We("mailto:"):"tel:"===o[i].substring(0,4)?We("tel:"):"sms:"===o[i].substring(0,4)?We("sms:"):"ftp://"===o[i].substring(0,6)?We("ftp://"):"skype:"===o[i].substring(0,6)?We("skype:"):"viber:"===o[i].substring(0,6)?We("viber:"):We("");break;default:s=o}"borderPosition"!==i&&l({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:s})},autoComplete:"off",className:"element-controls",children:[!ee&&(0,V.jsx)(b.A,{title:t("To change the appearance of the element on the mobile device, edit the fields below. If the fields remain empty, the desktop styles will be applied to the mobile version."),placement:"bottom",children:(0,V.jsx)(h.A,{className:"selected_form-mobile-props-title",message:t("Appearance on mobile devices"),type:"info"})}),ee?(0,V.jsx)(mo.A,{form:d,elementSettings:e,showAddParagraph:!1,isButton:!0}):(0,V.jsx)(V.Fragment,{children:W===O.ND&&X.styles?(0,V.jsx)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",children:(0,V.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[(0,V.jsxs)(g.A,{gutter:20,style:{paddingBottom:4},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(je,{form:d,elementSettings:e,imgParent:!0})}),H.formButtonFieldTextAlignEnabled&&(0,V.jsx)(x.A,{span:12,style:{textAlign:"right"},children:(0,V.jsx)(ko.A,{form:d,name:"mobileTextAlign",elementSettings:e,imgParent:!0})})]}),!!e.showOnMobile&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider",style:{marginBottom:24}}),(0,V.jsx)(b.A,{trigger:["hover"],title:t("Hyperlink URL"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"href",style:{marginBottom:oe.formItemMarginBottomMD+4},children:(0,V.jsx)(v.A,{addonBefore:(0,V.jsx)($e.Ai,{linkProtocol:Me,handleLinkProtocolsChange:Je,__:t}),placeholder:t("Hyperlink URL"),allowClear:!0,prefix:(0,V.jsx)($e.RM,{linkProtocol:Me})})})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:t("Text")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{Ee((e=>!e)),Te&&(o.mobileFontSize="",l({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileFontSize:{value:null,dim:"px",classNamePrefix:"em-mob-font_size-"}}}))}))},children:Te?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Te&&(0,V.jsxs)(V.Fragment,{children:[!!e.showOnMobile&&(0,V.jsx)(no.A,{form:d,elementSettings:e,setLinkProtocol:We,linkProtocol:Me,showAddParagraph:!1,isButton:!0}),(0,V.jsx)(g.A,{gutter:10,style:{marginBottom:4},children:(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(Fo.A,{})})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),H.formButtonFieldPaddingsEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:t("Padding")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{Oe((e=>!e)),Le&&(o.mobilePaddingLeftRight="",o.mobilePaddingLeft="",o.mobilePaddingRight="",o.mobilePaddingTopBottom="",o.mobilePaddingTop="",o.mobilePaddingBottom="",l({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobilePadding:{all:null,top:null,right:null,bottom:null,left:null,classNamePrefix:"em-mob-padding_"}}}))}))},children:Le?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Le&&(0,V.jsx)(g.A,{gutter:10,style:{paddingBottom:8},children:(0,V.jsx)(V.Fragment,{children:(0,V.jsx)(Ao,{form:d,elementSettings:e,mobilePaddingsExt:se,setMobilePaddingsExt:re})})}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"})]}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:t("Size")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{ke((e=>!e)),_e&&(o.mobileWidth="",o.mobileHeight="",l({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileWidth:{value:null,dim:"px",classNamePrefix:"em-mob-width-"},mobileHeight:{value:null,dim:"px",classNamePrefix:"em-mob-height-"}}}))}))},children:_e?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),_e&&(0,V.jsxs)(g.A,{gutter:10,style:{paddingBottom:8},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)("div",{style:{marginBottom:2*oe.formItemMarginBottomXS},children:(0,V.jsx)(b.A,{title:t("Width"),placement:"bottom",children:(0,V.jsx)(Z,{form:d,name:"mobileWidth",elementSettings:e})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)("div",{style:{marginBottom:2*oe.formItemMarginBottomXS},children:(0,V.jsx)(b.A,{title:t("Height"),placement:"bottom",children:(0,V.jsx)(Q.A,{form:d,name:"mobileHeight",elementSettings:e})})})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:t("Background")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{Ne((e=>!e)),o.mobileBackgroundColor=Pe?"":e.commonStyles.buttons.backgroundColor||"#1C52DC",l({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBackgroundColor:{classNamePrefix:"em-mob-background_color-",value:o.mobileBackgroundColor}}})}))},children:Pe?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Pe&&(0,V.jsx)(V.Fragment,{children:(0,V.jsx)("div",{style:{marginBottom:(H.formButtonFieldBackgroundImageEnabled,oe.formItemMarginBottomMD+4)},children:(0,V.jsx)(oo,{form:d,elementSettings:e,label:t("Background color")})})}),H.formFieldBorderEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:t("Borders")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{ue((e=>!e)),me&&(o.mobileBorderWidth=null,o.mobileBorderColor="",o.mobileBorderStyle=""),y((e=>({...O.iV,[o.mobileBorderPosition]:{...e[o.mobileBorderPosition],width:o.mobileBorderWidth,color:o.mobileBorderColor,style:o.mobileBorderStyle}}))),l({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorder:{all:{color:o.mobileBorderColor,style:o.mobileBorderStyle,width:o.mobileBorderWidth,classNamePrefix:"em-mob-border_"+o.mobileBorderPosition+"-"}}}})}))},children:me?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),me&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(ce,{mobileBorders:B})})]}),H.formFieldBorderRadiusEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:t("Border radius")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{xe((e=>!e)),o.mobileBorderRadiusAll=ge?null:5,l({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorderRadius:{all:o.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})}))},children:ge?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),ge&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(pe,{form:d,oneMobileBorderRadiusValue:I,setOneMobileBorderRadiusValue:D})})]}),H.formFieldBoxShadowEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:t("Box shadow")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{Se((e=>!e)),Be?(o.mobileBoxShadowInset=!1,o.mobileBoxShadowHOffset=null,o.mobileBoxShadowVOffset=null,o.mobileBoxShadowBlurRadius=null,o.mobileBoxShadowSpreadRadius=null,o.mobileBoxShadowColor=""):(o.mobileBoxShadowInset=!1,o.mobileBoxShadowHOffset=5,o.mobileBoxShadowVOffset=5,o.mobileBoxShadowBlurRadius=10,o.mobileBoxShadowSpreadRadius=-5,o.mobileBoxShadowColor="#000000"),l({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBoxShadow:{blurRadius:o.mobileBoxShadowBlurRadius,color:o.mobileBoxShadowColor,hOffset:o.mobileBoxShadowHOffset,inset:o.mobileBoxShadowInset,spreadRadius:o.mobileBoxShadowSpreadRadius,vOffset:o.mobileBoxShadowVOffset,classNamePrefix:"em-mob-box_shadow-"}}})}))},children:Be?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Be&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(fe,{mobileBoxShadow:w,form:d,elementSettings:e})})]}),H.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:t("AMP visibility")}),(0,V.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(De,{})})})]}),H.formFieldAmpVisibilityEnabled&&e.isAmp&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:t("AMP visibility")}),(0,V.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(De,{})})})]})]})}):(0,V.jsxs)("div",{id:"selected_element_form_desktop_props",children:[(0,V.jsx)(h.A,{className:"selected_form-desktop-props-title",message:t("Appearance on mobile devices"),type:"info"}),(0,V.jsxs)("div",{className:"selected_form-props-wrapper",children:[(0,V.jsxs)(g.A,{gutter:20,style:{paddingBottom:4},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(M,{form:d,elementSettings:e})}),H.formButtonFieldTextAlignEnabled&&(0,V.jsx)(x.A,{span:12,style:{textAlign:"right"},children:(0,V.jsx)(po.A,{form:d,name:"textAlign",elementSettings:e})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider",style:{marginBottom:24}}),(0,V.jsx)(b.A,{trigger:["hover"],title:t("Hyperlink URL"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"href",style:{marginBottom:oe.formItemMarginBottomXS},children:(0,V.jsx)(v.A,{addonBefore:(0,V.jsx)($e.Ai,{linkProtocol:Me,handleLinkProtocolsChange:Je,__:t}),placeholder:t("Hyperlink URL"),allowClear:!0,onSelect:Ze,prefix:(0,V.jsx)($e.RM,{linkProtocol:Me})})})}),(0,V.jsxs)(g.A,{gutter:10,children:[(0,V.jsx)(x.A,{span:3,children:(0,V.jsx)(b.A,{title:t("Text replacer"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button ant-form-item",{"selected-td-form__button--active":Ge}),icon:(0,V.jsx)(L.A,{icon:"Replacer",className:"selected-td-form__icon-radius"}),onClick:()=>{Ye(!Ge),Ge?(d.setFieldValue("textReplacer",""),l({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{textReplacer:""}})):setTimeout((()=>te.current.focus()))},ref:ie})})}),(0,V.jsx)(x.A,{span:21,children:Ge&&(0,V.jsx)(b.A,{trigger:["hover"],title:t("Text"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"textReplacer",children:(0,V.jsx)(v.A,{placeholder:t("The code that will replace this text"),allowClear:!0,prefix:(0,V.jsx)("span",{className:"addon-text-content",children:"Text"}),onChange:e=>{""!==e.target.value&&ie.current.classList.add("selected-td-form__button--active")},ref:te,onSelect:Ze})})})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),H.formButtonFieldPaddingsEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:t("Padding")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{Ce((e=>!e)),Ie&&(o.paddingLeftRight="",o.paddingLeft="",o.paddingRight="",o.paddingTopBottom="",o.paddingTop="",o.paddingBottom="",l({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{padding:{all:0}}}))}))},children:Ie?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Ie&&(0,V.jsx)(g.A,{gutter:oe.marginSM,style:{marginBottom:4},children:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(x.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"},children:[(0,V.jsx)("div",{className:"padding-collapsed",style:{display:le?"block":"none"},children:(0,V.jsx)(b.A,{title:t("Horizontal padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"paddingLeftRight",children:(0,V.jsx)(z.A,{min:0,placeholder:t("Horizontal"),prefix:(0,V.jsx)(L.A,{icon:"PaddingLeftRight"}),addonAfter:"px"})})})}),(0,V.jsxs)("div",{className:"padding-extended",style:{display:le?"none":"block"},children:[(0,V.jsx)(b.A,{trigger:["hover"],title:t("Left padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"paddingLeft",style:{marginBottom:oe.formItemMarginBottomXS},children:(0,V.jsx)(z.A,{min:0,placeholder:t("Left"),prefix:(0,V.jsx)(L.A,{icon:"PaddingLeft"}),addonAfter:"px"})})}),(0,V.jsx)(b.A,{trigger:["hover"],title:t("Right padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"paddingRight",children:(0,V.jsx)(z.A,{min:0,placeholder:t("Right"),prefix:(0,V.jsx)(L.A,{icon:"PaddingRight"}),addonAfter:"px"})})})]})]}),(0,V.jsxs)(x.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"},children:[(0,V.jsx)("div",{className:"padding-collapsed",style:{display:le?"block":"none"},children:(0,V.jsx)(b.A,{title:t("Vertical padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"paddingTopBottom",children:(0,V.jsx)(z.A,{min:0,placeholder:t("Vertical"),prefix:(0,V.jsx)(L.A,{icon:"PaddingTopBottom"}),addonAfter:"px"})})})}),(0,V.jsxs)("div",{className:"padding-extended",style:{display:le?"none":"block"},children:[(0,V.jsx)(b.A,{trigger:["hover"],title:t("Top padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"paddingTop",style:{marginBottom:oe.formItemMarginBottomXS},children:(0,V.jsx)(z.A,{min:0,placeholder:t("Top"),prefix:(0,V.jsx)(L.A,{icon:"PaddingTop"}),addonAfter:"px"})})}),(0,V.jsx)(b.A,{trigger:["hover"],title:t("Bottom padding"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"paddingBottom",children:(0,V.jsx)(z.A,{min:0,placeholder:t("Bottom"),prefix:(0,V.jsx)(L.A,{icon:"PaddingBottom"}),addonAfter:"px"})})})]})]}),(0,V.jsx)(x.A,{span:4,style:{width:45,flex:"auto",maxWidth:"none"},children:(0,V.jsx)(b.A,{title:t("Individual padding"),placement:"bottom",children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button",{"selected-td-form__button--active":!le}),onClick:()=>{de((e=>!e));const o=d.getFieldsValue(!0);le||(o.paddingLeftRight=o.paddingLeft,o.paddingTopBottom=o.paddingTop,o.paddingRight=o.paddingLeft,o.paddingBottom=o.paddingTop,l({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{padding:{top:o.paddingTopBottom,bottom:o.paddingTopBottom,left:o.paddingLeftRight,right:o.paddingLeftRight}}}))},children:(0,V.jsx)(L.A,{icon:"PaddingSwitcher"})})})})]})}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"})]}),(0,V.jsx)("div",{className:"form-group-title",children:t("Size")}),(0,V.jsxs)(g.A,{gutter:oe.marginSM,style:{marginBottom:4},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{title:t("Width"),placement:"left",children:(0,V.jsx)(u.A.Item,{name:"width",style:{marginBottom:oe.formItemMarginBottomXS},children:(0,V.jsx)(z.A,{min:0,max:Fe,placeholder:t("Width"),prefix:(0,V.jsx)(S.A,{}),addonAfter:(0,V.jsx)(u.A.Item,{name:"widthDim",noStyle:!0,children:Do})})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{title:t("Height"),placement:"left",children:(0,V.jsx)(u.A.Item,{name:"height",children:(0,V.jsx)(z.A,{min:0,placeholder:t("Height"),prefix:(0,V.jsx)(_.A,{}),addonAfter:"px"})})})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{style:{paddingTop:oe.formItemMarginBottomMD+4,paddingBottom:4},children:(0,V.jsx)(no.A,{form:d,elementSettings:e,showAddParagraph:!1,isButton:!0,setLinkProtocol:We,linkProtocol:Me,linkTarget:Xe})}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:t("Background")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{we((e=>!e)),ye?(o.backgroundColor="",o.backgroundImage="",o.backgroundPositionX="",o.backgroundPositionY="",o.backgroundRepeat="none",o.backgroundSize="",$(!0)):(o.backgroundColor="#E5E5E5",o.backgroundSize="",o.backgroundRepeat="none"),l({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{backgroundColor:o.backgroundColor,backgroundImage:[{type:"url",value:o.backgroundImage}],backgroundPositionX:o.backgroundPositionX,backgroundPositionY:o.backgroundPositionY,backgroundRepeat:o.backgroundRepeat,backgroundSize:o.backgroundSize}})}))},children:ye?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),ye&&(0,V.jsxs)(g.A,{gutter:10,style:{marginBottom:q?14:0},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:t("Background color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,V.jsx)(u.A.Item,{name:"backgroundColor",style:{marginBottom:H.formButtonFieldBackgroundImageEnabled?oe.formItemMarginBottomXS:oe.formItemMarginBottomMD+4},children:(0,V.jsx)(G.A,{placeholder:t("Background color"),usedColors:e.usedColors})})})}),H.formButtonFieldBackgroundImageEnabled&&(0,V.jsxs)(x.A,{span:q?12:24,children:[(0,V.jsx)("div",{style:{paddingBottom:q?4:0},children:(0,V.jsx)(N.A,{form:d,label:t("Background image"),name:"backgroundImage",tooltipTitle:t("Background image")})}),!q&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(g.A,{gutter:10,children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:t("Horizontal position"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"backgroundPositionX",style:{marginBottom:oe.formItemMarginBottomXS},children:(0,V.jsx)(z.A,{placeholder:t("Horizontal position"),prefix:(0,V.jsx)(L.A,{icon:"BgPositionHorizontal"})})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:t("Vertical position"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"backgroundPositionY",style:{marginBottom:oe.formItemMarginBottomXS},children:(0,V.jsx)(z.A,{placeholder:t("Vertical position"),prefix:(0,V.jsx)(L.A,{icon:"BgPositionVertical"})})})})})]}),(0,V.jsxs)(g.A,{gutter:10,children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:t("Background image repeat"),placement:"top",children:(0,V.jsx)(u.A.Item,{name:"backgroundRepeat",style:{marginBottom:oe.formItemMarginBottomMD+4},children:(0,V.jsx)(Y.A,{placeholder:t("Please choose"),options:qe,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})})})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(b.A,{trigger:["hover"],title:t("Background image size"),placement:"top",children:(0,V.jsx)(u.A.Item,{name:"backgroundSize",style:{marginBottom:oe.formItemMarginBottomMD+4},children:(0,V.jsx)(Y.A,{placeholder:t("Please choose"),options:Ke,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})})})})]})]})]})]}),H.formFieldBorderEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:t("Borders")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{ne((e=>!e)),ae&&(o.borderWidth=null,o.borderColor="",o.borderStyle=""),n((e=>({...O.iV,[o.borderPosition]:{...e[o.borderPosition],width:o.borderWidth,color:o.borderColor,style:o.borderStyle}}))),l({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{border:{all:{color:o.borderColor,style:o.borderStyle,width:o.borderWidth}}}})}))},children:ae?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),ae&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(T.A,{borders:a})})]}),H.formFieldBorderRadiusEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:t("Border radius")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{he((e=>!e)),o.borderRadiusAll=be?0:5,l({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{borderRadius:{all:o.borderRadiusAll}}})}))},children:be?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),be&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(E.A,{form:d,oneBorderRadiusValue:A,setOneBorderRadiusValue:j,elementSettings:e})})]}),H.formFieldBoxShadowEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:t("Box shadow")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=d.getFieldsValue(!0);setTimeout((()=>{ve((e=>!e)),Ae?(o.boxShadowInset=!1,o.boxShadowHOffset=0,o.boxShadowVOffset=0,o.boxShadowBlurRadius=0,o.boxShadowSpreadRadius=0,o.boxShadowColor=""):(o.boxShadowInset=!1,o.boxShadowHOffset=5,o.boxShadowVOffset=5,o.boxShadowBlurRadius=10,o.boxShadowSpreadRadius=-5,o.boxShadowColor="#000000"),l({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{boxShadow:{blurRadius:o.boxShadowBlurRadius,color:o.boxShadowColor,hOffset:o.boxShadowHOffset,inset:o.boxShadowInset,spreadRadius:o.boxShadowSpreadRadius,vOffset:o.boxShadowVOffset}}})}))},children:Ae?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),Ae&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(U,{boxShadow:m})})]}),H.formFieldVisibilityEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:t("Display control")}),(0,V.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(Re,{elementSettings:e,form:d})})})]}),H.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)("div",{className:"form-group-title",children:t("AMP visibility")}),(0,V.jsx)(g.A,{gutter:20,style:{marginBottom:4},children:(0,V.jsx)(x.A,{span:12,children:(0,V.jsx)(De,{})})})]})]})]})})]})};var Xo=t(2091),Ho=t(9452);const{useToken:zo}=c.A,Go=({elementSettings:e,setElementSettings:o,postfix:t="",form:l,handleSelect:d})=>{const{__:r}=(0,C.s9)(),{token:a}=zo(),n=(0,Ue.rD)(),m=(0,F.XW)(),c="src"+t,h="title"+t,g="alt"+t,x="link"+t,p="imgReplacer"+t,A=(0,i.useRef)(null),S=(0,i.useRef)(null),_=(0,i.useRef)(null),R=(0,i.useRef)(null),k=(0,i.useRef)(null),y=(0,i.useRef)(null),w=(0,i.useRef)(null),P=(0,i.useRef)(null),[T,E]=(0,i.useState)(""),[I,D]=(0,i.useState)(""),[M,W]=(0,i.useState)(""),[X,H]=(0,i.useState)(!1),[z,G]=(0,i.useState)("https://");(0,i.useEffect)((()=>{var o,t,i;D(null===(o=e.images)||void 0===o?void 0:o[g]),W(null===(t=e.images)||void 0===t?void 0:t[h]),E(null===(i=e.images)||void 0===i?void 0:i[x])}),[e,g,h,x]);return(0,V.jsxs)(V.Fragment,{children:[("img"===e.type||"video"===e.type||"carousel"===e.type)&&(0,V.jsx)(u.A.Item,{style:{marginBottom:0},children:(0,V.jsx)(N.A,{form:l,label:r("Image path"),name:c,placeholder:r("Image path"),elementSettings:e,tooltipTitle:""})}),(0,V.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[(0,V.jsxs)(j.A,{size:8,children:[(0,V.jsx)(b.A,{title:I||r("Alternative text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button",{"selected-td-form__button--active":!!I}),onClick:()=>{I?(D(""),l.setFieldValue("alt",""),m({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{[g]:""}})):(D(_.current&&_.current.input.value?_.current.input.value:"..."),setTimeout((()=>{_.current.focus()})))},ref:R,children:(0,V.jsx)("span",{className:"addon-text-content",children:"Alt"})})}),n.formFieldImageTitleEnabled&&(0,V.jsx)(b.A,{title:M||r("Tooltip text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button",{"selected-td-form__button--active":!!M}),onClick:()=>{M?(W(!1),l.setFieldValue("title",""),m({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{[h]:""}})):(W(k.current&&k.current.input.value?k.current.input.value:"..."),setTimeout((()=>{k.current.focus()})))},ref:y,children:(0,V.jsx)("span",{className:"addon-text-content",children:"Title"})})}),(0,V.jsx)(b.A,{title:T||r("Hyperlink URL"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button",{"selected-td-form__button--active":!!T}),icon:(0,V.jsx)(B.A,{className:"selected-td-form__icon-radius"}),onClick:()=>{T?(E(""),l.setFieldValue(x,""),m({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{[x]:""}})):(E(A.current&&A.current.input.value?A.current.input.value:"..."),setTimeout((()=>{A.current.focus()})))},ref:S})}),(0,V.jsx)(b.A,{title:r("Image replacer"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,V.jsx)(f.Ay,{className:s()("selected-td-form__button",{"selected-td-form__button--active":X}),icon:(0,V.jsx)(L.A,{icon:"Replacer",className:"selected-td-form__icon-radius"}),onClick:()=>{H(!X),X?(l.setFieldValue(p,""),m({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{[p]:""}})):setTimeout((()=>w.current.focus()))},ref:P})})]}),(0,V.jsx)(j.A,{size:8,children:(0,V.jsx)(b.A,{title:r("Remove slide"),placement:"bottom",children:(0,V.jsx)(f.Ay,{type:"text",onClick:i=>{var d;const s=l.getFieldsValue(!0),r=+t.substring(1),a=Object.keys(null===s||void 0===s?void 0:s.images).reduce(((e,o)=>(o.includes(t)||(e[o]=s[o]),e)),{}),n=null===(d=e.carouselImages)||void 0===d?void 0:d.filter(((e,o)=>o!==r));o((e=>({...e,settings:{...e.settings,carouselImages:n}}))),m({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:O.bV.CAROUSEL,caption:e.caption,settings:{...e,carouselImages:n}}),l.setFieldsValue({images:a})},icon:(0,V.jsx)(Ho.A,{})})})})]}),(!!T||!!I||!!M||!!X)&&(0,V.jsxs)("div",{children:[!!T&&(0,V.jsx)(b.A,{trigger:["hover"],title:r("Hyperlink URL"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:x,className:"selected-image-form__alt",style:{marginTop:a.formItemMarginBottomXS,marginBottom:0},children:(0,V.jsx)(v.A,{addonBefore:(0,V.jsx)($e.Ai,{linkProtocol:z,handleLinkProtocolsChange:e=>{l.setFieldValue("LinkName","mergetag"!==e?e:""),G(e)},__:r}),placeholder:r("Hyperlink URL"),allowClear:!0,ref:A,onChange:e=>{""===e.target.value?E("..."):(S.current.classList.add("selected-td-form__button--active"),E(e.target.value));const o=e.target.value;"https://"===o.substring(0,8)?G("https://"):"mailto:"===o.substring(0,7)?G("mailto:"):"tel:"===o.substring(0,4)?G("tel:"):"sms:"===o.substring(0,4)?G("sms:"):"ftp://"===o.substring(0,6)?G("ftp://"):"skype:"===o.substring(0,6)?G("skype:"):"viber:"===o.substring(0,6)?G("viber:"):G("")},onSelect:d,prefix:(0,V.jsx)($e.RM,{linkProtocol:z})})})}),!!I&&(0,V.jsx)(b.A,{trigger:["hover"],title:r("Alternative text"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:g,className:"selected-image-form__alt",style:{marginTop:a.formItemMarginBottomXS,marginBottom:0},children:(0,V.jsx)(v.A,{placeholder:r("Alternative text"),allowClear:!0,prefix:(0,V.jsx)("span",{className:"addon-text-content",children:"Alt"}),onChange:e=>{""===e.target.value?D("..."):(R.current.classList.add("selected-td-form__button--active"),D(e.target.value))},ref:_,onSelect:d})})}),n.formFieldImageTitleEnabled&&!!M&&(0,V.jsx)(b.A,{trigger:["hover"],title:r("Tooltip text"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:h,className:"selected-image-form__alt",style:{marginTop:a.formItemMarginBottomXS,marginBottom:0},children:(0,V.jsx)(v.A,{placeholder:r("Enter the title of the image"),allowClear:!0,prefix:(0,V.jsx)("span",{className:"addon-text-content",children:"Title"}),onChange:e=>{""===e.target.value?W("..."):(y.current.classList.add("selected-td-form__button--active"),W(e.target.value))},ref:k,onSelect:d})})}),!!X&&(0,V.jsx)(b.A,{trigger:["hover"],title:r("Image src"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:p,className:"selected-image-form__alt",style:{marginTop:a.formItemMarginBottomXS,marginBottom:0},children:(0,V.jsx)(v.A,{placeholder:r("\u0421ode that will replace the image `src`"),allowClear:!0,prefix:(0,V.jsx)("span",{className:"addon-text-content",children:r("Image src")}),onChange:e=>{""!==e.target.value&&P.current.classList.add("selected-td-form__button--active")},ref:w,onSelect:d})})})]})]})},Uo={loop:!1,autoplay:!1,borderRadiusAll:0,borderRadiusTopLeft:0,borderRadiusBottomLeft:0,borderRadiusTopRight:0,borderRadiusBottomRight:0,link:"https://",images:{},src_0:"",renderedHeight_0:0,renderedWidth_0:0,imgReplacer_0:"",title_0:"",alt_0:""},{useToken:Yo}=c.A,qo=({elementSettings:e})=>{const{__:o}=(0,C.s9)(),{token:t}=Yo(),[l]=u.A.useForm();let d=(0,r.wA)();const s=(0,Ue.rD)(),a=(0,F.K9)(),n=(0,F.XW)(),m=(0,r.d4)(He.Ct),c=(0,r.d4)(He.CS),[h,B]=(0,i.useState)(!0),[S,_]=(0,i.useState)(!0),[y,w]=(0,i.useState)(!1),[P,N]=(0,i.useState)(!1),[T,I]=(0,i.useState)("https://"),[D,M]=(0,i.useState)(null===l||void 0===l?void 0:l.getFieldsValue(!0)),[W,X]=(0,i.useState)(e),[H,z]=(0,i.useState)(null),[G,U]=(0,i.useState)(),[Y,$]=(0,i.useState)(!1),[K,J]=(0,i.useState)(!1),[Z,Q]=(0,i.useState)({start:0,end:0}),ee=(0,i.useRef)(null),oe=`selected_${W.type}_form_link`;(0,i.useEffect)((()=>{Y&&ee.current&&ee.current.focus()}),[Y]),(0,i.useEffect)((()=>{X(e)}),[e]);const te=(0,r.d4)(Ke.GH);(0,i.useEffect)((()=>{var e;null!==te&&void 0!==te&&null!==(e=te.items)&&void 0!==e&&e.length&&U((0,Ue.cM)(te.items,o,((e,o)=>{$(!1),a(O.Ru.SANDBOX_ADD_MERGETAG,e),o.stopPropagation(),o.preventDefault()})))}),[te,U,o,$,a]);(0,i.useEffect)((()=>{const e=({target:e})=>{e.closest('[id="merge_tags_wrapper"]')||z(e)},o=({target:e})=>{e.closest(".merge-tags")||e.closest("#merge_tags_button")||$(!1)};return window.addEventListener("focusin",e),window.addEventListener("click",o),()=>{window.removeEventListener("focusin",e),window.addEventListener("click",o)}}),[]);(0,i.useEffect)((()=>{const e=null===l||void 0===l?void 0:l.getFieldsValue(!0);M(e)}),[l]);const ie=({target:e})=>{if(e&&!K){const{selectionStart:o,selectionEnd:t}=e;Q({start:o,end:t})}J(!1)};(0,i.useEffect)((()=>{if(W.settings){var e,o,t,i,d,s,r,a,n,m,c,u,b,h,g;const v=W.settings,S=(0,$e.AO)(v);var x,p,f,A,j;if(null===l||void 0===l||l.setFieldsValue(S),M(S),v.link&&I((0,$e.TW)(v.link,"https://")),!(0,$e.ok)(null===(e=v.borderRadius)||void 0===e?void 0:e.all))(0,$e.ok)(null===(x=v.borderRadius)||void 0===x?void 0:x.topLeft)||(0,$e.ok)(null===(p=v.borderRadius)||void 0===p?void 0:p.bottomLeft)||(0,$e.ok)(null===(f=v.borderRadius)||void 0===f?void 0:f.topRight)||(0,$e.ok)(null===(A=v.borderRadius)||void 0===A?void 0:A.bottomRight)?B(!1):(0,$e.ok)(null===(j=v.borderRadius)||void 0===j?void 0:j.all)||B(!0);(0,$e.ok)(null===(o=v.mobileBorderRadius)||void 0===o?void 0:o.topLeft)||(0,$e.ok)(null===(t=v.mobileBorderRadius)||void 0===t?void 0:t.bottomLeft)||(0,$e.ok)(null===(i=v.mobileBorderRadius)||void 0===i?void 0:i.topRight)||(0,$e.ok)(null===(d=v.mobileBorderRadius)||void 0===d?void 0:d.bottomRight)?_(!1):_(!0),w(!(null===(s=v.borderRadius)||void 0===s||!s.all)||!(null===(r=v.borderRadius)||void 0===r||!r.topLeft)||!(null===(a=v.borderRadius)||void 0===a||!a.bottomLeft)||!(null===(n=v.borderRadius)||void 0===n||!n.topRight)||!(null===(m=v.borderRadius)||void 0===m||!m.bottomRight)),N(!(null===(c=v.mobileBorderRadius)||void 0===c||!c.all)||!(null===(u=v.mobileBorderRadius)||void 0===u||!u.topLeft)||!(null===(b=v.mobileBorderRadius)||void 0===b||!b.bottomLeft)||!(null===(h=v.mobileBorderRadius)||void 0===h||!h.topRight)||!(null===(g=v.mobileBorderRadius)||void 0===g||!g.bottomRight))}}),[l,W]);(0,Me.A)((e=>{const o=e.data.operation;o===O.Ru.APPLICATION_OPEN_IMAGE_AI_POPUP?(d((0,Ge.tm)(W.settings.src)),d((0,Xe.qf)(O.lx.UPLOAD_IMAGE_MODAL_AI))):o===O.Ru.APPLICATION_OPEN_IMAGE_UPLOAD_POPUP?(d((0,Ge.tm)(W.settings.src)),d((0,Xe.qf)(O.lx.UPLOAD_IMAGE_MODAL_UPLOAD))):o===O.Ru.APPLICATION_OPEN_IMAGE_EDIT_POPUP?(d((0,Ge.tm)(W.settings.src)),d((0,Xe.qf)(O.lx.UPLOAD_IMAGE_MODAL_EDIT))):o===O.Ru.APPLICATION_OPEN_IMAGE_GIF_POPUP?(d((0,Ge.tm)(W.settings.src)),d((0,Xe.qf)(O.lx.UPLOAD_IMAGE_MODAL_GIF))):o===O.Ru.APPLICATION_OPEN_IMAGE_STOCK_POPUP?(d((0,Ge.tm)(W.settings.src)),d((0,Xe.qf)(O.lx.UPLOAD_IMAGE_MODAL_STOCK))):o===O.Ru.APPLICATION_CLOSE_IMAGE_EDIT_POPUP&&(d((0,Xe.Os)()),d((0,Xe.Oo)()))}));return(0,V.jsx)(u.A,{form:l,layout:"vertical",name:"selected_carousel_form",initialValues:Uo,onValuesChange:e=>{const o=(0,$e.Ze)(W.settings,l,e);n({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:O.bV.CAROUSEL,caption:o.caption,settings:o}),X((e=>({...e,settings:{...e.settings,...o}})))},autoComplete:"off",className:"element-controls",children:m===O.ND&&c.styles?(0,V.jsx)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",children:(0,V.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[s.formFieldBorderRadiusEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Border radius")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const e=null===l||void 0===l?void 0:l.getFieldsValue(!0);setTimeout((()=>{N((e=>!e)),e.mobileBorderRadiusAll=P?null:5,n({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:O.bV.CAROUSEL,settings:{...W.settings,mobileBorderRadius:{...W.settings.mobileBorderRadius,all:e.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}}),X((o=>({...o,settings:{...o.settings,mobileBorderRadius:{...o.settings.mobileBorderRadius,all:e.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})))}))},children:P?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),P&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(pe,{form:l,oneMobileBorderRadiusValue:S,setOneMobileBorderRadiusValue:_})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),!!W.settings.showOnMobile&&(0,V.jsx)(u.A.List,{name:"images",children:()=>{var e,o;return(0,V.jsx)("div",{style:{paddingTop:t.formItemMarginBottomMD+4},children:null===W||void 0===W||null===(e=W.settings)||void 0===e||null===(o=e.carouselImages)||void 0===o?void 0:o.map(((e,o)=>(0,V.jsx)(Go,{elementSettings:D,setElementSettings:X,postfix:"_"+o,form:l,handleSelect:ie},o)))})}}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"})]})}):(0,V.jsx)("div",{id:"selected_element_form_desktop_props",children:(0,V.jsxs)("div",{className:"selected_form-props-wrapper",children:[(0,V.jsx)(b.A,{trigger:["hover"],title:o("Link for all slides"),placement:"bottom",children:(0,V.jsx)(u.A.Item,{name:"link",children:(0,V.jsx)(v.A,{addonBefore:(0,V.jsx)($e.Ai,{linkProtocol:T,handleLinkProtocolsChange:e=>{l.setFieldValue("link","mergetag"!==e?e:""),I(e)},__:o}),placeholder:o("Link for all slides"),allowClear:!0,onSelect:ie,prefix:(0,V.jsx)($e.RM,{linkProtocol:T})})})}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),G&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(x.A,{span:24,id:"merge_tags_wrapper",children:(0,V.jsxs)(u.A.Item,{style:{marginBottom:t.formItemMarginBottomMD,marginTop:t.formItemMarginBottomMD},children:[(0,V.jsx)(f.Ay,{id:"merge_tags_button",icon:(0,V.jsx)(L.A,{icon:"MergeTags"}),style:{width:"100%",display:Y?"none":"block"},onClick:()=>$(!0),children:o("Merge tags")}),(0,V.jsx)(A.A,{ref:ee,popupClassName:"merge-tags",options:G,placeholder:o("Start typing the title"),showSearch:{filter:(e,o)=>o.some((o=>o.label.toLowerCase().indexOf(e.toLowerCase())>-1)),render:(e,o)=>{const t=o.map(((o,t)=>{const i=o.label.split(new RegExp(`(${e})`,"gi"));return(0,V.jsxs)("span",{children:[0!==t&&(0,V.jsx)("span",{children:"\xa0/\xa0"}),i.map(((o,t)=>o.toLowerCase()===e.toLowerCase()?(0,V.jsx)("span",{style:{color:"red"},children:o},t):o))]},o.value)}));return(0,V.jsx)("div",{title:o.map((e=>e.label)).join(" / "),children:t})}},spellCheck:"false",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),onChange:(e,o)=>{if($(!1),e){const t=te.syntax.length>1?G.findIndex((e=>e.key===o[0].key)):0,i=te.syntax[t].replace("%value%",e[e.length-1]),d=`selected_${W.type}_form${"carousel"===W.type?"_images":""}`;["imgReplacer","title","alt","src","link"].some((e=>null===H||void 0===H?void 0:H.getAttribute("id").includes(`${d}_${e}`)))||null!==H&&void 0!==H&&H.getAttribute("id").includes(oe)?((e,o)=>{const t=document.getElementById(o);if(t){var i,d;const a=`selected_${W.type}_form_${o.includes("__images_")?"_images":""}_`,m=o.substring(o.indexOf(a)+a.length),c=null===(i=t.value)||void 0===i?void 0:i.substring(0,Z.start),u=null===(d=t.value)||void 0===d?void 0:d.substring(Z.end);let b={[m]:c+e+u};var s;if(m.includes("_"))b={carouselImages:[...(null===(s=W.settings)||void 0===s?void 0:s.carouselImages)||[]]},b.carouselImages[m.split("_")[1]][m.split("_")[0]]=c+e+u;else if(W.type===O.bV.CAROUSEL&&oe===o){var r;b={[m]:c+e+u,carouselImages:[...(null===(r=W.settings)||void 0===r?void 0:r.carouselImages.map((o=>({...o,link:c+e+u}))))||[]]}}n({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:O.bV.CAROUSEL,settings:{...W.settings,...b}}),X((e=>({...e,settings:{...e.settings,...b}}))),l.setFieldValue(m,c+e+u),t.focus(),setTimeout((()=>{t.selectionStart=Z.start,t.selectionEnd=Z.start+e.length}),400),J(!0)}})(i,null===H||void 0===H?void 0:H.getAttribute("id")):(l.setFieldValue("imgReplacer",i),n({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:O.bV.CAROUSEL,settings:{...W.settings,imgReplacer:i}}),X((e=>({...e,settings:{...e.settings,imgReplacer:i}}))))}},style:{display:Y?"block":"none"},open:Y,onKeyDown:e=>{"Escape"===e.key&&$(!1)}})]})}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"})]}),(0,V.jsx)(u.A.List,{name:"images",initialValue:null===D||void 0===D?void 0:D.images,children:()=>{var e,o;return(0,V.jsx)("div",{style:{paddingTop:t.formItemMarginBottomMD+4},children:null===W||void 0===W||null===(e=W.settings)||void 0===e||null===(o=e.carouselImages)||void 0===o?void 0:o.map(((e,o)=>(0,V.jsx)("div",{className:"carousel__slide",children:(0,V.jsx)(Go,{elementSettings:D,setElementSettings:X,postfix:"_"+o,form:l,handleSelect:ie})},o)))})}}),(0,V.jsx)(x.A,{span:24,children:(0,V.jsx)(u.A.Item,{style:{marginBottom:t.formItemMarginBottomMD},children:(0,V.jsx)(f.Ay,{id:"add_slide_button",icon:(0,V.jsx)(L.A,{icon:"AddSlide"}),style:{width:"100%"},onClick:()=>(()=>{var e,o;const{width:t,height:i,renderedWidth:l,renderedHeight:d}=(null===W||void 0===W||null===(e=W.settings)||void 0===e?void 0:e.carouselImages[0])||{width:{value:600},height:{value:600},renderedWidth:600,renderedHeight:600},s={src:"https://emcdn.ru/1865/231031_17_BGU9Mso.png",width:{value:t.value,dim:"px"},height:{value:i.value,dim:"px"},alt:"",title:"",link:null,renderedWidth:l,renderedHeight:d,imgReplacer:"",mobileWidth:{value:null,dim:"px"},mobileHeight:{value:null,dim:"px"},mobileBorderRadius:{all:null,topLeft:null,topRight:null,bottomRight:null,bottomLeft:null}},r=[...null===W||void 0===W||null===(o=W.settings)||void 0===o?void 0:o.carouselImages,s];n({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:O.bV.CAROUSEL,settings:{...W.settings,carouselImages:r}}),X((e=>({...e,settings:{...e.settings,carouselImages:r}})))})(),children:o("Add slide")})})}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsxs)(g.A,{gutter:20,style:{marginTop:t.formItemMarginBottomMD-10},children:[(0,V.jsx)(x.A,{span:12,children:(0,V.jsxs)(j.A,{size:10,align:"baseline",children:[(0,V.jsx)(u.A.Item,{name:"loop",valuePropName:"checked",style:{marginBottom:t.formItemMarginBottomMD-6},children:(0,V.jsx)(q.A,{size:"small",id:"Loop"})}),(0,V.jsx)("span",{style:{position:"relative",top:2},children:(0,V.jsx)("label",{htmlFor:"Loop",children:o("Loop")})})]})}),(0,V.jsx)(x.A,{span:12,children:(0,V.jsxs)(j.A,{size:10,align:"baseline",children:[(0,V.jsx)(u.A.Item,{name:"autoplay",valuePropName:"checked",style:{marginBottom:t.formItemMarginBottomMD-6},children:(0,V.jsx)(q.A,{size:"small",id:"Autoplay"})}),(0,V.jsx)("span",{style:{position:"relative",top:2},children:(0,V.jsx)("label",{htmlFor:"Autoplay",children:o("Autoplay")})})]})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),s.formFieldBorderRadiusEnabled&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(g.A,{gutter:10,align:"middle",children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsx)("div",{className:"form-group-title",children:o("Border radius")})}),(0,V.jsx)(x.A,{span:4,align:"right",children:(0,V.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{setTimeout((()=>{w((e=>!e)),l.setFieldValue("borderRadiusAll",y?0:5),n({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:O.bV.CAROUSEL,settings:{...W.settings,borderRadius:{all:y?"":5}}}),X((e=>({...e,settings:{...e.settings,borderRadius:{all:y?null:5}}})))}))},children:y?(0,V.jsx)(k.A,{}):(0,V.jsx)(R.A,{})})})]}),y&&(0,V.jsx)("div",{style:{marginBottom:4},children:(0,V.jsx)(E.A,{form:l,oneBorderRadiusValue:h,setOneBorderRadiusValue:B,elementSettings:W.settings})})]})]})})})},$o={animate:!0,expandSingleSection:!0,sections:[{expanded:!1,index:0}]},{useToken:Ko}=c.A,Jo=({elementSettings:e})=>{const{__:o}=(0,C.s9)(),{token:t}=Ko(),[l]=u.A.useForm(),d=(0,F.XW)(),[s,r]=(0,i.useState)(e);(0,i.useEffect)((()=>{r(e)}),[e]),(0,i.useEffect)((()=>{if(s.settings){const e=s.settings,o=(0,$e.AO)(e);null===l||void 0===l||l.setFieldsValue(o)}}),[l,s]);return(0,V.jsx)(u.A,{form:l,layout:"vertical",name:"selected_carousel_form",initialValues:$o,onValuesChange:e=>{const o=(0,$e.Ze)(s.settings,l,e);d({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:s.type,caption:o.caption,settings:o}),r((e=>({...e,settings:{...e.settings,...o}})))},autoComplete:"off",className:"element-controls",children:(0,V.jsx)("div",{id:"selected_element_form_desktop_props",children:(0,V.jsxs)("div",{className:"selected_form-props-wrapper",children:[(0,V.jsxs)(g.A,{gutter:20,children:[(0,V.jsx)(x.A,{span:15,children:(0,V.jsxs)(j.A,{size:10,align:"baseline",children:[(0,V.jsx)(u.A.Item,{name:"expandSingleSection",valuePropName:"checked",children:(0,V.jsx)(q.A,{size:"small",id:"ExpandSingleSection"})}),(0,V.jsx)("span",{style:{position:"relative",top:2},children:(0,V.jsx)("label",{htmlFor:"ExpandSingleSection",children:o("Expand only one section")})})]})}),(0,V.jsx)(x.A,{span:9,children:(0,V.jsxs)(j.A,{size:10,align:"baseline",children:[(0,V.jsx)(u.A.Item,{name:"animate",valuePropName:"checked",children:(0,V.jsx)(q.A,{size:"small",id:"Animate"})}),(0,V.jsx)("span",{style:{position:"relative",top:2},children:(0,V.jsx)("label",{htmlFor:"Animate",children:o("Animate")})})]})})]}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"}),(0,V.jsx)(u.A.List,{name:"sections",children:()=>{var e,i;return(0,V.jsx)("div",{style:{paddingTop:t.formItemMarginBottomMD+4},children:null===s||void 0===s||null===(e=s.settings)||void 0===e||null===(i=e.sections)||void 0===i?void 0:i.map(((e,t)=>{var i,l;return(0,V.jsxs)(g.A,{gutter:24,children:[(0,V.jsx)(x.A,{span:20,children:(0,V.jsxs)(j.A,{size:10,align:"baseline",children:[(0,V.jsx)("span",{style:{position:"relative",top:2},children:o("Section ")+(t+1)}),(0,V.jsx)(u.A.Item,{name:`expanded_${t}`,children:(0,V.jsx)(q.A,{size:"small",id:`expanded_${t}`,checked:e.expanded})}),(0,V.jsx)("span",{style:{position:"relative",top:2},children:(0,V.jsx)("label",{htmlFor:`expanded_${t}`,children:o("expanded")})})]})}),(0,V.jsx)(x.A,{children:(null===s||void 0===s||null===(i=s.settings)||void 0===i||null===(l=i.sections)||void 0===l?void 0:l.length)>1&&(0,V.jsx)(f.Ay,{type:"text",icon:(0,V.jsx)(Ho.A,{}),style:{marginRight:"auto"},onClick:()=>{return e=t,r((o=>{var t;return{...o,settings:{...o.settings,sections:null===(t=s.settings.sections)||void 0===t?void 0:t.filter(((o,t)=>t!==e))}}})),void d({operation:O.Ru.SANDBOX_ACCORDION_REMOVE_SECTION,settings:{index:e}});var e}})})]},`expanded_${t}`)}))})}}),(0,V.jsx)(g.A,{gutter:20,children:(0,V.jsx)(x.A,{span:24,children:(0,V.jsx)(u.A.Item,{style:{marginBottom:t.formItemMarginBottomMD},children:(0,V.jsx)(f.Ay,{style:{width:"100%",display:"block"},icon:(0,V.jsx)(L.A,{icon:"MergeTags"}),onClick:()=>(r((e=>{var o;return{...e,sections:null===s||void 0===s||null===(o=s.settings)||void 0===o?void 0:o.sections.push({expanded:!1})}})),void d({operation:O.Ru.SANDBOX_ACCORDION_ADD_SECTION,settings:{section:o("Section title"),text:o("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")}})),children:o(" Add section")})})})}),(0,V.jsx)(p.A,{className:"selected-td-form__divider"})]})})})},Zo=({className:e,formSettings:o,emailElementType:t})=>{const d=(0,r.wA)(),m=(0,qe.Cb)(),c=(0,i.useRef)(),u=(0,r.d4)(He.B),b=(0,r.d4)(a.qX),h=(0,r.d4)(n.qX),g=t===O.Tm?b:h,[x,p]=(0,i.useState)(g);(0,i.useEffect)((()=>{p(g.type===O.bV.CAROUSEL||g.type===O.bV.IMG?o.settings:g)}),[g,o.settings]);return(0,Me.A)((e=>{const o=e.data.operation,t=e.data.action;if(o===O.Ru.APPLICATION_ACTION){function i(e,o=null){const t={[e]:o||!x[e]};m(t,x.type),d((0,a.G_)(t)),p((e=>({...e,...t})))}"toggle_strong"===t&&i("textStrong"),"toggle_italic"===t&&i("textItalic"),"toggle_underline"===t&&i("textUnderline"),"toggle_strikethrough"===t&&i("textStrikethrough"),"textAlign_left"===t&&i("textAlign","left"),"textAlign_right"===t&&i("textAlign","right"),"textAlign_center"===t&&i("textAlign","center")}})),(0,V.jsx)(l.A,{nodeRef:c,in:u===O.yI,timeout:300,classNames:"transition",children:(0,V.jsxs)("div",{ref:c,className:s()("selected-element-panel-content",{[e]:e}),children:[g.type===O.bV.IMG&&(0,V.jsx)(Ze,{elementSettings:g}),g.type===O.bV.COUNTDOWN&&(0,V.jsx)(Ze,{elementSettings:g}),g.type===O.bV.VIDEO&&(0,V.jsx)(Ze,{elementSettings:g}),g.type===O.bV.TEXT&&(0,V.jsx)(Qe.A,{elementSettings:g}),g.type===O.bV.LINK&&(0,V.jsx)(co,{elementSettings:g})," ",g.type===O.bV.TABLE&&(0,V.jsx)(ro,{elementSettings:g}),(g.type===O.bV.TD||g.type===O.bV.STRUCTURE||g.type===O.bV.GROUP||g.type===O.bV.COLUMN)&&(0,V.jsx)(Ro,{elementSettings:g}),g.type===O.bV.VAR&&(0,V.jsx)(Xo.A,{elementSettings:g}),g.type===O.bV.BUTTON&&(0,V.jsx)(Wo,{elementSettings:g}),g.type===O.bV.DIV&&(0,V.jsx)(No,{elementSettings:g}),g.type===O.bV.VINDENT&&(0,V.jsx)(uo.A,{elementSettings:g}),g.type===O.bV.FLOAT_BLOCK&&(0,V.jsx)(Oo,{elementSettings:g}),o.type===O.bV.CAROUSEL&&(0,V.jsx)(qo,{elementSettings:o}),o.type===O.bV.ACCORDION&&(0,V.jsx)(Jo,{elementSettings:o})]})})};Zo.defaultProps={className:null};const Qo=Zo},37981:()=>{}}]);