@emailmaker/emailmaker 1.0.25 → 1.0.27

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/README_eng.md +1 -1
  3. package/asset-manifest.json +23 -23
  4. package/emailmaker-esm.js +1 -1
  5. package/emailmaker.d.ts +7 -2
  6. package/emailmaker.js +1 -1
  7. package/iframe/{iframe-eblock.928550a92a685a8395b0.html → iframe-eblock.a6f6dc81e8b3641d6a36.html} +1 -1
  8. package/iframe/{iframe.928550a92a685a8395b0.html → iframe.a6f6dc81e8b3641d6a36.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 +6 -7
  14. package/plugin_blocks_test.html +139 -27
  15. package/plugin_default.html +1 -1
  16. package/plugin_s.html +1 -1
  17. package/static/css/698.9a48c3be.css +1 -0
  18. package/static/js/1399.e2af75e2.js +1 -0
  19. package/static/js/1792.216ac039.js +1 -0
  20. package/static/js/1795.b6d39a75.js +1 -0
  21. package/static/js/2256.b13b144a.js +1 -0
  22. package/static/js/5571.afd3acb0.js +1 -0
  23. package/static/js/698.ac4f2346.js +1 -0
  24. package/static/js/7471.e4dba4ab.js +1 -0
  25. package/static/js/9649.ff98467b.js +1 -0
  26. package/static/js/9907.c26468b0.js +1 -0
  27. package/static/js/{emailmaker_core.b76ffc94.js → emailmaker_core.1c0df7e8.js} +1 -1
  28. package/translations.pot +614 -582
  29. package/iframe/429.js +0 -1
  30. package/static/css/698.78cace37.css +0 -1
  31. package/static/js/1399.b243eb26.js +0 -1
  32. package/static/js/1792.9fb6a042.js +0 -1
  33. package/static/js/1795.83232f27.js +0 -1
  34. package/static/js/2256.2b67ecbf.js +0 -1
  35. package/static/js/5571.b3cbed7a.js +0 -1
  36. package/static/js/698.9667395f.js +0 -1
  37. package/static/js/8905.20cd9eb8.js +0 -1
  38. package/static/js/9649.a0728edd.js +0 -1
  39. package/static/js/9907.761fcfa3.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[698],{28381:(e,o,t)=>{t.d(o,{A:()=>b});var i=t(92810),l=t(12280),s=t(20984),r=t(81e3),a=t(66726),d=t(23287),n=t(62303),m=t(85163),c=t(45695),u=t(70082);const h=({form:e,elementSettings:o,imgParent:t,name:h="align"})=>{const{__:b}=(0,d.s9)(),g=(0,c.XW)(),[x,p]=(0,i.useState)(o[h]),A=t=>{const i=t.target.value,l={[h]:""};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:h,children:(0,u.jsx)(s.Ay.Group,{disabled:t&&!o.parent,children:(0,u.jsxs)(r.A,{size:8,children:[(0,u.jsx)(a.A,{placement:"bottom",title:b("Align left"),children:(0,u.jsx)(s.Ay.Button,{value:"left",onClick:A,children:(0,u.jsx)(n.A,{icon:"AlignHorizontalLeft"})})}),(0,u.jsx)(a.A,{placement:"bottom",title:b("Center horizontally"),children:(0,u.jsx)(s.Ay.Button,{value:"center",onClick:A,children:(0,u.jsx)(n.A,{icon:"AlignHorizontalCenter"})})}),(0,u.jsx)(a.A,{placement:"bottom",title:b("Align right "),children:(0,u.jsx)(s.Ay.Button,{value:"right",onClick:A,children:(0,u.jsx)(n.A,{icon:"AlignHorizontalRight"})})})]})})})};h.defaultProps={imgParent:!1};const b=h},68031:(e,o,t)=>{t.d(o,{A:()=>p});var i=t(92810),l=t(12280),s=t(20984),r=t(81e3),a=t(66726),d=t(73170),n=t(87984),m=t(98885),c=t(23287),u=t(85163),h=t(62303),b=t(45695),g=t(70082);const x=({form:e,elementSettings:o,imgParent:t,name:x="align",setAlignStateHandle:p=(e=>{})})=>{const{__:A}=(0,c.s9)(),f=(0,b.XW)(),[j,v]=(0,i.useState)(o[x]),[_,B]=(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")&&B(!0)}),[]);const S=t=>{const i=t.target.value;p(i);const l={[x]:""};i!==j?v(i):(v(""),e.setFieldsValue(l),f({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)(s.Ay.Group,{disabled:t&&!o.parent,children:(0,g.jsxs)(r.A,{size:8,children:[(0,g.jsx)(a.A,{placement:"bottom",title:A(_?"Text align left ( \u2318+Shift+L )":"Text align left ( Ctrl+Shift+L )"),children:(0,g.jsx)(s.Ay.Button,{value:"left",onClick:S,children:(0,g.jsx)(d.A,{})})}),(0,g.jsx)(a.A,{placement:"bottom",title:A(_?"Text align center ( \u2318+Shift+E )":"Text align center ( Ctrl+Shift+E )"),children:(0,g.jsx)(s.Ay.Button,{value:"center",onClick:S,children:(0,g.jsx)(n.A,{})})}),(0,g.jsx)(a.A,{placement:"bottom",title:A(_?"Text align right ( \u2318+Shift+R )":"Text align right ( Ctrl+Shift+R )"),children:(0,g.jsx)(s.Ay.Button,{value:"right",onClick:S,children:(0,g.jsx)(m.A,{})})}),(0,g.jsx)(a.A,{placement:"bottom",title:A(_?"Text align justify ( \u2318+Shift+J )":"Text align justify ( Ctrl+Shift+J )"),children:(0,g.jsx)(s.Ay.Button,{value:"justify",onClick:S,children:(0,g.jsx)(h.A,{icon:"Justify"})})})]})})})};x.defaultProps={imgParent:!1};const p=x},78541:(e,o,t)=>{t.d(o,{A:()=>m});t(92810);var i=t(12280),l=t(20984),s=t(81e3),r=t(66726),a=t(23287),d=t(70082);const n=()=>{const{__:e}=(0,a.s9)();return(0,d.jsx)(i.A.Item,{name:"ampShow",children:(0,d.jsx)(l.Ay.Group,{children:(0,d.jsxs)(s.A,{size:8,children:[(0,d.jsx)(l.Ay.Button,{value:"all",children:e("Both")}),(0,d.jsx)(r.A,{placement:"top",title:e("AMP"),children:(0,d.jsx)(l.Ay.Button,{value:"amp",children:"AMP"})}),(0,d.jsx)(r.A,{placement:"top",title:e("HTML"),children:(0,d.jsx)(l.Ay.Button,{value:"html",children:"HTML"})})]})})})};n.defaultProps={};const m=n},21519:(e,o,t)=>{t.d(o,{A:()=>P});t(92810);var i=t(95838),l=t(2018),s=t(7744),r=t(12280),a=t(78159),d=t(20984),n=t(81e3),m=t(66726),c=t(38587),u=t(12751),h=t(14473),b=t(37822),g=t(68285),x=t(57032),p=t(26461),A=t(69118),f=t(10930),j=t(38883),v=t.n(j),_=t(23287),B=t(45934),S=t(26238),y=t(65983),w=t(70082);const{useToken:R}=i.A,P=({borders:e})=>{const o=(0,B.d4)(y.uJ),{__:t,_x:i}=(0,_.s9)(),j=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}=R();return(0,w.jsxs)(l.A,{gutter:30,children:[(0,w.jsxs)(s.A,{span:12,className:"selected-td-form__border-col",children:[(0,w.jsx)(r.A.Item,{name:"borderColor",className:"form-item-margin-xs",children:(0,w.jsx)(S.A,{placeholder:t("Color"),usedColors:o.usedColors})}),(0,w.jsx)(r.A.Item,{name:"borderWidth",className:"form-item-margin-xs",children:(0,w.jsx)(a.A,{min:0,placeholder:i("Width","border"),addonAfter:"px"})}),(0,w.jsx)(r.A.Item,{name:"borderStyle",className:"form-item-margin-xs",children:(0,w.jsx)(d.Ay.Group,{children:(0,w.jsxs)(n.A,{size:8,children:[(0,w.jsx)(m.A,{placement:"bottom",title:t("None"),children:(0,w.jsx)(d.Ay.Button,{value:"",children:(0,w.jsx)(c.A,{})})}),(0,w.jsx)(m.A,{placement:"bottom",title:t("Solid"),children:(0,w.jsx)(d.Ay.Button,{value:"solid",children:(0,w.jsx)(u.A,{})})}),(0,w.jsx)(m.A,{placement:"bottom",title:t("Dashed"),children:(0,w.jsx)(d.Ay.Button,{value:"dashed",children:(0,w.jsx)(h.A,{})})}),(0,w.jsx)(m.A,{placement:"bottom",title:t("Dotted"),children:(0,w.jsx)(d.Ay.Button,{value:"dotted",children:(0,w.jsx)(b.A,{})})})]})})})]}),(0,w.jsx)(s.A,{span:12,style:{textAlign:"center"},children:(0,w.jsx)(r.A.Item,{label:"",name:"borderPosition",labelCol:{span:8},children:(0,w.jsx)(d.Ay.Group,{children:(0,w.jsxs)(n.A,{size:P.formItemMarginBottomXS,direction:"vertical",children:[(0,w.jsx)(l.A,{children:(0,w.jsx)(m.A,{placement:"top",title:t("Above"),children:(0,w.jsx)(d.Ay.Button,{value:"top",style:{margin:"auto"},className:v()("",{"selected-td-form__border-radio":j(null===e||void 0===e?void 0:e.top)}),children:(0,w.jsx)(g.A,{})})})}),(0,w.jsx)(l.A,{children:(0,w.jsxs)(n.A,{size:P.formItemMarginBottomXS,children:[(0,w.jsx)(m.A,{placement:"left",title:t("On the left"),children:(0,w.jsx)(d.Ay.Button,{value:"left",className:v()("",{"selected-td-form__border-radio":j(null===e||void 0===e?void 0:e.left)}),children:(0,w.jsx)(x.A,{})})}),(0,w.jsx)(m.A,{placement:"top",title:t("Around"),children:(0,w.jsx)(d.Ay.Button,{value:"all",className:v()("",{"selected-td-form__border-radio":j(null===e||void 0===e?void 0:e.all)}),children:(0,w.jsx)(p.A,{})})}),(0,w.jsx)(m.A,{placement:"right",title:t("On the right"),children:(0,w.jsx)(d.Ay.Button,{value:"right",className:v()("",{"selected-td-form__border-radio":j(null===e||void 0===e?void 0:e.right)}),children:(0,w.jsx)(A.A,{})})})]})}),(0,w.jsx)(l.A,{children:(0,w.jsx)(m.A,{placement:"bottom",title:t("Below"),children:(0,w.jsx)(d.Ay.Button,{value:"bottom",className:v()("",{"selected-td-form__border-radio":j(null===e||void 0===e?void 0:e.bottom)}),style:{margin:"auto"},children:(0,w.jsx)(f.A,{})})})})]})})})})]})}},71495:(e,o,t)=>{t.d(o,{A:()=>v});t(92810);var i=t(2018),l=t(7744),s=t(81e3),r=t(12280),a=t(43005),d=t(66726),n=t(1728),m=t(82051),c=t(11696),u=t(87042),h=t(38883),b=t.n(h),g=t(23287),x=t(88647),p=t(44997),A=t(45695),f=t(85163),j=t(70082);const v=({form:e,oneBorderRadiusValue:o,setOneBorderRadiusValue:t,elementSettings:h})=>{const{__:v}=(0,g.s9)(),_=(0,A.XW)();return(0,j.jsxs)(i.A,{gutter:10,children:[(0,j.jsx)(l.A,{span:12,children:(0,j.jsx)(s.A,{size:10,align:"start",children:(0,j.jsx)(r.A.Item,{name:"borderRadiusAll",children:(0,j.jsx)(p.A,{min:0,placeholder:v("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)(a.Ay,{className:b()("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:{[f.wF.borderRadiusTopLeft]:i.borderRadiusAll||0,[f.wF.borderRadiusBottomLeft]:i.borderRadiusAll||0,[f.wF.borderRadiusTopRight]:i.borderRadiusAll||0,[f.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:{[f.wF.borderRadiusAll]:i.borderRadiusTopLeft}}):(e.setFieldsValue({borderRadiusAll:null,borderRadiusTopLeft:null,borderRadiusBottomLeft:null,borderRadiusTopRight:null,borderRadiusBottomRight:null}),l={borderRadius:{[f.wF.borderRadiusAll]:0,[f.wF.borderRadiusTopLeft]:0,[f.wF.borderRadiusBottomLeft]:0,[f.wF.borderRadiusTopRight]:0,[f.wF.borderRadiusBottomRight]:0}})}_({operation:f.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:h.type,settings:l}),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)(d.A,{placement:"bottom",title:v("Top left corner"),children:(0,j.jsx)(r.A.Item,{hidden:o,name:"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)(d.A,{placement:"bottom",title:v("Bottom left corner"),children:(0,j.jsx)(r.A.Item,{hidden:o,name:"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)(d.A,{placement:"bottom",title:v("Top right corner"),children:(0,j.jsx)(r.A.Item,{hidden:o,name:"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)(d.A,{placement:"bottom",title:v("Bottom right corner"),children:(0,j.jsx)(r.A.Item,{hidden:o,name:"borderRadiusBottomRight",children:(0,j.jsx)(p.A,{min:0,prefix:(0,j.jsx)(u.A,{}),style:{minHeight:10},addonAfter:"px"})})})]})]})})]})}},58341:(e,o,t)=>{t.d(o,{A:()=>p});t(92810);var i=t(2018),l=t(7744),s=t(66726),r=t(12280),a=t(81e3),d=t(37005),n=t(29258),m=t(23287),c=t(45934),u=t(44997),h=t(26238),b=t(62303),g=t(65983),x=t(70082);const p=()=>{const{__:e}=(0,m.s9)(),o=(0,c.d4)(g.uJ);return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(i.A,{gutter:10,children:[(0,x.jsx)(l.A,{span:12,children:(0,x.jsx)(s.A,{placement:"bottom",title:e("Horizontal offset"),children:(0,x.jsx)(r.A.Item,{name:"boxShadowHOffset",className:"form-item-margin-xs",children:(0,x.jsx)(u.A,{placeholder:e("Horizontal offset"),prefix:(0,x.jsx)(n.A,{}),addonAfter:"px"})})})}),(0,x.jsx)(l.A,{span:12,children:(0,x.jsx)(s.A,{placement:"bottom",title:e("Vertical offset"),children:(0,x.jsx)(r.A.Item,{name:"boxShadowVOffset",className:"form-item-margin-xs",children:(0,x.jsx)(u.A,{placeholder:e("Vertical offset"),prefix:(0,x.jsx)(b.A,{icon:"VerticalOffset"}),addonAfter:"px"})})})}),(0,x.jsx)(l.A,{span:12,children:(0,x.jsx)(s.A,{placement:"bottom",title:e("Blur radius"),children:(0,x.jsx)(r.A.Item,{name:"boxShadowBlurRadius",className:"form-item-margin-xs",children:(0,x.jsx)(u.A,{min:0,placeholder:e("Blur radius"),prefix:(0,x.jsx)(b.A,{icon:"Blur",style:{fontSize:16,marginLeft:-2}}),addonAfter:"px"})})})}),(0,x.jsx)(l.A,{span:12,children:(0,x.jsx)(s.A,{placement:"bottom",title:e("Spread radius"),children:(0,x.jsx)(r.A.Item,{name:"boxShadowSpreadRadius",className:"form-item-margin-xs",children:(0,x.jsx)(u.A,{placeholder:e("Spread radius"),prefix:(0,x.jsx)(b.A,{icon:"ZoomOutMap"}),addonAfter:"px"})})})}),(0,x.jsx)(l.A,{span:12,children:(0,x.jsx)(a.A,{size:10,align:"start",children:(0,x.jsx)(r.A.Item,{name:"boxShadowColor",children:(0,x.jsx)(h.A,{usedColors:o.usedColors})})})}),(0,x.jsx)(l.A,{span:12,children:(0,x.jsx)(s.A,{title:e("Shadow inside or outside of the element"),placement:"bottom",children:(0,x.jsx)(r.A.Item,{name:"boxShadowInset",valuePropName:"value",children:(0,x.jsx)(d.A,{style:{width:"100%"},options:[{label:e("Outside"),value:!1},{label:e("Inside"),value:!0}]})})},"inset")})]})})}},48513:(e,o,t)=>{t.d(o,{A:()=>b});var i=t(92810),l=t(12280),s=t(20984),r=t(81e3),a=t(66726),d=t(23287),n=t(62303),m=t(85163),c=t(45695),u=t(70082);const h=({form:e,elementSettings:o,imgParent:t,name:h="mobileAlign"})=>{var b;const{__:g}=(0,d.s9)(),[x,p]=(0,i.useState)(null===(b=o[h])||void 0===b?void 0:b.value),A=(0,c.XW)(),f=t=>{const i=t.target.value,l={[h]:{classNamePrefix:"em-mob-text_align-",value:""}};i!==x?p(i):(p(""),e.setFieldsValue(l),A({operation:m.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:l}))};return(0,u.jsx)(l.A.Item,{name:h,children:(0,u.jsx)(s.Ay.Group,{disabled:t&&!o.parent,children:(0,u.jsxs)(r.A,{size:8,children:[(0,u.jsx)(a.A,{placement:"bottom",title:g("Align left"),children:(0,u.jsx)(s.Ay.Button,{value:"left",onClick:f,children:(0,u.jsx)(n.A,{icon:"AlignHorizontalLeft"})})}),(0,u.jsx)(a.A,{placement:"bottom",title:g("Center horizontally"),children:(0,u.jsx)(s.Ay.Button,{value:"center",onClick:f,children:(0,u.jsx)(n.A,{icon:"AlignHorizontalCenter"})})}),(0,u.jsx)(a.A,{placement:"bottom",title:g("Align right "),children:(0,u.jsx)(s.Ay.Button,{value:"right",onClick:f,children:(0,u.jsx)(n.A,{icon:"AlignHorizontalRight"})})}),(0,u.jsx)(a.A,{placement:"bottom",title:g("Text align justify"),children:(0,u.jsx)(s.Ay.Button,{value:"justify",onClick:f,children:(0,u.jsx)(n.A,{icon:"Justify"})})})]})})})};h.defaultProps={imgParent:!1};const b=h},40187:(e,o,t)=>{t.d(o,{A:()=>p});var i=t(92810),l=t(12280),s=t(20984),r=t(81e3),a=t(66726),d=t(23287),n=t(73170),m=t(87984),c=t(98885),u=t(85163),h=t(62303),b=t(45695),g=t(70082);const x=({form:e,elementSettings:o,imgParent:t,name:x="mobileAlign"})=>{var p;const{__:A}=(0,d.s9)(),[f,j]=(0,i.useState)(null===(p=o[x])||void 0===p?void 0:p.value),v=(0,b.XW)(),_=t=>{const i=t.target.value,l={[x]:{classNamePrefix:"em-mob-text_align-",value:""}};i!==f?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)(s.Ay.Group,{disabled:t&&!o.parent,children:(0,g.jsxs)(r.A,{size:8,children:[(0,g.jsx)(a.A,{placement:"bottom",title:A("Text align left"),children:(0,g.jsx)(s.Ay.Button,{value:"left",onClick:_,children:(0,g.jsx)(n.A,{})})}),(0,g.jsx)(a.A,{placement:"bottom",title:A("Text align center"),children:(0,g.jsx)(s.Ay.Button,{value:"center",onClick:_,children:(0,g.jsx)(m.A,{})})}),(0,g.jsx)(a.A,{placement:"bottom",title:A("Text align right"),children:(0,g.jsx)(s.Ay.Button,{value:"right",onClick:_,children:(0,g.jsx)(c.A,{})})}),(0,g.jsx)(a.A,{placement:"bottom",title:A("Text align justify"),children:(0,g.jsx)(s.Ay.Button,{value:"justify",onClick:_,children:(0,g.jsx)(h.A,{icon:"Justify"})})})]})})})};x.defaultProps={imgParent:!1};const p=x},45509:(e,o,t)=>{t.d(o,{A:()=>g});var i=t(92810),l=t(95838),s=t(66726),r=t(12280),a=t(81e3),d=t(8701),n=t(23287),m=t(26238),c=t(85163),u=t(45695),h=t(70082);const{useToken:b}=l.A,g=({form:e,elementSettings:o,label:t})=>{var l;const{__:g}=(0,n.s9)(),x=(0,i.useRef)(),[p,A]=(0,i.useState)("none"===(null===(l=o.mobileBackgroundColor)||void 0===l?void 0:l.value)),{token:f}=b(),j=(0,u.XW)();return(0,h.jsx)(h.Fragment,{children:(0,h.jsxs)(s.A,{trigger:["hover"],title:g("Background color"),placement:"left",children:[(0,h.jsx)(r.A.Item,{name:"mobileBackgroundColor",style:{marginBottom:f.formItemMarginBottomXS/2},children:(0,h.jsx)(m.A,{onChange:e=>{A(!1)},placeholder:t,usedColors:o.usedColors})}),(0,h.jsxs)(a.A,{size:8,align:"end",children:[(0,h.jsx)(d.A,{ref:x,size:"small",checked:p,onChange:t=>{e.setFieldsValue({mobileBackgroundColor:""}),A((e=>!e)),j({operation:c.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:{mobileBackgroundColor:{classNamePrefix:"em-mob-background_color-",value:p?"":"none"}}})},id:"without-background-color"}),(0,h.jsx)("div",{className:"ant-form-item-switch-label-small",style:{position:"relative",top:2},children:(0,h.jsx)("label",{htmlFor:"without-background-color",children:g("Without background color")})})]})]})})}},35015:(e,o,t)=>{t.d(o,{A:()=>P});t(92810);var i=t(95838),l=t(2018),s=t(7744),r=t(12280),a=t(78159),d=t(20984),n=t(81e3),m=t(66726),c=t(38587),u=t(12751),h=t(14473),b=t(37822),g=t(68285),x=t(57032),p=t(26461),A=t(69118),f=t(10930),j=t(38883),v=t.n(j),_=t(23287),B=t(45934),S=t(26238),y=t(65983),w=t(70082);const{useToken:R}=i.A,P=({mobileBorders:e})=>{const{__:o}=(0,_.s9)(),t=(0,B.d4)(y.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:j}=R();return(0,w.jsxs)(l.A,{gutter:30,children:[(0,w.jsxs)(s.A,{span:12,className:"selected-td-form__border-col",children:[(0,w.jsx)(r.A.Item,{name:"mobileBorderColor",className:"form-item-margin-xs",children:(0,w.jsx)(S.A,{usedColors:t.usedColors})}),(0,w.jsx)(r.A.Item,{name:"mobileBorderWidth",className:"form-item-margin-xs",children:(0,w.jsx)(a.A,{min:0,placeholder:o("Border width"),addonAfter:"px"})}),(0,w.jsx)(r.A.Item,{name:"mobileBorderStyle",className:"form-item-margin-xs",children:(0,w.jsx)(d.Ay.Group,{children:(0,w.jsxs)(n.A,{size:8,children:[(0,w.jsx)(m.A,{placement:"bottom",title:o("None"),children:(0,w.jsx)(d.Ay.Button,{value:"",children:(0,w.jsx)(c.A,{})})}),(0,w.jsx)(m.A,{placement:"bottom",title:o("Solid"),children:(0,w.jsx)(d.Ay.Button,{value:"solid",children:(0,w.jsx)(u.A,{})})}),(0,w.jsx)(m.A,{placement:"bottom",title:o("Dashed"),children:(0,w.jsx)(d.Ay.Button,{value:"dashed",children:(0,w.jsx)(h.A,{})})}),(0,w.jsx)(m.A,{placement:"bottom",title:o("Dotted"),children:(0,w.jsx)(d.Ay.Button,{value:"dotted",children:(0,w.jsx)(b.A,{})})})]})})})]}),(0,w.jsx)(s.A,{span:12,style:{textAlign:"center"},children:(0,w.jsx)(r.A.Item,{label:"",name:"mobileBorderPosition",labelCol:{span:8},children:(0,w.jsx)(d.Ay.Group,{children:(0,w.jsxs)(n.A,{size:j.formItemMarginBottomXS,direction:"vertical",children:[(0,w.jsx)(l.A,{children:(0,w.jsx)(m.A,{placement:"top",title:o("Above"),children:(0,w.jsx)(d.Ay.Button,{value:"top",style:{margin:"auto"},className:v()("",{"selected-td-form__border-radio":i(null===e||void 0===e?void 0:e.top)}),children:(0,w.jsx)(g.A,{})})})}),(0,w.jsx)(l.A,{children:(0,w.jsxs)(n.A,{size:j.formItemMarginBottomXS,children:[(0,w.jsx)(m.A,{placement:"left",title:o("On the left"),children:(0,w.jsx)(d.Ay.Button,{value:"left",className:v()("",{"selected-td-form__border-radio":i(null===e||void 0===e?void 0:e.left)}),children:(0,w.jsx)(x.A,{})})}),(0,w.jsx)(m.A,{placement:"top",title:o("Around"),children:(0,w.jsx)(d.Ay.Button,{value:"all",className:v()("",{"selected-td-form__border-radio":i(null===e||void 0===e?void 0:e.all)}),children:(0,w.jsx)(p.A,{})})}),(0,w.jsx)(m.A,{placement:"right",title:o("On the right"),children:(0,w.jsx)(d.Ay.Button,{value:"right",className:v()("",{"selected-td-form__border-radio":i(null===e||void 0===e?void 0:e.right)}),children:(0,w.jsx)(A.A,{})})})]})}),(0,w.jsx)(l.A,{children:(0,w.jsx)(m.A,{placement:"bottom",title:o("Below"),children:(0,w.jsx)(d.Ay.Button,{value:"bottom",className:v()("",{"selected-td-form__border-radio":i(null===e||void 0===e?void 0:e.bottom)}),style:{margin:"auto"},children:(0,w.jsx)(f.A,{})})})})]})})})})]})}},99983:(e,o,t)=>{t.d(o,{A:()=>f});t(92810);var i=t(2018),l=t(7744),s=t(81e3),r=t(12280),a=t(43005),d=t(66726),n=t(1728),m=t(82051),c=t(11696),u=t(87042),h=t(38883),b=t.n(h),g=t(23287),x=t(88647),p=t(44997),A=t(70082);const f=({form:e,oneMobileBorderRadiusValue:o,setOneMobileBorderRadiusValue:t})=>{const{__:h}=(0,g.s9)();return(0,A.jsxs)(i.A,{gutter:10,children:[(0,A.jsx)(l.A,{span:12,children:(0,A.jsx)(s.A,{size:10,align:"start",children:(0,A.jsx)(r.A.Item,{name:"mobileBorderRadiusAll",children:(0,A.jsx)(p.A,{min:0,placeholder:h("Border radius"),prefix:(0,A.jsx)(x.h,{className:"selected-td-form__icon-radius"}),disabled:!o,addonAfter:"px"})})})}),(0,A.jsx)(l.A,{span:12,children:(0,A.jsx)(a.Ay,{className:b()("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,A.jsx)(x.h,{className:"selected-td-form__icon-radius"})})}),(0,A.jsx)(l.A,{children:(0,A.jsxs)(i.A,{gutter:10,style:{marginTop:-10},children:[(0,A.jsxs)(l.A,{span:12,children:[(0,A.jsx)(d.A,{placement:"bottom",title:h("Top left corner"),children:(0,A.jsx)(r.A.Item,{hidden:o,name:"mobileRadiusTopLeft",className:"form-item-margin-xs",children:(0,A.jsx)(p.A,{min:0,prefix:(0,A.jsx)(n.A,{}),style:{minHeight:10},addonAfter:"px"})})}),(0,A.jsx)(d.A,{placement:"bottom",title:h("Bottom left corner"),children:(0,A.jsx)(r.A.Item,{hidden:o,name:"mobileRadiusBottomLeft",children:(0,A.jsx)(p.A,{min:0,prefix:(0,A.jsx)(m.A,{}),style:{minHeight:10},addonAfter:"px"})})})]}),(0,A.jsxs)(l.A,{span:12,children:[(0,A.jsx)(d.A,{placement:"bottom",title:h("Top right corner"),children:(0,A.jsx)(r.A.Item,{hidden:o,name:"mobileRadiusTopRight",className:"form-item-margin-xs",children:(0,A.jsx)(p.A,{min:0,prefix:(0,A.jsx)(c.A,{}),style:{minHeight:10},addonAfter:"px"})})}),(0,A.jsx)(d.A,{placement:"bottom",title:h("Bottom right corner"),children:(0,A.jsx)(r.A.Item,{hidden:o,name:"mobileRadiusBottomRight",children:(0,A.jsx)(p.A,{min:0,prefix:(0,A.jsx)(u.A,{}),style:{minHeight:10},addonAfter:"px"})})})]})]})})]})}},18405:(e,o,t)=>{t.d(o,{A:()=>v});var i=t(92810),l=t(81e3),s=t(8701),r=t(2018),a=t(7744),d=t(66726),n=t(12280),m=t(37005),c=t(29258),u=t(23287),h=t(45934),b=t(26238),g=t(62303),x=t(44997),p=t(85163),A=t(45695),f=t(65983),j=t(70082);const v=({form:e,elementSettings:o})=>{const{__:t}=(0,u.s9)(),v=(0,i.useRef)(),_=(0,h.d4)(f.uJ),[B,S]=(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),y=(0,A.XW)(),w=e=>{S(!1)};return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("div",{style:{float:"right",marginTop:-9,marginRight:50},children:(0,j.jsxs)(l.A,{size:8,align:"end",children:[(0,j.jsx)(s.A,{ref:v,size:"small",checked:B,onChange:t=>{S((e=>!e)),e.setFieldsValue({mobileBoxShadowHOffset:B?"":0,mobileBoxShadowVOffset:B?"":0,mobileBoxShadowBlurRadius:B?"":0,mobileBoxShadowSpreadRadius:B?"":0,mobileBoxShadowColor:"",mobileBoxShadowInset:!1}),y({operation:p.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:{mobileBoxShadow:{classNamePrefix:"em-mob-box_shadow-",hOffset:B?null:0,vOffset:B?null:0,blurRadius:B?null:0,spreadRadius:B?null:0,color:null,inset:!1}}})},id:"without-shadow"}),(0,j.jsx)("div",{className:"ant-form-item-switch-label-small",style:{position:"relative",top:2},children:(0,j.jsx)("label",{htmlFor:"without-shadow",children:t("Without shadow")})})]})}),(0,j.jsx)("p",{style:{paddingBottom:"8px",margin:"-30px 0 0"},children:"\xa0"}),(0,j.jsxs)(r.A,{gutter:10,children:[(0,j.jsx)(a.A,{span:12,children:(0,j.jsx)(d.A,{placement:"bottom",title:t("Horizontal offset"),children:(0,j.jsx)(n.A.Item,{name:"mobileBoxShadowHOffset",className:"form-item-margin-xs",children:(0,j.jsx)(x.A,{min:0,placeholder:t("Horizontal offset"),prefix:(0,j.jsx)(c.A,{}),addonAfter:"px",onChange:w})})})}),(0,j.jsx)(a.A,{span:12,children:(0,j.jsx)(d.A,{placement:"bottom",title:t("Vertical offset"),children:(0,j.jsx)(n.A.Item,{name:"mobileBoxShadowVOffset",className:"form-item-margin-xs",children:(0,j.jsx)(x.A,{min:0,placeholder:t("Vertical offset"),prefix:(0,j.jsx)(c.A,{style:{transform:"rotate(90deg)"}}),addonAfter:"px",onChange:w})})})}),(0,j.jsx)(a.A,{span:12,children:(0,j.jsx)(d.A,{placement:"bottom",title:t("Blur radius"),children:(0,j.jsx)(n.A.Item,{name:"mobileBoxShadowBlurRadius",className:"form-item-margin-xs",children:(0,j.jsx)(x.A,{min:0,placeholder:t("Blur radius"),prefix:(0,j.jsx)(g.A,{icon:"Blur",style:{fontSize:16,marginLeft:-2}}),addonAfter:"px",onChange:w})})})}),(0,j.jsx)(a.A,{span:12,children:(0,j.jsx)(d.A,{placement:"bottom",title:t("Spread radius"),children:(0,j.jsx)(n.A.Item,{name:"mobileBoxShadowSpreadRadius",className:"form-item-margin-xs",children:(0,j.jsx)(x.A,{placeholder:t("Spread radius"),prefix:(0,j.jsx)(g.A,{icon:"ZoomOutMap"}),addonAfter:"px",onChange:w})})})}),(0,j.jsx)(a.A,{span:12,children:(0,j.jsx)(l.A,{size:10,align:"start",children:(0,j.jsx)(n.A.Item,{name:"mobileBoxShadowColor",children:(0,j.jsx)(b.A,{usedColors:_.usedColors})})})}),(0,j.jsx)(a.A,{span:12,children:(0,j.jsx)(d.A,{title:t("Shadow inside or outside of the element"),placement:"bottom",children:(0,j.jsx)(n.A.Item,{name:"mobileBoxShadowInset",valuePropName:"checked",children:(0,j.jsx)(m.A,{style:{width:"100%"},options:[{label:t("Outside"),value:!1},{label:t("Inside"),value:!0}]})})},"inset")})]})]})}},65655:(e,o,t)=>{t.d(o,{A:()=>n});t(92810);var i=t(66726),l=t(12280),s=t(7166),r=t(23287),a=t(44997),d=t(70082);const n=()=>{const{__:e}=(0,r.s9)();return(0,d.jsx)(i.A,{trigger:["hover"],title:e("The font-size CSS property sets the size of the font."),placement:"top",children:(0,d.jsx)(l.A.Item,{name:"mobileFontSize",children:(0,d.jsx)(a.A,{min:0,placeholder:e("Font size"),prefix:(0,d.jsx)(s.A,{}),addonAfter:"px"})})})}},95955:(e,o,t)=>{t.d(o,{A:()=>g});var i=t(92810),l=t(95838),s=t(12280),r=t(81e3),a=t(8701),d=t(11007),n=t(23287),m=t(85163),c=t(44997),u=t(45695),h=t(70082);const{useToken:b}=l.A,g=({form:e,name:o,elementSettings:t,isPicture:l})=>{var g;const{__:x}=(0,n.s9)(),p=(0,u.XW)(),A=(0,i.useRef)(),f=(0,i.useRef)(),[j,v]=(0,i.useState)("auto"===(null===(g=t.mobileHeight)||void 0===g?void 0:g.value)),{token:_}=b();return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(s.A.Item,{name:o,style:{marginBottom:_.formItemMarginBottomXS/2},children:(0,h.jsx)(c.A,{ref:A,min:0,placeholder:x("Height"),onChange:e=>{v(!1)},prefix:(0,h.jsx)(d.A,{}),addonAfter:"px"})}),!l&&(0,h.jsxs)(r.A,{size:8,align:"end",children:[(0,h.jsx)(a.A,{ref:f,size:"small",checked:j,onChange:o=>{A.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,h.jsx)("div",{className:"ant-form-item-switch-label-small",style:{position:"relative",top:2},children:(0,h.jsx)("label",{htmlFor:"auto-height",children:x("Auto")})})]})]})}},34353:(e,o,t)=>{t.d(o,{A:()=>p});t(92810);var i=t(95838),l=t(7744),s=t(66726),r=t(12280),a=t(43005),d=t(38883),n=t.n(d),m=t(23287),c=t(85163),u=t(44997),h=t(62303),b=t(45695),g=t(70082);const{useToken:x}=i.A,p=({form:e,elementSettings:o,mobilePaddingsExt:t,setMobilePaddingsExt:i})=>{const{__:d}=(0,m.s9)(),{token:p}=x(),A=(0,b.XW)();return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(l.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"},children:[(0,g.jsx)("div",{className:"padding-collapsed",style:{display:t?"block":"none"},children:(0,g.jsx)(s.A,{title:d("Horizontal padding"),placement:"bottom",children:(0,g.jsx)(r.A.Item,{name:"mobilePaddingLeftRight",children:(0,g.jsx)(u.A,{min:0,placeholder:d("Horizontal"),prefix:(0,g.jsx)(h.A,{icon:"PaddingLeftRight"}),addonAfter:"px"})})})}),(0,g.jsxs)("div",{className:"padding-extended",style:{display:t?"none":"block"},children:[(0,g.jsx)(s.A,{trigger:["hover"],title:d("Left padding"),placement:"bottom",children:(0,g.jsx)(r.A.Item,{name:"mobilePaddingLeft",style:{marginBottom:p.formItemMarginBottomXS},children:(0,g.jsx)(u.A,{min:0,placeholder:d("Left"),prefix:(0,g.jsx)(h.A,{icon:"PaddingLeft"}),addonAfter:"px"})})}),(0,g.jsx)(s.A,{trigger:["hover"],title:d("Right padding"),placement:"bottom",children:(0,g.jsx)(r.A.Item,{name:"mobilePaddingRight",children:(0,g.jsx)(u.A,{min:0,placeholder:d("Right"),prefix:(0,g.jsx)(h.A,{icon:"PaddingRight"}),addonAfter:"px"})})})]})]}),(0,g.jsxs)(l.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"},children:[(0,g.jsx)("div",{className:"padding-collapsed",style:{display:t?"block":"none"},children:(0,g.jsx)(s.A,{title:d("Vertical padding"),placement:"bottom",children:(0,g.jsx)(r.A.Item,{name:"mobilePaddingTopBottom",children:(0,g.jsx)(u.A,{min:0,placeholder:d("Vertical"),prefix:(0,g.jsx)(h.A,{icon:"PaddingTopBottom"}),addonAfter:"px"})})})}),(0,g.jsxs)("div",{className:"padding-extended",style:{display:t?"none":"block"},children:[(0,g.jsx)(s.A,{trigger:["hover"],title:d("Top padding"),placement:"bottom",children:(0,g.jsx)(r.A.Item,{name:"mobilePaddingTop",style:{marginBottom:p.formItemMarginBottomXS},children:(0,g.jsx)(u.A,{min:0,placeholder:d("Top"),prefix:(0,g.jsx)(h.A,{icon:"PaddingTop"}),addonAfter:"px"})})}),(0,g.jsx)(s.A,{trigger:["hover"],title:d("Bottom padding"),placement:"bottom",children:(0,g.jsx)(r.A.Item,{name:"mobilePaddingBottom",children:(0,g.jsx)(u.A,{min:0,placeholder:d("Bottom"),prefix:(0,g.jsx)(h.A,{icon:"PaddingBottom"}),addonAfter:"px"})})})]})]}),(0,g.jsx)(l.A,{span:4,style:{width:45,flex:"auto",maxWidth:"none"},children:(0,g.jsx)(s.A,{title:d("Individual padding"),placement:"bottom",children:(0,g.jsx)(a.Ay,{className:n()("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,A({operation:c.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,g.jsx)(h.A,{icon:"PaddingSwitcher"})})})})]})}},24615:(e,o,t)=>{t.d(o,{A:()=>A});var i=t(92810),l=t(81662),s=t(95838),r=t(12280),a=t(81e3),d=t(8701),n=t(62767),m=t(23287),c=t(85163),u=t(45695),h=t(44997),b=t(70082);const{Option:g}=l.A,x=(0,b.jsxs)(l.A,{className:"select-after",getPopupContainer:e=>e.parentNode,children:[(0,b.jsx)(g,{value:"px",children:"px"}),(0,b.jsx)(g,{value:"%",children:"%"})]}),{useToken:p}=s.A,A=({form:e,name:o,elementSettings:t,isPicture:l})=>{var s;const{__:g}=(0,m.s9)(),A=(0,u.XW)(),f=(0,i.useRef)(),j=(0,i.useRef)(),[v,_]=(0,i.useState)("auto"===(null===(s=t[o])||void 0===s?void 0:s.value)),{token:B}=p(),[S,y]=(0,i.useState)("");return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(r.A.Item,{name:o,style:{marginBottom:B.formItemMarginBottomXS/2},children:(0,b.jsx)(h.A,{ref:f,min:0,max:S,placeholder:g("Width"),onChange:t=>{_(!1),y("%"===e.getFieldsValue(!0)[o+"Dim"]?100:"")},prefix:(0,b.jsx)(n.A,{}),addonAfter:(0,b.jsx)(r.A.Item,{name:o+"Dim",noStyle:!0,children:x})})}),!l&&(0,b.jsxs)(a.A,{size:8,align:"end",children:[(0,b.jsx)(d.A,{ref:j,size:"small",checked:v,onChange:i=>{f.current.value=null,e.setFieldsValue({[o]:"",[o+"Dim"]:"px"}),_((e=>!e)),A({operation:c.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:t.type,settings:{[o]:{classNamePrefix:"em-mob-width-",value:v?null:"auto",dim:""}}})},id:"auto-width"}),(0,b.jsx)("div",{className:"ant-form-item-switch-label-small",style:{position:"relative",top:2},children:(0,b.jsx)("label",{htmlFor:"auto-width",children:g("Auto")})})]})]})}},13071:(e,o,t)=>{t.d(o,{A:()=>u});t(92810);var i=t(12280),l=t(20984),s=t(81e3),r=t(66726),a=t(68912),d=t(50295),n=t(23287),m=t(70082);const c=({form:e,elementSettings:o})=>{const{__:t}=(0,n.s9)();return(0,m.jsx)(i.A.Item,{name:"show",children:(0,m.jsx)(l.Ay.Group,{children:(0,m.jsxs)(s.A,{size:8,children:[(0,m.jsx)(l.Ay.Button,{value:"all",children:t("Both")}),(0,m.jsx)(r.A,{placement:"top",title:t("Desktop"),children:(0,m.jsx)(l.Ay.Button,{value:"desktop",children:(0,m.jsx)(a.A,{})})}),(0,m.jsx)(r.A,{placement:"top",title:t("Mobile"),children:(0,m.jsx)(l.Ay.Button,{value:"mobile",children:(0,m.jsx)(d.A,{})})})]})})})};c.defaultProps={};const u=c},73721:(e,o,t)=>{t.d(o,{A:()=>b});var i=t(92810),l=t(12280),s=t(66726),r=t(43005),a=t(23287),d=t(85163),n=t(45695),m=t(38883),c=t.n(m),u=t(70082);const h=({form:e,elementSettings:o,name:t,icon:m,tooltipTitle:h=null,showTooltip:b=!0})=>{const{__:g}=(0,a.s9)(),x=e.getFieldValue(t),p=(0,n.XW)(),[A,f]=(0,i.useState)(o[t]);(0,i.useEffect)((()=>{o[t]!==e.getFieldValue(t)&&(e.setFieldValue(t,o[t]),f(o[t]))}),[o,e,t]),(0,i.useEffect)((()=>{A!==x&&f(x)}),[x,A,t]);const j=()=>{const i={[t]:!A};e.setFieldValue(t,!A),p({operation:d.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:i}),f((e=>!e))};return(0,u.jsx)(l.A.Item,{name:t,children:b?(0,u.jsx)(s.A,{placement:"bottom",title:h||g(`${t.substring(4)}`),children:(0,u.jsx)(r.Ay,{className:c()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":A}),onClick:j,children:m})}):(0,u.jsx)(r.Ay,{className:c()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":A}),onClick:j,children:m})})};h.defaultProps={imgParent:!1};const b=h},26021:(e,o,t)=>{t.d(o,{A:()=>h});var i=t(92810),l=t(12280),s=t(20984),r=t(81e3),a=t(66726),d=t(23287),n=t(62303),m=t(85163),c=t(45695),u=t(70082);const h=({form:e,elementSettings:o,tooltipTitle:t,disabled:h=!1})=>{const{__:b}=(0,d.s9)(),g=(0,c.XW)(),[x,p]=(0,i.useState)(o.valign),A=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)(s.Ay.Group,{disabled:h,children:(0,u.jsxs)(r.A,{size:8,children:[(0,u.jsx)(a.A,{placement:"bottom",title:b("Align top"),children:(0,u.jsx)(s.Ay.Button,{value:"top",onClick:A,children:(0,u.jsx)(n.A,{icon:"AlignVerticalTop"})})}),(0,u.jsx)(a.A,{placement:"bottom",title:b("Center vertically"),children:(0,u.jsx)(s.Ay.Button,{value:"middle",onClick:A,children:(0,u.jsx)(n.A,{icon:"AlignVerticalCenter"})})}),(0,u.jsx)(a.A,{placement:"bottom",title:b("Align bottom"),children:(0,u.jsx)(s.Ay.Button,{value:"bottom",onClick:A,children:(0,u.jsx)(n.A,{icon:"AlignVerticalBottom"})})})]})})})}},34275:(e,o,t)=>{t.d(o,{A:()=>d});t(92810);var i=t(38883),l=t.n(i),s=t(78920),r=(t(37981),t(70082));const a=({className:e,selectedElement:o,emailElementType:t})=>(0,r.jsx)("div",{className:l()("selected-element-panel",{[e]:e}),style:{height:"100%"},children:(0,r.jsx)(s.A,{className:l()("selected-element-panel__content SelectedElementPanel",{"column-settings-show":!!o.floatBlocks&&o.floatBlocks.items.length>1}),emailElementType:t})});a.defaultProps={className:null,selectedElement:{parent:!1}};const d=a},78920:(e,o,t)=>{t.d(o,{A:()=>yo});var i=t(92810),l=t(99215),s=t(38883),r=t.n(s),a=t(45934),d=t(65983),n=t(7760),m=t(71157),c=t(95838),u=t(12280),h=t(81662),b=t(66726),g=t(29234),x=t(2018),p=t(7744),A=t(71086),f=t(43005),j=t(79579),v=t(81e3),_=t(55039),B=t(7228),S=t(9588),y=t(37517),w=t(73035),R=t(27071),P=t(9038),N=t(62767),k=t(11007),T=t(54316),E=t(4815),I=t(23287),C=t(14523),L=t.n(C),O=t(64617),F=t(6890),D=t(49343),V=t(21519),M=t(71495),W=t(28381),H=t(26021),X=t(58341),z=t(24615),G=t(95955),U=t(35015),Y=t(99983),q=t(18405),K=t(48513),J=t(20984),Q=t(62303),Z=t(85163),$=t(45695),ee=t(70082);const oe=({form:e,elementSettings:o,tooltipTitle:t})=>{var l;const{__:s}=(0,I.s9)(),[r,a]=(0,i.useState)(null===(l=o.mobileVerticalAlign)||void 0===l?void 0:l.value),d=(0,$.XW)(),n=t=>{const i=t.target.value,l={mobileVerticalAlign:{classNamePrefix:"em-mob-vertical_align",value:""}};i!==r?a(i):(a(""),e.setFieldsValue(l),d({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:l}))};return(0,ee.jsx)(u.A.Item,{name:"mobileVerticalAlign",children:(0,ee.jsx)(J.Ay.Group,{children:(0,ee.jsxs)(v.A,{size:8,children:[(0,ee.jsx)(b.A,{placement:"bottom",title:s("Align top"),children:(0,ee.jsx)(J.Ay.Button,{value:"top",onClick:n,children:(0,ee.jsx)(Q.A,{icon:"AlignVerticalTop"})})}),(0,ee.jsx)(b.A,{placement:"bottom",title:s("Center vertically"),children:(0,ee.jsx)(J.Ay.Button,{value:"middle",onClick:n,children:(0,ee.jsx)(Q.A,{icon:"AlignVerticalCenter"})})}),(0,ee.jsx)(b.A,{placement:"bottom",title:s("Align bottom"),children:(0,ee.jsx)(J.Ay.Button,{value:"bottom",onClick:n,children:(0,ee.jsx)(Q.A,{icon:"AlignVerticalBottom"})})})]})})})};var te=t(13071),ie=t(94104),le=t(8701),se=t(78159),re=t(7166),ae=t(6391),de=t(69372),ne=t(26238);const{useToken:me}=c.A,ce=({form:e,elementSettings:o,handleChangeValues:t})=>{const{__:l}=(0,I.s9)(),s=(0,i.useRef)(),{token:a}=me(),[d,n]=(0,i.useState)(!1),[m,c]=(0,i.useState)(!1),[g,A]=(0,i.useState)(!1),[j,_]=(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")),A(e.searchParams.get("font2").endsWith("-b")||e.searchParams.get("font2").endsWith("-bi")),_(e.searchParams.get("font2").endsWith("-i")||e.searchParams.get("font2").endsWith("-bi")),S("true"===e.searchParams.get("tp"))}),[o]);const y=[{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")}],w=[{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"}],R=e=>{var o;e.target.closest(".ant-picker-dropdown")||(null===(o=s.current)||void 0===o||o.blur())};(0,i.useEffect)((()=>(window.addEventListener("scroll",R,!0),()=>{window.removeEventListener("scroll",R,!0)})));return(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsxs)(x.A,{gutter:10,children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(u.A.Item,{label:l("End time"),name:"countdownTime",children:(0,ee.jsx)(ie.A,{ref:s,format:"DD.MM.YYYY HH:mm",disabledDate:e=>e&&e<L()().endOf("day")-864e5,showTime:!0,getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),allowClear:!1,allowEmpty:!1})})}),(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(u.A.Item,{label:l("Time zone"),name:"countdownTimeZone",style:{width:"100%"},children:(0,ee.jsx)(h.A,{placeholder:l("Select the time zone"),getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel"),children:y.map((e=>(0,ee.jsx)(h.A.Option,{value:e.value,children:e.label},e.value)))})})})]}),(0,ee.jsxs)(x.A,{gutter:20,children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(u.A.Item,{label:l("Background color"),name:"countdownBackgroundColor",className:"countdown-color",children:(0,ee.jsx)(ne.A,{placeholder:l("Background color"),isDisabled:B,usedColors:o.usedColors})})}),(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsxs)(v.A,{size:10,align:"baseline",style:{paddingTop:29},children:[(0,ee.jsx)(u.A.Item,{name:"countdownTransparency",valuePropName:"checked",children:(0,ee.jsx)(le.A,{size:"small",id:"countdownTransparency",onChange:e=>{S(e)}})}),(0,ee.jsx)("span",{style:{position:"relative",top:2},children:(0,ee.jsx)("label",{htmlFor:"countdownTransparency",children:l("Transparency")})})]})})]}),(0,ee.jsx)("div",{className:"form-group-title",style:{paddingTop:0,paddingBottom:8},children:l("Countdown font settings")}),(0,ee.jsxs)(x.A,{gutter:10,children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(u.A.Item,{name:"countdownNumbersFont",style:{marginBottom:a.formItemMarginBottomXS},children:(0,ee.jsx)(h.A,{getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel"),options:w})})}),(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(u.A.Item,{name:"countdownNumbersColor",className:"countdown-color",style:{marginBottom:a.formItemMarginBottomXS},children:(0,ee.jsx)(ne.A,{usedColors:o.usedColors})})}),(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(u.A.Item,{name:"countdownNumbersFontSize",children:(0,ee.jsx)(se.A,{min:12,placeholder:l("Font size"),prefix:(0,ee.jsx)(re.A,{}),addonAfter:"px"})})}),(0,ee.jsx)(p.A,{span:3,children:(0,ee.jsx)(b.A,{placement:"bottom",title:l("Strong"),children:(0,ee.jsx)(u.A.Item,{name:"countdownNumbersStrong",children:(0,ee.jsx)(f.Ay,{className:r()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":d}),onClick:()=>{const o=!d;e.setFieldValue("countdownNumbersStrong",o),t({countdownNumbersStrong:o}),n(o)},children:(0,ee.jsx)(ae.A,{className:"selected-td-form__icon-radius"})})})})}),(0,ee.jsx)(p.A,{span:3,children:(0,ee.jsx)(b.A,{placement:"bottom",title:l("Italic"),children:(0,ee.jsx)(u.A.Item,{name:"countdownNumbersItalic",children:(0,ee.jsx)(f.Ay,{className:r()("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,ee.jsx)(de.A,{className:"selected-td-form__icon-radius"})})})})})]}),(0,ee.jsx)("div",{className:"form-group-title",style:{paddingTop:0,paddingBottom:8},children:l("Time units font settings")}),(0,ee.jsxs)(x.A,{gutter:10,children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(u.A.Item,{name:"countdownLabelsFont",style:{marginBottom:a.formItemMarginBottomXS},children:(0,ee.jsx)(h.A,{getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel"),options:w})})}),(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(u.A.Item,{name:"countdownLabelsColor",className:"countdown-color",style:{marginBottom:a.formItemMarginBottomXS},children:(0,ee.jsx)(ne.A,{usedColors:o.usedColors})})}),(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(u.A.Item,{name:"countdownLabelsFontSize",children:(0,ee.jsx)(se.A,{min:8,placeholder:l("Font size"),addonAfter:"px",prefix:(0,ee.jsx)(re.A,{})})})}),(0,ee.jsx)(p.A,{span:3,children:(0,ee.jsx)(b.A,{placement:"bottom",title:l("Strong"),children:(0,ee.jsx)(u.A.Item,{name:"countdownLabelsStrong",children:(0,ee.jsx)(f.Ay,{className:r()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":g}),onClick:()=>{const o=!g;e.setFieldValue("countdownLabelsStrong",o),t({countdownLabelsStrong:o}),A(o)},children:(0,ee.jsx)(ae.A,{className:"selected-td-form__icon-radius"})})})})}),(0,ee.jsx)(p.A,{span:3,children:(0,ee.jsx)(b.A,{placement:"bottom",title:l("Italic"),children:(0,ee.jsx)(u.A.Item,{name:"countdownLabelsItalic",children:(0,ee.jsx)(f.Ay,{className:r()("selected-td-form__button selected-td-form__button_style",{"selected-td-form__button--active":j}),onClick:()=>{const o=!j;e.setFieldValue("countdownLabelsItalic",o),t({countdownLabelsItalic:o}),_(o)},children:(0,ee.jsx)(de.A,{className:"selected-td-form__icon-radius"})})})})})]}),(0,ee.jsx)(x.A,{gutter:10,style:{marginBottom:4},children:(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(u.A.Item,{label:l("Language"),name:"countdownLanguage",style:{width:"100%"},children:(0,ee.jsx)(h.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"}]})})})})]})};var ue=t(85778),he=t(85085),be=t(13417),ge=t(12108);const{useToken:xe}=c.A,pe=({form:e,elementSettings:o})=>{const{__:t}=(0,I.s9)(),{token:i}=xe();return(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(b.A,{trigger:["hover"],title:t("URL of the video clip."),placement:"right",children:(0,ee.jsx)(u.A.Item,{name:"videoSource",className:"selected-image-form__alt",children:(0,ee.jsx)(_.A,{allowClear:!0,placeholder:t("Video URL"),prefix:(0,ee.jsx)(ue.A,{})})})}),(0,ee.jsx)(u.A.Item,{label:t("Play button"),name:"videoPlayButton",style:{width:"100%",marginBottom:i.formItemMarginBottomMD+4},children:(0,ee.jsxs)(h.A,{getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel"),children:[(0,ee.jsxs)(h.A.Option,{value:"youtube_red",children:[(0,ee.jsx)(he.A,{style:{color:"#FF0000"}})," ",t("Youtube Red")]}),(0,ee.jsxs)(h.A.Option,{value:"youtube_black",children:[(0,ee.jsx)(he.A,{})," ",t("Youtube Black")]}),(0,ee.jsxs)(h.A.Option,{value:"youtube_white",children:[(0,ee.jsx)(he.A,{style:{color:"#aaa"}})," ",t("Youtube White")]}),(0,ee.jsxs)(h.A.Option,{value:"vimeo",children:[(0,ee.jsx)(Q.A,{icon:"Vimeo"})," ",t("Vimeo")]}),(0,ee.jsxs)(h.A.Option,{value:"white_circle",children:[(0,ee.jsx)(be.A,{style:{color:"#aaa"}})," ",t("White circle")]}),(0,ee.jsxs)(h.A.Option,{value:"black_circle",children:[(0,ee.jsx)(be.A,{})," ",t("Black circle")]}),(0,ee.jsxs)(h.A.Option,{value:"white_circle_outlined",children:[(0,ee.jsx)(ge.A,{style:{color:"#aaa"}})," ",t("White circle outlined")]}),(0,ee.jsxs)(h.A.Option,{value:"black_circle_outlined",children:[(0,ee.jsx)(ge.A,{})," ",t("Black circle outlined")]}),(0,ee.jsxs)(h.A.Option,{value:"none",children:[" ",t("Without button")]})]})})]})};var Ae=t(44997),fe=t(77532),je=t(32269),ve=t(56991),_e=t(64037),Be=t(63531),Se=t(64936),ye=t(86286),we=t(47358),Re=(t(37981),t(78541)),Pe=t(18398);const Ne={mobileBorderRadiusAll:"all",mobileRadiusTopLeft:"topLeft",mobileRadiusBottomLeft:"bottomLeft",mobileRadiusTopRight:"topRight",mobileRadiusBottomRight:"bottomRight"},{useToken:ke}=c.A,Te=({elementSettings:e})=>{const{__:o}=(0,I.s9)(),t=(0,$.XW)(),[l]=u.A.useForm(),[s,d]=(0,i.useState)({}),[n,c]=(0,i.useState)({}),[C,J]=(0,i.useState)({}),[ie,le]=(0,i.useState)({}),[se,re]=(0,i.useState)(!0),[ae,de]=(0,i.useState)(!0),[ne,me]=(0,i.useState)(""),[ue,he]=(0,i.useState)(""),[be,ge]=(0,i.useState)(""),xe=(0,a.d4)(we.Ct),Te=(0,a.d4)(we.CS);let Ee=(0,a.wA)();const[Ie]=(0,Be.dS)(),Ce=(0,a.d4)(ye.C1),{projectId:Le}=(0,O.g)(),Oe=(0,m.hN)(),Fe=(0,ve.rD)(),{token:De}=ke(),Ve=(0,i.useRef)(null),Me=(0,i.useRef)(null),We=(0,i.useRef)(null),He=(0,i.useRef)(null),Xe=(0,i.useRef)(null),ze=(0,i.useRef)(null),Ge=(0,i.useRef)(null),Ue=(0,i.useRef)(null),Ye=(0,$.K9)(),[qe,Ke]=(0,i.useState)(!1),[Je,Qe]=(0,i.useState)(!1),[Ze,$e]=(0,i.useState)(!1),[eo,oo]=(0,i.useState)(!1),[to,io]=(0,i.useState)(!1),[lo,so]=(0,i.useState)(!1),[ro,ao]=(0,i.useState)(!1),[no,mo]=(0,Be.tb)(),[co,uo]=(0,i.useState)(!1),ho=(0,a.d4)(we.Fv),bo=(0,a.d4)(we.yy),go=ho&&"bottom"!==bo,[xo,po]=(0,i.useState)("https://"),[Ao,fo]=(0,i.useState)(),[jo,vo]=(0,i.useState)(!1),[_o,Bo]=(0,i.useState)(null),[So,yo]=(0,i.useState)({start:0,end:0}),[wo,Ro]=(0,i.useState)(!1),Po=(0,i.useRef)(null),No=(0,a.d4)(Pe.GH);(0,i.useEffect)((()=>{var e;null!==No&&void 0!==No&&null!==(e=No.items)&&void 0!==e&&e.length&&fo((0,ve.cM)(No.items,o,((e,o)=>{vo(!1),Ye(Z.Ru.SANDBOX_ADD_MERGETAG,e),o.stopPropagation(),o.preventDefault()})))}),[No,fo,o,vo,Ye]);(0,i.useEffect)((()=>{const e=({target:e})=>{e.closest('[id="merge_tags_wrapper"]')||Bo(e)},o=({target:e})=>{e.closest(".merge-tags")||e.closest("#merge_tags_button")||vo(!1)};return window.addEventListener("focusin",e),window.addEventListener("click",o),()=>{window.removeEventListener("focusin",e),window.addEventListener("click",o)}}),[]);const ko=({target:e})=>{if(e&&!wo){const{selectionStart:o,selectionEnd:t}=e;yo({start:o,end:t})}Ro(!1)};(0,i.useEffect)((()=>{if(e){var o,t,i,s,r,a,n,m,u,h,b,g,x,p,A,f,j,v,_,B,S,y,w,R,P,N,k,T,E,I,C,O,F;const M=e.border,W=e.mobileBorder,H=e.boxShadow,X=e.mobileBoxShadow;d(M),c(W),J(H),le(X);const z=e=>e||(0===e?"0":""),G=e=>e&&"auto"!==e?e:0===e?"0":"",U=Object.keys(M).find((e=>{var o,t,i;return(null===(o=M[e])||void 0===o?void 0:o.width)||(null===(t=M[e])||void 0===t?void 0:t.style)||(null===(i=M[e])||void 0===i?void 0:i.color)})),Y=Object.keys(W).find((e=>{var o,t,i;return(null===(o=W[e])||void 0===o?void 0:o.width)||(null===(t=W[e])||void 0===t?void 0:t.style)||(null===(i=W[e])||void 0===i?void 0:i.color)}));if(e.link&&("mailto:"===e.link.substring(0,7)?po("mailto:"):"tel:"===e.link.substring(0,4)?po("tel:"):"sms:"===e.link.substring(0,4)?po("sms:"):"ftp://"===e.link.substring(0,6)?po("ftp://"):"skype:"===e.link.substring(0,6)?po("skype:"):"viber:"===e.link.substring(0,6)?po("viber:"):po("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===(s=e.height)||void 0===s?void 0:s.dim,borderPosition:U||"all",borderWidth:null!==(null===(r=M[U])||void 0===r?void 0:r.width)?null===(a=M[U])||void 0===a?void 0:a.width:"",borderColor:(null===(n=M[U])||void 0===n?void 0:n.color)||"",borderStyle:(null===(m=M[U])||void 0===m?void 0:m.style)||"",borderRadiusAll:z(e.borderRadius.all),borderRadiusTopLeft:z(e.borderRadius.topLeft),borderRadiusBottomLeft:z(e.borderRadius.bottomLeft),borderRadiusTopRight:z(e.borderRadius.topRight),borderRadiusBottomRight:z(e.borderRadius.bottomRight),boxShadowInset:z(null===(u=e.boxShadow)||void 0===u?void 0:u.inset)||!1,boxShadowHOffset:z(null===(h=e.boxShadow)||void 0===h?void 0:h.hOffset),boxShadowVOffset:z(null===(b=e.boxShadow)||void 0===b?void 0:b.vOffset),boxShadowBlurRadius:z(null===(g=e.boxShadow)||void 0===g?void 0:g.blurRadius),boxShadowSpreadRadius:z(null===(x=e.boxShadow)||void 0===x?void 0:x.spreadRadius),boxShadowColor:z(null===(p=e.boxShadow)||void 0===p?void 0:p.color),mobileWidth:G(null===(A=e.mobileWidth)||void 0===A?void 0:A.value),mobileWidthDim:null===(f=e.mobileWidth)||void 0===f?void 0:f.dim,mobileHeight:G(null===(j=e.mobileHeight)||void 0===j?void 0:j.value),mobileHeightDim:null===(v=e.mobileHeight)||void 0===v?void 0:v.dim,mobileBorderPosition:Y||"all",mobileBorderWidth:null!==(null===(_=W[Y])||void 0===_?void 0:_.width)?null===(B=W[Y])||void 0===B?void 0:B.width:"",mobileBorderColor:(null===(S=W[Y])||void 0===S?void 0:S.color)||"",mobileBorderStyle:(null===(y=W[Y])||void 0===y?void 0:y.style)||"",mobileBorderRadiusAll:z(e.mobileBorderRadius.all),mobileRadiusTopLeft:z(null!==e.mobileBorderRadius.topLeft?e.mobileBorderRadius.topLeft:e.mobileBorderRadius.all),mobileRadiusBottomLeft:z(null!==e.mobileBorderRadius.bottomLeft?e.mobileBorderRadius.bottomLeft:e.mobileBorderRadius.all),mobileRadiusTopRight:z(null!==e.mobileBorderRadius.topRight?e.mobileBorderRadius.topRight:e.mobileBorderRadius.all),mobileRadiusBottomRight:z(null!==e.mobileBorderRadius.bottomRight?e.mobileBorderRadius.bottomRight:e.mobileBorderRadius.all),mobileBoxShadowInset:z(null===(w=e.mobileBoxShadow)||void 0===w?void 0:w.inset)||!1,mobileBoxShadowHOffset:z(null===(R=e.mobileBoxShadow)||void 0===R?void 0:R.hOffset),mobileBoxShadowVOffset:z(null===(P=e.mobileBoxShadow)||void 0===P?void 0:P.vOffset),mobileBoxShadowBlurRadius:z(null===(N=e.mobileBoxShadow)||void 0===N?void 0:N.blurRadius),mobileBoxShadowSpreadRadius:z(null===(k=e.mobileBoxShadow)||void 0===k?void 0:k.spreadRadius),mobileBoxShadowColor:z(null===(T=e.mobileBoxShadow)||void 0===T?void 0:T.color),mobileAlign:z(null===(E=e.mobileAlign)||void 0===E?void 0:E.value),mobileVerticalAlign:z(null===(I=e.mobileVerticalAlign)||void 0===I?void 0:I.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,s=!1;t.endsWith("-b")?(t=t.substring(0,t.length-2),i=!0):t.endsWith("-i")?(t=t.substring(0,t.length-2),s=!0):t.endsWith("-bi")&&(t=t.substring(0,t.length-3),i=!0,s=!0);let r=o.searchParams.get("font2"),a=!1,d=!1;r.endsWith("-b")?(r=r.substring(0,r.length-2),a=!0):r.endsWith("-i")?(r=r.substring(0,r.length-2),d=!0):r.endsWith("-bi")&&(r=r.substring(0,r.length-3),a=!0,d=!0),l.setFieldsValue({countdownTime:L()(new Date(Date.parse(o.searchParams.get("time"))+36e5*o.searchParams.get("timezone")+(new Date).getTimezoneOffset()/60*36e5).toISOString()),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:r,countdownLabelsFontSize:o.searchParams.get("size2")/2,countdownLabelsFontSizeDim:"px",countdownLabelsColor:"#"+o.searchParams.get("color2"),countdownNumbersStrong:i,countdownNumbersItalic:s,countdownLabelsStrong:a,countdownLabelsItalic:d})}var D,V;if(e.video)l.setFieldsValue({videoPlayButton:null!==(D=e.video.playButton)&&void 0!==D?D:"youtube_red",videoSource:null!==(V=e.video.source)&&void 0!==V?V:""});!z(e.borderRadius.all)&&(z(e.borderRadius.topLeft)||z(e.borderRadius.bottomLeft)||z(e.borderRadius.topRight)||z(e.borderRadius.bottomRight))?re(!1):re(!0),z(e.mobileBorderRadius.topLeft)||z(e.mobileBorderRadius.bottomLeft)||z(e.mobileBorderRadius.topRight)||z(e.mobileBorderRadius.bottomRight)?de(!1):de(!0),Ke(!(null===(C=M[U])||void 0===C||!C.width)),Qe(!(null===(O=W[Y])||void 0===O||!O.width)),$e(!!e.borderRadius.all||!!e.borderRadius.topLeft||!!e.borderRadius.bottomLeft||!!e.borderRadius.topRight||!!e.borderRadius.bottomRight),oo(!!e.mobileBorderRadius.all||!!e.mobileBorderRadius.topLeft||!!e.mobileBorderRadius.bottomLeft||!!e.mobileBorderRadius.topRight||!!e.mobileBorderRadius.bottomRight),io(!!e.boxShadow),so(!!e.mobileBoxShadow.blurRadius||!!e.mobileBoxShadow.color||!!e.mobileBoxShadow.hOffset||!!e.mobileBoxShadow.inset||!!e.mobileBoxShadow.spreadRadius||!!e.mobileBoxShadow.vOffset),ao(!!e.mobileWidth.value||!!e.mobileHeight.value),me(e.link),he(e.alt),ge(e.title),Mo(null===(F=e.imgReplacer)||void 0===F?void 0:F.length)}}),[l,e]);const To=async(e,o,t)=>{const i={};i.user_id=Ce.id,i.folder=e,o&&("image/gif"!==o.type&&(o=await(0,F.A)(o,{maxSizeMB:Fe.compressMaxSize||.45,maxWidthOrHeight:Fe.compressMaxWidthOrHeight||2e3})),i.file=o),t&&(i.page_url=t);const l=await Ie(i);var s,r,a;if(l.error)Oe.fromError("IMAGE_UPLOAD_ERROR",o,l.error,!0);else if(400!==(null===(s=l.data.data)||void 0===s?void 0:s.status))return null===(r=l.data)||void 0===r||null===(a=r[0])||void 0===a?void 0:a.file_url},Eo=((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 s=o.countdownLabelsFont;o.countdownLabelsStrong&&o.countdownLabelsItalic?s+="-bi":o.countdownLabelsStrong?s+="-b":o.countdownLabelsItalic&&(s+="-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",s),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),no({link:JSON.stringify({target:t.href})}),uo(!0)}),500),Io=(o,...i)=>{const r=l.getFieldsValue(!0),a=Object.keys(o)[0];let m;switch(a){case"link":let e=o[a];"https://http"===e.substring(0,12)&&(e=e.substring(8,e.length),r.link=e),m={link:e};break;case"boxShadowInset":case"boxShadowHOffset":case"boxShadowVOffset":case"boxShadowBlurRadius":case"boxShadowSpreadRadius":case"boxShadowColor":m={boxShadow:{hOffset:r.boxShadowHOffset,vOffset:r.boxShadowVOffset,blurRadius:r.boxShadowBlurRadius,spreadRadius:r.boxShadowSpreadRadius,color:r.boxShadowColor,inset:r.boxShadowInset}};break;case"borderStyle":m={border:{[r.borderPosition]:{...s[r.borderPosition],style:o[a]}}},"all"===r.borderPosition?d((e=>({...Z.iV,[r.borderPosition]:{...e[r.borderPosition],style:o[a]}}))):d((e=>({...e,[r.borderPosition]:{...e[r.borderPosition],style:o[a]}})));break;case"borderColor":m={border:{[r.borderPosition]:{...s[r.borderPosition],color:o[a]}}},"all"===r.borderPosition?d((e=>({...Z.iV,[r.borderPosition]:{...e[r.borderPosition],color:o[a]}}))):d((e=>({...e,[r.borderPosition]:{...e[r.borderPosition],color:o[a]}})));break;case"borderWidth":m={border:{[r.borderPosition]:{...s[r.borderPosition],width:o[a]}}},"all"===r.borderPosition?d((e=>({...Z.iV,[r.borderPosition]:{...e[r.borderPosition],width:o[a]}}))):d((e=>({...e,[r.borderPosition]:{...e[r.borderPosition],width:o[a]}})));break;case"borderPosition":l.setFieldsValue({borderWidth:s[o[a]].width||"",borderColor:s[o[a]].color||"",borderStyle:s[o[a]].style||""});break;case"width":m={[a]:{value:o[a],dim:r.widthDim}};break;case"widthDim":m={width:{value:r.width,dim:o[a]}};break;case"height":m={[a]:{value:o[a],dim:r.heightDim}};break;case"heightDim":m={height:{value:r.height,dim:o[a]}};break;case"borderRadiusAll":case"borderRadiusTopLeft":case"borderRadiusBottomLeft":case"borderRadiusTopRight":case"borderRadiusBottomRight":m={borderRadius:{[Z.wF[a]]:+o[a]}};break;case"mobileWidth":m={[a]:{classNamePrefix:"em-mob-width-",value:o[a],dim:r.mobileWidthDim}};break;case"mobileWidthDim":m={mobileWidth:{classNamePrefix:"em-mob-width-",value:r.mobileWidth,dim:o[a]}};break;case"mobileHeight":m={[a]:{classNamePrefix:"em-mob-height-",value:o[a],dim:r.mobileHeightDim}};break;case"mobileHeightDim":m={mobileHeight:{classNamePrefix:"em-mob-height-",value:r.mobileHeight,dim:o[a]}};break;case"mobileBorderStyle":m={mobileBorder:{[r.mobileBorderPosition]:{...n[r.mobileBorderPosition],style:o[a],classNamePrefix:"em-mob-border_"+r.mobileBorderPosition+"-"}}},"all"===r.mobileBorderPosition?c((e=>({...Z.iV,[r.mobileBorderPosition]:{...e[r.mobileBorderPosition],style:o[a],classNamePrefix:"em-mob-border_"+r.mobileBorderPosition+"-"}}))):c((e=>({...e,[r.mobileBorderPosition]:{...e[r.mobileBorderPosition],style:o[a],classNamePrefix:"em-mob-border_"+r.mobileBorderPosition+"-"}})));break;case"mobileBorderColor":m={mobileBorder:{[r.mobileBorderPosition]:{...n[r.mobileBorderPosition],color:o[a],classNamePrefix:"em-mob-border_"+r.mobileBorderPosition+"-"}}},"all"===r.mobileBorderPosition?c((e=>({...Z.iV,[r.mobileBorderPosition]:{...e[r.mobileBorderPosition],color:o[a],classNamePrefix:"em-mob-border_"+r.mobileBorderPosition+"-"}}))):c((e=>({...e,[r.mobileBorderPosition]:{...e[r.mobileBorderPosition],color:o[a],classNamePrefix:"em-mob-border_"+r.mobileBorderPosition+"-"}})));break;case"mobileBorderWidth":m={mobileBorder:{[r.mobileBorderPosition]:{...n[r.mobileBorderPosition],width:o[a],classNamePrefix:"em-mob-border_"+r.mobileBorderPosition+"-"}}},"all"===r.mobileBorderPosition?c((e=>({...Z.iV,[r.mobileBorderPosition]:{...e[r.mobileBorderPosition],width:o[a],classNamePrefix:"em-mob-border_"+r.mobileBorderPosition+"-"}}))):c((e=>({...e,[r.mobileBorderPosition]:{...e[r.mobileBorderPosition],width:o[a],classNamePrefix:"em-mob-border_"+r.mobileBorderPosition+"-"}})));break;case"mobileBorderPosition":l.setFieldsValue({mobileBorderWidth:n[o[a]].width||"",mobileBorderColor:n[o[a]].color||"",mobileBorderStyle:n[o[a]].style||""});break;case"mobileBorderRadiusAll":case"mobileRadiusTopLeft":case"mobileRadiusBottomLeft":case"mobileRadiusTopRight":case"mobileRadiusBottomRight":m={mobileBorderRadius:{[Ne[a]]:o[a],classNamePrefix:"em-mob-border_radius_"+Ne[a]+"-"}};break;case"mobileBoxShadowInset":case"mobileBoxShadowHOffset":case"mobileBoxShadowVOffset":case"mobileBoxShadowBlurRadius":case"mobileBoxShadowSpreadRadius":case"mobileBoxShadowColor":m={mobileBoxShadow:{hOffset:r.mobileBoxShadowHOffset,vOffset:r.mobileBoxShadowVOffset,blurRadius:r.mobileBoxShadowBlurRadius,spreadRadius:r.mobileBoxShadowSpreadRadius,color:r.mobileBoxShadowColor,inset:r.mobileBoxShadowInset,classNamePrefix:"em-mob-box_shadow-"}};break;case"mobileAlign":m={[a]:{classNamePrefix:"em-mob-text_align-",value:o[a]}};break;case"mobileVerticalAlign":m={[a]:{classNamePrefix:"em-mob-vertical_align-",value:o[a]}};break;case"countdownTime":case"countdownTimeZone":case"countdownBackgroundColor":case"countdownNumbersFont":case"countdownNumbersFontSize":case"countdownNumbersColor":case"countdownLabelsFont":case"countdownLabelsFontSize":case"countdownLabelsColor":case"countdownLanguage":case"countdownTransparency":case"countdownNumbersStrong":case"countdownNumbersItalic":case"countdownLabelsStrong":case"countdownLabelsItalic":Eo();break;case"videoSource":case"videoPlayButton":(async()=>{const e=l.getFieldsValue(!0);e.videoSource&&To("tmp",null,e.videoSource).then((o=>{var t=document.createElement("canvas"),i=t.getContext("2d"),l=new Image,s=new Image;let r=o,a="https://emcdn.ru/app/"+e.videoPlayButton+".png";l.crossOrigin="Anonymous",s.crossOrigin="Anonymous";let d=!1,n=!1;l.onload=function(){i.clearRect(0,0,t.width,t.height),i.drawImage(l,0,0,t.width,t.height),d=!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),n=!0},s.src=a;let m=setInterval((function(){if(d&&n){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,F.A)(new File([e],"image.jpeg",{type:"image/jpeg"}),{maxSizeMB:Fe.compressMaxSize||.45,maxWidthOrHeight:Fe.compressMaxWidthOrHeight||2e3});To(Le,o).then((e=>{Ee((0,fe.tm)(e))}))}),"image/jpg",1),clearInterval(m)}}),300)}))})(),r.link=r.videoSource,t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:"video",settings:{video:{source:r.videoSource,playButton:r.videoPlayButton},link:r.link}});break;default:m=o}"borderPosition"!==a&&"mobileBorderPosition"!==a&&-1===a.indexOf("countdown")&&"videoSource"!==a&&"videoPlayButton"!==a&&t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:m})};(0,i.useEffect)((()=>{mo.isError&&((0,je.p6)(mo,Oe),uo(!1))}),[mo,Oe]),(0,i.useEffect)((()=>{if(mo.isSuccess&&co){var o;if(400===(null===(o=mo.data.data)||void 0===o?void 0:o.status))Oe.error({message:(0,ee.jsx)("div",{dangerouslySetInnerHTML:{__html:mo.data.code}}),description:(0,ee.jsx)("div",{dangerouslySetInnerHTML:{__html:mo.data.message}}),placement:"bottomRight"});else{let o=new URL(mo.data.target),i={countdown:{link:mo.data.link,params:o.search.substring(1)}};t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:i})}uo(!1)}}),[mo,co,e,Oe,t]);(0,_e.A)((o=>{const t=o.data.operation;t===Z.Ru.APPLICATION_OPEN_IMAGE_AI_POPUP?(Ee((0,fe.tm)(e.src)),Ee((0,Se.qf)(Z.lx.UPLOAD_IMAGE_MODAL_AI))):t===Z.Ru.APPLICATION_OPEN_IMAGE_UPLOAD_POPUP?(Ee((0,fe.tm)(e.src)),Ee((0,Se.qf)(Z.lx.UPLOAD_IMAGE_MODAL_UPLOAD))):t===Z.Ru.APPLICATION_OPEN_IMAGE_EDIT_POPUP?(Ee((0,fe.tm)(e.src)),Ee((0,Se.qf)(Z.lx.UPLOAD_IMAGE_MODAL_EDIT))):t===Z.Ru.APPLICATION_OPEN_IMAGE_GIF_POPUP?(Ee((0,fe.tm)(e.src)),Ee((0,Se.qf)(Z.lx.UPLOAD_IMAGE_MODAL_GIF))):t===Z.Ru.APPLICATION_OPEN_IMAGE_STOCK_POPUP?(Ee((0,fe.tm)(e.src)),Ee((0,Se.qf)(Z.lx.UPLOAD_IMAGE_MODAL_STOCK))):t===Z.Ru.APPLICATION_CLOSE_IMAGE_EDIT_POPUP&&(Ee((0,Se.Os)()),Ee((0,Se.Oo)()))}));const Co=()=>{ne?(me(""),l.setFieldValue("link",""),t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{link:""}})):(me(Ve.current&&Ve.current.input.value?Ve.current.input.value:"..."),setTimeout((()=>{Ve.current.focus()})))},Lo=e=>{""===e.target.value?me("..."):(Me.current.classList.add("selected-td-form__button--active"),me(e.target.value));const o=e.target.value;"https://"===o.substring(0,8)?po("https://"):"mailto:"===o.substring(0,7)?po("mailto:"):"tel:"===o.substring(0,4)?po("tel:"):"sms:"===o.substring(0,4)?po("sms:"):"ftp://"===o.substring(0,6)?po("ftp://"):"skype:"===o.substring(0,6)?po("skype:"):"viber:"===o.substring(0,6)?po("viber:"):po("")},Oo=()=>{const o=l.getFieldsValue(!0);ue?(he(""),o.alt="",t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{alt:""}})):(he(We.current&&We.current.input.value?We.current.input.value:"..."),setTimeout((()=>{We.current.focus()})))},Fo=e=>{""===e.target.value?he("..."):(He.current.classList.add("selected-td-form__button--active"),he(e.target.value))},Do=()=>{const o=l.getFieldsValue(!0);be?(ge(""),o.title="",t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{title:""}})):(ge(Xe.current&&Xe.current.input.value?Xe.current.input.value:"..."),setTimeout((()=>{Xe.current.focus()})))},[Vo,Mo]=(0,i.useState)(!1),Wo=e=>{""===e.target.value?ge("..."):(ze.current.classList.add("selected-td-form__button--active"),ge(e.target.value))},Ho=(0,ee.jsx)(h.A,{style:{width:90,textAlign:"left"},value:xo,onChange:e=>{l.getFieldsValue(!0).link=e,po(e)},getPopupContainer:e=>e.parentNode,options:[{value:"https://",label:o("Site")},{value:"mailto:",label:o("E-mail")},{value:"tel:",label:o("Phone")},{value:"sms:",label:o("SMS")},{value:"ftp://",label:o("File")},{value:"skype:",label:o("Skype")},{value:"viber:",label:o("Viber")},{value:"",label:o("Other")}]});return(0,ee.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:Io,autoComplete:"off",className:"element-controls",children:[!go&&(0,ee.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,ee.jsx)(g.A,{className:"selected_form-mobile-props-title",message:o("Appearance on mobile devices"),type:"info"})}),xe===Z.ND&&Te.styles?(0,ee.jsx)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",children:(0,ee.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[(0,ee.jsxs)(x.A,{gutter:30,style:{paddingBottom:4},children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(K.A,{form:l,elementSettings:e,imgParent:!0})}),(0,ee.jsx)(p.A,{span:12,align:"right",children:(0,ee.jsx)(oe,{form:l,elementSettings:e})})]}),!!e.showOnMobile&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider",style:{marginBottom:"countdown"===e.type?15:24}}),"countdown"===e.type&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(ce,{form:l,elementSettings:e}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider",style:{marginBottom:24}})]}),"video"===e.type&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(pe,{form:l,elementSettings:e}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider",style:{marginBottom:24}})]}),("img"===e.type||"video"===e.type)&&(0,ee.jsx)(u.A.Item,{style:{marginBottom:0},children:(0,ee.jsx)(D.A,{form:l,label:o("Image path"),name:"src",placeholder:o("Image path"),elementSettings:e,tooltipTitle:""})}),(0,ee.jsxs)(v.A,{size:8,style:{marginBottom:ue||ne||be?De.formItemMarginBottomXS:De.formItemMarginBottomMD+4},children:[(0,ee.jsx)(b.A,{title:ne||o("Hyperlink URL"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,ee.jsx)(f.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":!!ne}),icon:(0,ee.jsx)(B.A,{className:"selected-td-form__icon-radius"}),onClick:Co,ref:Me})}),(0,ee.jsx)(b.A,{title:ue||o("Alternative text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,ee.jsx)(f.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":!!ue}),onClick:Oo,ref:He,children:(0,ee.jsx)("span",{className:"addon-text-content",children:"Alt"})})}),Fe.formFieldImageTitleEnabled&&(0,ee.jsx)(b.A,{title:be||o("Tooltip text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,ee.jsx)(f.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":!!be}),onClick:Do,ref:ze,children:(0,ee.jsx)("span",{className:"addon-text-content",children:"Title"})})})]}),(!!ne||!!ue||!!be)&&(0,ee.jsxs)("div",{style:{marginBottom:De.formItemMarginBottomMD+4},children:[!!ne&&(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Hyperlink URL"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"link",className:"selected-image-form__alt",style:{marginBottom:De.formItemMarginBottomXS},children:(0,ee.jsx)(_.A,{ref:Ve,allowClear:!0,placeholder:o("Hyperlink URL"),prefix:(0,ee.jsx)(B.A,{}),onChange:Lo})})}),!!ue&&(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Alternative text"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"alt",className:"selected-image-form__alt",style:{marginBottom:De.formItemMarginBottomXS},children:(0,ee.jsx)(_.A,{placeholder:o("Alternative text"),allowClear:!0,prefix:(0,ee.jsx)("span",{className:"addon-text-content",children:"Alt"}),onChange:Fo,ref:We})})}),Fe.formFieldImageTitleEnabled&&!!be&&(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Tooltip text"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"title",className:"selected-image-form__alt",style:{marginBottom:De.formItemMarginBottomXS},children:(0,ee.jsx)(_.A,{placeholder:o("Tooltip text"),allowClear:!0,prefix:(0,ee.jsx)("span",{className:"addon-text-content",children:"Title"}),onChange:Wo,ref:Xe})})})]})]}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Size")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{ao((e=>!e)),ro&&(o.mobileWidth="",o.mobileHeight="",t({operation:Z.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:ro?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),ro&&(0,ee.jsxs)(x.A,{gutter:10,style:{paddingBottom:24},children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(z.A,{form:l,name:"mobileWidth",elementSettings:e,isPicture:"true"})}),(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(G.A,{form:l,name:"mobileHeight",elementSettings:e,isPicture:"true"})})]}),Fe.formFieldBorderEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Borders")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{Qe((e=>!e)),Je&&(o.mobileBorderWidth=null,o.mobileBorderColor="",o.mobileBorderStyle=""),c((e=>({...Z.iV,[o.mobileBorderPosition]:{...e[o.mobileBorderPosition],width:o.mobileBorderWidth,color:o.mobileBorderColor,style:o.mobileBorderStyle}}))),t({operation:Z.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:Je?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),Je&&(0,ee.jsx)("div",{style:{marginBottom:4},children:(0,ee.jsx)(U.A,{mobileBorders:n})})]}),Fe.formFieldBorderRadiusEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Border radius")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{oo((e=>!e)),o.mobileBorderRadiusAll=eo?null:5,t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorderRadius:{all:o.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})}))},children:eo?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),eo&&(0,ee.jsx)("div",{style:{marginBottom:4},children:(0,ee.jsx)(Y.A,{form:l,oneMobileBorderRadiusValue:ae,setOneMobileBorderRadiusValue:de})})]}),Fe.formFieldBoxShadowEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Box shadow")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{so((e=>!e)),lo?(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:Z.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:lo?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),lo&&(0,ee.jsx)("div",{style:{marginBottom:4},children:(0,ee.jsx)(q.A,{mobileBoxShadow:ie,form:l,elementSettings:e})})]}),Fe.formFieldVisibilityEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Display control")}),(0,ee.jsx)(x.A,{gutter:20,style:{marginBottom:4},children:(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(te.A,{elementSettings:e,form:l})})})]}),Fe.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,ee.jsx)(x.A,{gutter:20,style:{marginBottom:4},children:(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(Re.A,{})})})]})]})}):(0,ee.jsx)("div",{id:"selected_element_form_desktop_props",children:(0,ee.jsxs)("div",{className:"selected_form-props-wrapper",children:[(0,ee.jsxs)(x.A,{gutter:10,style:{marginBottom:4},children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(W.A,{form:l,elementSettings:e,imgParent:!0})}),(0,ee.jsx)(p.A,{span:12,align:"right",children:(0,ee.jsx)(H.A,{form:l,elementSettings:e})})]}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider",style:{marginBottom:"countdown"===e.type?15:24}}),"countdown"===e.type&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(ce,{form:l,elementSettings:e,handleChangeValues:Io}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider",style:{marginBottom:24}})]}),Ao&&(0,ee.jsx)(p.A,{span:24,id:"merge_tags_wrapper",children:(0,ee.jsxs)(u.A.Item,{style:{marginBottom:24},children:[(0,ee.jsx)(f.Ay,{id:"merge_tags_button",icon:(0,ee.jsx)(Q.A,{icon:"MergeTags"}),style:{width:"100%",display:jo?"none":"block"},onClick:()=>vo(!0),children:o("Merge tags")}),(0,ee.jsx)(j.A,{ref:Po,popupClassName:"merge-tags",options:Ao,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,ee.jsxs)("span",{children:[0!==t&&(0,ee.jsx)("span",{children:"\xa0/\xa0"}),i.map(((o,t)=>o.toLowerCase()===e.toLowerCase()?(0,ee.jsx)("span",{style:{color:"red"},children:o},t):o))]},o.value)}));return(0,ee.jsx)("div",{title:o.map((e=>e.label)).join(" / "),children:t})}},spellCheck:"false",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),onChange:(o,i)=>{if(vo(!1),o){const s=No.syntax.length>1?Ao.findIndex((e=>e.key===i[0].key)):0,r=No.syntax[s].replace("%value%",o[o.length-1]);"selected_image_form_title"===(null===_o||void 0===_o?void 0:_o.getAttribute("id"))||"selected_image_form_alt"===(null===_o||void 0===_o?void 0:_o.getAttribute("id"))||"selected_image_form_link"===(null===_o||void 0===_o?void 0:_o.getAttribute("id"))||"selected_image_form_imgReplacer"===(null===_o||void 0===_o?void 0:_o.getAttribute("id"))?((o,i)=>{const s=document.getElementById(i);if(s){var r,a;const d="selected_image_form_",n=i.substring(i.indexOf(d)+d.length),m=null===(r=s.value)||void 0===r?void 0:r.substring(0,So.start),c=null===(a=s.value)||void 0===a?void 0:a.substring(So.end);t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{...e,[n]:m+o+c}}),l.setFieldValue(n,m+o+c),s.focus(),setTimeout((()=>{s.selectionStart=So.start,s.selectionEnd=So.start+o.length}),400),Ro(!0)}})(r,null===_o||void 0===_o?void 0:_o.getAttribute("id")):(l.setFieldValue("imgReplacer",r),t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{imgReplacer:r}}))}},style:{display:jo?"block":"none"},open:jo,onKeyDown:e=>{"Escape"===e.key&&vo(!1)}})]})}),"video"===e.type&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(pe,{form:l,elementSettings:e}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider",style:{marginBottom:24}})]}),("img"===e.type||"video"===e.type)&&(0,ee.jsx)(u.A.Item,{style:{marginBottom:0},children:(0,ee.jsx)(D.A,{form:l,label:o("Image path"),name:"src",placeholder:o("Image path"),elementSettings:e,tooltipTitle:""})}),(0,ee.jsxs)(v.A,{size:8,style:{marginBottom:ue||ne||be||Vo?De.formItemMarginBottomXS:De.formItemMarginBottomMD+4},children:[(0,ee.jsx)(b.A,{title:ue||o("Alternative text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,ee.jsx)(f.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":!!ue}),onClick:Oo,ref:He,children:(0,ee.jsx)("span",{className:"addon-text-content",children:"Alt"})})}),Fe.formFieldImageTitleEnabled&&(0,ee.jsx)(b.A,{title:be||o("Tooltip text"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,ee.jsx)(f.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":!!be}),onClick:Do,ref:ze,children:(0,ee.jsx)("span",{className:"addon-text-content",children:"Title"})})}),(0,ee.jsx)(b.A,{title:ne||o("Hyperlink URL"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,ee.jsx)(f.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":!!ne}),icon:(0,ee.jsx)(B.A,{className:"selected-td-form__icon-radius"}),onClick:Co,ref:Me})}),(0,ee.jsx)(b.A,{title:o("Image replacer"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,ee.jsx)(f.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":Vo}),icon:(0,ee.jsx)(Q.A,{icon:"Replacer",className:"selected-td-form__icon-radius"}),onClick:()=>{Mo(!Vo),Vo?(l.setFieldValue("imgReplacer",""),t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{imgReplacer:""}})):setTimeout((()=>Ge.current.focus()))},ref:Ue})})]}),(!!ne||!!ue||!!be||!!Vo)&&(0,ee.jsxs)("div",{style:{marginBottom:De.formItemMarginBottomMD+4},children:[!!ne&&(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Hyperlink URL"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"link",className:"selected-image-form__alt",style:{marginBottom:De.formItemMarginBottomXS},children:(0,ee.jsx)(_.A,{addonBefore:Ho,placeholder:o("Hyperlink URL"),allowClear:!0,ref:Ve,onChange:Lo,onSelect:ko,prefix:"https://"===xo&&(0,ee.jsx)(B.A,{})||"mailto:"===xo&&(0,ee.jsx)(S.A,{})||"tel:"===xo&&(0,ee.jsx)(y.A,{})||"sms:"===xo&&(0,ee.jsx)(w.A,{})||"ftp://"===xo&&(0,ee.jsx)(R.A,{})||"skype:"===xo&&(0,ee.jsx)(P.A,{})||(0,ee.jsx)(B.A,{})})})}),!!ue&&(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Alternative text"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"alt",className:"selected-image-form__alt",style:{marginBottom:De.formItemMarginBottomXS},children:(0,ee.jsx)(_.A,{placeholder:o("Alternative text"),allowClear:!0,prefix:(0,ee.jsx)("span",{className:"addon-text-content",children:"Alt"}),onChange:Fo,ref:We,onSelect:ko})})}),Fe.formFieldImageTitleEnabled&&!!be&&(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Tooltip text"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"title",className:"selected-image-form__alt",style:{marginBottom:De.formItemMarginBottomXS},children:(0,ee.jsx)(_.A,{placeholder:o("Enter the title of the image"),allowClear:!0,prefix:(0,ee.jsx)("span",{className:"addon-text-content",children:"Title"}),onChange:Wo,ref:Xe,onSelect:ko})})}),!!Vo&&(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Image src"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"imgReplacer",className:"selected-image-form__alt",style:{marginBottom:De.formItemMarginBottomXS},children:(0,ee.jsx)(_.A,{placeholder:o("\u0421ode that will replace the image `src`"),allowClear:!0,prefix:(0,ee.jsx)("span",{className:"addon-text-content",children:o("Image src")}),onChange:e=>{""!==e.target.value&&Ue.current.classList.add("selected-td-form__button--active")},ref:Ge,onSelect:ko})})})]}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Size")}),(0,ee.jsxs)(x.A,{gutter:De.marginSM,style:{marginBottom:4},children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(b.A,{title:o("Width"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"width",style:{marginBottom:De.formItemMarginBottomXS},children:(0,ee.jsx)(Ae.A,{min:0,max:e.maxWidth,placeholder:o("Width"),prefix:(0,ee.jsx)(N.A,{}),addonAfter:"px"})})})}),(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(b.A,{title:o("Height"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"height",children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Height"),prefix:(0,ee.jsx)(k.A,{}),addonAfter:"px"})})})})]}),Fe.formFieldBorderEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Borders")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{Ke((e=>!e)),qe&&(o.borderWidth=null,o.borderColor="",o.borderStyle=""),d((e=>({...Z.iV,[o.borderPosition]:{...e[o.borderPosition],width:o.borderWidth,color:o.borderColor,style:o.borderStyle}}))),t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{border:{all:{color:o.borderColor,style:o.borderStyle,width:o.borderWidth}}}})}))},children:qe?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),qe&&(0,ee.jsx)("div",{style:{marginBottom:4},children:(0,ee.jsx)(V.A,{borders:s})})]}),Fe.formFieldBorderRadiusEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Border radius")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{$e((e=>!e)),o.borderRadiusAll=Ze?0:5,t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{borderRadius:{all:o.borderRadiusAll}}})}))},children:Ze?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),Ze&&(0,ee.jsx)("div",{style:{marginBottom:4},children:(0,ee.jsx)(M.A,{form:l,oneBorderRadiusValue:se,setOneBorderRadiusValue:re,elementSettings:e})})]}),Fe.formFieldBoxShadowEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Box shadow")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{io((e=>!e)),to?(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:Z.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:to?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),to&&(0,ee.jsx)("div",{style:{marginBottom:4},children:(0,ee.jsx)(X.A,{boxShadow:C})})]}),Fe.formFieldVisibilityEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Display control")}),(0,ee.jsx)(x.A,{gutter:20,style:{marginBottom:4},children:(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(te.A,{elementSettings:e,form:l})})})]}),Fe.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,ee.jsx)(x.A,{gutter:20,style:{marginBottom:4},children:(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(Re.A,{})})})]})]})})]})};var Ee=t(28348),Ie=t(65655),Ce=t(46929),Le=t(77416),Oe=t(40187);const Fe=({elementSettings:e})=>{const{__:o}=(0,I.s9)(),t=(0,$.XW)(),[l]=u.A.useForm(),s=(0,a.d4)(we.Ct),r=(0,a.d4)(we.CS),d=(0,a.d4)(we.Fv),n=(0,a.d4)(we.yy),m=d&&"bottom"!==n,[c,h]=(0,i.useState)("https://");(0,i.useEffect)((()=>{if(e){var o,t,i,s,r;const a=e=>e||(0===e?"0":"");l.setFieldsValue({...e,linkHref:e.linkHref?e.linkHref:"https://",mobileFontSize:a(null===(o=e.mobileFontSize)||void 0===o?void 0:o.value),mobileFontSizeDim:null===(t=e.mobileFontSize)||void 0===t?void 0:t.dim,mobileLineHeight:a(null===(i=e.mobileLineHeight)||void 0===i?void 0:i.value),mobileLineHeightDim:null===(s=e.mobileLineHeight)||void 0===s?void 0:s.dim,mobileTextAlign:a(null===(r=e.mobileTextAlign)||void 0===r?void 0:r.value)})}}),[l,e]);return(0,ee.jsxs)(u.A,{form:l,layout:"vertical",name:"selected_text_form",autoComplete:"off",onValuesChange:o=>{const i=l.getFieldsValue(!0),s=Object.keys(o)[0];let r;switch(s){case"mobileFontSize":r={[s]:{classNamePrefix:"em-mob-font_size-",value:o[s],dim:i.mobileFontSizeDim}};break;case"mobileLineHeight":r={[s]:{classNamePrefix:"em-mob-line_height-",value:o[s],dim:i.mobileLineHeightDim}};break;case"mobileTextAlign":r={[s]:{classNamePrefix:"em-mob-text_align-",value:o[s]}};break;case"linkHref":let e=o[s];"https://http"===e.substring(0,12)&&(e=e.substring(8,e.length),i.linkHref=e),r={[s]:e},"https://"===o[s].substring(0,8)||"http://"===o[s].substring(0,7)?h("https://"):"mailto:"===o[s].substring(0,7)?h("mailto:"):"tel:"===o[s].substring(0,4)?h("tel:"):"sms:"===o[s].substring(0,4)?h("sms:"):"ftp://"===o[s].substring(0,6)?h("ftp://"):"skype:"===o[s].substring(0,6)?h("skype:"):"viber:"===o[s].substring(0,6)?h("viber:"):h("");break;default:r=o}t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:r})},className:"element-controls",initialValues:{textAlign:"left",textStrong:!1,textItalic:!1,textStrikethrough:!1,textUnderline:!1,textColor:"",textBackgroundColor:"",textLink:!1,textReplacer:""},children:[!m&&(0,ee.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,ee.jsx)(g.A,{className:"selected_form-mobile-props-title",message:o("Appearance on mobile devices"),type:"info"})}),!(s===Z.ND&&!m&&r.styles)&&(0,ee.jsx)("div",{id:"selected_element_form_desktop_props",style:{paddingRight:0},children:(0,ee.jsx)("div",{className:"selected_form-props-wrapper",children:m?(0,ee.jsx)(Le.A,{form:l,elementSettings:e}):(0,ee.jsx)(Ce.A,{form:l,elementSettings:e,linkProtocol:c,setLinkProtocol:h})})}),!m&&(0,ee.jsx)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",style:{display:s===Z.ND&&r.styles?"block":"none"},children:(0,ee.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[(0,ee.jsx)(x.A,{gutter:20,children:(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(Oe.A,{form:l,elementSettings:e,name:"mobileTextAlign"})})}),!!e.showOnMobile&&(0,ee.jsx)(Ce.A,{form:l,elementSettings:e,linkProtocol:c,setLinkProtocol:h}),(0,ee.jsxs)(x.A,{gutter:10,style:{marginBottom:4},children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(Ie.A,{})}),(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(u.A.Item,{name:"mobileLineHeight",children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Line height"),prefix:(0,ee.jsx)(Ee.A,{}),addonAfter:"px"})})})]})]})})]})};var De=t(45509);t(9439);const Ve=(e,o)=>{const{__:t}=(0,I.s9)();return(0,ee.jsx)(b.A,{title:t("During export, the element is converted into an image."),children:(0,ee.jsxs)(v.A,{size:10,align:"baseline",children:[(0,ee.jsx)(u.A.Item,{name:"exportAsPicture",valuePropName:"checked",children:(0,ee.jsx)(le.A,{size:"small",id:"convern-in-image"})}),(0,ee.jsx)("span",{className:"ant-form-item-switch-label",style:{position:"relative",top:2},children:(0,ee.jsx)("label",{htmlFor:"convern-in-image",children:t("Convert into an image")})})]})},"exportAsPicture")},{Option:Me}=h.A,We=(0,ee.jsxs)(h.A,{className:"select-after",getPopupContainer:e=>e.parentNode,children:[(0,ee.jsx)(Me,{value:"px",children:"px"}),(0,ee.jsx)(Me,{value:"%",children:"%"})]}),He={mobileBorderRadiusAll:"all",mobileRadiusTopLeft:"topLeft",mobileRadiusBottomLeft:"bottomLeft",mobileRadiusTopRight:"topRight",mobileRadiusBottomRight:"bottomRight"},{useToken:Xe}=c.A,ze=({elementSettings:e})=>{const{__:o}=(0,I.s9)(),t=(0,$.XW)(),[l]=u.A.useForm(),[s,r]=(0,i.useState)({}),[d,n]=(0,i.useState)({}),[m,c]=(0,i.useState)(!0),[j,v]=(0,i.useState)({}),[_,B]=(0,i.useState)({}),[S,y]=(0,i.useState)(!0),w=(0,a.d4)(we.Ct),R=(0,a.d4)(we.CS),P=(0,ve.rD)(),[k,C]=(0,i.useState)(""===e.backgroundImage[0].value),{token:L}=Xe(),O=(0,a.d4)(we.Fv),F=(0,a.d4)(we.yy),H=O&&"bottom"!==F,[G,J]=(0,i.useState)(!1),[oe,ie]=(0,i.useState)(!1),[le,se]=(0,i.useState)(!1),[re,ae]=(0,i.useState)(!1),[de,me]=(0,i.useState)(!1),[ce,ue]=(0,i.useState)(!1),[he,be]=(0,i.useState)(!1),[ge,xe]=(0,i.useState)(!1),[pe,fe]=(0,i.useState)(!1),[je,_e]=(0,i.useState)(!1),[Be,Se]=(0,i.useState)(!1),ye=[{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"}];(0,i.useEffect)((()=>{if(e){var o,t,i,s,a,d,m,u,h,b,g,x,p,A,f,j,_,S,w,R,P,N,k,T,E,I,L,O,F,D,V,M,W,H,X,z,G,U,Y;const q=e.border,K=e.boxShadow,Q=e.mobileBorder,Z=e.mobileBoxShadow;r(q),n(K),v(Q),B(Z);const $=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)})),ee=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=e=>e||(0===e?"0":""),te=e=>e&&"auto"!==e?e:0===e?"0":"";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===(s=e.maxWidth)||void 0===s?void 0:s.dim,minWidth:null===(a=e.minWidth)||void 0===a?void 0:a.value,minWidthDim:null===(d=e.minWidth)||void 0===d?void 0:d.dim,backgroundImage:e.backgroundImage[0].value,show:e.show?e.show:"all",borderPosition:$||"all",borderWidth:(null===(m=q[$])||void 0===m?void 0:m.width)||"",borderColor:(null===(u=q[$])||void 0===u?void 0:u.color)||"",borderStyle:(null===(h=q[$])||void 0===h?void 0:h.style)||"",borderRadiusAll:oe(e.borderRadius.all),borderRadiusTopLeft:oe(e.borderRadius.topLeft),borderRadiusBottomLeft:oe(e.borderRadius.bottomLeft),borderRadiusTopRight:oe(e.borderRadius.topRight),borderRadiusBottomRight:oe(e.borderRadius.bottomRight),boxShadowInset:oe(null===(b=e.boxShadow)||void 0===b?void 0:b.inset)||!1,boxShadowHOffset:oe(null===(g=e.boxShadow)||void 0===g?void 0:g.hOffset),boxShadowVOffset:oe(null===(x=e.boxShadow)||void 0===x?void 0:x.vOffset),boxShadowBlurRadius:oe(null===(p=e.boxShadow)||void 0===p?void 0:p.blurRadius),boxShadowSpreadRadius:oe(null===(A=e.boxShadow)||void 0===A?void 0:A.spreadRadius),boxShadowColor:oe(null===(f=e.boxShadow)||void 0===f?void 0:f.color),mobileWidth:te(null===(j=e.mobileWidth)||void 0===j?void 0:j.value),mobileWidthDim:null===(_=e.mobileWidth)||void 0===_?void 0:_.dim,mobileAlign:null===(S=e.mobileAlign)||void 0===S?void 0:S.value,mobileBorderPosition:ee||"all",mobileBorderWidth:null!==(null===(w=Q[ee])||void 0===w?void 0:w.width)?null===(R=Q[ee])||void 0===R?void 0:R.width:"",mobileBorderColor:(null===(P=Q[ee])||void 0===P?void 0:P.color)||"",mobileBorderStyle:(null===(N=Q[ee])||void 0===N?void 0:N.style)||"",mobileBorderRadiusAll:oe(e.mobileBorderRadius.all),mobileRadiusTopLeft:oe(null!==e.mobileBorderRadius.topLeft?e.mobileBorderRadius.topLeft:e.mobileBorderRadius.all),mobileRadiusBottomLeft:oe(null!==e.mobileBorderRadius.bottomLeft?e.mobileBorderRadius.bottomLeft:e.mobileBorderRadius.all),mobileRadiusTopRight:oe(null!==e.mobileBorderRadius.topRight?e.mobileBorderRadius.topRight:e.mobileBorderRadius.all),mobileRadiusBottomRight:oe(null!==e.mobileBorderRadius.bottomRight?e.mobileBorderRadius.bottomRight:e.mobileBorderRadius.all),mobileBoxShadowInset:oe(null===(k=e.mobileBoxShadow)||void 0===k?void 0:k.inset)||!1,mobileBoxShadowHOffset:oe(null===(T=e.mobileBoxShadow)||void 0===T?void 0:T.hOffset),mobileBoxShadowVOffset:oe(null===(E=e.mobileBoxShadow)||void 0===E?void 0:E.vOffset),mobileBoxShadowBlurRadius:oe(null===(I=e.mobileBoxShadow)||void 0===I?void 0:I.blurRadius),mobileBoxShadowSpreadRadius:oe(null===(L=e.mobileBoxShadow)||void 0===L?void 0:L.spreadRadius),mobileBoxShadowColor:oe(null===(O=e.mobileBoxShadow)||void 0===O?void 0:O.color),mobileBackgroundColor:oe("none"!==(null===(F=e.mobileBackgroundColor)||void 0===F?void 0:F.value)?null===(D=e.mobileBackgroundColor)||void 0===D?void 0:D.value:""),mobileBackgroundImage:"none"!==e.mobileBackgroundImage[0].value?e.mobileBackgroundImage[0].value:"",mobileBackgroundPositionX:oe(null===(V=e.mobileBackgroundPositionX)||void 0===V?void 0:V.value),mobileBackgroundPositionY:oe(null===(M=e.mobileBackgroundPositionY)||void 0===M?void 0:M.value),mobileBackgroundRepeat:null!==(W=e.mobileBackgroundRepeat)&&void 0!==W&&W.value?null===(H=e.mobileBackgroundRepeat)||void 0===H?void 0:H.value:"none",exportAsPicture:null===e||void 0===e?void 0:e.exportAsPicture}),!oe(e.borderRadius.all)&&(oe(e.borderRadius.topLeft)||oe(e.borderRadius.bottomLeft)||oe(e.borderRadius.topRight)||oe(e.borderRadius.bottomRight))?c(!1):c(!0),oe(e.mobileBorderRadius.topLeft)||oe(e.mobileBorderRadius.bottomLeft)||oe(e.mobileBorderRadius.topRight)||oe(e.mobileBorderRadius.bottomRight)?y(!1):y(!0),C(""===e.backgroundImage[0].value),J(!(null===(X=q[$])||void 0===X||!X.width)),ie(!(null===(z=Q[ee])||void 0===z||!z.width)),se(!!e.borderRadius.all||!!e.borderRadius.topLeft||!!e.borderRadius.bottomLeft||!!e.borderRadius.topRight||!!e.borderRadius.bottomRight),ae(!!e.mobileBorderRadius.all||!!e.mobileBorderRadius.topLeft||!!e.mobileBorderRadius.bottomLeft||!!e.mobileBorderRadius.topRight||!!e.mobileBorderRadius.bottomRight),me(!!e.boxShadow),ue(!!e.mobileBoxShadow.blurRadius||!!e.mobileBoxShadow.color||!!e.mobileBoxShadow.hOffset||!!e.mobileBoxShadow.inset||!!e.mobileBoxShadow.spreadRadius||!!e.mobileBoxShadow.vOffset),be(!(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)),xe(!!e.mobileWidth.value),fe(!!e.backgroundColor||!!e.backgroundImage[0].value||!!e.backgroundPositionY||!!e.backgroundPositionX||"repeat"!==e.backgroundRepeat||!e.backgroundRepeat),_e(!!e.mobileBackgroundColor.value),Se(!!e.exportAsPicture)}}),[l,e]);return(0,ee.jsxs)(u.A,{form:l,layout:"vertical",name:"selected_table_form",initialValues:{backgroundColor:"",backgroundImage:"",backgroundPositionX:"",backgroundPositionY:"",backgroundRepeat:"",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),a=Object.keys(o)[0];let d;switch(a){case"exportAsPicture":d={exportAsPicture:i.exportAsPicture};break;case"boxShadowInset":case"boxShadowHOffset":case"boxShadowVOffset":case"boxShadowBlurRadius":case"boxShadowSpreadRadius":case"boxShadowColor":d={boxShadow:{hOffset:i.boxShadowHOffset,vOffset:i.boxShadowVOffset,blurRadius:i.boxShadowBlurRadius,spreadRadius:i.boxShadowSpreadRadius,color:i.boxShadowColor,inset:i.boxShadowInset}};break;case"borderStyle":d={border:{[i.borderPosition]:{...s[i.borderPosition],style:o[a]}}},"all"===i.borderPosition?r((e=>({...Z.iV,[i.borderPosition]:{...e[i.borderPosition],style:o[a]}}))):r((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],style:o[a]}})));break;case"borderColor":d={border:{[i.borderPosition]:{...s[i.borderPosition],color:o[a]}}},"all"===i.borderPosition?r((e=>({...Z.iV,[i.borderPosition]:{...e[i.borderPosition],color:o[a]}}))):r((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],color:o[a]}})));break;case"borderWidth":d={border:{[i.borderPosition]:{...s[i.borderPosition],width:o[a]}}},"all"===i.borderPosition?r((e=>({...Z.iV,[i.borderPosition]:{...e[i.borderPosition],width:o[a]}}))):r((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],width:o[a]}})));break;case"borderPosition":l.setFieldsValue({borderWidth:s[o[a]].width||"",borderColor:s[o[a]].color||"",borderStyle:s[o[a]].style||""});break;case"width":d={[a]:{value:o[a],dim:i.widthDim}};break;case"widthDim":d={width:{value:i.width,dim:o[a]}};break;case"maxWidth":d={[a]:{value:o[a],dim:i.maxWidthDim}};break;case"maxWidthDim":d={maxWidth:{value:i.maxWidth,dim:o[a]}};break;case"minWidth":d={[a]:{value:o[a],dim:i.minWidthDim}};break;case"minWidthDim":d={minWidth:{value:i.minWidth,dim:o[a]}};break;case"backgroundImage":C(""===o[a]),d={[a]:[{...e.backgroundImage[0],value:o[a]}]};break;case"borderRadiusAll":case"borderRadiusTopLeft":case"borderRadiusBottomLeft":case"borderRadiusTopRight":case"borderRadiusBottomRight":d={borderRadius:{[Z.wF[a]]:+o[a]}};break;case"mobileWidth":d={[a]:{classNamePrefix:"em-mob-width-",value:o[a],dim:i.mobileWidthDim}};break;case"mobileWidthDim":d={mobileWidth:{classNamePrefix:"em-mob-width-",value:i.mobileWidth,dim:o[a]}};break;case"mobileBorderStyle":d={mobileBorder:{[i.mobileBorderPosition]:{...j[i.mobileBorderPosition],style:o[a],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?v((e=>({...Z.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:o[a],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):v((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:o[a],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderColor":d={mobileBorder:{[i.mobileBorderPosition]:{...j[i.mobileBorderPosition],color:o[a],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?v((e=>({...Z.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:o[a],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):v((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:o[a],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderWidth":d={mobileBorder:{[i.mobileBorderPosition]:{...j[i.mobileBorderPosition],width:o[a],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?v((e=>({...Z.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:o[a],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):v((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:o[a],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderPosition":l.setFieldsValue({mobileBorderWidth:j[o[a]].width||"",mobileBorderColor:j[o[a]].color||"",mobileBorderStyle:j[o[a]].style||""});break;case"mobileBorderRadiusAll":case"mobileRadiusTopLeft":case"mobileRadiusBottomLeft":case"mobileRadiusTopRight":case"mobileRadiusBottomRight":d={mobileBorderRadius:{[He[a]]:o[a],classNamePrefix:"em-mob-border_radius_"+He[a]+"-"}};break;case"mobileBoxShadowInset":case"mobileBoxShadowHOffset":case"mobileBoxShadowVOffset":case"mobileBoxShadowBlurRadius":case"mobileBoxShadowSpreadRadius":case"mobileBoxShadowColor":d={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":d={[a]:{classNamePrefix:"em-mob-background_color-",value:o[a]}};break;case"mobileBackgroundImage":d={[a]:[{...e.mobileBackgroundImage[0],classNamePrefix:"em-mob-background_image-",value:o[a]}]};break;case"mobileBackgroundPositionX":d={[a]:{classNamePrefix:"em-mob-background_position_x-",value:o[a]}};break;case"mobileBackgroundPositionY":d={[a]:{classNamePrefix:"em-mob-background_position_x-",value:o[a]}};break;case"mobileBackgroundRepeat":d={[a]:{classNamePrefix:"em-mob-background_repeat-",value:o[a]}};break;case"mobileAlign":d={[a]:{classNamePrefix:"em-mob-table_align-",value:o[a]}};break;default:d=o}"borderPosition"!==a&&t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:d})},autoComplete:"off",className:"element-controls",children:[!H&&(0,ee.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,ee.jsx)(g.A,{className:"selected_form-mobile-props-title",message:o("Appearance on mobile devices"),type:"info"})}),w===Z.ND&&R.styles?(0,ee.jsx)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",children:(0,ee.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[(0,ee.jsx)("div",{style:{paddingBottom:4},children:(0,ee.jsx)(K.A,{form:l,elementSettings:e})}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Size")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{xe((e=>!e)),ge&&(o.mobileWidth="",t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileWidth:{value:null,dim:"px",classNamePrefix:"em-mob-width-"}}}))}))},children:ge?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),ge&&(0,ee.jsx)(ee.Fragment,{children:(0,ee.jsx)(x.A,{gutter:10,children:(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Table width"),placement:"left",children:(0,ee.jsx)("div",{style:{marginBottom:L.formItemMarginBottomMD+4},children:(0,ee.jsx)(z.A,{form:l,name:"mobileWidth",elementSettings:e})})})})})}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Background")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{_e((e=>!e)),o.mobileBackgroundColor=je?"":"#E5E5E5",t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBackgroundColor:{classNamePrefix:"em-mob-background_color-",value:o.mobileBackgroundColor}}})}))},children:je?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),je&&(0,ee.jsx)("div",{style:{marginBottom:(P.formTableFieldBackgroundImageEnabled,L.formItemMarginBottomMD+4)},children:(0,ee.jsx)(De.A,{form:l,elementSettings:e})}),!1,P.formFieldBorderEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Borders")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{ie((e=>!e)),oe&&(o.mobileBorderWidth=null,o.mobileBorderColor="",o.mobileBorderStyle=""),v((e=>({...Z.iV,[o.mobileBorderPosition]:{...e[o.mobileBorderPosition],width:o.mobileBorderWidth,color:o.mobileBorderColor,style:o.mobileBorderStyle}}))),t({operation:Z.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:oe?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),oe&&(0,ee.jsx)("div",{style:{paddingBottom:4},children:(0,ee.jsx)(U.A,{mobileBorders:j})})]}),P.formFieldBorderRadiusEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Border radius")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{ae((e=>!e)),o.mobileBorderRadiusAll=re?null:5,t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorderRadius:{all:o.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})}))},children:re?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),re&&(0,ee.jsx)("div",{style:{paddingBottom:4},children:(0,ee.jsx)(Y.A,{form:l,oneMobileBorderRadiusValue:S,setOneMobileBorderRadiusValue:y})})]}),P.formFieldBoxShadowEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Box shadow")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{ue((e=>!e)),ce?(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:Z.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:ce?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),ce&&(0,ee.jsx)("div",{style:{paddingBottom:4},children:(0,ee.jsx)(q.A,{mobileBoxShadow:_,form:l,elementSettings:e})})]}),P.formFieldVisibilityEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Display control")}),(0,ee.jsx)(x.A,{gutter:20,children:(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)("div",{style:{paddingBottom:4},children:(0,ee.jsx)(te.A,{elementSettings:e,form:l})})})})]}),P.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,ee.jsx)(x.A,{gutter:20,style:{marginBottom:4},children:(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(Re.A,{})})})]})]})}):(0,ee.jsx)("div",{id:"selected_element_form_desktop_props",children:(0,ee.jsxs)("div",{className:"selected_form-props-wrapper",children:[(0,ee.jsx)("div",{style:{paddingBottom:4},children:(0,ee.jsx)(W.A,{form:l,elementSettings:e,tooltipTitle:o("The align attribute sets the horizontal alignment of the table.")})}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Size")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{be((e=>!e)),he&&(o.width="",o.minWidth="",o.maxWidth="",t({operation:Z.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:he?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),he&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Table width"),placement:"left",children:(0,ee.jsx)(u.A.Item,{name:"width",style:{marginBottom:L.formItemMarginBottomXS},children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Width"),prefix:(0,ee.jsx)(N.A,{}),addonAfter:(0,ee.jsx)(u.A.Item,{name:"widthDim",noStyle:!0,children:We}),style:{width:"100%"}})})}),(0,ee.jsxs)(x.A,{gutter:10,style:{marginBottom:4},children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Minimum width"),placement:"left",children:(0,ee.jsx)(u.A.Item,{name:"minWidth",children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Table min width"),prefix:(0,ee.jsx)(Q.A,{icon:"MinWidth"}),addonAfter:(0,ee.jsx)(u.A.Item,{name:"minWidthDim",noStyle:!0,children:We})})})})}),(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Maximum width"),placement:"top",children:(0,ee.jsx)(u.A.Item,{name:"maxWidth",children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Table max width"),prefix:(0,ee.jsx)(Q.A,{icon:"MaxWidth"}),addonAfter:(0,ee.jsx)(u.A.Item,{name:"maxWidthDim",noStyle:!0,children:We})})})})})]})]}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Background")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{fe((e=>!e)),pe?(o.backgroundColor="",o.backgroundImage="",o.backgroundPositionX="",o.backgroundPositionY="",o.backgroundRepeat="none",C(!0)):o.backgroundColor="#E5E5E5",t({operation:Z.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}})}))},children:pe?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),pe&&(0,ee.jsxs)(x.A,{gutter:10,style:{marginBottom:k?16:0},children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Background color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,ee.jsx)(u.A.Item,{name:"backgroundColor",style:{marginBottom:P.formTableFieldBackgroundImageEnabled?L.formItemMarginBottomXS:L.formItemMarginBottomMD+4},children:(0,ee.jsx)(ne.A,{placeholder:o("Background color"),usedColors:e.usedColors})})})}),P.formTableFieldBackgroundImageEnabled&&(0,ee.jsxs)(p.A,{span:k?12:24,children:[(0,ee.jsx)("div",{style:{paddingBottom:k?4:0},children:(0,ee.jsx)(D.A,{form:l,label:o("Background image"),name:"backgroundImage",tooltipTitle:o("Background image"),placeholder:"Background image link/route"})}),!k&&(0,ee.jsxs)(u.A.Item,{style:{marginBottom:"0"},children:[(0,ee.jsxs)(x.A,{gutter:10,children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Horizontal position"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"backgroundPositionX",style:{marginBottom:L.formItemMarginBottomXS},children:(0,ee.jsx)(Ae.A,{placeholder:o("Horizontal position"),prefix:(0,ee.jsx)(Q.A,{icon:"BgPositionHorizontal"})})})})}),(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Vertical position"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"backgroundPositionY",style:{marginBottom:L.formItemMarginBottomXS},children:(0,ee.jsx)(Ae.A,{placeholder:o("Vertical position"),prefix:(0,ee.jsx)(Q.A,{icon:"BgPositionVertical"})})})})})]}),(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Background image repeat"),placement:"left",children:(0,ee.jsx)(u.A.Item,{name:"backgroundRepeat",style:{marginBottom:L.formItemMarginBottomMD+4},children:(0,ee.jsx)(h.A,{placeholder:"Please choose",options:ye,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})})})]})]})]}),P.formFieldBorderEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Borders")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{J((e=>!e)),G&&(o.borderWidth=null,o.borderColor="",o.borderStyle=""),r((e=>({...Z.iV,[o.borderPosition]:{...e[o.borderPosition],width:o.borderWidth,color:o.borderColor,style:o.borderStyle}}))),t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{border:{all:{color:o.borderColor,style:o.borderStyle,width:o.borderWidth}}}})}))},children:G?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),G&&(0,ee.jsx)("div",{style:{paddingBottom:4},children:(0,ee.jsx)(V.A,{borders:s})})]}),P.formFieldBorderRadiusEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Border radius")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{se((e=>!e)),o.borderRadiusAll=le?0:5,t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{borderRadius:{all:o.borderRadiusAll}}})}))},children:le?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),le&&(0,ee.jsx)("div",{style:{paddingBottom:4},children:(0,ee.jsx)(M.A,{form:l,oneBorderRadiusValue:m,setOneBorderRadiusValue:c,elementSettings:e})})]}),P.formFieldBoxShadowEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Box shadow")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{me((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:Z.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,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),de&&(0,ee.jsx)("div",{style:{paddingBottom:4},children:(0,ee.jsx)(X.A,{boxShadow:d})})]}),P.formFieldExportAsPictureEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Export settings")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{Se((e=>!e)),Be&&(o.exportAsPicture=!1,t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{exportAsPicture:!1}}))}))},children:Be?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),Be&&(0,ee.jsx)(Ve,{form:l,elementSettings:e})]}),P.formFieldVisibilityEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Display control")}),(0,ee.jsx)(x.A,{gutter:20,children:(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)("div",{style:{paddingBottom:4},children:(0,ee.jsx)(te.A,{elementSettings:e,form:l})})})})]}),P.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,ee.jsx)(x.A,{gutter:20,style:{marginBottom:4},children:(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(Re.A,{})})})]})]})})]})};var Ge=t(90042);const Ue=({elementSettings:e})=>{const{__:o}=(0,I.s9)(),t=(0,$.XW)(),[l]=u.A.useForm(),s=(0,ve.rD)(),r=(0,a.d4)(we.Fv),d=(0,a.d4)(we.yy);(0,i.useEffect)((()=>{e&&l.setFieldsValue(e)}),[l,e]);return(0,ee.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:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:o})},autoComplete:"off",className:"element-controls",children:r&&"bottom"!==d?(0,ee.jsx)(Le.A,{form:l,elementSettings:e,showAddParagraph:!1}):(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Hyperlink URL"),placement:"left",children:(0,ee.jsx)(u.A.Item,{name:"href",style:{marginBottom:24,paddingRight:10},children:(0,ee.jsx)(_.A,{allowClear:!0,placeholder:"href",prefix:(0,ee.jsx)(B.A,{})})})}),s.formLinkFieldInsertImageEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Actions with the chosen text")}),(0,ee.jsx)(u.A.Item,{children:(0,ee.jsx)(f.Ay,{icon:(0,ee.jsx)(Ge.A,{}),onClick:()=>{return e="add_img",void t({operation:Z.Ru.SANDBOX_ELEMENT_TEXT,action:e});var e},children:o("Add inline image")})})]}),(0,ee.jsx)(Ce.A,{form:l,elementSettings:e,showAddParagraph:!1})]})})},Ye=({elementSettings:e})=>{const{__:o}=(0,I.s9)(),[t]=u.A.useForm(),l=(0,$.XW)(),s=(0,a.d4)(we.Ct),r=(0,a.d4)(we.CS),d=(0,a.d4)(we.Fv),n=(0,a.d4)(we.yy),m=d&&"bottom"!==n;(0,i.useEffect)((()=>{var o,i,l,s,r;e&&t.setFieldsValue({...e,height:null===(o=e.height)||void 0===o?void 0:o.value,heightDim:null===(i=e.height)||void 0===i?void 0:i.dim,mobileHeight:(r=null===(l=e.mobileHeight)||void 0===l?void 0:l.value,r&&"auto"!==r?r:0===r?"0":""),mobileHeightDim:null===(s=e.mobileHeight)||void 0===s?void 0:s.dim})}),[t,e]);return(0,ee.jsxs)(u.A,{form:t,layout:"vertical",name:"selected_vindent_form",initialValues:{height:"",heightDim:"",mobileHeight:"",mobileHeightDim:""},onValuesChange:o=>{const i=t.getFieldsValue(!0),s=Object.keys(o)[0];let r;switch(s){case"height":r={[s]:{value:o[s],dim:i.heightDim}};break;case"heightDim":r={height:{value:i.height,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;default:r=o}l({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:r})},autoComplete:"off",children:[!m&&(0,ee.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,ee.jsx)(g.A,{className:"selected_form-mobile-props-title",message:o("Appearance on mobile devices"),type:"info"})}),s===Z.ND&&r.styles?(0,ee.jsx)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",style:{display:s===Z.ND&&r.styles?"block":"none",marginBottom:10},children:(0,ee.jsx)("div",{className:"selected_form-mobile-props-wrapper",children:(0,ee.jsx)(x.A,{gutter:10,style:{marginBottom:20},children:(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(G.A,{form:t,name:"mobileHeight",elementSettings:e})})})})}):(0,ee.jsx)("div",{id:"selected_element_form_desktop_props",style:{display:s===Z.ND&&r.styles?"none":"block"},children:(0,ee.jsx)("div",{className:"selected_form-props-wrapper",children:(0,ee.jsx)(x.A,{gutter:10,children:(0,ee.jsx)(p.A,{span:14,children:(0,ee.jsx)(u.A.Item,{name:"height",children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Indent height"),prefix:(0,ee.jsx)(k.A,{}),addonAfter:"px"})})})})})})]})};var qe=t(58013),Ke=t(26786);const Je=({form:e,elementSettings:o})=>{const{__:t}=(0,I.s9)(),l=(0,$.XW)(),[s,r]=(0,i.useState)(o.direction),a=t=>{const i=t.target.value,a={direction:""};i!==s?r(i):(r(""),e.setFieldsValue(a),l({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:a}))};return(0,ee.jsx)(u.A.Item,{name:"direction",children:(0,ee.jsx)(J.Ay.Group,{children:(0,ee.jsxs)(v.A,{size:8,children:[(0,ee.jsx)(b.A,{placement:"top",title:t("Right to left"),children:(0,ee.jsx)(J.Ay.Button,{value:"rtl",onClick:a,children:(0,ee.jsx)(qe.A,{})})}),(0,ee.jsx)(b.A,{placement:"top",title:t("Left to right"),children:(0,ee.jsx)(J.Ay.Button,{value:"ltr",onClick:a,children:(0,ee.jsx)(Ke.A,{})})})]})})})};Je.defaultProps={};const Qe=Je;var Ze=t(68031),$e=t(34353);const eo=({form:e,elementSettings:o})=>{var t;const{__:l}=(0,I.s9)(),[s,r]=(0,i.useState)(null===(t=o.mobileDirection)||void 0===t?void 0:t.value),a=(0,$.XW)(),d=t=>{const i=t.target.value,l={mobileDirection:{classNamePrefix:"em-mob-direction-",value:""}};i!==s?r(i):(r(""),e.setFieldsValue(l),a({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:l}))};return(0,ee.jsx)(u.A.Item,{name:"mobileDirection",children:(0,ee.jsx)(J.Ay.Group,{children:(0,ee.jsxs)(v.A,{size:8,children:[(0,ee.jsx)(b.A,{placement:"top",title:l("Right to left"),children:(0,ee.jsx)(J.Ay.Button,{value:"rtl",onClick:d,children:(0,ee.jsx)(qe.A,{})})}),(0,ee.jsx)(b.A,{placement:"top",title:l("Left to right"),children:(0,ee.jsx)(J.Ay.Button,{value:"ltr",onClick:d,children:(0,ee.jsx)(Ke.A,{})})})]})})})};eo.defaultProps={};const oo=eo,{Option:to}=h.A,io=(0,ee.jsxs)(h.A,{className:"select-after",getPopupContainer:e=>e.parentNode,children:[(0,ee.jsx)(to,{value:"px",children:"px"}),(0,ee.jsx)(to,{value:"%",children:"%"})]}),lo={paddingTop:"top",paddingLeft:"left",paddingRight:"right",paddingBottom:"bottom",mobilePaddingTop:"top",mobilePaddingLeft:"left",mobilePaddingRight:"right",mobilePaddingBottom:"bottom"},so={mobileBorderRadiusAll:"all",mobileRadiusTopLeft:"topLeft",mobileRadiusBottomLeft:"bottomLeft",mobileRadiusTopRight:"topRight",mobileRadiusBottomRight:"bottomRight"},{useToken:ro}=c.A,ao=({elementSettings:e})=>{const{__:o}=(0,I.s9)(),t=(0,$.XW)(),l=(0,a.wA)(),[s]=u.A.useForm(),[m,c]=(0,i.useState)(""),[j,v]=(0,i.useState)({}),[B,S]=(0,i.useState)({}),[y,w]=(0,i.useState)({}),[R,P]=(0,i.useState)({}),[C,L]=(0,i.useState)(!0),[O,F]=(0,i.useState)(!0),W=(0,a.d4)(we.Ct),J=(0,a.d4)(we.CS),ie=(0,a.d4)(d.Hs),le=(0,ve.rD)(),[se,re]=(0,i.useState)(""===e.backgroundImage[0].value),{token:ae}=ro(),de=(0,a.d4)(we.Fv),me=(0,a.d4)(we.yy),ce=de&&"bottom"!==me,[ue,he]=(0,i.useState)(!1),[be,ge]=(0,i.useState)(!1),[xe,pe]=(0,i.useState)(!1),[fe,je]=(0,i.useState)(!1),[_e,Be]=(0,i.useState)(!1),[Se,ye]=(0,i.useState)(!1),[Pe,Ne]=(0,i.useState)(!1),[ke,Te]=(0,i.useState)(!1),[Ee,Ie]=(0,i.useState)(!1),[Ce,Le]=(0,i.useState)(!1),[Oe,Fe]=(0,i.useState)(!1),[Me,We]=(0,i.useState)(!1),[He,Xe]=(0,i.useState)(!1),[ze,Ge]=(0,i.useState)(!1),Ue=ie.hasOwnProperty("type")?Z.IE:Z.Tm,Ye=[{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"}];(0,i.useEffect)((()=>{if(e){var o,t,i,l,r,a,d,n,m,c,u,h,b,g,x,p,A,f,j,_,B,y,R,N,k,T,E,I,C,O,D,V,M,W,H,X,z,G,U,Y,q,K,J,Q,Z,$,ee,oe,te,ie,le,se,ae;const de=e.border,ne=e.boxShadow,me=e.mobileBorder,ce=e.mobileBoxShadow;v(de),w(ne),S(me),P(ce);const ue=Object.keys(de).find((e=>{var o,t,i;return(null===(o=de[e])||void 0===o?void 0:o.width)||(null===(t=de[e])||void 0===t?void 0:t.style)||(null===(i=de[e])||void 0===i?void 0:i.color)})),be=Object.keys(me).find((e=>{var o,t,i;return(null===(o=me[e])||void 0===o?void 0:o.width)||(null===(t=me[e])||void 0===t?void 0:t.style)||(null===(i=me[e])||void 0===i?void 0:i.color)})),xe=e=>e||(0===e?"0":""),Ae=e=>e&&"auto"!==e?e:0===e?"0":"";s.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:ue||"all",borderWidth:(null===(r=de[ue])||void 0===r?void 0:r.width)||"",borderColor:(null===(a=de[ue])||void 0===a?void 0:a.color)||"",borderStyle:(null===(d=de[ue])||void 0===d?void 0:d.style)||"",paddingTop:xe(null===(n=e.padding)||void 0===n?void 0:n.all)||xe(null===(m=e.padding)||void 0===m?void 0:m.top),paddingLeft:xe(null===(c=e.padding)||void 0===c?void 0:c.all)||xe(null===(u=e.padding)||void 0===u?void 0:u.left),paddingRight:xe(null===(h=e.padding)||void 0===h?void 0:h.all)||xe(null===(b=e.padding)||void 0===b?void 0:b.right),paddingBottom:xe(null===(g=e.padding)||void 0===g?void 0:g.all)||xe(null===(x=e.padding)||void 0===x?void 0:x.bottom),paddingLeftRight:xe(null===(p=e.padding)||void 0===p?void 0:p.left)||xe(null===(A=e.padding)||void 0===A?void 0:A.right),paddingTopBottom:xe(null===(f=e.padding)||void 0===f?void 0:f.top)||xe(null===(j=e.padding)||void 0===j?void 0:j.bottom),borderRadiusAll:xe(e.borderRadius.all),borderRadiusTopLeft:xe(e.borderRadius.topLeft),borderRadiusBottomLeft:xe(e.borderRadius.bottomLeft),borderRadiusTopRight:xe(e.borderRadius.topRight),borderRadiusBottomRight:xe(e.borderRadius.bottomRight),boxShadowInset:xe(null===(_=e.boxShadow)||void 0===_?void 0:_.inset)||!1,boxShadowHOffset:xe(null===(B=e.boxShadow)||void 0===B?void 0:B.hOffset),boxShadowVOffset:xe(null===(y=e.boxShadow)||void 0===y?void 0:y.vOffset),boxShadowBlurRadius:xe(null===(R=e.boxShadow)||void 0===R?void 0:R.blurRadius),boxShadowSpreadRadius:xe(null===(N=e.boxShadow)||void 0===N?void 0:N.spreadRadius),boxShadowColor:xe(null===(k=e.boxShadow)||void 0===k?void 0:k.color),mobileWidth:Ae(null===(T=e.mobileWidth)||void 0===T?void 0:T.value),mobileWidthDim:null===(E=e.mobileWidth)||void 0===E?void 0:E.dim,mobileHeight:Ae(null===(I=e.mobileHeight)||void 0===I?void 0:I.value),mobileHeightDim:null===(C=e.mobileHeight)||void 0===C?void 0:C.dim,mobileBorderPosition:be||"all",mobileBorderWidth:null!==(null===(O=me[be])||void 0===O?void 0:O.width)?null===(D=me[be])||void 0===D?void 0:D.width:"",mobileBorderColor:(null===(V=me[be])||void 0===V?void 0:V.color)||"",mobileBorderStyle:(null===(M=me[be])||void 0===M?void 0:M.style)||"",mobileBorderRadiusAll:xe(e.mobileBorderRadius.all),mobileRadiusTopLeft:xe(null!==e.mobileBorderRadius.topLeft?e.mobileBorderRadius.topLeft:e.mobileBorderRadius.all),mobileRadiusBottomLeft:xe(null!==e.mobileBorderRadius.bottomLeft?e.mobileBorderRadius.bottomLeft:e.mobileBorderRadius.all),mobileRadiusTopRight:xe(null!==e.mobileBorderRadius.topRight?e.mobileBorderRadius.topRight:e.mobileBorderRadius.all),mobileRadiusBottomRight:xe(null!==e.mobileBorderRadius.bottomRight?e.mobileBorderRadius.bottomRight:e.mobileBorderRadius.all),mobileBoxShadowInset:xe(null===(W=e.mobileBoxShadow)||void 0===W?void 0:W.inset)||!1,mobileBoxShadowHOffset:xe(null===(H=e.mobileBoxShadow)||void 0===H?void 0:H.hOffset),mobileBoxShadowVOffset:xe(null===(X=e.mobileBoxShadow)||void 0===X?void 0:X.vOffset),mobileBoxShadowBlurRadius:xe(null===(z=e.mobileBoxShadow)||void 0===z?void 0:z.blurRadius),mobileBoxShadowSpreadRadius:xe(null===(G=e.mobileBoxShadow)||void 0===G?void 0:G.spreadRadius),mobileBoxShadowColor:xe(null===(U=e.mobileBoxShadow)||void 0===U?void 0:U.color),mobileAlign:xe(null===(Y=e.mobileAlign)||void 0===Y?void 0:Y.value),mobileVerticalAlign:xe(null===(q=e.mobileVerticalAlign)||void 0===q?void 0:q.value),mobileBackgroundColor:xe("none"!==(null===(K=e.mobileBackgroundColor)||void 0===K?void 0:K.value)?null===(J=e.mobileBackgroundColor)||void 0===J?void 0:J.value:""),mobileBackgroundImage:"none"!==e.mobileBackgroundImage[0].value?e.mobileBackgroundImage[0].value:"",mobileBackgroundPositionX:xe(null===(Q=e.mobileBackgroundPositionX)||void 0===Q?void 0:Q.value),mobileBackgroundPositionY:xe(null===(Z=e.mobileBackgroundPositionY)||void 0===Z?void 0:Z.value),mobileBackgroundRepeat:null!==($=e.mobileBackgroundRepeat)&&void 0!==$&&$.value?null===(ee=e.mobileBackgroundRepeat)||void 0===ee?void 0:ee.value:"none",mobilePaddingTop:xe(e.mobilePadding.all)||xe(e.mobilePadding.top),mobilePaddingLeft:xe(e.mobilePadding.all)||xe(e.mobilePadding.left),mobilePaddingRight:xe(e.mobilePadding.all)||xe(e.mobilePadding.right),mobilePaddingBottom:xe(e.mobilePadding.all)||xe(e.mobilePadding.bottom),mobilePaddingTopBottom:xe(e.mobilePadding.top)||xe(e.mobilePadding.bottom),mobilePaddingLeftRight:xe(e.mobilePadding.left)||xe(e.mobilePadding.right),exportAsPicture:null===e||void 0===e?void 0:e.exportAsPicture}),!xe(e.borderRadius.all)&&(xe(e.borderRadius.topLeft)||xe(e.borderRadius.bottomLeft)||xe(e.borderRadius.topRight)||xe(e.borderRadius.bottomRight))?L(!1):L(!0),xe(e.mobileBorderRadius.topLeft)||xe(e.mobileBorderRadius.bottomLeft)||xe(e.mobileBorderRadius.topRight)||xe(e.mobileBorderRadius.bottomRight)?F(!1):F(!0),re(""===e.backgroundImage[0].value),xe(e.padding.all)||!(xe(e.padding.top)||xe(e.padding.right)||xe(e.padding.bottom)||xe(e.padding.left))||e.padding.top===e.padding.bottom&&e.padding.right===e.padding.left?he(!0):he(!1),xe(e.mobilePadding.all)||!(xe(e.mobilePadding.top)||xe(e.mobilePadding.right)||xe(e.mobilePadding.bottom)||xe(e.mobilePadding.left))||e.mobilePadding.top===e.mobilePadding.bottom&&e.mobilePadding.right===e.mobilePadding.left?ge(!0):ge(!1),pe(!(null===(oe=de[ue])||void 0===oe||!oe.width)||!(null===(te=de[ue])||void 0===te||!te.style)||!(null===(ie=de[ue])||void 0===ie||!ie.color)),je(!(null===(le=me[be])||void 0===le||!le.width)||!(null===(se=me[be])||void 0===se||!se.style)||!(null===(ae=me[be])||void 0===ae||!ae.color)),Be(!!e.borderRadius.all||!!e.borderRadius.topLeft||!!e.borderRadius.bottomLeft||!!e.borderRadius.topRight||!!e.borderRadius.bottomRight),ye(!!e.mobileBorderRadius.all||!!e.mobileBorderRadius.topLeft||!!e.mobileBorderRadius.bottomLeft||!!e.mobileBorderRadius.topRight||!!e.mobileBorderRadius.bottomRight),Ne(!!e.boxShadow),Te(!!e.mobileBoxShadow.blurRadius||!!e.mobileBoxShadow.color||!!e.mobileBoxShadow.hOffset||!!e.mobileBoxShadow.inset||!!e.mobileBoxShadow.spreadRadius||!!e.mobileBoxShadow.vOffset),Ie(!!e.width.value&&"column"!==e.type||!!e.height.value),Le(!!e.mobileWidth.value||!!e.mobileHeight.value),Fe(!!e.backgroundColor||!!e.backgroundImage[0].value||!!e.backgroundPositionY||!!e.backgroundPositionX||"repeat"!==e.backgroundRepeat||!e.backgroundRepeat),We(!!e.mobileBackgroundColor.value),Xe(!!e.exportAsPicture),Ge(!!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)}}),[s,e]);const qe=(0,i.useCallback)((e=>{l(Ue===Z.Tm?(0,d.A9)(e):(0,n.A9)(e))}),[l,Ue]);return(0,ee.jsxs)(u.A,{form:s,layout:"vertical",name:"selected_td_form",initialValues:{backgroundColor:"",backgroundImage:"",backgroundPositionX:"",backgroundPositionY:"",backgroundRepeat:"",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=s.getFieldsValue(!0),l=Object.keys(o)[0];let r;switch(c("%"===s.getFieldsValue(!0).widthDim?100:""),l){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]:{...j[i.borderPosition],style:o[l]}}},"all"===i.borderPosition?v((e=>({...Z.iV,[i.borderPosition]:{...e[i.borderPosition],style:o[l]}}))):v((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],style:o[l]}})));break;case"borderColor":r={border:{[i.borderPosition]:{...j[i.borderPosition],color:o[l]}}},"all"===i.borderPosition?v((e=>({...Z.iV,[i.borderPosition]:{...e[i.borderPosition],color:o[l]}}))):v((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],color:o[l]}})));break;case"borderWidth":r={border:{[i.borderPosition]:{...j[i.borderPosition],width:o[l]}}},"all"===i.borderPosition?v((e=>({...Z.iV,[i.borderPosition]:{...e[i.borderPosition],width:o[l]}}))):v((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],width:o[l]}})));break;case"borderPosition":s.setFieldsValue({borderWidth:j[o[l]].width||"",borderColor:j[o[l]].color||"",borderStyle:j[o[l]].style||""});break;case"width":r={[l]:{value:o[l],dim:i.widthDim}};break;case"height":r={[l]:{value:o[l],dim:i.heightDim}};break;case"widthDim":r={width:{value:i.width,dim:o[l]}};break;case"heightDim":r={height:{value:i.height,dim:o[l]}};break;case"backgroundImage":re(""===o[l]),r={[l]:[{...e.backgroundImage[0],value:o[l]}]};break;case"paddingTop":case"paddingLeft":case"paddingRight":case"paddingBottom":r={padding:{left:i.paddingLeft,right:i.paddingRight,top:i.paddingTop,bottom:i.paddingBottom,[lo[l]]:+o[l]}};break;case"paddingTopBottom":r={padding:{left:i.paddingLeft,right:i.paddingRight,top:+o[l],bottom:+o[l]}},i.paddingTop=i.paddingBottom=+o[l];break;case"paddingLeftRight":r={padding:{top:i.paddingTop,bottom:i.paddingBottom,left:+o[l],right:+o[l]}},i.paddingLeft=i.paddingRight=+o[l];break;case"borderRadiusAll":r={borderRadius:{[Z.wF[l]]:+o[l]}};break;case"borderRadiusTopLeft":case"borderRadiusBottomLeft":case"borderRadiusTopRight":case"borderRadiusBottomRight":r={borderRadius:{topLeft:i.borderRadiusTopLeft,bottomLeft:i.borderRadiusBottomLeft,topRight:i.borderRadiusTopRight,bottomRight:i.borderRadiusBottomRight,[Z.wF[l]]:+o[l]}};break;case"mobileWidth":r={[l]:{classNamePrefix:"em-mob-width-",value:o[l],dim:i.mobileWidthDim}};break;case"mobileWidthDim":r={mobileWidth:{classNamePrefix:"em-mob-width-",value:i.mobileWidth,dim:o[l]}};break;case"mobileHeight":r={[l]:{classNamePrefix:"em-mob-height-",value:o[l],dim:i.mobileHeightDim}};break;case"mobileHeightDim":r={mobileHeight:{classNamePrefix:"em-mob-height-",value:i.mobileHeight,dim:o[l]}};break;case"mobileBorderStyle":r={mobileBorder:{[i.mobileBorderPosition]:{...B[i.mobileBorderPosition],style:o[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?S((e=>({...Z.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:o[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):S((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:o[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderColor":r={mobileBorder:{[i.mobileBorderPosition]:{...B[i.mobileBorderPosition],color:o[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?S((e=>({...Z.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:o[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):S((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:o[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderWidth":r={mobileBorder:{[i.mobileBorderPosition]:{...B[i.mobileBorderPosition],width:o[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?S((e=>({...Z.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:o[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):S((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:o[l],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderPosition":s.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":r={mobileBorderRadius:{[so[l]]:o[l],classNamePrefix:"em-mob-border_radius_"+so[l]+"-"}};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={[l]:{classNamePrefix:"em-mob-text_align-",value:o[l]}};break;case"mobileVerticalAlign":r={[l]:{classNamePrefix:"em-mob-vertical_align-",value:o[l]}};break;case"mobileBackgroundColor":r={[l]:{classNamePrefix:"em-mob-background_color-",value:o[l]}};break;case"mobileBackgroundImage":r={[l]:[{...e.mobileBackgroundImage[0],classNamePrefix:"em-mob-background_image-",value:o[l]}]};break;case"mobileBackgroundPositionX":r={[l]:{classNamePrefix:"em-mob-background_position_x-",value:o[l]}};break;case"mobileBackgroundPositionY":r={[l]:{classNamePrefix:"em-mob-background_position_x-",value:o[l]}};break;case"mobileBackgroundRepeat":r={[l]:{classNamePrefix:"em-mob-background_repeat-",value:o[l]}};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[l],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[l],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;default:r=o}"borderPosition"!==l&&(t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:r}),qe({...e,...r,activateSection:null,changeKey:l}))},autoComplete:"off",className:"element-controls",children:[!ce&&(0,ee.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,ee.jsx)(g.A,{className:"selected_form-mobile-props-title",message:o("Appearance on mobile devices"),type:"info"})}),W===Z.ND&&J.styles?(0,ee.jsx)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",style:{display:W===Z.ND&&J.styles?"block":"none"},children:(0,ee.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[(0,ee.jsxs)(x.A,{gutter:20,children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(K.A,{form:s,elementSettings:e,imgParent:!0})}),le.formCellFieldVerticalAlignEnabled&&"group"!==e.type&&("structure"!==e.type||"structure"===e.type&&1===e.floatBlocks.items.length)&&(0,ee.jsx)(p.A,{span:12,style:{textAlign:"right"},children:(0,ee.jsx)(oe,{form:s,elementSettings:e})})]}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),le.formCellFieldPaddingsEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Padding")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=s.getFieldsValue(!0);setTimeout((()=>{Ge((e=>!e)),ze&&(o.mobilePaddingLeftRight="",o.mobilePaddingLeft="",o.mobilePaddingRight="",o.mobilePaddingTopBottom="",o.mobilePaddingTop="",o.mobilePaddingBottom="",t({operation:Z.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:ze?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),ze&&(0,ee.jsx)(x.A,{gutter:10,style:{paddingBottom:4},children:(0,ee.jsx)(ee.Fragment,{children:(0,ee.jsx)($e.A,{form:s,elementSettings:e,mobilePaddingsExt:be,setMobilePaddingsExt:ge})})}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"})]}),"group"!==e.type&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Size")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=s.getFieldsValue(!0);setTimeout((()=>{Le((e=>!e)),Ce&&(o.mobileWidth="",o.mobileHeight="",t({operation:Z.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:Ce?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),Ce&&(0,ee.jsxs)(x.A,{gutter:10,style:{paddingBottom:9},children:["structure"!==e.type&&(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)("div",{style:{marginBottom:15},children:(0,ee.jsx)(z.A,{form:s,name:"mobileWidth",elementSettings:e})})}),(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)("div",{style:{marginBottom:15},children:(0,ee.jsx)(G.A,{form:s,name:"mobileHeight",elementSettings:e})})})]}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"})]}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Background")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=s.getFieldsValue(!0);setTimeout((()=>{We((e=>!e)),o.mobileBackgroundColor=Me?"":"#E5E5E5",t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBackgroundColor:{classNamePrefix:"em-mob-background_color-",value:o.mobileBackgroundColor}}})}))},children:Me?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),Me&&(0,ee.jsx)(ee.Fragment,{children:(0,ee.jsx)("div",{style:{marginBottom:(le.formCellFieldBackgroundImageEnabled,ae.formItemMarginBottomMD+4)},children:(0,ee.jsx)(De.A,{form:s,elementSettings:e,label:o("Background color")})})}),!1,le.formFieldBorderEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Borders")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=s.getFieldsValue(!0);setTimeout((()=>{je((e=>!e)),fe&&(o.mobileBorderWidth=null,o.mobileBorderColor="",o.mobileBorderStyle=""),S((e=>({...Z.iV,[o.mobileBorderPosition]:{...e[o.mobileBorderPosition],width:o.mobileBorderWidth,color:o.mobileBorderColor,style:o.mobileBorderStyle}}))),t({operation:Z.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:fe?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),fe&&(0,ee.jsx)("div",{style:{marginBottom:4},children:(0,ee.jsx)(U.A,{mobileBorders:B})})]}),le.formFieldBorderRadiusEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Border radius")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=s.getFieldsValue(!0);setTimeout((()=>{ye((e=>!e)),o.mobileBorderRadiusAll=Se?null:5,t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorderRadius:{all:o.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})}))},children:Se?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),Se&&(0,ee.jsx)("div",{style:{marginBottom:4},children:(0,ee.jsx)(Y.A,{form:s,oneMobileBorderRadiusValue:O,setOneMobileBorderRadiusValue:F})})]}),le.formFieldBoxShadowEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Box shadow")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=s.getFieldsValue(!0);setTimeout((()=>{Te((e=>!e)),ke?(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:Z.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:ke?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),ke&&(0,ee.jsx)("div",{style:{marginBottom:4},children:(0,ee.jsx)(q.A,{mobileBoxShadow:R,form:s,elementSettings:e})})]}),le.formFieldVisibilityEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("group"!==e.type?"Display control & Direction":"Display control")}),(0,ee.jsxs)(x.A,{gutter:20,style:{marginBottom:4},children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(te.A,{elementSettings:e,form:s})}),"group"!==e.type&&(0,ee.jsx)(p.A,{span:12,style:{textAlign:"group"!==e.type?"right":"left"},children:(0,ee.jsx)(oo,{elementSettings:e,form:s})})]})]}),le.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,ee.jsx)(x.A,{gutter:20,style:{marginBottom:4},children:(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(Re.A,{})})})]})]})}):(0,ee.jsx)("div",{id:"selected_element_form_desktop_props",children:(0,ee.jsxs)("div",{className:"selected_form-props-wrapper",children:[(0,ee.jsxs)(x.A,{gutter:10,style:{paddingBottom:4},children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(Ze.A,{form:s,elementSettings:e})}),le.formCellFieldVerticalAlignEnabled&&"group"!==e.type&&("structure"!==e.type||"structure"===e.type&&1===e.floatBlocks.items.length)&&(0,ee.jsx)(p.A,{span:12,style:{textAlign:"right"},children:(0,ee.jsx)(H.A,{form:s,elementSettings:e})})]}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),le.formCellFieldPaddingsEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)("div",{className:"form-group-title",children:o("Padding")}),(0,ee.jsx)(x.A,{gutter:10,style:{paddingBottom:4},children:(0,ee.jsxs)(ee.Fragment,{children:["group"!==e.type&&"column"!==e.type&&(0,ee.jsxs)(p.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"},children:[(0,ee.jsx)("div",{className:"padding-collapsed",style:{display:ue?"block":"none"},children:(0,ee.jsx)(b.A,{title:o("Horizontal padding"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"paddingLeftRight",children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Horizontal"),prefix:(0,ee.jsx)(Q.A,{icon:"PaddingLeftRight"}),addonAfter:"px"})})})}),(0,ee.jsxs)("div",{className:"padding-extended",style:{display:ue?"none":"block"},children:[(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Left padding"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"paddingLeft",style:{marginBottom:ae.formItemMarginBottomXS},children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Left"),prefix:(0,ee.jsx)(Q.A,{icon:"PaddingLeft"}),addonAfter:"px"})})}),(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Right padding"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"paddingRight",children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Right"),prefix:(0,ee.jsx)(Q.A,{icon:"PaddingRight"}),addonAfter:"px"})})})]})]}),(0,ee.jsxs)(p.A,{span:10,style:{width:"group"!==e.type&&"column"!==e.type?156:45,flex:"auto",maxWidth:"none"},children:[(0,ee.jsx)("div",{className:"padding-collapsed",style:{display:ue?"block":"none"},children:(0,ee.jsx)(b.A,{title:o("Vertical padding"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"paddingTopBottom",children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Vertical"),prefix:(0,ee.jsx)(Q.A,{icon:"PaddingTopBottom"}),addonAfter:"px"})})})}),(0,ee.jsxs)("div",{className:"padding-extended",style:{display:ue?"none":"block"},children:[(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Top padding"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"paddingTop",style:{marginBottom:ae.formItemMarginBottomXS},children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Top"),prefix:(0,ee.jsx)(Q.A,{icon:"PaddingTop"}),addonAfter:"px"})})}),(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Bottom padding"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"paddingBottom",children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Bottom"),prefix:(0,ee.jsx)(Q.A,{icon:"PaddingBottom"}),addonAfter:"px"})})})]})]}),(0,ee.jsx)(p.A,{span:4,style:{width:45,flex:"auto",maxWidth:"none"},children:(0,ee.jsx)(b.A,{title:o("Individual padding"),placement:"bottom",children:(0,ee.jsx)(f.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":!ue}),onClick:()=>{he((e=>!e));const o=s.getFieldsValue(!0);ue||(o.paddingLeftRight=o.paddingLeft,o.paddingTopBottom=o.paddingTop,o.paddingRight=o.paddingLeft,o.paddingBottom=o.paddingTop,t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{padding:{top:o.paddingTopBottom,bottom:o.paddingTopBottom,left:o.paddingLeftRight,right:o.paddingLeftRight}}}))},children:(0,ee.jsx)(Q.A,{icon:"PaddingSwitcher"})})})})]})}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"})]}),"group"!==e.type&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Size")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=s.getFieldsValue(!0);setTimeout((()=>{Ie((e=>!e)),Ee&&(o.width="",o.height="",t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{width:{value:null,dim:"px"},height:{value:null,dim:"px"}}}))}))},children:Ee?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),Ee&&(0,ee.jsxs)(x.A,{gutter:10,style:{paddingBottom:4},children:["structure"!==e.type&&"column"!==e.type&&(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(b.A,{title:o("Width"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"width",style:{marginBottom:ae.formItemMarginBottomXS},children:(0,ee.jsx)(Ae.A,{min:0,max:m,placeholder:o("Width"),prefix:(0,ee.jsx)(N.A,{}),addonAfter:(0,ee.jsx)(u.A.Item,{name:"widthDim",noStyle:!0,children:io})})})})}),(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(b.A,{title:o("Height"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"height",children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Height"),prefix:(0,ee.jsx)(k.A,{}),addonAfter:"px"})})})})]}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"})]}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Background")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=s.getFieldsValue(!0);setTimeout((()=>{Fe((e=>!e)),Oe?(o.backgroundColor="",o.backgroundImage="",o.backgroundPositionX="",o.backgroundPositionY="",o.backgroundRepeat="none",re(!0)):o.backgroundColor="#E5E5E5",t({operation:Z.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}})}))},children:Oe?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),Oe&&(0,ee.jsxs)(x.A,{gutter:10,style:{marginBottom:se?16:0},children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Background color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,ee.jsx)(u.A.Item,{name:"backgroundColor",style:{marginBottom:le.formCellFieldBackgroundImageEnabled?ae.formItemMarginBottomXS:ae.formItemMarginBottomMD+4},children:(0,ee.jsx)(ne.A,{placeholder:o("Background color"),usedColors:e.usedColors})})})}),le.formCellFieldBackgroundImageEnabled&&(0,ee.jsxs)(p.A,{span:se?12:24,children:[(0,ee.jsx)(D.A,{form:s,label:o("Background image"),name:"backgroundImage",tooltipTitle:o("Background image"),placeholder:"Background image link/route"}),!se&&(0,ee.jsxs)(u.A.Item,{style:{marginBottom:"0"},children:[(0,ee.jsxs)(x.A,{gutter:10,children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Horizontal position"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"backgroundPositionX",style:{marginBottom:ae.formItemMarginBottomXS},children:(0,ee.jsx)(_.A,{placeholder:o("Horizontal position"),prefix:(0,ee.jsx)(Q.A,{icon:"BgPositionHorizontal"})})})})}),(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Vertical position"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"backgroundPositionY",style:{marginBottom:ae.formItemMarginBottomXS},children:(0,ee.jsx)(_.A,{placeholder:o("Vertical position"),prefix:(0,ee.jsx)(Q.A,{icon:"BgPositionVertical"})})})})})]}),(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Background image repeat"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"backgroundRepeat",style:{marginBottom:ae.formItemMarginBottomMD+4},children:(0,ee.jsx)(h.A,{placeholder:o("Please choose"),options:Ye,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})})})]})]})]}),le.formFieldBorderEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Borders")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=s.getFieldsValue(!0);setTimeout((()=>{pe((e=>!e)),xe&&(o.borderWidth=null,o.borderColor="",o.borderStyle=""),v((e=>({...Z.iV,[o.borderPosition]:{...e[o.borderPosition],width:o.borderWidth,color:o.borderColor,style:o.borderStyle}}))),t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{border:{all:{color:o.borderColor,style:o.borderStyle,width:o.borderWidth}}}})}))},children:xe?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),xe&&(0,ee.jsx)("div",{style:{marginBottom:4},children:(0,ee.jsx)(V.A,{borders:j})})]}),le.formFieldBorderRadiusEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Border radius")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=s.getFieldsValue(!0);setTimeout((()=>{Be((e=>!e)),o.borderRadiusAll=_e?0:5,t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{borderRadius:{all:o.borderRadiusAll}}})}))},children:_e?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),_e&&(0,ee.jsx)("div",{style:{marginBottom:4},children:(0,ee.jsx)(M.A,{form:s,oneBorderRadiusValue:C,setOneBorderRadiusValue:L,elementSettings:e})})]}),le.formFieldBoxShadowEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Box shadow")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=s.getFieldsValue(!0);setTimeout((()=>{Ne((e=>!e)),Pe?(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:Z.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:Pe?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),Pe&&(0,ee.jsx)("div",{style:{marginBottom:4},children:(0,ee.jsx)(X.A,{boxShadow:y})})]}),le.formFieldExportAsPictureEnabled&&"group"!==e.type&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Export settings")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=s.getFieldsValue(!0);setTimeout((()=>{Xe((e=>!e)),He&&(o.exportAsPicture=!1,t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{exportAsPicture:!1}}))}))},children:He?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),He&&(0,ee.jsx)(ee.Fragment,{children:(0,ee.jsx)(Ve,{form:s,elementSettings:e})})]}),le.formFieldVisibilityEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("group"!==e.type?"Display control & Direction":"Display control")}),(0,ee.jsxs)(x.A,{gutter:20,style:{marginBottom:4},children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(te.A,{elementSettings:e,form:s})}),"group"!==e.type&&(0,ee.jsx)(p.A,{span:12,style:{textAlign:"group"!==e.type?"right":"left"},children:(0,ee.jsx)(Qe,{elementSettings:e,form:s})})]})]}),le.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,ee.jsx)(x.A,{gutter:20,style:{marginBottom:4},children:(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(Re.A,{})})})]})]})})]})},{Option:no}=h.A,mo=(0,ee.jsxs)(h.A,{className:"select-after",getPopupContainer:e=>e.parentNode,children:[(0,ee.jsx)(no,{value:"px",children:"px"}),(0,ee.jsx)(no,{value:"%",children:"%"})]}),co={paddingTop:"top",paddingLeft:"left",paddingRight:"right",paddingBottom:"bottom",mobilePaddingTop:"top",mobilePaddingLeft:"left",mobilePaddingRight:"right",mobilePaddingBottom:"bottom"},uo={mobileBorderRadiusAll:"all",mobileRadiusTopLeft:"topLeft",mobileRadiusBottomLeft:"bottomLeft",mobileRadiusTopRight:"topRight",mobileRadiusBottomRight:"bottomRight"},{useToken:ho}=c.A,bo=({elementSettings:e})=>{const{__:o}=(0,I.s9)(),t=(0,$.XW)(),[l]=u.A.useForm(),[s,d]=(0,i.useState)({}),[n,m]=(0,i.useState)({}),[c,j]=(0,i.useState)(!0),[v,B]=(0,i.useState)({}),[S,y]=(0,i.useState)({}),[w,R]=(0,i.useState)(!0),P=(0,a.d4)(we.Ct),C=(0,a.d4)(we.CS),L=(0,ve.rD)(),[O,F]=(0,i.useState)(""===e.backgroundImage[0].value),{token:W}=ho(),K=(0,a.d4)(we.Fv),J=(0,a.d4)(we.yy),ie=K&&"bottom"!==J,[le,se]=(0,i.useState)(!1),[re,ae]=(0,i.useState)(!1),[de,me]=(0,i.useState)(!1),[ce,ue]=(0,i.useState)(!1),[he,be]=(0,i.useState)(!1),[ge,xe]=(0,i.useState)(!1),[pe,fe]=(0,i.useState)(!1),[je,_e]=(0,i.useState)(!1),[Be,Se]=(0,i.useState)(!1),[ye,Pe]=(0,i.useState)(!1),[Ne,ke]=(0,i.useState)(!1),[Te,Ee]=(0,i.useState)(!1),[Ie,Ce]=(0,i.useState)(!1),[Le,Fe]=(0,i.useState)(!1),[Me,We]=(0,i.useState)(!1),[He,Xe]=(0,i.useState)(""),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"}];(0,i.useEffect)((()=>{if(e){var o,t,i,s,r,a,n,c,u,h,b,g,x,p,A,f,v,_,S,w,P,N,k,T,E,I,C,L,O,D,V,M,W,H,X,z,G,U,Y,q,K,J,Q,Z,$,ee,oe,te,ie,le,re;const de=e.border,ne=e.boxShadow,ce=e.mobileBorder,he=e.mobileBoxShadow;d(de),m(ne),B(ce),y(he);const ge=Object.keys(de).find((e=>{var o,t,i;return(null===(o=de[e])||void 0===o?void 0:o.width)||(null===(t=de[e])||void 0===t?void 0:t.style)||(null===(i=de[e])||void 0===i?void 0:i.color)})),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)})),Ae=e=>e||(0===e?"0":""),je=e=>e&&"auto"!==e?e:0===e?"0":"";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===(s=e.height)||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===(c=e.minWidth)||void 0===c?void 0:c.dim,backgroundImage:e.backgroundImage[0].value,show:e.show?e.show:"all",borderPosition:ge||"all",borderWidth:(null===(u=de[ge])||void 0===u?void 0:u.width)||"",borderColor:(null===(h=de[ge])||void 0===h?void 0:h.color)||"",borderStyle:(null===(b=de[ge])||void 0===b?void 0:b.style)||"",paddingTop:Ae(e.padding.all)||Ae(e.padding.top),paddingLeft:Ae(e.padding.all)||Ae(e.padding.left),paddingRight:Ae(e.padding.all)||Ae(e.padding.right),paddingBottom:Ae(e.padding.all)||Ae(e.padding.bottom),paddingLeftRight:Ae(null===(g=e.padding)||void 0===g?void 0:g.left)||Ae(null===(x=e.padding)||void 0===x?void 0:x.right),paddingTopBottom:Ae(null===(p=e.padding)||void 0===p?void 0:p.top)||Ae(null===(A=e.padding)||void 0===A?void 0:A.bottom),borderRadiusAll:Ae(e.borderRadius.all),borderRadiusTopLeft:Ae(e.borderRadius.topLeft),borderRadiusBottomLeft:Ae(e.borderRadius.bottomLeft),borderRadiusTopRight:Ae(e.borderRadius.topRight),borderRadiusBottomRight:Ae(e.borderRadius.bottomRight),boxShadowInset:Ae(null===(f=e.boxShadow)||void 0===f?void 0:f.inset)||!1,boxShadowHOffset:Ae(null===(v=e.boxShadow)||void 0===v?void 0:v.hOffset),boxShadowVOffset:Ae(null===(_=e.boxShadow)||void 0===_?void 0:_.vOffset),boxShadowBlurRadius:Ae(null===(S=e.boxShadow)||void 0===S?void 0:S.blurRadius),boxShadowSpreadRadius:Ae(null===(w=e.boxShadow)||void 0===w?void 0:w.spreadRadius),boxShadowColor:Ae(null===(P=e.boxShadow)||void 0===P?void 0:P.color),mobileWidth:je(null===(N=e.mobileWidth)||void 0===N?void 0:N.value),mobileWidthDim:null===(k=e.mobileWidth)||void 0===k?void 0:k.dim,mobileHeight:je(null===(T=e.mobileHeight)||void 0===T?void 0:T.value),mobileHeightDim:null===(E=e.mobileHeight)||void 0===E?void 0:E.dim,mobileBorderPosition:pe||"all",mobileBorderWidth:null!==(null===(I=ce[pe])||void 0===I?void 0:I.width)?null===(C=ce[pe])||void 0===C?void 0:C.width:"",mobileBorderColor:(null===(L=ce[pe])||void 0===L?void 0:L.color)||"",mobileBorderStyle:(null===(O=ce[pe])||void 0===O?void 0:O.style)||"",mobileBorderRadiusAll:Ae(e.mobileBorderRadius.all),mobileRadiusTopLeft:Ae(null!==e.mobileBorderRadius.topLeft?e.mobileBorderRadius.topLeft:e.mobileBorderRadius.all),mobileRadiusBottomLeft:Ae(null!==e.mobileBorderRadius.bottomLeft?e.mobileBorderRadius.bottomLeft:e.mobileBorderRadius.all),mobileRadiusTopRight:Ae(null!==e.mobileBorderRadius.topRight?e.mobileBorderRadius.topRight:e.mobileBorderRadius.all),mobileRadiusBottomRight:Ae(null!==e.mobileBorderRadius.bottomRight?e.mobileBorderRadius.bottomRight:e.mobileBorderRadius.all),mobileBoxShadowInset:Ae(null===(D=e.mobileBoxShadow)||void 0===D?void 0:D.inset)||!1,mobileBoxShadowHOffset:Ae(null===(V=e.mobileBoxShadow)||void 0===V?void 0:V.hOffset),mobileBoxShadowVOffset:Ae(null===(M=e.mobileBoxShadow)||void 0===M?void 0:M.vOffset),mobileBoxShadowBlurRadius:Ae(null===(W=e.mobileBoxShadow)||void 0===W?void 0:W.blurRadius),mobileBoxShadowSpreadRadius:Ae(null===(H=e.mobileBoxShadow)||void 0===H?void 0:H.spreadRadius),mobileBoxShadowColor:Ae(null===(X=e.mobileBoxShadow)||void 0===X?void 0:X.color),mobileAlign:Ae(null===(z=e.mobileAlign)||void 0===z?void 0:z.value),mobileVerticalAlign:Ae(null===(G=e.mobileVerticalAlign)||void 0===G?void 0:G.value),mobileDirection:Ae(null===(U=e.mobileDirection)||void 0===U?void 0:U.value),mobileBackgroundColor:Ae("none"!==(null===(Y=e.mobileBackgroundColor)||void 0===Y?void 0:Y.value)?null===(q=e.mobileBackgroundColor)||void 0===q?void 0:q.value:""),mobileBackgroundImage:"none"!==e.mobileBackgroundImage[0].value?e.mobileBackgroundImage[0].value:"",mobileBackgroundPositionX:Ae(null===(K=e.mobileBackgroundPositionX)||void 0===K?void 0:K.value),mobileBackgroundPositionY:Ae(null===(J=e.mobileBackgroundPositionY)||void 0===J?void 0:J.value),mobileBackgroundRepeat:null!==(Q=e.mobileBackgroundRepeat)&&void 0!==Q&&Q.value?null===(Z=e.mobileBackgroundRepeat)||void 0===Z?void 0:Z.value:"none",mobilePaddingTop:Ae(e.mobilePadding.all)||Ae(e.mobilePadding.top),mobilePaddingLeft:Ae(e.mobilePadding.all)||Ae(e.mobilePadding.left),mobilePaddingRight:Ae(e.mobilePadding.all)||Ae(e.mobilePadding.right),mobilePaddingBottom:Ae(e.mobilePadding.all)||Ae(e.mobilePadding.bottom),mobilePaddingTopBottom:Ae(e.mobilePadding.top)||Ae(e.mobilePadding.bottom),mobilePaddingLeftRight:Ae(e.mobilePadding.left)||Ae(e.mobilePadding.right),exportAsPicture:null===e||void 0===e?void 0:e.exportAsPicture}),!Ae(e.borderRadius.all)&&(Ae(e.borderRadius.topLeft)||Ae(e.borderRadius.bottomLeft)||Ae(e.borderRadius.topRight)||Ae(e.borderRadius.bottomRight))?j(!1):j(!0),!Ae(e.mobileBorderRadius.all)&&(Ae(e.mobileBorderRadius.topLeft)||Ae(e.mobileBorderRadius.bottomLeft)||Ae(e.mobileBorderRadius.topRight)||Ae(e.mobileBorderRadius.bottomRight))?R(!1):R(!0),F(""===e.backgroundImage[0].value),Ae(e.padding.all)||!(Ae(e.padding.top)||Ae(e.padding.right)||Ae(e.padding.bottom)||Ae(e.padding.left))||e.padding.top===e.padding.bottom&&e.padding.right===e.padding.left?se(!0):se(!1),Ae(e.mobilePadding.all)||!(Ae(e.mobilePadding.top)||Ae(e.mobilePadding.right)||Ae(e.mobilePadding.bottom)||Ae(e.mobilePadding.left))||e.mobilePadding.top===e.mobilePadding.bottom&&e.mobilePadding.right===e.mobilePadding.left?ae(!0):ae(!1),me(!(null===($=de[ge])||void 0===$||!$.width)),ue(!(null===(ee=ce[pe])||void 0===ee||!ee.width)),be(!!e.borderRadius.all||!!e.borderRadius.topLeft||!!e.borderRadius.bottomLeft||!!e.borderRadius.topRight||!!e.borderRadius.bottomRight),xe(!!e.mobileBorderRadius.all||!!e.mobileBorderRadius.topLeft||!!e.mobileBorderRadius.bottomLeft||!!e.mobileBorderRadius.topRight||!!e.mobileBorderRadius.bottomRight),fe(!!e.boxShadow),_e(!!e.mobileBoxShadow.blurRadius||!!e.mobileBoxShadow.color||!!e.mobileBoxShadow.hOffset||!!e.mobileBoxShadow.inset||!!e.mobileBoxShadow.spreadRadius||!!e.mobileBoxShadow.vOffset),Se(!!e.width.value||!!e.height.value||!!e.minWidth.value||!!e.maxWidth.value),Pe(!!e.mobileWidth.value||!!e.mobileHeight.value),ke(!!e.backgroundColor||!!e.backgroundImage[0].value||!!e.backgroundPositionY||!!e.backgroundPositionX||"repeat"!==e.backgroundRepeat||!e.backgroundRepeat),Ee(!!e.mobileBackgroundColor.value),Ce(!!e.exportAsPicture),Fe(!(null===(oe=e.padding)||void 0===oe||!oe.all)||!(null===(te=e.padding)||void 0===te||!te.top)||!(null===(ie=e.padding)||void 0===ie||!ie.bottom)||!(null===(le=e.padding)||void 0===le||!le.left)||!(null===(re=e.padding)||void 0===re||!re.right)),We(!!e.mobilePadding.all||!!e.mobilePadding.top||!!e.mobilePadding.bottom||!!e.mobilePadding.left||!!e.mobilePadding.right)}}),[l,e]);return(0,ee.jsxs)(u.A,{form:l,layout:"vertical",name:"selected_div_form",initialValues:{backgroundColor:"",backgroundImage:"",backgroundPositionX:"",backgroundPositionY:"",backgroundRepeat:"",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),r=Object.keys(o)[0];let a;switch(Xe("%"===l.getFieldsValue(!0).widthDim?100:""),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]:{...s[i.borderPosition],style:o[r]}}},"all"===i.borderPosition?d((e=>({...Z.iV,[i.borderPosition]:{...e[i.borderPosition],style:o[r]}}))):d((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],style:o[r]}})));break;case"borderColor":a={border:{[i.borderPosition]:{...s[i.borderPosition],color:o[r]}}},"all"===i.borderPosition?d((e=>({...Z.iV,[i.borderPosition]:{...e[i.borderPosition],color:o[r]}}))):d((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],color:o[r]}})));break;case"borderWidth":a={border:{[i.borderPosition]:{...s[i.borderPosition],width:o[r]}}},"all"===i.borderPosition?d((e=>({...Z.iV,[i.borderPosition]:{...e[i.borderPosition],width:o[r]}}))):d((e=>({...e,[i.borderPosition]:{...e[i.borderPosition],width:o[r]}})));break;case"borderPosition":l.setFieldsValue({borderWidth:s[o[r]].width||"",borderColor:s[o[r]].color||"",borderStyle:s[o[r]].style||""});break;case"width":a={[r]:{value:o[r],dim:i.widthDim}};break;case"height":a={[r]:{value:o[r],dim:i.heightDim}};break;case"widthDim":a={width:{value:i.width,dim:o[r]}};break;case"heightDim":a={height:{value:i.height,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":F(""===o[r]),a={[r]:[{...e.backgroundImage[0],value:o[r]}]};break;case"paddingTop":case"paddingLeft":case"paddingRight":case"paddingBottom":a={padding:{[co[r]]:+o[r]}};break;case"paddingTopBottom":a={padding:{top:+o[r],bottom:+o[r]}},i.paddingTop=i.paddingBottom=+o[r];break;case"paddingLeftRight":a={padding:{left:+o[r],right:+o[r]}},i.paddingLeft=i.paddingRight=+o[r];break;case"borderRadiusAll":case"borderRadiusTopLeft":case"borderRadiusBottomLeft":case"borderRadiusTopRight":case"borderRadiusBottomRight":a={borderRadius:{[Z.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"mobileHeight":a={[r]:{classNamePrefix:"em-mob-height-",value:o[r],dim:i.mobileHeightDim}};break;case"mobileHeightDim":a={mobileHeight:{classNamePrefix:"em-mob-height-",value:i.mobileHeight,dim:o[r]}};break;case"mobileBorderStyle":a={mobileBorder:{[i.mobileBorderPosition]:{...v[i.mobileBorderPosition],style:o[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?B((e=>({...Z.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:o[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):B((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],style:o[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderColor":a={mobileBorder:{[i.mobileBorderPosition]:{...v[i.mobileBorderPosition],color:o[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?B((e=>({...Z.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:o[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):B((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],color:o[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderWidth":a={mobileBorder:{[i.mobileBorderPosition]:{...v[i.mobileBorderPosition],width:o[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}},"all"===i.mobileBorderPosition?B((e=>({...Z.iV,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:o[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}}))):B((e=>({...e,[i.mobileBorderPosition]:{...e[i.mobileBorderPosition],width:o[r],classNamePrefix:"em-mob-border_"+i.mobileBorderPosition+"-"}})));break;case"mobileBorderPosition":l.setFieldsValue({mobileBorderWidth:v[o[r]].width||"",mobileBorderColor:v[o[r]].color||"",mobileBorderStyle:v[o[r]].style||""});break;case"mobileBorderRadiusAll":case"mobileRadiusTopLeft":case"mobileRadiusBottomLeft":case"mobileRadiusTopRight":case"mobileRadiusBottomRight":a={mobileBorderRadius:{[uo[r]]:o[r],classNamePrefix:"em-mob-border_radius_"+uo[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"mobileAlign":a={[r]:{classNamePrefix:"em-mob-text_align-",value:o[r]}};break;case"mobileVerticalAlign":a={[r]:{classNamePrefix:"em-mob-vertical_align-",value:o[r]}};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"mobilePaddingTop":case"mobilePaddingLeft":case"mobilePaddingRight":case"mobilePaddingBottom":a={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[r],a={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[r],a={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":a={[r]:{classNamePrefix:"em-mob-direction-",value:o[r]}};break;default:a=o}"borderPosition"!==r&&t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:a})},autoComplete:"off",className:"element-controls",children:[!ie&&(0,ee.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,ee.jsx)(g.A,{className:"selected_form-mobile-props-title",message:o("Appearance on mobile devices"),type:"info"})}),P===Z.ND&&C.styles?(0,ee.jsx)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",children:(0,ee.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[(0,ee.jsxs)(x.A,{gutter:20,style:{paddingBottom:4},children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(Oe.A,{form:l,elementSettings:e,imgParent:!0})}),(0,ee.jsx)(p.A,{span:12,style:{textAlign:"right"},children:(0,ee.jsx)(oe,{form:l,elementSettings:e})})]}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),L.formCellFieldPaddingsEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Padding")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{We((e=>!e)),Me&&(o.mobilePaddingLeftRight="",o.mobilePaddingLeft="",o.mobilePaddingRight="",o.mobilePaddingTopBottom="",o.mobilePaddingTop="",o.mobilePaddingBottom="",t({operation:Z.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,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),Me&&(0,ee.jsx)(x.A,{gutter:10,style:{paddingBottom:4},children:(0,ee.jsx)(ee.Fragment,{children:(0,ee.jsx)($e.A,{form:l,elementSettings:e,mobilePaddingsExt:re,setMobilePaddingsExt:ae})})})]}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Size")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{setTimeout((()=>{Pe((e=>!e))}))},children:ye?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),ye&&(0,ee.jsxs)(x.A,{gutter:10,style:{paddingBottom:8},children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)("div",{style:{marginBottom:2*W.formItemMarginBottomXS},children:(0,ee.jsx)(z.A,{form:l,name:"mobileWidth",elementSettings:e})})}),(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)("div",{style:{marginBottom:W.formItemMarginBottomXS},children:(0,ee.jsx)(G.A,{form:l,name:"mobileHeight",elementSettings:e})})})]}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Background")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{Ee((e=>!e)),o.mobileBackgroundColor=Te?"":"#E5E5E5",t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBackgroundColor:{classNamePrefix:"em-mob-background_color-",value:o.mobileBackgroundColor}}})}))},children:Te?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),Te&&(0,ee.jsx)("div",{style:{marginBottom:(L.formDivFieldBackgroundImageEnabled,W.formItemMarginBottomMD+4)},children:(0,ee.jsx)(De.A,{form:l,elementSettings:e,label:o("Background color")})}),!1,L.formFieldBorderEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Borders")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{ue((e=>!e)),ce&&(o.mobileBorderWidth=null,o.mobileBorderColor="",o.mobileBorderStyle=""),B((e=>({...Z.iV,[o.mobileBorderPosition]:{...e[o.mobileBorderPosition],width:o.mobileBorderWidth,color:o.mobileBorderColor,style:o.mobileBorderStyle}}))),t({operation:Z.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:ce?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),ce&&(0,ee.jsx)("div",{style:{paddingBottom:4},children:(0,ee.jsx)(U.A,{mobileBorders:v})})]}),L.formFieldBorderRadiusEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Border radius")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{xe((e=>!e)),o.mobileBorderRadiusAll=ge?null:5,t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{mobileBorderRadius:{all:o.mobileBorderRadiusAll,classNamePrefix:"em-mob-border_radius_all-"}}})}))},children:ge?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),ge&&(0,ee.jsx)("div",{style:{paddingBottom:4},children:(0,ee.jsx)(Y.A,{form:l,oneMobileBorderRadiusValue:w,setOneMobileBorderRadiusValue:R})})]}),L.formFieldBoxShadowEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Box shadow")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{_e((e=>!e)),je?(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:Z.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:je?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),je&&(0,ee.jsx)("div",{style:{paddingBottom:4},children:(0,ee.jsx)(q.A,{mobileBoxShadow:S,form:l,elementSettings:e})})]}),L.formFieldVisibilityEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Display control & Direction")}),(0,ee.jsxs)(x.A,{gutter:20,style:{paddingBottom:4},children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(te.A,{elementSettings:e,form:l})}),(0,ee.jsx)(p.A,{span:12,style:{textAlign:"right"},children:(0,ee.jsx)(oo,{elementSettings:e,form:l})})]})]}),L.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,ee.jsx)(x.A,{gutter:20,style:{marginBottom:4},children:(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(Re.A,{})})})]})]})}):(0,ee.jsxs)("div",{id:"selected_element_form_desktop_props",children:[(0,ee.jsx)(g.A,{className:"selected_form-desktop-props-title",message:o("Appearance on mobile devices"),type:"info"}),(0,ee.jsxs)("div",{className:"selected_form-props-wrapper",children:[(0,ee.jsxs)(x.A,{gutter:20,style:{marginBottom:4},children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(Ze.A,{form:l,elementSettings:e})}),(0,ee.jsx)(p.A,{span:12,style:{textAlign:"right"},children:(0,ee.jsx)(H.A,{form:l,elementSettings:e})})]}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),L.formCellFieldPaddingsEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Padding")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{Fe((e=>!e)),Le&&(o.paddingLeftRight="",o.paddingLeft="",o.paddingRight="",o.paddingTopBottom="",o.paddingTop="",o.paddingBottom="",t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{padding:{all:0}}}))}))},children:Le?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),Le&&(0,ee.jsx)(x.A,{gutter:10,style:{marginBottom:4},children:(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsxs)(p.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"},children:[(0,ee.jsx)("div",{className:"padding-collapsed",style:{display:le?"block":"none"},children:(0,ee.jsx)(b.A,{title:o("Horizontal padding"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"paddingLeftRight",children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Horizontal"),prefix:(0,ee.jsx)(Q.A,{icon:"PaddingLeftRight"}),addonAfter:"px"})})})}),(0,ee.jsxs)("div",{className:"padding-extended",style:{display:le?"none":"block"},children:[(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Left padding"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"paddingLeft",style:{marginBottom:W.formItemMarginBottomXS},children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Left"),prefix:(0,ee.jsx)(Q.A,{icon:"PaddingLeft"}),addonAfter:"px"})})}),(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Right padding"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"paddingRight",children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Right"),prefix:(0,ee.jsx)(Q.A,{icon:"PaddingRight"}),addonAfter:"px"})})})]})]}),(0,ee.jsxs)(p.A,{span:10,style:{width:156,flex:"auto",maxWidth:"none"},children:[(0,ee.jsx)("div",{className:"padding-collapsed",style:{display:le?"block":"none"},children:(0,ee.jsx)(b.A,{title:o("Vertical padding"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"paddingTopBottom",children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Vertical"),prefix:(0,ee.jsx)(Q.A,{icon:"PaddingTopBottom"}),addonAfter:"px"})})})}),(0,ee.jsxs)("div",{className:"padding-extended",style:{display:le?"none":"block"},children:[(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Top padding"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"paddingTop",style:{marginBottom:W.formItemMarginBottomXS},children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Top"),prefix:(0,ee.jsx)(Q.A,{icon:"PaddingTop"}),addonAfter:"px"})})}),(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Bottom padding"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"paddingBottom",children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Bottom"),prefix:(0,ee.jsx)(Q.A,{icon:"PaddingBottom"}),addonAfter:"px"})})})]})]}),(0,ee.jsx)(p.A,{span:4,style:{width:45,flex:"auto",maxWidth:"none"},children:(0,ee.jsx)(b.A,{title:o("Individual padding"),placement:"bottom",children:(0,ee.jsx)(f.Ay,{className:r()("selected-td-form__button",{"selected-td-form__button--active":!le}),onClick:()=>{se((e=>!e));const o=l.getFieldsValue(!0);le||(o.paddingLeftRight=o.paddingLeft,o.paddingTopBottom=o.paddingTop,o.paddingRight=o.paddingLeft,o.paddingBottom=o.paddingTop,t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{padding:{top:o.paddingTopBottom,bottom:o.paddingTopBottom,left:o.paddingLeftRight,right:o.paddingLeftRight}}}))},children:(0,ee.jsx)(Q.A,{icon:"PaddingSwitcher"})})})})]})})]}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Size")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{setTimeout((()=>{Se((e=>!e))}))},children:Be?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),Be&&(0,ee.jsxs)(x.A,{gutter:10,style:{marginBottom:4},children:[(0,ee.jsxs)(p.A,{span:12,children:[(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Width"),placement:"bottom",children:(0,ee.jsxs)(u.A.Item,{name:"width",className:"form-item-margin-xs",children:[" ",(0,ee.jsx)(Ae.A,{min:0,max:He,placeholder:o("Width"),prefix:(0,ee.jsx)(N.A,{}),addonAfter:(0,ee.jsx)(u.A.Item,{name:"widthDim",noStyle:!0,children:mo})})]})}),(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Height"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"height",children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Height"),prefix:(0,ee.jsx)(k.A,{}),addonAfter:"px"})})})]}),(0,ee.jsxs)(p.A,{span:12,children:[(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Minimum width"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"minWidth",className:"form-item-margin-xs",children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Min width"),prefix:(0,ee.jsx)(Q.A,{icon:"MinWidth"}),addonAfter:(0,ee.jsx)(u.A.Item,{name:"minWidthDim",noStyle:!0,children:mo})})})}),(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Maximum width"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"maxWidth",className:"form-item-margin-xs",children:(0,ee.jsx)(Ae.A,{min:0,placeholder:o("Max width"),prefix:(0,ee.jsx)(Q.A,{icon:"MaxWidth"}),addonAfter:(0,ee.jsx)(u.A.Item,{name:"maxWidthDim",noStyle:!0,children:mo})})})})]})]}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Background")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{ke((e=>!e)),o.backgroundColor=Ne?"":"#E5E5E5",t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{backgroundColor:o.backgroundColor}})}))},children:Ne?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),Ne&&(0,ee.jsxs)(x.A,{gutter:10,style:{marginBottom:O?16:0},children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Background color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,ee.jsx)(u.A.Item,{name:"backgroundColor",style:{marginBottom:L.formDivFieldBackgroundImageEnabled?W.formItemMarginBottomXS:W.formItemMarginBottomMD+4},children:(0,ee.jsx)(ne.A,{placeholder:o("Background color"),usedColors:e.usedColors})})})}),L.formDivFieldBackgroundImageEnabled&&(0,ee.jsxs)(p.A,{span:O?12:24,children:[(0,ee.jsx)("div",{style:{paddingBottom:O?4:0},children:(0,ee.jsx)(D.A,{form:l,label:o("Background image"),name:"backgroundImage",tooltipTitle:o("Background image"),placeholder:"Background image link/route"})}),!O&&(0,ee.jsxs)(u.A.Item,{style:{marginBottom:"0"},children:[(0,ee.jsxs)(x.A,{gutter:10,children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Horizontal position"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"backgroundPositionX",style:{marginBottom:W.formItemMarginBottomXS},children:(0,ee.jsx)(_.A,{placeholder:o("Horizontal position"),prefix:(0,ee.jsx)(Q.A,{icon:"BgPositionHorizontal"})})})})}),(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Vertical position"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"backgroundPositionY",style:{marginBottom:W.formItemMarginBottomXS},children:(0,ee.jsx)(_.A,{placeholder:o("Vertical position"),prefix:(0,ee.jsx)(Q.A,{icon:"BgPositionVertical"})})})})})]}),(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Background image repeat"),placement:"left",children:(0,ee.jsx)(u.A.Item,{name:"backgroundRepeat",style:{marginBottom:W.formItemMarginBottomMD+4},children:(0,ee.jsx)(h.A,{placeholder:o("Please choose"),options:ze,getPopupContainer:()=>document.querySelector(".email-properties__collapse-panel")})})})]})]})]}),L.formFieldBorderEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Borders")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{me((e=>!e)),de&&(o.borderWidth=null,o.borderColor="",o.borderStyle=""),d((e=>({...Z.iV,[o.borderPosition]:{...e[o.borderPosition],width:o.borderWidth,color:o.borderColor,style:o.borderStyle}}))),t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{border:{all:{color:o.borderColor,style:o.borderStyle,width:o.borderWidth}}}})}))},children:de?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),de&&(0,ee.jsx)("div",{style:{paddingBottom:4},children:(0,ee.jsx)(V.A,{borders:s})})]}),L.formFieldBorderRadiusEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Border radius")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{be((e=>!e)),o.borderRadiusAll=he?0:5,t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{borderRadius:{all:o.borderRadiusAll}}})}))},children:he?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),he&&(0,ee.jsx)("div",{style:{paddingBottom:4},children:(0,ee.jsx)(M.A,{form:l,oneBorderRadiusValue:c,setOneBorderRadiusValue:j,elementSettings:e})})]}),L.formFieldBoxShadowEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Box shadow")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{fe((e=>!e)),pe?(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:Z.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:pe?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),pe&&(0,ee.jsx)("div",{style:{paddingBottom:4},children:(0,ee.jsx)(X.A,{boxShadow:n})})]}),L.formFieldExportAsPictureEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsxs)(x.A,{gutter:10,align:"middle",children:[(0,ee.jsx)(p.A,{span:20,children:(0,ee.jsx)("div",{className:"form-group-title",children:o("Export settings")})}),(0,ee.jsx)(p.A,{span:4,align:"right",children:(0,ee.jsx)(f.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{const o=l.getFieldsValue(!0);setTimeout((()=>{Ce((e=>!e)),Ie&&(o.exportAsPicture=!1,t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:{exportAsPicture:!1}}))}))},children:Ie?(0,ee.jsx)(E.A,{}):(0,ee.jsx)(T.A,{})})})]}),Ie&&(0,ee.jsx)(Ve,{form:l,elementSettings:e})]}),L.formFieldVisibilityEnabled&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Display control & Direction")}),(0,ee.jsxs)(x.A,{gutter:20,style:{paddingBottom:4},children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(te.A,{elementSettings:e,form:l})}),(0,ee.jsx)(p.A,{span:12,style:{textAlign:"right"},children:(0,ee.jsx)(Qe,{elementSettings:e,form:l})})]})]}),L.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,ee.jsx)(x.A,{gutter:20,style:{marginBottom:4},children:(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(Re.A,{})})})]})]})]})]})};var go=t(28777);const{Option:xo}=h.A,po=(0,ee.jsxs)(h.A,{className:"select-after",getPopupContainer:e=>e.parentNode,children:[(0,ee.jsx)(xo,{value:"px",children:"px"}),(0,ee.jsx)(xo,{value:"%",children:"%"})]}),Ao=(0,ee.jsx)(h.A,{className:"select-after",getPopupContainer:e=>e.parentNode,children:(0,ee.jsx)(xo,{value:"px",children:"px"})});let fo=0;const jo=({elementSettings:e})=>{const{__:o}=(0,I.s9)(),t=(0,$.XW)(),[l]=u.A.useForm(),s=(0,a.d4)(we.Ct),r=(0,a.d4)(we.CS),d=(0,a.d4)(we.Fv),n=(0,a.d4)(we.yy),m=(0,ve.rD)(),c=d&&"bottom"!==n;(0,i.useEffect)((()=>{const o=e=>e&&"auto"!==e?e:0===e?"0":"";var t,i,s,r,a,d,n,m,c,u,h,b,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===(s=e.gap)||void 0===s?void 0:s.value,gapDim:null===(r=e.gap)||void 0===r?void 0:r.dim,maxWidth:null===(a=e.maxWidth)||void 0===a?void 0:a.value,maxWidthDim:null===(d=e.maxWidth)||void 0===d?void 0:d.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===(h=e.mobileContentWidth)||void 0===h?void 0:h.value),mobileContentWidthDim:null===(b=e.mobileContentWidth)||void 0===b?void 0:b.dim,mobileVerticalAlign:(x=null===(g=e.mobileVerticalAlign)||void 0===g?void 0:g.value,x||(0===x?"0":""))}),fo=e.width.value+e.gap.value)}),[l,e]);return(0,ee.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),s=Object.keys(o)[0];let r;switch(s){case"width":fo=o[s]+i.gap,r={[s]:{value:o[s],dim:i.widthDim},gap:{value:i.gap}};break;case"widthDim":r={width:{value:i.width,dim:o[s]},gap:{value:i.gap}};break;case"gap":i.width=fo-o[s],r={[s]:{value:o[s],dim:"px"}};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"mobileContentWidth":r={[s]:{classNamePrefix:"em-mob-width-",value:o[s],dim:i.mobileContentWidthDim}};break;case"mobileContentWidthDim":r={mobileContentWidth:{classNamePrefix:"em-mob-width-",value:i.mobileContentWidth,dim:o[s]}};break;case"mobileVerticalAlign":r={[s]:{classNamePrefix:"em-mob-vertical_align-",value:o[s]}};break;default:r=o}t({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:r})},autoComplete:"off",className:"element-controls",children:[c&&(0,ee.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,ee.jsx)(g.A,{className:"selected_form-mobile-props-title",message:o("Appearance on mobile devices"),type:"info"})}),s===Z.ND&&r.styles?(0,ee.jsxs)("div",{id:"selected_element_form_mobile_props",className:"selected_form-mobile-props",style:{display:s===Z.ND&&r.styles?"block":"none"},children:[(0,ee.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,ee.jsx)(g.A,{className:"selected_form-mobile-props-title",message:o("Appearance on mobile devices"),type:"info"})}),(0,ee.jsxs)("div",{className:"selected_form-mobile-props-wrapper",children:[(0,ee.jsxs)(x.A,{gutter:10,style:{marginBottom:20},children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(z.A,{form:l,name:"mobileWidth",elementSettings:e})}),(0,ee.jsx)(p.A,{span:12})]}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Alignments")}),(0,ee.jsx)(oe,{form:l,elementSettings:e}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Display control")}),(0,ee.jsx)(te.A,{elementSettings:e,form:l}),m.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,ee.jsx)(Re.A,{})]})]})]}):(0,ee.jsx)("div",{id:"selected_element_form_desktop_props",children:(0,ee.jsxs)("div",{className:"selected_form-props-wrapper",children:[(0,ee.jsx)(u.A.Item,{style:{marginBottom:"0"},children:(0,ee.jsxs)(x.A,{gutter:10,children:[(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Float block width"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"width",children:(0,ee.jsx)(se.A,{min:0,placeholder:o("Float block width"),prefix:(0,ee.jsx)(N.A,{}),addonAfter:(0,ee.jsx)(u.A.Item,{name:"widthDim",noStyle:!0,children:po})})})})}),(0,ee.jsx)(p.A,{span:12,children:(0,ee.jsx)(b.A,{trigger:["hover"],title:o("Column gap"),placement:"bottom",children:(0,ee.jsx)(u.A.Item,{name:"gap",children:(0,ee.jsx)(se.A,{min:0,placeholder:o("Column gap"),prefix:(0,ee.jsx)(go.A,{}),addonAfter:(0,ee.jsx)(u.A.Item,{name:"widthDim",noStyle:!0,children:Ao})})})})})]})}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Vertical alignment")}),(0,ee.jsx)(H.A,{form:l,elementSettings:e}),(0,ee.jsx)(A.A,{className:"selected-td-form__divider"}),(0,ee.jsx)("div",{className:"form-group-title",children:o("Display control")}),(0,ee.jsx)(te.A,{elementSettings:e,form:l}),m.formFieldAmpVisibilityEnabled&&e.ampShow&&(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)("div",{className:"form-group-title",children:o("Amp visibility")}),(0,ee.jsx)(Re.A,{})]})]})})]})};var vo=t(79907),_o=t(28372);const Bo=({elementSettings:e})=>{const{__:o}=(0,I.s9)(),[t]=u.A.useForm(),{TextArea:l}=_.A,s=(0,$.XW)();(0,i.useEffect)((()=>{e&&t.setFieldsValue({...e})}),[t,e]);return(0,ee.jsx)(u.A,{form:t,layout:"vertical",name:"selected_variable_form",initialValues:{value:""},onValuesChange:o=>{s({operation:Z.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:e.type,settings:o})},autoComplete:"off",children:(0,ee.jsx)("div",{className:"selected_form-props-wrapper",children:(0,ee.jsx)(u.A.Item,{label:o("Variable value"),name:"value",tooltip:{title:o("Type the output parameters of your platform. E.g., ")+"${Recipient.FirstName}",icon:(0,ee.jsx)(_o.A,{})},style:{marginBottom:35},children:(0,ee.jsx)(l,{rows:4,placeholder:o("Variable value")})})})})},So=({className:e,emailElementType:o})=>{const t=(0,a.wA)(),s=(0,je.Cb)(),m=(0,a.d4)(d.qX),c=(0,a.d4)(n.qX),u=o===Z.Tm?m:c,[h,b]=(0,i.useState)(u);(0,i.useEffect)((()=>{b(u)}),[u]);(0,_e.A)((e=>{const o=e.data.operation,i=e.data.action;if(o===Z.Ru.APPLICATION_ACTION){function l(e,o=null){const i={[e]:o||!h[e]};s(i,h.type),t((0,d.G_)(i)),b((e=>({...e,...i})))}"toggle_strong"===i&&l("textStrong"),"toggle_italic"===i&&l("textItalic"),"toggle_underline"===i&&l("textUnderline"),"toggle_strikethrough"===i&&l("textStrikethrough"),"textAlign_left"===i&&l("textAlign","left"),"textAlign_right"===i&&l("textAlign","right"),"textAlign_center"===i&&l("textAlign","center")}}));const g=(0,i.useRef)(),x=(0,a.d4)(we.B);return(0,ee.jsx)(l.A,{nodeRef:g,in:x===Z.yI,timeout:300,classNames:"transition",children:(0,ee.jsxs)("div",{ref:g,className:r()("selected-element-panel-content",{[e]:e}),children:[u.type===Z.bV.IMG&&(0,ee.jsx)(Te,{elementSettings:u}),u.type===Z.bV.COUNTDOWN&&(0,ee.jsx)(Te,{elementSettings:u}),u.type===Z.bV.VIDEO&&(0,ee.jsx)(Te,{elementSettings:u}),u.type===Z.bV.TEXT&&(0,ee.jsx)(Fe,{elementSettings:u}),u.type===Z.bV.LINK&&(0,ee.jsx)(Ue,{elementSettings:u})," ",u.type===Z.bV.TABLE&&(0,ee.jsx)(ze,{elementSettings:u}),(u.type===Z.bV.TD||u.type===Z.bV.STRUCTURE||u.type===Z.bV.GROUP||u.type===Z.bV.COLUMN)&&(0,ee.jsx)(ao,{elementSettings:u}),u.type===Z.bV.VAR&&(0,ee.jsx)(Bo,{elementSettings:u}),u.type===Z.bV.BUTTON&&(0,ee.jsx)(vo.A,{elementSettings:u}),u.type===Z.bV.DIV&&(0,ee.jsx)(bo,{elementSettings:u}),u.type===Z.bV.VINDENT&&(0,ee.jsx)(Ye,{elementSettings:u}),u.type===Z.bV.FLOAT_BLOCK&&(0,ee.jsx)(jo,{elementSettings:u})]})})};So.defaultProps={className:null};const yo=So},46929:(e,o,t)=>{t.d(o,{A:()=>z});var i=t(92810),l=t(95838),s=t(81662),r=t(2018),a=t(7744),d=t(71086),n=t(12280),m=t(43005),c=t(4800),u=t(79579),h=t(66726),b=t(55039),g=t(7166),x=t(28348),p=t(6391),A=t(69372),f=t(40886),j=t(14461),v=t(7228),_=t(9588),B=t(37517),S=t(73035),y=t(27071),w=t(9038),R=t(23287),P=t(38883),N=t.n(P),k=t(73721),T=t(68031),E=t(44997),I=t(88296),C=t(26238),L=t(62303),O=t(85163),F=t(45695),D=t(56991),V=t(64037),M=t(45934),W=t(18398),H=t(70082);const{useToken:X}=l.A,z=({form:e,elementSettings:o,showAddParagraph:t=!0,isButton:l=!1,linkProtocol:P,setLinkProtocol:z,linkTarget:G})=>{const{__:U}=(0,R.s9)(),{token:Y}=X(),q=(0,F.XW)(),K=(0,F.K9)(),J=(0,i.useRef)(),Q=(0,i.useRef)(null),Z=(0,i.useRef)(null),[$,ee]=(0,i.useState)(!1),[oe,te]=(0,i.useState)(null),[ie,le]=(0,i.useState)({start:0,end:0}),[se,re]=(0,i.useState)(!1);(0,V.A)((e=>{e.data.operation===O.Ru.APPLICATION_FOCUS_IN_IFRAME&&te(null)}));const[ae,de]=(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")&&de(!0)}),[]);const ne=(0,i.useRef)(null),me=e=>{q({operation:O.Ru.SANDBOX_ELEMENT_TEXT,action:e,locale:"ru_RU"})},ce=[{key:"1",label:U("This element"),onClick:()=>me("typograf")},{key:"2",label:U("The whole email"),onClick:()=>me("typograf_all")}],[ue,he]=(0,i.useState)(),[be,ge]=(0,i.useState)(!1);(0,i.useEffect)((()=>{o.linkHref&&("https://"===o.linkHref.substring(0,8)||"http://"===o.linkHref.substring(0,7)?z("https://"):"mailto:"===o.linkHref.substring(0,7)?z("mailto:"):"tel:"===o.linkHref.substring(0,4)?z("tel:"):"sms:"===o.linkHref.substring(0,4)?z("sms:"):"ftp://"===o.linkHref.substring(0,6)?z("ftp://"):"skype:"===o.linkHref.substring(0,6)?z("skype:"):"viber:"===o.linkHref.substring(0,6)?z("viber:"):z("")),e.setFieldsValue({linkHref:o.linkHref?o.linkHref:"https://"})}),[e,o,z]);const xe=(0,M.d4)(W.GH);(0,i.useEffect)((()=>{var e;null!==xe&&void 0!==xe&&null!==(e=xe.items)&&void 0!==e&&e.length&&he((0,D.cM)(xe.items,U,((e,o)=>{ge(!1),K(O.Ru.SANDBOX_ADD_MERGETAG,e),o.stopPropagation(),o.preventDefault()})))}),[xe,he,U,ge,K]);const pe=(0,H.jsx)(s.A,{style:{width:90,textAlign:"left"},value:P,onChange:o=>{e.getFieldsValue(!0).linkHref="mergetag"!==o?o:"",z(o)},getPopupContainer:e=>e.parentNode,options:[{value:"https://",label:U("Site")},{value:"mailto:",label:U("E-mail")},{value:"tel:",label:U("Phone")},{value:"sms:",label:U("SMS")},{value:"ftp://",label:U("File")},{value:"skype:",label:U("Skype")},{value:"viber:",label:U("Viber")},{value:"",label:U("Other")}]});(0,i.useEffect)((()=>{be&&ne.current&&ne.current.focus()}),[be]),(0,i.useEffect)((()=>{const e=({target:e})=>{e.closest('[id="merge_tags_wrapper"]')||te(e)},o=({target:e})=>{e.closest(".merge-tags")||e.closest("#merge_tags_button")||ge(!1)};return window.addEventListener("focusin",e),window.addEventListener("click",o),()=>{window.removeEventListener("focusin",e),window.addEventListener("click",o)}}),[]);const Ae=(0,i.useCallback)((({target:e})=>{if(e&&!se){const{selectionStart:o,selectionEnd:t}=e;le({start:o,end:t})}re(!1)}),[se]);(0,i.useEffect)((()=>Ae({target:G})),[G,Ae]);const fe=(e,t)=>{const i=document.getElementById(t);if(i){var l,s;const r=null===(l=i.value)||void 0===l?void 0:l.substring(0,ie.start),a=null===(s=i.value)||void 0===s?void 0:s.substring(ie.end),d=t.substring(t.lastIndexOf("_")+1);q({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:{[d]:r+e+a}}),i.focus(),setTimeout((()=>{i.selectionStart=ie.start,i.selectionEnd=ie.start+e.length}),400),re(!0)}};return(0,i.useEffect)((()=>{var t;const i=e.getFieldValue("textReplacer");ee(!(null===(t=o.textReplacer)||void 0===t||!t.length)||!(null===i||void 0===i||!i.length))}),[o,e]),(0,H.jsxs)(H.Fragment,{children:[t&&!o.showOnMobile&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(r.A,{gutter:20,style:{paddingBottom:4},children:(0,H.jsx)(a.A,{span:12,gutter:20,children:(0,H.jsx)(T.A,{form:e,elementSettings:o,name:"textAlign"})})}),(0,H.jsx)(d.A,{className:"selected-td-form__divider",style:{marginBottom:20}})]}),o.showOnMobile&&(0,H.jsx)(d.A,{className:"selected-td-form__divider",style:{marginBottom:20}}),(0,H.jsxs)(r.A,{gutter:10,children:[(0,H.jsx)(a.A,{span:12,children:(0,H.jsx)(n.A.Item,{name:"AddImage",style:{marginBottom:Y.formItemMarginBottomXS},children:(0,H.jsx)(m.Ay,{icon:(0,H.jsx)(L.A,{icon:"AddImage"}),onClick:()=>me("add_img"),style:{width:"100%"},children:U("Add image")})})}),(0,H.jsx)(a.A,{span:12,children:(0,H.jsx)(n.A.Item,{name:"Typography",style:{marginBottom:Y.formItemMarginBottomXS},children:(0,H.jsx)(c.A,{arrow:!0,menu:{items:ce},trigger:["hover"],placement:"bottom",getPopupContainer:e=>e.closest(".selected-element-panel"),children:(0,H.jsx)(m.Ay,{icon:(0,H.jsx)(L.A,{icon:"Typograf"}),onClick:()=>me("typograf"),style:{width:"100%"},children:U("Typography")})})})}),ue&&(0,H.jsxs)(a.A,{span:24,id:"merge_tags_wrapper",style:{marginBottom:0},children:[(0,H.jsx)(m.Ay,{id:"merge_tags_button",icon:(0,H.jsx)(L.A,{icon:"MergeTags"}),style:{width:"100%",display:be?"none":"block"},onClick:()=>ge(!0),children:U("Merge tags")}),(0,H.jsx)(u.A,{ref:ne,popupClassName:"merge-tags",options:ue,placeholder:U("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,H.jsxs)("span",{children:[0!==t&&(0,H.jsx)("span",{children:"\xa0/\xa0"}),i.map(((o,t)=>o.toLowerCase()===e.toLowerCase()?(0,H.jsx)("span",{style:{color:"red"},children:o},t):o))]},o.value)}));return(0,H.jsx)("div",{title:o.map((e=>e.label)).join(" / "),children:t})}},spellCheck:"false",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),onChange:(t,i)=>{if(ge(!1),t){const l=xe.syntax.length>1?ue.findIndex((e=>e.key===i[0].key)):0,s=xe.syntax[l].replace("%value%",t[t.length-1]);"selected_button_form_href"===(null===oe||void 0===oe?void 0:oe.getAttribute("id"))||"selected_text_form_linkHref"===(null===oe||void 0===oe?void 0:oe.getAttribute("id"))||"selected_text_form_textReplacer"===(null===oe||void 0===oe?void 0:oe.getAttribute("id"))?fe(s,null===oe||void 0===oe?void 0:oe.getAttribute("id")):(e.setFieldValue("textReplacer",s),q({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:{textReplacer:s}}))}},style:{display:be?"block":"none",width:"100%"},open:be,onKeyDown:e=>{"Escape"===e.key&&ge(!1)}})]})]}),(0,H.jsx)(d.A,{className:"selected-td-form__divider",style:{marginBottom:o.showOnMobile?20:0,marginTop:20}}),!o.showOnMobile&&(0,H.jsx)("div",{className:"form-group-title",children:U("Text")}),(0,H.jsx)(h.A,{trigger:["hover"],title:U("Text font"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,H.jsx)(n.A.Item,{name:"fontFamily",className:"form-item-margin-xs",children:(0,H.jsx)(I.A,{textEditor:!0})})}),!o.showOnMobile&&(0,H.jsxs)(r.A,{gutter:10,children:[(0,H.jsx)(a.A,{span:12,children:(0,H.jsx)(h.A,{trigger:["hover"],title:U("Font size"),placement:"bottom",children:(0,H.jsx)(n.A.Item,{name:"fontSize",children:(0,H.jsx)(E.A,{min:0,placeholder:U("Font size"),prefix:(0,H.jsx)(g.A,{}),addonAfter:"px"})})})}),(0,H.jsx)(a.A,{span:12,children:(0,H.jsx)(h.A,{trigger:["hover"],title:U("Line height"),placement:"bottom",children:(0,H.jsx)(n.A.Item,{name:"lineHeight",children:(0,H.jsx)(E.A,{min:0,placeholder:U("Line height"),prefix:(0,H.jsx)(x.A,{}),addonAfter:"px"})})})})]}),(0,H.jsxs)(r.A,{gutter:10,children:[(0,H.jsx)(a.A,{span:3,children:(0,H.jsx)(k.A,{form:e,elementSettings:o,name:"textStrong",tooltipTitle:U(ae?"Strong ( \u2318B )":"Strong ( Ctrl+B )"),icon:(0,H.jsx)(p.A,{className:"selected-text-common-form__icon-radius"})})}),(0,H.jsx)(a.A,{span:3,children:(0,H.jsx)(k.A,{form:e,elementSettings:o,name:"textItalic",tooltipTitle:U(ae?"Italic ( \u2318I )":"Italic ( Ctrl+I )"),icon:(0,H.jsx)(A.A,{className:"selected-text-common-form__icon-radius"})})}),(0,H.jsx)(a.A,{span:3,children:(0,H.jsx)(k.A,{form:e,elementSettings:o,name:"textStrikethrough",tooltipTitle:U(ae?"Strikethrough ( \u2318+Shift+X )":"Strikethrough ( Alt+Shift+5 )"),icon:(0,H.jsx)(f.A,{className:"selected-text-common-form__icon-radius"})})}),(0,H.jsx)(a.A,{span:3,children:(0,H.jsx)(k.A,{form:e,elementSettings:o,name:"textUnderline",tooltipTitle:U(ae?"Underline ( \u2318U )":"Underline ( Ctrl+U )"),icon:(0,H.jsx)(j.A,{className:"selected-text-common-form__icon-radius"})})}),t&&(0,H.jsx)(a.A,{span:3,children:(0,H.jsx)(k.A,{form:e,className:N()("selected-text-common-form__button selected-text-common-form__button_style",{"selected-text-common-form__button--active":"string"===typeof o.linkHref}),elementSettings:o,name:"textLink",tooltipTitle:U("Link"),icon:(0,H.jsx)(v.A,{className:"selected-text-common-form__icon-radius"})})}),l&&(0,H.jsx)(a.A,{span:12,children:(0,H.jsx)(h.A,{trigger:["hover"],title:U("Text color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,H.jsx)(n.A.Item,{name:"textColor",rules:[{message:U("Please set the font color")}],children:(0,H.jsx)(C.A,{placeholder:U("Color"),usedColors:o.usedColors})})})}),!l&&(0,H.jsx)(a.A,{span:3,children:(0,H.jsx)(h.A,{title:U("Text replacer"),placement:"bottom",getPopupContainer:e=>e.closest(".email-pane__collapse-wrapper"),children:(0,H.jsx)(m.Ay,{className:N()("selected-td-form__button ant-form-item",{"selected-td-form__button--active":$}),icon:(0,H.jsx)(L.A,{icon:"Replacer",className:"selected-td-form__icon-radius"}),onClick:()=>{ee(!$),$?(e.setFieldValue("textReplacer",""),q({operation:O.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:o.type,settings:{textReplacer:""}})):setTimeout((()=>Q.current.focus()))},ref:Z})})})]}),t&&"string"===typeof o.linkHref&&(0,H.jsx)(h.A,{trigger:["hover"],title:U("The URL that the hyperlink directs to."),placement:"bottom",children:(0,H.jsx)(n.A.Item,{name:"linkHref",children:(0,H.jsx)(b.A,{ref:J,addonBefore:pe,allowClear:!0,placeholder:U("Hyperlink URL"),autoFocus:null===o||void 0===o?void 0:o.isNewLink,onSelect:Ae,prefix:"https://"===P&&(0,H.jsx)(v.A,{})||"mailto:"===P&&(0,H.jsx)(_.A,{})||"tel:"===P&&(0,H.jsx)(B.A,{})||"sms:"===P&&(0,H.jsx)(S.A,{})||"ftp://"===P&&(0,H.jsx)(y.A,{})||"skype:"===P&&(0,H.jsx)(w.A,{})||(0,H.jsx)(v.A,{})})})}),!l&&$&&(0,H.jsx)(h.A,{trigger:["hover"],title:U("Text"),placement:"bottom",children:(0,H.jsx)(n.A.Item,{name:"textReplacer",children:(0,H.jsx)(b.A,{placeholder:U("The code that will replace this text"),allowClear:!0,prefix:(0,H.jsx)("span",{className:"addon-text-content",children:U("Text")}),onChange:e=>{""!==e.target.value&&Z.current.classList.add("selected-td-form__button--active")},ref:Q})})}),!l&&(0,H.jsxs)(r.A,{gutter:10,style:{paddingBottom:4},children:[(0,H.jsx)(a.A,{span:12,children:(0,H.jsx)(h.A,{trigger:["hover"],title:U("Text color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,H.jsx)(n.A.Item,{name:"textColor",rules:[{message:U("Please set the font color")}],children:(0,H.jsx)(C.A,{placeholder:U("Color"),usedColors:o.usedColors})})})}),(0,H.jsx)(a.A,{span:12,children:(0,H.jsx)(h.A,{trigger:["hover"],title:U("Text background"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,H.jsx)(n.A.Item,{name:"textBackgroundColor",rules:[{message:U("Please set the background color")}],children:(0,H.jsx)(C.A,{placeholder:U("Background color"),usedColors:o.usedColors})})})})]})]})}},77416:(e,o,t)=>{t.d(o,{A:()=>F});var i=t(92810),l=t(64617),s=t(81e3),r=t(71086),a=t(66726),d=t(12280),n=t(4800),m=t(55039),c=t(43005),u=t(7166),h=t(28348),b=t(6391),g=t(69372),x=t(40886),p=t(14461),A=t(7228),f=t(98885),j=t(87984),v=t(73170),_=t(38587),B=t(45934),S=t(23287),y=t(73721),w=t(88296),R=t(44997),P=t(68031),N=t(62303),k=t(65983),T=t(47358),E=t(7760),I=t(85163),C=t(45695),L=t(26238),O=t(70082);const F=({form:e,elementSettings:o,showAddParagraph:t=!0,isButton:F=!1})=>{const{__:D}=(0,S.s9)(),V=(0,C.XW)(),M=(0,B.wA)(),{emailId:W}=(0,l.g)(),H=(0,B.d4)(W?k.Hs:E.gm).hasOwnProperty("type")?I.IE:I.Tm,[X,z]=(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")&&z(!0)}),[]);const G=e=>{V({operation:I.Ru.SANDBOX_ELEMENT_TEXT,action:e,locale:"ru_RU"})},U=[{key:"1",label:D("This element"),onClick:()=>G("typograf")},{key:"2",label:D("The whole email"),onClick:()=>G("typograf_all")}],[Y,q]=(0,i.useState)(o.textAlign),[K,J]=(0,i.useState)(o.linkHref),Q=e=>q(e);return(0,i.useEffect)((()=>{q(o.textAlign),J(o.linkHref)}),[o]),(0,O.jsx)("div",{className:"selected_text_common_form_mobile",children:(0,O.jsxs)(s.A,{size:"8",split:(0,O.jsx)(r.A,{type:"vertical"}),children:[(0,O.jsxs)(s.A,{size:8,className:"selected_text_common_form_mobile__group",children:[(0,O.jsx)("div",{style:{width:190},children:(0,O.jsx)(a.A,{trigger:["hover"],title:D("Text font"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,O.jsx)(d.A.Item,{name:"fontFamily",children:(0,O.jsx)(w.A,{textEditor:!0,codeMode:!0})})})}),(0,O.jsx)("div",{style:{width:90},children:(0,O.jsx)(a.A,{trigger:["hover"],title:D("Font size"),placement:"bottom",children:(0,O.jsx)(d.A.Item,{name:"fontSize",children:(0,O.jsx)(R.A,{min:0,placeholder:D("Font size"),prefix:(0,O.jsx)(u.A,{}),addonAfter:"px"})})})}),(0,O.jsx)("div",{style:{width:90},children:(0,O.jsx)(a.A,{trigger:["hover"],title:D("Line height"),placement:"bottom",children:(0,O.jsx)(d.A.Item,{name:"lineHeight",children:(0,O.jsx)(R.A,{min:0,placeholder:D("Line height"),prefix:(0,O.jsx)(h.A,{}),addonAfter:"px"})})})})]}),(0,O.jsxs)(s.A,{size:8,className:"selected_text_common_form_mobile__group",children:[(0,O.jsx)(y.A,{form:e,elementSettings:o,name:"textStrong",tooltipTitle:D(X?"Strong ( \u2318B )":"Strong ( Ctrl+B )"),icon:(0,O.jsx)(b.A,{className:"selected-td-form__icon-radius"})}),(0,O.jsx)(y.A,{form:e,elementSettings:o,name:"textItalic",tooltipTitle:D(X?"Italic ( \u2318I )":"Italic ( Ctrl+I )"),icon:(0,O.jsx)(g.A,{className:"selected-td-form__icon-radius"})}),(0,O.jsx)(y.A,{form:e,elementSettings:o,name:"textStrikethrough",tooltipTitle:D(X?"Strikethrough ( \u2318+Shift+X )":"Strikethrough ( Alt+Shift+5 )"),icon:(0,O.jsx)(x.A,{className:"selected-td-form__icon-radius"})}),(0,O.jsx)(y.A,{form:e,elementSettings:o,name:"textUnderline",tooltipTitle:D(X?"Underline ( \u2318U )":"Underline ( Ctrl+U )"),icon:(0,O.jsx)(p.A,{className:"selected-td-form__icon-radius"})})]}),(0,O.jsxs)(s.A,{size:8,className:"selected_text_common_form_mobile__group",children:[(0,O.jsx)(a.A,{trigger:["hover"],title:D("Text color"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,O.jsx)(d.A.Item,{name:"textColor",rules:[{message:D("Please set the font color")}],children:(0,O.jsx)(L.A,{placeholder:D("Color"),usedColors:o.usedColors,codeMode:!0})})}),!F&&(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(a.A,{trigger:["hover"],title:D("Text background"),placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode,children:(0,O.jsx)(d.A.Item,{name:"textBackgroundColor",rules:[{message:D("Please set the background color")}],children:(0,O.jsx)(L.A,{placeholder:D("Background color"),usedColors:o.usedColors})})})})]}),t&&(0,O.jsx)(s.A,{size:8,className:"selected_text_common_form_mobile__group",children:(0,O.jsxs)(O.Fragment,{children:["string"===typeof K?(0,O.jsx)(n.A,{arrow:!0,dropdownRender:()=>(0,O.jsx)(a.A,{trigger:["hover"],title:D("The URL that the hyperlink directs to."),placement:"bottom",children:(0,O.jsx)(d.A.Item,{name:"linkHref",children:(0,O.jsx)(m.A,{allowClear:!0,placeholder:"href",prefix:(0,O.jsx)(A.A,{}),autoFocus:null===o||void 0===o?void 0:o.isNewLink})})}),overlayClassName:"codemode-textalign-dropdown",overlayStyle:{left:520,top:52,transform:"translateX(0)",marginLeft:57},trigger:["hover"],placement:"bottom",getPopupContainer:e=>e.closest(".selected_text_common_form_mobile"),children:(0,O.jsx)("div",{children:(0,O.jsx)(y.A,{form:e,className:"selected-td-form__button selected-td-form__button_style selected-td-form__button--active",elementSettings:o,name:"textLink",icon:(0,O.jsx)(A.A,{className:"selected-td-form__icon-radius"}),showTooltip:!1})})}):(0,O.jsx)(y.A,{form:e,className:"selected-td-form__button selected-td-form__button_style",elementSettings:o,name:"textLink",tooltipTitle:D("Link"),icon:(0,O.jsx)(A.A,{className:"selected-td-form__icon-radius"})}),(0,O.jsx)(n.A,{arrow:!0,dropdownRender:()=>(0,O.jsx)(P.A,{form:e,elementSettings:o,name:"textAlign",setAlignStateHandle:Q}),overlayClassName:"codemode-textalign-dropdown",overlayStyle:{left:615,top:52,transform:"translateX(0)",marginLeft:57},trigger:["hover"],placement:"bottom",getPopupContainer:e=>e.closest(".selected_text_common_form_mobile"),children:(0,O.jsx)(c.Ay,{icon:"right"===Y?(0,O.jsx)(f.A,{}):"center"===Y?(0,O.jsx)(j.A,{}):(0,O.jsx)(v.A,{}),className:"selected-td-form__button"})})]})}),(0,O.jsxs)(s.A,{size:8,className:"selected_text_common_form_mobile__group",children:[t&&(0,O.jsx)(a.A,{trigger:["hover"],title:D("Add paragraph"),placement:"bottom",children:(0,O.jsx)(c.Ay,{icon:(0,O.jsx)(N.A,{icon:"Paragraph"}),onClick:()=>G("add_p"),className:"selected-td-form__button"})}),(0,O.jsx)(a.A,{trigger:["hover"],title:D("Add inline image"),placement:"bottom",children:(0,O.jsx)(c.Ay,{icon:(0,O.jsx)(N.A,{icon:"Image",style:{fontSize:20,verticalAlign:"text-top"}}),onClick:()=>G("add_img"),className:"selected-td-form__button"})}),(0,O.jsx)(n.A,{arrow:!0,menu:{items:U},trigger:["hover"],placement:"bottom",getPopupContainer:e=>e.closest(".selected_text_common_form_mobile"),overlayStyle:{left:750,top:52,transform:"translateX(0)",marginLeft:57},children:(0,O.jsx)(c.Ay,{icon:(0,O.jsx)(N.A,{icon:"Typograf"}),className:"selected-td-form__button"})}),(0,O.jsx)(c.Ay,{icon:(0,O.jsx)(_.A,{}),type:"icon",style:{marginLeft:26},onClick:()=>{V({operation:I.Ru.SANDBOX_ELEMENT_ACTIVE_RESET}),M((0,T.Fk)()),setTimeout((()=>{H===I.IE?M((0,E.A9)({type:null})):M((0,k.A9)({type:null}))}),300)}})]})]})})}},77019:(e,o,t)=>{t.d(o,{A:()=>k});var i=t(92810),l=t(45934),s=t(64617),r=t(95838),a=t(12280),d=t(14852),n=t(43005),m=t(55039),c=t(81662),u=t(66522),h=t(71157),b=t(28372),g=t(23287),x=t(62303),p=t(64936),A=t(86286),f=t(84568),j=t(63531),v=t(32269),_=t(85163),B=t(32411),S=t(93982),y=t(13522),w=t(56991),R=t(70082);const{useToken:P}=r.A,N=({isModalVisible:e,email:o})=>{const{__:t}=(0,g.s9)(),[r]=a.A.useForm(),N=(0,l.wA)(),{emailId:k}=(0,s.g)(),T=(0,l.d4)(A.C1),[E,I]=(0,j.lg)(),{token:C}=P(),L=(0,h.hN)(),O=(0,l.Pj)(),[F,D]=(0,i.useState)(!1),V=o.project,[M,W]=(0,f.OD)(),{data:H}=f.Nq.endpoints.getProject.select(+V)(O.getState()),{testEmails:X}=(0,w.rD)(),[z,G]=(0,i.useState)([]),[U,Y]=(0,i.useState)(!1),q=(0,S.ml)(y.A.ON_SEND_EMAIL_MODAL_ID);(0,i.useEffect)((()=>{_.EW.isPlugin&&e?q.fire(o).then((o=>{o.some((e=>!1===e))?N((0,p.Oo)()):D(e)})):D(e)}),[e,N,D,o,q]),(0,i.useEffect)((()=>{if(H&&!_.EW.isPlugin){const{owner:e,admins:o,users:t,invited_users:i}=H.members;let l=[];const s=localStorage.getItem(_.V0.em_test_emails)?JSON.parse(localStorage.getItem(_.V0.em_test_emails)):[];if(s.length&&s[V]&&s[V].map((({prevLSEmail:e})=>l.push(e))),i&&i.map((({invited_user_email:e})=>l.push(e))),t&&t.map((({user_email:e})=>l.push(e))),e&&l.push(e.user_email),o&&o.map((({user_email:e})=>l.push(e))),H.projects_test_emails){const e=H.projects_test_emails.map((({projects_test_email:e})=>e));l.push(...e)}const r=Array.from(new Set(l));l.length&&G(r.map((e=>({value:e}))))}}),[H,V]),(0,i.useEffect)((()=>{_.EW.isPlugin&&G(X.map((e=>({value:e}))))}),[X]),(0,i.useEffect)((()=>{var e;const o=localStorage.getItem(_.V0.em_test_emails);if(o&&F&&0===(null===(e=r.getFieldValue("recipients"))||void 0===e?void 0:e.length)){const e=JSON.parse(o);null!==e&&void 0!==e&&e[V]&&r.setFieldsValue({recipients:e[V]})}}),[V,F,r]),(0,i.useEffect)((()=>{r.setFieldsValue({subject:o.subject})}),[r,o.subject]);const K=(0,B.fn)();return(0,i.useEffect)((()=>{if(I.isSuccess&&U){var e;if(200!==(null===(e=I.data)||void 0===e?void 0:e.status)){var i,l;(0,v.p6)({error:{data:{code:null===(i=I.data)||void 0===i?void 0:i.code,message:null===(l=I.data)||void 0===l?void 0:l.message}}},L)}else{const e=[...new Set([...z.map((e=>e.value)),...r.getFieldValue("recipients")])];M({projectId:V,projects_test_emails:e.map((e=>({projects_test_email:e})))});const i=localStorage.getItem(_.V0.em_test_emails)?JSON.parse(localStorage.getItem(_.V0.em_test_emails)):[];let l=r.getFieldValue("recipients");localStorage.setItem(_.V0.em_test_emails,JSON.stringify({...i,[V]:[...new Set(l)]})),(0,v.wB)(t("The email \u201c")+o.title+t("\u201d was successfully sent."),L)}Y(!1),r.resetFields(),N((0,p.Oo)())}}),[I,r,V,M,z,U,N,o.title,W,t,L]),(0,i.useEffect)((()=>{W.isError&&((0,v.p6)(W,L),Y(!1),r.resetFields(),N((0,p.Oo)()))}),[N,W,r,L]),(0,i.useEffect)((()=>{r.setFieldsValue({subject:o.subject||o.title})}),[o,r]),(0,R.jsx)(d.A,{width:572,title:(0,R.jsxs)("div",{children:[(0,R.jsx)(x.A,{icon:"SendOutlined"})," ",t("Send a test email")]}),className:"blocks-modal",open:F,onCancel:()=>{N((0,p.Oo)()),r.resetFields()},centered:!0,footer:[(0,R.jsx)(n.Ay,{size:"large",className:"em-analytics__email-send-test",type:"primary",htmlType:"submit",form:"Send mail",loading:W.isLoading,icon:(0,R.jsx)(x.A,{icon:"SendOutlined",className:"email-preview-menu__list-item-icon"}),onClick:()=>{r.validateFields().then((()=>{const e={user_id:T.id,project_id:V,email_id:k,subject:r.getFieldValue("subject"),email:r.getFieldValue("recipients").join(","),html:(o=(null===K||void 0===K?void 0:K.getValue())||"",o.replace(/[\\]/g,"\\\\").replace(/["]/g,'\\"').replace(/[/]/g,"\\/").replace(/[\b]/g,"\\b").replace(/[\f]/g,"\\f").replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r").replace(/[\t]/g,"\\t"))};var o;E(e),Y(!0)})).catch((e=>{console.warn(e)}))},disabled:I.isLoading,children:t("Send")},"submit")],forceRender:!0,children:(0,R.jsxs)(a.A,{form:r,layout:"vertical",name:"send_mail_form",initialValues:{subject:o.subject||o.title,recipients:[]},autoComplete:"off",style:{padding:"10px 24px 0"},children:[(0,R.jsx)(a.A.Item,{label:t("Subject"),name:"subject",rules:[{required:!1,message:t("Please type subject")}],children:(0,R.jsx)(m.A,{size:"large",placeholder:t("Type subject")})}),(0,R.jsx)(a.A.Item,{label:t("Recipients"),name:"recipients",tooltip:{title:t("The test email will be sent to the specified addresses."),icon:(0,R.jsx)(b.A,{})},rules:[{required:!0,validator:(e,o)=>o.length>10?Promise.reject(new Error(t("A test email can be sent to a maximum of 10 addresses."))):0!==o.length?o.every((e=>v.au.test(e.toLowerCase())))?Promise.resolve():Promise.reject(new Error(t("Please type correct emails"))):Promise.reject(new Error(t("Please type emails")))}],children:(0,R.jsx)(c.A,{size:"large",mode:"tags",placeholder:t("Add up to 10 recipients"),tooltip:{title:"Tooltip with customize icon",icon:(0,R.jsx)(b.A,{})},options:z,tagRender:e=>{const{label:o,closable:t,onClose:i}=e;return(0,R.jsx)(u.A,{color:C.colorPrimary,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},closable:t,onClose:i,style:{borderRadius:6},children:o})},getPopupContainer:()=>document.getElementById("send_mail_form")})})]})})};N.defaultProps={isModalVisible:!1,email:null};const k=N},90219:(e,o,t)=>{t.d(o,{A:()=>C});var i=t(92810),l=t(95838),s=t(12280),r=t(55039),a=t(81662),d=t(66522),n=t(28372),m=t(45934),c=t(64617),u=t(23287),h=t(38883),b=t.n(h),g=t(55701),x=t(17581),p=t(84568),A=t(8493),f=t(87790),j=t(65983),v=t(56991),_=t(32269),B=t(85163),S=t(70082);const{useToken:y}=l.A,{title:w,description:R,tags:P,type:N,is_template:k}={title:"title",description:"description",tags:"tags",type:"type",is_template:"is_template"},T={[w]:"",[R]:"",[P]:[],[k]:!1},E={[R]:"",[P]:[],[N]:""},I=({className:e,element:o})=>{const{__:t}=(0,u.s9)(),{projectId:l}=(0,c.g)(),h=(0,m.wA)(),[I]=s.A.useForm(),{token:C}=y(),L=(0,v.rD)(),O=(0,m.Pj)(),F=o.hasOwnProperty("type")?B.IE:B.Tm,D=o.hasOwnProperty("type")?B.YY:B.zh;const{data:V}=p.Nq.endpoints.getProject.select(+l)(O.getState());(0,i.useEffect)((()=>{var e;z(null===(e=function(e){const o=new Set;return null===e||void 0===e?void 0:e.filter((e=>!o.has(e.name)&&(o.add(e.name),!0)))}((0,_.HT)(V,D)))||void 0===e?void 0:e.map((e=>({value:e.name,key:e.id}))))}),[V,D]),(0,i.useEffect)((()=>{if(o){var e,t;const i=null===(e=(0,_._q)(o,D))||void 0===e?void 0:e.map((e=>e.name)),l=o.emailtags||o.blocktags,s=null===(t=(0,_._q)(o,D))||void 0===t?void 0:t.filter((e=>l.includes(e.id))).map((e=>e.name));I.setFieldsValue({title:o.title,description:o.description,tags:o.tags||s||i,type:o.type})}}),[I,o,D]);const{data:M}=(0,g.h1)(),[W,H]=(0,i.useState)([]),[X,z]=(0,i.useState)([]);return(0,i.useEffect)((()=>{if(M){const e=M.schema.properties.acf.properties.type.items.enum;let o=[];const i={Applications:t("Apps"),Articles:t("Article"),Banners:t("Banners"),Buttons:t("Buttons"),"Call to Action":t("Call to Action"),Contacts:t("Contacts"),Content:t("Content"),"E-Commerce":t("E-Commerce"),Feature:t("Features"),Footer:t("Footers"),Header:t("Headers"),Lists:t("Lists"),Menu:t("Menus"),Other:t("Others"),Polls:t("Polls"),Promocodes:t("Promocodes"),Separators:t("Separators")};for(let t in e)o.push({label:i[e[t]],value:e[t]});H(o)}}),[M,t]),(0,S.jsx)("div",{className:b()("settings-panel",{[e]:e}),children:(0,S.jsxs)(s.A,{form:I,layout:"vertical",name:"settings_panel_form",initialValues:F===B.Tm?{EmailInitialValues:T}:E,onValuesChange:e=>{const t=Object.keys(e)[0];switch(t){case w:o.isNew?h((0,A.BQ)(e[t])):h((0,j.VK)(e[t]));break;case R:F===B.Tm?o.isNew?h((0,A.Zs)(e[t])):h(x.GY.util.updateQueryData("getEmail",o.id,(o=>{Object.assign(o,{description:e[t]})}))):o.isNew?h((0,f.AS)(e[t])):h(g.VM.util.updateQueryData("getBlock",o.id,(o=>{Object.assign(o,{description:e[t]})})));break;case k:o.isNew?h((0,A.TC)(e[t])):h(x.GY.util.updateQueryData("getEmail",o.id,(o=>{Object.assign(o,{is_template:e[t]})})));break;case P:{const i=e[t].map((e=>e.trim()));F===B.Tm?o.isNew?h((0,A.yY)(i)):h(x.GY.util.updateQueryData("getEmail",o.id,(e=>{Object.assign(e,{tags:i})}))):o.isNew?h((0,f.TB)(i)):h(g.VM.util.updateQueryData("getBlock",o.id,(e=>{Object.assign(e,{tags:i})})));break}case N:h(g.VM.util.updateQueryData("getBlock",o.id,(o=>{Object.assign(o,{type:e[t]})})));break;default:return}},autoComplete:"off",children:[L.subjectEnabled&&F===B.Tm&&(0,S.jsx)(s.A.Item,{label:t("Title"),name:w,tooltip:{title:t("The title of the email is displayed in the list of the templates and usually matches the subject line, but you can change it."),icon:(0,S.jsx)(n.A,{})},children:(0,S.jsx)(r.A.TextArea,{placeholder:t("Type title here"),autoSize:{minRows:1}})}),L.descriptionEnabled&&(0,S.jsx)(s.A.Item,{label:t("Description"),name:R,tooltip:{title:t("Description is used in other sections of the service."),icon:(0,S.jsx)(n.A,{})},children:(0,S.jsx)(r.A.TextArea,{placeholder:t("Type your description here"),autoSize:{minRows:2}})}),L.tagsEnabled&&(0,S.jsx)(s.A.Item,{label:t("Tags"),name:P,tooltip:{title:t("Tags help you find the block in the list."),icon:(0,S.jsx)(n.A,{})},rules:[{message:"Please input your username!",type:"array"}],children:(0,S.jsx)(a.A,{mode:"tags",style:{width:"100%"},placeholder:t("Type your tags here"),options:X,tagRender:e=>{const{label:o,closable:t,onClose:i}=e;return(0,S.jsx)(d.A,{color:C.colorPrimary,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},closable:t,onClose:i,style:{borderRadius:6},children:o})},getPopupContainer:()=>document.querySelector(".email-settings__collapse")})}),F===B.IE&&(0,S.jsx)(s.A.Item,{name:N,label:t("Type"),tooltip:{title:t("Select the block type to find any block on the list faster."),icon:(0,S.jsx)(n.A,{})},rules:[{message:"Please input type!"}],children:(0,S.jsx)(a.A,{placeholder:t("Choose block type"),options:W,getPopupContainer:()=>document.querySelector(".email-settings__collapse")})})]})})};I.defaultProps={className:"",email:void 0};const C=I},13465:(e,o,t)=>{t.d(o,{A:()=>j});t(92810);var i=t(2018),l=t(7744),s=t(68694),r=t.n(s),a=t(38610),d=t.n(a),n=t(73248),m=t.n(n),c=t(41705),u=t.n(c),h=t(96588),b=t.n(h),g=t(97433),x=t.n(g),p=t(32269),A=(t(13591),t(70082));const f=[{sizeArray:[24],name:"column-one",html:r()},{sizeArray:[12,12],name:"column-two-50",html:u()},{sizeArray:[8,8,8],name:"column-three",html:b()},{sizeArray:[6,6,6,6],name:"column-four",html:x()},{sizeArray:[8,16],name:"column-two-33",html:d()},{sizeArray:[16,8],name:"column-two-66",html:m()}],j=()=>{const e=(0,p.sh)(),o=(0,p._9)();return(0,A.jsx)("div",{className:"structures blocks-search__empty-wrapper",children:(0,A.jsx)("div",{className:"structures__list",children:(0,A.jsx)("div",{children:f&&f.map(((t,s)=>(0,A.jsx)("div",{children:(0,A.jsx)("div",{className:"structures__item",draggable:!0,onClick:o=>e(o,t.html),onDragStart:e=>o(e,t.html),children:(0,A.jsx)(i.A,{gutter:[6,6],className:"structures__item-row",children:t.sizeArray.map(((e,o)=>(0,A.jsx)(l.A,{span:e,children:(0,A.jsx)("div",{className:"structures__item-col"})},t.name+o)))})})},t.name)))})})})}},85291:(e,o,t)=>{t.d(o,{A:()=>j});t(92810);var i=t(2018),l=t(7744),s=t(69029),r=t.n(s),a=t(41579),d=t.n(a),n=t(70869),m=t.n(n),c=t(8456),u=t.n(c),h=t(20931),b=t.n(h),g=t(24186),x=t.n(g),p=t(32269),A=(t(13591),t(70082));const f=[{sizeArray:[24],name:"column-one",html:r()},{sizeArray:[12,12],name:"column-two-50",html:u()},{sizeArray:[8,8,8],name:"column-three",html:b()},{sizeArray:[6,6,6,6],name:"column-four",html:x()},{sizeArray:[8,16],name:"column-two-33",html:d()},{sizeArray:[16,8],name:"column-two-66",html:m()}],j=()=>{const e=(0,p.sh)(),o=(0,p._9)();return(0,A.jsx)("div",{className:"structures blocks-search__empty-wrapper",children:(0,A.jsx)("div",{className:"structures__list",children:(0,A.jsx)("div",{children:f&&f.map(((t,s)=>(0,A.jsx)("div",{children:(0,A.jsx)("div",{className:"structures__item",draggable:!0,onClick:o=>e(o,t.html),onDragStart:e=>o(e,t.html),children:(0,A.jsx)(i.A,{gutter:[6,6],className:"structures__item-row",children:t.sizeArray.map(((e,o)=>(0,A.jsx)(l.A,{span:e,children:(0,A.jsx)("div",{className:"structures__item-col"})},t.name+o)))})})},t.name)))})})})}},57903:(e,o,t)=>{t.d(o,{A:()=>u});t(92810);var i=t(59018),l=t.n(i),s=t(23287),r=t(71157),a=t(17581),d=t(55701),n=t(32269),m=t(70082);const c=({element:e})=>{const{__:o,_x:t}=(0,s.s9)(),[i]=(0,a.dN)(),[l]=(0,d.OZ)(),c=(0,r.hN)(),u=(e,i)=>{if(e.error)return(0,n.p6)(e,c),!1;(0,n.wB)(o("The ")+(i.hasOwnProperty("type")?o("block"):t("email","letter"))+" "+o("\u201c")+e.data.title+o("\u201d")+o("was successfully")+" "+(i.lock?i.hasOwnProperty("type")?t("unlocked.","block"):t("unlocked.","email"):i.hasOwnProperty("type")?t("locked.","block"):t("locked.","email")),c)};return(0,m.jsx)("div",{className:e.hasOwnProperty("type")?"em-analytics__block-lock":"em-analytics__email-lock",onClick:()=>{e.hasOwnProperty("type")?l({blockId:e.id,lock:!e.lock}).then((o=>{u(o,e)})):i({emailId:e.id,lock:!e.lock}).then((o=>{u(o,e)}))},children:e.lock?o("Unlock"):o("Lock")})};c.defaultProps={element:l().shape({lock:null,id:null})};const u=c},90775:(e,o,t)=>{t.d(o,{A:()=>p});var i=t(92810),l=t(12280),s=t(14852),r=t(43005),a=t(2018),d=t(7744),n=t(55039),m=t(71157),c=t(45934),u=t(23287),h=t(64936),b=t(32269),g=t(40869),x=t(70082);const p=({isModalVisible:e,userEmail:o,subscriptionRequest:t,userName:p,currentPlane:A})=>{const{__:f}=(0,u.s9)(),j=(0,c.wA)(),[v]=l.A.useForm(),[_,B]=(0,g.E)(),S=(0,m.hN)(),y=()=>{j((0,h.Oo)())},w=()=>{v.validateFields().then((()=>{const e=v.getFieldsValue(!0);_(JSON.stringify(e)).then((e=>{var o,t,i;200===(null===e||void 0===e||null===(o=e.data)||void 0===o||null===(t=o.data)||void 0===t?void 0:t.status)?((0,b.wB)(null===e||void 0===e||null===(i=e.data)||void 0===i?void 0:i.message,S),y()):e.error&&(0,b.p6)(e,S)}))})).catch((e=>{console.warn(e)}))};return(0,i.useEffect)((()=>{t&&(null===v||void 0===v||v.setFieldsValue({request_tariff:t,user_name:p,user_email:o,user_tariff:A}))}),[v,t,A,p,o]),(0,x.jsx)(s.A,{title:f("Request for changing the pricing plan"),className:"blocks-modal",open:e,onOk:w,onCancel:y,centered:!0,width:572,footer:[(0,x.jsx)(r.Ay,{type:"primary",size:"large",onClick:w,disabled:B.isLoading,children:f("Send")},"submit")],forceRender:!0,children:(0,x.jsxs)(l.A,{form:v,layout:"vertical",name:"switch_to_plan_form",onFinish:w,initialValues:{request_email:o,request_phone:"",comment:"",request_tariff:t},autoComplete:"off",style:{padding:"10px 24px 0"},children:[(0,x.jsxs)(a.A,{gutter:16,children:[(0,x.jsxs)(d.A,{span:12,children:[" ",(0,x.jsx)(l.A.Item,{label:f("Email"),name:"request_email",rules:[{required:!0,message:f("Please enter your email address"),validator:(e,o)=>b.au.test(o)?Promise.resolve():Promise.reject(new Error(f("Please enter the correct email.")))}],children:(0,x.jsx)(n.A,{size:"large",placeholder:f("Email"),type:"email"})})]}),(0,x.jsxs)(d.A,{span:12,children:[" ",(0,x.jsx)(l.A.Item,{label:f("Phone number"),name:"request_phone",children:(0,x.jsx)(n.A,{size:"large",placeholder:f("Phone number")})})]})]}),(0,x.jsx)(l.A.Item,{label:f("Comment"),name:"comment",children:(0,x.jsx)(n.A.TextArea,{placeholder:f("Please add a comment to your request"),autoSize:{minRows:2}})})]})})}},4519:(e,o,t)=>{t.d(o,{A:()=>v});var i=t(92810),l=t(41919),s=t(76662),r=t(81e3),a=t(66726),d=t(43005),n=t(64617),m=t(58013),c=t(23287),u=t(98655),h=t(30961),b=t(20757),g=t(32269),x=t(85163),p=t(90070),A=t(70082);const{Content:f}=l.A,{Paragraph:j}=s.A,v=()=>{const{__:e}=(0,c.s9)(),{projectId:o,emailId:t}=(0,n.g)(),s=(0,p.p6)();let v=(0,n.Zp)();const _=s.get(x.A9.em_template_email)||t;(0,i.useEffect)((()=>{document.body.classList.remove("editor")}),[]);const B=(0,A.jsx)(A.Fragment,{children:(0,A.jsxs)(r.A,{size:10,children:[(0,A.jsx)(a.A,{title:e("To emails"),placement:"left",children:(0,A.jsx)(d.Ay,{type:"text",icon:(0,A.jsx)(m.A,{}),onClick:()=>(0,g.XZ)(v,`/projects/${o}`),shape:"circle"})}),(0,A.jsx)(j,{className:"ant-page-header-heading-title",children:e("Select email template")}),(0,A.jsx)(h.A,{isBlocks:!1,templateEmailId:_})]})}),S=(0,A.jsx)(A.Fragment,{});return(0,A.jsxs)(l.A,{className:"template-page",children:[(0,A.jsx)(b.A,{leftBlock:B,rightBlock:S}),(0,A.jsx)(f,{className:"template-page__container",children:(0,A.jsx)("div",{className:"template-page__content container",children:(0,A.jsx)(u.A,{projectId:x.p5,emailsView:x.Y$,templateEmailId:_})})})]})}},70656:(e,o,t)=>{t.d(o,{A:()=>g});var i=t(92810),l=t(37005),s=t(66726),r=t(45934),a=t(39990),d=t(62303),n=t(65983),m=t(69156),c=t(23287),u=t(45695),h=t(85163),b=t(70082);const g=()=>{var e;const{__:o}=(0,c.s9)(),t=(0,r.wA)(),[g]=(0,a.b9)(),[x,p]=(0,i.useState)(null===(e=window)||void 0===e?void 0:e.localStorage.getItem(h.V0.em_color_scheme)),A=(0,u.XW)(),f=(0,i.useCallback)(((e=null)=>{const o=e;(e=>{let o;if((0,m.Hk)(e),null===e){const e=matchMedia(h.F3).matches?h.nd:h.T;localStorage.removeItem(h.V0.em_color_scheme),o=e}else localStorage.setItem(h.V0.em_color_scheme,e),o=e;t((0,n.eX)(o===h.nd?`vs-${o}`:h.T)),(0,m.A5)(o),A({operation:h.Ru.UPDATE_PREVIEW,theme:o}),g({theme:e})})(o),p(o)}),[t,g,A]);return(0,i.useEffect)((()=>{matchMedia(h.F3).onchange=()=>f()}),[f]),(0,b.jsx)("div",{onClick:e=>e.stopPropagation(),children:(0,b.jsx)(l.A,{className:"theme-switcher",style:{cursor:"pointer",color:"var(--colorText)"},value:x,options:[{label:(0,b.jsx)(s.A,{title:o("Light theme"),children:(0,b.jsx)(d.A,{icon:"LightMode",style:{fontSize:18}})}),value:h.T},{label:(0,b.jsx)(s.A,{title:o("System theme"),children:(0,b.jsx)(d.A,{icon:"AutoMode",style:{fontSize:18}})}),value:null},{label:(0,b.jsx)(s.A,{title:o("Dark theme"),children:(0,b.jsx)(d.A,{icon:"DarkMode",style:{fontSize:18}})}),value:h.nd}],onChange:e=>f(e)})})}},54565:(e,o,t)=>{t.d(o,{A:()=>_});var i=t(92810),l=t(12280),s=t(29234),r=t(55039),a=t(28372),d=t(45934),n=t(38883),m=t.n(n),c=t(23287),u=t(17581),h=t(8493),b=t(70082);const{utm_source:g,utm_medium:x,utm_campaign:p,utm_term:A,utm_content:f}={utm_source:"utm_source",utm_medium:"utm_medium",utm_campaign:"utm_campaign",utm_term:"utm_term",utm_content:"utm_content"},j={[g]:"",[x]:"",[p]:"",[A]:"",[f]:""},v=({className:e,email:o})=>{const{__:t}=(0,c.s9)(),n=(0,d.wA)(),[v]=l.A.useForm();(0,i.useEffect)((()=>{var e,t,i,l,s;o&&v.setFieldsValue({utm_source:(null===(e=o.utm_parameters)||void 0===e?void 0:e.utm_source)||"",utm_medium:(null===(t=o.utm_parameters)||void 0===t?void 0:t.utm_medium)||"",utm_campaign:(null===(i=o.utm_parameters)||void 0===i?void 0:i.utm_campaign)||"",utm_term:(null===(l=o.utm_parameters)||void 0===l?void 0:l.utm_term)||"",utm_content:(null===(s=o.utm_parameters)||void 0===s?void 0:s.utm_content)||""})}),[v,o]);return(0,b.jsx)("div",{className:m()("settings-panel",{[e]:e}),children:(0,b.jsxs)(l.A,{form:v,layout:"vertical",name:"settings_panel_form_utm",initialValues:j,onValuesChange:e=>{const t=Object.keys(e)[0];switch(t){case g:o.isNew?n((0,h.K3)(e[t])):n(u.GY.util.updateQueryData("getEmail",o.id,(o=>{Object.assign(o,{utm_parameters:{...o.utm_parameters,utm_source:e[t]}})})));break;case x:o.isNew?n((0,h.ol)(e[t])):n(u.GY.util.updateQueryData("getEmail",o.id,(o=>{Object.assign(o,{utm_parameters:{...o.utm_parameters,utm_medium:e[t]}})})));break;case p:o.isNew?n((0,h.P3)(e[t])):n(u.GY.util.updateQueryData("getEmail",o.id,(o=>{Object.assign(o,{utm_parameters:{...o.utm_parameters,utm_campaign:e[t]}})})));break;case A:o.isNew?n((0,h.zH)(e[t])):n(u.GY.util.updateQueryData("getEmail",o.id,(o=>{Object.assign(o,{utm_parameters:{...o.utm_parameters,utm_term:e[t]}})})));break;case f:o.isNew?n((0,h.mk)(e[t])):n(u.GY.util.updateQueryData("getEmail",o.id,(o=>{Object.assign(o,{utm_parameters:{...o.utm_parameters,utm_content:e[t]}})})));break;default:return}},autoComplete:"off",children:[(0,b.jsx)(s.A,{message:t("The specified parameters will be added to all links when exporting the email."),type:"info",showIcon:!0,style:{marginBottom:20}}),(0,b.jsx)(l.A.Item,{label:t("utm_source"),name:g,tooltip:{title:t("Mandatory. Indicates the traffic source. Example: utm_source=google"),icon:(0,b.jsx)(a.A,{})},children:(0,b.jsx)(r.A,{placeholder:t("google")})}),(0,b.jsx)(l.A.Item,{label:t("utm_medium"),name:x,tooltip:{title:t("Identifies what type of link was used, such as cost per click or email. For example: utm_medium=cpc"),icon:(0,b.jsx)(a.A,{})},children:(0,b.jsx)(r.A,{placeholder:t("cpc")})}),(0,b.jsx)(l.A.Item,{label:t("utm_campaign"),name:p,tooltip:{title:t("Indicates a specific product promotion or a marketing campaign. Example: utm_campaign=spring_sale"),icon:(0,b.jsx)(a.A,{})},children:(0,b.jsx)(r.A,{placeholder:t("spring_sale")})}),(0,b.jsx)(l.A.Item,{label:t("utm_term"),name:A,tooltip:{title:t("Identifies search terms. For example: utm_term=running+shoes"),icon:(0,b.jsx)(a.A,{})},children:(0,b.jsx)(r.A,{placeholder:t("running+shoes")})}),(0,b.jsx)(l.A.Item,{label:t("utm_content"),name:f,tooltip:{title:t("Indicates what user clicked to get to the site: a banner or a text link. It is often used for A/B testing and ad campaigns. Example: utm_content=logolink or utm_content=textlink"),icon:(0,b.jsx)(a.A,{})},children:(0,b.jsx)(r.A,{placeholder:t("textlink")})})]})})};v.defaultProps={className:"",email:void 0};const _=v},5559:(e,o,t)=>{t.d(o,{A:()=>_});var i=t(92810),l=t(76662),s=t(43005),r=t(4800),a=t(55039),d=t(66726),n=t(45934),m=t(38883),c=t.n(m),u=t(23287),h=t(77532),b=t(62303),g=t(64936),x=t(95679),p=t(56991),A=t(85163),f=t(85677),j=t(70082);const{Text:v}=l.A,_=({onChange:e,value:o,validateStatus:t,placeholder:l,disabled:m,name:_,elementSettings:B})=>{const S=(0,p.rD)(),{__:y}=(0,u.s9)(),[w,R]=(0,i.useState)({width:"",height:"",size:""});let P=(0,n.wA)();const N=(0,n.d4)(h.js),k=(0,n.d4)(h.Ac),[T]=(0,x.FQ)();(0,i.useEffect)((()=>{T(o).then((({data:e})=>{e&&R({width:null===e||void 0===e?void 0:e.width,height:null===e||void 0===e?void 0:e.height,size:((null===e||void 0===e?void 0:e.fileSize)/1024).toFixed(0),format:null===e||void 0===e?void 0:e.format})}))}),[o,T]),(0,i.useEffect)((()=>{m||("src"===_&&N?e(N):"backgroundImage"===_&&k&&e(k),P((0,h.BK)()))}),[N,k,e,_,P,m]);const E=(e=null)=>{"src"===_?(P((0,h.tm)(o)),P((0,g.qf)(e||A.lx.UPLOAD_IMAGE_MODAL))):"backgroundImage"===_&&(P((0,h.e_)(o)),P((0,g.qf)(e||A.lx.UPLOAD_BACKGROUND_MODAL)))},I=[{label:y("Upload"),key:"Upload",onClick:()=>E("src"===_?A.lx.UPLOAD_IMAGE_MODAL_UPLOAD:A.lx.UPLOAD_BACKGROUND_MODAL_UPLOAD)},{label:y("Stock"),key:"Stock",onClick:()=>E("src"===_?A.lx.UPLOAD_IMAGE_MODAL_STOCK:A.lx.UPLOAD_BACKGROUND_MODAL_STOCK)},{label:y("GIF"),key:"GIF",onClick:()=>E("src"===_?A.lx.UPLOAD_IMAGE_MODAL_GIF:A.lx.UPLOAD_BACKGROUND_MODAL_GIF)},{label:y("AI"),key:"AI",onClick:()=>E("src"===_?A.lx.UPLOAD_IMAGE_MODAL_AI:A.lx.UPLOAD_BACKGROUND_MODAL_AI)}];return(0,j.jsx)("div",{className:c()("upload-bg-image",{"upload-bg-image_disabled":m}),children:!o||o&&"error"===t?(0,j.jsxs)(s.Ay,{type:"default",block:!0,onClick:()=>E("src"===_?A.lx.UPLOAD_IMAGE_MODAL_UPLOAD:A.lx.UPLOAD_BACKGROUND_MODAL_UPLOAD),children:[(0,j.jsx)(b.A,{icon:"Image",style:{fontSize:20,verticalAlign:"text-top"}}),y("Add image")]}):(0,j.jsxs)("div",{className:"ant-input-file-uploader upload-bg-image__inner-wrap",onClick:e=>{var o,t,i,l;null!==(o=e.target)&&void 0!==o&&o.closest(".upload-bg-image__edit")||null!==(t=e.target)&&void 0!==t&&t.closest(".upload-bg-image__edit-menu")||null!==(i=e.target)&&void 0!==i&&i.closest(".upload-bg-image__menu")||null!==(l=e.target)&&void 0!==l&&l.closest(".inputGroup")||E("src"===_?A.lx.UPLOAD_IMAGE_MODAL_UPLOAD:A.lx.UPLOAD_BACKGROUND_MODAL_UPLOAD)},children:[(0,j.jsx)(r.A,{arrow:!0,dropdownRender:()=>(0,j.jsx)("div",{className:"inputGroup",children:(0,j.jsx)(a.A,{prefix:(0,j.jsx)(b.A,{icon:"Image",style:{fontSize:20,verticalAlign:"text-top"}}),allowClear:!0,onChange:e,value:o,placeholder:l,name:_,disabled:m,className:"upload-bg-image__input"})}),overlayClassName:"upload-bg-image__dropdown-overlay",overlayStyle:{top:32,marginTop:"8px",width:347,left:0},trigger:["hover"],placement:"bottom",getPopupContainer:e=>e.closest(".upload-bg-image__inner-wrap"),children:(0,j.jsxs)("div",{className:"upload-bg-image__hover-container",style:{display:"flex",alignItems:"center"},children:[(0,j.jsx)("div",{className:"upload-bg-image__uploader",children:(0,j.jsx)("div",{className:"upload-bg-image__uploader-content",children:(0,j.jsxs)("div",{className:"upload-bg-image__uploader-content-inner",children:[(0,j.jsx)("div",{className:"upload-bg-image__uploader-img-wrap",children:(0,j.jsx)("img",{className:"upload-bg-image__uploader-img",src:o,alt:""})}),(0,j.jsx)("div",{className:"upload-bg-image__uploader-icons-wrap",children:(0,j.jsx)("div",{className:"upload-bg-image__uploader-content"})})]})})}),w.width&&w.height?(0,j.jsxs)("div",{className:"image-size",children:[w.width," \xd7 ",w.height,!!B&&"img"===B.type&&" \u2192 "+B.renderedWidth+" \xd7 "+B.renderedHeight,(0,j.jsx)("span",{className:"image-size-splitter",children:" \xa0\u2022\xa0 "}),(0,j.jsxs)("span",{children:[w.size," ",y("kB")]}),w.format&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("span",{className:"image-size-splitter",children:" \xa0\u2022\xa0 "}),(0,j.jsx)("span",{className:"image-size-format",children:w.format})]})]}):(0,j.jsx)(v,{type:"secondary",className:"image-empty-text",children:l})]})}),(0,j.jsx)("div",{style:{flexGrow:1}}),"gif"!==w.format&&S.imageCenterEditorEnabled&&(0,j.jsx)(d.A,{title:y("Edit"),children:(0,j.jsx)(v,{type:"link",className:"upload-bg-image__edit",children:(0,j.jsx)(f.A,{style:{fontSize:16},onClick:e=>{E(),P((0,g.Wz)(A.lx.IMAGE_EDITOR_MODAL))}})})}),(0,j.jsx)(r.A,{arrow:{pointAtCenter:!0},placement:"bottom",menu:{items:I},overlayClassName:"upload-bg-image__menu",children:(0,j.jsx)(v,{type:"link",className:"upload-bg-image__edit-menu image-change",children:!o||o&&"error"===t?y("Upload"):(0,j.jsx)(b.A,{style:{fontSize:20},icon:"ElementCarousel"})})},"Actions")]})})}},9589:()=>{},37981:()=>{},13591:()=>{}}]);