@retailrocketgroup/retailrocket-create.next-best-offer-2-vue-email-template-render 5.0.384530 → 5.0.384700

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.
@@ -191,7 +191,7 @@ Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function
191
191
  ${t.Width}px
192
192
  dotted
193
193
  ${$R({borderColor:t.Color,themeColors:e})}
194
- `}),pd=t=>({borderTop:RE(t.border.Top,t.themeColors),borderRight:RE(t.border.Right,t.themeColors),borderBottom:RE(t.border.Bottom,t.themeColors),borderLeft:RE(t.border.Left,t.themeColors)}),Mw=t=>t.borderCollapse!==void 0?{borderCollapse:Sgt(t.borderCollapse)}:{borderCollapse:"collapse"},Sgt=t=>{switch(t){case"Collapse":return"collapse";case"Separate":return"separate";default:return ta(t)}},wgt=t=>({Match:e=>{switch(t.Discriminator){case"None":return e.None();case"EmailBackgroundColor":return e.EmailBackgroundColor();case"BodyColor":return e.BodyColor();case"TitleColor":return e.TitleColor();case"HeadingColor":return e.HeadingColor();case"SubHeadingColor":return e.SubHeading();case"LargeTextColor":return e.LargeTextColor();case"NormalTextColor":return e.NormalTextColor();case"DescriptionTextColor":return e.DescriptionTextColor();case"PrimaryTextColor":return e.PrimaryTextColor();case"SecondaryTextColor":return e.SecondaryTextColor();case"ButtonTextColor":return e.ButtonTextColor();case"LinkColor":return e.LinkColor();case"PrimaryColor":return e.PrimaryColor();case"SecondaryColor":return e.SecondaryColor();case"CardBackgroundColor":return e.CardBackgroundColor();case"Custom":return e.Custom(t.CustomValue);default:return ta(t.Discriminator)}}}),Nl=t=>wgt(t.color).Match({None:()=>null,EmailBackgroundColor:()=>t.themeColors.EmailBackgroundColor,BodyColor:()=>t.themeColors.BodyColor,TitleColor:()=>t.themeColors.TitleColor,HeadingColor:()=>t.themeColors.HeadingColor,SubHeading:()=>t.themeColors.SubHeadingColor,LargeTextColor:()=>t.themeColors.LargeTextColor,NormalTextColor:()=>t.themeColors.NormalTextColor,DescriptionTextColor:()=>t.themeColors.DescriptionTextColor,PrimaryTextColor:()=>t.themeColors.PrimaryTextColor,SecondaryTextColor:()=>t.themeColors.SecondaryTextColor,LinkColor:()=>t.themeColors.LinkColor,PrimaryColor:()=>t.themeColors.PrimaryColor,SecondaryColor:()=>t.themeColors.SecondaryColor,CardBackgroundColor:()=>t.themeColors.CardBackgroundColor,ButtonTextColor:()=>t.themeColors.ButtonTextColor,Custom:e=>e}),hxe=t=>({Match:e=>{switch(t){case"Left":return e.Left();case"Center":return e.Center();case"Right":return e.Right();default:return ta(t)}}}),kgt=t=>t.containerAlign?hxe(t.containerAlign).Match({Left:()=>({textAlign:"left"}),Center:()=>({textAlign:"center"}),Right:()=>({textAlign:"right"})}):{},$c=t=>t.containerAlign?hxe(t.containerAlign).Match({Left:()=>"left",Center:()=>"center",Right:()=>"right"}):"center",Egt=Xe({__name:"If",props:{deps:{},theme:{},element:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]}},emits:["onImageOriginalSizeAdjusted","onImageSizeAdjusted","onElementClicked","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){const n=t,o=e,r=Vt({ifResult:!1,isLoading:!0});return n.deps.boolExpressionEvaluator({boolExpression:n.element.Predicate,context:n.context}).then(i=>{r.ifResult=i,r.isLoading=!1}),(i,s)=>(O(!0),J(rt,null,$n(r.ifResult?n.element.True:n.element.False,(a,l)=>(O(),Ze(xl,{key:l,deps:n.deps,theme:n.theme,element:a,context:n.context,path:[...n.path,r.ifResult?"True":"False",l],selectedElementPath:n.selectedElementPath,onOnImageSizeAdjusted:s[0]||(s[0]=u=>o("onImageSizeAdjusted",u)),onOnImageOriginalSizeAdjusted:s[1]||(s[1]=u=>o("onImageOriginalSizeAdjusted",u)),onOnElementClicked:s[2]||(s[2]=u=>o("onElementClicked",u)),onOnElementUpdatedEvent:s[3]||(s[3]=u=>o("onElementUpdatedEvent",u)),onOnElementRemoved:s[4]||(s[4]=u=>o("onElementRemoved",u))},null,8,["deps","theme","element","context","path","selectedElementPath"]))),128))}}),Ow=t=>({paddingTop:Eo({paddingExpression:t.paddings.Top,themeComponentPaddings:t.themeComponentPaddings,themeBodyPaddings:t.themeBodyPaddings})+"px",paddingRight:Eo({paddingExpression:t.paddings.Right,themeComponentPaddings:t.themeComponentPaddings,themeBodyPaddings:t.themeBodyPaddings})+"px",paddingBottom:Eo({paddingExpression:t.paddings.Bottom,themeComponentPaddings:t.themeComponentPaddings,themeBodyPaddings:t.themeBodyPaddings})+"px",paddingLeft:Eo({paddingExpression:t.paddings.Left,themeComponentPaddings:t.themeComponentPaddings,themeBodyPaddings:t.themeBodyPaddings})+"px"}),_gt=ec,Rgt=t=>_gt(t.width).Match({Auto:()=>"initial",Pixel:e=>e.Value+"px",Percentage:e=>e.Value+"%"}),Dgt=["align"],Agt=Xe({__name:"HeightContainer",props:{deps:{},theme:{},element:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]}},emits:["onImageOriginalSizeAdjusted","onImageSizeAdjusted","onElementClicked","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){const n=t,o=e;return(r,i)=>(O(),J("table",{class:"heightContainerRender",style:he([{"border-spacing":"0","border-collapse":"separate"},{width:z(Rgt)({width:n.element.Width})}])},[_("tbody",null,[_("tr",null,[_("td",{align:z($c)({containerAlign:n.element.ContainerAlign}),style:he([z(Ow)({paddings:n.element.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),{height:n.element.Height?n.element.Height+"px":"",verticalAlign:n.element.VerticalAlign,backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundColor:z(Nl)({color:n.element.BackgroundColor,themeColors:n.theme.Colors})??"inherit"},z(pd)({border:n.element.Border,themeColors:n.theme.Colors}),z(Iu)({borderRadius:n.element.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner})])},[(O(!0),J(rt,null,$n(n.element.Elements,(s,a)=>(O(),Ze(xl,{key:a,deps:n.deps,theme:n.theme,element:s,path:[...n.path,"Elements",a],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageSizeAdjusted:i[0]||(i[0]=l=>o("onImageSizeAdjusted",l)),onOnImageOriginalSizeAdjusted:i[1]||(i[1]=l=>o("onImageOriginalSizeAdjusted",l)),onOnElementClicked:i[2]||(i[2]=l=>o("onElementClicked",l)),onOnElementUpdatedEvent:i[3]||(i[3]=l=>o("onElementUpdatedEvent",l)),onOnElementRemoved:i[4]||(i[4]=l=>o("onElementRemoved",l))},null,8,["deps","theme","element","path","selectedElementPath","context"]))),128))],12,Dgt)])])],4))}}),Ngt=t=>({Match:e=>{switch(t){case"Left":return e.Left();case"Center":return e.Center();case"Right":return e.Right();case"Inline":return e.Inline()}}}),bb=t=>Ngt(t.contentAlign).Match({Left:()=>({display:"block",textAlign:"left"}),Center:()=>({display:"block",textAlign:"center"}),Right:()=>({display:"block",textAlign:"right"}),Inline:()=>({})});let tP;const fS={mounted(t,e){const n=e.value;tP=new ResizeObserver(o=>{o.forEach(r=>n(r.contentRect))}),tP.observe(t)},unmounted(t){tP.unobserve(t)}},Bgt=["href"],Lgt=["src","alt"],$gt=["src","alt"],Vgt=Xe({__name:"Image",props:{deps:{},theme:{},element:{},path:{},context:{type:[String,Number,Boolean,Array,Object]}},emits:["onImageOriginalSizeAdjusted","onImageSizeAdjusted","onElementClicked"],setup(t,{emit:e}){const n=c=>{u("onImageOriginalSizeAdjusted",{Path:o.path,OriginalHeight:c.target.naturalHeight,OriginalWidth:c.target.naturalWidth})},o=t,r=Vt({href:"",src:"",alt:"",isLoaded:!1}),i=q(()=>o.element.IsResponsive?"100%":(o.element.IsRetina?o.element.OriginalWidth/2:o.element.OriginalWidth)+"px"),s=q(()=>o.element.IsResponsive?(o.element.IsRetina?o.element.OriginalWidth/2:o.element.OriginalWidth)+"px":"100%"),a=async c=>o.deps.stringExpressionEvaluator({stringExpression:c,context:o.context}),l=async()=>{const[c,d,h]=await Promise.all([a(o.element.Src),a(o.element.HRef),a(o.element.Alt)]);r.href=d,r.src=c,r.alt=h,r.isLoaded=!0};an(()=>[o.element.Src,o.element.HRef,o.element.Alt,o.context],()=>l()),l();const u=e;return(c,d)=>o.element.IsLink?(O(),J("a",{key:0,href:r.href,style:he([z(bb)({contentAlign:o.element.ContentAlign})]),onClick:d[0]||(d[0]=zo(()=>u("onElementClicked"),["prevent"]))},[r.isLoaded?Ot((O(),J("img",{key:0,class:$e(["Image cursor-pointer",{"img-responsive":o.element.IsResponsive}]),src:r.src,alt:r.alt,style:he([z(Iu)({borderRadius:o.element.BorderRadius,borderRadiusCard:o.theme.BorderRadiusCard,bodyBorderRadius:o.theme.BorderRadius,borderButtonRadius:o.theme.BorderRadiusButton,borderBannerRadius:o.theme.BorderRadiusBanner}),z(pd)({border:o.element.Border,themeColors:o.theme.Colors}),{width:i.value,maxWidth:s.value},{verticalAlign:o.element.VerticalAlign}]),onLoad:n},null,46,Lgt)),[[z(fS),({width:h,height:m})=>u("onImageSizeAdjusted",{Path:o.path,AdjustedHeight:m,AdjustedWidth:h})]]):Ue("",!0)],12,Bgt)):(O(),J("span",{key:1,style:he([z(bb)({contentAlign:o.element.ContentAlign})])},[r.isLoaded?Ot((O(),J("img",{key:0,class:$e(["Image cursor-pointer",{"img-responsive":o.element.IsResponsive}]),src:r.src,alt:r.alt,style:he([z(Iu)({borderRadius:o.element.BorderRadius,borderRadiusCard:o.theme.BorderRadiusCard,bodyBorderRadius:o.theme.BorderRadius,borderButtonRadius:o.theme.BorderRadiusButton,borderBannerRadius:o.theme.BorderRadiusBanner}),z(pd)({border:o.element.Border,themeColors:o.theme.Colors}),{width:i.value,maxWidth:s.value},{verticalAlign:o.element.VerticalAlign}]),onLoad:n},null,46,$gt)),[[z(fS),({width:h,height:m})=>u("onImageSizeAdjusted",{Path:o.path,AdjustedHeight:m,AdjustedWidth:h})]]):Ue("",!0)],4))}}),ot=(t,e)=>{const n=t.__vccOpts||t;for(const[o,r]of e)n[o]=r;return n},Mgt=ot(Vgt,[["__scopeId","data-v-83688a51"]]),Ogt=ec,Igt=t=>t.width===void 0?{}:Ogt(t.width).Match({Auto:()=>({width:"auto"}),Pixel:e=>({width:e.Value+"px"}),Percentage:e=>({width:e.Value+"%"})}),Pgt=t=>{switch(t){case"Auto":return{width:"auto"};case"FullWidth":return{width:"100%"};default:return ta(t)}},Wgt=Xe({__name:"OneLineList",props:{deps:{},theme:{},element:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]}},emits:["onImageSizeAdjusted","onImageOriginalSizeAdjusted","onElementClicked","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){const n=t,o=e;return(r,i)=>(O(),J("table",{class:"oneLineList",style:he([{"border-spacing":"0","border-collapse":"collapse"},[z(Pgt)(n.element.ContainerWidth)]])},[_("tbody",null,[_("tr",null,[(O(!0),J(rt,null,$n(n.element.Elements,(s,a)=>(O(),J("td",{key:a,class:"oneLineListItem",style:he([z(Ow)({paddings:n.element.ItemPaddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),z(Igt)({width:n.element.ItemWidth}),{lineHeight:"normal"}])},[(O(),Ze(xl,{key:a,deps:n.deps,theme:n.theme,element:s,path:[...n.path,"Elements",a],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageSizeAdjusted:i[0]||(i[0]=l=>o("onImageSizeAdjusted",l)),onOnImageOriginalSizeAdjusted:i[1]||(i[1]=l=>o("onImageOriginalSizeAdjusted",l)),onOnElementClicked:i[2]||(i[2]=l=>o("onElementClicked",l)),onOnElementUpdatedEvent:i[3]||(i[3]=l=>o("onElementUpdatedEvent",l)),onOnElementRemoved:i[4]||(i[4]=l=>o("onElementRemoved",l))},null,8,["deps","theme","element","path","selectedElementPath","context"]))],4))),128))])])],4))}}),Hgt={style:{"border-spacing":"0","border-collapse":"collapse",width:"100%"}},zgt=Xe({__name:"Spacer",props:{theme:{},element:{}},emits:["onElementClicked"],setup(t,{emit:e}){const n=t,o=e;return(r,i)=>(O(),J("table",{class:"Spacer",width:"100%",style:{"border-spacing":"0","border-collapse":"collapse",width:"100%"},onClick:i[0]||(i[0]=()=>o("onElementClicked"))},[_("tbody",null,[_("tr",null,[_("td",{valign:"middle",style:he([{height:z(Eo)({paddingExpression:n.element.Height,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})+"px"}])},[_("table",Hgt,[_("tbody",null,[_("tr",null,[_("td",{style:he([[{borderTop:n.element.Weight+"px",borderStyle:n.element.Weight>0?"solid":"none",borderColor:z(Nl)({color:n.element.Color,themeColors:n.theme.Colors})}],{"font-size":"0","line-height":"0","border-bottom":"0","border-left":"0","border-right":"0"}])},"   ",4)])])])],4)])])]))}}),O5={beforeMount(t,e){t.innerHTML=tee.sanitize(e.value)},beforeUpdate(t,e){t.innerHTML=tee.sanitize(e.value)}},jgt=t=>({Match:e=>{switch(t.Discriminator){case"EmailBackgroundColor":return e.EmailBackgroundColor();case"BodyColor":return e.BodyColor();case"TitleColor":return e.TitleColor();case"HeadingColor":return e.HeadingColor();case"SubHeadingColor":return e.SubHeading();case"LargeTextColor":return e.LargeTextColor();case"NormalTextColor":return e.NormalTextColor();case"DescriptionTextColor":return e.DescriptionTextColor();case"PrimaryTextColor":return e.PrimaryTextColor();case"SecondaryTextColor":return e.SecondaryTextColor();case"ButtonTextColor":return e.ButtonTextColor();case"LinkColor":return e.LinkColor();case"PrimaryColor":return e.PrimaryColor();case"SecondaryColor":return e.SecondaryColor();case"CardBackgroundColor":return e.CardBackgroundColor();case"Custom":return e.Custom(t.CustomValue)}}}),gM=t=>jgt(t.fontColor).Match({EmailBackgroundColor:()=>t.themeColors.EmailBackgroundColor,BodyColor:()=>t.themeColors.BodyColor,TitleColor:()=>t.themeColors.TitleColor,HeadingColor:()=>t.themeColors.HeadingColor,SubHeading:()=>t.themeColors.SubHeadingColor,LargeTextColor:()=>t.themeColors.LargeTextColor,NormalTextColor:()=>t.themeColors.NormalTextColor,DescriptionTextColor:()=>t.themeColors.DescriptionTextColor,PrimaryTextColor:()=>t.themeColors.PrimaryTextColor,SecondaryTextColor:()=>t.themeColors.SecondaryTextColor,LinkColor:()=>t.themeColors.LinkColor,PrimaryColor:()=>t.themeColors.PrimaryColor,SecondaryColor:()=>t.themeColors.SecondaryColor,CardBackgroundColor:()=>t.themeColors.CardBackgroundColor,ButtonTextColor:()=>t.themeColors.ButtonTextColor,Custom:e=>e}),Ugt=t=>({Match:e=>{switch(t){case"None":return e.None();case"Underline":return e.Underline();case"LineThrough":return e.LineThrough()}}}),sU=t=>Ugt(t.textDecoration).Match({None:()=>"none",Underline:()=>"underline",LineThrough:()=>"line-through"}),mxe=t=>({fontSize:t.customFontSettings.FontSize,lineHeight:t.customFontSettings.LineHeight,fontWeight:t.customFontSettings.IsBold?"bold":"normal",fontStyle:t.customFontSettings.IsItalic?"italic":"normal",textDecoration:sU({textDecoration:t.customFontSettings.Decoration}),fontFamily:t.customFontSettings.FontFamily,color:gM({fontColor:t.customFontSettings.FontColor,themeColors:t.themeColors})}),fxe=t=>({Match:e=>{switch(t.Discriminator){case"Heading":return e.Heading();case"Title":return e.Title();case"SubHeading":return e.SubHeading();case"LargeText":return e.LargeText();case"NormalText":return e.NormalText();case"DescriptionText":return e.DescriptionText();case"Link":return e.Link();case"Button":return e.Button();case"Custom":return e.Custom(t.CustomFontSettings);default:return ta(t.Discriminator)}}}),Kgt=t=>({Match:e=>{switch(t.Discriminator){case"StyleLinkedColor":return e.FontStyle();case"EmailBackgroundColor":return e.EmailBackgroundColor();case"BodyColor":return e.BodyColor();case"TitleColor":return e.TitleColor();case"HeadingColor":return e.HeadingColor();case"SubHeadingColor":return e.SubHeading();case"LargeTextColor":return e.LargeTextColor();case"NormalTextColor":return e.NormalTextColor();case"DescriptionTextColor":return e.DescriptionTextColor();case"PrimaryTextColor":return e.PrimaryTextColor();case"SecondaryTextColor":return e.SecondaryTextColor();case"ButtonTextColor":return e.ButtonTextColor();case"LinkColor":return e.LinkColor();case"PrimaryColor":return e.PrimaryColor();case"SecondaryColor":return e.SecondaryColor();case"CardBackgroundColor":return e.CardBackgroundColor();case"Custom":return e.Custom(t.CustomValue)}}}),qgt=t=>Kgt(t.fontStyleColor).Match({FontStyle:()=>fxe(t.fontStyle).Match({Heading:()=>t.themeColors.HeadingColor,Title:()=>t.themeColors.TitleColor,SubHeading:()=>t.themeColors.SubHeadingColor,LargeText:()=>t.themeColors.LargeTextColor,NormalText:()=>t.themeColors.NormalTextColor,DescriptionText:()=>t.themeColors.DescriptionTextColor,Button:()=>t.themeColors.ButtonTextColor,Link:()=>t.themeColors.LinkColor,Custom:e=>Nl({color:e.FontColor,themeColors:t.themeColors})}),EmailBackgroundColor:()=>t.themeColors.EmailBackgroundColor,BodyColor:()=>t.themeColors.BodyColor,TitleColor:()=>t.themeColors.TitleColor,HeadingColor:()=>t.themeColors.HeadingColor,SubHeading:()=>t.themeColors.SubHeadingColor,LargeTextColor:()=>t.themeColors.LargeTextColor,NormalTextColor:()=>t.themeColors.NormalTextColor,DescriptionTextColor:()=>t.themeColors.DescriptionTextColor,PrimaryTextColor:()=>t.themeColors.PrimaryTextColor,SecondaryTextColor:()=>t.themeColors.SecondaryTextColor,LinkColor:()=>t.themeColors.LinkColor,PrimaryColor:()=>t.themeColors.PrimaryColor,SecondaryColor:()=>t.themeColors.SecondaryColor,CardBackgroundColor:()=>t.themeColors.CardBackgroundColor,ButtonTextColor:()=>t.themeColors.ButtonTextColor,Custom:e=>e}),pxe=["Arial","Georgia","Tahoma","TimesNewRoman","Verdana"],I5={Arial:"Arial",Georgia:"Georgia",Tahoma:"Tahoma",TimesNewRoman:"Times New Roman",Verdana:"Verdana"},aU=t=>({fontSize:t.fontSize+"px",lineHeight:t.lineHeight+"px",fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:I5[t.fontFamily],textDecoration:t.textDecoration,color:t.color}),lU=t=>{const e=n=>({fontSize:n.FontSize,lineHeight:n.LineHeight,fontWeight:n.IsBold?"bold":"normal",fontStyle:n.IsItalic?"italic":"normal",fontFamily:t.fontFamily,textDecoration:sU({textDecoration:n.Decoration}),color:qgt({fontStyleColor:t.fontStyle.FontColor,fontStyle:t.fontStyle,themeColors:t.themeColors})});return fxe(t.fontStyle).Match({Heading:()=>e(t.themeDefinedFontSettings.Heading),Title:()=>e(t.themeDefinedFontSettings.Title),SubHeading:()=>e(t.themeDefinedFontSettings.SubHeading),LargeText:()=>e(t.themeDefinedFontSettings.LargeText),NormalText:()=>e(t.themeDefinedFontSettings.NormalText),DescriptionText:()=>e(t.themeDefinedFontSettings.DescriptionText),Link:()=>e(t.themeDefinedFontSettings.Link),Button:()=>e(t.themeDefinedFontSettings.Button),Custom:n=>mxe({customFontSettings:n,themeColors:t.themeColors})})},Jgt=t=>({Match:e=>{switch(t.Discriminator){case"Theme":return e.Theme();case"Custom":return e.Custom(t.CustomValue);default:return ta(t.Discriminator)}}}),Ggt=t=>Jgt(t.buttonPaddings).Match({Theme:()=>({TopBottom:t.themeButtonPaddings.TopBottom,LeftRight:t.themeButtonPaddings.LeftRight}),Custom:e=>({TopBottom:e.TopBottom,LeftRight:e.LeftRight})}),Ygt=["align"],Xgt={class:"Button"},Qgt=["href"],Zgt=Xe({__name:"ButtonVue",props:{deps:{},theme:{},element:{},context:{type:[String,Number,Boolean,Array,Object]}},emits:["onElementClicked"],setup(t,{emit:e}){const n=t,o=q(()=>aU(lU({fontFamily:n.theme.FontFamily,fontStyle:n.element.TextStyle,themeDefinedFontSettings:n.theme.FontSettingsPresets,themeColors:n.theme.Colors}))),r=q(()=>$R({borderColor:n.element.Border.Left.Color,themeColors:n.theme.Colors})),i=q(()=>Ggt({buttonPaddings:n.element.Paddings,themeButtonPaddings:n.theme.ButtonPaddings})),s=q(()=>Nl({color:n.element.BackgroundColor,themeColors:n.theme.Colors})),a=q(()=>{switch(n.element.ContentAlign){case"Center":return"center";case"Left":return"left";case"Right":return"right";default:return"center"}}),l=Vt({href:"",text:"",isLoading:!0}),u=n.deps.stringExpressionEvaluator,c=()=>{Promise.all([u({stringExpression:n.element.HRef,context:n.context}),u({stringExpression:n.element.Text,context:n.context})]).then(([h,m])=>{l.href=h,l.text=m,l.isLoading=!1})};c(),an(()=>[n.element.HRef,n.element.Text,n.context],()=>c());const d=e;return(h,m)=>(O(),J("table",{style:{"border-spacing":"0","border-collapse":"collapse",width:"100%"},onClick:m[1]||(m[1]=zo(f=>d("onElementClicked"),["prevent"]))},[_("tbody",null,[_("tr",null,[_("td",{align:a.value},[_("div",Xgt,[_("a",{style:he([{display:"block","text-decoration":"none"},[o.value]]),href:l.href,onClick:m[0]||(m[0]=zo(()=>{},["prevent"]))},[_("table",{style:he([[{backgroundColor:s.value},z(Iu)({borderRadius:n.element.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner}),{width:n.element.FullWidth?"100%":"auto"},z(pd)({border:n.element.Border,themeColors:t.theme.Colors}),{borderColor:r.value}],{"text-align":"center","border-spacing":"0","border-collapse":"separate"}])},[_("tbody",null,[_("tr",null,[_("td",{align:"center",style:he([{"line-height":"normal"},[{paddingTop:i.value.TopBottom+"px",paddingBottom:i.value.TopBottom+"px",paddingLeft:i.value.LeftRight+"px",paddingRight:i.value.LeftRight+"px"}]])},[Ot(_("p",{class:"user-select-none",style:he([o.value])},null,4),[[z(O5),l.text]])],4)])])],4)],12,Qgt)])],8,Ygt)])])]))}}),eCt=ot(Zgt,[["__scopeId","data-v-f2906df7"]]),tCt=["href"],nCt=Xe({__name:"SpanText",props:{deps:{},theme:{},element:{},context:{type:[String,Number,Boolean,Array,Object]}},emits:["onElementClicked"],setup(t,{emit:e}){const n=t,o=n.deps.stringExpressionEvaluator,r=q(()=>{const u=lU({fontFamily:n.theme.FontFamily,fontStyle:n.element.Style,themeDefinedFontSettings:n.theme.FontSettingsPresets,themeColors:n.theme.Colors});if(n.element.Style.Discriminator==="Custom"){const c=mxe({customFontSettings:n.element.Style.CustomFontSettings,themeColors:n.theme.Colors});return{...c,fontSize:c.fontSize+"px",lineHeight:c.lineHeight+"px",minHeight:n.element.MinNumberOfLines*u.lineHeight+"px"}}return{minHeight:n.element.MinNumberOfLines*u.lineHeight+"px",color:u.color}}),i=Vt({href:"",text:"",isLoading:!0}),s=u=>u.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"),a=()=>{Promise.all([o({stringExpression:n.element.HRef,context:n.context}),o({stringExpression:n.element.Text,context:n.context})]).then(([u,c])=>{i.href=u,i.text=s(c),i.isLoading=!1})};a(),an(()=>[n.context,n.element.HRef,n.element.Text],()=>a());const l=e;return(u,c)=>n.element.IsLink?Ot((O(),J("a",{key:0,href:i.href,class:$e(["SpanText cursor-pointer user-select-none",n.element.Style.Discriminator]),style:he([{margin:"0"},[r.value,z(bb)({contentAlign:n.element.ContentAlign})]]),onClick:c[0]||(c[0]=zo(()=>l("onElementClicked"),["prevent"]))},null,14,tCt)),[[z(O5),i.text]]):Ot((O(),J("span",{key:1,class:$e(["SpanText cursor-pointer user-select-none",n.element.Style.Discriminator]),style:he([{margin:"0"},[r.value,z(bb)({contentAlign:n.element.ContentAlign})]]),onClick:c[1]||(c[1]=zo(()=>l("onElementClicked"),["prevent"]))},null,6)),[[z(O5),i.text]])}}),oCt=ot(nCt,[["__scopeId","data-v-f6595f5e"]]),us=t=>({fontSize:t.themeFontSettings.FontSize,lineHeight:t.themeFontSettings.LineHeight,fontWeight:t.themeFontSettings.IsBold?"bold":"normal",fontStyle:t.themeFontSettings.IsItalic?"italic":"normal",fontFamily:t.fontFamily,textDecoration:sU({textDecoration:t.themeFontSettings.Decoration}),color:t.themeColor}),rCt={class:"bootstrap-styles modal fade show d-block position-absolute"},iCt={class:"bootstrap-styles modal-dialog modal-dialog-centered"},sCt={class:"bootstrap-styles modal-content border rounded-3 shadow","data-test":"modal-window__content"},aCt={class:"bootstrap-styles modal-header p-0"},lCt={class:"bootstrap-styles container-fluid border-bottom g-0"},uCt={class:"bootstrap-styles d-flex justify-content-between align-items-center px-11 py-7"},cCt={class:"bootstrap-styles modal-title border-0","data-test":"modal-window__header-text"},dCt={class:"bootstrap-styles modal-body p-0","data-test":"modal-window__body"},hCt={class:"bootstrap-styles modal-footer p-0 g-0"},mCt={class:"bootstrap-styles container-fluid border-top"},fCt={class:"bootstrap-styles d-flex justify-content-end py-8 px-11"},pCt={class:"bootstrap-styles col-6 d-flex justify-content-end","data-test":"modal-window__footer-actions"},gCt=Xe({__name:"ModalWindow",props:{headerText:{}},emits:["close"],setup(t,{emit:e}){const n=t,o=e;return(r,i)=>(O(),J("div",rCt,[_("div",{class:"bootstrap-styles modal-blur d-block position-fixed top-0 left-0 w-100 vh-100","data-test":"modal-window__outside",onClick:i[0]||(i[0]=s=>o("close"))}),_("div",iCt,[_("div",sCt,[_("div",aCt,[_("div",lCt,[_("div",uCt,[_("h5",cCt,Gt(n.headerText),1),_("button",{type:"button","aria-label":"Close","data-bs-dismiss":"modal","data-test":"modal-window__close-button",onClick:i[1]||(i[1]=s=>o("close"))},[...i[2]||(i[2]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[_("path",{d:"M3 3L13 13",stroke:"var(--gray-500)"}),_("path",{d:"M13 3L3 13",stroke:"var(--gray-500)"})],-1)])])])])]),_("div",dCt,[j0(r.$slots,"body",{},void 0,!0)]),_("div",hCt,[_("div",mCt,[_("div",fCt,[_("div",pCt,[j0(r.$slots,"footer-actions",{},void 0,!0)])])])])])])]))}}),gxe=ot(gCt,[["__scopeId","data-v-7a4aac23"]]),Xn=t=>e=>t[e.localeKey],CCt={cancelButton:"Cancel",applyButton:"Delete"},yCt={cancelButton:"Отмена",applyButton:"Удалить"},poe=Xn({en:CCt,ru:yCt}),bCt={class:"bootstrap-styles px-11 py-7 text-start"},vCt=Xe({__name:"RemoveConfirmModalWindow",props:{headerText:{},deps:{}},emits:["cancel","confirmed"],setup(t,{emit:e}){const n=t,o=()=>{i("cancel")},r={cancelButton:poe({localeKey:n.deps.localeKey}).cancelButton,applyButton:poe({localeKey:n.deps.localeKey}).applyButton},i=e;return(s,a)=>(O(),Ze(gxe,{headerText:n.headerText,class:"remove-element-confirm-modal-window",onClose:a[2]||(a[2]=()=>o())},{body:Tu(()=>[_("div",bCt,[j0(s.$slots,"body-content")])]),"footer-actions":Tu(()=>[_("button",{class:"modal-footer__button bootstrap-styles d-flex justify-content-center align-center py-1 px-3 me-3 rounded-2 bg-blue-selected button__hover-blue-100 text-color-selected",onClick:a[0]||(a[0]=zo(l=>o(),["stop"]))},Gt(r.cancelButton),1),_("button",{class:"modal-footer__button bootstrap-styles d-flex justify-content-center align-center py-1 px-3 rounded-2 text-white cursor-pointer remove-element-confirm__button",onClick:a[1]||(a[1]=zo(l=>i("confirmed"),["stop"]))},Gt(r.applyButton),1)]),_:3},8,["headerText"]))}}),TCt={removeWindowTitle:"Delete element",removeWindowDescription:"Are you sure you want to delete the text element?"},xCt={removeWindowTitle:"Удаление элемента",removeWindowDescription:"Вы действительно хотите удалить элемент ?"},goe=Xn({en:TCt,ru:xCt}),Coe=t=>({type:"doc",content:t.Content.map(FCt)}),FCt=t=>"ParagraphNode"in t?bxe(t):"BulletListNode"in t?SCt(t):"OrderedListNode"in t?wCt(t):"DataFieldNode"in t?yxe(t):ta(t),Cxe=t=>({type:"listItem",content:t.Content.map(e=>"ParagraphNode"in e?bxe(e):"ImageNode"in e?vxe(e):ta(e))}),yxe=t=>({type:"dataField",marks:uU({textStyle:t.DataFieldNode.TextStyle,commonLinkMark:t.DataFieldNode.CommonLinkMark}),attrs:{stringExpression:t.DataFieldNode.StringExpression}}),SCt=t=>({type:"bulletList",content:t.BulletListNode.Content.map(Cxe),attrs:{themeName:t.BulletListNode.ListStyle}}),wCt=t=>({type:"orderedList",content:t.OrderedListNode.Content.map(Cxe),attrs:{themeName:t.OrderedListNode.ListStyle}}),bxe=t=>({type:"paragraph",attrs:{themeName:t.ParagraphNode.ThemeName},content:t.ParagraphNode.Content.map(kCt)}),kCt=t=>"TextNode"in t?ECt(t):"HardBreakNode"in t?LCt():"ImageNode"in t?vxe(t):"DataFieldNode"in t?yxe(t):ta(t),uU=t=>{const e=[];return t.textStyle&&e.push(NCt(t.textStyle)),t.commonLinkMark&&e.push(BCt(t.commonLinkMark)),e.filter(n=>n!==void 0)},ECt=t=>({type:"text",text:t.TextNode.Text,marks:uU({textStyle:t.TextNode.TextStyle,commonLinkMark:t.TextNode.CommonLinkMark})}),_Ct=t=>{switch(t){case"Normal":return"normal";case"Bold":return"bold";default:return"normal"}},RCt=t=>{switch(t){case"Normal":return"normal";case"Italic":return"italic";default:return"normal"}},DCt=t=>{switch(t){case"None":return"none";case"Uppercase":return"uppercase";default:return"none"}},ACt=t=>{switch(t){case"None":return"none";case"Underline":return"underline";case"LineThrough":return"line-through";default:return"none"}},NCt=t=>({type:"textStyle",attrs:{themeName:t.ThemeName,color:t.Style.Color,fontWeight:t.Style.FontWeight?_Ct(t.Style.FontWeight):void 0,fontStyle:t.Style.FontStyle?RCt(t.Style.FontStyle):void 0,fontSize:t.Style.FontSize?t.Style.FontSize+"px":void 0,lineHeight:t.Style.LineHeight?t.Style.LineHeight+"px":void 0,fontFamily:t.Style.FontFamily,textTransform:t.Style.TextTransform?DCt(t.Style.TextTransform):void 0,textDecoration:t.Style.TextDecoration?ACt(t.Style.TextDecoration):void 0}}),BCt=t=>ec(t).Match({LinkMark:e=>$Ct({LinkMark:e}),UnsubscribeLinkMark:()=>VCt()}),LCt=()=>({type:"hardBreak"}),vxe=t=>({type:"image",attrs:{src:t.ImageNode.Src,alt:t.ImageNode.Alt,isRetina:t.ImageNode.IsRetina,width:t.ImageNode.Width,height:t.ImageNode.Height},marks:uU({commonLinkMark:t.ImageNode.CommonLinkMark})}),$Ct=t=>({type:"link",attrs:{href:t.LinkMark.Href}}),VCt=()=>({type:"unsubscribeLink"}),Txe=Zu.create({name:"textTransform",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textTransform:{default:"none",parseHTML:t=>t.style.textTransform,renderHTML:t=>t.textTransform?{style:`text-transform: ${t.textTransform}`}:{}}}}]},addCommands(){return{setTextTransform:t=>({chain:e})=>e().setMark("textStyle",{textTransform:t}).run(),unsetTextTransform:()=>({chain:t,state:e})=>{const{from:n,to:o,$from:r}=e.selection;return e.doc.textBetween(n,o," ").length?t().setMark("textStyle",{textTransform:"none"}).run():t().setTextSelection({from:r.pos-r.nodeBefore.nodeSize,to:r.pos+r.nodeAfter.nodeSize}).setMark("textStyle",{textTransform:"none"}).focus().run()}}},addKeyboardShortcuts(){const t=e=>e.isUppercase?this.editor.commands.unsetTextTransform():this.editor.commands.setTextTransform("uppercase");return{"Mod-Shift-u":()=>{const e=this.editor.isActive("textStyle",{textTransform:"uppercase"});return t({isUppercase:e})},"Mod-Shift-U":()=>{const e=this.editor.isActive("textStyle",{textTransform:"uppercase"});return t({isUppercase:e})}}}}),MCt=Zu.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize.replace(/['"]+/g,""),renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t+"px"}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),OCt=Zu.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>t.style.lineHeight.replace(/['"]+/g,""),renderHTML:t=>t.lineHeight?{style:`line-height: ${t.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:t=>({chain:e})=>e().setMark("textStyle",{lineHeight:t+"px"}).run(),resetLineHeight:()=>({chain:t})=>t().setMark("textStyle",{lineHeight:null}).run()}}}),ICt=t=>yn.create({name:"themeFontStyles",priority:1e3,addOptions(){return{types:["textStyle","bulletList","orderedList","paragraph"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{themeName:{default:t,parseHTML:e=>e.getAttribute("data-theme"),renderHTML:e=>e.themeName?{"data-theme":e.themeName,class:e.themeName}:{"data-theme":t,class:e.themeName}}}}]},addCommands(){return{setThemeSettings:e=>({chain:n,state:o})=>{const{$from:r}=o.selection,i=r.parent,s=r.index();return i.child(s).type.name==="image"?!1:n().setMark("textStyle",{themeName:e}).run()},applySiblingNodeThemeSettings:()=>({chain:e,state:n})=>{const{from:o,to:r,$from:i}=n.selection,s=i.parent,a=i.index(),l=i.node(i.depth)?.type.name==="dataField"||s.maybeChild(a)?.type.name==="dataField",u=s.child(a).type.name==="image",c=f=>{const p="NormalText",g=f.index>0?s.child(f.index-1):void 0,y=f.index+1<s.childCount?s.child(f.index+1):void 0,b=g??y;if(b){const F=b.marks.find(v=>v.type.name==="textStyle");if(F)return F.attrs.themeName}return p};if(l){const f=c({index:a});return e().unsetMark("textStyle",{extendEmptyMarkRange:!0}).setThemeSettings(f).run()}if(u)return!1;const d=c({index:a}),h=i.nodeBefore?i.pos-i.nodeBefore.nodeSize:o,m=i.nodeAfter?i.pos+i.nodeAfter.nodeSize:r;return e().setTextSelection({from:h,to:m}).setThemeSettings(d).run()}}},addProseMirrorPlugins(){return[new Yn({key:new $o("syncBlockTheme"),appendTransaction:(e,n,o)=>{const r=o.tr;let i=!1;return o.doc.descendants((s,a)=>{if(s.type.name==="bulletList"||s.type.name==="orderedList"){const l=s.firstChild?.firstChild?.firstChild;if(l){const u=l.marks.find(c=>c.type.name==="textStyle")?.attrs.themeName;u&&s.attrs.themeName!==u&&(r.setNodeMarkup(a,void 0,{...s.attrs,themeName:u}),i=!0)}}if(s.type.name==="paragraph"){const l=s.firstChild;if(l){const u=l.marks.find(c=>c.type.name==="textStyle")?.attrs.themeName;u&&s.attrs.themeName!==u&&(r.setNodeMarkup(a,void 0,{...s.attrs,themeName:u}),i=!0)}}}),i?r:null}})]}}),PCt=Zu.create({name:"fontWeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontWeight:{default:null,parseHTML:t=>t.style.fontWeight,renderHTML:t=>t.fontWeight?{style:`font-weight: ${t.fontWeight}`}:{}}}}]},addCommands(){return{setFontWeight:t=>({chain:e})=>e().setMark("textStyle",{fontWeight:t}).run(),unsetFontWeight:()=>({chain:t,state:e})=>{const{from:n,to:o,$from:r}=e.selection;return e.doc.textBetween(n,o," ").length?t().setMark("textStyle",{fontWeight:"normal"}).run():t().setTextSelection({from:r.pos-r.nodeBefore.nodeSize,to:r.pos+r.nodeAfter.nodeSize}).setMark("textStyle",{fontWeight:"normal"}).focus().run()},resetFontWeight:()=>({chain:t})=>t().setMark("textStyle",{fontWeight:null}).removeEmptyTextStyle().run()}},addKeyboardShortcuts(){const t=e=>e.isBold?this.editor.commands.unsetFontWeight():this.editor.commands.setFontWeight("bold");return{"Mod-b":()=>{const e=this.editor.isActive("textStyle",{fontWeight:"bold"});return t({isBold:e})},"Mod-B":()=>{const e=this.editor.isActive("textStyle",{fontWeight:"bold"});return t({isBold:e})}}}}),WCt=Zu.create({name:"fontStyle",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontStyle:{default:null,parseHTML:t=>t.style.fontStyle,renderHTML:t=>t.fontStyle?{style:`font-style: ${t.fontStyle}`}:{}}}}]},addCommands(){return{setFontStyle:t=>({chain:e})=>e().setMark("textStyle",{fontStyle:t}).run(),unsetFontStyle:()=>({chain:t,state:e})=>{const{from:n,to:o,$from:r}=e.selection;return e.doc.textBetween(n,o," ").length?t().setMark("textStyle",{fontStyle:"normal"}).run():t().setTextSelection({from:r.pos-r.nodeBefore.nodeSize,to:r.pos+r.nodeAfter.nodeSize}).setMark("textStyle",{fontStyle:"normal"}).focus().run()},resetFontStyle:()=>({chain:t})=>t().setMark("textStyle",{fontStyle:null}).removeEmptyTextStyle().run()}},addKeyboardShortcuts(){const t=e=>e.isItalic?this.editor.commands.unsetFontStyle():this.editor.commands.setFontStyle("italic");return{"Mod-i":()=>{const e=this.editor.isActive("textStyle",{fontStyle:"italic"});return t({isItalic:e})},"Mod-I":()=>{const e=this.editor.isActive("textStyle",{fontStyle:"italic"});return t({isItalic:e})}}}}),cU=Zu.create({name:"unsubscribeLink",priority:1e3,addOptions(){return{HTMLAttributes:{"data-type":"unsubscribe-link",class:"rich-text__unsubscribe-link"}}},parseHTML(){return[{tag:'span[data-type="unsubscribe-link"]'}]},renderHTML({HTMLAttributes:t}){return["span",Ri(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnsubscribeLink:()=>({chain:t})=>t().setMark("unsubscribeLink").focus().run(),unsetUnsubscribeLink:()=>({chain:t,state:e})=>{const{from:n,to:o}=e.selection,r=e.doc.textBetween(n,o," ");return e.doc.nodeAt(n)?.type.name==="image"?t().unsetMark("unsubscribeLink").focus().run():r.length?t().setTextSelection({from:n,to:n+r.length}).unsetMark("unsubscribeLink").focus().run():t().unsetMark("unsubscribeLink",{extendEmptyMarkRange:!0}).focus().run()}}}}),HCt=Zu.create({name:"textDecoration",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textDecoration:{parseHTML:t=>t.style.textDecoration,renderHTML:t=>t.textDecoration?{style:`text-decoration: ${t.textDecoration}`}:{}}}}]},addCommands(){return{setTextDecoration:t=>({chain:e})=>e().setMark("textStyle",{textDecoration:t}).run(),unsetTextDecoration:()=>({chain:t,state:e})=>{const{from:n,to:o,$from:r}=e.selection;return e.doc.textBetween(n,o," ").length?t().setMark("textStyle",{textDecoration:"none"}).run():t().setTextSelection({from:r.pos-r.nodeBefore.nodeSize,to:r.pos+r.nodeAfter.nodeSize}).setMark("textStyle",{textDecoration:"none"}).focus().run()}}},addKeyboardShortcuts(){const t=n=>n.isUnderline?this.editor.commands.unsetTextDecoration():this.editor.commands.setTextDecoration("underline"),e=n=>n.isLineThrough?this.editor.commands.unsetTextDecoration():this.editor.commands.setTextDecoration("line-through");return{"Mod-Shift-s":()=>{const n=this.editor.isActive("textStyle",{textDecoration:"line-through"});return e({isLineThrough:n})},"Mod-u":()=>{const n=this.editor.isActive("textStyle",{textDecoration:"underline"});return t({isUnderline:n})},"Mod-U":()=>{const n=this.editor.isActive("textStyle",{textDecoration:"underline"});return t({isUnderline:n})}}}}),zCt=t=>{if(!t.content)throw new Error("Invalid document: content is missing");return{Content:t.content.map(e=>{switch(e.type){case"paragraph":return xxe(e);case"bulletList":return KCt(e);case"orderedList":return qCt(e);default:throw new Error(`Unknown node type: ${e.type}`)}})}},xxe=t=>t.content?{ParagraphNode:{ThemeName:t.attrs?t.attrs.themeName:void 0,Content:t.content.map(e=>{switch(e.type){case"text":return jCt(e);case"image":return Sxe(e);case"hardBreak":return yoe();case"dataField":return UCt(e);default:throw new Error(`Unknown node type: ${e.type}`)}})}}:{ParagraphNode:{ThemeName:t.attrs?t.attrs.themeName:void 0,Content:[yoe()]}},dU=t=>{const e=t?t.find(o=>o.type==="textStyle"):void 0,n=t?t.find(o=>o.type==="link"||o.type==="unsubscribeLink"):void 0;return{TextStyle:e?ZCt(e):void 0,CommonLinkMark:n?eyt(n):void 0}},jCt=t=>{if(typeof t.text!="string")throw new Error("Invalid text node: text is missing or not a string");const{TextStyle:e,CommonLinkMark:n}=dU(t.marks);return{TextNode:{Text:t.text,TextStyle:e,CommonLinkMark:n}}},yoe=()=>({HardBreakNode:{}}),UCt=t=>{if(!t.attrs)throw new Error("Invalid variable node: attrs is missing");const{TextStyle:e,CommonLinkMark:n}=dU(t.marks);return{DataFieldNode:{StringExpression:t.attrs.stringExpression,TextStyle:e,CommonLinkMark:n}}},KCt=t=>{if(!t.content)throw new Error("Invalid bulletList: content is missing");return{BulletListNode:{ListStyle:t.attrs?t.attrs.themeName:void 0,Content:t.content.map(Fxe)}}},qCt=t=>{if(!t.content)throw new Error("Invalid orderedList: content is missing");return{OrderedListNode:{ListStyle:t.attrs?t.attrs.themeName:void 0,Content:t.content.map(Fxe)}}},Fxe=t=>{if(!t.content)throw new Error("Invalid listItem: content is missing");return{Content:t.content.map(e=>{switch(e.type){case"paragraph":return xxe(e);case"image":return Sxe(e);default:throw new Error(`Unknown node type: ${e.type}`)}})}},Sxe=t=>{if(!t.attrs)throw new Error("Invalid image node: attrs is missing");const{CommonLinkMark:e}=dU(t.marks);return{ImageNode:{Src:t.attrs.src,Alt:t.attrs.alt,Width:t.attrs.width,Height:t.attrs.height,IsRetina:t.attrs.isRetina,CommonLinkMark:e}}},JCt=t=>t==="bold"?"Bold":"Normal",GCt=t=>t==="italic"?"Italic":"Normal",YCt=t=>t,XCt=t=>{switch(t){case"uppercase":return"Uppercase";default:return"None"}},QCt=t=>{switch(t){case"underline":return"Underline";case"line-through":return"LineThrough";default:return"None"}},boe=t=>{const e=t.replace(/px$/,"");return parseInt(e,10)},ZCt=t=>{if(!t.attrs)throw new Error("Invalid textStyle mark: attrs is missing");return{ThemeName:t.attrs.themeName,Style:{Color:t.attrs.color?t.attrs.color:void 0,FontWeight:t.attrs.fontWeight?JCt(t.attrs.fontWeight):void 0,FontStyle:t.attrs.fontStyle?GCt(t.attrs.fontStyle):void 0,FontSize:t.attrs.fontSize?boe(t.attrs.fontSize):void 0,LineHeight:t.attrs.lineHeight?boe(t.attrs.lineHeight):void 0,FontFamily:t.attrs.fontFamily?YCt(t.attrs.fontFamily):void 0,TextTransform:t.attrs.textTransform?XCt(t.attrs.textTransform):void 0,TextDecoration:t.attrs.textDecoration?QCt(t.attrs.textDecoration):void 0}}},eyt=t=>{switch(t.type){case"link":{if(!t.attrs)throw new Error("Invalid link mark: attrs.href is missing");return{LinkMark:{Href:t.attrs.href}}}case"unsubscribeLink":return{UnsubscribeLinkMark:{}};default:return}},wxe=t=>{if(!t)return null;if(/^#([A-Fa-f0-9]{3}){1,2}$/.test(t))return t;if(t.startsWith("rgb")){const n=t.replace(/[^\d,.]/g,"").split(","),o=n[0]?parseInt(n[0]):0,r=n[1]?parseInt(n[1]):0,i=n[2]?parseInt(n[2]):0;return`#${(1<<24|o<<16|r<<8|i).toString(16).slice(1)}`}if(t.startsWith("hsl")){const n=document.createElement("div");n.style.color=t,document.body.appendChild(n);const o=getComputedStyle(n).color;return document.body.removeChild(n),wxe(o)}const e=document.createElement("canvas").getContext("2d");return e?(e.fillStyle=t,e.fillStyle):null},tyt=t=>yn.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:e=>{const n=e.getAttribute("data-theme-color")??"Custom",o=wxe(e.style.color)??"#000000";return{Discriminator:n,CustomValue:o}},renderHTML:e=>{if(!e.color)return{};const n=gM({fontColor:e.color,themeColors:t.themeColors});return e.color.Discriminator==="Custom"?{"data-theme-color":e.color.Discriminator,style:`color: ${n}`}:{"data-theme-color":e.color.Discriminator}}}}}]},addCommands(){return{setColor:e=>({chain:n})=>n().setMark("textStyle",{color:e}).run(),unsetColor:()=>({chain:e})=>e().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),nyt=yn.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>{const e=t.style.fontFamily.split(",").map(n=>n.trim()).map(n=>n.replace(/^['"]|['"]$/g,"")).map(n=>n.replace(/ /g,""));return pxe.find(n=>e.includes(n))||null},renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),oyt=t=>Ol.create({name:"dataField",group:"inline",marks:"_",inline:!0,atom:!0,selectable:!0,addAttributes:()=>({stringExpression:{default:null,parseHTML:e=>JSON.parse(e.getAttribute("data-field")),renderHTML:e=>({"data-field":JSON.stringify(e.stringExpression)})}}),parseHTML:()=>[{tag:"data-field[data-field]"}],renderHTML:({node:e,HTMLAttributes:n})=>{const o=e.attrs.stringExpression,r=Bct(o).Match({ContextValueExpression:()=>"contextValue",ContextValueExpressionWithFallback:()=>"contextValueWithFallback",ConstValueExpression:i=>i.Value,TruncateValueExpression:()=>"truncate",ConcatStringExpressions:()=>"concat",NumberToStringExpression:()=>"numberToString",DataSource:i=>t.dataSourceFieldNameDelegate({dataSource:i}),UnsubscribeUrlExpression:()=>"unsubscribeUrl",RecipientEmailAddressExpression:()=>"recipientEmailAddress"});return["data-field",Ri(n,{class:"rich-text__variable","data-field":JSON.stringify(e.attrs.stringExpression),contenteditable:"false"}),r]},addCommands(){return{setVariable:e=>({chain:n,state:o})=>{const r=o.selection.$from.marks(),i=r.map(s=>({type:s.type.name,attrs:s.attrs}));return n().insertContent({type:this.name,attrs:{stringExpression:e,selectedMarks:r},marks:i}).focus().run()}}}}),kxe=t=>new Promise((e,n)=>{const o=new Image;o.onload=()=>{e({width:o.naturalWidth,height:o.naturalHeight})},o.onerror=n,o.src=t}),Exe=Ol.create({name:"image",addOptions(){return{inline:!0,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},width:{default:null},height:{default:null},isRetina:{default:!1}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",Ri(this.options.HTMLAttributes,{src:t.src,alt:t.alt,title:t.title,width:t.isRetina?t.width/2:t.width,height:t.isRetina?t.height/2:t.height,isRetina:t.isRetina})]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[Tat({find:/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,type:this.type,getAttributes:t=>{const[,,e,n,o]=t;return{src:n,alt:e,title:o}}})]},addProseMirrorPlugins(){return[new Yn({view:t=>((async()=>{const{state:e,dispatch:n}=t;e.doc.descendants((o,r)=>{if(o.type.name===this.name){const{src:i,width:s,height:a}=o.attrs;i&&(!s||!a)&&kxe(i).then(l=>{const u=e.tr.setNodeMarkup(r,void 0,{...o.attrs,width:l.width,height:l.height});n(u)})}})})(),{})})]}}),ryt=t=>[ult,Glt,llt,oM.configure({mergeNestedSpanStyles:!0}),Llt,oyt({dataSourceFieldNameDelegate:t.dataSourceFieldNameDelegate}),alt.configure({className:"has-focus",mode:"all"}),D8.configure({keepMarks:!0,keepAttributes:!0}),N8.configure({keepMarks:!0,keepAttributes:!0}),T1e,Jlt.configure({HTMLAttributes:{class:"hard-break"}}),R8.configure({HTMLAttributes:{class:"rich-text__link"},openOnClick:!1}),Exe.configure({inline:!0,HTMLAttributes:{class:"rich-text__image"}}),tyt({themeColors:t.themeColors}),ICt(t.initialThemeName),PCt,WCt,MCt,OCt,Txe,HCt,cU,nyt],iyt=t=>zCt(t.editor.getJSON()),syt=Xe({__name:"SelectItemColor",props:{isActive:{type:Boolean},color:{},label:{}},emits:["click"],setup(t,{emit:e}){const n=t,o=e;return(r,i)=>(O(),J("li",{class:$e(["bootstrap-styles dropdown-item p-0 user-select-none",{active:n.isActive}])},[_("span",{class:"bootstrap-styles d-block py-1 px-3 text-decoration-none text-reset cursor-pointer d-flex align-items-center justify-content-start",onClick:i[0]||(i[0]=s=>o("click"))},[_("i",{class:"bootstrap-styles input__color_selection d-block overflow-hidden me-2",style:he([{border:"1px solid rgba(0, 0, 0, 0.10)"},[{background:n.color}]])},null,4),U0(" "+Gt(n.label),1)])],2))}}),ayt={colorLabels:{none:"None",styleLinkedColor:"Link to style",emailBackgroundColor:"Email background",bodyColor:"Email body",primaryColor:"Primary color",secondaryColor:"Secondary color",primaryTextColor:"Primary text",secondaryTextColor:"Secondary text",cardBackgroundColor:"Product card color",buttonTextColor:"Buttons",titleColor:"Title",headingColor:"Heading",subHeadingColor:"Subheading",largeTextColor:"Large text",normalTextColor:"Text",descriptionTextColor:"Description",linkColor:"Link",custom:"Custom"}},lyt={colorLabels:{none:"Нет",styleLinkedColor:"Связать со стилем",emailBackgroundColor:"Фон письма",bodyColor:"Тело письма",primaryColor:"Основной цвет",secondaryColor:"Вторичный цвет",primaryTextColor:"Текст на основном цвете",secondaryTextColor:"Текст на вторичном цвете",cardBackgroundColor:"Цвет карточек товара",buttonTextColor:"Кнопки",titleColor:"Большой заголовок",headingColor:"Заголовок",subHeadingColor:"Подзаголовок",largeTextColor:"Большой текст",normalTextColor:"Текст",descriptionTextColor:"Описание",linkColor:"Ссылка",custom:"Пользовательский"}},uyt=Xn({en:ayt,ru:lyt}),_xe=t=>({Match:e=>{switch(t){case"Heading":return e.whenHeading();case"Title":return e.whenTitle();case"SubHeading":return e.whenSubHeading();case"LargeText":return e.whenLargeText();case"NormalText":return e.whenNormalText();case"DescriptionText":return e.whenDescriptionText();case"Link":return e.whenLink();case"Button":return e.whenButton();default:return ta(t)}}}),CM=t=>_xe(t.themeName).Match({whenHeading:()=>t.themeFontColors.HeadingColor,whenTitle:()=>t.themeFontColors.TitleColor,whenSubHeading:()=>t.themeFontColors.SubHeadingColor,whenLargeText:()=>t.themeFontColors.LargeTextColor,whenNormalText:()=>t.themeFontColors.NormalTextColor,whenDescriptionText:()=>t.themeFontColors.DescriptionTextColor,whenLink:()=>t.themeFontColors.LinkColor,whenButton:()=>t.themeFontColors.ButtonTextColor}),Iw=t=>{const{FontFamily:e,FontSettingsPresets:n,Colors:o}=t.theme,r=!!t.editor.getAttributes("textStyle")[t.styleName],i=t.editor.getAttributes("paragraph").themeName||"NormalText",s=t.editor.getAttributes("textStyle").themeName||i;if(r)return t.editor.getAttributes("textStyle")[t.styleName];const a=us({fontFamily:e,themeFontSettings:n[s],themeColor:CM({themeName:s,themeFontColors:o})});return String(a[t.styleName])},Rxe=t=>{const{FontFamily:e,FontSettingsPresets:n,Colors:o}=t.theme,r=!!t.editor.getAttributes("textStyle").color,i=t.editor.getAttributes("paragraph").themeName||"NormalText",s=t.editor.getAttributes("textStyle").themeName||i;if(r)return t.editor.getAttributes("textStyle").color;const a=us({fontFamily:e,themeFontSettings:n[s],themeColor:CM({themeName:s,themeFontColors:o})});return{Discriminator:_xe(s).Match({whenHeading:()=>"HeadingColor",whenTitle:()=>"TitleColor",whenSubHeading:()=>"SubHeadingColor",whenLargeText:()=>"LargeTextColor",whenNormalText:()=>"NormalTextColor",whenDescriptionText:()=>"DescriptionTextColor",whenLink:()=>"LinkColor",whenButton:()=>"ButtonTextColor"}),CustomValue:a.color}},cyt={class:"color-picker bootstrap-styles border rounded bg-white"},dyt={class:"bootstrap-styles p-1 mb-5 bg-white"},hyt=["value"],myt=["value"],fyt=Xe({__name:"ColorPickerModalWindow",props:{editor:{},theme:{},deps:{}},emits:["onColorChanged","onColorPickerClosed"],setup(t,{emit:e}){const n=t,o={colorLabels:uyt({localeKey:n.deps.localeKey}).colorLabels},r=q(()=>gM({fontColor:Rxe({editor:n.editor,theme:n.theme}),themeColors:n.theme.Colors})),i=Vt({color:r.value,isValidHexColor:!0}),s={StyleLinkedColor:o.colorLabels.styleLinkedColor,EmailBackgroundColor:o.colorLabels.emailBackgroundColor,BodyColor:o.colorLabels.bodyColor,PrimaryColor:o.colorLabels.primaryColor,SecondaryColor:o.colorLabels.secondaryColor,PrimaryTextColor:o.colorLabels.primaryTextColor,SecondaryTextColor:o.colorLabels.secondaryTextColor,CardBackgroundColor:o.colorLabels.cardBackgroundColor,ButtonTextColor:o.colorLabels.buttonTextColor,TitleColor:o.colorLabels.titleColor,HeadingColor:o.colorLabels.headingColor,SubHeadingColor:o.colorLabels.subHeadingColor,LargeTextColor:o.colorLabels.largeTextColor,NormalTextColor:o.colorLabels.normalTextColor,DescriptionTextColor:o.colorLabels.descriptionTextColor,LinkColor:o.colorLabels.linkColor,Custom:o.colorLabels.custom},a=["EmailBackgroundColor","BodyColor","PrimaryColor","SecondaryColor","PrimaryTextColor","SecondaryTextColor","ButtonTextColor","TitleColor","HeadingColor","SubHeadingColor","LargeTextColor","NormalTextColor","DescriptionTextColor","LinkColor"],l=yet(h=>{d("onColorChanged",{Discriminator:"Custom",CustomValue:h})},100,{leading:!1,trailing:!0}),u=h=>/^#([0-9A-Fa-f]{6})$/.test(h.trim()),c=h=>{i.isValidHexColor=u(h),i.color=h,u(h)&&d("onColorChanged",{Discriminator:"Custom",CustomValue:h})};an(()=>r.value,h=>{i.color=h,i.isValidHexColor=u(h)});const d=e;return(h,m)=>Ot((O(),J("div",null,[_("ul",cyt,[_("li",dyt,[ie(z(_ct),{modelValue:r.value,width:220,canvasHeight:220,hideInputs:!0,hideSliders:!1,mode:"hex","onUpdate:modelValue":m[0]||(m[0]=f=>z(l)(f))},null,8,["modelValue"]),_("div",{class:$e(["bootstrap-styles border bg-color-input rounded-2 d-flex justify-content-between p-14",{"is-not-valid":!i.isValidHexColor}])},[_("input",{type:"color",class:"bootstrap-styles pe-none",style:{border:"1px solid rgba(0, 0, 0, 0.1)",cursor:"default"},value:r.value},null,8,hyt),_("input",{type:"text",class:"bootstrap-styles w-100 text-uppercase ps-1",value:i.color,placeholder:"#000000",onInput:m[1]||(m[1]=f=>c(f.target.value))},null,40,myt)],2)]),(O(),J(rt,null,$n(a,f=>ie(syt,{key:f,isActive:r.value===n.theme.Colors[f],color:n.theme.Colors[f],label:s[f],onClick:()=>{d("onColorChanged",{Discriminator:f,CustomValue:n.theme.Colors[f]}),d("onColorPickerClosed")}},null,8,["isActive","color","label","onClick"])),64))])])),[[z(Km),()=>d("onColorPickerClosed")]])}}),pyt=ot(fyt,[["__scopeId","data-v-b1cc72b1"]]),gyt={tooltip:"Text color"},Cyt={tooltip:"Цвет текста"},yyt=Xn({en:gyt,ru:Cyt}),byt=["value"],vyt=Xe({__name:"ColorPicker",props:{editor:{},theme:{},isAllowToEdit:{type:Boolean},deps:{}},setup(t){const e=t,n={tooltip:yyt({localeKey:e.deps.localeKey}).tooltip},o=Vt({isColorPickerDropdownShown:!1}),r=pn(),i=pn(),{floatingStyles:s}=B0e(i,r,{whileElementsMounted:D0e,placement:"bottom",middleware:[A0e(({rects:l})=>({alignmentAxis:-l.floating.width/2-l.floating.width/2,mainAxis:15}))]}),a=q(()=>gM({fontColor:Rxe({editor:e.editor,theme:e.theme}),themeColors:e.theme.Colors}));return(l,u)=>(O(),J(rt,null,[Ot((O(),J("button",{ref_key:"richTextColorPickerBtn",ref:i,class:$e(["bootstrap-styles border rich-text-color__input rich-text__handler",{disabled:!t.isAllowToEdit}]),value:a.value,onClick:u[0]||(u[0]=()=>o.isColorPickerDropdownShown=!o.isColorPickerDropdownShown)},[_("i",{style:he([{display:"block",width:"100%",height:"100%"},{backgroundColor:a.value}])},null,4)],10,byt)),[[z(Vo),{title:n.tooltip,placement:"top"}]]),o.isColorPickerDropdownShown?(O(),Ze(pyt,{key:0,ref_key:"richTextColorPicker",ref:r,theme:e.theme,editor:e.editor,deps:e.deps.colorPickerModalWindowDeps,style:he(z(s)),onOnColorChanged:u[1]||(u[1]=c=>{e.editor.commands.setColor(c)}),onOnColorPickerClosed:u[2]||(u[2]=()=>{o.isColorPickerDropdownShown=!1,e.editor.commands.focus()})},null,8,["theme","editor","deps","style"])):Ue("",!0)],64))}}),Tyt=ot(vyt,[["__scopeId","data-v-6624477a"]]),xyt={},Fyt={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function Syt(t,e){return O(),J("svg",Fyt,[...e[0]||(e[0]=[_("path",{d:"M8.00033 10.0002L5.17188 7.17184L6.11469 6.229L8.00033 8.11464L9.88593 6.229L10.8287 7.17184L8.00033 10.0002Z",fill:"var(--gray-500)"},null,-1)])])}const Dxe=ot(xyt,[["render",Syt]]),wyt={tooltip:"Font family"},kyt={tooltip:"Шрифт"},Eyt=Xn({en:wyt,ru:kyt}),_yt={class:"bootstrap-styles dropdown"},Ryt={class:"bootstrap-styles me-14 overflow-hidden rich-text-toolbar__font-family-btn__text"},Dyt={class:"bootstrap-styles d-flex justify-content-center align-items-center"},Ayt=["onClick"],Nyt=Xe({__name:"FontFamilySelector",props:{editor:{},isAllowToEdit:{type:Boolean},theme:{},deps:{}},setup(t){const e=t,n={tooltip:Eyt({localeKey:e.deps.localeKey}).tooltip},o=oM.name,r=Vt({isOpened:!1}),i=q(()=>Iw({editor:e.editor,theme:e.theme,styleName:"fontFamily"})),s=a=>{e.editor.commands.setFontFamily(a),r.isOpened=!1,e.editor.commands.focus()};return(a,l)=>Ot((O(),J("div",_yt,[_("button",{id:"richTextDropdownFontFamily",class:$e(["bootstrap-styles d-flex justify-content-between align-items-center py-1 px-3 text-nowrap rich-text-toolbar__font-family-btn border rounded-2 overflow-hidden",{disabled:!e.isAllowToEdit,show:r.isOpened}]),type:"button",onClick:l[0]||(l[0]=u=>r.isOpened=!r.isOpened)},[_("span",Ryt,Gt(z(I5)[i.value]),1),_("i",Dyt,[ie(Dxe)])],2),_("ul",{class:$e([{show:r.isOpened},"bootstrap-styles dropdown-menu rounded-2 bg-white"]),"aria-labelledby":"richTextDropdownFontFamily"},[(O(!0),J(rt,null,$n(z(pxe),u=>(O(),J("li",{key:u,class:$e(["bootstrap-styles dropdown-item p-0",{active:e.editor.getAttributes(z(o)).fontFamily===u}]),onClick:()=>s(u)},[_("span",{class:"bootstrap-styles d-block py-1 px-3 text-decoration-none text-reset cursor-pointer",style:he({fontFamily:u})},Gt(z(I5)[u]),5)],10,Ayt))),128))],2)])),[[z(Km),()=>r.isOpened=!1],[z(Vo),{title:n.tooltip,placement:"top"}]])}}),Byt=ot(Nyt,[["__scopeId","data-v-cc496278"]]),Lyt={},$yt={xmlns:"http://www.w3.org/2000/svg",width:"8",height:"8",viewBox:"0 0 8 8",fill:"none"};function Vyt(t,e){return O(),J("svg",$yt,[...e[0]||(e[0]=[_("path",{d:"M4.00003 2.38419e-07L1 2.99997L2.00001 4L4.00003 1.99998L6.00001 4L7 2.99997L4.00003 2.38419e-07Z",fill:"var(--gray-500)"},null,-1)])])}const Axe=ot(Lyt,[["render",Vyt],["__scopeId","data-v-19c42a7a"]]),Myt={},Oyt={xmlns:"http://www.w3.org/2000/svg",width:"8",height:"8",viewBox:"0 0 8 8",fill:"none"};function Iyt(t,e){return O(),J("svg",Oyt,[...e[0]||(e[0]=[_("path",{d:"M4.00003 8L1 5.00003L2.00001 4L4.00003 6.00002L6.00001 4L7 5.00003L4.00003 8Z",fill:"var(--gray-500)"},null,-1)])])}const Nxe=ot(Myt,[["render",Iyt],["__scopeId","data-v-313c2951"]]),Pyt={},Wyt={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Hyt(t,e){return O(),J("svg",Wyt,[...e[0]||(e[0]=[_("path",{d:"M6.66634 4.00033V14.0003H5.33301V4.00033H1.33301V2.66699H10.6663V4.00033H6.66634ZM11.9997 9.33366V14.0003H10.6663V9.33366H8.66634V8.00033H13.9997V9.33366H11.9997Z",fill:"#999999"},null,-1)])])}const zyt=ot(Pyt,[["render",Hyt]]),jyt={tooltip:"Font size"},Uyt={tooltip:"Размер текста"},Kyt=Xn({en:jyt,ru:Uyt}),qyt=t=>{const{FontFamily:e,FontSettingsPresets:n,Colors:o}=t.theme,r=!!t.editor.getAttributes("textStyle").fontSize,i=t.editor.getAttributes("paragraph").themeName||"NormalText",s=t.editor.getAttributes("textStyle").themeName||i;return r?parseInt(t.editor.getAttributes("textStyle").fontSize,10):us({fontFamily:e,themeFontSettings:n[s],themeColor:CM({themeName:s,themeFontColors:o})}).fontSize},Jyt={class:"bootstrap-styles rich-text-toolbar__font-size-editor position-relative rounded-2 py-1 px-3 d-flex"},Gyt={class:"bootstrap-styles d-flex justify-content-center rich-text-icon me-14"},Yyt=["value"],Xyt={class:"bootstrap-styles rich-text-toolbar__input-button top-0 d-flex position-absolute align-items-end justify-content-center"},Qyt={class:"bootstrap-styles rich-text-toolbar__input-button bottom-0 d-flex position-absolute align-items-start justify-content-center"},Zyt=Xe({__name:"FontSizeEditor",props:{editor:{},theme:{},deps:{}},setup(t){const e=t,n={tooltip:Kyt({localeKey:e.deps.localeKey}).tooltip},o=q(()=>qyt({editor:e.editor,theme:e.theme})),r=()=>{o.value&&e.editor.commands.setFontSize(o.value+1)},i=()=>{o.value&&o.value!==1&&e.editor.commands.setFontSize(o.value-1)},s=a=>{const l=a.target;let u=parseInt(l.value);const c=100;isNaN(u)||l.value===""?(u=0,l.value="0"):u>c&&(u=c,l.value=String(c)),e.editor.commands.setFontSize(u)};return(a,l)=>Ot((O(),J("div",Jyt,[_("i",Gyt,[ie(zyt)]),_("input",{type:"number",class:"bootstrap-styles rich-text-toolbar__input-number rich-text__handler",value:o.value,onInput:s},null,40,Yyt),_("div",Xyt,[_("input",{type:"button",class:"bootstrap-styles position-absolute rich-text__handler",onClick:r}),ie(Axe)]),_("div",Qyt,[_("input",{type:"button",class:"bootstrap-styles position-absolute rich-text__handler",onClick:i}),ie(Nxe)])])),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),e0t=ot(Zyt,[["__scopeId","data-v-ba95f865"]]),t0t=Xe({__name:"SelectItemTextStyle",props:{isActive:{type:Boolean},label:{},themeFontStyle:{},themeFontColor:{}},emits:["click"],setup(t,{emit:e}){const n=t,o=e;return(r,i)=>(O(),J("li",{class:$e(["bootstrap-styles dropdown-item p-0 d-flex align-items-center px-3 cursor-pointer",{active:n.isActive}]),onClick:i[0]||(i[0]=s=>o("click"))},[_("i",{class:"bootstrap-styles input__color_selection d-block overflow-hidden me-2",style:he([{background:n.themeFontColor??"linear-gradient(135deg, rgb(51, 132, 255) 0%, rgb(202, 101, 250) 34.37%, rgb(250, 101, 101) 61.98%, rgb(250, 235, 101) 100%)"},{"min-width":"24px"}])},null,4),_("span",{class:"bootstrap-styles d-block py-1 text-decoration-none overflow-hidden",style:he([n.themeFontStyle&&{fontSize:n.themeFontStyle.FontSize+"px",fontWeight:n.themeFontStyle.IsBold?"bold":"normal",fontStyle:n.themeFontStyle.IsItalic?"italic":"normal",textDecoration:n.themeFontStyle.Decoration},{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"}])},Gt(n.label),5)],2))}}),n0t=ot(t0t,[["__scopeId","data-v-9d9afc02"]]),o0t={tooltip:"Text style",settingLabels:{title:"Title",heading:"Heading",subHeading:"Subheading",largeText:"Large text",normalText:"Text",descriptionText:"Description",link:"Link",button:"Button",custom:"Custom"}},r0t={tooltip:"Стиль текста",settingLabels:{title:"Большой заголовок",heading:"Заголовок",subHeading:"Подзаголовок",largeText:"Большой текст",normalText:"Текст",descriptionText:"Описание",link:"Ссылка",button:"Кнопка",custom:"Пользовательский"}},voe=Xn({en:o0t,ru:r0t}),i0t={class:"bootstrap-styles dropdown"},s0t={class:"bootstrap-styles rich-text-toolbar__font-style-selector__text"},a0t={class:"bootstrap-styles d-flex justify-content-center align-items-center rich-text-toolbar__icon"},l0t=Xe({__name:"ThemeSettingsSelector",props:{editor:{},theme:{},isAllowToEdit:{type:Boolean},initialThemeName:{},deps:{}},setup(t){const e=t,n=oM.name,o=Vt({isOpened:!1}),r={tooltip:voe({localeKey:e.deps.localeKey}).tooltip,settingLabels:voe({localeKey:e.deps.localeKey}).settingLabels},i={Title:r.settingLabels.title,Heading:r.settingLabels.heading,SubHeading:r.settingLabels.subHeading,LargeText:r.settingLabels.largeText,NormalText:r.settingLabels.normalText,DescriptionText:r.settingLabels.descriptionText,Link:r.settingLabels.link,Button:r.settingLabels.button,Custom:r.settingLabels.custom},s=["Title","Heading","SubHeading","LargeText","NormalText","DescriptionText","Link","Button"],a=["TitleColor","HeadingColor","SubHeadingColor","LargeTextColor","NormalTextColor","DescriptionTextColor","LinkColor","ButtonTextColor"],l=q(()=>{const c=e.initialThemeName,d=e.editor.getAttributes("paragraph").themeName||c;let h=s.find(F=>e.editor.getAttributes(n).themeName===F)||d;const{fontWeight:m,fontStyle:f,textDecoration:p,fontSize:g,fontFamily:y,lineHeight:b}=e.editor.getAttributes(n);return m||f||p||g||y||b?i.Custom:i[h]}),u=c=>{e.editor.commands.unsetMark(n),e.editor.chain().focus().setThemeSettings(c).run(),o.isOpened=!1};return(c,d)=>Ot((O(),J("div",i0t,[_("button",{id:"dropdownMenuButtonFontStyleList",class:$e(["bootstrap-styles rich-text-toolbar__font-style-selector d-flex justify-content-between align-items-center py-1 px-3 text-nowrap border rounded-2",{disabled:!e.isAllowToEdit,show:o.isOpened}]),type:"button",onClick:d[0]||(d[0]=()=>o.isOpened=!o.isOpened)},[_("span",s0t,Gt(l.value),1),_("i",a0t,[ie(Dxe)])],2),_("ul",{class:$e([{show:o.isOpened},"bootstrap-styles rich-text-toolbar__font-style-dropdown dropdown-menu rounded-2"]),"aria-labelledby":"dropdownMenuButtonFontStyleList"},[(O(),J(rt,null,$n(s,(h,m)=>ie(n0t,{key:h,isActive:e.editor.getAttributes(z(n)).themeName===h,label:i[h],themeFontStyle:e.theme.FontSettingsPresets[h],themeFontColor:e.theme.Colors[a[m]],onClick:()=>u(h)},null,8,["isActive","label","themeFontStyle","themeFontColor","onClick"])),64))],2)])),[[z(Km),()=>o.isOpened=!1],[z(Vo),{title:r.tooltip,placement:"top"}]])}}),u0t=ot(l0t,[["__scopeId","data-v-088df711"]]),c0t={},d0t={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function h0t(t,e){return O(),J("svg",d0t,[...e[0]||(e[0]=[_("path",{d:"M7.33317 2.66667H13.9998V4H7.33317V2.66667ZM3.99984 4.66667V7.33333H2.6665V4.66667H0.666504L3.33317 2L5.99984 4.66667H3.99984ZM3.99984 11.3333H5.99984L3.33317 14L0.666504 11.3333H2.6665V8.66667H3.99984V11.3333ZM7.33317 12H13.9998V13.3333H7.33317V12ZM5.99984 7.33333H13.9998V8.66667H5.99984V7.33333Z",fill:"var(--gray-500)"},null,-1)])])}const m0t=ot(c0t,[["render",h0t]]),f0t={tooltip:"Line height"},p0t={tooltip:"Высота строки"},g0t=Xn({en:f0t,ru:p0t}),C0t=t=>{const{FontFamily:e,FontSettingsPresets:n,Colors:o}=t.theme,r=!!t.editor.getAttributes("textStyle").lineHeight,i=t.editor.getAttributes("paragraph").themeName||"NormalText",s=t.editor.getAttributes("textStyle").themeName||i;return r?parseInt(t.editor.getAttributes("textStyle").lineHeight,10):us({fontFamily:e,themeFontSettings:n[s],themeColor:CM({themeName:s,themeFontColors:o})}).lineHeight},y0t={class:"bootstrap-styles rich-text-toolbar__line-height-editor position-relative rounded-2 py-1 px-3 d-flex"},b0t={class:"bootstrap-styles d-flex justify-content-center rich-text-icon me-14"},v0t=["value"],T0t={class:"bootstrap-styles rich-text-toolbar__input-button d-flex position-absolute align-items-end justify-content-center",style:{right:"10px",top:"0",width:"16px",height:"16px"}},x0t={class:"bootstrap-styles rich-text-toolbar__input-button d-flex position-absolute align-items-start justify-content-center",style:{right:"10px",bottom:"0",width:"16px",height:"16px"}},F0t=Xe({__name:"LineHeightEditor",props:{editor:{},theme:{},deps:{}},setup(t){const e=t,n={tooltip:g0t({localeKey:e.deps.localeKey}).tooltip},o=q(()=>C0t({editor:e.editor,theme:e.theme})),r=()=>{o.value&&e.editor.commands.setLineHeight(o.value+1)},i=()=>{o.value&&o.value!==1&&e.editor.commands.setLineHeight(o.value-1)},s=a=>{const l=a.target;let u=parseInt(l.value);const c=100;isNaN(u)||l.value===""?(u=0,l.value="0"):u>c&&(u=c,l.value=String(c)),e.editor.commands.setLineHeight(u)};return(a,l)=>Ot((O(),J("div",y0t,[_("i",b0t,[ie(m0t)]),_("input",{type:"number",class:"bootstrap-styles rich-text-toolbar__input-number rich-text__handler",value:o.value,onInput:s},null,40,v0t),_("div",T0t,[_("input",{type:"button",class:"bootstrap-styles position-absolute rich-text__handler",onClick:r}),ie(Axe)]),_("div",x0t,[_("input",{type:"button",class:"bootstrap-styles position-absolute rich-text__handler",onClick:i}),ie(Nxe)])])),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),S0t=ot(F0t,[["__scopeId","data-v-4e76ed1b"]]),w0t=["http:","https:","mailto:","tel:"],k0t={mounted(t,e){t.addEventListener("input",()=>{const n=t.value;let o=!1;try{const r=new URL(n);o=w0t.includes(r.protocol)}catch{o=!1}typeof e.value=="function"&&e.value(o)})}},Bxe={mounted(t,e){Toe(t,e)},updated(t,e){e.value&&Toe(t,e)}},Toe=(t,e)=>{document.activeElement!==t&&requestAnimationFrame(()=>{if(t.focus(),e.modifiers.selectAll&&t.select(),e.modifiers.end){const n=t.value.length;t.setSelectionRange(n,n)}})},E0t={},_0t={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none"};function R0t(t,e){return O(),J("svg",_0t,[...e[0]||(e[0]=[_("path",{d:"M11.2432 9.35654L10.3003 8.41374L11.2432 7.47094C12.5449 6.16921 12.5449 4.05865 11.2432 2.75691C9.94139 1.45516 7.83086 1.45516 6.52912 2.75691L5.58631 3.69972L4.6435 2.75691L5.58631 1.8141C7.40879 -0.00834608 10.3635 -0.00834608 12.186 1.8141C14.0084 3.63655 14.0084 6.59134 12.186 8.41374L11.2432 9.35654ZM9.35752 11.2422L8.41472 12.185C6.59232 14.0075 3.63752 14.0075 1.81508 12.185C-0.00736952 10.3625 -0.00736952 7.40781 1.81508 5.58533L2.75788 4.64253L3.70069 5.58533L2.75788 6.52814C1.45614 7.82987 1.45614 9.94047 2.75788 11.2422C4.05963 12.5439 6.17019 12.5439 7.47192 11.2422L8.41472 10.2994L9.35752 11.2422ZM8.88612 4.17112L9.82893 5.11393L5.1149 9.82801L4.1721 8.88514L8.88612 4.17112Z",fill:"var(--black)"},null,-1)])])}const Lxe=ot(E0t,[["render",R0t]]),D0t={label:"Link",inputPlaceholder:"https://example.com",errorNotification:"The link must contain https://, http://, mailto:, tel:",applyButton:"Save",cancelButton:"Cancel"},A0t={label:"Ссылка",inputPlaceholder:"https://example.com",errorNotification:"Ссылка должна содержать https://, http://, mailto:, tel:",applyButton:"Сохранить",cancelButton:"Отмена"},b1=Xn({en:D0t,ru:A0t}),N0t={},B0t={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function L0t(t,e){return O(),J("svg",B0t,[...e[0]||(e[0]=[_("path",{d:"M11.333 3.99967H14.6663V5.33301H13.333V13.9997C13.333 14.3679 13.0345 14.6663 12.6663 14.6663H3.33301C2.96482 14.6663 2.66634 14.3679 2.66634 13.9997V5.33301H1.33301V3.99967H4.66634V1.99967C4.66634 1.63149 4.96482 1.33301 5.33301 1.33301H10.6663C11.0345 1.33301 11.333 1.63149 11.333 1.99967V3.99967ZM11.9997 5.33301H3.99967V13.333H11.9997V5.33301ZM5.99967 7.33301H7.33301V11.333H5.99967V7.33301ZM8.66634 7.33301H9.99967V11.333H8.66634V7.33301ZM5.99967 2.66634V3.99967H9.99967V2.66634H5.99967Z",fill:"white"},null,-1)])])}const $xe=ot(N0t,[["render",L0t]]),$0t={class:"bootstrap-styles bg-white border rounded-2 add-text-link-modal-window"},V0t={class:"bootstrap-styles fw-bold mb-5 px-11 mt-10 d-block text-start"},M0t={class:"bootstrap-styles px-11 mb-2"},O0t={class:"bootstrap-styles d-flex justify-content-center align-items-center me-1"},I0t=["placeholder","value"],P0t={class:"bootstrap-styles px-11 py-5 d-flex align-items-center justify-content-end border-top"},W0t=["disabled"],H0t=Xe({__name:"AddLinkModalWindow",props:{isActive:{type:Boolean},currentHref:{},deps:{}},emits:["onClosed","onHrefChanged","onRemoved"],setup(t,{emit:e}){const n=t,o=Vt({href:n.currentHref,isValid:!0}),r=a=>{o.href=a,o.isValid=a.length>0},i={label:b1({localeKey:n.deps.localeKey}).label,inputPlaceholder:b1({localeKey:n.deps.localeKey}).inputPlaceholder,errorNotification:b1({localeKey:n.deps.localeKey}).errorNotification,applyButton:b1({localeKey:n.deps.localeKey}).applyButton,cancelButton:b1({localeKey:n.deps.localeKey}).cancelButton},s=e;return(a,l)=>Ot((O(),J("div",$0t,[_("label",V0t,Gt(i.label),1),_("div",M0t,[_("div",{class:$e(["bootstrap-styles bg-color-input border rounded-2 py-1 px-3 d-flex mb-14",{"border-danger":!o.isValid}])},[_("i",O0t,[ie(Lxe)]),Ot(_("input",{type:"text",class:"bootstrap-styles w-100",placeholder:i.inputPlaceholder,value:o.href,onInput:l[0]||(l[0]=u=>r(u.target.value))},null,40,I0t),[[z(k0t),u=>o.isValid=u],[z(Bxe),void 0,void 0,{selectAll:!0}]])],2),_("div",{class:$e(["bootstrap-styles text-start add-link-modal-window-notification",{invisible:o.isValid}])},Gt(i.errorNotification),3)]),_("div",P0t,[n.isActive?(O(),J("button",{key:0,class:"bootstrap-styles d-flex justify-content-center align-center py-1 px-3 me-auto rounded-2 add-text-link-modal-window__remove-button",onClick:l[1]||(l[1]=zo(()=>s("onRemoved"),["stop"]))},[_("i",null,[ie($xe)])])):Ue("",!0),_("button",{class:"bootstrap-styles d-flex justify-content-center align-center py-1 px-3 me-3 border border-blue-selected rounded-2 bg-blue-selected button__hover-blue-100 text-color-selected",onClick:l[2]||(l[2]=()=>s("onClosed"))},Gt(i.cancelButton),1),_("button",{class:"bootstrap-styles d-flex justify-content-center align-center py-1 px-3 border rounded-2 bg-color-selected text-white cursor-pointer",disabled:!o.href.length||!o.isValid,onClick:l[3]||(l[3]=()=>s("onHrefChanged",o.href))},Gt(i.applyButton),9,W0t)])])),[[z(Km),()=>s("onClosed")]])}}),z0t=ot(H0t,[["__scopeId","data-v-dd4e68e8"]]),j0t={};function U0t(t,e){return O(),J(rt,null,[e[0]||(e[0]=_("svg",{class:"unlinked",xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"},[_("path",{d:"M12.7432 10.3565L11.8003 9.41374L12.7432 8.47094C14.0449 7.16921 14.0449 5.05865 12.7432 3.75691C11.4414 2.45516 9.33086 2.45516 8.02912 3.75691L7.08631 4.69972L6.1435 3.75691L7.08631 2.8141C8.90879 0.991654 11.8635 0.991654 13.686 2.8141C15.5084 4.63655 15.5084 7.59134 13.686 9.41374L12.7432 10.3565ZM10.8575 12.2422L9.91472 13.185C8.09232 15.0075 5.13752 15.0075 3.31508 13.185C1.49263 11.3625 1.49263 8.40781 3.31508 6.58533L4.25788 5.64253L5.20069 6.58533L4.25788 7.52814C2.95614 8.82987 2.95614 10.9405 4.25788 12.2422C5.55963 13.5439 7.67019 13.5439 8.97192 12.2422L9.91472 11.2994L10.8575 12.2422ZM10.3861 5.17112L11.3289 6.11393L6.6149 10.828L5.6721 9.88514L10.3861 5.17112Z",fill:"black"})],-1)),e[1]||(e[1]=_("svg",{class:"linked",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[_("path",{d:"M11.7713 9.88573L10.8285 8.94287L11.7713 8.00007C12.8127 6.95867 12.8127 5.27025 11.7713 4.22885C10.7299 3.18745 9.04147 3.18745 8.00007 4.22885L7.05727 5.17166L6.11447 4.22885L7.05727 3.28605C8.6194 1.72395 11.1521 1.72395 12.7141 3.28605C14.2762 4.84814 14.2762 7.3808 12.7141 8.94287L11.7713 9.88573ZM9.88573 11.7713L8.94287 12.7141C7.3808 14.2762 4.84814 14.2762 3.28605 12.7141C1.72395 11.1521 1.72395 8.6194 3.28605 7.05727L4.22885 6.11447L5.17166 7.05727L4.22885 8.00007C3.18745 9.04147 3.18745 10.7299 4.22885 11.7713C5.27025 12.8127 6.95867 12.8127 8.00007 11.7713L8.94287 10.8285L9.88573 11.7713ZM9.88573 5.17166L10.8285 6.11447L6.11447 10.8285L5.17166 9.88573L9.88573 5.17166ZM3.85026 1.52869L5.13816 1.18359L5.82835 3.75939L4.54045 4.10449L3.85026 1.52869ZM10.1719 12.2408L11.4597 11.8957L12.1499 14.4715L10.862 14.8166L10.1719 12.2408ZM1.52869 3.85026L4.10449 4.54045L3.75939 5.82835L1.18359 5.13816L1.52869 3.85026ZM12.2408 10.1719L14.8166 10.862L14.4715 12.1499L11.8957 11.4597L12.2408 10.1719Z",fill:"black"})],-1))],64)}const K0t=ot(j0t,[["render",U0t],["__scopeId","data-v-730bc16f"]]),q0t={tooltip:"Link"},J0t={tooltip:"Ссылка"},G0t=Xn({en:q0t,ru:J0t}),Y0t={class:"bootstrap-styles d-flex rich-text-icon icon-hover"},X0t=Xe({__name:"LinkEditor",props:{editor:{},isAllowToEdit:{type:Boolean},deps:{}},setup(t){const e=t,n={tooltip:G0t({localeKey:e.deps.localeKey}).tooltip},o=R8.name,r=cU.name,i=Vt({isAddTextLinkModalWindowShown:!1}),s=q(()=>e.editor.isActive(r)),a=u=>{s.value&&e.editor.commands.unsetUnsubscribeLink(),e.editor.chain().focus().setLink({href:u}).setThemeSettings("Link").run(),i.isAddTextLinkModalWindowShown=!1},l=()=>{e.editor.chain().focus().unsetLink().applySiblingNodeThemeSettings().run(),i.isAddTextLinkModalWindowShown=!1};return(u,c)=>(O(),J(rt,null,[Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:e.editor.isActive(z(o)),disabled:!e.editor.isActive(z(o))&&!e.isAllowToEdit}]),onClick:c[0]||(c[0]=d=>{i.isAddTextLinkModalWindowShown=!i.isAddTextLinkModalWindowShown})},[_("i",Y0t,[e.editor.isActive(z(o))?(O(),Ze(K0t,{key:1})):(O(),Ze(Lxe,{key:0}))])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]]),i.isAddTextLinkModalWindowShown?(O(),Ze(z0t,{key:0,isActive:e.editor.isActive(z(o)),currentHref:e.editor.isActive(z(o))?e.editor.getAttributes(z(o)).href:"",deps:e.deps.addLinkModalWindowDeps,onOnRemoved:c[1]||(c[1]=()=>l()),onOnClosed:c[2]||(c[2]=d=>i.isAddTextLinkModalWindowShown=!1),onOnHrefChanged:c[3]||(c[3]=d=>a(d))},null,8,["isActive","currentHref","deps"])):Ue("",!0)],64))}}),Q0t=ot(X0t,[["__scopeId","data-v-6460a995"]]),Z0t={label:"URL",placeholder:"URL...",cancel:"Cancel",apply:"Save",removeTooltip:"Delete image"},ebt={label:"URL",placeholder:"URL...",cancel:"Отмена",apply:"Сохранить",removeTooltip:"Удалить изображение"},v1=Xn({en:Z0t,ru:ebt}),tbt={class:"bootstrap-styles bg-white border rounded-2 add-image-src-modal-window"},nbt={class:"bootstrap-styles fw-bold mb-5 px-11 mt-10 d-block text-start"},obt={class:"bootstrap-styles px-11 mb-11"},rbt=["placeholder","value"],ibt={class:"bootstrap-styles px-11 py-5 d-flex align-items-center justify-content-end border-top"},sbt=["disabled"],abt=Xe({__name:"AddImageSrcModalWindow",props:{isActive:{type:Boolean},src:{},width:{},height:{},isRetina:{type:Boolean},deps:{}},emits:["onClosed","onRemoved","onImageSrcChanged"],setup(t,{emit:e}){const n=t,o=Vt({src:n.src,width:n.width,height:n.height,isBroken:!1}),r={label:v1({localeKey:n.deps.localeKey}).label,placeholder:v1({localeKey:n.deps.localeKey}).placeholder,cancel:v1({localeKey:n.deps.localeKey}).cancel,apply:v1({localeKey:n.deps.localeKey}).apply,removeTooltip:v1({localeKey:n.deps.localeKey}).removeTooltip},i=Qye(l=>{kxe(l).then(u=>{o.width=u.width,o.height=u.height,o.isBroken=!1,o.src=l}).catch(()=>{o.src=l,o.isBroken=!0})},500),s=()=>{a("onImageSrcChanged",{src:o.src,width:o.width,height:o.height,isRetina:!1})},a=e;return(l,u)=>Ot((O(),J("div",tbt,[_("label",nbt,Gt(r.label),1),_("div",obt,[_("div",{class:$e(["bootstrap-styles bg-color-input border rounded-2 py-1 px-3 d-flex",{"border-danger":o.isBroken}])},[Ot(_("input",{type:"text",class:"bootstrap-styles w-100",placeholder:r.placeholder,value:o.src,onInput:u[0]||(u[0]=c=>z(i)(c.target.value))},null,40,rbt),[[z(Bxe),void 0,void 0,{selectAll:!0}]])],2)]),_("div",ibt,[n.isActive?Ot((O(),J("button",{key:0,class:"bootstrap-styles d-flex justify-content-center align-center py-1 px-3 me-auto rounded-2 add-image-src-modal-window__remove-button",onClick:u[1]||(u[1]=zo(()=>a("onRemoved"),["stop"]))},[_("i",null,[ie($xe)])])),[[z(Vo),{placement:"top",title:r.removeTooltip}]]):Ue("",!0),_("button",{class:"bootstrap-styles d-flex justify-content-center align-center py-1 px-3 me-3 border border-blue-selected rounded-2 bg-blue-selected button__hover-blue-100 text-color-selected",onClick:u[2]||(u[2]=zo(()=>a("onClosed"),["stop"]))},Gt(r.cancel),1),_("button",{class:"bootstrap-styles d-flex justify-content-center align-center py-1 px-3 border rounded-2 bg-color-selected text-white cursor-pointer",disabled:!o.src.length||o.isBroken,onClick:u[3]||(u[3]=zo(()=>s(),["stop"]))},Gt(r.apply),9,sbt)])])),[[z(Km),()=>a("onClosed")]])}}),lbt=ot(abt,[["__scopeId","data-v-35966ae0"]]),ubt={},cbt={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function dbt(t,e){return O(),J("svg",cbt,[...e[0]||(e[0]=[_("path",{d:"M1.99453 14C1.62936 14 1.33333 13.7034 1.33333 13.3377V2.66227C1.33333 2.29651 1.63687 2 1.99453 2H14.0055C14.3707 2 14.6667 2.29663 14.6667 2.66227V13.3377C14.6667 13.7035 14.3631 14 14.0055 14H1.99453ZM13.3333 10V3.33333H2.66666V12.6667L9.33333 6L13.3333 10ZM13.3333 11.8856L9.33333 7.8856L4.55228 12.6667H13.3333V11.8856ZM5.33333 7.33333C4.59695 7.33333 3.99999 6.7364 3.99999 6C3.99999 5.26362 4.59695 4.66667 5.33333 4.66667C6.06971 4.66667 6.66666 5.26362 6.66666 6C6.66666 6.7364 6.06971 7.33333 5.33333 7.33333Z",fill:"#2F2F2F"},null,-1)])])}const hbt=ot(ubt,[["render",dbt]]),mbt={tooltip:"Image",retinaLabel:"For retina screens"},fbt={tooltip:"Изображение",retinaLabel:"Для retina-экранов"},xoe=Xn({en:mbt,ru:fbt}),pbt=["checked"],gbt=Xe({__name:"Checkbox",props:{checked:{type:Boolean}},emits:["change"],setup(t,{emit:e}){const n=t,o=e;return(r,i)=>(O(),J("input",{class:"bootstrap-styles me-1 cursor-pointer",checked:n.checked,type:"checkbox","aria-label":"Checkbox for following text input",onChange:i[0]||(i[0]=s=>o("change"))},null,40,pbt))}}),Cbt=ot(gbt,[["__scopeId","data-v-6a8c2252"]]),ybt={class:"bootstrap-styles rich-text-icon icon-hover d-flex"},bbt={key:0,class:"bootstrap-styles d-flex align-items-center ms-14 me-1"},vbt={for:"rich-text__retina-checkbox",class:"bootstrap-styles label__checkbox-input text-nowrap"},Tbt=Xe({__name:"ImageEditor",props:{editor:{},deps:{}},setup(t){const e=t,n={tooltip:xoe({localeKey:e.deps.localeKey}).tooltip,retinaLabel:xoe({localeKey:e.deps.localeKey}).retinaLabel},o=Exe.name,r=Vt({isAddImageSrcModalWindowShown:!1}),i=async()=>{const l=e.editor.view.state.selection.anchor,{src:u,width:c,height:d,isRetina:h}=e.editor.getAttributes(o);e.editor.chain().focus().updateAttributes("image",{src:u,width:c,height:d,isRetina:!h}).setNodeSelection(l).run()},s=l=>{const u=e.editor.view.state.selection.anchor;e.editor.isActive(o)?e.editor.chain().focus().updateAttributes("image",{src:l.src,width:l.width,height:l.height,alt:"img",isRetina:!1}).setNodeSelection(u).run():e.editor.chain().focus().setImage({src:l.src,width:l.width,height:l.height,alt:"img",isRetina:!1}).setNodeSelection(u).run(),r.isAddImageSrcModalWindowShown=!1},a=()=>{e.editor.commands.deleteSelection(),r.isAddImageSrcModalWindowShown=!1};return(l,u)=>(O(),J(rt,null,[Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button__image",{active:e.editor.isActive(z(o))}]),onClick:u[0]||(u[0]=c=>r.isAddImageSrcModalWindowShown=!r.isAddImageSrcModalWindowShown)},[_("i",ybt,[ie(hbt)])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]]),e.editor.isActive(z(o))?(O(),J("div",bbt,[ie(Cbt,{id:"rich-text__retina-checkbox",checked:e.editor.isActive(z(o),{isRetina:!0}),onChange:u[1]||(u[1]=()=>i())},null,8,["checked"]),_("label",vbt,Gt(n.retinaLabel),1)])):Ue("",!0),r.isAddImageSrcModalWindowShown?(O(),Ze(lbt,{key:1,isActive:e.editor.isActive(z(o)),src:e.editor.getAttributes(z(o)).src?e.editor.getAttributes(z(o)).src:"",width:e.editor.getAttributes(z(o)).width?e.editor.getAttributes(z(o)).width:0,height:e.editor.getAttributes(z(o)).height?e.editor.getAttributes(z(o)).height:0,isRetina:e.editor.getAttributes(z(o)).isRetina?e.editor.getAttributes(z(o)).isRetina:!1,deps:e.deps.addImageSrcModalWindowDeps,onOnRemoved:u[2]||(u[2]=()=>a()),onOnClosed:u[3]||(u[3]=c=>r.isAddImageSrcModalWindowShown=!1),onOnImageSrcChanged:u[4]||(u[4]=c=>s({src:c.src,width:c.width,height:c.height}))},null,8,["isActive","src","width","height","isRetina","deps"])):Ue("",!0)],64))}}),xbt=ot(Tbt,[["__scopeId","data-v-cf315655"]]),Fbt={},Sbt={xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"};function wbt(t,e){return O(),J("svg",Sbt,[...e[0]||(e[0]=[_("path",{d:"M5.83333 7.33317H8.83333C9.7538 7.33317 10.5 6.58698 10.5 5.6665C10.5 4.74603 9.7538 3.99984 8.83333 3.99984H5.83333V7.33317ZM12.5 10.3332C12.5 11.99 11.1569 13.3332 9.5 13.3332H4.5V2.6665H8.83333C10.4902 2.6665 11.8333 4.00965 11.8333 5.6665C11.8333 6.46938 11.5179 7.19857 11.0043 7.73704C11.8986 8.2563 12.5 9.2245 12.5 10.3332ZM5.83333 8.6665V11.9998H9.5C10.4205 11.9998 11.1667 11.2536 11.1667 10.3332C11.1667 9.4127 10.4205 8.6665 9.5 8.6665H5.83333Z",fill:"var(--black)"},null,-1)])])}const kbt=ot(Fbt,[["render",wbt]]),Ebt={tooltip:"Bold"},_bt={tooltip:"Полужирный"},Rbt=Xn({en:Ebt,ru:_bt}),Dbt={class:"bootstrap-styles d-flex rich-text-icon icon-hover"},Abt=Xe({__name:"FontWeightEditor",props:{editor:{},theme:{},isAllowToEdit:{type:Boolean},deps:{}},setup(t){const e=t,n={tooltip:Rbt({localeKey:e.deps.localeKey}).tooltip},o=q(()=>Iw({editor:e.editor,theme:e.theme,styleName:"fontWeight"})==="bold"),r=()=>{o.value?e.editor.chain().focus().unsetFontWeight().run():e.editor.chain().focus().setFontWeight("bold").run(),e.editor.commands.focus()};return(i,s)=>Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:o.value,disabled:!e.isAllowToEdit&&!o.value}]),onClick:s[0]||(s[0]=()=>r())},[_("i",Dbt,[ie(kbt)])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),Nbt=ot(Abt,[["__scopeId","data-v-0e22dbf6"]]),Bbt={},Lbt={xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"};function $bt(t,e){return O(),J("svg",Lbt,[...e[0]||(e[0]=[_("path",{d:"M11.9359 9.33317C12.0897 9.67724 12.1667 10.0594 12.1667 10.4796C12.1667 11.3748 11.8175 12.0742 11.1191 12.5778C10.4206 13.0814 9.45567 13.3332 8.22413 13.3332C7.13116 13.3332 6.0489 13.0788 4.97728 12.5702V11.0671C5.99025 11.652 7.0272 11.9445 8.08813 11.9445C9.78887 11.9445 10.6419 11.4562 10.6472 10.4796C10.6472 10.0624 10.5033 9.70637 10.2154 9.41137C10.1893 9.38464 10.1626 9.35857 10.1354 9.33317H2.5V7.99984H14.5V9.33317H11.9359ZM9.21733 7.33317H5.58605C5.47107 7.2287 5.36411 7.11264 5.26517 6.98504C4.97728 6.61373 4.83333 6.16356 4.83333 5.63455C4.83333 4.81052 5.14389 4.10984 5.76499 3.5325C6.38611 2.95516 7.34707 2.6665 8.64793 2.6665C9.62893 2.6665 10.5673 2.88522 11.4629 3.32268V4.75711C10.6632 4.29931 9.7862 4.07042 8.83187 4.07042C7.17913 4.07042 6.35278 4.59179 6.35278 5.63455C6.35278 5.91432 6.49806 6.15848 6.78862 6.36703C7.07919 6.57558 7.43773 6.74217 7.8642 6.86677C8.27767 6.98757 8.72873 7.14304 9.21733 7.33317Z",fill:"black"},null,-1)])])}const Vbt=ot(Bbt,[["render",$bt]]),Mbt={tooltip:"Strikethrough"},Obt={tooltip:"Зачеркнутый"},Ibt=Xn({en:Mbt,ru:Obt}),Pbt={class:"bootstrap-styles d-flex rich-text-icon icon-hover"},Wbt=Xe({__name:"LineThroughEditor",props:{editor:{},isAllowToEdit:{type:Boolean},theme:{},deps:{}},setup(t){const e=t,n={tooltip:Ibt({localeKey:e.deps.localeKey}).tooltip},o=q(()=>Iw({editor:e.editor,theme:e.theme,styleName:"textDecoration"})==="line-through"),r=()=>{o.value?e.editor.chain().focus().unsetTextDecoration().run():e.editor.chain().focus().setTextDecoration("line-through").run(),e.editor.commands.focus()};return(i,s)=>Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:o.value,disabled:!t.isAllowToEdit&&!o.value}]),onClick:s[0]||(s[0]=a=>r())},[_("i",Pbt,[ie(Vbt)])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),Hbt=ot(Wbt,[["__scopeId","data-v-fffc32ef"]]),zbt={},jbt={xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"};function Ubt(t,e){return O(),J("svg",jbt,[...e[0]||(e[0]=[_("path",{d:"M5.83366 2V8C5.83366 9.47273 7.02757 10.6667 8.50033 10.6667C9.97306 10.6667 11.167 9.47273 11.167 8V2H12.5003V8C12.5003 10.2091 10.7095 12 8.50033 12C6.29119 12 4.50033 10.2091 4.50033 8V2H5.83366ZM3.16699 13.3333H13.8337V14.6667H3.16699V13.3333Z",fill:"black"},null,-1)])])}const Kbt=ot(zbt,[["render",Ubt]]),qbt={tooltip:"Underline"},Jbt={tooltip:"Подчеркнутый"},Gbt=Xn({en:qbt,ru:Jbt}),Ybt={class:"bootstrap-styles d-flex rich-text-icon icon-hover"},Xbt=Xe({__name:"UnderlineEditor",props:{editor:{},isAllowToEdit:{type:Boolean},theme:{},deps:{}},setup(t){const e=t,n={tooltip:Gbt({localeKey:e.deps.localeKey}).tooltip},o=q(()=>Iw({editor:e.editor,theme:e.theme,styleName:"textDecoration"})==="underline"),r=()=>{o.value?e.editor.chain().focus().unsetTextDecoration().run():e.editor.chain().focus().setTextDecoration("underline").run()};return(i,s)=>Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:o.value,disabled:!t.isAllowToEdit&&!o.value}]),onClick:s[0]||(s[0]=()=>r())},[_("i",Ybt,[ie(Kbt)])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),Qbt=ot(Xbt,[["__scopeId","data-v-ae63be68"]]),Zbt={},evt={xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"};function tvt(t,e){return O(),J("svg",evt,[...e[0]||(e[0]=[_("path",{d:"M10.4998 13.3332H5.1665V11.9998H7.11758L8.52817 3.99984H6.49984V2.6665H11.8332V3.99984H9.8821L8.4715 11.9998H10.4998V13.3332Z",fill:"black"},null,-1)])])}const nvt=ot(Zbt,[["render",tvt]]),ovt={tooltip:"Italic"},rvt={tooltip:"Курсив"},ivt=Xn({en:ovt,ru:rvt}),svt={class:"bootstrap-styles d-flex rich-text-icon icon-hover"},avt=Xe({__name:"FontStyleEditor",props:{editor:{},isAllowToEdit:{type:Boolean},theme:{},deps:{}},setup(t){const e=t,n={tooltip:ivt({localeKey:e.deps.localeKey}).tooltip},o=q(()=>Iw({editor:e.editor,theme:e.theme,styleName:"fontStyle"})==="italic"),r=()=>{o.value?e.editor.chain().focus().unsetFontStyle().run():e.editor.chain().focus().setFontStyle("italic").run(),e.editor.commands.focus()};return(i,s)=>Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:o.value,disabled:!t.isAllowToEdit&&!o.value}]),onClick:s[0]||(s[0]=()=>r())},[_("i",svt,[ie(nvt)])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),lvt=ot(avt,[["__scopeId","data-v-ac6b2276"]]),uvt={},cvt={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function dvt(t,e){return O(),J("svg",cvt,[...e[0]||(e[0]=[_("path",{d:"M7.49699 9.99999H3.16912L1.83578 13.3333H0.399734L4.6664 2.66666H5.99973L10.2664 13.3333H8.83033L7.49699 9.99999ZM6.96366 8.66666L5.33307 4.5901L3.70245 8.66666H6.96366ZM13.9997 8.35672V7.99999H15.3331V13.3333H13.9997V12.9766C13.6075 13.2035 13.1521 13.3333 12.6664 13.3333C11.1937 13.3333 9.99973 12.1394 9.99973 10.6667C9.99973 9.19392 11.1937 7.99999 12.6664 7.99999C13.1521 7.99999 13.6075 8.12986 13.9997 8.35672ZM12.6664 12C13.4028 12 13.9997 11.4031 13.9997 10.6667C13.9997 9.93026 13.4028 9.33332 12.6664 9.33332C11.93 9.33332 11.3331 9.93026 11.3331 10.6667C11.3331 11.4031 11.93 12 12.6664 12Z",fill:"black"},null,-1)])])}const hvt=ot(uvt,[["render",dvt]]),mvt={tooltip:"Uppercase"},fvt={tooltip:"Заглавные"},pvt=Xn({en:mvt,ru:fvt}),gvt={class:"bootstrap-styles d-flex rich-text-icon icon-hover"},Cvt=Xe({__name:"TextTransformEditor",props:{editor:{},isAllowToEdit:{type:Boolean},theme:{},deps:{}},setup(t){const e=t,n={tooltip:pvt({localeKey:e.deps.localeKey}).tooltip},o=Txe.name,r=q(()=>e.editor.isActive({[o]:"uppercase"})),i=()=>{r.value?e.editor.commands.unsetTextTransform():e.editor.commands.setTextTransform("uppercase"),e.editor.commands.focus()};return(s,a)=>Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:e.editor.isActive({[z(o)]:"uppercase"}),disabled:!t.isAllowToEdit&&!e.editor.isActive({[z(o)]:"uppercase"})}]),onClick:a[0]||(a[0]=l=>i())},[_("i",gvt,[ie(hvt)])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),yvt=ot(Cvt,[["__scopeId","data-v-20dea8b8"]]),bvt={},vvt={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Tvt(t,e){return O(),J("svg",vvt,[...e[0]||(e[0]=[_("path",{d:"M12.2432 8.47094C13.5449 7.16921 13.5449 5.05865 12.2432 3.75691C10.9414 2.45516 8.83086 2.45516 7.52912 3.75691L6.58631 4.69972L5.6435 3.75691L6.58631 2.8141C8.40879 0.991654 11.3635 0.991654 13.186 2.8141C15.0084 4.63655 15.0084 7.59134 13.186 9.41374L12.2432 8.47094ZM9.41472 13.185C7.59232 15.0075 4.63752 15.0075 2.81508 13.185C0.99263 11.3625 0.99263 8.40781 2.81508 6.58533L3.75788 5.64253L4.70069 6.58533L3.75788 7.52814C2.45614 8.82987 2.45614 10.9405 3.75788 12.2422C5.05963 13.5439 7.17019 13.5439 8.47192 12.2422L9.41472 13.185ZM9.88612 5.17112L10.8289 6.11393L6.1149 10.828L5.1721 9.88514L9.88612 5.17112Z",fill:"#2F2F2F"},null,-1),_("path",{d:"M14.714 13.7712L13.2998 12.357L14.714 10.9428L13.7712 10L12.357 11.4142L10.9428 10L10 10.9428L11.4142 12.357L10 13.7712L10.9428 14.714L12.357 13.2998L13.7712 14.714L14.714 13.7712Z",fill:"#2F2F2F"},null,-1)])])}const xvt=ot(bvt,[["render",Tvt]]),Fvt={tooltip:"Unsubscribe link"},Svt={tooltip:"Ссылка на отписку"},wvt=Xn({en:Fvt,ru:Svt}),kvt={class:"bootstrap-styles d-flex rich-text-icon icon-hover"},Evt=Xe({__name:"UnsubscribeLinkEditor",props:{editor:{},isAllowToEdit:{type:Boolean},theme:{},deps:{}},setup(t){const e=t,n={tooltip:wvt({localeKey:e.deps.localeKey}).tooltip},o=cU.name,r=R8.name,i=q(()=>e.editor.isActive(r)),s=()=>{i.value&&e.editor.commands.unsetLink(),e.editor.isActive(o)?e.editor.chain().unsetUnsubscribeLink().applySiblingNodeThemeSettings().run():e.editor.chain().setUnsubscribeLink().setThemeSettings("Link").run()};return(a,l)=>Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:e.editor.isActive(z(o)),disabled:!e.editor.isActive(z(o))&&!e.isAllowToEdit}]),onClick:l[0]||(l[0]=()=>s())},[_("i",kvt,[ie(xvt)])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),_vt=ot(Evt,[["__scopeId","data-v-9ee287d3"]]),Rvt={},Dvt={xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"};function Avt(t,e){return O(),J("svg",Dvt,[...e[0]||(e[0]=[_("path",{d:"M6.16699 4.66667C6.16699 3.93029 5.57004 3.33333 4.83366 3.33333C4.09728 3.33333 3.50033 3.93029 3.50033 4.66667C3.50033 5.40305 4.09728 6 4.83366 6C5.57004 6 6.16699 5.40305 6.16699 4.66667ZM7.50033 4.66667C7.50033 6.13943 6.30642 7.33333 4.83366 7.33333C3.3609 7.33333 2.16699 6.13943 2.16699 4.66667C2.16699 3.19391 3.3609 2 4.83366 2C6.30642 2 7.50033 3.19391 7.50033 4.66667ZM14.5003 2.66667H9.16699V4H14.5003V2.66667ZM14.5003 7.33333H9.16699V8.66667H14.5003V7.33333ZM14.5003 12H9.16699V13.3333H14.5003V12ZM4.83366 12.6667C4.09728 12.6667 3.50033 12.0697 3.50033 11.3333C3.50033 10.5969 4.09728 10 4.83366 10C5.57004 10 6.16699 10.5969 6.16699 11.3333C6.16699 12.0697 5.57004 12.6667 4.83366 12.6667ZM4.83366 14C6.30642 14 7.50033 12.8061 7.50033 11.3333C7.50033 9.8606 6.30642 8.66667 4.83366 8.66667C3.3609 8.66667 2.16699 9.8606 2.16699 11.3333C2.16699 12.8061 3.3609 14 4.83366 14Z",fill:"black"},null,-1)])])}const Nvt=ot(Rvt,[["render",Avt]]),Bvt={tooltip:"Bullet list"},Lvt={tooltip:"Маркированный список"},$vt=Xn({en:Bvt,ru:Lvt}),Vvt={class:"bootstrap-styles d-flex rich-text-icon icon-hover"},Mvt=Xe({__name:"BulletListEditor",props:{editor:{},deps:{}},setup(t){const e=t,n={tooltip:$vt({localeKey:e.deps.localeKey}).tooltip},o=D8.name,r=()=>{e.editor.chain().focus().toggleBulletList().run()};return(i,s)=>Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:e.editor.isActive(z(o))}]),onClick:s[0]||(s[0]=()=>r())},[_("i",Vvt,[ie(Nvt)])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),Ovt=ot(Mvt,[["__scopeId","data-v-c64632e3"]]),Ivt={},Pvt={xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"};function Wvt(t,e){return O(),J("svg",Pvt,[...e[0]||(e[0]=[_("path",{d:"M4.33382 2.33301H3.64521L2.66699 2.59512V3.63022L3.33367 3.45155L3.33378 5.66634H2.50033V6.66634H5.16699V5.66634H4.33382V2.33301ZM7.16699 2.66634H14.5003V3.99967H7.16699V2.66634ZM7.16699 7.33301H14.5003V8.66634H7.16699V7.33301ZM7.16699 11.9997H14.5003V13.333H7.16699V11.9997ZM2.41699 10.4163C2.41699 9.63394 3.05125 8.99967 3.83366 8.99967C4.61607 8.99967 5.25033 9.63394 5.25033 10.4163C5.25033 10.7401 5.14155 11.0388 4.95864 11.2775L4.95547 11.2816L4.04424 12.333H5.16699V13.333H2.50041L2.50005 12.5854L4.14813 10.6897C4.21186 10.6165 4.25033 10.5211 4.25033 10.4163C4.25033 10.1862 4.06378 9.99967 3.83366 9.99967C3.61618 9.99967 3.43748 10.1664 3.41864 10.3789L3.41039 10.583H2.41699V10.4163Z",fill:"black"},null,-1)])])}const Hvt=ot(Ivt,[["render",Wvt]]),zvt={tooltip:"Ordered list"},jvt={tooltip:"Нумерованный список"},Uvt=Xn({en:zvt,ru:jvt}),Kvt={class:"bootstrap-styles d-flex rich-text-icon icon-hover"},qvt=Xe({__name:"OrderedListEditor",props:{editor:{},deps:{}},setup(t){const e=t,n={tooltip:Uvt({localeKey:e.deps.localeKey}).tooltip},o=N8.name,r=()=>{e.editor.chain().focus().toggleOrderedList().run()};return(i,s)=>Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:e.editor.isActive(z(o))}]),onClick:s[0]||(s[0]=()=>r())},[_("i",Kvt,[ie(Hvt)])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),Jvt=ot(qvt,[["__scopeId","data-v-aaa43948"]]),Gvt={},Yvt={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Xvt(t,e){return O(),J("svg",Yvt,[...e[0]||(e[0]=[_("path",{d:"M14 13.9995H2V12.6665H14V13.9995ZM14 10.6665H2V9.3335H14V10.6665ZM4.29102 7.3335H2.00684V5.99951H4.29102V7.3335ZM10.4434 7.3335H5.55664V2.68896H10.4434V7.3335ZM14 7.3335H11.7158V5.99951H14V7.3335ZM4.29102 3.99951H2.00684V2.6665H4.29102V3.99951ZM14 3.99951H11.7158V2.6665H14V3.99951Z",fill:"var(--black)"},null,-1)])])}const Foe=ot(Gvt,[["render",Xvt]]),Qvt={},Zvt={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function e1t(t,e){return O(),J("svg",Zvt,[...e[0]||(e[0]=[_("path",{d:"M14 13.9995H2V12.6665H14V13.9995ZM10.4434 10.6548H5.55664V6.01123H10.4434V10.6548ZM4.29102 10.6245H2.00684V9.29053H4.29102V10.6245ZM14 10.6245H11.7158V9.29053H14V10.6245ZM4.29102 7.29053H2.00684V5.95752H4.29102V7.29053ZM14 7.29053H11.7158V5.95752H14V7.29053Z",fill:"var(--black)"},null,-1),_("path",{d:"M14 2.6665H2V3.99984H14V2.6665Z",fill:"var(--black)"},null,-1)])])}const Soe=ot(Qvt,[["render",e1t]]),t1t={},n1t={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function o1t(t,e){return O(),J("svg",n1t,[...e[0]||(e[0]=[_("path",{d:"M14 2.6665H2V3.99951H14V2.6665ZM14 5.99951H2V7.33252H14V5.99951ZM4.29102 9.33252H2.00684V10.6665H4.29102V9.33252ZM10.4434 9.33252H5.55664V13.9771H10.4434V9.33252ZM14 9.33252H11.7158V10.6665H14V9.33252ZM4.29102 12.6665H2.00684V13.9995H4.29102V12.6665ZM14 12.6665H11.7158V13.9995H14V12.6665Z",fill:"var(--black)"},null,-1)])])}const woe=ot(t1t,[["render",o1t]]),r1t={},i1t={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function s1t(t,e){return O(),J("svg",i1t,[...e[0]||(e[0]=[_("path",{d:"M14 11.9775H2V10.6445H14V11.9775ZM4.29102 8.64453H2.00684V7.31055H4.29102V8.64453ZM10.4434 8.64453H5.55664V4H10.4434V8.64453ZM14 8.64453H11.7158V7.31055H14V8.64453Z",fill:"var(--black)"},null,-1)])])}const koe=ot(r1t,[["render",s1t]]),a1t={tooltip:"Vertical image alignment"},l1t={tooltip:"Выравнивание картинок по вертикали"},u1t=Xn({en:a1t,ru:l1t}),c1t={class:"bootstrap-styles vertical-align-editor dropdown rounded"},d1t={class:"bootstrap-styles rich-text-icon icon-hover d-flex justify-content-center align-items-center"},h1t={class:"bootstrap-styles rich-text-icon icon-hover d-flex justify-content-center align-items-center"},m1t={class:"bootstrap-styles rich-text-icon icon-hover d-flex justify-content-center align-items-center"},f1t={class:"bootstrap-styles rich-text-icon icon-hover d-flex justify-content-center align-items-center"},p1t={class:"bootstrap-styles rich-text-icon icon-hover d-flex justify-content-center align-items-center"},g1t=Xe({__name:"VerticalAlignEditor",props:{editor:{},currentVerticalAlign:{},deps:{}},emits:["onVerticalAlignVariantChanged"],setup(t,{emit:e}){const n=t,o={tooltip:u1t({localeKey:n.deps.localeKey}).tooltip},r=Vt({isOpened:!1}),i=a=>{s("onVerticalAlignVariantChanged",a),r.isOpened=!1},s=e;return(a,l)=>Ot((O(),J("div",c1t,[_("button",{id:"richTextDropdownVerticalAlign",class:$e(["bootstrap-styles p-1 rounded rich-text-button",{show:r.isOpened}]),type:"button",onClick:l[0]||(l[0]=u=>r.isOpened=!r.isOpened)},[_("i",d1t,[n.currentVerticalAlign==="Baseline"?(O(),Ze(koe,{key:0})):Ue("",!0),n.currentVerticalAlign==="Top"?(O(),Ze(Foe,{key:1})):Ue("",!0),n.currentVerticalAlign==="Middle"?(O(),Ze(Soe,{key:2})):Ue("",!0),n.currentVerticalAlign==="Bottom"?(O(),Ze(woe,{key:3})):Ue("",!0)])],2),_("div",{class:$e([{show:r.isOpened},"bootstrap-styles vertical-align-dropdown bg-white p-1"]),"aria-labelledby":"richTextDropdownVerticalAlign"},[_("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button me-14",{active:n.currentVerticalAlign==="Baseline"}]),onClick:l[1]||(l[1]=()=>i("Baseline"))},[_("i",h1t,[ie(koe)])],2),_("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button me-14",{active:n.currentVerticalAlign==="Top"}]),onClick:l[2]||(l[2]=()=>i("Top"))},[_("i",m1t,[ie(Foe)])],2),_("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button me-14",{active:n.currentVerticalAlign==="Middle"}]),onClick:l[3]||(l[3]=()=>i("Middle"))},[_("i",f1t,[ie(Soe)])],2),_("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:n.currentVerticalAlign==="Bottom"}]),onClick:l[4]||(l[4]=()=>i("Bottom"))},[_("i",p1t,[ie(woe)])],2)],2)])),[[z(Km),()=>r.isOpened=!1],[z(Vo),{title:o.tooltip,placement:"top"}]])}}),C1t=ot(g1t,[["__scopeId","data-v-4a636ae8"]]),y1t={},b1t={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function v1t(t,e){return O(),J("svg",b1t,[...e[0]||(e[0]=[_("path",{d:"M2 2.6665H14V3.99984H2V2.6665ZM2 12.6665H11.3333V13.9998H2V12.6665ZM2 9.33317H14V10.6665H2V9.33317ZM2 5.99984H11.3333V7.33317H2V5.99984Z",fill:"var(--black)"},null,-1)])])}const Eoe=ot(y1t,[["render",v1t]]),T1t={},x1t={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function F1t(t,e){return O(),J("svg",x1t,[...e[0]||(e[0]=[_("path",{d:"M2 2.6665H14V3.99984H2V2.6665ZM3.33333 12.6665H12.6667V13.9998H3.33333V12.6665ZM2 9.33317H14V10.6665H2V9.33317ZM3.33333 5.99984H12.6667V7.33317H3.33333V5.99984Z",fill:"var(--black)"},null,-1)])])}const _oe=ot(T1t,[["render",F1t]]),S1t={},w1t={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function k1t(t,e){return O(),J("svg",w1t,[...e[0]||(e[0]=[_("path",{d:"M2 2.6665H14V3.99984H2V2.6665ZM4.66667 12.6665H14V13.9998H4.66667V12.6665ZM2 9.33317H14V10.6665H2V9.33317ZM4.66667 5.99984H14V7.33317H4.66667V5.99984Z",fill:"var(--black)"},null,-1)])])}const Roe=ot(S1t,[["render",k1t]]),E1t={tooltip:"Alignment"},_1t={tooltip:"Выравнивание"},R1t=Xn({en:E1t,ru:_1t}),D1t={class:"bootstrap-styles content-align-editor dropdown rounded"},A1t={class:"bootstrap-styles rich-text-icon icon-hover d-flex justify-content-center align-items-center"},N1t={class:"bootstrap-styles rich-text-icon icon-hover d-flex justify-content-center align-items-center"},B1t={class:"bootstrap-styles rich-text-icon icon-hover d-flex justify-content-center align-items-center"},L1t={class:"bootstrap-styles rich-text-icon icon-hover d-flex justify-content-center align-items-center"},$1t=Xe({__name:"ContentAlignEditor",props:{editor:{},currentContentAlign:{},deps:{}},emits:["onContentAlignVariantChanged"],setup(t,{emit:e}){const n=t,o={tooltip:R1t({localeKey:n.deps.localeKey}).tooltip},r=Vt({isOpened:!1}),i=a=>{s("onContentAlignVariantChanged",a),r.isOpened=!1},s=e;return(a,l)=>Ot((O(),J("div",D1t,[_("button",{id:"richTextDropdownContentAlign",class:$e(["bootstrap-styles p-1 rounded rich-text-button",{show:r.isOpened}]),type:"button",onClick:l[0]||(l[0]=u=>r.isOpened=!r.isOpened)},[_("i",A1t,[n.currentContentAlign==="Left"?(O(),Ze(Eoe,{key:0})):Ue("",!0),n.currentContentAlign==="Center"?(O(),Ze(_oe,{key:1})):Ue("",!0),n.currentContentAlign==="Right"?(O(),Ze(Roe,{key:2})):Ue("",!0)])],2),_("div",{class:$e([{show:r.isOpened},"bootstrap-styles content-align-dropdown bg-white p-1"]),"aria-labelledby":"richTextDropdownContentAlign"},[_("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button me-14",{active:n.currentContentAlign==="Left"}]),onClick:l[1]||(l[1]=()=>i("Left"))},[_("i",N1t,[ie(Eoe)])],2),_("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button me-14",{active:n.currentContentAlign==="Center"}]),onClick:l[2]||(l[2]=()=>i("Center"))},[_("i",B1t,[ie(_oe)])],2),_("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:n.currentContentAlign==="Right"}]),onClick:l[3]||(l[3]=()=>i("Right"))},[_("i",L1t,[ie(Roe)])],2)],2)])),[[z(Km),()=>r.isOpened=!1],[z(Vo),{title:o.tooltip,placement:"top"}]])}}),V1t=ot($1t,[["__scopeId","data-v-c8a15233"]]),M1t={class:"bootstrap-styles rich-text-toolbar d-flex align-items-center border gap-1 p-1"},O1t={key:2,class:"bootstrap-styles position-relative h-100"},I1t={key:3,class:"bootstrap-styles position-relative h-100"},P1t={key:4,class:"bootstrap-styles d-flex justify-content-center align-items-center"},W1t={key:7,class:"vl"},H1t={key:13,class:"vl"},z1t={key:16,class:"vl"},j1t=Xe({__name:"RichTextToolbar",props:{editor:{},deps:{},element:{},theme:{},initialThemeName:{}},emits:["onVerticalAlignVariantChanged","onContentAlignVariantChanged"],setup(t,{emit:e}){const n=t,o=n.deps.richTextToolbarPlugins,r=q(()=>{const{from:a,to:l}=n.editor.state.selection;return a!==l}),i=q(()=>n.editor.isActive("image")),s=e;return(a,l)=>(O(),J("div",M1t,[i.value?Ue("",!0):(O(),Ze(u0t,{key:0,editor:n.editor,theme:n.theme,isAllowToEdit:r.value,initialThemeName:n.initialThemeName,deps:n.deps.themeSettingsSelectorDeps},null,8,["editor","theme","isAllowToEdit","initialThemeName","deps"])),i.value?Ue("",!0):(O(),Ze(Byt,{key:1,theme:n.theme,editor:n.editor,isAllowToEdit:r.value,deps:n.deps.fontFamilySelectorDeps},null,8,["theme","editor","isAllowToEdit","deps"])),i.value?Ue("",!0):(O(),J("div",O1t,[ie(e0t,{editor:n.editor,theme:n.theme,deps:n.deps.fontSizeEditorDeps,class:$e({disabled:!r.value})},null,8,["editor","theme","deps","class"])])),i.value?Ue("",!0):(O(),J("div",I1t,[ie(S0t,{editor:n.editor,theme:n.theme,deps:n.deps.lineHeightEditorDeps,class:$e({disabled:!r.value})},null,8,["editor","theme","deps","class"])])),i.value?Ue("",!0):(O(),J("div",P1t,[ie(Tyt,{editor:n.editor,theme:n.theme,isAllowToEdit:r.value,deps:n.deps.colorPickerDeps},null,8,["editor","theme","isAllowToEdit","deps"])])),i.value?(O(),Ze(C1t,{key:5,currentVerticalAlign:n.element.ImageVerticalAlign,editor:n.editor,deps:n.deps.verticalAlignEditorDeps,onOnVerticalAlignVariantChanged:l[0]||(l[0]=u=>s("onVerticalAlignVariantChanged",u))},null,8,["currentVerticalAlign","editor","deps"])):Ue("",!0),i.value?Ue("",!0):(O(),Ze(V1t,{key:6,editor:n.editor,currentContentAlign:n.element.ContentAlign,deps:n.deps.contentAlignEditorDeps,class:$e({"bootstrap-styles me-14":i.value}),onOnContentAlignVariantChanged:l[1]||(l[1]=u=>s("onContentAlignVariantChanged",u))},null,8,["editor","currentContentAlign","deps","class"])),i.value?Ue("",!0):(O(),J("div",W1t)),i.value?Ue("",!0):(O(),Ze(Nbt,{key:8,editor:n.editor,theme:n.theme,isAllowToEdit:r.value,deps:n.deps.fontWeightEditorDeps},null,8,["editor","theme","isAllowToEdit","deps"])),i.value?Ue("",!0):(O(),Ze(lvt,{key:9,editor:n.editor,theme:n.theme,isAllowToEdit:r.value,deps:n.deps.fontStyleEditorDeps},null,8,["editor","theme","isAllowToEdit","deps"])),i.value?Ue("",!0):(O(),Ze(Hbt,{key:10,editor:n.editor,theme:n.theme,isAllowToEdit:r.value,deps:n.deps.lineThroughEditorDeps},null,8,["editor","theme","isAllowToEdit","deps"])),i.value?Ue("",!0):(O(),Ze(Qbt,{key:11,editor:n.editor,theme:n.theme,isAllowToEdit:r.value,deps:n.deps.underlineEditorDeps},null,8,["editor","theme","isAllowToEdit","deps"])),i.value?Ue("",!0):(O(),Ze(yvt,{key:12,editor:n.editor,theme:n.theme,isAllowToEdit:r.value,deps:n.deps.textTransformEditorDeps},null,8,["editor","theme","isAllowToEdit","deps"])),i.value?Ue("",!0):(O(),J("div",H1t)),i.value?Ue("",!0):(O(),Ze(Ovt,{key:14,editor:n.editor,deps:n.deps.bulletListEditorDeps},null,8,["editor","deps"])),i.value?Ue("",!0):(O(),Ze(Jvt,{key:15,editor:n.editor,deps:n.deps.orderedListEditorDeps},null,8,["editor","deps"])),i.value?Ue("",!0):(O(),J("div",z1t)),ie(Q0t,{editor:n.editor,isAllowToEdit:r.value,deps:n.deps.linkEditorDeps},null,8,["editor","isAllowToEdit","deps"]),ie(_vt,{editor:n.editor,theme:n.theme,isAllowToEdit:r.value,deps:n.deps.unsubscribeLinkEditorDeps},null,8,["editor","theme","isAllowToEdit","deps"]),ie(xbt,{editor:n.editor,deps:n.deps.imageEditorDeps},null,8,["editor","deps"]),(O(!0),J(rt,null,$n(z(o),(u,c)=>(O(),J("span",{key:c},[(O(),Ze(MD(u),{editor:n.editor},null,8,["editor"]))]))),128))]))}}),U1t=ot(j1t,[["__scopeId","data-v-1789210c"]]),K1t=t=>({Match:e=>{switch(t){case"Baseline":return e.whenBaseline();case"Top":return e.whenTop();case"Middle":return e.whenMiddle();case"Bottom":return e.whenBottom();default:return ta(t)}}}),q1t=t=>K1t(t.verticalAlign).Match({whenBaseline:()=>"baseline",whenTop:()=>"top",whenMiddle:()=>"middle",whenBottom:()=>"bottom"}),Doe="NormalText",J1t=Xe({__name:"RichText",props:{deps:{},theme:{},element:{},isSelected:{type:Boolean}},emits:["onRichTextUpdated","onRichTextRemoved","onElementClicked"],setup(t,{emit:e}){Im(y=>({v23f1e660:n.theme.Colors.PrimaryColor,v70d14324:n.theme.Colors.SecondaryColor,v86efc29a:n.theme.Colors.PrimaryTextColor,bd12407e:n.theme.Colors.SecondaryTextColor,v25ddb634:n.theme.Colors.CardBackgroundColor,v861d4a36:n.theme.Colors.ButtonTextColor,v4b55838a:n.theme.Colors.TitleColor,v6a651340:n.theme.Colors.HeadingColor,v20b920a2:n.theme.Colors.SubHeadingColor,b378654c:n.theme.Colors.LargeTextColor,efdd3e60:n.theme.Colors.NormalTextColor,v48387a79:n.theme.Colors.DescriptionTextColor,v244e47ec:n.theme.Colors.LinkColor,v5e83a710:n.theme.Colors.EmailBackgroundColor,cd4dc93c:n.theme.Colors.BodyColor,v361cd101:f.value}));const n=t,o=Vt({isRemoveComponentWindowShown:!1,isEditing:!1}),r={removeWindowTitle:goe({localeKey:n.deps.localeKey}).removeWindowTitle,removeWindowDescription:goe({localeKey:n.deps.localeKey}).removeWindowDescription},i=pn(null),s=pn(null),{floatingStyles:a}=B0e(s,i,{placement:"top",whileElementsMounted:D0e,middleware:[A0e(10)]}),l=q(()=>{const y=a.value.transform??"translate(0px, 0px)",b=new DOMMatrix(y).m42;return{...a.value,left:"50%",transform:`translate(-50%, ${b}px)`}}),u=pV(),c=q(()=>us({fontFamily:n.theme.FontFamily,themeFontSettings:n.theme.FontSettingsPresets.NormalText,themeColor:n.theme.Colors.NormalTextColor})),d=q(()=>{const y={...aU(c.value)};return{fontSize:y.fontSize,lineHeight:y.lineHeight,fontFamily:y.fontFamily,fontWeight:y.fontWeight,fontStyle:y.fontStyle,color:y.color}}),h=Nat({content:Coe(n.element.Text),extensions:[...ryt({dataSourceFieldNameDelegate:n.deps.dataSourceFieldNameDelegate,initialThemeName:Doe,themeColors:n.theme.Colors})],editable:o.isEditing,autofocus:"all",onUpdate:({editor:y})=>{if(!o.isEditing)return;const b=iyt({editor:y});g("onRichTextUpdated",{...n.element,Text:b})}}),m=()=>{h.value&&(h.value.chain().focus().undo().run(),o.isRemoveComponentWindowShown=!1)},f=q(()=>q1t({verticalAlign:n.element.ImageVerticalAlign})),p=()=>[document.querySelector(".rich-text-toolbar"),document.querySelector(".string-expression-builder-modal-window"),document.querySelector(`.rich-text-editor__content-${u}`)];an(()=>n.element.Text,()=>{h.value&&!o.isEditing&&h.value.commands.setContent(Coe(n.element.Text))});const g=e;return(y,b)=>Ot((O(),J("span",{ref_key:"richTextElementRef",ref:s,class:$e(["RichText cursor-pointer user-select-none",{selected:n.isSelected}]),style:he([z(bb)({contentAlign:n.element.ContentAlign}),{...d.value,minHeight:n.element.MinHeight+"px"}]),onClick:b[4]||(b[4]=zo(()=>{g("onElementClicked"),o.isEditing=!0,z(h)&&z(h).setEditable(!0)},["prevent"]))},[ie(z(Aat),{class:$e(["rich-text-editor__content",`rich-text-editor__content-${z(u)}`]),editor:z(h)},null,8,["class","editor"]),z(h)&&o.isEditing?(O(),Ze(U1t,{key:0,ref_key:"richTextToolbarRef",ref:i,editor:z(h),deps:n.deps.richTextToolbarDeps,element:n.element,theme:n.theme,initialThemeName:Doe,style:he(l.value),onOnVerticalAlignVariantChanged:b[0]||(b[0]=F=>g("onRichTextUpdated",{...n.element,ImageVerticalAlign:F})),onOnContentAlignVariantChanged:b[1]||(b[1]=F=>g("onRichTextUpdated",{...n.element,ContentAlign:F}))},null,8,["editor","deps","element","theme","style"])):Ue("",!0),(O(),Ze(m9,{to:"#app"},[o.isRemoveComponentWindowShown?(O(),Ze(vCt,{key:0,deps:n.deps.removeConfirmModalWindowDeps,headerText:r.removeWindowTitle,onCancel:b[2]||(b[2]=()=>m()),onConfirmed:b[3]||(b[3]=()=>{o.isRemoveComponentWindowShown=!1,g("onRichTextRemoved")})},{"body-content":Tu(()=>[U0(Gt(r.removeWindowDescription),1)]),_:1},8,["deps","headerText"])):Ue("",!0)]))],6)),[[z(Km),{handler:()=>{o.isEditing=!1,z(h)&&z(h).setEditable(!1)},include:p}]])}}),G1t=ot(J1t,[["__scopeId","data-v-ed6b2a5a"]]),Y1t=Xe({__name:"UnsubscribeLink",props:{theme:{},element:{}},emits:["onElementClicked"],setup(t,{emit:e}){const n=t,o=q(()=>{const i=lU({fontFamily:n.theme.FontFamily,fontStyle:n.element.Style,themeDefinedFontSettings:n.theme.FontSettingsPresets,themeColors:n.theme.Colors});return{...aU(i)}}),r=e;return(i,s)=>(O(),J("a",{href:"#",class:"cursor-pointer user-select-none",style:he([{margin:"0"},[o.value,z(bb)({contentAlign:n.element.ContentAlign})]]),onClick:s[0]||(s[0]=zo(()=>r("onElementClicked"),["prevent"]))},Gt(n.element.Text),5))}}),X1t=ot(Y1t,[["__scopeId","data-v-68ed9754"]]),Q1t=["src","alt"],Z1t={class:"bootstrap-styles position-absolute top-0 left-0",width:"100%",style:{"border-spacing":"0","border-collapse":"collapse",width:"100%",height:"100%"}},eTt={key:0},tTt=["align"],nTt={style:{width:"auto","border-spacing":"0","border-collapse":"separate"}},oTt={align:"center",style:{width:"auto"}},rTt={key:0},iTt={key:1},sTt=["align"],aTt={style:{width:"auto","border-spacing":"0","border-collapse":"separate"}},lTt={align:"center",style:{width:"auto"}},uTt={key:2},cTt=["align"],dTt={style:{width:"auto","border-spacing":"0","border-collapse":"separate"}},hTt={align:"center",style:{width:"auto"}},mTt={key:3},fTt=["align"],pTt={style:{width:"auto","border-spacing":"0","border-collapse":"separate"}},gTt={align:"center",style:{width:"auto"}},CTt=Xe({__name:"BackgroundImage",props:{deps:{},theme:{},element:{},context:{type:[String,Number,Boolean,Array,Object]},path:{},selectedElementPath:{}},emits:["onImageOriginalSizeAdjusted","onImageSizeAdjusted","onElementClicked","onElementUpdatedEvent","onElementRemoved","onElementWrapperClicked"],setup(t,{emit:e}){const n=t,o=Vt({src:"",href:"",isLoaded:!1}),r=async s=>n.deps.stringExpressionEvaluator({stringExpression:s,context:n.context});(async()=>(o.src=await r(n.element.Src),o.href=await r(n.element.HRef),o.isLoaded=!0))();const i=e;return(s,a)=>o.isLoaded?(O(),J("table",{key:0,class:"bootstrap-styles position-relative",style:he([{"border-spacing":"0","border-collapse":"separate"},{width:"100%"}]),onClick:a[20]||(a[20]=zo(()=>i("onElementWrapperClicked"),["prevent"]))},[_("tbody",null,[_("tr",null,[_("td",{align:"center",style:he([{height:n.element.AdjustedHeight+"px",verticalAlign:"top"}])},[Ot(_("img",{src:o.src,alt:o.src,style:{"max-width":"100%"}},null,8,Q1t),[[z(fS),({width:l,height:u})=>{i("onImageSizeAdjusted",{Path:n.path,AdjustedHeight:u,AdjustedWidth:l}),o.isLoaded=!0}]]),_("table",Z1t,[_("tbody",null,[n.element.TopElementList.List.length>0&&n.element.TopElementList.Direction==="Vertical"?(O(),J("tr",eTt,[_("td",{valign:"top",align:z($c)({containerAlign:n.element.TopElementList.ContentAlign})},[_("table",nTt,[_("tbody",null,[_("tr",null,[_("td",{style:he({height:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)]),(O(!0),J(rt,null,$n(n.element.TopElementList.List,(l,u)=>(O(),J(rt,{key:u},[_("tr",null,[n.element.TopElementList.ContentAlign==="Left"?(O(),J("td",{key:0,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0),_("td",oTt,[ie(xl,{deps:n.deps,theme:n.theme,element:l,path:[...n.path,"TopElementList","List",u],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageSizeAdjusted:a[0]||(a[0]=c=>i("onImageSizeAdjusted",c)),onOnImageOriginalSizeAdjusted:a[1]||(a[1]=c=>i("onImageOriginalSizeAdjusted",c)),onOnElementClicked:a[2]||(a[2]=c=>i("onElementClicked",c)),onOnElementUpdatedEvent:a[3]||(a[3]=c=>i("onElementUpdatedEvent",c)),onOnElementRemoved:a[4]||(a[4]=c=>i("onElementRemoved",c))},null,8,["deps","theme","element","path","selectedElementPath","context"])]),n.element.TopElementList.ContentAlign==="Right"?(O(),J("td",{key:1,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0)]),n.element.TopElementList.List.length-1!==u?(O(),J("tr",rTt,[_("td",{style:he({height:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)])):Ue("",!0)],64))),128))])])],8,tTt)])):Ue("",!0),n.element.TopElementList.List.length>0&&n.element.TopElementList.Direction==="Horizontal"?(O(),J("tr",iTt,[_("td",{valign:"top",align:z($c)({containerAlign:n.element.TopElementList.ContentAlign})},[_("table",aTt,[_("tbody",null,[_("tr",null,[_("td",{style:he({height:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)]),_("tr",null,[(O(!0),J(rt,null,$n(n.element.TopElementList.List,(l,u)=>(O(),J(rt,{key:u},[n.element.TopElementList.ContentAlign==="Left"&&u===0?(O(),J("td",{key:0,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0),_("td",lTt,[ie(xl,{deps:n.deps,theme:n.theme,element:l,path:[...n.path,"TopElementList","List",u],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageSizeAdjusted:a[5]||(a[5]=c=>i("onImageSizeAdjusted",c)),onOnImageOriginalSizeAdjusted:a[6]||(a[6]=c=>i("onImageOriginalSizeAdjusted",c)),onOnElementClicked:a[7]||(a[7]=c=>i("onElementClicked",c)),onOnElementUpdatedEvent:a[8]||(a[8]=c=>i("onElementUpdatedEvent",c)),onOnElementRemoved:a[9]||(a[9]=c=>i("onElementRemoved",c))},null,8,["deps","theme","element","path","selectedElementPath","context"])]),n.element.TopElementList.ContentAlign==="Center"&&n.element.TopElementList.List.length-1!==u?(O(),J("td",{key:1,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0),n.element.TopElementList.ContentAlign==="Right"?(O(),J("td",{key:2,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0),n.element.TopElementList.ContentAlign==="Left"&&n.element.TopElementList.List.length-1!==u?(O(),J("td",{key:3,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0)],64))),128))])])])],8,sTt)])):Ue("",!0),n.element.BottomElementList.List.length>0&&n.element.BottomElementList.Direction==="Vertical"?(O(),J("tr",uTt,[_("td",{valign:"bottom",align:z($c)({containerAlign:n.element.BottomElementList.ContentAlign})},[_("table",dTt,[_("tbody",null,[(O(!0),J(rt,null,$n(n.element.BottomElementList.List,(l,u)=>(O(),J(rt,{key:u},[_("tr",null,[n.element.BottomElementList.ContentAlign==="Left"?(O(),J("td",{key:0,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0),_("td",hTt,[ie(xl,{deps:n.deps,theme:n.theme,element:l,path:[...n.path,"BottomElementList","List",u],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageSizeAdjusted:a[10]||(a[10]=c=>i("onImageSizeAdjusted",c)),onOnImageOriginalSizeAdjusted:a[11]||(a[11]=c=>i("onImageOriginalSizeAdjusted",c)),onOnElementClicked:a[12]||(a[12]=c=>i("onElementClicked",c)),onOnElementUpdatedEvent:a[13]||(a[13]=c=>i("onElementUpdatedEvent",c)),onOnElementRemoved:a[14]||(a[14]=c=>i("onElementRemoved",c))},null,8,["deps","theme","element","path","selectedElementPath","context"])]),n.element.BottomElementList.ContentAlign==="Right"?(O(),J("td",{key:1,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0)]),_("tr",null,[_("td",{style:he({height:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)])],64))),128))])])],8,cTt)])):Ue("",!0),n.element.BottomElementList.List.length>0&&n.element.BottomElementList.Direction==="Horizontal"?(O(),J("tr",mTt,[_("td",{valign:"bottom",align:z($c)({containerAlign:n.element.BottomElementList.ContentAlign})},[_("table",pTt,[_("tbody",null,[_("tr",null,[(O(!0),J(rt,null,$n(n.element.BottomElementList.List,(l,u)=>(O(),J(rt,{key:u},[n.element.BottomElementList.ContentAlign==="Left"&&u===0?(O(),J("td",{key:0,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0),_("td",gTt,[ie(xl,{deps:n.deps,theme:n.theme,element:l,path:[...n.path,"BottomElementList","List",u],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageSizeAdjusted:a[15]||(a[15]=c=>i("onImageSizeAdjusted",c)),onOnImageOriginalSizeAdjusted:a[16]||(a[16]=c=>i("onImageOriginalSizeAdjusted",c)),onOnElementClicked:a[17]||(a[17]=c=>i("onElementClicked",c)),onOnElementUpdatedEvent:a[18]||(a[18]=c=>i("onElementUpdatedEvent",c)),onOnElementRemoved:a[19]||(a[19]=c=>i("onElementRemoved",c))},null,8,["deps","theme","element","path","selectedElementPath","context"])]),n.element.BottomElementList.ContentAlign==="Center"&&n.element.BottomElementList.List.length-1!==u?(O(),J("td",{key:1,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0),n.element.BottomElementList.ContentAlign==="Right"?(O(),J("td",{key:2,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0),n.element.BottomElementList.ContentAlign==="Left"&&n.element.BottomElementList.List.length-1!==u?(O(),J("td",{key:3,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0)],64))),128))])])])],8,fTt)])):Ue("",!0)])])],4)])])])):Ue("",!0)}}),xl=Xe({__name:"Elements",props:{deps:{},theme:{},element:{},path:{},context:{type:[String,Number,Boolean,Array,Object]},selectedElementPath:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){const n=t,o=e,r=(i,s)=>{o("onElementClicked",{element:i,path:[...n.path,s]})};return(i,s)=>(O(),J("span",{onClick:s[31]||(s[31]=zo(()=>{},["stop"]))},[n.element.Button!==void 0?(O(),Ze(eCt,{key:0,deps:n.deps,theme:n.theme,element:n.element.Button,context:n.context,class:$e({"element-selected":z(Df)(n.selectedElementPath,[...n.path,"Button"])}),onOnElementClicked:s[0]||(s[0]=a=>r(n.element,"Button"))},null,8,["deps","theme","element","context","class"])):Ue("",!0),n.element.HeightContainer!==void 0?(O(),Ze(Agt,{key:1,deps:n.deps,theme:n.theme,element:n.element.HeightContainer,path:[...n.path,"HeightContainer"],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageOriginalSizeAdjusted:s[1]||(s[1]=a=>o("onImageOriginalSizeAdjusted",a)),onOnImageSizeAdjusted:s[2]||(s[2]=a=>o("onImageSizeAdjusted",a)),onOnElementClicked:s[3]||(s[3]=a=>o("onElementClicked",a)),onOnElementRemoved:s[4]||(s[4]=a=>o("onElementRemoved",a)),onOnElementUpdatedEvent:s[5]||(s[5]=a=>o("onElementUpdatedEvent",a))},null,8,["deps","theme","element","path","selectedElementPath","context"])):Ue("",!0),n.element.Image!==void 0?(O(),Ze(Mgt,{key:2,deps:n.deps,theme:n.theme,element:n.element.Image,context:n.context,path:[...n.path,"Image"],class:$e({"element-selected":z(Df)(n.selectedElementPath,[...n.path,"Image"])}),onOnImageOriginalSizeAdjusted:s[6]||(s[6]=a=>o("onImageOriginalSizeAdjusted",a)),onOnImageSizeAdjusted:s[7]||(s[7]=a=>o("onImageSizeAdjusted",a)),onOnElementClicked:s[8]||(s[8]=a=>r(n.element,"Image"))},null,8,["deps","theme","element","context","path","class"])):Ue("",!0),n.element.Spacer!==void 0?(O(),Ze(zgt,{key:3,element:n.element.Spacer,theme:n.theme,class:$e({"element-selected":z(Df)(n.selectedElementPath,[...n.path,"Spacer"])}),onOnElementClicked:s[9]||(s[9]=a=>r(n.element,"Spacer"))},null,8,["element","theme","class"])):Ue("",!0),n.element.SpanText!==void 0?(O(),Ze(oCt,{key:4,deps:n.deps,theme:n.theme,element:n.element.SpanText,context:n.context,class:$e({"element-selected":z(Df)(n.selectedElementPath,[...n.path,"SpanText"])}),onOnElementClicked:s[10]||(s[10]=a=>r(n.element,"SpanText"))},null,8,["deps","theme","element","context","class"])):Ue("",!0),n.element.RichText!==void 0?(O(),Ze(G1t,{key:5,deps:n.deps.richTextDeps,theme:n.theme,element:n.element.RichText,isSelected:z(Df)(n.selectedElementPath,[...n.path,"RichText"]),onOnElementClicked:s[11]||(s[11]=a=>r(n.element,"RichText")),onOnRichTextUpdated:s[12]||(s[12]=a=>{o("onElementUpdatedEvent",{path:n.path,element:{RichText:a}})}),onOnRichTextRemoved:s[13]||(s[13]=()=>{o("onElementRemoved",n.path)})},null,8,["deps","theme","element","isSelected"])):Ue("",!0),n.element.OneLineList!==void 0?(O(),Ze(Wgt,{key:6,deps:n.deps,theme:n.theme,element:n.element.OneLineList,path:[...n.path,"OneLineList"],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageOriginalSizeAdjusted:s[14]||(s[14]=a=>o("onImageOriginalSizeAdjusted",a)),onOnImageSizeAdjusted:s[15]||(s[15]=a=>o("onImageSizeAdjusted",a)),onOnElementClicked:s[16]||(s[16]=a=>o("onElementClicked",a)),onOnElementRemoved:s[17]||(s[17]=a=>o("onElementRemoved",a)),onOnElementUpdatedEvent:s[18]||(s[18]=a=>o("onElementUpdatedEvent",a))},null,8,["deps","theme","element","path","selectedElementPath","context"])):Ue("",!0),n.element.If!==void 0?(O(),Ze(Egt,{key:7,deps:n.deps,theme:n.theme,element:n.element.If,context:n.context,path:[...n.path,"If"],selectedElementPath:n.selectedElementPath,onOnImageOriginalSizeAdjusted:s[19]||(s[19]=a=>o("onImageOriginalSizeAdjusted",a)),onOnImageSizeAdjusted:s[20]||(s[20]=a=>o("onImageSizeAdjusted",a)),onOnElementClicked:s[21]||(s[21]=a=>o("onElementClicked",a)),onOnElementRemoved:s[22]||(s[22]=a=>o("onElementRemoved",a)),onOnElementUpdatedEvent:s[23]||(s[23]=a=>o("onElementUpdatedEvent",a))},null,8,["deps","theme","element","context","path","selectedElementPath"])):Ue("",!0),n.element.UnsubscribeLink!==void 0?(O(),Ze(X1t,{key:8,theme:n.theme,element:n.element.UnsubscribeLink,class:$e({"element-selected":z(Df)(n.selectedElementPath,[...n.path,"UnsubscribeLink"])}),onOnElementClicked:s[24]||(s[24]=a=>r(n.element,"UnsubscribeLink"))},null,8,["theme","element","class"])):Ue("",!0),n.element.BackgroundImage!==void 0?(O(),Ze(CTt,{key:9,deps:n.deps,theme:n.theme,element:n.element.BackgroundImage,context:n.context,path:[...n.path,"BackgroundImage"],selectedElementPath:n.selectedElementPath,class:$e({"element-selected":z(Df)(n.selectedElementPath,[...n.path,"BackgroundImage"])}),onOnImageOriginalSizeAdjusted:s[25]||(s[25]=a=>o("onImageOriginalSizeAdjusted",a)),onOnImageSizeAdjusted:s[26]||(s[26]=a=>o("onImageSizeAdjusted",a)),onOnElementClicked:s[27]||(s[27]=a=>o("onElementClicked",a)),onOnElementRemoved:s[28]||(s[28]=a=>o("onElementRemoved",a)),onOnElementUpdatedEvent:s[29]||(s[29]=a=>o("onElementUpdatedEvent",a)),onOnElementWrapperClicked:s[30]||(s[30]=a=>r(n.element,"BackgroundImage"))},null,8,["deps","theme","element","context","path","selectedElementPath","class"])):Ue("",!0)]))}}),yTt=["align"],bTt=Xe({__name:"IteratedColumn",props:{deps:{},theme:{},iteratedColumn:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]},containerWidth:{}},emits:["onImageSizeAdjusted","onImageOriginalSizeAdjusted","onElementClicked","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){Im(i=>({v63736150:r.value}));const n=t,o=e,r=q(()=>n.iteratedColumn.WidthInPercents*n.containerWidth+"px");return(i,s)=>(O(),J("div",{class:"iterated-column",style:he({display:"inline-block",verticalAlign:n.iteratedColumn.VerticalAlign})},[_("table",{style:he([[z(Mw)({borderCollapse:n.iteratedColumn.BorderCollapse})],{width:"100%","border-spacing":"0"}]),width:"100%"},[_("tbody",null,[_("tr",null,[_("td",{align:z($c)({containerAlign:n.iteratedColumn.ContainerAlign}),style:he([[z(pd)({border:n.iteratedColumn.Border,themeColors:n.theme.Colors}),{backgroundColor:z(Nl)({color:n.iteratedColumn.BgColor,themeColors:n.theme.Colors})},z(Iu)({borderRadius:n.iteratedColumn.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner})],{"line-height":"normal"}])},[(O(!0),J(rt,null,$n(n.iteratedColumn.Elements,(a,l)=>(O(),Ze(xl,{key:l,deps:n.deps.elementsDeps,theme:n.theme,element:a,context:n.context,path:[...n.path,"Elements",l],selectedElementPath:n.selectedElementPath,onOnElementClicked:s[0]||(s[0]=u=>o("onElementClicked",u)),onOnImageSizeAdjusted:s[1]||(s[1]=u=>o("onImageSizeAdjusted",u)),onOnImageOriginalSizeAdjusted:s[2]||(s[2]=u=>o("onImageOriginalSizeAdjusted",u)),onOnElementUpdatedEvent:s[3]||(s[3]=u=>o("onElementUpdatedEvent",u)),onOnElementRemoved:s[4]||(s[4]=u=>o("onElementRemoved",u))},null,8,["deps","theme","element","context","path","selectedElementPath"]))),128))],12,yTt)])])],4)],4))}}),vTt=ot(bTt,[["__scopeId","data-v-4bdaa248"]]),TTt=["align"],xTt=Xe({__name:"IteratedColumnN21",props:{deps:{},theme:{},iteratedColumnN21:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]},containerWidth:{}},emits:["onImageSizeAdjusted","onImageOriginalSizeAdjusted","onElementClicked","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){Im(i=>({v2fbddeb4:r.value}));const n=t,o=e,r=q(()=>n.iteratedColumnN21.WidthInPercents*n.containerWidth+"px");return(i,s)=>(O(),J("div",{class:"iterated-column__N-2-1",style:he({display:"inline-block",verticalAlign:n.iteratedColumnN21.VerticalAlign})},[_("table",{style:he([[z(Mw)({borderCollapse:n.iteratedColumnN21.BorderCollapse})],{width:"100%","border-spacing":"0"}]),width:"100%"},[_("tbody",null,[_("tr",null,[_("td",{align:z($c)({containerAlign:n.iteratedColumnN21.ContainerAlign}),style:he([[z(pd)({border:n.iteratedColumnN21.Border,themeColors:n.theme.Colors}),{backgroundColor:z(Nl)({color:n.iteratedColumnN21.BgColor,themeColors:n.theme.Colors})},z(Iu)({borderRadius:n.iteratedColumnN21.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner})],{"line-height":"normal"}])},[(O(!0),J(rt,null,$n(n.iteratedColumnN21.Elements,(a,l)=>(O(),Ze(xl,{key:l,deps:n.deps.elementsDeps,theme:n.theme,element:a,context:n.context,path:[...n.path,"Elements",l],selectedElementPath:n.selectedElementPath,onOnElementClicked:s[0]||(s[0]=u=>o("onElementClicked",u)),onOnImageSizeAdjusted:s[1]||(s[1]=u=>o("onImageSizeAdjusted",u)),onOnImageOriginalSizeAdjusted:s[2]||(s[2]=u=>o("onImageOriginalSizeAdjusted",u)),onOnElementUpdatedEvent:s[3]||(s[3]=u=>o("onElementUpdatedEvent",u)),onOnElementRemoved:s[4]||(s[4]=u=>o("onElementRemoved",u))},null,8,["deps","theme","element","context","path","selectedElementPath"]))),128))],12,TTt)])])],4)],4))}}),FTt=ot(xTt,[["__scopeId","data-v-b46af162"]]),STt=["align"],wTt=Xe({__name:"IteratedColumnN22",props:{deps:{},theme:{},iteratedColumnN22:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]},containerWidth:{}},emits:["onImageSizeAdjusted","onImageOriginalSizeAdjusted","onElementClicked","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){Im(i=>({v904d8f2c:r.value}));const n=t,o=e,r=q(()=>n.iteratedColumnN22.WidthInPercents*n.containerWidth+"px");return(i,s)=>(O(),J("div",{class:"iterated-column__N-2-2",style:he({display:"inline-block",verticalAlign:n.iteratedColumnN22.VerticalAlign})},[_("table",{style:he([[z(Mw)({borderCollapse:n.iteratedColumnN22.BorderCollapse})],{width:"100%","border-spacing":"0"}]),width:"100%"},[_("tbody",null,[_("tr",null,[_("td",{align:z($c)({containerAlign:n.iteratedColumnN22.ContainerAlign}),style:he([[z(pd)({border:n.iteratedColumnN22.Border,themeColors:n.theme.Colors}),{backgroundColor:z(Nl)({color:n.iteratedColumnN22.BgColor,themeColors:n.theme.Colors})},z(Iu)({borderRadius:n.iteratedColumnN22.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner})],{"line-height":"normal"}])},[(O(!0),J(rt,null,$n(n.iteratedColumnN22.Elements,(a,l)=>(O(),Ze(xl,{key:l,deps:n.deps.elementsDeps,theme:n.theme,element:a,context:n.context,path:[...n.path,"Elements",l],selectedElementPath:n.selectedElementPath,onOnElementClicked:s[0]||(s[0]=u=>o("onElementClicked",u)),onOnImageSizeAdjusted:s[1]||(s[1]=u=>o("onImageSizeAdjusted",u)),onOnImageOriginalSizeAdjusted:s[2]||(s[2]=u=>o("onImageOriginalSizeAdjusted",u)),onOnElementUpdatedEvent:s[3]||(s[3]=u=>o("onElementUpdatedEvent",u)),onOnElementRemoved:s[4]||(s[4]=u=>o("onElementRemoved",u))},null,8,["deps","theme","element","context","path","selectedElementPath"]))),128))],12,STt)])])],4)],4))}}),kTt=ot(wTt,[["__scopeId","data-v-319c5209"]]),ETt={class:"iterated-column-container",style:{"border-spacing":"0","border-collapse":"collapse",width:"100%",margin:"0 auto"},width:"100%"},_Tt={align:"center",style:{"font-size":"0"}},RTt=Xe({__name:"IteratedColumnBodyRow",props:{deps:{},theme:{},iteratedColumnBodyRow:{},path:{},selectedElementPath:{},context:{},rowWidth:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){Im(l=>({a80c0c96:i.value}));const n=t,o=Vt({dataList:[],isLoaded:!1}),r=()=>n.deps.listExpressionEvaluator({listExpression:n.iteratedColumnBodyRow.DataSource,context:n.context}).then(l=>{o.dataList=l,o.isLoaded=!0});r(),an(()=>n.context,()=>r());const i=q(()=>Eo({paddingExpression:n.iteratedColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})+"px"),s={iteratedColumn:l=>l!==void 0,iteratedColumnVariant:l=>l!==void 0,iteratedColumnN21:l=>l!==void 0,iteratedColumnN22:l=>l!==void 0},a=e;return(l,u)=>(O(),J("table",ETt,[_("tbody",null,[_("tr",null,[_("td",_Tt,[(O(!0),J(rt,null,$n(o.dataList,(c,d)=>(O(),J(rt,{key:d},[s.iteratedColumn(n.iteratedColumnBodyRow.IteratedColumn)?(O(),Ze(vTt,{key:d,class:$e(["iterated-column-bottom-spacer",{"iterated-column__tablet-padding-right":(d+1)%2===1,"iterated-column__tablet-padding-left":(d+1)%2===0,"is-last-desktop-line":d>=o.dataList.length-n.iteratedColumnBodyRow.NumberColumnsInLine,"is-last-tablet-line":d>=o.dataList.length-2,"is-last-mobile-line":d==o.dataList.length-1}]),deps:n.deps.iteratedColumnDeps,theme:n.theme,style:he(z(LR)({numberColumnsInLine:n.iteratedColumnBodyRow.NumberColumnsInLine,index:d,paddingSize:z(Eo)({paddingExpression:n.iteratedColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),directionRtl:!1})),iteratedColumn:n.iteratedColumnBodyRow.IteratedColumn,path:[...n.path,"IteratedColumn"],selectedElementPath:n.selectedElementPath,context:{...n.context,[n.iteratedColumnBodyRow.IndexName]:c},containerWidth:n.rowWidth,onOnElementClicked:u[0]||(u[0]=h=>a("onElementClicked",h)),onOnImageOriginalSizeAdjusted:u[1]||(u[1]=h=>a("onImageOriginalSizeAdjusted",h)),onOnImageSizeAdjusted:u[2]||(u[2]=h=>a("onImageSizeAdjusted",h)),onOnElementUpdatedEvent:u[3]||(u[3]=h=>a("onElementUpdatedEvent",h)),onOnElementRemoved:u[4]||(u[4]=h=>a("onElementRemoved",h))},null,8,["deps","theme","class","style","iteratedColumn","path","selectedElementPath","context","containerWidth"])):Ue("",!0),s.iteratedColumnVariant(n.iteratedColumnBodyRow.IteratedColumnVariant)?(O(),J(rt,{key:1},[s.iteratedColumnN21(n.iteratedColumnBodyRow.IteratedColumnVariant.IteratedColumnN21)?(O(),Ze(FTt,{key:d,deps:n.deps.iteratedColumnVariantDeps.iteratedColumnN21Deps,theme:n.theme,class:$e(["iterated-column-bottom-spacer",{"iterated-column__tablet-padding-right":(d+1)%2===1,"iterated-column__tablet-padding-left":(d+1)%2===0,"is-last-desktop-line":d>=o.dataList.length-n.iteratedColumnBodyRow.NumberColumnsInLine,"is-last-tablet-line":d>=o.dataList.length-2,"is-last-mobile-line":d==o.dataList.length-1}]),style:he(z(LR)({numberColumnsInLine:n.iteratedColumnBodyRow.NumberColumnsInLine,index:d,paddingSize:z(Eo)({paddingExpression:n.iteratedColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),directionRtl:!1})),iteratedColumnN21:n.iteratedColumnBodyRow.IteratedColumnVariant.IteratedColumnN21,path:[...n.path,"IteratedColumnVariant","IteratedColumnN21"],selectedElementPath:n.selectedElementPath,context:{...n.context,[n.iteratedColumnBodyRow.IndexName]:c},containerWidth:n.rowWidth,onOnElementClicked:u[5]||(u[5]=h=>a("onElementClicked",h)),onOnImageOriginalSizeAdjusted:u[6]||(u[6]=h=>a("onImageOriginalSizeAdjusted",h)),onOnImageSizeAdjusted:u[7]||(u[7]=h=>a("onImageSizeAdjusted",h)),onOnElementUpdatedEvent:u[8]||(u[8]=h=>a("onElementUpdatedEvent",h)),onOnElementRemoved:u[9]||(u[9]=h=>a("onElementRemoved",h))},null,8,["deps","theme","class","style","iteratedColumnN21","path","selectedElementPath","context","containerWidth"])):Ue("",!0),s.iteratedColumnN22(n.iteratedColumnBodyRow.IteratedColumnVariant.IteratedColumnN22)?(O(),Ze(kTt,{key:d,deps:n.deps.iteratedColumnVariantDeps.iteratedColumnN22Deps,theme:n.theme,class:$e(["iterated-column-bottom-spacer",{"iterated-column__tablet-padding-right iterated-column__N-2-2_mobile-padding-right":(d+1)%2===1,"iterated-column__tablet-padding-left iterated-column__N-2-2_mobile-padding-left":(d+1)%2===0,"is-last-desktop-line":d>=o.dataList.length-n.iteratedColumnBodyRow.NumberColumnsInLine,"is-last-tablet-line is-last-mobile-line":d>=o.dataList.length-2}]),style:he(z(LR)({numberColumnsInLine:n.iteratedColumnBodyRow.NumberColumnsInLine,index:d,paddingSize:z(Eo)({paddingExpression:n.iteratedColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),directionRtl:!1})),iteratedColumnN22:n.iteratedColumnBodyRow.IteratedColumnVariant.IteratedColumnN22,path:[...n.path,"IteratedColumnVariant","IteratedColumnN22"],selectedElementPath:n.selectedElementPath,context:{...n.context,[n.iteratedColumnBodyRow.IndexName]:c},containerWidth:n.rowWidth,onOnElementClicked:u[10]||(u[10]=h=>a("onElementClicked",h)),onOnImageOriginalSizeAdjusted:u[11]||(u[11]=h=>a("onImageOriginalSizeAdjusted",h)),onOnImageSizeAdjusted:u[12]||(u[12]=h=>a("onImageSizeAdjusted",h)),onOnElementUpdatedEvent:u[13]||(u[13]=h=>a("onElementUpdatedEvent",h)),onOnElementRemoved:u[14]||(u[14]=h=>a("onElementRemoved",h))},null,8,["deps","theme","class","style","iteratedColumnN22","path","selectedElementPath","context","containerWidth"])):Ue("",!0)],64)):Ue("",!0)],64))),128))])])])]))}}),DTt=ot(RTt,[["__scopeId","data-v-69ed8d34"]]),ATt={style:{"border-spacing":"0","border-collapse":"collapse",width:"100%",margin:"0 auto"}},NTt=Xe({__name:"IteratedBodyRow",props:{theme:{},deps:{},iteratedBodyRow:{},path:{},selectedElementPath:{},context:{},containerWidth:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onColumnWidthAdjusted","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){const n=t,o=Vt({dataList:[]});n.deps.listExpressionEvaluator({listExpression:n.iteratedBodyRow.DataSource,context:n.context}).then(i=>o.dataList=i);const r=e;return(i,s)=>(O(),J("table",ATt,[(O(!0),J(rt,null,$n(o.dataList,(a,l)=>(O(),J("tr",{key:l},[_("td",{style:he([z(Ow)({paddings:n.iteratedBodyRow.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})])},[ie(Vxe,{emailComponentBodyRow:n.iteratedBodyRow.BodyRow,deps:{iteratedColumnBodyRowDeps:n.deps.iteratedColumnBodyRowDeps,multipleColumnBodyRowDeps:n.deps.multipleColumnBodyRowDeps,listExpressionEvaluator:n.deps.listExpressionEvaluator},theme:n.theme,context:{...n.context,[n.iteratedBodyRow.IndexName]:a},rowWidth:n.containerWidth,path:[...n.path,"BodyRow"],selectedElementPath:n.selectedElementPath,onOnElementClicked:s[0]||(s[0]=u=>r("onElementClicked",u)),onOnImageOriginalSizeAdjusted:s[1]||(s[1]=u=>r("onImageOriginalSizeAdjusted",u)),onOnImageSizeAdjusted:s[2]||(s[2]=u=>r("onImageSizeAdjusted",u)),onOnColumnWidthAdjusted:s[3]||(s[3]=u=>r("onColumnWidthAdjusted",u)),onOnElementUpdatedEvent:s[4]||(s[4]=u=>r("onElementUpdatedEvent",u)),onOnElementRemoved:s[5]||(s[5]=u=>r("onElementRemoved",u))},null,8,["emailComponentBodyRow","deps","theme","context","rowWidth","path","selectedElementPath"])],4)]))),128))]))}}),BTt=t=>({Match:e=>{switch(t){case"Top":return e.Top();case"Middle":return e.Middle();case"Bottom":return e.Bottom();case"Baseline":return e.Baseline()}}}),LTt=t=>BTt(t).Match({Top:()=>"start",Middle:()=>"center",Bottom:()=>"end",Baseline:()=>"baseline"}),$Tt=ec,VTt=t=>({JustifyWidth:{WidthInPixels:t}}),MTt=t=>({ShrinkToContentWidth:{WidthInPixels:t}}),OTt=Nct,ITt=["align"],PTt=Xe({__name:"MultipleColumn",props:{deps:{},theme:{},multipleColumn:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]},containerWidth:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onColumnWidthAdjusted","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){Im(l=>({acad954c:a.value,v1971599c:s.value,v72b8524e:i.value}));const n=t,o=e,r=l=>{$Tt(n.multipleColumn.Width).Match({JustifyWidth:()=>M2.Some(VTt(l)),ShrinkToContentWidth:()=>M2.Some(MTt(l)),WidthInPercents:()=>M2.None}).map(u=>o("onColumnWidthAdjusted",{Path:n.path,Width:u}))},i=q(()=>OTt(n.multipleColumn.Width).Match({default:()=>"",WidthInPercents:l=>l.Value*n.containerWidth+"px"})),s=q(()=>LTt(n.multipleColumn.VerticalAlign)),a=q(()=>n.multipleColumn.VerticalAlign);return(l,u)=>Ot((O(),J("div",{class:$e(["multiple-column",{"multiple-column--justifyWidth":n.multipleColumn.Width.JustifyWidth!==void 0,"multiple-column--shrinkToContentWidth":n.multipleColumn.Width.ShrinkToContentWidth!==void 0,"multiple-column--widthInPercents":n.multipleColumn.Width.WidthInPercents!==void 0}]),style:{direction:"ltr"}},[_("table",{style:he([{width:"100%","border-spacing":"0"},[z(Mw)({borderCollapse:n.multipleColumn.BorderCollapse})]]),width:"100%"},[_("tbody",null,[_("tr",null,[_("td",{align:z($c)({containerAlign:n.multipleColumn.ContainerAlign}),style:he([[z(pd)({border:n.multipleColumn.Border,themeColors:n.theme.Colors}),z(Iu)({borderRadius:n.multipleColumn.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner}),{backgroundColor:z(Nl)({color:n.multipleColumn.BgColor,themeColors:n.theme.Colors})},z(Ow)({paddings:n.multipleColumn.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})],{"line-height":"normal"}])},[(O(!0),J(rt,null,$n(n.multipleColumn.Elements,(c,d)=>(O(),Ze(xl,{key:d,deps:n.deps.elementsDeps,theme:n.theme,element:c,context:n.context,path:[...n.path,"Elements",d],selectedElementPath:n.selectedElementPath,onOnElementClicked:u[0]||(u[0]=h=>o("onElementClicked",h)),onOnImageSizeAdjusted:u[1]||(u[1]=h=>o("onImageSizeAdjusted",h)),onOnImageOriginalSizeAdjusted:u[2]||(u[2]=h=>o("onImageOriginalSizeAdjusted",h)),onOnElementUpdatedEvent:u[3]||(u[3]=h=>o("onElementUpdatedEvent",h)),onOnElementRemoved:u[4]||(u[4]=h=>o("onElementRemoved",h))},null,8,["deps","theme","element","context","path","selectedElementPath"]))),128))],12,ITt)])])],4)],2)),[[z(fS),c=>r(c.width)]])}}),WTt=ot(PTt,[["__scopeId","data-v-bfa1869f"]]),HTt=Xe({__name:"MultipleColumnBodyRow",props:{deps:{},theme:{},multipleColumnBodyRow:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]},rowWidth:{}},emits:["onElementClicked","onImageSizeAdjusted","onImageOriginalSizeAdjusted","onColumnWidthAdjusted","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){Im(i=>({v36e68443:r.value}));const n=t,o=e,r=q(()=>Eo({paddingExpression:n.multipleColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})+"px");return(i,s)=>(O(),J("table",{class:"multiple-column-container",style:he([[z(Mw)({borderCollapse:n.multipleColumnBodyRow.BorderCollapse}),z(pd)({border:n.multipleColumnBodyRow.Border,themeColors:n.theme.Colors}),z(Iu)({borderRadius:n.multipleColumnBodyRow.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner}),{backgroundColor:z(Nl)({color:n.multipleColumnBodyRow.BgColor,themeColors:n.theme.Colors})}],{"border-spacing":"0",width:"100%",margin:"0 auto"}]),width:"100%"},[_("tbody",null,[_("tr",null,[_("td",{class:"multiple-column-container__inner",style:he([{"font-size":"0"},[z(kgt)({containerAlign:n.multipleColumnBodyRow.ContainerAlign}),z(Ow)({paddings:n.multipleColumnBodyRow.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),n.multipleColumnBodyRow.DirectionRtl?{direction:"rtl"}:{direction:"ltr"}]])},[(O(!0),J(rt,null,$n(n.multipleColumnBodyRow.Columns,(a,l)=>(O(),Ze(WTt,{key:l,deps:n.deps.multipleColumnDeps,theme:n.theme,multipleColumn:a,path:[...n.path,"Columns",l],selectedElementPath:n.selectedElementPath,context:n.context,containerWidth:n.rowWidth-z(Eo)({paddingExpression:n.multipleColumnBodyRow.Paddings.Left,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})-z(Eo)({paddingExpression:n.multipleColumnBodyRow.Paddings.Right,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})-n.multipleColumnBodyRow.Border.Left.Width-n.multipleColumnBodyRow.Border.Right.Width,style:he(z(LR)({numberColumnsInLine:n.multipleColumnBodyRow.Columns.length,index:l,paddingSize:z(Eo)({paddingExpression:n.multipleColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),directionRtl:n.multipleColumnBodyRow.DirectionRtl})),class:$e({"is-last-tablet-line":l==n.multipleColumnBodyRow.Columns.length-1,"is-last-mobile-line":l==n.multipleColumnBodyRow.Columns.length-1}),onOnElementClicked:s[0]||(s[0]=u=>o("onElementClicked",u)),onOnColumnWidthAdjusted:s[1]||(s[1]=u=>o("onColumnWidthAdjusted",u)),onOnImageSizeAdjusted:s[2]||(s[2]=u=>o("onImageSizeAdjusted",u)),onOnImageOriginalSizeAdjusted:s[3]||(s[3]=u=>o("onImageOriginalSizeAdjusted",u)),onOnElementUpdatedEvent:s[4]||(s[4]=u=>o("onElementUpdatedEvent",u)),onOnElementRemoved:s[5]||(s[5]=u=>o("onElementRemoved",u))},null,8,["deps","theme","multipleColumn","path","selectedElementPath","context","containerWidth","style","class"]))),128))],4)])])],4))}}),zTt=ot(HTt,[["__scopeId","data-v-c6ebdc94"]]),Vxe=Xe({__name:"EmailComponentBodyRow",props:{deps:{},theme:{},emailComponentBodyRow:{},path:{},selectedElementPath:{},context:{},rowWidth:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onColumnWidthAdjusted","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){const n=t,o={multipleColumns:i=>i!==void 0,iteratedColumns:i=>i!==void 0,iteratedBodyRow:i=>i!==void 0},r=e;return(i,s)=>(O(),J("div",null,[o.multipleColumns(n.emailComponentBodyRow.MultipleColumnBodyRow)?(O(),Ze(zTt,{key:0,deps:n.deps.multipleColumnBodyRowDeps,theme:n.theme,multipleColumnBodyRow:n.emailComponentBodyRow.MultipleColumnBodyRow,path:[...n.path,"MultipleColumnBodyRow"],selectedElementPath:n.selectedElementPath,context:t.context,rowWidth:n.rowWidth,onOnColumnWidthAdjusted:s[0]||(s[0]=a=>r("onColumnWidthAdjusted",a)),onOnImageOriginalSizeAdjusted:s[1]||(s[1]=a=>r("onImageOriginalSizeAdjusted",a)),onOnImageSizeAdjusted:s[2]||(s[2]=a=>r("onImageSizeAdjusted",a)),onOnElementClicked:s[3]||(s[3]=a=>r("onElementClicked",a)),onOnElementUpdatedEvent:s[4]||(s[4]=a=>r("onElementUpdatedEvent",a)),onOnElementRemoved:s[5]||(s[5]=a=>r("onElementRemoved",a))},null,8,["deps","theme","multipleColumnBodyRow","path","selectedElementPath","context","rowWidth"])):Ue("",!0),o.iteratedColumns(n.emailComponentBodyRow.IteratedColumnBodyRow)?(O(),Ze(DTt,{key:1,deps:n.deps.iteratedColumnBodyRowDeps,theme:n.theme,iteratedColumnBodyRow:n.emailComponentBodyRow.IteratedColumnBodyRow,path:[...n.path,"IteratedColumnBodyRow"],selectedElementPath:n.selectedElementPath,context:t.context,rowWidth:n.rowWidth,onOnElementClicked:s[6]||(s[6]=a=>r("onElementClicked",a)),onOnImageOriginalSizeAdjusted:s[7]||(s[7]=a=>r("onImageOriginalSizeAdjusted",a)),onOnImageSizeAdjusted:s[8]||(s[8]=a=>r("onImageSizeAdjusted",a)),onOnElementUpdatedEvent:s[9]||(s[9]=a=>r("onElementUpdatedEvent",a)),onOnElementRemoved:s[10]||(s[10]=a=>r("onElementRemoved",a))},null,8,["deps","theme","iteratedColumnBodyRow","path","selectedElementPath","context","rowWidth"])):Ue("",!0),o.iteratedBodyRow(n.emailComponentBodyRow.IteratedBodyRow)?(O(),Ze(NTt,{key:2,deps:{iteratedColumnBodyRowDeps:n.deps.iteratedColumnBodyRowDeps,multipleColumnBodyRowDeps:n.deps.multipleColumnBodyRowDeps,listExpressionEvaluator:n.deps.listExpressionEvaluator},theme:n.theme,iteratedBodyRow:n.emailComponentBodyRow.IteratedBodyRow,path:[...n.path,"IteratedBodyRow"],selectedElementPath:n.selectedElementPath,context:t.context,containerWidth:n.rowWidth,onOnElementClicked:s[11]||(s[11]=a=>r("onElementClicked",a)),onOnImageOriginalSizeAdjusted:s[12]||(s[12]=a=>r("onImageOriginalSizeAdjusted",a)),onOnImageSizeAdjusted:s[13]||(s[13]=a=>r("onImageSizeAdjusted",a)),onOnElementUpdatedEvent:s[14]||(s[14]=a=>r("onElementUpdatedEvent",a)),onOnElementRemoved:s[15]||(s[15]=a=>r("onElementRemoved",a))},null,8,["deps","theme","iteratedBodyRow","path","selectedElementPath","context","containerWidth"])):Ue("",!0)]))}}),jTt={emptyEmailComponentText:"Product shelf is hidden due to insufficient products",emptyEmailComponentTooltip:"The product shelf won't be displayed to recipients until it contains enough products",requiredComponentNotification:"Without this component the letter will not be sent"},UTt={emptyEmailComponentText:"Товарная полка скрыта из-за недостатка товаров",emptyEmailComponentTooltip:"Товарная полка не будет отображаться у получателей письма пока в ней недостаточно товаров",requiredComponentNotification:"Без этого компонента письмо не будет отправлено"},nP=Xn({en:jTt,ru:UTt}),KTt={},qTt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function JTt(t,e){return O(),J("svg",qTt,[...e[0]||(e[0]=[_("path",{d:"M6.99967 13.6663C3.31777 13.6663 0.333008 10.6815 0.333008 6.99967C0.333008 3.31777 3.31777 0.333008 6.99967 0.333008C10.6815 0.333008 13.6663 3.31777 13.6663 6.99967C13.6663 10.6815 10.6815 13.6663 6.99967 13.6663ZM6.99967 12.333C9.94521 12.333 12.333 9.94521 12.333 6.99967C12.333 4.05415 9.94521 1.66634 6.99967 1.66634C4.05415 1.66634 1.66634 4.05415 1.66634 6.99967C1.66634 9.94521 4.05415 12.333 6.99967 12.333ZM6.33301 3.66634H7.66634V4.99967H6.33301V3.66634ZM6.33301 6.33301H7.66634V10.333H6.33301V6.33301Z",fill:"var(--gray-500)"},null,-1)])])}const GTt=ot(KTt,[["render",JTt]]),YTt={key:0},XTt={key:0,class:"is-required-notification"},QTt={class:"bootstrap-styles w-100 d-flex justify-content-center gap-5"},ZTt=Xe({__name:"EmailComponent",props:{deps:{},theme:{},emailComponent:{},path:{},selectedElementPath:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onColumnWidthAdjusted","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){const n=t,o=Vt({context:{},ifResult:!n.emailComponent.ContextBuilderExpression,isLoaded:!1}),r={emptyEmailComponentText:nP({localeKey:n.deps.localeKey}).emptyEmailComponentText,emptyEmailComponentTooltip:nP({localeKey:n.deps.localeKey}).emptyEmailComponentTooltip,requiredComponentNotification:nP({localeKey:n.deps.localeKey}).requiredComponentNotification},i=a=>{o.isLoaded=!1,n.deps.dataStructExpressionEvaluator({dataStructBuilderExpression:a,context:{}}).then(l=>{(n.emailComponent.IfExpression?n.deps.boolExpressionEvaluatorDelegate({boolExpression:n.emailComponent.IfExpression,context:l}):Promise.resolve(!0)).then(u=>{o.context=l,o.ifResult=u,o.isLoaded=!0})})};an(()=>n.emailComponent.ContextBuilderExpression,a=>{a&&i(a)});const s=e;return n.emailComponent.ContextBuilderExpression?i(n.emailComponent.ContextBuilderExpression):o.isLoaded=!0,(a,l)=>o.isLoaded?(O(),J("div",YTt,[n.emailComponent.IsRequired?(O(),J("div",XTt,[_("i",null,[ie(GTt)]),_("span",null,"   "+Gt(r.requiredComponentNotification),1)])):Ue("",!0),o.ifResult?(O(),J("table",{key:1,style:he([[{backgroundColor:z(Nl)({color:n.emailComponent.InnerBgColor,themeColors:n.theme.Colors})},z(Iu)({borderRadius:n.emailComponent.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner}),{maxWidth:n.theme.BodyWidth+"px"}],{"border-spacing":"0","border-collapse":"collapse",width:"100%",margin:"0 auto"}])},[_("tbody",null,[_("tr",null,[_("td",{class:"row__inner",style:he([z(foe)({paddings:n.emailComponent.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings,fullWidth:n.emailComponent.FullWidth})])},[(O(!0),J(rt,null,$n(n.emailComponent.BodyRowList,(u,c)=>(O(),Ze(Vxe,{key:c,deps:n.deps.emailComponentBodyRowDeps,theme:n.theme,emailComponentBodyRow:u,context:o.context,rowWidth:n.emailComponent.FullWidth?n.theme.BodyWidth:n.theme.BodyWidth-n.theme.BodyPaddings.Left-n.theme.BodyPaddings.Right,path:[...n.path,"BodyRowList",c],selectedElementPath:n.selectedElementPath,onOnElementClicked:l[0]||(l[0]=d=>s("onElementClicked",d)),onOnImageSizeAdjusted:l[1]||(l[1]=d=>s("onImageSizeAdjusted",d)),onOnImageOriginalSizeAdjusted:l[2]||(l[2]=d=>s("onImageOriginalSizeAdjusted",d)),onOnColumnWidthAdjusted:l[3]||(l[3]=d=>s("onColumnWidthAdjusted",d)),onOnElementUpdatedEvent:l[4]||(l[4]=d=>s("onElementUpdatedEvent",d)),onOnElementRemoved:l[5]||(l[5]=d=>s("onElementRemoved",d))},null,8,["deps","theme","emailComponentBodyRow","context","rowWidth","path","selectedElementPath"]))),128))],4)])])],4)):(O(),J("div",{key:2,class:$e(["empty-email-component",{"is-required-component__paddings":n.emailComponent.IsRequired}])},[U0(Gt(r.emptyEmailComponentText)+" ",1),Ot((O(),J("i",null,[...l[6]||(l[6]=[_("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[_("path",{d:"M6.99967 13.6663C3.31777 13.6663 0.333008 10.6815 0.333008 6.99967C0.333008 3.31777 3.31777 0.333008 6.99967 0.333008C10.6815 0.333008 13.6663 3.31777 13.6663 6.99967C13.6663 10.6815 10.6815 13.6663 6.99967 13.6663ZM6.99967 12.333C9.94521 12.333 12.333 9.94521 12.333 6.99967C12.333 4.05415 9.94521 1.66634 6.99967 1.66634C4.05415 1.66634 1.66634 4.05415 1.66634 6.99967C1.66634 9.94521 4.05415 12.333 6.99967 12.333ZM6.33301 3.66634H7.66634V4.99967H6.33301V3.66634ZM6.33301 6.33301H7.66634V10.333H6.33301V6.33301Z",fill:"var(--gray-500)"})],-1)])])),[[z(Vo),{placement:"top",title:r.emptyEmailComponentTooltip}]])],2))])):(O(),J("div",{key:1,class:"bootstrap-styles w-100",style:he([z(foe)({paddings:n.emailComponent.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings,fullWidth:n.emailComponent.FullWidth}),{backgroundColor:z(Nl)({color:n.emailComponent.InnerBgColor,themeColors:n.theme.Colors})||"transparent"}])},[ie(z(Rne),{type:"text"}),_("div",QTt,[(O(),J(rt,null,$n(3,u=>ie(z(Rne),{key:u,type:"image, text, text, text, button",style:{width:"100%"}})),64))])],4))}}),Mxe=ot(ZTt,[["__scopeId","data-v-7266764f"]]),ext={class:"scale-to-width-fit-component",style:{display:"inline-block","transform-origin":"left top"}},Oxe=Xe({__name:"ScaleToWidthFit",emits:["scaledElement"],setup(t,{emit:e}){const n=e;return(o,r)=>Ot((O(),J("div",ext,[j0(o.$slots,"default")])),[[z(fS),({width:i})=>{o.$el.style.transform=`scale(${o.$el.parentElement.clientWidth/i}`,n("scaledElement",o.$el)}]])}}),txt={title:"Preview",applyButton:"Select",cancelButton:"Cancel"},nxt={title:"Предпросмотр",applyButton:"Выбрать",cancelButton:"Отмена"},oP=Xn({en:txt,ru:nxt}),oxt={class:"email-template-preview__inner-padding scrollable"},rxt={class:"emailTemplate-border-top"},ixt={class:"emailTemplate-border-bottom"},sxt=Xe({__name:"EmailTemplatePreviewModalWindow",props:{template:{},deps:{}},emits:["favoriteTemplateSelected","close"],setup(t,{emit:e}){const n=t,o={title:oP({localeKey:n.deps.localeKey}).title,applyButton:oP({localeKey:n.deps.localeKey}).applyButton,cancelButton:oP({localeKey:n.deps.localeKey}).cancelButton},r=s=>{const a=s.parentElement;a&&(a.style.height=s.getBoundingClientRect().height+"px")},i=e;return(s,a)=>(O(),Ze(gxe,{headerText:o.title,class:"email-component__preview-modal-window",onClose:a[3]||(a[3]=()=>i("close"))},{body:Tu(()=>[_("div",{style:he({backgroundColor:t.template.Theme.Colors.EmailBackgroundColor})},[ie(Oxe,{onScaledElement:a[0]||(a[0]=l=>r(l))},{default:Tu(()=>[_("div",oxt,[_("div",{class:"bootstrap-styles pe-none email-template-preview",style:he({fontFamily:n.template.Theme.FontFamily,width:t.template.Theme.BodyWidth+"px"})},[_("div",{class:"webkit emailTemplate--desktop",style:he({borderTopLeftRadius:n.template.Theme.BorderRadius.TopLeft+"px",borderTopRightRadius:n.template.Theme.BorderRadius.TopRight+"px",borderBottomLeftRadius:n.template.Theme.BorderRadius.BottomLeft+"px",borderBottomRightRadius:n.template.Theme.BorderRadius.BottomRight+"px"})},[_("div",rxt,[_("table",{style:he([[{maxWidth:n.template.Theme.BodyWidth+"px",width:"100%"}],{"border-spacing":"0"}])},[_("tbody",null,[_("tr",null,[_("td",{style:he([{paddingTop:n.template.Theme.BodyPaddings.Top+"px"},{"font-size":"0","line-height":"0"}])},"   ",4)])])],4)]),(O(!0),J(rt,null,$n(n.template.Components,(l,u)=>(O(),J("div",{key:u},[ie(Mxe,{deps:t.deps.emailComponentDeps,theme:n.template.Theme,emailComponent:l,path:[],selectedElementPath:[]},null,8,["deps","theme","emailComponent"])]))),128)),_("div",ixt,[_("table",{style:he([[{maxWidth:n.template.Theme.BodyWidth+"px",width:"100%"}],{"border-spacing":"0"}])},[_("tbody",null,[_("tr",null,[_("td",{style:he([{paddingBottom:n.template.Theme.BodyPaddings.Bottom+"px"},{"font-size":"0","line-height":"0"}])},"   ",4)])])],4)])],4)],4)])]),_:1})],4)]),"footer-actions":Tu(()=>[_("button",{type:"button",class:"modal-footer__button bootstrap-styles d-flex justify-content-center align-center py-1 px-3 me-3 rounded-2 bg-blue-selected button__hover-blue-100 text-color-selected",onClick:a[1]||(a[1]=zo(()=>i("close"),["stop"]))},Gt(o.cancelButton),1),_("button",{type:"submit",class:"modal-footer__button bootstrap-styles d-flex justify-content-center align-center py-1 px-3 rounded-2 bg-color-selected text-white cursor-pointer button__hover-blue-400",onClick:a[2]||(a[2]=()=>{i("favoriteTemplateSelected")})},Gt(o.applyButton),1)]),_:1},8,["headerText"]))}}),axt=ot(sxt,[["__scopeId","data-v-a7898fb0"]]),lxt={class:"favorite-template-select__item-wrapper"},uxt={class:"favorite-template-select__item bootstrap-styles border rounded-3"},cxt={class:"email-template-preview__inner-padding scrollable"},dxt={class:"emailTemplate-border-top"},hxt={class:"emailTemplate-border-bottom"},mxt=Xe({__name:"EmailTemplatePreviewTile",props:{deps:{},template:{},templateName:{}},emits:["favoriteTemplateSelected"],setup(t,{emit:e}){Im(k=>({v3871f1be:s.value,v115088ee:a.value,v05d440ec:i.value.Title.fontWeight,v40460f14:i.value.Title.fontFamily,v7063b1a0:i.value.Title.color,v354cb820:i.value.Title.textDecoration,v7b95965f:i.value.Title.fontStyle,v06e67430:l.value,v200e2d33:u.value,v330c0660:i.value.Heading.fontWeight,v15d31f4c:i.value.Heading.fontFamily,d0cbc5ec:i.value.Heading.color,b8f0f814:i.value.Heading.textDecoration,v01743cc9:i.value.Heading.fontStyle,v5da513c8:c.value,v4f43a067:d.value,v59536306:i.value.SubHeading.fontWeight,v3c1a7bf2:i.value.SubHeading.fontFamily,v3768f0a4:i.value.SubHeading.color,v67e41d9c:i.value.SubHeading.textDecoration,v9fc8993a:i.value.SubHeading.fontStyle,v40ba636e:h.value,v0f4a8139:m.value,v15a6734c:i.value.LargeText.fontWeight,v50184174:i.value.LargeText.fontFamily,v92a86e60:i.value.LargeText.color,v32189220:i.value.LargeText.textDecoration,b6c2d4e2:i.value.LargeText.fontStyle,v28021f2e:f.value,v43924cf9:p.value,v224b6e98:i.value.NormalText.fontWeight,v5cbd3cc0:i.value.NormalText.fontFamily,v89ce9394:i.value.NormalText.color,v6f047c4a:i.value.NormalText.textDecoration,b72b4016:i.value.NormalText.fontStyle,v1182ba2f:g.value,v614fa88c:y.value,d7e5748e:i.value.DescriptionText.fontWeight,v76d45ea5:i.value.DescriptionText.fontFamily,v3502ea11:i.value.DescriptionText.color,v18b76ecf:i.value.DescriptionText.textDecoration,v17dda360:i.value.DescriptionText.fontStyle,v48efd5f4:b.value,v40252b82:F.value,v5c4cc5ee:i.value.Link.fontWeight,v3f13deda:i.value.Link.fontFamily,e8f14688:i.value.Link.color,v8fbc66f8:i.value.Link.textDecoration,v8f13590a:i.value.Link.fontStyle,v086d82ac:v.value,v929a6e12:T.value,v89491a14:i.value.Button.fontWeight,c3bae83c:i.value.Button.fontFamily,c89aaa98:i.value.Button.color,v6682b58c:i.value.Button.textDecoration,v05d9e573:i.value.Button.fontStyle}));const n=t,o=Vt({isPreviewComponentModalWindowShown:!1}),r=k=>{const R=k.parentElement;R&&(R.style.height=k.getBoundingClientRect().height+"px")},i=q(()=>{const{FontFamily:k,FontSettingsPresets:R,Colors:D}=n.template.Theme;return{Title:us({fontFamily:k,themeFontSettings:R.Title,themeColor:D.TitleColor}),Heading:us({fontFamily:k,themeFontSettings:R.Heading,themeColor:D.HeadingColor}),SubHeading:us({fontFamily:k,themeFontSettings:R.SubHeading,themeColor:D.SubHeadingColor}),LargeText:us({fontFamily:k,themeFontSettings:R.LargeText,themeColor:D.LargeTextColor}),NormalText:us({fontFamily:k,themeFontSettings:R.NormalText,themeColor:D.NormalTextColor}),DescriptionText:us({fontFamily:k,themeFontSettings:R.DescriptionText,themeColor:D.DescriptionTextColor}),Link:us({fontFamily:k,themeFontSettings:R.Link,themeColor:D.LinkColor}),Button:us({fontFamily:k,themeFontSettings:R.Button,themeColor:D.ButtonTextColor})}}),s=q(()=>i.value.Title.fontSize+"px"),a=q(()=>i.value.Title.lineHeight+"px"),l=q(()=>i.value.Heading.fontSize+"px"),u=q(()=>i.value.Heading.lineHeight+"px"),c=q(()=>i.value.SubHeading.fontSize+"px"),d=q(()=>i.value.SubHeading.lineHeight+"px"),h=q(()=>i.value.LargeText.fontSize+"px"),m=q(()=>i.value.LargeText.lineHeight+"px"),f=q(()=>i.value.NormalText.fontSize+"px"),p=q(()=>i.value.NormalText.lineHeight+"px"),g=q(()=>i.value.DescriptionText.fontSize+"px"),y=q(()=>i.value.DescriptionText.lineHeight+"px"),b=q(()=>i.value.Link.fontSize+"px"),F=q(()=>i.value.Link.lineHeight+"px"),v=q(()=>i.value.Button.fontSize+"px"),T=q(()=>i.value.Button.lineHeight+"px"),w=e;return(k,R)=>(O(),J("div",lxt,[_("div",uxt,[_("div",{class:"bootstrap-styles h-100",style:he({backgroundColor:n.template.Theme.Colors.EmailBackgroundColor}),onClick:R[1]||(R[1]=()=>{o.isPreviewComponentModalWindowShown=!0})},[ie(Oxe,{onScaledElement:R[0]||(R[0]=D=>r(D))},{default:Tu(()=>[_("div",cxt,[_("div",{class:"bootstrap-styles pe-none email-template-preview",style:he({fontFamily:n.template.Theme.FontFamily,width:t.template.Theme.BodyWidth+"px"})},[_("div",{class:"webkit emailTemplate--desktop",style:he({backgroundColor:n.template.Theme.Colors.BodyColor,borderTopLeftRadius:n.template.Theme.BorderRadius.TopLeft+"px",borderTopRightRadius:n.template.Theme.BorderRadius.TopRight+"px",borderBottomLeftRadius:n.template.Theme.BorderRadius.BottomLeft+"px",borderBottomRightRadius:n.template.Theme.BorderRadius.BottomRight+"px"})},[_("div",dxt,[_("table",{style:he([[{maxWidth:n.template.Theme.BodyWidth+"px",width:"100%"}],{"border-spacing":"0"}])},[_("tbody",null,[_("tr",null,[_("td",{style:he([{paddingTop:n.template.Theme.BodyPaddings.Top+"px"},{"font-size":"0","line-height":"0"}])},"   ",4)])])],4)]),(O(!0),J(rt,null,$n(n.template.Components,(D,V)=>(O(),J("div",{key:V},[ie(Mxe,{deps:n.deps.emailComponentDeps,theme:n.template.Theme,emailComponent:D,path:[],selectedElementPath:[]},null,8,["deps","theme","emailComponent"])]))),128)),_("div",hxt,[_("table",{style:he([[{maxWidth:n.template.Theme.BodyWidth+"px",width:"100%"}],{"border-spacing":"0"}])},[_("tbody",null,[_("tr",null,[_("td",{style:he([{paddingBottom:n.template.Theme.BodyPaddings.Bottom+"px"},{"font-size":"0","line-height":"0"}])},"   ",4)])])],4)])],4)],4)])]),_:1})],4),(O(),Ze(m9,{to:"#app"},[o.isPreviewComponentModalWindowShown?(O(),Ze(axt,{key:0,template:n.template,deps:n.deps.emailTemplatePreviewModalWindowDeps,onClose:R[2]||(R[2]=()=>o.isPreviewComponentModalWindowShown=!1),onFavoriteTemplateSelected:R[3]||(R[3]=()=>w("favoriteTemplateSelected"))},null,8,["template","deps"])):Ue("",!0)]))]),_("div",{class:"bootstrap-styles favorite-template__name mt-2",onClick:R[4]||(R[4]=()=>{o.isPreviewComponentModalWindowShown=!0})},Gt(n.templateName),1)]))}}),fxt=ot(mxt,[["__scopeId","data-v-66b13e3f"]]),pxt=t=>ec(t),gxt=t=>ec(t),Cxt=t=>ec(t),yxt=t=>ec(t),bxt=t=>({predicate:e,context:n})=>Promise.all([t.numberExpressionEvaluator({numberExpression:e.Left,context:n}),t.numberExpressionEvaluator({numberExpression:e.Right,context:n})]).then(([o,r])=>o===r),vxt=t=>({predicate:e,context:n})=>Promise.all([t.numberExpressionEvaluator({numberExpression:e.Left,context:n}),t.numberExpressionEvaluator({numberExpression:e.Right,context:n})]).then(([o,r])=>o<r),Txt=t=>({predicate:e,context:n})=>Promise.all([t.numberExpressionEvaluator({numberExpression:e.Left,context:n}),t.numberExpressionEvaluator({numberExpression:e.Right,context:n})]).then(([o,r])=>o>r),xxt=t=>{const e=bxt({numberExpressionEvaluator:t.numberExpressionEvaluator}),n=Txt({numberExpressionEvaluator:t.numberExpressionEvaluator}),o=vxt({numberExpressionEvaluator:t.numberExpressionEvaluator});return({numberPredicate:r,context:i})=>yxt(r).Match({Equal:s=>e({predicate:s,context:i}),GreaterThan:s=>n({predicate:s,context:i}),LessThan:s=>o({predicate:s,context:i})})},Fxt=t=>({predicate:e,context:n})=>Promise.all([t.stringExpressionEvaluator({stringExpression:e.Left,context:n}),t.stringExpressionEvaluator({stringExpression:e.Right,context:n})]).then(([o,r])=>o===r),Sxt=t=>({predicate:e,context:n})=>Promise.all([t.stringExpressionEvaluator({stringExpression:e.Left,context:n}),t.stringExpressionEvaluator({stringExpression:e.Contains,context:n})]).then(([o,r])=>o.includes(r)),wxt=t=>{const e=Fxt({stringExpressionEvaluator:t.stringExpressionEvaluator}),n=Sxt({stringExpressionEvaluator:t.stringExpressionEvaluator});return({stringPredicate:o,context:r})=>Cxt(o).Match({Contains:i=>n({predicate:i,context:r}),Equal:i=>e({predicate:i,context:r})})},kxt=t=>{const e=xxt({numberExpressionEvaluator:t.numberExpressionEvaluator}),n=wxt({stringExpressionEvaluator:t.stringExpressionEvaluator});return({predicate:o,context:r})=>gxt(o).Match({NumberPredicate:i=>e({numberPredicate:i,context:r}),StringPredicate:i=>n({stringPredicate:i,context:r})})},Ixe=t=>{const e=kxt({numberExpressionEvaluator:t.numberExpressionEvaluator,stringExpressionEvaluator:t.stringExpressionEvaluator}),n=({boolExpression:o,context:r})=>pxt(o).Match({AndExpression:i=>Promise.all(i.Expressions.map(s=>n({boolExpression:s,context:r}))).then(s=>s.every(a=>a)),OrExpression:i=>Promise.all(i.Expressions.map(s=>n({boolExpression:s,context:r}))).then(s=>s.some(a=>a)),NotExpression:async i=>!await n({boolExpression:i.Expression,context:r}),Predicate:i=>e({predicate:i,context:r})});return n},Ext=t=>Xe((e,n)=>()=>Ju(fxt,{template:t.template,templateName:t.templateName,deps:t.emailTemplatePreviewTileDeps,onFavoriteTemplateSelected:t.onFavoriteTemplateSelected})),Pxe=t=>t.reduce((e,n)=>(e[n.name]=n.value,e),{}),uC=t=>q1e({InternalProductId:t.internalProductId,Name:t.name,Description:t.description,Price:t.price,OldPrice:t.oldPrice,PictureUrl:t.pictureUrl,Url:t.url,CategoryIds:[],Vendor:t.vendor,Params:Pxe(t.parameters),DiscountPercentage:t.discountPercentage}),_xt=async t=>(await t.getPopularProductsHttpClient({body:{partnerId:t.partnerId,stockId:t.stockId}})).body.recommendations.map(e=>uC(e));var Rxt=typeof global=="object"&&global&&global.Object===Object&&global,Dxt=typeof self=="object"&&self&&self.Object===Object&&self,Axt=Rxt||Dxt||Function("return this")(),VN=Axt.Symbol;VN&&VN.toStringTag;VN&&VN.toStringTag;const{entries:Wxe,setPrototypeOf:Aoe,isFrozen:Nxt,getPrototypeOf:Bxt,getOwnPropertyDescriptor:Lxt}=Object;let{freeze:Di,seal:Pa,create:P5}=Object,{apply:W5,construct:H5}=typeof Reflect<"u"&&Reflect;Di||(Di=function(t){return t});Pa||(Pa=function(t){return t});W5||(W5=function(t,e){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return t.apply(e,o)});H5||(H5=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return new t(...n)});const DE=Ai(Array.prototype.forEach),$xt=Ai(Array.prototype.lastIndexOf),Noe=Ai(Array.prototype.pop),T1=Ai(Array.prototype.push),Vxt=Ai(Array.prototype.splice),VR=Ai(String.prototype.toLowerCase),rP=Ai(String.prototype.toString),iP=Ai(String.prototype.match),x1=Ai(String.prototype.replace),Mxt=Ai(String.prototype.indexOf),Oxt=Ai(String.prototype.trim),fl=Ai(Object.prototype.hasOwnProperty),qr=Ai(RegExp.prototype.test),F1=Ixt(TypeError);function Ai(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return W5(t,e,o)}}function Ixt(t){return function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return H5(t,n)}}function Wt(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:VR;Aoe&&Aoe(t,null);let o=e.length;for(;o--;){let r=e[o];if(typeof r=="string"){const i=n(r);i!==r&&(Nxt(e)||(e[o]=i),r=i)}t[r]=!0}return t}function Pxt(t){for(let e=0;e<t.length;e++)fl(t,e)||(t[e]=null);return t}function Ql(t){const e=P5(null);for(const[n,o]of Wxe(t))fl(t,n)&&(Array.isArray(o)?e[n]=Pxt(o):o&&typeof o=="object"&&o.constructor===Object?e[n]=Ql(o):e[n]=o);return e}function S1(t,e){for(;t!==null;){const o=Lxt(t,e);if(o){if(o.get)return Ai(o.get);if(typeof o.value=="function")return Ai(o.value)}t=Bxt(t)}function n(){return null}return n}const Boe=Di(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),sP=Di(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),aP=Di(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Wxt=Di(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),lP=Di(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Hxt=Di(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Loe=Di(["#text"]),$oe=Di(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),uP=Di(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Voe=Di(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),AE=Di(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),zxt=Pa(/\{\{[\w\W]*|[\w\W]*\}\}/gm),jxt=Pa(/<%[\w\W]*|[\w\W]*%>/gm),Uxt=Pa(/\$\{[\w\W]*/gm),Kxt=Pa(/^data-[\-\w.\u00B7-\uFFFF]+$/),qxt=Pa(/^aria-[\-\w]+$/),Hxe=Pa(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Jxt=Pa(/^(?:\w+script|data):/i),Gxt=Pa(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zxe=Pa(/^html$/i),Yxt=Pa(/^[a-z][.\w]*(-[.\w]+)+$/i);var Moe=Object.freeze({__proto__:null,ARIA_ATTR:qxt,ATTR_WHITESPACE:Gxt,CUSTOM_ELEMENT:Yxt,DATA_ATTR:Kxt,DOCTYPE_NAME:zxe,ERB_EXPR:jxt,IS_ALLOWED_URI:Hxe,IS_SCRIPT_OR_DATA:Jxt,MUSTACHE_EXPR:zxt,TMPLIT_EXPR:Uxt});const w1={element:1,text:3,progressingInstruction:7,comment:8,document:9},Xxt=function(){return typeof window>"u"?null:window},Qxt=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const o="data-tt-policy-suffix";e&&e.hasAttribute(o)&&(n=e.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return t.createPolicy(r,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},Ooe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function jxe(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xxt();const e=C=>jxe(C);if(e.version="3.3.1",e.removed=[],!t||!t.document||t.document.nodeType!==w1.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const o=n,r=o.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:u,NamedNodeMap:c=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:m}=t,f=l.prototype,p=S1(f,"cloneNode"),g=S1(f,"remove"),y=S1(f,"nextSibling"),b=S1(f,"childNodes"),F=S1(f,"parentNode");if(typeof s=="function"){const C=n.createElement("template");C.content&&C.content.ownerDocument&&(n=C.content.ownerDocument)}let v,T="";const{implementation:w,createNodeIterator:k,createDocumentFragment:R,getElementsByTagName:D}=n,{importNode:V}=o;let E=Ooe();e.isSupported=typeof Wxe=="function"&&typeof F=="function"&&w&&w.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:A,ERB_EXPR:N,TMPLIT_EXPR:I,DATA_ATTR:M,ARIA_ATTR:$,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:ke,CUSTOM_ELEMENT:Oe}=Moe;let{IS_ALLOWED_URI:ve}=Moe,K=null;const Pe=Wt({},[...Boe,...sP,...aP,...lP,...Loe]);let Y=null;const He=Wt({},[...$oe,...uP,...Voe,...AE]);let P=Object.seal(P5(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ee=null,ae=null;const ne=Object.seal(P5(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let St=!0,vt=!0,Tt=!1,B=!0,L=!1,j=!0,G=!1,Q=!1,Z=!1,te=!1,oe=!1,U=!1,X=!0,Ve=!1;const ce="user-content-";let ue=!0,de=!1,Te={},le=null;const ze=Wt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let cn=null;const dn=Wt({},["audio","video","img","source","image","track"]);let sn=null;const bn=Wt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),nn="http://www.w3.org/1998/Math/MathML",hn="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml";let ft=Ke,An=!1,Nn=null;const il=Wt({},[nn,hn,Ke],rP);let gn=Wt({},["mi","mo","mn","ms","mtext"]),Cn=Wt({},["annotation-xml"]);const sl=Wt({},["title","style","font","a","script"]);let on=null;const al=["application/xhtml+xml","text/html"],ll="text/html";let re=null,Rt=null;const ul=n.createElement("form"),lr=function(C){return C instanceof RegExp||C instanceof Function},Qn=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Rt&&Rt===C)){if((!C||typeof C!="object")&&(C={}),C=Ql(C),on=al.indexOf(C.PARSER_MEDIA_TYPE)===-1?ll:C.PARSER_MEDIA_TYPE,re=on==="application/xhtml+xml"?rP:VR,K=fl(C,"ALLOWED_TAGS")?Wt({},C.ALLOWED_TAGS,re):Pe,Y=fl(C,"ALLOWED_ATTR")?Wt({},C.ALLOWED_ATTR,re):He,Nn=fl(C,"ALLOWED_NAMESPACES")?Wt({},C.ALLOWED_NAMESPACES,rP):il,sn=fl(C,"ADD_URI_SAFE_ATTR")?Wt(Ql(bn),C.ADD_URI_SAFE_ATTR,re):bn,cn=fl(C,"ADD_DATA_URI_TAGS")?Wt(Ql(dn),C.ADD_DATA_URI_TAGS,re):dn,le=fl(C,"FORBID_CONTENTS")?Wt({},C.FORBID_CONTENTS,re):ze,Ee=fl(C,"FORBID_TAGS")?Wt({},C.FORBID_TAGS,re):Ql({}),ae=fl(C,"FORBID_ATTR")?Wt({},C.FORBID_ATTR,re):Ql({}),Te=fl(C,"USE_PROFILES")?C.USE_PROFILES:!1,St=C.ALLOW_ARIA_ATTR!==!1,vt=C.ALLOW_DATA_ATTR!==!1,Tt=C.ALLOW_UNKNOWN_PROTOCOLS||!1,B=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,L=C.SAFE_FOR_TEMPLATES||!1,j=C.SAFE_FOR_XML!==!1,G=C.WHOLE_DOCUMENT||!1,te=C.RETURN_DOM||!1,oe=C.RETURN_DOM_FRAGMENT||!1,U=C.RETURN_TRUSTED_TYPE||!1,Z=C.FORCE_BODY||!1,X=C.SANITIZE_DOM!==!1,Ve=C.SANITIZE_NAMED_PROPS||!1,ue=C.KEEP_CONTENT!==!1,de=C.IN_PLACE||!1,ve=C.ALLOWED_URI_REGEXP||Hxe,ft=C.NAMESPACE||Ke,gn=C.MATHML_TEXT_INTEGRATION_POINTS||gn,Cn=C.HTML_INTEGRATION_POINTS||Cn,P=C.CUSTOM_ELEMENT_HANDLING||{},C.CUSTOM_ELEMENT_HANDLING&&lr(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(P.tagNameCheck=C.CUSTOM_ELEMENT_HANDLING.tagNameCheck),C.CUSTOM_ELEMENT_HANDLING&&lr(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(P.attributeNameCheck=C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(P.allowCustomizedBuiltInElements=C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),L&&(vt=!1),oe&&(te=!0),Te&&(K=Wt({},Loe),Y=[],Te.html===!0&&(Wt(K,Boe),Wt(Y,$oe)),Te.svg===!0&&(Wt(K,sP),Wt(Y,uP),Wt(Y,AE)),Te.svgFilters===!0&&(Wt(K,aP),Wt(Y,uP),Wt(Y,AE)),Te.mathMl===!0&&(Wt(K,lP),Wt(Y,Voe),Wt(Y,AE))),C.ADD_TAGS&&(typeof C.ADD_TAGS=="function"?ne.tagCheck=C.ADD_TAGS:(K===Pe&&(K=Ql(K)),Wt(K,C.ADD_TAGS,re))),C.ADD_ATTR&&(typeof C.ADD_ATTR=="function"?ne.attributeCheck=C.ADD_ATTR:(Y===He&&(Y=Ql(Y)),Wt(Y,C.ADD_ATTR,re))),C.ADD_URI_SAFE_ATTR&&Wt(sn,C.ADD_URI_SAFE_ATTR,re),C.FORBID_CONTENTS&&(le===ze&&(le=Ql(le)),Wt(le,C.FORBID_CONTENTS,re)),C.ADD_FORBID_CONTENTS&&(le===ze&&(le=Ql(le)),Wt(le,C.ADD_FORBID_CONTENTS,re)),ue&&(K["#text"]=!0),G&&Wt(K,["html","head","body"]),K.table&&(Wt(K,["tbody"]),delete Ee.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw F1('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw F1('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=C.TRUSTED_TYPES_POLICY,T=v.createHTML("")}else v===void 0&&(v=Qxt(m,r)),v!==null&&typeof T=="string"&&(T=v.createHTML(""));Di&&Di(C),Rt=C}},ur=Wt({},[...sP,...aP,...Wxt]),cr=Wt({},[...lP,...Hxt]),cl=function(C){let x=F(C);(!x||!x.tagName)&&(x={namespaceURI:ft,tagName:"template"});const S=VR(C.tagName),W=VR(x.tagName);return Nn[C.namespaceURI]?C.namespaceURI===hn?x.namespaceURI===Ke?S==="svg":x.namespaceURI===nn?S==="svg"&&(W==="annotation-xml"||gn[W]):!!ur[S]:C.namespaceURI===nn?x.namespaceURI===Ke?S==="math":x.namespaceURI===hn?S==="math"&&Cn[W]:!!cr[S]:C.namespaceURI===Ke?x.namespaceURI===hn&&!Cn[W]||x.namespaceURI===nn&&!gn[W]?!1:!cr[S]&&(sl[S]||!ur[S]):!!(on==="application/xhtml+xml"&&Nn[C.namespaceURI]):!1},gt=function(C){T1(e.removed,{element:C});try{F(C).removeChild(C)}catch{g(C)}},Ft=function(C,x){try{T1(e.removed,{attribute:x.getAttributeNode(C),from:x})}catch{T1(e.removed,{attribute:null,from:x})}if(x.removeAttribute(C),C==="is")if(te||oe)try{gt(x)}catch{}else try{x.setAttribute(C,"")}catch{}},dr=function(C){let x=null,S=null;if(Z)C="<remove></remove>"+C;else{const ee=iP(C,/^[\r\n\t ]+/);S=ee&&ee[0]}on==="application/xhtml+xml"&&ft===Ke&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");const W=v?v.createHTML(C):C;if(ft===Ke)try{x=new h().parseFromString(W,on)}catch{}if(!x||!x.documentElement){x=w.createDocument(ft,"template",null);try{x.documentElement.innerHTML=An?T:W}catch{}}const se=x.body||x.documentElement;return C&&S&&se.insertBefore(n.createTextNode(S),se.childNodes[0]||null),ft===Ke?D.call(x,G?"html":"body")[0]:G?x.documentElement:se},hr=function(C){return k.call(C.ownerDocument||C,C,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Zn=function(C){return C instanceof d&&(typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||!(C.attributes instanceof c)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function")},mr=function(C){return typeof a=="function"&&C instanceof a};function it(C,x,S){DE(C,W=>{W.call(e,x,S,Rt)})}const fr=function(C){let x=null;if(it(E.beforeSanitizeElements,C,null),Zn(C))return gt(C),!0;const S=re(C.nodeName);if(it(E.uponSanitizeElement,C,{tagName:S,allowedTags:K}),j&&C.hasChildNodes()&&!mr(C.firstElementChild)&&qr(/<[/\w!]/g,C.innerHTML)&&qr(/<[/\w!]/g,C.textContent)||C.nodeType===w1.progressingInstruction||j&&C.nodeType===w1.comment&&qr(/<[/\w]/g,C.data))return gt(C),!0;if(!(ne.tagCheck instanceof Function&&ne.tagCheck(S))&&(!K[S]||Ee[S])){if(!Ee[S]&&gr(S)&&(P.tagNameCheck instanceof RegExp&&qr(P.tagNameCheck,S)||P.tagNameCheck instanceof Function&&P.tagNameCheck(S)))return!1;if(ue&&!le[S]){const W=F(C)||C.parentNode,se=b(C)||C.childNodes;if(se&&W){const ee=se.length;for(let qe=ee-1;qe>=0;--qe){const je=p(se[qe],!0);je.__removalCount=(C.__removalCount||0)+1,W.insertBefore(je,y(C))}}}return gt(C),!0}return C instanceof l&&!cl(C)||(S==="noscript"||S==="noembed"||S==="noframes")&&qr(/<\/no(script|embed|frames)/i,C.innerHTML)?(gt(C),!0):(L&&C.nodeType===w1.text&&(x=C.textContent,DE([A,N,I],W=>{x=x1(x,W," ")}),C.textContent!==x&&(T1(e.removed,{element:C.cloneNode()}),C.textContent=x)),it(E.afterSanitizeElements,C,null),!1)},pr=function(C,x,S){if(X&&(x==="id"||x==="name")&&(S in n||S in ul))return!1;if(!(vt&&!ae[x]&&qr(M,x))&&!(St&&qr($,x))&&!(ne.attributeCheck instanceof Function&&ne.attributeCheck(x,C))){if(!Y[x]||ae[x]){if(!(gr(C)&&(P.tagNameCheck instanceof RegExp&&qr(P.tagNameCheck,C)||P.tagNameCheck instanceof Function&&P.tagNameCheck(C))&&(P.attributeNameCheck instanceof RegExp&&qr(P.attributeNameCheck,x)||P.attributeNameCheck instanceof Function&&P.attributeNameCheck(x,C))||x==="is"&&P.allowCustomizedBuiltInElements&&(P.tagNameCheck instanceof RegExp&&qr(P.tagNameCheck,S)||P.tagNameCheck instanceof Function&&P.tagNameCheck(S))))return!1}else if(!sn[x]&&!qr(ve,x1(S,ke,""))&&!((x==="src"||x==="xlink:href"||x==="href")&&C!=="script"&&Mxt(S,"data:")===0&&cn[C])&&!(Tt&&!qr(H,x1(S,ke,"")))&&S)return!1}return!0},gr=function(C){return C!=="annotation-xml"&&iP(C,Oe)},Cr=function(C){it(E.beforeSanitizeAttributes,C,null);const{attributes:x}=C;if(!x||Zn(C))return;const S={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y,forceKeepAttr:void 0};let W=x.length;for(;W--;){const se=x[W],{name:ee,namespaceURI:qe,value:je}=se,Qe=re(ee),Bn=je;let _e=ee==="value"?Bn:Oxt(Bn);if(S.attrName=Qe,S.attrValue=_e,S.keepAttr=!0,S.forceKeepAttr=void 0,it(E.uponSanitizeAttribute,C,S),_e=S.attrValue,Ve&&(Qe==="id"||Qe==="name")&&(Ft(ee,C),_e=ce+_e),j&&qr(/((--!?|])>)|<\/(style|title|textarea)/i,_e)){Ft(ee,C);continue}if(Qe==="attributename"&&iP(_e,"href")){Ft(ee,C);continue}if(S.forceKeepAttr)continue;if(!S.keepAttr){Ft(ee,C);continue}if(!B&&qr(/\/>/i,_e)){Ft(ee,C);continue}L&&DE([A,N,I],na=>{_e=x1(_e,na," ")});const mn=re(C.nodeName);if(!pr(mn,Qe,_e)){Ft(ee,C);continue}if(v&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!qe)switch(m.getAttributeType(mn,Qe)){case"TrustedHTML":{_e=v.createHTML(_e);break}case"TrustedScriptURL":{_e=v.createScriptURL(_e);break}}if(_e!==Bn)try{qe?C.setAttributeNS(qe,ee,_e):C.setAttribute(ee,_e),Zn(C)?gt(C):Noe(e.removed)}catch{Ft(ee,C)}}it(E.afterSanitizeAttributes,C,null)},dl=function C(x){let S=null;const W=hr(x);for(it(E.beforeSanitizeShadowDOM,x,null);S=W.nextNode();)it(E.uponSanitizeShadowNode,S,null),fr(S),Cr(S),S.content instanceof i&&C(S.content);it(E.afterSanitizeShadowDOM,x,null)};return e.sanitize=function(C){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=null,W=null,se=null,ee=null;if(An=!C,An&&(C="<!-->"),typeof C!="string"&&!mr(C))if(typeof C.toString=="function"){if(C=C.toString(),typeof C!="string")throw F1("dirty is not a string, aborting")}else throw F1("toString is not a function");if(!e.isSupported)return C;if(Q||Qn(x),e.removed=[],typeof C=="string"&&(de=!1),de){if(C.nodeName){const Qe=re(C.nodeName);if(!K[Qe]||Ee[Qe])throw F1("root node is forbidden and cannot be sanitized in-place")}}else if(C instanceof a)S=dr("<!---->"),W=S.ownerDocument.importNode(C,!0),W.nodeType===w1.element&&W.nodeName==="BODY"||W.nodeName==="HTML"?S=W:S.appendChild(W);else{if(!te&&!L&&!G&&C.indexOf("<")===-1)return v&&U?v.createHTML(C):C;if(S=dr(C),!S)return te?null:U?T:""}S&&Z&&gt(S.firstChild);const qe=hr(de?C:S);for(;se=qe.nextNode();)fr(se),Cr(se),se.content instanceof i&&dl(se.content);if(de)return C;if(te){if(oe)for(ee=R.call(S.ownerDocument);S.firstChild;)ee.appendChild(S.firstChild);else ee=S;return(Y.shadowroot||Y.shadowrootmode)&&(ee=V.call(o,ee,!0)),ee}let je=G?S.outerHTML:S.innerHTML;return G&&K["!doctype"]&&S.ownerDocument&&S.ownerDocument.doctype&&S.ownerDocument.doctype.name&&qr(zxe,S.ownerDocument.doctype.name)&&(je="<!DOCTYPE "+S.ownerDocument.doctype.name+`>
194
+ `}),pd=t=>({borderTop:RE(t.border.Top,t.themeColors),borderRight:RE(t.border.Right,t.themeColors),borderBottom:RE(t.border.Bottom,t.themeColors),borderLeft:RE(t.border.Left,t.themeColors)}),Mw=t=>t.borderCollapse!==void 0?{borderCollapse:Sgt(t.borderCollapse)}:{borderCollapse:"collapse"},Sgt=t=>{switch(t){case"Collapse":return"collapse";case"Separate":return"separate";default:return ta(t)}},wgt=t=>({Match:e=>{switch(t.Discriminator){case"None":return e.None();case"EmailBackgroundColor":return e.EmailBackgroundColor();case"BodyColor":return e.BodyColor();case"TitleColor":return e.TitleColor();case"HeadingColor":return e.HeadingColor();case"SubHeadingColor":return e.SubHeading();case"LargeTextColor":return e.LargeTextColor();case"NormalTextColor":return e.NormalTextColor();case"DescriptionTextColor":return e.DescriptionTextColor();case"PrimaryTextColor":return e.PrimaryTextColor();case"SecondaryTextColor":return e.SecondaryTextColor();case"ButtonTextColor":return e.ButtonTextColor();case"LinkColor":return e.LinkColor();case"PrimaryColor":return e.PrimaryColor();case"SecondaryColor":return e.SecondaryColor();case"CardBackgroundColor":return e.CardBackgroundColor();case"Custom":return e.Custom(t.CustomValue);default:return ta(t.Discriminator)}}}),Nl=t=>wgt(t.color).Match({None:()=>null,EmailBackgroundColor:()=>t.themeColors.EmailBackgroundColor,BodyColor:()=>t.themeColors.BodyColor,TitleColor:()=>t.themeColors.TitleColor,HeadingColor:()=>t.themeColors.HeadingColor,SubHeading:()=>t.themeColors.SubHeadingColor,LargeTextColor:()=>t.themeColors.LargeTextColor,NormalTextColor:()=>t.themeColors.NormalTextColor,DescriptionTextColor:()=>t.themeColors.DescriptionTextColor,PrimaryTextColor:()=>t.themeColors.PrimaryTextColor,SecondaryTextColor:()=>t.themeColors.SecondaryTextColor,LinkColor:()=>t.themeColors.LinkColor,PrimaryColor:()=>t.themeColors.PrimaryColor,SecondaryColor:()=>t.themeColors.SecondaryColor,CardBackgroundColor:()=>t.themeColors.CardBackgroundColor,ButtonTextColor:()=>t.themeColors.ButtonTextColor,Custom:e=>e}),hxe=t=>({Match:e=>{switch(t){case"Left":return e.Left();case"Center":return e.Center();case"Right":return e.Right();default:return ta(t)}}}),kgt=t=>t.containerAlign?hxe(t.containerAlign).Match({Left:()=>({textAlign:"left"}),Center:()=>({textAlign:"center"}),Right:()=>({textAlign:"right"})}):{},$c=t=>t.containerAlign?hxe(t.containerAlign).Match({Left:()=>"left",Center:()=>"center",Right:()=>"right"}):"center",Egt=Xe({__name:"If",props:{deps:{},theme:{},element:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]}},emits:["onImageOriginalSizeAdjusted","onImageSizeAdjusted","onElementClicked","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){const n=t,o=e,r=Vt({ifResult:!1,isLoading:!0});return n.deps.boolExpressionEvaluator({boolExpression:n.element.Predicate,context:n.context}).then(i=>{r.ifResult=i,r.isLoading=!1}),(i,s)=>(O(!0),J(rt,null,$n(r.ifResult?n.element.True:n.element.False,(a,l)=>(O(),Ze(xl,{key:l,deps:n.deps,theme:n.theme,element:a,context:n.context,path:[...n.path,r.ifResult?"True":"False",l],selectedElementPath:n.selectedElementPath,onOnImageSizeAdjusted:s[0]||(s[0]=u=>o("onImageSizeAdjusted",u)),onOnImageOriginalSizeAdjusted:s[1]||(s[1]=u=>o("onImageOriginalSizeAdjusted",u)),onOnElementClicked:s[2]||(s[2]=u=>o("onElementClicked",u)),onOnElementUpdatedEvent:s[3]||(s[3]=u=>o("onElementUpdatedEvent",u)),onOnElementRemoved:s[4]||(s[4]=u=>o("onElementRemoved",u))},null,8,["deps","theme","element","context","path","selectedElementPath"]))),128))}}),Ow=t=>({paddingTop:Eo({paddingExpression:t.paddings.Top,themeComponentPaddings:t.themeComponentPaddings,themeBodyPaddings:t.themeBodyPaddings})+"px",paddingRight:Eo({paddingExpression:t.paddings.Right,themeComponentPaddings:t.themeComponentPaddings,themeBodyPaddings:t.themeBodyPaddings})+"px",paddingBottom:Eo({paddingExpression:t.paddings.Bottom,themeComponentPaddings:t.themeComponentPaddings,themeBodyPaddings:t.themeBodyPaddings})+"px",paddingLeft:Eo({paddingExpression:t.paddings.Left,themeComponentPaddings:t.themeComponentPaddings,themeBodyPaddings:t.themeBodyPaddings})+"px"}),_gt=ec,Rgt=t=>_gt(t.width).Match({Auto:()=>"initial",Pixel:e=>e.Value+"px",Percentage:e=>e.Value+"%"}),Dgt=["align"],Agt=Xe({__name:"HeightContainer",props:{deps:{},theme:{},element:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]}},emits:["onImageOriginalSizeAdjusted","onImageSizeAdjusted","onElementClicked","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){const n=t,o=e;return(r,i)=>(O(),J("table",{class:"heightContainerRender",style:he([{"border-spacing":"0","border-collapse":"separate"},{width:z(Rgt)({width:n.element.Width})}])},[_("tbody",null,[_("tr",null,[_("td",{align:z($c)({containerAlign:n.element.ContainerAlign}),style:he([z(Ow)({paddings:n.element.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),{height:n.element.Height?n.element.Height+"px":"",verticalAlign:n.element.VerticalAlign,backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundColor:z(Nl)({color:n.element.BackgroundColor,themeColors:n.theme.Colors})??"inherit"},z(pd)({border:n.element.Border,themeColors:n.theme.Colors}),z(Iu)({borderRadius:n.element.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner})])},[(O(!0),J(rt,null,$n(n.element.Elements,(s,a)=>(O(),Ze(xl,{key:a,deps:n.deps,theme:n.theme,element:s,path:[...n.path,"Elements",a],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageSizeAdjusted:i[0]||(i[0]=l=>o("onImageSizeAdjusted",l)),onOnImageOriginalSizeAdjusted:i[1]||(i[1]=l=>o("onImageOriginalSizeAdjusted",l)),onOnElementClicked:i[2]||(i[2]=l=>o("onElementClicked",l)),onOnElementUpdatedEvent:i[3]||(i[3]=l=>o("onElementUpdatedEvent",l)),onOnElementRemoved:i[4]||(i[4]=l=>o("onElementRemoved",l))},null,8,["deps","theme","element","path","selectedElementPath","context"]))),128))],12,Dgt)])])],4))}}),Ngt=t=>({Match:e=>{switch(t){case"Left":return e.Left();case"Center":return e.Center();case"Right":return e.Right();case"Inline":return e.Inline()}}}),bb=t=>Ngt(t.contentAlign).Match({Left:()=>({display:"block",textAlign:"left"}),Center:()=>({display:"block",textAlign:"center"}),Right:()=>({display:"block",textAlign:"right"}),Inline:()=>({})});let tP;const fS={mounted(t,e){const n=e.value;tP=new ResizeObserver(o=>{o.forEach(r=>n(r.contentRect))}),tP.observe(t)},unmounted(t){tP.unobserve(t)}},Bgt=["href"],Lgt=["src","alt"],$gt=["src","alt"],Vgt=Xe({__name:"Image",props:{deps:{},theme:{},element:{},path:{},context:{type:[String,Number,Boolean,Array,Object]}},emits:["onImageOriginalSizeAdjusted","onImageSizeAdjusted","onElementClicked"],setup(t,{emit:e}){const n=c=>{u("onImageOriginalSizeAdjusted",{Path:o.path,OriginalHeight:c.target.naturalHeight,OriginalWidth:c.target.naturalWidth})},o=t,r=Vt({href:"",src:"",alt:"",isLoaded:!1}),i=q(()=>o.element.IsResponsive?"100%":(o.element.IsRetina?o.element.OriginalWidth/2:o.element.OriginalWidth)+"px"),s=q(()=>o.element.IsResponsive?(o.element.IsRetina?o.element.OriginalWidth/2:o.element.OriginalWidth)+"px":"100%"),a=async c=>o.deps.stringExpressionEvaluator({stringExpression:c,context:o.context}),l=async()=>{const[c,d,h]=await Promise.all([a(o.element.Src),a(o.element.HRef),a(o.element.Alt)]);r.href=d,r.src=c,r.alt=h,r.isLoaded=!0};an(()=>[o.element.Src,o.element.HRef,o.element.Alt,o.context],()=>l()),l();const u=e;return(c,d)=>o.element.IsLink?(O(),J("a",{key:0,href:r.href,style:he([z(bb)({contentAlign:o.element.ContentAlign})]),onClick:d[0]||(d[0]=zo(()=>u("onElementClicked"),["prevent"]))},[r.isLoaded?Ot((O(),J("img",{key:0,class:$e(["Image cursor-pointer",{"img-responsive":o.element.IsResponsive}]),src:r.src,alt:r.alt,style:he([z(Iu)({borderRadius:o.element.BorderRadius,borderRadiusCard:o.theme.BorderRadiusCard,bodyBorderRadius:o.theme.BorderRadius,borderButtonRadius:o.theme.BorderRadiusButton,borderBannerRadius:o.theme.BorderRadiusBanner}),z(pd)({border:o.element.Border,themeColors:o.theme.Colors}),{width:i.value,maxWidth:s.value},{verticalAlign:o.element.VerticalAlign}]),onLoad:n},null,46,Lgt)),[[z(fS),({width:h,height:m})=>u("onImageSizeAdjusted",{Path:o.path,AdjustedHeight:m,AdjustedWidth:h})]]):Ue("",!0)],12,Bgt)):(O(),J("span",{key:1,style:he([z(bb)({contentAlign:o.element.ContentAlign})])},[r.isLoaded?Ot((O(),J("img",{key:0,class:$e(["Image cursor-pointer",{"img-responsive":o.element.IsResponsive}]),src:r.src,alt:r.alt,style:he([z(Iu)({borderRadius:o.element.BorderRadius,borderRadiusCard:o.theme.BorderRadiusCard,bodyBorderRadius:o.theme.BorderRadius,borderButtonRadius:o.theme.BorderRadiusButton,borderBannerRadius:o.theme.BorderRadiusBanner}),z(pd)({border:o.element.Border,themeColors:o.theme.Colors}),{width:i.value,maxWidth:s.value},{verticalAlign:o.element.VerticalAlign}]),onLoad:n},null,46,$gt)),[[z(fS),({width:h,height:m})=>u("onImageSizeAdjusted",{Path:o.path,AdjustedHeight:m,AdjustedWidth:h})]]):Ue("",!0)],4))}}),ot=(t,e)=>{const n=t.__vccOpts||t;for(const[o,r]of e)n[o]=r;return n},Mgt=ot(Vgt,[["__scopeId","data-v-83688a51"]]),Ogt=ec,Igt=t=>t.width===void 0?{}:Ogt(t.width).Match({Auto:()=>({width:"auto"}),Pixel:e=>({width:e.Value+"px"}),Percentage:e=>({width:e.Value+"%"})}),Pgt=t=>{switch(t){case"Auto":return{width:"auto"};case"FullWidth":return{width:"100%"};default:return ta(t)}},Wgt=Xe({__name:"OneLineList",props:{deps:{},theme:{},element:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]}},emits:["onImageSizeAdjusted","onImageOriginalSizeAdjusted","onElementClicked","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){const n=t,o=e;return(r,i)=>(O(),J("table",{class:"oneLineList",style:he([{"border-spacing":"0","border-collapse":"collapse"},[z(Pgt)(n.element.ContainerWidth)]])},[_("tbody",null,[_("tr",null,[(O(!0),J(rt,null,$n(n.element.Elements,(s,a)=>(O(),J("td",{key:a,class:"oneLineListItem",style:he([z(Ow)({paddings:n.element.ItemPaddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),z(Igt)({width:n.element.ItemWidth}),{lineHeight:"normal"}])},[(O(),Ze(xl,{key:a,deps:n.deps,theme:n.theme,element:s,path:[...n.path,"Elements",a],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageSizeAdjusted:i[0]||(i[0]=l=>o("onImageSizeAdjusted",l)),onOnImageOriginalSizeAdjusted:i[1]||(i[1]=l=>o("onImageOriginalSizeAdjusted",l)),onOnElementClicked:i[2]||(i[2]=l=>o("onElementClicked",l)),onOnElementUpdatedEvent:i[3]||(i[3]=l=>o("onElementUpdatedEvent",l)),onOnElementRemoved:i[4]||(i[4]=l=>o("onElementRemoved",l))},null,8,["deps","theme","element","path","selectedElementPath","context"]))],4))),128))])])],4))}}),Hgt={style:{"border-spacing":"0","border-collapse":"collapse",width:"100%"}},zgt=Xe({__name:"Spacer",props:{theme:{},element:{}},emits:["onElementClicked"],setup(t,{emit:e}){const n=t,o=e;return(r,i)=>(O(),J("table",{class:"Spacer",width:"100%",style:{"border-spacing":"0","border-collapse":"collapse",width:"100%"},onClick:i[0]||(i[0]=()=>o("onElementClicked"))},[_("tbody",null,[_("tr",null,[_("td",{valign:"middle",style:he([{height:z(Eo)({paddingExpression:n.element.Height,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})+"px"}])},[_("table",Hgt,[_("tbody",null,[_("tr",null,[_("td",{style:he([[{borderTop:n.element.Weight+"px",borderStyle:n.element.Weight>0?"solid":"none",borderColor:z(Nl)({color:n.element.Color,themeColors:n.theme.Colors})}],{"font-size":"0","line-height":"0","border-bottom":"0","border-left":"0","border-right":"0"}])},"   ",4)])])])],4)])])]))}}),O5={beforeMount(t,e){t.innerHTML=tee.sanitize(e.value)},beforeUpdate(t,e){t.innerHTML=tee.sanitize(e.value)}},jgt=t=>({Match:e=>{switch(t.Discriminator){case"EmailBackgroundColor":return e.EmailBackgroundColor();case"BodyColor":return e.BodyColor();case"TitleColor":return e.TitleColor();case"HeadingColor":return e.HeadingColor();case"SubHeadingColor":return e.SubHeading();case"LargeTextColor":return e.LargeTextColor();case"NormalTextColor":return e.NormalTextColor();case"DescriptionTextColor":return e.DescriptionTextColor();case"PrimaryTextColor":return e.PrimaryTextColor();case"SecondaryTextColor":return e.SecondaryTextColor();case"ButtonTextColor":return e.ButtonTextColor();case"LinkColor":return e.LinkColor();case"PrimaryColor":return e.PrimaryColor();case"SecondaryColor":return e.SecondaryColor();case"CardBackgroundColor":return e.CardBackgroundColor();case"Custom":return e.Custom(t.CustomValue)}}}),gM=t=>jgt(t.fontColor).Match({EmailBackgroundColor:()=>t.themeColors.EmailBackgroundColor,BodyColor:()=>t.themeColors.BodyColor,TitleColor:()=>t.themeColors.TitleColor,HeadingColor:()=>t.themeColors.HeadingColor,SubHeading:()=>t.themeColors.SubHeadingColor,LargeTextColor:()=>t.themeColors.LargeTextColor,NormalTextColor:()=>t.themeColors.NormalTextColor,DescriptionTextColor:()=>t.themeColors.DescriptionTextColor,PrimaryTextColor:()=>t.themeColors.PrimaryTextColor,SecondaryTextColor:()=>t.themeColors.SecondaryTextColor,LinkColor:()=>t.themeColors.LinkColor,PrimaryColor:()=>t.themeColors.PrimaryColor,SecondaryColor:()=>t.themeColors.SecondaryColor,CardBackgroundColor:()=>t.themeColors.CardBackgroundColor,ButtonTextColor:()=>t.themeColors.ButtonTextColor,Custom:e=>e}),Ugt=t=>({Match:e=>{switch(t){case"None":return e.None();case"Underline":return e.Underline();case"LineThrough":return e.LineThrough()}}}),sU=t=>Ugt(t.textDecoration).Match({None:()=>"none",Underline:()=>"underline",LineThrough:()=>"line-through"}),mxe=t=>({fontSize:t.customFontSettings.FontSize,lineHeight:t.customFontSettings.LineHeight,fontWeight:t.customFontSettings.IsBold?"bold":"normal",fontStyle:t.customFontSettings.IsItalic?"italic":"normal",textDecoration:sU({textDecoration:t.customFontSettings.Decoration}),fontFamily:t.customFontSettings.FontFamily,color:gM({fontColor:t.customFontSettings.FontColor,themeColors:t.themeColors})}),fxe=t=>({Match:e=>{switch(t.Discriminator){case"Heading":return e.Heading();case"Title":return e.Title();case"SubHeading":return e.SubHeading();case"LargeText":return e.LargeText();case"NormalText":return e.NormalText();case"DescriptionText":return e.DescriptionText();case"Link":return e.Link();case"Button":return e.Button();case"Custom":return e.Custom(t.CustomFontSettings);default:return ta(t.Discriminator)}}}),Kgt=t=>({Match:e=>{switch(t.Discriminator){case"StyleLinkedColor":return e.FontStyle();case"EmailBackgroundColor":return e.EmailBackgroundColor();case"BodyColor":return e.BodyColor();case"TitleColor":return e.TitleColor();case"HeadingColor":return e.HeadingColor();case"SubHeadingColor":return e.SubHeading();case"LargeTextColor":return e.LargeTextColor();case"NormalTextColor":return e.NormalTextColor();case"DescriptionTextColor":return e.DescriptionTextColor();case"PrimaryTextColor":return e.PrimaryTextColor();case"SecondaryTextColor":return e.SecondaryTextColor();case"ButtonTextColor":return e.ButtonTextColor();case"LinkColor":return e.LinkColor();case"PrimaryColor":return e.PrimaryColor();case"SecondaryColor":return e.SecondaryColor();case"CardBackgroundColor":return e.CardBackgroundColor();case"Custom":return e.Custom(t.CustomValue)}}}),qgt=t=>Kgt(t.fontStyleColor).Match({FontStyle:()=>fxe(t.fontStyle).Match({Heading:()=>t.themeColors.HeadingColor,Title:()=>t.themeColors.TitleColor,SubHeading:()=>t.themeColors.SubHeadingColor,LargeText:()=>t.themeColors.LargeTextColor,NormalText:()=>t.themeColors.NormalTextColor,DescriptionText:()=>t.themeColors.DescriptionTextColor,Button:()=>t.themeColors.ButtonTextColor,Link:()=>t.themeColors.LinkColor,Custom:e=>Nl({color:e.FontColor,themeColors:t.themeColors})}),EmailBackgroundColor:()=>t.themeColors.EmailBackgroundColor,BodyColor:()=>t.themeColors.BodyColor,TitleColor:()=>t.themeColors.TitleColor,HeadingColor:()=>t.themeColors.HeadingColor,SubHeading:()=>t.themeColors.SubHeadingColor,LargeTextColor:()=>t.themeColors.LargeTextColor,NormalTextColor:()=>t.themeColors.NormalTextColor,DescriptionTextColor:()=>t.themeColors.DescriptionTextColor,PrimaryTextColor:()=>t.themeColors.PrimaryTextColor,SecondaryTextColor:()=>t.themeColors.SecondaryTextColor,LinkColor:()=>t.themeColors.LinkColor,PrimaryColor:()=>t.themeColors.PrimaryColor,SecondaryColor:()=>t.themeColors.SecondaryColor,CardBackgroundColor:()=>t.themeColors.CardBackgroundColor,ButtonTextColor:()=>t.themeColors.ButtonTextColor,Custom:e=>e}),pxe=["Arial","Georgia","Tahoma","TimesNewRoman","Verdana"],I5={Arial:"Arial",Georgia:"Georgia",Tahoma:"Tahoma",TimesNewRoman:"Times New Roman",Verdana:"Verdana"},aU=t=>({fontSize:t.fontSize+"px",lineHeight:t.lineHeight+"px",fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:I5[t.fontFamily],textDecoration:t.textDecoration,color:t.color}),lU=t=>{const e=n=>({fontSize:n.FontSize,lineHeight:n.LineHeight,fontWeight:n.IsBold?"bold":"normal",fontStyle:n.IsItalic?"italic":"normal",fontFamily:t.fontFamily,textDecoration:sU({textDecoration:n.Decoration}),color:qgt({fontStyleColor:t.fontStyle.FontColor,fontStyle:t.fontStyle,themeColors:t.themeColors})});return fxe(t.fontStyle).Match({Heading:()=>e(t.themeDefinedFontSettings.Heading),Title:()=>e(t.themeDefinedFontSettings.Title),SubHeading:()=>e(t.themeDefinedFontSettings.SubHeading),LargeText:()=>e(t.themeDefinedFontSettings.LargeText),NormalText:()=>e(t.themeDefinedFontSettings.NormalText),DescriptionText:()=>e(t.themeDefinedFontSettings.DescriptionText),Link:()=>e(t.themeDefinedFontSettings.Link),Button:()=>e(t.themeDefinedFontSettings.Button),Custom:n=>mxe({customFontSettings:n,themeColors:t.themeColors})})},Jgt=t=>({Match:e=>{switch(t.Discriminator){case"Theme":return e.Theme();case"Custom":return e.Custom(t.CustomValue);default:return ta(t.Discriminator)}}}),Ggt=t=>Jgt(t.buttonPaddings).Match({Theme:()=>({TopBottom:t.themeButtonPaddings.TopBottom,LeftRight:t.themeButtonPaddings.LeftRight}),Custom:e=>({TopBottom:e.TopBottom,LeftRight:e.LeftRight})}),Ygt=["align"],Xgt={class:"Button"},Qgt=["href"],Zgt=Xe({__name:"ButtonVue",props:{deps:{},theme:{},element:{},context:{type:[String,Number,Boolean,Array,Object]}},emits:["onElementClicked"],setup(t,{emit:e}){const n=t,o=q(()=>aU(lU({fontFamily:n.theme.FontFamily,fontStyle:n.element.TextStyle,themeDefinedFontSettings:n.theme.FontSettingsPresets,themeColors:n.theme.Colors}))),r=q(()=>$R({borderColor:n.element.Border.Left.Color,themeColors:n.theme.Colors})),i=q(()=>Ggt({buttonPaddings:n.element.Paddings,themeButtonPaddings:n.theme.ButtonPaddings})),s=q(()=>Nl({color:n.element.BackgroundColor,themeColors:n.theme.Colors})),a=q(()=>{switch(n.element.ContentAlign){case"Center":return"center";case"Left":return"left";case"Right":return"right";default:return"center"}}),l=Vt({href:"",text:"",isLoading:!0}),u=n.deps.stringExpressionEvaluator,c=()=>{Promise.all([u({stringExpression:n.element.HRef,context:n.context}),u({stringExpression:n.element.Text,context:n.context})]).then(([h,m])=>{l.href=h,l.text=m,l.isLoading=!1})};c(),an(()=>[n.element.HRef,n.element.Text,n.context],()=>c());const d=e;return(h,m)=>(O(),J("table",{style:{"border-spacing":"0","border-collapse":"collapse",width:"100%"},onClick:m[1]||(m[1]=zo(f=>d("onElementClicked"),["prevent"]))},[_("tbody",null,[_("tr",null,[_("td",{align:a.value},[_("div",Xgt,[_("a",{style:he([{display:"block","text-decoration":"none"},[o.value]]),href:l.href,onClick:m[0]||(m[0]=zo(()=>{},["prevent"]))},[_("table",{style:he([[{backgroundColor:s.value},z(Iu)({borderRadius:n.element.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner}),{width:n.element.FullWidth?"100%":"auto"},z(pd)({border:n.element.Border,themeColors:t.theme.Colors}),{borderColor:r.value}],{"text-align":"center","border-spacing":"0","border-collapse":"separate"}])},[_("tbody",null,[_("tr",null,[_("td",{align:"center",style:he([{"line-height":"normal"},[{paddingTop:i.value.TopBottom+"px",paddingBottom:i.value.TopBottom+"px",paddingLeft:i.value.LeftRight+"px",paddingRight:i.value.LeftRight+"px"}]])},[Ot(_("p",{class:"user-select-none",style:he([o.value])},null,4),[[z(O5),l.text]])],4)])])],4)],12,Qgt)])],8,Ygt)])])]))}}),eCt=ot(Zgt,[["__scopeId","data-v-f2906df7"]]),tCt=["href"],nCt=Xe({__name:"SpanText",props:{deps:{},theme:{},element:{},context:{type:[String,Number,Boolean,Array,Object]}},emits:["onElementClicked"],setup(t,{emit:e}){const n=t,o=n.deps.stringExpressionEvaluator,r=q(()=>{const u=lU({fontFamily:n.theme.FontFamily,fontStyle:n.element.Style,themeDefinedFontSettings:n.theme.FontSettingsPresets,themeColors:n.theme.Colors});if(n.element.Style.Discriminator==="Custom"){const c=mxe({customFontSettings:n.element.Style.CustomFontSettings,themeColors:n.theme.Colors});return{...c,fontSize:c.fontSize+"px",lineHeight:c.lineHeight+"px",minHeight:n.element.MinNumberOfLines*u.lineHeight+"px"}}return{minHeight:n.element.MinNumberOfLines*u.lineHeight+"px",color:u.color}}),i=Vt({href:"",text:"",isLoading:!0}),s=u=>u.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"),a=()=>{Promise.all([o({stringExpression:n.element.HRef,context:n.context}),o({stringExpression:n.element.Text,context:n.context})]).then(([u,c])=>{i.href=u,i.text=s(c),i.isLoading=!1})};a(),an(()=>[n.context,n.element.HRef,n.element.Text],()=>a());const l=e;return(u,c)=>n.element.IsLink?Ot((O(),J("a",{key:0,href:i.href,class:$e(["SpanText cursor-pointer user-select-none",n.element.Style.Discriminator]),style:he([{margin:"0"},[r.value,z(bb)({contentAlign:n.element.ContentAlign})]]),onClick:c[0]||(c[0]=zo(()=>l("onElementClicked"),["prevent"]))},null,14,tCt)),[[z(O5),i.text]]):Ot((O(),J("span",{key:1,class:$e(["SpanText cursor-pointer user-select-none",n.element.Style.Discriminator]),style:he([{margin:"0"},[r.value,z(bb)({contentAlign:n.element.ContentAlign})]]),onClick:c[1]||(c[1]=zo(()=>l("onElementClicked"),["prevent"]))},null,6)),[[z(O5),i.text]])}}),oCt=ot(nCt,[["__scopeId","data-v-f6595f5e"]]),us=t=>({fontSize:t.themeFontSettings.FontSize,lineHeight:t.themeFontSettings.LineHeight,fontWeight:t.themeFontSettings.IsBold?"bold":"normal",fontStyle:t.themeFontSettings.IsItalic?"italic":"normal",fontFamily:t.fontFamily,textDecoration:sU({textDecoration:t.themeFontSettings.Decoration}),color:t.themeColor}),rCt={class:"bootstrap-styles modal fade show d-block position-absolute"},iCt={class:"bootstrap-styles modal-dialog modal-dialog-centered"},sCt={class:"bootstrap-styles modal-content border rounded-3 shadow","data-test":"modal-window__content"},aCt={class:"bootstrap-styles modal-header p-0"},lCt={class:"bootstrap-styles container-fluid border-bottom g-0"},uCt={class:"bootstrap-styles d-flex justify-content-between align-items-center px-11 py-7"},cCt={class:"bootstrap-styles modal-title border-0","data-test":"modal-window__header-text"},dCt={class:"bootstrap-styles modal-body p-0","data-test":"modal-window__body"},hCt={class:"bootstrap-styles modal-footer p-0 g-0"},mCt={class:"bootstrap-styles container-fluid border-top"},fCt={class:"bootstrap-styles d-flex justify-content-end py-8 px-11"},pCt={class:"bootstrap-styles col-6 d-flex justify-content-end","data-test":"modal-window__footer-actions"},gCt=Xe({__name:"ModalWindow",props:{headerText:{}},emits:["close"],setup(t,{emit:e}){const n=t,o=e;return(r,i)=>(O(),J("div",rCt,[_("div",{class:"bootstrap-styles modal-blur d-block position-fixed top-0 left-0 w-100 vh-100","data-test":"modal-window__outside",onClick:i[0]||(i[0]=s=>o("close"))}),_("div",iCt,[_("div",sCt,[_("div",aCt,[_("div",lCt,[_("div",uCt,[_("h5",cCt,Gt(n.headerText),1),_("button",{type:"button","aria-label":"Close","data-bs-dismiss":"modal","data-test":"modal-window__close-button",onClick:i[1]||(i[1]=s=>o("close"))},[...i[2]||(i[2]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[_("path",{d:"M3 3L13 13",stroke:"var(--gray-500)"}),_("path",{d:"M13 3L3 13",stroke:"var(--gray-500)"})],-1)])])])])]),_("div",dCt,[j0(r.$slots,"body",{},void 0,!0)]),_("div",hCt,[_("div",mCt,[_("div",fCt,[_("div",pCt,[j0(r.$slots,"footer-actions",{},void 0,!0)])])])])])])]))}}),gxe=ot(gCt,[["__scopeId","data-v-7a4aac23"]]),Xn=t=>e=>t[e.localeKey],CCt={cancelButton:"Cancel",applyButton:"Delete"},yCt={cancelButton:"Отмена",applyButton:"Удалить"},poe=Xn({en:CCt,ru:yCt}),bCt={class:"bootstrap-styles px-11 py-7 text-start"},vCt=Xe({__name:"RemoveConfirmModalWindow",props:{headerText:{},deps:{}},emits:["cancel","confirmed"],setup(t,{emit:e}){const n=t,o=()=>{i("cancel")},r={cancelButton:poe({localeKey:n.deps.localeKey}).cancelButton,applyButton:poe({localeKey:n.deps.localeKey}).applyButton},i=e;return(s,a)=>(O(),Ze(gxe,{headerText:n.headerText,class:"remove-element-confirm-modal-window",onClose:a[2]||(a[2]=()=>o())},{body:Tu(()=>[_("div",bCt,[j0(s.$slots,"body-content")])]),"footer-actions":Tu(()=>[_("button",{class:"modal-footer__button bootstrap-styles d-flex justify-content-center align-center py-1 px-3 me-3 rounded-2 bg-blue-selected button__hover-blue-100 text-color-selected",onClick:a[0]||(a[0]=zo(l=>o(),["stop"]))},Gt(r.cancelButton),1),_("button",{class:"modal-footer__button bootstrap-styles d-flex justify-content-center align-center py-1 px-3 rounded-2 text-white cursor-pointer remove-element-confirm__button",onClick:a[1]||(a[1]=zo(l=>i("confirmed"),["stop"]))},Gt(r.applyButton),1)]),_:3},8,["headerText"]))}}),TCt={removeWindowTitle:"Delete element",removeWindowDescription:"Are you sure you want to delete the text element?"},xCt={removeWindowTitle:"Удаление элемента",removeWindowDescription:"Вы действительно хотите удалить элемент ?"},goe=Xn({en:TCt,ru:xCt}),Coe=t=>({type:"doc",content:t.Content.map(FCt)}),FCt=t=>"ParagraphNode"in t?bxe(t):"BulletListNode"in t?SCt(t):"OrderedListNode"in t?wCt(t):"DataFieldNode"in t?yxe(t):ta(t),Cxe=t=>({type:"listItem",content:t.Content.map(e=>"ParagraphNode"in e?bxe(e):"ImageNode"in e?vxe(e):ta(e))}),yxe=t=>({type:"dataField",marks:uU({textStyle:t.DataFieldNode.TextStyle,commonLinkMark:t.DataFieldNode.CommonLinkMark}),attrs:{stringExpression:t.DataFieldNode.StringExpression}}),SCt=t=>({type:"bulletList",content:t.BulletListNode.Content.map(Cxe),attrs:{themeName:t.BulletListNode.ListStyle}}),wCt=t=>({type:"orderedList",content:t.OrderedListNode.Content.map(Cxe),attrs:{themeName:t.OrderedListNode.ListStyle}}),bxe=t=>({type:"paragraph",attrs:{themeName:t.ParagraphNode.ThemeName},content:t.ParagraphNode.Content.map(kCt)}),kCt=t=>"TextNode"in t?ECt(t):"HardBreakNode"in t?LCt():"ImageNode"in t?vxe(t):"DataFieldNode"in t?yxe(t):ta(t),uU=t=>{const e=[];return t.textStyle&&e.push(NCt(t.textStyle)),t.commonLinkMark&&e.push(BCt(t.commonLinkMark)),e.filter(n=>n!==void 0)},ECt=t=>({type:"text",text:t.TextNode.Text,marks:uU({textStyle:t.TextNode.TextStyle,commonLinkMark:t.TextNode.CommonLinkMark})}),_Ct=t=>{switch(t){case"Normal":return"normal";case"Bold":return"bold";default:return"normal"}},RCt=t=>{switch(t){case"Normal":return"normal";case"Italic":return"italic";default:return"normal"}},DCt=t=>{switch(t){case"None":return"none";case"Uppercase":return"uppercase";default:return"none"}},ACt=t=>{switch(t){case"None":return"none";case"Underline":return"underline";case"LineThrough":return"line-through";default:return"none"}},NCt=t=>({type:"textStyle",attrs:{themeName:t.ThemeName,color:t.Style.Color,fontWeight:t.Style.FontWeight?_Ct(t.Style.FontWeight):void 0,fontStyle:t.Style.FontStyle?RCt(t.Style.FontStyle):void 0,fontSize:t.Style.FontSize?t.Style.FontSize+"px":void 0,lineHeight:t.Style.LineHeight?t.Style.LineHeight+"px":void 0,fontFamily:t.Style.FontFamily,textTransform:t.Style.TextTransform?DCt(t.Style.TextTransform):void 0,textDecoration:t.Style.TextDecoration?ACt(t.Style.TextDecoration):void 0}}),BCt=t=>ec(t).Match({LinkMark:e=>$Ct({LinkMark:e}),UnsubscribeLinkMark:()=>VCt()}),LCt=()=>({type:"hardBreak"}),vxe=t=>({type:"image",attrs:{src:t.ImageNode.Src,alt:t.ImageNode.Alt,isRetina:t.ImageNode.IsRetina,width:t.ImageNode.Width,height:t.ImageNode.Height},marks:uU({commonLinkMark:t.ImageNode.CommonLinkMark})}),$Ct=t=>({type:"link",attrs:{href:t.LinkMark.Href}}),VCt=()=>({type:"unsubscribeLink"}),Txe=Zu.create({name:"textTransform",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textTransform:{default:"none",parseHTML:t=>t.style.textTransform,renderHTML:t=>t.textTransform?{style:`text-transform: ${t.textTransform}`}:{}}}}]},addCommands(){return{setTextTransform:t=>({chain:e})=>e().setMark("textStyle",{textTransform:t}).run(),unsetTextTransform:()=>({chain:t,state:e})=>{const{from:n,to:o,$from:r}=e.selection;return e.doc.textBetween(n,o," ").length?t().setMark("textStyle",{textTransform:"none"}).run():t().setTextSelection({from:r.pos-r.nodeBefore.nodeSize,to:r.pos+r.nodeAfter.nodeSize}).setMark("textStyle",{textTransform:"none"}).focus().run()}}},addKeyboardShortcuts(){const t=e=>e.isUppercase?this.editor.commands.unsetTextTransform():this.editor.commands.setTextTransform("uppercase");return{"Mod-Shift-u":()=>{const e=this.editor.isActive("textStyle",{textTransform:"uppercase"});return t({isUppercase:e})},"Mod-Shift-U":()=>{const e=this.editor.isActive("textStyle",{textTransform:"uppercase"});return t({isUppercase:e})}}}}),MCt=Zu.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize.replace(/['"]+/g,""),renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t+"px"}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),OCt=Zu.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>t.style.lineHeight.replace(/['"]+/g,""),renderHTML:t=>t.lineHeight?{style:`line-height: ${t.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:t=>({chain:e})=>e().setMark("textStyle",{lineHeight:t+"px"}).run(),resetLineHeight:()=>({chain:t})=>t().setMark("textStyle",{lineHeight:null}).run()}}}),ICt=t=>yn.create({name:"themeFontStyles",priority:1e3,addOptions(){return{types:["textStyle","bulletList","orderedList","paragraph"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{themeName:{default:t,parseHTML:e=>e.getAttribute("data-theme"),renderHTML:e=>e.themeName?{"data-theme":e.themeName,class:e.themeName}:{"data-theme":t,class:e.themeName}}}}]},addCommands(){return{setThemeSettings:e=>({chain:n,state:o})=>{const{$from:r}=o.selection,i=r.parent,s=r.index();return i.child(s).type.name==="image"?!1:n().setMark("textStyle",{themeName:e}).run()},applySiblingNodeThemeSettings:()=>({chain:e,state:n})=>{const{from:o,to:r,$from:i}=n.selection,s=i.parent,a=i.index(),l=i.node(i.depth)?.type.name==="dataField"||s.maybeChild(a)?.type.name==="dataField",u=s.child(a).type.name==="image",c=f=>{const p="NormalText",g=f.index>0?s.child(f.index-1):void 0,y=f.index+1<s.childCount?s.child(f.index+1):void 0,b=g??y;if(b){const F=b.marks.find(v=>v.type.name==="textStyle");if(F)return F.attrs.themeName}return p};if(l){const f=c({index:a});return e().unsetMark("textStyle",{extendEmptyMarkRange:!0}).setThemeSettings(f).run()}if(u)return!1;const d=c({index:a}),h=i.nodeBefore?i.pos-i.nodeBefore.nodeSize:o,m=i.nodeAfter?i.pos+i.nodeAfter.nodeSize:r;return e().setTextSelection({from:h,to:m}).setThemeSettings(d).run()}}},addProseMirrorPlugins(){return[new Yn({key:new $o("syncBlockTheme"),appendTransaction:(e,n,o)=>{const r=o.tr;let i=!1;return o.doc.descendants((s,a)=>{if(s.type.name==="bulletList"||s.type.name==="orderedList"){const l=s.firstChild?.firstChild?.firstChild;if(l){const u=l.marks.find(c=>c.type.name==="textStyle")?.attrs.themeName;u&&s.attrs.themeName!==u&&(r.setNodeMarkup(a,void 0,{...s.attrs,themeName:u}),i=!0)}}if(s.type.name==="paragraph"){const l=s.firstChild;if(l){const u=l.marks.find(c=>c.type.name==="textStyle")?.attrs.themeName;u&&s.attrs.themeName!==u&&(r.setNodeMarkup(a,void 0,{...s.attrs,themeName:u}),i=!0)}}}),i?r:null}})]}}),PCt=Zu.create({name:"fontWeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontWeight:{default:null,parseHTML:t=>t.style.fontWeight,renderHTML:t=>t.fontWeight?{style:`font-weight: ${t.fontWeight}`}:{}}}}]},addCommands(){return{setFontWeight:t=>({chain:e})=>e().setMark("textStyle",{fontWeight:t}).run(),unsetFontWeight:()=>({chain:t,state:e})=>{const{from:n,to:o,$from:r}=e.selection;return e.doc.textBetween(n,o," ").length?t().setMark("textStyle",{fontWeight:"normal"}).run():t().setTextSelection({from:r.pos-r.nodeBefore.nodeSize,to:r.pos+r.nodeAfter.nodeSize}).setMark("textStyle",{fontWeight:"normal"}).focus().run()},resetFontWeight:()=>({chain:t})=>t().setMark("textStyle",{fontWeight:null}).removeEmptyTextStyle().run()}},addKeyboardShortcuts(){const t=e=>e.isBold?this.editor.commands.unsetFontWeight():this.editor.commands.setFontWeight("bold");return{"Mod-b":()=>{const e=this.editor.isActive("textStyle",{fontWeight:"bold"});return t({isBold:e})},"Mod-B":()=>{const e=this.editor.isActive("textStyle",{fontWeight:"bold"});return t({isBold:e})}}}}),WCt=Zu.create({name:"fontStyle",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontStyle:{default:null,parseHTML:t=>t.style.fontStyle,renderHTML:t=>t.fontStyle?{style:`font-style: ${t.fontStyle}`}:{}}}}]},addCommands(){return{setFontStyle:t=>({chain:e})=>e().setMark("textStyle",{fontStyle:t}).run(),unsetFontStyle:()=>({chain:t,state:e})=>{const{from:n,to:o,$from:r}=e.selection;return e.doc.textBetween(n,o," ").length?t().setMark("textStyle",{fontStyle:"normal"}).run():t().setTextSelection({from:r.pos-r.nodeBefore.nodeSize,to:r.pos+r.nodeAfter.nodeSize}).setMark("textStyle",{fontStyle:"normal"}).focus().run()},resetFontStyle:()=>({chain:t})=>t().setMark("textStyle",{fontStyle:null}).removeEmptyTextStyle().run()}},addKeyboardShortcuts(){const t=e=>e.isItalic?this.editor.commands.unsetFontStyle():this.editor.commands.setFontStyle("italic");return{"Mod-i":()=>{const e=this.editor.isActive("textStyle",{fontStyle:"italic"});return t({isItalic:e})},"Mod-I":()=>{const e=this.editor.isActive("textStyle",{fontStyle:"italic"});return t({isItalic:e})}}}}),cU=Zu.create({name:"unsubscribeLink",priority:1e3,addOptions(){return{HTMLAttributes:{"data-type":"unsubscribe-link",class:"rich-text__unsubscribe-link"}}},parseHTML(){return[{tag:'span[data-type="unsubscribe-link"]'}]},renderHTML({HTMLAttributes:t}){return["span",Ri(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnsubscribeLink:()=>({chain:t})=>t().setMark("unsubscribeLink").focus().run(),unsetUnsubscribeLink:()=>({chain:t,state:e})=>{const{from:n,to:o}=e.selection,r=e.doc.textBetween(n,o," ");return e.doc.nodeAt(n)?.type.name==="image"?t().unsetMark("unsubscribeLink").focus().run():r.length?t().setTextSelection({from:n,to:n+r.length}).unsetMark("unsubscribeLink").focus().run():t().unsetMark("unsubscribeLink",{extendEmptyMarkRange:!0}).focus().run()}}}}),HCt=Zu.create({name:"textDecoration",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textDecoration:{parseHTML:t=>t.style.textDecoration,renderHTML:t=>t.textDecoration?{style:`text-decoration: ${t.textDecoration}`}:{}}}}]},addCommands(){return{setTextDecoration:t=>({chain:e})=>e().setMark("textStyle",{textDecoration:t}).run(),unsetTextDecoration:()=>({chain:t,state:e})=>{const{from:n,to:o,$from:r}=e.selection;return e.doc.textBetween(n,o," ").length?t().setMark("textStyle",{textDecoration:"none"}).run():t().setTextSelection({from:r.pos-r.nodeBefore.nodeSize,to:r.pos+r.nodeAfter.nodeSize}).setMark("textStyle",{textDecoration:"none"}).focus().run()}}},addKeyboardShortcuts(){const t=n=>n.isUnderline?this.editor.commands.unsetTextDecoration():this.editor.commands.setTextDecoration("underline"),e=n=>n.isLineThrough?this.editor.commands.unsetTextDecoration():this.editor.commands.setTextDecoration("line-through");return{"Mod-Shift-s":()=>{const n=this.editor.isActive("textStyle",{textDecoration:"line-through"});return e({isLineThrough:n})},"Mod-u":()=>{const n=this.editor.isActive("textStyle",{textDecoration:"underline"});return t({isUnderline:n})},"Mod-U":()=>{const n=this.editor.isActive("textStyle",{textDecoration:"underline"});return t({isUnderline:n})}}}}),zCt=t=>{if(!t.content)throw new Error("Invalid document: content is missing");return{Content:t.content.map(e=>{switch(e.type){case"paragraph":return xxe(e);case"bulletList":return KCt(e);case"orderedList":return qCt(e);default:throw new Error(`Unknown node type: ${e.type}`)}})}},xxe=t=>t.content?{ParagraphNode:{ThemeName:t.attrs?t.attrs.themeName:void 0,Content:t.content.map(e=>{switch(e.type){case"text":return jCt(e);case"image":return Sxe(e);case"hardBreak":return yoe();case"dataField":return UCt(e);default:throw new Error(`Unknown node type: ${e.type}`)}})}}:{ParagraphNode:{ThemeName:t.attrs?t.attrs.themeName:void 0,Content:[yoe()]}},dU=t=>{const e=t?t.find(o=>o.type==="textStyle"):void 0,n=t?t.find(o=>o.type==="link"||o.type==="unsubscribeLink"):void 0;return{TextStyle:e?ZCt(e):void 0,CommonLinkMark:n?eyt(n):void 0}},jCt=t=>{if(typeof t.text!="string")throw new Error("Invalid text node: text is missing or not a string");const{TextStyle:e,CommonLinkMark:n}=dU(t.marks);return{TextNode:{Text:t.text,TextStyle:e,CommonLinkMark:n}}},yoe=()=>({HardBreakNode:{}}),UCt=t=>{if(!t.attrs)throw new Error("Invalid variable node: attrs is missing");const{TextStyle:e,CommonLinkMark:n}=dU(t.marks);return{DataFieldNode:{StringExpression:t.attrs.stringExpression,TextStyle:e,CommonLinkMark:n}}},KCt=t=>{if(!t.content)throw new Error("Invalid bulletList: content is missing");return{BulletListNode:{ListStyle:t.attrs?t.attrs.themeName:void 0,Content:t.content.map(Fxe)}}},qCt=t=>{if(!t.content)throw new Error("Invalid orderedList: content is missing");return{OrderedListNode:{ListStyle:t.attrs?t.attrs.themeName:void 0,Content:t.content.map(Fxe)}}},Fxe=t=>{if(!t.content)throw new Error("Invalid listItem: content is missing");return{Content:t.content.map(e=>{switch(e.type){case"paragraph":return xxe(e);case"image":return Sxe(e);default:throw new Error(`Unknown node type: ${e.type}`)}})}},Sxe=t=>{if(!t.attrs)throw new Error("Invalid image node: attrs is missing");const{CommonLinkMark:e}=dU(t.marks);return{ImageNode:{Src:t.attrs.src,Alt:t.attrs.alt,Width:t.attrs.width,Height:t.attrs.height,IsRetina:t.attrs.isRetina,CommonLinkMark:e}}},JCt=t=>t==="bold"?"Bold":"Normal",GCt=t=>t==="italic"?"Italic":"Normal",YCt=t=>t,XCt=t=>{switch(t){case"uppercase":return"Uppercase";default:return"None"}},QCt=t=>{switch(t){case"underline":return"Underline";case"line-through":return"LineThrough";default:return"None"}},boe=t=>{const e=t.replace(/px$/,"");return parseInt(e,10)},ZCt=t=>{if(!t.attrs)throw new Error("Invalid textStyle mark: attrs is missing");return{ThemeName:t.attrs.themeName,Style:{Color:t.attrs.color?t.attrs.color:void 0,FontWeight:t.attrs.fontWeight?JCt(t.attrs.fontWeight):void 0,FontStyle:t.attrs.fontStyle?GCt(t.attrs.fontStyle):void 0,FontSize:t.attrs.fontSize?boe(t.attrs.fontSize):void 0,LineHeight:t.attrs.lineHeight?boe(t.attrs.lineHeight):void 0,FontFamily:t.attrs.fontFamily?YCt(t.attrs.fontFamily):void 0,TextTransform:t.attrs.textTransform?XCt(t.attrs.textTransform):void 0,TextDecoration:t.attrs.textDecoration?QCt(t.attrs.textDecoration):void 0}}},eyt=t=>{switch(t.type){case"link":{if(!t.attrs)throw new Error("Invalid link mark: attrs.href is missing");return{LinkMark:{Href:t.attrs.href}}}case"unsubscribeLink":return{UnsubscribeLinkMark:{}};default:return}},wxe=t=>{if(!t)return null;if(/^#([A-Fa-f0-9]{3}){1,2}$/.test(t))return t;if(t.startsWith("rgb")){const n=t.replace(/[^\d,.]/g,"").split(","),o=n[0]?parseInt(n[0]):0,r=n[1]?parseInt(n[1]):0,i=n[2]?parseInt(n[2]):0;return`#${(1<<24|o<<16|r<<8|i).toString(16).slice(1)}`}if(t.startsWith("hsl")){const n=document.createElement("div");n.style.color=t,document.body.appendChild(n);const o=getComputedStyle(n).color;return document.body.removeChild(n),wxe(o)}const e=document.createElement("canvas").getContext("2d");return e?(e.fillStyle=t,e.fillStyle):null},tyt=t=>yn.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:e=>{const n=e.getAttribute("data-theme-color")??"Custom",o=wxe(e.style.color)??"#000000";return{Discriminator:n,CustomValue:o}},renderHTML:e=>{if(!e.color)return{};const n=gM({fontColor:e.color,themeColors:t.themeColors});return e.color.Discriminator==="Custom"?{"data-theme-color":e.color.Discriminator,style:`color: ${n}`}:{"data-theme-color":e.color.Discriminator}}}}}]},addCommands(){return{setColor:e=>({chain:n})=>n().setMark("textStyle",{color:e}).run(),unsetColor:()=>({chain:e})=>e().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),nyt=yn.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>{const e=t.style.fontFamily.split(",").map(n=>n.trim()).map(n=>n.replace(/^['"]|['"]$/g,"")).map(n=>n.replace(/ /g,""));return pxe.find(n=>e.includes(n))||null},renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),oyt=t=>Ol.create({name:"dataField",group:"inline",marks:"_",inline:!0,atom:!0,selectable:!0,addAttributes:()=>({stringExpression:{default:null,parseHTML:e=>JSON.parse(e.getAttribute("data-field")),renderHTML:e=>({"data-field":JSON.stringify(e.stringExpression)})}}),parseHTML:()=>[{tag:"data-field[data-field]"}],renderHTML:({node:e,HTMLAttributes:n})=>{const o=e.attrs.stringExpression,r=Bct(o).Match({ContextValueExpression:()=>"contextValue",ContextValueExpressionWithFallback:()=>"contextValueWithFallback",ConstValueExpression:i=>i.Value,TruncateValueExpression:()=>"truncate",ConcatStringExpressions:()=>"concat",NumberToStringExpression:()=>"numberToString",DataSource:i=>t.dataSourceFieldNameDelegate({dataSource:i}),UnsubscribeUrlExpression:()=>"unsubscribeUrl",RecipientEmailAddressExpression:()=>"recipientEmailAddress"});return["data-field",Ri(n,{class:"rich-text__variable","data-field":JSON.stringify(e.attrs.stringExpression),contenteditable:"false"}),r]},addCommands(){return{setVariable:e=>({chain:n,state:o})=>{const r=o.selection.$from.marks(),i=r.map(s=>({type:s.type.name,attrs:s.attrs}));return n().insertContent({type:this.name,attrs:{stringExpression:e,selectedMarks:r},marks:i}).focus().run()}}}}),kxe=t=>new Promise((e,n)=>{const o=new Image;o.onload=()=>{e({width:o.naturalWidth,height:o.naturalHeight})},o.onerror=n,o.src=t}),Exe=Ol.create({name:"image",addOptions(){return{inline:!0,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},width:{default:null},height:{default:null},isRetina:{default:!1}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",Ri(this.options.HTMLAttributes,{src:t.src,alt:t.alt,title:t.title,width:t.isRetina?t.width/2:t.width,height:t.isRetina?t.height/2:t.height,isRetina:t.isRetina})]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[Tat({find:/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,type:this.type,getAttributes:t=>{const[,,e,n,o]=t;return{src:n,alt:e,title:o}}})]},addProseMirrorPlugins(){return[new Yn({view:t=>((async()=>{const{state:e,dispatch:n}=t;e.doc.descendants((o,r)=>{if(o.type.name===this.name){const{src:i,width:s,height:a}=o.attrs;i&&(!s||!a)&&kxe(i).then(l=>{const u=e.tr.setNodeMarkup(r,void 0,{...o.attrs,width:l.width,height:l.height});n(u)})}})})(),{})})]}}),ryt=t=>[ult,Glt,llt,oM.configure({mergeNestedSpanStyles:!0}),Llt,oyt({dataSourceFieldNameDelegate:t.dataSourceFieldNameDelegate}),alt.configure({className:"has-focus",mode:"all"}),D8.configure({keepMarks:!0,keepAttributes:!0}),N8.configure({keepMarks:!0,keepAttributes:!0}),T1e,Jlt.configure({HTMLAttributes:{class:"hard-break"}}),R8.configure({HTMLAttributes:{class:"rich-text__link"},openOnClick:!1}),Exe.configure({inline:!0,HTMLAttributes:{class:"rich-text__image"}}),tyt({themeColors:t.themeColors}),ICt(t.initialThemeName),PCt,WCt,MCt,OCt,Txe,HCt,cU,nyt],iyt=t=>zCt(t.editor.getJSON()),syt=Xe({__name:"SelectItemColor",props:{isActive:{type:Boolean},color:{},label:{}},emits:["click"],setup(t,{emit:e}){const n=t,o=e;return(r,i)=>(O(),J("li",{class:$e(["bootstrap-styles dropdown-item p-0 user-select-none",{active:n.isActive}])},[_("span",{class:"bootstrap-styles d-block py-1 px-3 text-decoration-none text-reset cursor-pointer d-flex align-items-center justify-content-start",onClick:i[0]||(i[0]=s=>o("click"))},[_("i",{class:"bootstrap-styles input__color_selection d-block overflow-hidden me-2",style:he([{border:"1px solid rgba(0, 0, 0, 0.10)"},[{background:n.color}]])},null,4),U0(" "+Gt(n.label),1)])],2))}}),ayt={colorLabels:{none:"None",styleLinkedColor:"Link to style",emailBackgroundColor:"Email background",bodyColor:"Email body",primaryColor:"Primary color",secondaryColor:"Secondary color",primaryTextColor:"Primary text",secondaryTextColor:"Secondary text",cardBackgroundColor:"Product card color",buttonTextColor:"Buttons",titleColor:"Title",headingColor:"Heading",subHeadingColor:"Subheading",largeTextColor:"Large text",normalTextColor:"Text",descriptionTextColor:"Description",linkColor:"Link",custom:"Custom"}},lyt={colorLabels:{none:"Нет",styleLinkedColor:"Связать со стилем",emailBackgroundColor:"Фон письма",bodyColor:"Тело письма",primaryColor:"Основной цвет",secondaryColor:"Вторичный цвет",primaryTextColor:"Текст на основном цвете",secondaryTextColor:"Текст на вторичном цвете",cardBackgroundColor:"Цвет карточек товара",buttonTextColor:"Кнопки",titleColor:"Большой заголовок",headingColor:"Заголовок",subHeadingColor:"Подзаголовок",largeTextColor:"Большой текст",normalTextColor:"Текст",descriptionTextColor:"Описание",linkColor:"Ссылка",custom:"Пользовательский"}},uyt=Xn({en:ayt,ru:lyt}),_xe=t=>({Match:e=>{switch(t){case"Heading":return e.whenHeading();case"Title":return e.whenTitle();case"SubHeading":return e.whenSubHeading();case"LargeText":return e.whenLargeText();case"NormalText":return e.whenNormalText();case"DescriptionText":return e.whenDescriptionText();case"Link":return e.whenLink();case"Button":return e.whenButton();default:return ta(t)}}}),CM=t=>_xe(t.themeName).Match({whenHeading:()=>t.themeFontColors.HeadingColor,whenTitle:()=>t.themeFontColors.TitleColor,whenSubHeading:()=>t.themeFontColors.SubHeadingColor,whenLargeText:()=>t.themeFontColors.LargeTextColor,whenNormalText:()=>t.themeFontColors.NormalTextColor,whenDescriptionText:()=>t.themeFontColors.DescriptionTextColor,whenLink:()=>t.themeFontColors.LinkColor,whenButton:()=>t.themeFontColors.ButtonTextColor}),Iw=t=>{const{FontFamily:e,FontSettingsPresets:n,Colors:o}=t.theme,r=!!t.editor.getAttributes("textStyle")[t.styleName],i=t.editor.getAttributes("paragraph").themeName||"NormalText",s=t.editor.getAttributes("textStyle").themeName||i;if(r)return t.editor.getAttributes("textStyle")[t.styleName];const a=us({fontFamily:e,themeFontSettings:n[s],themeColor:CM({themeName:s,themeFontColors:o})});return String(a[t.styleName])},Rxe=t=>{const{FontFamily:e,FontSettingsPresets:n,Colors:o}=t.theme,r=!!t.editor.getAttributes("textStyle").color,i=t.editor.getAttributes("paragraph").themeName||"NormalText",s=t.editor.getAttributes("textStyle").themeName||i;if(r)return t.editor.getAttributes("textStyle").color;const a=us({fontFamily:e,themeFontSettings:n[s],themeColor:CM({themeName:s,themeFontColors:o})});return{Discriminator:_xe(s).Match({whenHeading:()=>"HeadingColor",whenTitle:()=>"TitleColor",whenSubHeading:()=>"SubHeadingColor",whenLargeText:()=>"LargeTextColor",whenNormalText:()=>"NormalTextColor",whenDescriptionText:()=>"DescriptionTextColor",whenLink:()=>"LinkColor",whenButton:()=>"ButtonTextColor"}),CustomValue:a.color}},cyt={class:"color-picker bootstrap-styles border rounded bg-white"},dyt={class:"bootstrap-styles p-1 mb-5 bg-white"},hyt=["value"],myt=["value"],fyt=Xe({__name:"ColorPickerModalWindow",props:{editor:{},theme:{},deps:{}},emits:["onColorChanged","onColorPickerClosed"],setup(t,{emit:e}){const n=t,o={colorLabels:uyt({localeKey:n.deps.localeKey}).colorLabels},r=q(()=>gM({fontColor:Rxe({editor:n.editor,theme:n.theme}),themeColors:n.theme.Colors})),i=Vt({color:r.value,isValidHexColor:!0}),s={StyleLinkedColor:o.colorLabels.styleLinkedColor,EmailBackgroundColor:o.colorLabels.emailBackgroundColor,BodyColor:o.colorLabels.bodyColor,PrimaryColor:o.colorLabels.primaryColor,SecondaryColor:o.colorLabels.secondaryColor,PrimaryTextColor:o.colorLabels.primaryTextColor,SecondaryTextColor:o.colorLabels.secondaryTextColor,CardBackgroundColor:o.colorLabels.cardBackgroundColor,ButtonTextColor:o.colorLabels.buttonTextColor,TitleColor:o.colorLabels.titleColor,HeadingColor:o.colorLabels.headingColor,SubHeadingColor:o.colorLabels.subHeadingColor,LargeTextColor:o.colorLabels.largeTextColor,NormalTextColor:o.colorLabels.normalTextColor,DescriptionTextColor:o.colorLabels.descriptionTextColor,LinkColor:o.colorLabels.linkColor,Custom:o.colorLabels.custom},a=["EmailBackgroundColor","BodyColor","PrimaryColor","SecondaryColor","PrimaryTextColor","SecondaryTextColor","ButtonTextColor","TitleColor","HeadingColor","SubHeadingColor","LargeTextColor","NormalTextColor","DescriptionTextColor","LinkColor"],l=yet(h=>{d("onColorChanged",{Discriminator:"Custom",CustomValue:h})},100,{leading:!1,trailing:!0}),u=h=>/^#([0-9A-Fa-f]{6})$/.test(h.trim()),c=h=>{i.isValidHexColor=u(h),i.color=h,u(h)&&d("onColorChanged",{Discriminator:"Custom",CustomValue:h})};an(()=>r.value,h=>{i.color=h,i.isValidHexColor=u(h)});const d=e;return(h,m)=>Ot((O(),J("div",null,[_("ul",cyt,[_("li",dyt,[ie(z(_ct),{modelValue:r.value,width:220,canvasHeight:220,hideInputs:!0,hideSliders:!1,mode:"hex","onUpdate:modelValue":m[0]||(m[0]=f=>z(l)(f))},null,8,["modelValue"]),_("div",{class:$e(["bootstrap-styles border bg-color-input rounded-2 d-flex justify-content-between p-14",{"is-not-valid":!i.isValidHexColor}])},[_("input",{type:"color",class:"bootstrap-styles pe-none",style:{border:"1px solid rgba(0, 0, 0, 0.1)",cursor:"default"},value:r.value},null,8,hyt),_("input",{type:"text",class:"bootstrap-styles w-100 text-uppercase ps-1",value:i.color,placeholder:"#000000",onInput:m[1]||(m[1]=f=>c(f.target.value))},null,40,myt)],2)]),(O(),J(rt,null,$n(a,f=>ie(syt,{key:f,isActive:r.value===n.theme.Colors[f],color:n.theme.Colors[f],label:s[f],onClick:()=>{d("onColorChanged",{Discriminator:f,CustomValue:n.theme.Colors[f]}),d("onColorPickerClosed")}},null,8,["isActive","color","label","onClick"])),64))])])),[[z(Km),()=>d("onColorPickerClosed")]])}}),pyt=ot(fyt,[["__scopeId","data-v-b1cc72b1"]]),gyt={tooltip:"Text color"},Cyt={tooltip:"Цвет текста"},yyt=Xn({en:gyt,ru:Cyt}),byt=["value"],vyt=Xe({__name:"ColorPicker",props:{editor:{},theme:{},isAllowToEdit:{type:Boolean},deps:{}},setup(t){const e=t,n={tooltip:yyt({localeKey:e.deps.localeKey}).tooltip},o=Vt({isColorPickerDropdownShown:!1}),r=pn(),i=pn(),{floatingStyles:s}=B0e(i,r,{whileElementsMounted:D0e,placement:"bottom",middleware:[A0e(({rects:l})=>({alignmentAxis:-l.floating.width/2-l.floating.width/2,mainAxis:15}))]}),a=q(()=>gM({fontColor:Rxe({editor:e.editor,theme:e.theme}),themeColors:e.theme.Colors}));return(l,u)=>(O(),J(rt,null,[Ot((O(),J("button",{ref_key:"richTextColorPickerBtn",ref:i,class:$e(["bootstrap-styles border rich-text-color__input rich-text__handler",{disabled:!t.isAllowToEdit}]),value:a.value,onClick:u[0]||(u[0]=()=>o.isColorPickerDropdownShown=!o.isColorPickerDropdownShown)},[_("i",{style:he([{display:"block",width:"100%",height:"100%"},{backgroundColor:a.value}])},null,4)],10,byt)),[[z(Vo),{title:n.tooltip,placement:"top"}]]),o.isColorPickerDropdownShown?(O(),Ze(pyt,{key:0,ref_key:"richTextColorPicker",ref:r,theme:e.theme,editor:e.editor,deps:e.deps.colorPickerModalWindowDeps,style:he(z(s)),onOnColorChanged:u[1]||(u[1]=c=>{e.editor.commands.setColor(c)}),onOnColorPickerClosed:u[2]||(u[2]=()=>{o.isColorPickerDropdownShown=!1,e.editor.commands.focus()})},null,8,["theme","editor","deps","style"])):Ue("",!0)],64))}}),Tyt=ot(vyt,[["__scopeId","data-v-6624477a"]]),xyt={},Fyt={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function Syt(t,e){return O(),J("svg",Fyt,[...e[0]||(e[0]=[_("path",{d:"M8.00033 10.0002L5.17188 7.17184L6.11469 6.229L8.00033 8.11464L9.88593 6.229L10.8287 7.17184L8.00033 10.0002Z",fill:"var(--gray-500)"},null,-1)])])}const Dxe=ot(xyt,[["render",Syt]]),wyt={tooltip:"Font family"},kyt={tooltip:"Шрифт"},Eyt=Xn({en:wyt,ru:kyt}),_yt={class:"bootstrap-styles dropdown"},Ryt={class:"bootstrap-styles me-14 overflow-hidden rich-text-toolbar__font-family-btn__text"},Dyt={class:"bootstrap-styles d-flex justify-content-center align-items-center"},Ayt=["onClick"],Nyt=Xe({__name:"FontFamilySelector",props:{editor:{},isAllowToEdit:{type:Boolean},theme:{},deps:{}},setup(t){const e=t,n={tooltip:Eyt({localeKey:e.deps.localeKey}).tooltip},o=oM.name,r=Vt({isOpened:!1}),i=q(()=>Iw({editor:e.editor,theme:e.theme,styleName:"fontFamily"})),s=a=>{e.editor.commands.setFontFamily(a),r.isOpened=!1,e.editor.commands.focus()};return(a,l)=>Ot((O(),J("div",_yt,[_("button",{id:"richTextDropdownFontFamily",class:$e(["bootstrap-styles d-flex justify-content-between align-items-center py-1 px-3 text-nowrap rich-text-toolbar__font-family-btn border rounded-2 overflow-hidden",{disabled:!e.isAllowToEdit,show:r.isOpened}]),type:"button",onClick:l[0]||(l[0]=u=>r.isOpened=!r.isOpened)},[_("span",Ryt,Gt(z(I5)[i.value]),1),_("i",Dyt,[ie(Dxe)])],2),_("ul",{class:$e([{show:r.isOpened},"bootstrap-styles dropdown-menu rounded-2 bg-white"]),"aria-labelledby":"richTextDropdownFontFamily"},[(O(!0),J(rt,null,$n(z(pxe),u=>(O(),J("li",{key:u,class:$e(["bootstrap-styles dropdown-item p-0",{active:e.editor.getAttributes(z(o)).fontFamily===u}]),onClick:()=>s(u)},[_("span",{class:"bootstrap-styles d-block py-1 px-3 text-decoration-none text-reset cursor-pointer",style:he({fontFamily:u})},Gt(z(I5)[u]),5)],10,Ayt))),128))],2)])),[[z(Km),()=>r.isOpened=!1],[z(Vo),{title:n.tooltip,placement:"top"}]])}}),Byt=ot(Nyt,[["__scopeId","data-v-cc496278"]]),Lyt={},$yt={xmlns:"http://www.w3.org/2000/svg",width:"8",height:"8",viewBox:"0 0 8 8",fill:"none"};function Vyt(t,e){return O(),J("svg",$yt,[...e[0]||(e[0]=[_("path",{d:"M4.00003 2.38419e-07L1 2.99997L2.00001 4L4.00003 1.99998L6.00001 4L7 2.99997L4.00003 2.38419e-07Z",fill:"var(--gray-500)"},null,-1)])])}const Axe=ot(Lyt,[["render",Vyt],["__scopeId","data-v-19c42a7a"]]),Myt={},Oyt={xmlns:"http://www.w3.org/2000/svg",width:"8",height:"8",viewBox:"0 0 8 8",fill:"none"};function Iyt(t,e){return O(),J("svg",Oyt,[...e[0]||(e[0]=[_("path",{d:"M4.00003 8L1 5.00003L2.00001 4L4.00003 6.00002L6.00001 4L7 5.00003L4.00003 8Z",fill:"var(--gray-500)"},null,-1)])])}const Nxe=ot(Myt,[["render",Iyt],["__scopeId","data-v-313c2951"]]),Pyt={},Wyt={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Hyt(t,e){return O(),J("svg",Wyt,[...e[0]||(e[0]=[_("path",{d:"M6.66634 4.00033V14.0003H5.33301V4.00033H1.33301V2.66699H10.6663V4.00033H6.66634ZM11.9997 9.33366V14.0003H10.6663V9.33366H8.66634V8.00033H13.9997V9.33366H11.9997Z",fill:"#999999"},null,-1)])])}const zyt=ot(Pyt,[["render",Hyt]]),jyt={tooltip:"Font size"},Uyt={tooltip:"Размер текста"},Kyt=Xn({en:jyt,ru:Uyt}),qyt=t=>{const{FontFamily:e,FontSettingsPresets:n,Colors:o}=t.theme,r=!!t.editor.getAttributes("textStyle").fontSize,i=t.editor.getAttributes("paragraph").themeName||"NormalText",s=t.editor.getAttributes("textStyle").themeName||i;return r?parseInt(t.editor.getAttributes("textStyle").fontSize,10):us({fontFamily:e,themeFontSettings:n[s],themeColor:CM({themeName:s,themeFontColors:o})}).fontSize},Jyt={class:"bootstrap-styles rich-text-toolbar__font-size-editor position-relative rounded-2 py-1 px-3 d-flex"},Gyt={class:"bootstrap-styles d-flex justify-content-center rich-text-icon me-14"},Yyt=["value"],Xyt={class:"bootstrap-styles rich-text-toolbar__input-button top-0 d-flex position-absolute align-items-end justify-content-center"},Qyt={class:"bootstrap-styles rich-text-toolbar__input-button bottom-0 d-flex position-absolute align-items-start justify-content-center"},Zyt=Xe({__name:"FontSizeEditor",props:{editor:{},theme:{},deps:{}},setup(t){const e=t,n={tooltip:Kyt({localeKey:e.deps.localeKey}).tooltip},o=q(()=>qyt({editor:e.editor,theme:e.theme})),r=()=>{o.value&&e.editor.commands.setFontSize(o.value+1)},i=()=>{o.value&&o.value!==1&&e.editor.commands.setFontSize(o.value-1)},s=a=>{const l=a.target;let u=parseInt(l.value);const c=100;isNaN(u)||l.value===""?(u=0,l.value="0"):u>c&&(u=c,l.value=String(c)),e.editor.commands.setFontSize(u)};return(a,l)=>Ot((O(),J("div",Jyt,[_("i",Gyt,[ie(zyt)]),_("input",{type:"number",class:"bootstrap-styles rich-text-toolbar__input-number rich-text__handler",value:o.value,onInput:s},null,40,Yyt),_("div",Xyt,[_("input",{type:"button",class:"bootstrap-styles position-absolute rich-text__handler",onClick:r}),ie(Axe)]),_("div",Qyt,[_("input",{type:"button",class:"bootstrap-styles position-absolute rich-text__handler",onClick:i}),ie(Nxe)])])),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),e0t=ot(Zyt,[["__scopeId","data-v-ba95f865"]]),t0t=Xe({__name:"SelectItemTextStyle",props:{isActive:{type:Boolean},label:{},themeFontStyle:{},themeFontColor:{}},emits:["click"],setup(t,{emit:e}){const n=t,o=e;return(r,i)=>(O(),J("li",{class:$e(["bootstrap-styles dropdown-item p-0 d-flex align-items-center px-3 cursor-pointer",{active:n.isActive}]),onClick:i[0]||(i[0]=s=>o("click"))},[_("i",{class:"bootstrap-styles input__color_selection d-block overflow-hidden me-2",style:he([{background:n.themeFontColor??"linear-gradient(135deg, rgb(51, 132, 255) 0%, rgb(202, 101, 250) 34.37%, rgb(250, 101, 101) 61.98%, rgb(250, 235, 101) 100%)"},{"min-width":"24px"}])},null,4),_("span",{class:"bootstrap-styles d-block py-1 text-decoration-none overflow-hidden",style:he([n.themeFontStyle&&{fontSize:n.themeFontStyle.FontSize+"px",fontWeight:n.themeFontStyle.IsBold?"bold":"normal",fontStyle:n.themeFontStyle.IsItalic?"italic":"normal",textDecoration:n.themeFontStyle.Decoration},{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"}])},Gt(n.label),5)],2))}}),n0t=ot(t0t,[["__scopeId","data-v-9d9afc02"]]),o0t={tooltip:"Text style",settingLabels:{title:"Title",heading:"Heading",subHeading:"Subheading",largeText:"Large text",normalText:"Text",descriptionText:"Description",link:"Link",button:"Button",custom:"Custom"}},r0t={tooltip:"Стиль текста",settingLabels:{title:"Большой заголовок",heading:"Заголовок",subHeading:"Подзаголовок",largeText:"Большой текст",normalText:"Текст",descriptionText:"Описание",link:"Ссылка",button:"Кнопка",custom:"Пользовательский"}},voe=Xn({en:o0t,ru:r0t}),i0t={class:"bootstrap-styles dropdown"},s0t={class:"bootstrap-styles rich-text-toolbar__font-style-selector__text"},a0t={class:"bootstrap-styles d-flex justify-content-center align-items-center rich-text-toolbar__icon"},l0t=Xe({__name:"ThemeSettingsSelector",props:{editor:{},theme:{},isAllowToEdit:{type:Boolean},initialThemeName:{},deps:{}},setup(t){const e=t,n=oM.name,o=Vt({isOpened:!1}),r={tooltip:voe({localeKey:e.deps.localeKey}).tooltip,settingLabels:voe({localeKey:e.deps.localeKey}).settingLabels},i={Title:r.settingLabels.title,Heading:r.settingLabels.heading,SubHeading:r.settingLabels.subHeading,LargeText:r.settingLabels.largeText,NormalText:r.settingLabels.normalText,DescriptionText:r.settingLabels.descriptionText,Link:r.settingLabels.link,Button:r.settingLabels.button,Custom:r.settingLabels.custom},s=["Title","Heading","SubHeading","LargeText","NormalText","DescriptionText","Link","Button"],a=["TitleColor","HeadingColor","SubHeadingColor","LargeTextColor","NormalTextColor","DescriptionTextColor","LinkColor","ButtonTextColor"],l=q(()=>{const c=e.initialThemeName,d=e.editor.getAttributes("paragraph").themeName||c;let h=s.find(F=>e.editor.getAttributes(n).themeName===F)||d;const{fontWeight:m,fontStyle:f,textDecoration:p,fontSize:g,fontFamily:y,lineHeight:b}=e.editor.getAttributes(n);return m||f||p||g||y||b?i.Custom:i[h]}),u=c=>{e.editor.commands.unsetMark(n),e.editor.chain().focus().setThemeSettings(c).run(),o.isOpened=!1};return(c,d)=>Ot((O(),J("div",i0t,[_("button",{id:"dropdownMenuButtonFontStyleList",class:$e(["bootstrap-styles rich-text-toolbar__font-style-selector d-flex justify-content-between align-items-center py-1 px-3 text-nowrap border rounded-2",{disabled:!e.isAllowToEdit,show:o.isOpened}]),type:"button",onClick:d[0]||(d[0]=()=>o.isOpened=!o.isOpened)},[_("span",s0t,Gt(l.value),1),_("i",a0t,[ie(Dxe)])],2),_("ul",{class:$e([{show:o.isOpened},"bootstrap-styles rich-text-toolbar__font-style-dropdown dropdown-menu rounded-2"]),"aria-labelledby":"dropdownMenuButtonFontStyleList"},[(O(),J(rt,null,$n(s,(h,m)=>ie(n0t,{key:h,isActive:e.editor.getAttributes(z(n)).themeName===h,label:i[h],themeFontStyle:e.theme.FontSettingsPresets[h],themeFontColor:e.theme.Colors[a[m]],onClick:()=>u(h)},null,8,["isActive","label","themeFontStyle","themeFontColor","onClick"])),64))],2)])),[[z(Km),()=>o.isOpened=!1],[z(Vo),{title:r.tooltip,placement:"top"}]])}}),u0t=ot(l0t,[["__scopeId","data-v-088df711"]]),c0t={},d0t={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function h0t(t,e){return O(),J("svg",d0t,[...e[0]||(e[0]=[_("path",{d:"M7.33317 2.66667H13.9998V4H7.33317V2.66667ZM3.99984 4.66667V7.33333H2.6665V4.66667H0.666504L3.33317 2L5.99984 4.66667H3.99984ZM3.99984 11.3333H5.99984L3.33317 14L0.666504 11.3333H2.6665V8.66667H3.99984V11.3333ZM7.33317 12H13.9998V13.3333H7.33317V12ZM5.99984 7.33333H13.9998V8.66667H5.99984V7.33333Z",fill:"var(--gray-500)"},null,-1)])])}const m0t=ot(c0t,[["render",h0t]]),f0t={tooltip:"Line height"},p0t={tooltip:"Высота строки"},g0t=Xn({en:f0t,ru:p0t}),C0t=t=>{const{FontFamily:e,FontSettingsPresets:n,Colors:o}=t.theme,r=!!t.editor.getAttributes("textStyle").lineHeight,i=t.editor.getAttributes("paragraph").themeName||"NormalText",s=t.editor.getAttributes("textStyle").themeName||i;return r?parseInt(t.editor.getAttributes("textStyle").lineHeight,10):us({fontFamily:e,themeFontSettings:n[s],themeColor:CM({themeName:s,themeFontColors:o})}).lineHeight},y0t={class:"bootstrap-styles rich-text-toolbar__line-height-editor position-relative rounded-2 py-1 px-3 d-flex"},b0t={class:"bootstrap-styles d-flex justify-content-center rich-text-icon me-14"},v0t=["value"],T0t={class:"bootstrap-styles rich-text-toolbar__input-button d-flex position-absolute align-items-end justify-content-center",style:{right:"10px",top:"0",width:"16px",height:"16px"}},x0t={class:"bootstrap-styles rich-text-toolbar__input-button d-flex position-absolute align-items-start justify-content-center",style:{right:"10px",bottom:"0",width:"16px",height:"16px"}},F0t=Xe({__name:"LineHeightEditor",props:{editor:{},theme:{},deps:{}},setup(t){const e=t,n={tooltip:g0t({localeKey:e.deps.localeKey}).tooltip},o=q(()=>C0t({editor:e.editor,theme:e.theme})),r=()=>{o.value&&e.editor.commands.setLineHeight(o.value+1)},i=()=>{o.value&&o.value!==1&&e.editor.commands.setLineHeight(o.value-1)},s=a=>{const l=a.target;let u=parseInt(l.value);const c=100;isNaN(u)||l.value===""?(u=0,l.value="0"):u>c&&(u=c,l.value=String(c)),e.editor.commands.setLineHeight(u)};return(a,l)=>Ot((O(),J("div",y0t,[_("i",b0t,[ie(m0t)]),_("input",{type:"number",class:"bootstrap-styles rich-text-toolbar__input-number rich-text__handler",value:o.value,onInput:s},null,40,v0t),_("div",T0t,[_("input",{type:"button",class:"bootstrap-styles position-absolute rich-text__handler",onClick:r}),ie(Axe)]),_("div",x0t,[_("input",{type:"button",class:"bootstrap-styles position-absolute rich-text__handler",onClick:i}),ie(Nxe)])])),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),S0t=ot(F0t,[["__scopeId","data-v-4e76ed1b"]]),w0t=["http:","https:","mailto:","tel:"],k0t={mounted(t,e){t.addEventListener("input",()=>{const n=t.value;let o=!1;try{const r=new URL(n);o=w0t.includes(r.protocol)}catch{o=!1}typeof e.value=="function"&&e.value(o)})}},Bxe={mounted(t,e){Toe(t,e)},updated(t,e){e.value&&Toe(t,e)}},Toe=(t,e)=>{document.activeElement!==t&&requestAnimationFrame(()=>{if(t.focus(),e.modifiers.selectAll&&t.select(),e.modifiers.end){const n=t.value.length;t.setSelectionRange(n,n)}})},E0t={},_0t={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none"};function R0t(t,e){return O(),J("svg",_0t,[...e[0]||(e[0]=[_("path",{d:"M11.2432 9.35654L10.3003 8.41374L11.2432 7.47094C12.5449 6.16921 12.5449 4.05865 11.2432 2.75691C9.94139 1.45516 7.83086 1.45516 6.52912 2.75691L5.58631 3.69972L4.6435 2.75691L5.58631 1.8141C7.40879 -0.00834608 10.3635 -0.00834608 12.186 1.8141C14.0084 3.63655 14.0084 6.59134 12.186 8.41374L11.2432 9.35654ZM9.35752 11.2422L8.41472 12.185C6.59232 14.0075 3.63752 14.0075 1.81508 12.185C-0.00736952 10.3625 -0.00736952 7.40781 1.81508 5.58533L2.75788 4.64253L3.70069 5.58533L2.75788 6.52814C1.45614 7.82987 1.45614 9.94047 2.75788 11.2422C4.05963 12.5439 6.17019 12.5439 7.47192 11.2422L8.41472 10.2994L9.35752 11.2422ZM8.88612 4.17112L9.82893 5.11393L5.1149 9.82801L4.1721 8.88514L8.88612 4.17112Z",fill:"var(--black)"},null,-1)])])}const Lxe=ot(E0t,[["render",R0t]]),D0t={label:"Link",inputPlaceholder:"https://example.com",errorNotification:"The link must contain https://, http://, mailto:, tel:",applyButton:"Save",cancelButton:"Cancel"},A0t={label:"Ссылка",inputPlaceholder:"https://example.com",errorNotification:"Ссылка должна содержать https://, http://, mailto:, tel:",applyButton:"Сохранить",cancelButton:"Отмена"},b1=Xn({en:D0t,ru:A0t}),N0t={},B0t={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function L0t(t,e){return O(),J("svg",B0t,[...e[0]||(e[0]=[_("path",{d:"M11.333 3.99967H14.6663V5.33301H13.333V13.9997C13.333 14.3679 13.0345 14.6663 12.6663 14.6663H3.33301C2.96482 14.6663 2.66634 14.3679 2.66634 13.9997V5.33301H1.33301V3.99967H4.66634V1.99967C4.66634 1.63149 4.96482 1.33301 5.33301 1.33301H10.6663C11.0345 1.33301 11.333 1.63149 11.333 1.99967V3.99967ZM11.9997 5.33301H3.99967V13.333H11.9997V5.33301ZM5.99967 7.33301H7.33301V11.333H5.99967V7.33301ZM8.66634 7.33301H9.99967V11.333H8.66634V7.33301ZM5.99967 2.66634V3.99967H9.99967V2.66634H5.99967Z",fill:"white"},null,-1)])])}const $xe=ot(N0t,[["render",L0t]]),$0t={class:"bootstrap-styles bg-white border rounded-2 add-text-link-modal-window"},V0t={class:"bootstrap-styles fw-bold mb-5 px-11 mt-10 d-block text-start"},M0t={class:"bootstrap-styles px-11 mb-2"},O0t={class:"bootstrap-styles d-flex justify-content-center align-items-center me-1"},I0t=["placeholder","value"],P0t={class:"bootstrap-styles px-11 py-5 d-flex align-items-center justify-content-end border-top"},W0t=["disabled"],H0t=Xe({__name:"AddLinkModalWindow",props:{isActive:{type:Boolean},currentHref:{},deps:{}},emits:["onClosed","onHrefChanged","onRemoved"],setup(t,{emit:e}){const n=t,o=Vt({href:n.currentHref,isValid:!0}),r=a=>{o.href=a,o.isValid=a.length>0},i={label:b1({localeKey:n.deps.localeKey}).label,inputPlaceholder:b1({localeKey:n.deps.localeKey}).inputPlaceholder,errorNotification:b1({localeKey:n.deps.localeKey}).errorNotification,applyButton:b1({localeKey:n.deps.localeKey}).applyButton,cancelButton:b1({localeKey:n.deps.localeKey}).cancelButton},s=e;return(a,l)=>Ot((O(),J("div",$0t,[_("label",V0t,Gt(i.label),1),_("div",M0t,[_("div",{class:$e(["bootstrap-styles bg-color-input border rounded-2 py-1 px-3 d-flex mb-14",{"border-danger":!o.isValid}])},[_("i",O0t,[ie(Lxe)]),Ot(_("input",{type:"text",class:"bootstrap-styles w-100",placeholder:i.inputPlaceholder,value:o.href,onInput:l[0]||(l[0]=u=>r(u.target.value))},null,40,I0t),[[z(k0t),u=>o.isValid=u],[z(Bxe),void 0,void 0,{selectAll:!0}]])],2),_("div",{class:$e(["bootstrap-styles text-start add-link-modal-window-notification",{invisible:o.isValid}])},Gt(i.errorNotification),3)]),_("div",P0t,[n.isActive?(O(),J("button",{key:0,class:"bootstrap-styles d-flex justify-content-center align-center py-1 px-3 me-auto rounded-2 add-text-link-modal-window__remove-button",onClick:l[1]||(l[1]=zo(()=>s("onRemoved"),["stop"]))},[_("i",null,[ie($xe)])])):Ue("",!0),_("button",{class:"bootstrap-styles d-flex justify-content-center align-center py-1 px-3 me-3 border border-blue-selected rounded-2 bg-blue-selected button__hover-blue-100 text-color-selected",onClick:l[2]||(l[2]=()=>s("onClosed"))},Gt(i.cancelButton),1),_("button",{class:"bootstrap-styles d-flex justify-content-center align-center py-1 px-3 border rounded-2 bg-color-selected text-white cursor-pointer",disabled:!o.href.length||!o.isValid,onClick:l[3]||(l[3]=()=>s("onHrefChanged",o.href))},Gt(i.applyButton),9,W0t)])])),[[z(Km),()=>s("onClosed")]])}}),z0t=ot(H0t,[["__scopeId","data-v-dd4e68e8"]]),j0t={};function U0t(t,e){return O(),J(rt,null,[e[0]||(e[0]=_("svg",{class:"unlinked",xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"},[_("path",{d:"M12.7432 10.3565L11.8003 9.41374L12.7432 8.47094C14.0449 7.16921 14.0449 5.05865 12.7432 3.75691C11.4414 2.45516 9.33086 2.45516 8.02912 3.75691L7.08631 4.69972L6.1435 3.75691L7.08631 2.8141C8.90879 0.991654 11.8635 0.991654 13.686 2.8141C15.5084 4.63655 15.5084 7.59134 13.686 9.41374L12.7432 10.3565ZM10.8575 12.2422L9.91472 13.185C8.09232 15.0075 5.13752 15.0075 3.31508 13.185C1.49263 11.3625 1.49263 8.40781 3.31508 6.58533L4.25788 5.64253L5.20069 6.58533L4.25788 7.52814C2.95614 8.82987 2.95614 10.9405 4.25788 12.2422C5.55963 13.5439 7.67019 13.5439 8.97192 12.2422L9.91472 11.2994L10.8575 12.2422ZM10.3861 5.17112L11.3289 6.11393L6.6149 10.828L5.6721 9.88514L10.3861 5.17112Z",fill:"black"})],-1)),e[1]||(e[1]=_("svg",{class:"linked",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[_("path",{d:"M11.7713 9.88573L10.8285 8.94287L11.7713 8.00007C12.8127 6.95867 12.8127 5.27025 11.7713 4.22885C10.7299 3.18745 9.04147 3.18745 8.00007 4.22885L7.05727 5.17166L6.11447 4.22885L7.05727 3.28605C8.6194 1.72395 11.1521 1.72395 12.7141 3.28605C14.2762 4.84814 14.2762 7.3808 12.7141 8.94287L11.7713 9.88573ZM9.88573 11.7713L8.94287 12.7141C7.3808 14.2762 4.84814 14.2762 3.28605 12.7141C1.72395 11.1521 1.72395 8.6194 3.28605 7.05727L4.22885 6.11447L5.17166 7.05727L4.22885 8.00007C3.18745 9.04147 3.18745 10.7299 4.22885 11.7713C5.27025 12.8127 6.95867 12.8127 8.00007 11.7713L8.94287 10.8285L9.88573 11.7713ZM9.88573 5.17166L10.8285 6.11447L6.11447 10.8285L5.17166 9.88573L9.88573 5.17166ZM3.85026 1.52869L5.13816 1.18359L5.82835 3.75939L4.54045 4.10449L3.85026 1.52869ZM10.1719 12.2408L11.4597 11.8957L12.1499 14.4715L10.862 14.8166L10.1719 12.2408ZM1.52869 3.85026L4.10449 4.54045L3.75939 5.82835L1.18359 5.13816L1.52869 3.85026ZM12.2408 10.1719L14.8166 10.862L14.4715 12.1499L11.8957 11.4597L12.2408 10.1719Z",fill:"black"})],-1))],64)}const K0t=ot(j0t,[["render",U0t],["__scopeId","data-v-730bc16f"]]),q0t={tooltip:"Link"},J0t={tooltip:"Ссылка"},G0t=Xn({en:q0t,ru:J0t}),Y0t={class:"bootstrap-styles d-flex rich-text-icon icon-hover"},X0t=Xe({__name:"LinkEditor",props:{editor:{},isAllowToEdit:{type:Boolean},deps:{}},setup(t){const e=t,n={tooltip:G0t({localeKey:e.deps.localeKey}).tooltip},o=R8.name,r=cU.name,i=Vt({isAddTextLinkModalWindowShown:!1}),s=q(()=>e.editor.isActive(r)),a=u=>{s.value&&e.editor.commands.unsetUnsubscribeLink(),e.editor.chain().focus().setLink({href:u}).setThemeSettings("Link").run(),i.isAddTextLinkModalWindowShown=!1},l=()=>{e.editor.chain().focus().unsetLink().applySiblingNodeThemeSettings().run(),i.isAddTextLinkModalWindowShown=!1};return(u,c)=>(O(),J(rt,null,[Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:e.editor.isActive(z(o)),disabled:!e.editor.isActive(z(o))&&!e.isAllowToEdit}]),onClick:c[0]||(c[0]=d=>{i.isAddTextLinkModalWindowShown=!i.isAddTextLinkModalWindowShown})},[_("i",Y0t,[e.editor.isActive(z(o))?(O(),Ze(K0t,{key:1})):(O(),Ze(Lxe,{key:0}))])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]]),i.isAddTextLinkModalWindowShown?(O(),Ze(z0t,{key:0,isActive:e.editor.isActive(z(o)),currentHref:e.editor.isActive(z(o))?e.editor.getAttributes(z(o)).href:"",deps:e.deps.addLinkModalWindowDeps,onOnRemoved:c[1]||(c[1]=()=>l()),onOnClosed:c[2]||(c[2]=d=>i.isAddTextLinkModalWindowShown=!1),onOnHrefChanged:c[3]||(c[3]=d=>a(d))},null,8,["isActive","currentHref","deps"])):Ue("",!0)],64))}}),Q0t=ot(X0t,[["__scopeId","data-v-6460a995"]]),Z0t={label:"URL",placeholder:"URL...",cancel:"Cancel",apply:"Save",removeTooltip:"Delete image"},ebt={label:"URL",placeholder:"URL...",cancel:"Отмена",apply:"Сохранить",removeTooltip:"Удалить изображение"},v1=Xn({en:Z0t,ru:ebt}),tbt={class:"bootstrap-styles bg-white border rounded-2 add-image-src-modal-window"},nbt={class:"bootstrap-styles fw-bold mb-5 px-11 mt-10 d-block text-start"},obt={class:"bootstrap-styles px-11 mb-11"},rbt=["placeholder","value"],ibt={class:"bootstrap-styles px-11 py-5 d-flex align-items-center justify-content-end border-top"},sbt=["disabled"],abt=Xe({__name:"AddImageSrcModalWindow",props:{isActive:{type:Boolean},src:{},width:{},height:{},isRetina:{type:Boolean},deps:{}},emits:["onClosed","onRemoved","onImageSrcChanged"],setup(t,{emit:e}){const n=t,o=Vt({src:n.src,width:n.width,height:n.height,isBroken:!1}),r={label:v1({localeKey:n.deps.localeKey}).label,placeholder:v1({localeKey:n.deps.localeKey}).placeholder,cancel:v1({localeKey:n.deps.localeKey}).cancel,apply:v1({localeKey:n.deps.localeKey}).apply,removeTooltip:v1({localeKey:n.deps.localeKey}).removeTooltip},i=Qye(l=>{kxe(l).then(u=>{o.width=u.width,o.height=u.height,o.isBroken=!1,o.src=l}).catch(()=>{o.src=l,o.isBroken=!0})},500),s=()=>{a("onImageSrcChanged",{src:o.src,width:o.width,height:o.height,isRetina:!1})},a=e;return(l,u)=>Ot((O(),J("div",tbt,[_("label",nbt,Gt(r.label),1),_("div",obt,[_("div",{class:$e(["bootstrap-styles bg-color-input border rounded-2 py-1 px-3 d-flex",{"border-danger":o.isBroken}])},[Ot(_("input",{type:"text",class:"bootstrap-styles w-100",placeholder:r.placeholder,value:o.src,onInput:u[0]||(u[0]=c=>z(i)(c.target.value))},null,40,rbt),[[z(Bxe),void 0,void 0,{selectAll:!0}]])],2)]),_("div",ibt,[n.isActive?Ot((O(),J("button",{key:0,class:"bootstrap-styles d-flex justify-content-center align-center py-1 px-3 me-auto rounded-2 add-image-src-modal-window__remove-button",onClick:u[1]||(u[1]=zo(()=>a("onRemoved"),["stop"]))},[_("i",null,[ie($xe)])])),[[z(Vo),{placement:"top",title:r.removeTooltip}]]):Ue("",!0),_("button",{class:"bootstrap-styles d-flex justify-content-center align-center py-1 px-3 me-3 border border-blue-selected rounded-2 bg-blue-selected button__hover-blue-100 text-color-selected",onClick:u[2]||(u[2]=zo(()=>a("onClosed"),["stop"]))},Gt(r.cancel),1),_("button",{class:"bootstrap-styles d-flex justify-content-center align-center py-1 px-3 border rounded-2 bg-color-selected text-white cursor-pointer",disabled:!o.src.length||o.isBroken,onClick:u[3]||(u[3]=zo(()=>s(),["stop"]))},Gt(r.apply),9,sbt)])])),[[z(Km),()=>a("onClosed")]])}}),lbt=ot(abt,[["__scopeId","data-v-35966ae0"]]),ubt={},cbt={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function dbt(t,e){return O(),J("svg",cbt,[...e[0]||(e[0]=[_("path",{d:"M1.99453 14C1.62936 14 1.33333 13.7034 1.33333 13.3377V2.66227C1.33333 2.29651 1.63687 2 1.99453 2H14.0055C14.3707 2 14.6667 2.29663 14.6667 2.66227V13.3377C14.6667 13.7035 14.3631 14 14.0055 14H1.99453ZM13.3333 10V3.33333H2.66666V12.6667L9.33333 6L13.3333 10ZM13.3333 11.8856L9.33333 7.8856L4.55228 12.6667H13.3333V11.8856ZM5.33333 7.33333C4.59695 7.33333 3.99999 6.7364 3.99999 6C3.99999 5.26362 4.59695 4.66667 5.33333 4.66667C6.06971 4.66667 6.66666 5.26362 6.66666 6C6.66666 6.7364 6.06971 7.33333 5.33333 7.33333Z",fill:"#2F2F2F"},null,-1)])])}const hbt=ot(ubt,[["render",dbt]]),mbt={tooltip:"Image",retinaLabel:"For retina screens"},fbt={tooltip:"Изображение",retinaLabel:"Для retina-экранов"},xoe=Xn({en:mbt,ru:fbt}),pbt=["checked"],gbt=Xe({__name:"Checkbox",props:{checked:{type:Boolean}},emits:["change"],setup(t,{emit:e}){const n=t,o=e;return(r,i)=>(O(),J("input",{class:"bootstrap-styles me-1 cursor-pointer",checked:n.checked,type:"checkbox","aria-label":"Checkbox for following text input",onChange:i[0]||(i[0]=s=>o("change"))},null,40,pbt))}}),Cbt=ot(gbt,[["__scopeId","data-v-6a8c2252"]]),ybt={class:"bootstrap-styles rich-text-icon icon-hover d-flex"},bbt={key:0,class:"bootstrap-styles d-flex align-items-center ms-14 me-1"},vbt={for:"rich-text__retina-checkbox",class:"bootstrap-styles label__checkbox-input text-nowrap"},Tbt=Xe({__name:"ImageEditor",props:{editor:{},deps:{}},setup(t){const e=t,n={tooltip:xoe({localeKey:e.deps.localeKey}).tooltip,retinaLabel:xoe({localeKey:e.deps.localeKey}).retinaLabel},o=Exe.name,r=Vt({isAddImageSrcModalWindowShown:!1}),i=async()=>{const l=e.editor.view.state.selection.anchor,{src:u,width:c,height:d,isRetina:h}=e.editor.getAttributes(o);e.editor.chain().focus().updateAttributes("image",{src:u,width:c,height:d,isRetina:!h}).setNodeSelection(l).run()},s=l=>{const u=e.editor.view.state.selection.anchor;e.editor.isActive(o)?e.editor.chain().focus().updateAttributes("image",{src:l.src,width:l.width,height:l.height,alt:"img",isRetina:!1}).setNodeSelection(u).run():e.editor.chain().focus().setImage({src:l.src,width:l.width,height:l.height,alt:"img",isRetina:!1}).setNodeSelection(u).run(),r.isAddImageSrcModalWindowShown=!1},a=()=>{e.editor.commands.deleteSelection(),r.isAddImageSrcModalWindowShown=!1};return(l,u)=>(O(),J(rt,null,[Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button__image",{active:e.editor.isActive(z(o))}]),onClick:u[0]||(u[0]=c=>r.isAddImageSrcModalWindowShown=!r.isAddImageSrcModalWindowShown)},[_("i",ybt,[ie(hbt)])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]]),e.editor.isActive(z(o))?(O(),J("div",bbt,[ie(Cbt,{id:"rich-text__retina-checkbox",checked:e.editor.isActive(z(o),{isRetina:!0}),onChange:u[1]||(u[1]=()=>i())},null,8,["checked"]),_("label",vbt,Gt(n.retinaLabel),1)])):Ue("",!0),r.isAddImageSrcModalWindowShown?(O(),Ze(lbt,{key:1,isActive:e.editor.isActive(z(o)),src:e.editor.getAttributes(z(o)).src?e.editor.getAttributes(z(o)).src:"",width:e.editor.getAttributes(z(o)).width?e.editor.getAttributes(z(o)).width:0,height:e.editor.getAttributes(z(o)).height?e.editor.getAttributes(z(o)).height:0,isRetina:e.editor.getAttributes(z(o)).isRetina?e.editor.getAttributes(z(o)).isRetina:!1,deps:e.deps.addImageSrcModalWindowDeps,onOnRemoved:u[2]||(u[2]=()=>a()),onOnClosed:u[3]||(u[3]=c=>r.isAddImageSrcModalWindowShown=!1),onOnImageSrcChanged:u[4]||(u[4]=c=>s({src:c.src,width:c.width,height:c.height}))},null,8,["isActive","src","width","height","isRetina","deps"])):Ue("",!0)],64))}}),xbt=ot(Tbt,[["__scopeId","data-v-cf315655"]]),Fbt={},Sbt={xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"};function wbt(t,e){return O(),J("svg",Sbt,[...e[0]||(e[0]=[_("path",{d:"M5.83333 7.33317H8.83333C9.7538 7.33317 10.5 6.58698 10.5 5.6665C10.5 4.74603 9.7538 3.99984 8.83333 3.99984H5.83333V7.33317ZM12.5 10.3332C12.5 11.99 11.1569 13.3332 9.5 13.3332H4.5V2.6665H8.83333C10.4902 2.6665 11.8333 4.00965 11.8333 5.6665C11.8333 6.46938 11.5179 7.19857 11.0043 7.73704C11.8986 8.2563 12.5 9.2245 12.5 10.3332ZM5.83333 8.6665V11.9998H9.5C10.4205 11.9998 11.1667 11.2536 11.1667 10.3332C11.1667 9.4127 10.4205 8.6665 9.5 8.6665H5.83333Z",fill:"var(--black)"},null,-1)])])}const kbt=ot(Fbt,[["render",wbt]]),Ebt={tooltip:"Bold"},_bt={tooltip:"Полужирный"},Rbt=Xn({en:Ebt,ru:_bt}),Dbt={class:"bootstrap-styles d-flex rich-text-icon icon-hover"},Abt=Xe({__name:"FontWeightEditor",props:{editor:{},theme:{},isAllowToEdit:{type:Boolean},deps:{}},setup(t){const e=t,n={tooltip:Rbt({localeKey:e.deps.localeKey}).tooltip},o=q(()=>Iw({editor:e.editor,theme:e.theme,styleName:"fontWeight"})==="bold"),r=()=>{o.value?e.editor.chain().focus().unsetFontWeight().run():e.editor.chain().focus().setFontWeight("bold").run(),e.editor.commands.focus()};return(i,s)=>Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:o.value,disabled:!e.isAllowToEdit&&!o.value}]),onClick:s[0]||(s[0]=()=>r())},[_("i",Dbt,[ie(kbt)])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),Nbt=ot(Abt,[["__scopeId","data-v-0e22dbf6"]]),Bbt={},Lbt={xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"};function $bt(t,e){return O(),J("svg",Lbt,[...e[0]||(e[0]=[_("path",{d:"M11.9359 9.33317C12.0897 9.67724 12.1667 10.0594 12.1667 10.4796C12.1667 11.3748 11.8175 12.0742 11.1191 12.5778C10.4206 13.0814 9.45567 13.3332 8.22413 13.3332C7.13116 13.3332 6.0489 13.0788 4.97728 12.5702V11.0671C5.99025 11.652 7.0272 11.9445 8.08813 11.9445C9.78887 11.9445 10.6419 11.4562 10.6472 10.4796C10.6472 10.0624 10.5033 9.70637 10.2154 9.41137C10.1893 9.38464 10.1626 9.35857 10.1354 9.33317H2.5V7.99984H14.5V9.33317H11.9359ZM9.21733 7.33317H5.58605C5.47107 7.2287 5.36411 7.11264 5.26517 6.98504C4.97728 6.61373 4.83333 6.16356 4.83333 5.63455C4.83333 4.81052 5.14389 4.10984 5.76499 3.5325C6.38611 2.95516 7.34707 2.6665 8.64793 2.6665C9.62893 2.6665 10.5673 2.88522 11.4629 3.32268V4.75711C10.6632 4.29931 9.7862 4.07042 8.83187 4.07042C7.17913 4.07042 6.35278 4.59179 6.35278 5.63455C6.35278 5.91432 6.49806 6.15848 6.78862 6.36703C7.07919 6.57558 7.43773 6.74217 7.8642 6.86677C8.27767 6.98757 8.72873 7.14304 9.21733 7.33317Z",fill:"black"},null,-1)])])}const Vbt=ot(Bbt,[["render",$bt]]),Mbt={tooltip:"Strikethrough"},Obt={tooltip:"Зачеркнутый"},Ibt=Xn({en:Mbt,ru:Obt}),Pbt={class:"bootstrap-styles d-flex rich-text-icon icon-hover"},Wbt=Xe({__name:"LineThroughEditor",props:{editor:{},isAllowToEdit:{type:Boolean},theme:{},deps:{}},setup(t){const e=t,n={tooltip:Ibt({localeKey:e.deps.localeKey}).tooltip},o=q(()=>Iw({editor:e.editor,theme:e.theme,styleName:"textDecoration"})==="line-through"),r=()=>{o.value?e.editor.chain().focus().unsetTextDecoration().run():e.editor.chain().focus().setTextDecoration("line-through").run(),e.editor.commands.focus()};return(i,s)=>Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:o.value,disabled:!t.isAllowToEdit&&!o.value}]),onClick:s[0]||(s[0]=a=>r())},[_("i",Pbt,[ie(Vbt)])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),Hbt=ot(Wbt,[["__scopeId","data-v-fffc32ef"]]),zbt={},jbt={xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"};function Ubt(t,e){return O(),J("svg",jbt,[...e[0]||(e[0]=[_("path",{d:"M5.83366 2V8C5.83366 9.47273 7.02757 10.6667 8.50033 10.6667C9.97306 10.6667 11.167 9.47273 11.167 8V2H12.5003V8C12.5003 10.2091 10.7095 12 8.50033 12C6.29119 12 4.50033 10.2091 4.50033 8V2H5.83366ZM3.16699 13.3333H13.8337V14.6667H3.16699V13.3333Z",fill:"black"},null,-1)])])}const Kbt=ot(zbt,[["render",Ubt]]),qbt={tooltip:"Underline"},Jbt={tooltip:"Подчеркнутый"},Gbt=Xn({en:qbt,ru:Jbt}),Ybt={class:"bootstrap-styles d-flex rich-text-icon icon-hover"},Xbt=Xe({__name:"UnderlineEditor",props:{editor:{},isAllowToEdit:{type:Boolean},theme:{},deps:{}},setup(t){const e=t,n={tooltip:Gbt({localeKey:e.deps.localeKey}).tooltip},o=q(()=>Iw({editor:e.editor,theme:e.theme,styleName:"textDecoration"})==="underline"),r=()=>{o.value?e.editor.chain().focus().unsetTextDecoration().run():e.editor.chain().focus().setTextDecoration("underline").run()};return(i,s)=>Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:o.value,disabled:!t.isAllowToEdit&&!o.value}]),onClick:s[0]||(s[0]=()=>r())},[_("i",Ybt,[ie(Kbt)])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),Qbt=ot(Xbt,[["__scopeId","data-v-ae63be68"]]),Zbt={},evt={xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"};function tvt(t,e){return O(),J("svg",evt,[...e[0]||(e[0]=[_("path",{d:"M10.4998 13.3332H5.1665V11.9998H7.11758L8.52817 3.99984H6.49984V2.6665H11.8332V3.99984H9.8821L8.4715 11.9998H10.4998V13.3332Z",fill:"black"},null,-1)])])}const nvt=ot(Zbt,[["render",tvt]]),ovt={tooltip:"Italic"},rvt={tooltip:"Курсив"},ivt=Xn({en:ovt,ru:rvt}),svt={class:"bootstrap-styles d-flex rich-text-icon icon-hover"},avt=Xe({__name:"FontStyleEditor",props:{editor:{},isAllowToEdit:{type:Boolean},theme:{},deps:{}},setup(t){const e=t,n={tooltip:ivt({localeKey:e.deps.localeKey}).tooltip},o=q(()=>Iw({editor:e.editor,theme:e.theme,styleName:"fontStyle"})==="italic"),r=()=>{o.value?e.editor.chain().focus().unsetFontStyle().run():e.editor.chain().focus().setFontStyle("italic").run(),e.editor.commands.focus()};return(i,s)=>Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:o.value,disabled:!t.isAllowToEdit&&!o.value}]),onClick:s[0]||(s[0]=()=>r())},[_("i",svt,[ie(nvt)])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),lvt=ot(avt,[["__scopeId","data-v-ac6b2276"]]),uvt={},cvt={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function dvt(t,e){return O(),J("svg",cvt,[...e[0]||(e[0]=[_("path",{d:"M7.49699 9.99999H3.16912L1.83578 13.3333H0.399734L4.6664 2.66666H5.99973L10.2664 13.3333H8.83033L7.49699 9.99999ZM6.96366 8.66666L5.33307 4.5901L3.70245 8.66666H6.96366ZM13.9997 8.35672V7.99999H15.3331V13.3333H13.9997V12.9766C13.6075 13.2035 13.1521 13.3333 12.6664 13.3333C11.1937 13.3333 9.99973 12.1394 9.99973 10.6667C9.99973 9.19392 11.1937 7.99999 12.6664 7.99999C13.1521 7.99999 13.6075 8.12986 13.9997 8.35672ZM12.6664 12C13.4028 12 13.9997 11.4031 13.9997 10.6667C13.9997 9.93026 13.4028 9.33332 12.6664 9.33332C11.93 9.33332 11.3331 9.93026 11.3331 10.6667C11.3331 11.4031 11.93 12 12.6664 12Z",fill:"black"},null,-1)])])}const hvt=ot(uvt,[["render",dvt]]),mvt={tooltip:"Uppercase"},fvt={tooltip:"Заглавные"},pvt=Xn({en:mvt,ru:fvt}),gvt={class:"bootstrap-styles d-flex rich-text-icon icon-hover"},Cvt=Xe({__name:"TextTransformEditor",props:{editor:{},isAllowToEdit:{type:Boolean},theme:{},deps:{}},setup(t){const e=t,n={tooltip:pvt({localeKey:e.deps.localeKey}).tooltip},o=Txe.name,r=q(()=>e.editor.isActive({[o]:"uppercase"})),i=()=>{r.value?e.editor.commands.unsetTextTransform():e.editor.commands.setTextTransform("uppercase"),e.editor.commands.focus()};return(s,a)=>Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:e.editor.isActive({[z(o)]:"uppercase"}),disabled:!t.isAllowToEdit&&!e.editor.isActive({[z(o)]:"uppercase"})}]),onClick:a[0]||(a[0]=l=>i())},[_("i",gvt,[ie(hvt)])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),yvt=ot(Cvt,[["__scopeId","data-v-20dea8b8"]]),bvt={},vvt={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Tvt(t,e){return O(),J("svg",vvt,[...e[0]||(e[0]=[_("path",{d:"M12.2432 8.47094C13.5449 7.16921 13.5449 5.05865 12.2432 3.75691C10.9414 2.45516 8.83086 2.45516 7.52912 3.75691L6.58631 4.69972L5.6435 3.75691L6.58631 2.8141C8.40879 0.991654 11.3635 0.991654 13.186 2.8141C15.0084 4.63655 15.0084 7.59134 13.186 9.41374L12.2432 8.47094ZM9.41472 13.185C7.59232 15.0075 4.63752 15.0075 2.81508 13.185C0.99263 11.3625 0.99263 8.40781 2.81508 6.58533L3.75788 5.64253L4.70069 6.58533L3.75788 7.52814C2.45614 8.82987 2.45614 10.9405 3.75788 12.2422C5.05963 13.5439 7.17019 13.5439 8.47192 12.2422L9.41472 13.185ZM9.88612 5.17112L10.8289 6.11393L6.1149 10.828L5.1721 9.88514L9.88612 5.17112Z",fill:"#2F2F2F"},null,-1),_("path",{d:"M14.714 13.7712L13.2998 12.357L14.714 10.9428L13.7712 10L12.357 11.4142L10.9428 10L10 10.9428L11.4142 12.357L10 13.7712L10.9428 14.714L12.357 13.2998L13.7712 14.714L14.714 13.7712Z",fill:"#2F2F2F"},null,-1)])])}const xvt=ot(bvt,[["render",Tvt]]),Fvt={tooltip:"Unsubscribe link"},Svt={tooltip:"Ссылка на отписку"},wvt=Xn({en:Fvt,ru:Svt}),kvt={class:"bootstrap-styles d-flex rich-text-icon icon-hover"},Evt=Xe({__name:"UnsubscribeLinkEditor",props:{editor:{},isAllowToEdit:{type:Boolean},theme:{},deps:{}},setup(t){const e=t,n={tooltip:wvt({localeKey:e.deps.localeKey}).tooltip},o=cU.name,r=R8.name,i=q(()=>e.editor.isActive(r)),s=()=>{i.value&&e.editor.commands.unsetLink(),e.editor.isActive(o)?e.editor.chain().unsetUnsubscribeLink().applySiblingNodeThemeSettings().run():e.editor.chain().setUnsubscribeLink().setThemeSettings("Link").run()};return(a,l)=>Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:e.editor.isActive(z(o)),disabled:!e.editor.isActive(z(o))&&!e.isAllowToEdit}]),onClick:l[0]||(l[0]=()=>s())},[_("i",kvt,[ie(xvt)])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),_vt=ot(Evt,[["__scopeId","data-v-9ee287d3"]]),Rvt={},Dvt={xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"};function Avt(t,e){return O(),J("svg",Dvt,[...e[0]||(e[0]=[_("path",{d:"M6.16699 4.66667C6.16699 3.93029 5.57004 3.33333 4.83366 3.33333C4.09728 3.33333 3.50033 3.93029 3.50033 4.66667C3.50033 5.40305 4.09728 6 4.83366 6C5.57004 6 6.16699 5.40305 6.16699 4.66667ZM7.50033 4.66667C7.50033 6.13943 6.30642 7.33333 4.83366 7.33333C3.3609 7.33333 2.16699 6.13943 2.16699 4.66667C2.16699 3.19391 3.3609 2 4.83366 2C6.30642 2 7.50033 3.19391 7.50033 4.66667ZM14.5003 2.66667H9.16699V4H14.5003V2.66667ZM14.5003 7.33333H9.16699V8.66667H14.5003V7.33333ZM14.5003 12H9.16699V13.3333H14.5003V12ZM4.83366 12.6667C4.09728 12.6667 3.50033 12.0697 3.50033 11.3333C3.50033 10.5969 4.09728 10 4.83366 10C5.57004 10 6.16699 10.5969 6.16699 11.3333C6.16699 12.0697 5.57004 12.6667 4.83366 12.6667ZM4.83366 14C6.30642 14 7.50033 12.8061 7.50033 11.3333C7.50033 9.8606 6.30642 8.66667 4.83366 8.66667C3.3609 8.66667 2.16699 9.8606 2.16699 11.3333C2.16699 12.8061 3.3609 14 4.83366 14Z",fill:"black"},null,-1)])])}const Nvt=ot(Rvt,[["render",Avt]]),Bvt={tooltip:"Bullet list"},Lvt={tooltip:"Маркированный список"},$vt=Xn({en:Bvt,ru:Lvt}),Vvt={class:"bootstrap-styles d-flex rich-text-icon icon-hover"},Mvt=Xe({__name:"BulletListEditor",props:{editor:{},deps:{}},setup(t){const e=t,n={tooltip:$vt({localeKey:e.deps.localeKey}).tooltip},o=D8.name,r=()=>{e.editor.chain().focus().toggleBulletList().run()};return(i,s)=>Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:e.editor.isActive(z(o))}]),onClick:s[0]||(s[0]=()=>r())},[_("i",Vvt,[ie(Nvt)])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),Ovt=ot(Mvt,[["__scopeId","data-v-c64632e3"]]),Ivt={},Pvt={xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"};function Wvt(t,e){return O(),J("svg",Pvt,[...e[0]||(e[0]=[_("path",{d:"M4.33382 2.33301H3.64521L2.66699 2.59512V3.63022L3.33367 3.45155L3.33378 5.66634H2.50033V6.66634H5.16699V5.66634H4.33382V2.33301ZM7.16699 2.66634H14.5003V3.99967H7.16699V2.66634ZM7.16699 7.33301H14.5003V8.66634H7.16699V7.33301ZM7.16699 11.9997H14.5003V13.333H7.16699V11.9997ZM2.41699 10.4163C2.41699 9.63394 3.05125 8.99967 3.83366 8.99967C4.61607 8.99967 5.25033 9.63394 5.25033 10.4163C5.25033 10.7401 5.14155 11.0388 4.95864 11.2775L4.95547 11.2816L4.04424 12.333H5.16699V13.333H2.50041L2.50005 12.5854L4.14813 10.6897C4.21186 10.6165 4.25033 10.5211 4.25033 10.4163C4.25033 10.1862 4.06378 9.99967 3.83366 9.99967C3.61618 9.99967 3.43748 10.1664 3.41864 10.3789L3.41039 10.583H2.41699V10.4163Z",fill:"black"},null,-1)])])}const Hvt=ot(Ivt,[["render",Wvt]]),zvt={tooltip:"Ordered list"},jvt={tooltip:"Нумерованный список"},Uvt=Xn({en:zvt,ru:jvt}),Kvt={class:"bootstrap-styles d-flex rich-text-icon icon-hover"},qvt=Xe({__name:"OrderedListEditor",props:{editor:{},deps:{}},setup(t){const e=t,n={tooltip:Uvt({localeKey:e.deps.localeKey}).tooltip},o=N8.name,r=()=>{e.editor.chain().focus().toggleOrderedList().run()};return(i,s)=>Ot((O(),J("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:e.editor.isActive(z(o))}]),onClick:s[0]||(s[0]=()=>r())},[_("i",Kvt,[ie(Hvt)])],2)),[[z(Vo),{title:n.tooltip,placement:"top"}]])}}),Jvt=ot(qvt,[["__scopeId","data-v-aaa43948"]]),Gvt={},Yvt={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Xvt(t,e){return O(),J("svg",Yvt,[...e[0]||(e[0]=[_("path",{d:"M14 13.9995H2V12.6665H14V13.9995ZM14 10.6665H2V9.3335H14V10.6665ZM4.29102 7.3335H2.00684V5.99951H4.29102V7.3335ZM10.4434 7.3335H5.55664V2.68896H10.4434V7.3335ZM14 7.3335H11.7158V5.99951H14V7.3335ZM4.29102 3.99951H2.00684V2.6665H4.29102V3.99951ZM14 3.99951H11.7158V2.6665H14V3.99951Z",fill:"var(--black)"},null,-1)])])}const Foe=ot(Gvt,[["render",Xvt]]),Qvt={},Zvt={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function e1t(t,e){return O(),J("svg",Zvt,[...e[0]||(e[0]=[_("path",{d:"M14 13.9995H2V12.6665H14V13.9995ZM10.4434 10.6548H5.55664V6.01123H10.4434V10.6548ZM4.29102 10.6245H2.00684V9.29053H4.29102V10.6245ZM14 10.6245H11.7158V9.29053H14V10.6245ZM4.29102 7.29053H2.00684V5.95752H4.29102V7.29053ZM14 7.29053H11.7158V5.95752H14V7.29053Z",fill:"var(--black)"},null,-1),_("path",{d:"M14 2.6665H2V3.99984H14V2.6665Z",fill:"var(--black)"},null,-1)])])}const Soe=ot(Qvt,[["render",e1t]]),t1t={},n1t={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function o1t(t,e){return O(),J("svg",n1t,[...e[0]||(e[0]=[_("path",{d:"M14 2.6665H2V3.99951H14V2.6665ZM14 5.99951H2V7.33252H14V5.99951ZM4.29102 9.33252H2.00684V10.6665H4.29102V9.33252ZM10.4434 9.33252H5.55664V13.9771H10.4434V9.33252ZM14 9.33252H11.7158V10.6665H14V9.33252ZM4.29102 12.6665H2.00684V13.9995H4.29102V12.6665ZM14 12.6665H11.7158V13.9995H14V12.6665Z",fill:"var(--black)"},null,-1)])])}const woe=ot(t1t,[["render",o1t]]),r1t={},i1t={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function s1t(t,e){return O(),J("svg",i1t,[...e[0]||(e[0]=[_("path",{d:"M14 11.9775H2V10.6445H14V11.9775ZM4.29102 8.64453H2.00684V7.31055H4.29102V8.64453ZM10.4434 8.64453H5.55664V4H10.4434V8.64453ZM14 8.64453H11.7158V7.31055H14V8.64453Z",fill:"var(--black)"},null,-1)])])}const koe=ot(r1t,[["render",s1t]]),a1t={tooltip:"Vertical image alignment"},l1t={tooltip:"Выравнивание картинок по вертикали"},u1t=Xn({en:a1t,ru:l1t}),c1t={class:"bootstrap-styles vertical-align-editor dropdown rounded"},d1t={class:"bootstrap-styles rich-text-icon icon-hover d-flex justify-content-center align-items-center"},h1t={class:"bootstrap-styles rich-text-icon icon-hover d-flex justify-content-center align-items-center"},m1t={class:"bootstrap-styles rich-text-icon icon-hover d-flex justify-content-center align-items-center"},f1t={class:"bootstrap-styles rich-text-icon icon-hover d-flex justify-content-center align-items-center"},p1t={class:"bootstrap-styles rich-text-icon icon-hover d-flex justify-content-center align-items-center"},g1t=Xe({__name:"VerticalAlignEditor",props:{editor:{},currentVerticalAlign:{},deps:{}},emits:["onVerticalAlignVariantChanged"],setup(t,{emit:e}){const n=t,o={tooltip:u1t({localeKey:n.deps.localeKey}).tooltip},r=Vt({isOpened:!1}),i=a=>{s("onVerticalAlignVariantChanged",a),r.isOpened=!1},s=e;return(a,l)=>Ot((O(),J("div",c1t,[_("button",{id:"richTextDropdownVerticalAlign",class:$e(["bootstrap-styles p-1 rounded rich-text-button",{show:r.isOpened}]),type:"button",onClick:l[0]||(l[0]=u=>r.isOpened=!r.isOpened)},[_("i",d1t,[n.currentVerticalAlign==="Baseline"?(O(),Ze(koe,{key:0})):Ue("",!0),n.currentVerticalAlign==="Top"?(O(),Ze(Foe,{key:1})):Ue("",!0),n.currentVerticalAlign==="Middle"?(O(),Ze(Soe,{key:2})):Ue("",!0),n.currentVerticalAlign==="Bottom"?(O(),Ze(woe,{key:3})):Ue("",!0)])],2),_("div",{class:$e([{show:r.isOpened},"bootstrap-styles vertical-align-dropdown bg-white p-1"]),"aria-labelledby":"richTextDropdownVerticalAlign"},[_("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button me-14",{active:n.currentVerticalAlign==="Baseline"}]),onClick:l[1]||(l[1]=()=>i("Baseline"))},[_("i",h1t,[ie(koe)])],2),_("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button me-14",{active:n.currentVerticalAlign==="Top"}]),onClick:l[2]||(l[2]=()=>i("Top"))},[_("i",m1t,[ie(Foe)])],2),_("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button me-14",{active:n.currentVerticalAlign==="Middle"}]),onClick:l[3]||(l[3]=()=>i("Middle"))},[_("i",f1t,[ie(Soe)])],2),_("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:n.currentVerticalAlign==="Bottom"}]),onClick:l[4]||(l[4]=()=>i("Bottom"))},[_("i",p1t,[ie(woe)])],2)],2)])),[[z(Km),()=>r.isOpened=!1],[z(Vo),{title:o.tooltip,placement:"top"}]])}}),C1t=ot(g1t,[["__scopeId","data-v-4a636ae8"]]),y1t={},b1t={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function v1t(t,e){return O(),J("svg",b1t,[...e[0]||(e[0]=[_("path",{d:"M2 2.6665H14V3.99984H2V2.6665ZM2 12.6665H11.3333V13.9998H2V12.6665ZM2 9.33317H14V10.6665H2V9.33317ZM2 5.99984H11.3333V7.33317H2V5.99984Z",fill:"var(--black)"},null,-1)])])}const Eoe=ot(y1t,[["render",v1t]]),T1t={},x1t={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function F1t(t,e){return O(),J("svg",x1t,[...e[0]||(e[0]=[_("path",{d:"M2 2.6665H14V3.99984H2V2.6665ZM3.33333 12.6665H12.6667V13.9998H3.33333V12.6665ZM2 9.33317H14V10.6665H2V9.33317ZM3.33333 5.99984H12.6667V7.33317H3.33333V5.99984Z",fill:"var(--black)"},null,-1)])])}const _oe=ot(T1t,[["render",F1t]]),S1t={},w1t={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function k1t(t,e){return O(),J("svg",w1t,[...e[0]||(e[0]=[_("path",{d:"M2 2.6665H14V3.99984H2V2.6665ZM4.66667 12.6665H14V13.9998H4.66667V12.6665ZM2 9.33317H14V10.6665H2V9.33317ZM4.66667 5.99984H14V7.33317H4.66667V5.99984Z",fill:"var(--black)"},null,-1)])])}const Roe=ot(S1t,[["render",k1t]]),E1t={tooltip:"Alignment"},_1t={tooltip:"Выравнивание"},R1t=Xn({en:E1t,ru:_1t}),D1t={class:"bootstrap-styles content-align-editor dropdown rounded"},A1t={class:"bootstrap-styles rich-text-icon icon-hover d-flex justify-content-center align-items-center"},N1t={class:"bootstrap-styles rich-text-icon icon-hover d-flex justify-content-center align-items-center"},B1t={class:"bootstrap-styles rich-text-icon icon-hover d-flex justify-content-center align-items-center"},L1t={class:"bootstrap-styles rich-text-icon icon-hover d-flex justify-content-center align-items-center"},$1t=Xe({__name:"ContentAlignEditor",props:{editor:{},currentContentAlign:{},deps:{}},emits:["onContentAlignVariantChanged"],setup(t,{emit:e}){const n=t,o={tooltip:R1t({localeKey:n.deps.localeKey}).tooltip},r=Vt({isOpened:!1}),i=a=>{s("onContentAlignVariantChanged",a),r.isOpened=!1},s=e;return(a,l)=>Ot((O(),J("div",D1t,[_("button",{id:"richTextDropdownContentAlign",class:$e(["bootstrap-styles p-1 rounded rich-text-button",{show:r.isOpened}]),type:"button",onClick:l[0]||(l[0]=u=>r.isOpened=!r.isOpened)},[_("i",A1t,[n.currentContentAlign==="Left"?(O(),Ze(Eoe,{key:0})):Ue("",!0),n.currentContentAlign==="Center"?(O(),Ze(_oe,{key:1})):Ue("",!0),n.currentContentAlign==="Right"?(O(),Ze(Roe,{key:2})):Ue("",!0)])],2),_("div",{class:$e([{show:r.isOpened},"bootstrap-styles content-align-dropdown bg-white p-1"]),"aria-labelledby":"richTextDropdownContentAlign"},[_("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button me-14",{active:n.currentContentAlign==="Left"}]),onClick:l[1]||(l[1]=()=>i("Left"))},[_("i",N1t,[ie(Eoe)])],2),_("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button me-14",{active:n.currentContentAlign==="Center"}]),onClick:l[2]||(l[2]=()=>i("Center"))},[_("i",B1t,[ie(_oe)])],2),_("button",{class:$e(["bootstrap-styles p-1 rounded rich-text-button",{active:n.currentContentAlign==="Right"}]),onClick:l[3]||(l[3]=()=>i("Right"))},[_("i",L1t,[ie(Roe)])],2)],2)])),[[z(Km),()=>r.isOpened=!1],[z(Vo),{title:o.tooltip,placement:"top"}]])}}),V1t=ot($1t,[["__scopeId","data-v-c8a15233"]]),M1t={class:"bootstrap-styles rich-text-toolbar d-flex align-items-center border gap-1 p-1"},O1t={key:2,class:"bootstrap-styles position-relative h-100"},I1t={key:3,class:"bootstrap-styles position-relative h-100"},P1t={key:4,class:"bootstrap-styles d-flex justify-content-center align-items-center"},W1t={key:7,class:"vl"},H1t={key:13,class:"vl"},z1t={key:16,class:"vl"},j1t=Xe({__name:"RichTextToolbar",props:{editor:{},deps:{},element:{},theme:{},initialThemeName:{}},emits:["onVerticalAlignVariantChanged","onContentAlignVariantChanged"],setup(t,{emit:e}){const n=t,o=n.deps.richTextToolbarPlugins,r=q(()=>{const{from:a,to:l}=n.editor.state.selection;return a!==l}),i=q(()=>n.editor.isActive("image")),s=e;return(a,l)=>(O(),J("div",M1t,[i.value?Ue("",!0):(O(),Ze(u0t,{key:0,editor:n.editor,theme:n.theme,isAllowToEdit:r.value,initialThemeName:n.initialThemeName,deps:n.deps.themeSettingsSelectorDeps},null,8,["editor","theme","isAllowToEdit","initialThemeName","deps"])),i.value?Ue("",!0):(O(),Ze(Byt,{key:1,theme:n.theme,editor:n.editor,isAllowToEdit:r.value,deps:n.deps.fontFamilySelectorDeps},null,8,["theme","editor","isAllowToEdit","deps"])),i.value?Ue("",!0):(O(),J("div",O1t,[ie(e0t,{editor:n.editor,theme:n.theme,deps:n.deps.fontSizeEditorDeps,class:$e({disabled:!r.value})},null,8,["editor","theme","deps","class"])])),i.value?Ue("",!0):(O(),J("div",I1t,[ie(S0t,{editor:n.editor,theme:n.theme,deps:n.deps.lineHeightEditorDeps,class:$e({disabled:!r.value})},null,8,["editor","theme","deps","class"])])),i.value?Ue("",!0):(O(),J("div",P1t,[ie(Tyt,{editor:n.editor,theme:n.theme,isAllowToEdit:r.value,deps:n.deps.colorPickerDeps},null,8,["editor","theme","isAllowToEdit","deps"])])),i.value?(O(),Ze(C1t,{key:5,currentVerticalAlign:n.element.ImageVerticalAlign,editor:n.editor,deps:n.deps.verticalAlignEditorDeps,onOnVerticalAlignVariantChanged:l[0]||(l[0]=u=>s("onVerticalAlignVariantChanged",u))},null,8,["currentVerticalAlign","editor","deps"])):Ue("",!0),i.value?Ue("",!0):(O(),Ze(V1t,{key:6,editor:n.editor,currentContentAlign:n.element.ContentAlign,deps:n.deps.contentAlignEditorDeps,class:$e({"bootstrap-styles me-14":i.value}),onOnContentAlignVariantChanged:l[1]||(l[1]=u=>s("onContentAlignVariantChanged",u))},null,8,["editor","currentContentAlign","deps","class"])),i.value?Ue("",!0):(O(),J("div",W1t)),i.value?Ue("",!0):(O(),Ze(Nbt,{key:8,editor:n.editor,theme:n.theme,isAllowToEdit:r.value,deps:n.deps.fontWeightEditorDeps},null,8,["editor","theme","isAllowToEdit","deps"])),i.value?Ue("",!0):(O(),Ze(lvt,{key:9,editor:n.editor,theme:n.theme,isAllowToEdit:r.value,deps:n.deps.fontStyleEditorDeps},null,8,["editor","theme","isAllowToEdit","deps"])),i.value?Ue("",!0):(O(),Ze(Hbt,{key:10,editor:n.editor,theme:n.theme,isAllowToEdit:r.value,deps:n.deps.lineThroughEditorDeps},null,8,["editor","theme","isAllowToEdit","deps"])),i.value?Ue("",!0):(O(),Ze(Qbt,{key:11,editor:n.editor,theme:n.theme,isAllowToEdit:r.value,deps:n.deps.underlineEditorDeps},null,8,["editor","theme","isAllowToEdit","deps"])),i.value?Ue("",!0):(O(),Ze(yvt,{key:12,editor:n.editor,theme:n.theme,isAllowToEdit:r.value,deps:n.deps.textTransformEditorDeps},null,8,["editor","theme","isAllowToEdit","deps"])),i.value?Ue("",!0):(O(),J("div",H1t)),i.value?Ue("",!0):(O(),Ze(Ovt,{key:14,editor:n.editor,deps:n.deps.bulletListEditorDeps},null,8,["editor","deps"])),i.value?Ue("",!0):(O(),Ze(Jvt,{key:15,editor:n.editor,deps:n.deps.orderedListEditorDeps},null,8,["editor","deps"])),i.value?Ue("",!0):(O(),J("div",z1t)),ie(Q0t,{editor:n.editor,isAllowToEdit:r.value,deps:n.deps.linkEditorDeps},null,8,["editor","isAllowToEdit","deps"]),ie(_vt,{editor:n.editor,theme:n.theme,isAllowToEdit:r.value,deps:n.deps.unsubscribeLinkEditorDeps},null,8,["editor","theme","isAllowToEdit","deps"]),ie(xbt,{editor:n.editor,deps:n.deps.imageEditorDeps},null,8,["editor","deps"]),(O(!0),J(rt,null,$n(z(o),(u,c)=>(O(),J("span",{key:c,class:"bootstrap-styles d-none"},[(O(),Ze(MD(u),{editor:n.editor},null,8,["editor"]))]))),128))]))}}),U1t=ot(j1t,[["__scopeId","data-v-a50ebd1e"]]),K1t=t=>({Match:e=>{switch(t){case"Baseline":return e.whenBaseline();case"Top":return e.whenTop();case"Middle":return e.whenMiddle();case"Bottom":return e.whenBottom();default:return ta(t)}}}),q1t=t=>K1t(t.verticalAlign).Match({whenBaseline:()=>"baseline",whenTop:()=>"top",whenMiddle:()=>"middle",whenBottom:()=>"bottom"}),Doe="NormalText",J1t=Xe({__name:"RichText",props:{deps:{},theme:{},element:{},isSelected:{type:Boolean}},emits:["onRichTextUpdated","onRichTextRemoved","onElementClicked"],setup(t,{emit:e}){Im(y=>({v23f1e660:n.theme.Colors.PrimaryColor,v70d14324:n.theme.Colors.SecondaryColor,v86efc29a:n.theme.Colors.PrimaryTextColor,bd12407e:n.theme.Colors.SecondaryTextColor,v25ddb634:n.theme.Colors.CardBackgroundColor,v861d4a36:n.theme.Colors.ButtonTextColor,v4b55838a:n.theme.Colors.TitleColor,v6a651340:n.theme.Colors.HeadingColor,v20b920a2:n.theme.Colors.SubHeadingColor,b378654c:n.theme.Colors.LargeTextColor,efdd3e60:n.theme.Colors.NormalTextColor,v48387a79:n.theme.Colors.DescriptionTextColor,v244e47ec:n.theme.Colors.LinkColor,v5e83a710:n.theme.Colors.EmailBackgroundColor,cd4dc93c:n.theme.Colors.BodyColor,v361cd101:f.value}));const n=t,o=Vt({isRemoveComponentWindowShown:!1,isEditing:!1}),r={removeWindowTitle:goe({localeKey:n.deps.localeKey}).removeWindowTitle,removeWindowDescription:goe({localeKey:n.deps.localeKey}).removeWindowDescription},i=pn(null),s=pn(null),{floatingStyles:a}=B0e(s,i,{placement:"top",whileElementsMounted:D0e,middleware:[A0e(10)]}),l=q(()=>{const y=a.value.transform??"translate(0px, 0px)",b=new DOMMatrix(y).m42;return{...a.value,left:"50%",transform:`translate(-50%, ${b}px)`}}),u=pV(),c=q(()=>us({fontFamily:n.theme.FontFamily,themeFontSettings:n.theme.FontSettingsPresets.NormalText,themeColor:n.theme.Colors.NormalTextColor})),d=q(()=>{const y={...aU(c.value)};return{fontSize:y.fontSize,lineHeight:y.lineHeight,fontFamily:y.fontFamily,fontWeight:y.fontWeight,fontStyle:y.fontStyle,color:y.color}}),h=Nat({content:Coe(n.element.Text),extensions:[...ryt({dataSourceFieldNameDelegate:n.deps.dataSourceFieldNameDelegate,initialThemeName:Doe,themeColors:n.theme.Colors})],editable:o.isEditing,autofocus:"all",onUpdate:({editor:y})=>{if(!o.isEditing)return;const b=iyt({editor:y});g("onRichTextUpdated",{...n.element,Text:b})}}),m=()=>{h.value&&(h.value.chain().focus().undo().run(),o.isRemoveComponentWindowShown=!1)},f=q(()=>q1t({verticalAlign:n.element.ImageVerticalAlign})),p=()=>[document.querySelector(".rich-text-toolbar"),document.querySelector(".string-expression-builder-modal-window"),document.querySelector(`.rich-text-editor__content-${u}`)];an(()=>n.element.Text,()=>{h.value&&!o.isEditing&&h.value.commands.setContent(Coe(n.element.Text))});const g=e;return(y,b)=>Ot((O(),J("span",{ref_key:"richTextElementRef",ref:s,class:$e(["RichText cursor-pointer user-select-none",{selected:n.isSelected}]),style:he([z(bb)({contentAlign:n.element.ContentAlign}),{...d.value,minHeight:n.element.MinHeight+"px"}]),onClick:b[4]||(b[4]=zo(()=>{g("onElementClicked"),o.isEditing=!0,z(h)&&z(h).setEditable(!0)},["prevent"]))},[ie(z(Aat),{class:$e(["rich-text-editor__content",`rich-text-editor__content-${z(u)}`]),editor:z(h)},null,8,["class","editor"]),z(h)&&o.isEditing?(O(),Ze(U1t,{key:0,ref_key:"richTextToolbarRef",ref:i,editor:z(h),deps:n.deps.richTextToolbarDeps,element:n.element,theme:n.theme,initialThemeName:Doe,style:he(l.value),onOnVerticalAlignVariantChanged:b[0]||(b[0]=F=>g("onRichTextUpdated",{...n.element,ImageVerticalAlign:F})),onOnContentAlignVariantChanged:b[1]||(b[1]=F=>g("onRichTextUpdated",{...n.element,ContentAlign:F}))},null,8,["editor","deps","element","theme","style"])):Ue("",!0),(O(),Ze(m9,{to:"#app"},[o.isRemoveComponentWindowShown?(O(),Ze(vCt,{key:0,deps:n.deps.removeConfirmModalWindowDeps,headerText:r.removeWindowTitle,onCancel:b[2]||(b[2]=()=>m()),onConfirmed:b[3]||(b[3]=()=>{o.isRemoveComponentWindowShown=!1,g("onRichTextRemoved")})},{"body-content":Tu(()=>[U0(Gt(r.removeWindowDescription),1)]),_:1},8,["deps","headerText"])):Ue("",!0)]))],6)),[[z(Km),{handler:()=>{o.isEditing=!1,z(h)&&z(h).setEditable(!1)},include:p}]])}}),G1t=ot(J1t,[["__scopeId","data-v-ed6b2a5a"]]),Y1t=Xe({__name:"UnsubscribeLink",props:{theme:{},element:{}},emits:["onElementClicked"],setup(t,{emit:e}){const n=t,o=q(()=>{const i=lU({fontFamily:n.theme.FontFamily,fontStyle:n.element.Style,themeDefinedFontSettings:n.theme.FontSettingsPresets,themeColors:n.theme.Colors});return{...aU(i)}}),r=e;return(i,s)=>(O(),J("a",{href:"#",class:"cursor-pointer user-select-none",style:he([{margin:"0"},[o.value,z(bb)({contentAlign:n.element.ContentAlign})]]),onClick:s[0]||(s[0]=zo(()=>r("onElementClicked"),["prevent"]))},Gt(n.element.Text),5))}}),X1t=ot(Y1t,[["__scopeId","data-v-68ed9754"]]),Q1t=["src","alt"],Z1t={class:"bootstrap-styles position-absolute top-0 left-0",width:"100%",style:{"border-spacing":"0","border-collapse":"collapse",width:"100%",height:"100%"}},eTt={key:0},tTt=["align"],nTt={style:{width:"auto","border-spacing":"0","border-collapse":"separate"}},oTt={align:"center",style:{width:"auto"}},rTt={key:0},iTt={key:1},sTt=["align"],aTt={style:{width:"auto","border-spacing":"0","border-collapse":"separate"}},lTt={align:"center",style:{width:"auto"}},uTt={key:2},cTt=["align"],dTt={style:{width:"auto","border-spacing":"0","border-collapse":"separate"}},hTt={align:"center",style:{width:"auto"}},mTt={key:3},fTt=["align"],pTt={style:{width:"auto","border-spacing":"0","border-collapse":"separate"}},gTt={align:"center",style:{width:"auto"}},CTt=Xe({__name:"BackgroundImage",props:{deps:{},theme:{},element:{},context:{type:[String,Number,Boolean,Array,Object]},path:{},selectedElementPath:{}},emits:["onImageOriginalSizeAdjusted","onImageSizeAdjusted","onElementClicked","onElementUpdatedEvent","onElementRemoved","onElementWrapperClicked"],setup(t,{emit:e}){const n=t,o=Vt({src:"",href:"",isLoaded:!1}),r=async s=>n.deps.stringExpressionEvaluator({stringExpression:s,context:n.context});(async()=>(o.src=await r(n.element.Src),o.href=await r(n.element.HRef),o.isLoaded=!0))();const i=e;return(s,a)=>o.isLoaded?(O(),J("table",{key:0,class:"bootstrap-styles position-relative",style:he([{"border-spacing":"0","border-collapse":"separate"},{width:"100%"}]),onClick:a[20]||(a[20]=zo(()=>i("onElementWrapperClicked"),["prevent"]))},[_("tbody",null,[_("tr",null,[_("td",{align:"center",style:he([{height:n.element.AdjustedHeight+"px",verticalAlign:"top"}])},[Ot(_("img",{src:o.src,alt:o.src,style:{"max-width":"100%"}},null,8,Q1t),[[z(fS),({width:l,height:u})=>{i("onImageSizeAdjusted",{Path:n.path,AdjustedHeight:u,AdjustedWidth:l}),o.isLoaded=!0}]]),_("table",Z1t,[_("tbody",null,[n.element.TopElementList.List.length>0&&n.element.TopElementList.Direction==="Vertical"?(O(),J("tr",eTt,[_("td",{valign:"top",align:z($c)({containerAlign:n.element.TopElementList.ContentAlign})},[_("table",nTt,[_("tbody",null,[_("tr",null,[_("td",{style:he({height:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)]),(O(!0),J(rt,null,$n(n.element.TopElementList.List,(l,u)=>(O(),J(rt,{key:u},[_("tr",null,[n.element.TopElementList.ContentAlign==="Left"?(O(),J("td",{key:0,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0),_("td",oTt,[ie(xl,{deps:n.deps,theme:n.theme,element:l,path:[...n.path,"TopElementList","List",u],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageSizeAdjusted:a[0]||(a[0]=c=>i("onImageSizeAdjusted",c)),onOnImageOriginalSizeAdjusted:a[1]||(a[1]=c=>i("onImageOriginalSizeAdjusted",c)),onOnElementClicked:a[2]||(a[2]=c=>i("onElementClicked",c)),onOnElementUpdatedEvent:a[3]||(a[3]=c=>i("onElementUpdatedEvent",c)),onOnElementRemoved:a[4]||(a[4]=c=>i("onElementRemoved",c))},null,8,["deps","theme","element","path","selectedElementPath","context"])]),n.element.TopElementList.ContentAlign==="Right"?(O(),J("td",{key:1,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0)]),n.element.TopElementList.List.length-1!==u?(O(),J("tr",rTt,[_("td",{style:he({height:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)])):Ue("",!0)],64))),128))])])],8,tTt)])):Ue("",!0),n.element.TopElementList.List.length>0&&n.element.TopElementList.Direction==="Horizontal"?(O(),J("tr",iTt,[_("td",{valign:"top",align:z($c)({containerAlign:n.element.TopElementList.ContentAlign})},[_("table",aTt,[_("tbody",null,[_("tr",null,[_("td",{style:he({height:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)]),_("tr",null,[(O(!0),J(rt,null,$n(n.element.TopElementList.List,(l,u)=>(O(),J(rt,{key:u},[n.element.TopElementList.ContentAlign==="Left"&&u===0?(O(),J("td",{key:0,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0),_("td",lTt,[ie(xl,{deps:n.deps,theme:n.theme,element:l,path:[...n.path,"TopElementList","List",u],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageSizeAdjusted:a[5]||(a[5]=c=>i("onImageSizeAdjusted",c)),onOnImageOriginalSizeAdjusted:a[6]||(a[6]=c=>i("onImageOriginalSizeAdjusted",c)),onOnElementClicked:a[7]||(a[7]=c=>i("onElementClicked",c)),onOnElementUpdatedEvent:a[8]||(a[8]=c=>i("onElementUpdatedEvent",c)),onOnElementRemoved:a[9]||(a[9]=c=>i("onElementRemoved",c))},null,8,["deps","theme","element","path","selectedElementPath","context"])]),n.element.TopElementList.ContentAlign==="Center"&&n.element.TopElementList.List.length-1!==u?(O(),J("td",{key:1,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0),n.element.TopElementList.ContentAlign==="Right"?(O(),J("td",{key:2,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0),n.element.TopElementList.ContentAlign==="Left"&&n.element.TopElementList.List.length-1!==u?(O(),J("td",{key:3,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0)],64))),128))])])])],8,sTt)])):Ue("",!0),n.element.BottomElementList.List.length>0&&n.element.BottomElementList.Direction==="Vertical"?(O(),J("tr",uTt,[_("td",{valign:"bottom",align:z($c)({containerAlign:n.element.BottomElementList.ContentAlign})},[_("table",dTt,[_("tbody",null,[(O(!0),J(rt,null,$n(n.element.BottomElementList.List,(l,u)=>(O(),J(rt,{key:u},[_("tr",null,[n.element.BottomElementList.ContentAlign==="Left"?(O(),J("td",{key:0,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0),_("td",hTt,[ie(xl,{deps:n.deps,theme:n.theme,element:l,path:[...n.path,"BottomElementList","List",u],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageSizeAdjusted:a[10]||(a[10]=c=>i("onImageSizeAdjusted",c)),onOnImageOriginalSizeAdjusted:a[11]||(a[11]=c=>i("onImageOriginalSizeAdjusted",c)),onOnElementClicked:a[12]||(a[12]=c=>i("onElementClicked",c)),onOnElementUpdatedEvent:a[13]||(a[13]=c=>i("onElementUpdatedEvent",c)),onOnElementRemoved:a[14]||(a[14]=c=>i("onElementRemoved",c))},null,8,["deps","theme","element","path","selectedElementPath","context"])]),n.element.BottomElementList.ContentAlign==="Right"?(O(),J("td",{key:1,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0)]),_("tr",null,[_("td",{style:he({height:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)])],64))),128))])])],8,cTt)])):Ue("",!0),n.element.BottomElementList.List.length>0&&n.element.BottomElementList.Direction==="Horizontal"?(O(),J("tr",mTt,[_("td",{valign:"bottom",align:z($c)({containerAlign:n.element.BottomElementList.ContentAlign})},[_("table",pTt,[_("tbody",null,[_("tr",null,[(O(!0),J(rt,null,$n(n.element.BottomElementList.List,(l,u)=>(O(),J(rt,{key:u},[n.element.BottomElementList.ContentAlign==="Left"&&u===0?(O(),J("td",{key:0,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0),_("td",gTt,[ie(xl,{deps:n.deps,theme:n.theme,element:l,path:[...n.path,"BottomElementList","List",u],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageSizeAdjusted:a[15]||(a[15]=c=>i("onImageSizeAdjusted",c)),onOnImageOriginalSizeAdjusted:a[16]||(a[16]=c=>i("onImageOriginalSizeAdjusted",c)),onOnElementClicked:a[17]||(a[17]=c=>i("onElementClicked",c)),onOnElementUpdatedEvent:a[18]||(a[18]=c=>i("onElementUpdatedEvent",c)),onOnElementRemoved:a[19]||(a[19]=c=>i("onElementRemoved",c))},null,8,["deps","theme","element","path","selectedElementPath","context"])]),n.element.BottomElementList.ContentAlign==="Center"&&n.element.BottomElementList.List.length-1!==u?(O(),J("td",{key:1,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0),n.element.BottomElementList.ContentAlign==="Right"?(O(),J("td",{key:2,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0),n.element.BottomElementList.ContentAlign==="Left"&&n.element.BottomElementList.List.length-1!==u?(O(),J("td",{key:3,style:he({width:n.element.ElementsSpacerSize+"px",fontSize:n.element.ElementsSpacerSize+"px",lineHeight:n.element.ElementsSpacerSize+"px"})},"   ",4)):Ue("",!0)],64))),128))])])])],8,fTt)])):Ue("",!0)])])],4)])])])):Ue("",!0)}}),xl=Xe({__name:"Elements",props:{deps:{},theme:{},element:{},path:{},context:{type:[String,Number,Boolean,Array,Object]},selectedElementPath:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){const n=t,o=e,r=(i,s)=>{o("onElementClicked",{element:i,path:[...n.path,s]})};return(i,s)=>(O(),J("span",{onClick:s[31]||(s[31]=zo(()=>{},["stop"]))},[n.element.Button!==void 0?(O(),Ze(eCt,{key:0,deps:n.deps,theme:n.theme,element:n.element.Button,context:n.context,class:$e({"element-selected":z(Df)(n.selectedElementPath,[...n.path,"Button"])}),onOnElementClicked:s[0]||(s[0]=a=>r(n.element,"Button"))},null,8,["deps","theme","element","context","class"])):Ue("",!0),n.element.HeightContainer!==void 0?(O(),Ze(Agt,{key:1,deps:n.deps,theme:n.theme,element:n.element.HeightContainer,path:[...n.path,"HeightContainer"],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageOriginalSizeAdjusted:s[1]||(s[1]=a=>o("onImageOriginalSizeAdjusted",a)),onOnImageSizeAdjusted:s[2]||(s[2]=a=>o("onImageSizeAdjusted",a)),onOnElementClicked:s[3]||(s[3]=a=>o("onElementClicked",a)),onOnElementRemoved:s[4]||(s[4]=a=>o("onElementRemoved",a)),onOnElementUpdatedEvent:s[5]||(s[5]=a=>o("onElementUpdatedEvent",a))},null,8,["deps","theme","element","path","selectedElementPath","context"])):Ue("",!0),n.element.Image!==void 0?(O(),Ze(Mgt,{key:2,deps:n.deps,theme:n.theme,element:n.element.Image,context:n.context,path:[...n.path,"Image"],class:$e({"element-selected":z(Df)(n.selectedElementPath,[...n.path,"Image"])}),onOnImageOriginalSizeAdjusted:s[6]||(s[6]=a=>o("onImageOriginalSizeAdjusted",a)),onOnImageSizeAdjusted:s[7]||(s[7]=a=>o("onImageSizeAdjusted",a)),onOnElementClicked:s[8]||(s[8]=a=>r(n.element,"Image"))},null,8,["deps","theme","element","context","path","class"])):Ue("",!0),n.element.Spacer!==void 0?(O(),Ze(zgt,{key:3,element:n.element.Spacer,theme:n.theme,class:$e({"element-selected":z(Df)(n.selectedElementPath,[...n.path,"Spacer"])}),onOnElementClicked:s[9]||(s[9]=a=>r(n.element,"Spacer"))},null,8,["element","theme","class"])):Ue("",!0),n.element.SpanText!==void 0?(O(),Ze(oCt,{key:4,deps:n.deps,theme:n.theme,element:n.element.SpanText,context:n.context,class:$e({"element-selected":z(Df)(n.selectedElementPath,[...n.path,"SpanText"])}),onOnElementClicked:s[10]||(s[10]=a=>r(n.element,"SpanText"))},null,8,["deps","theme","element","context","class"])):Ue("",!0),n.element.RichText!==void 0?(O(),Ze(G1t,{key:5,deps:n.deps.richTextDeps,theme:n.theme,element:n.element.RichText,isSelected:z(Df)(n.selectedElementPath,[...n.path,"RichText"]),onOnElementClicked:s[11]||(s[11]=a=>r(n.element,"RichText")),onOnRichTextUpdated:s[12]||(s[12]=a=>{o("onElementUpdatedEvent",{path:n.path,element:{RichText:a}})}),onOnRichTextRemoved:s[13]||(s[13]=()=>{o("onElementRemoved",n.path)})},null,8,["deps","theme","element","isSelected"])):Ue("",!0),n.element.OneLineList!==void 0?(O(),Ze(Wgt,{key:6,deps:n.deps,theme:n.theme,element:n.element.OneLineList,path:[...n.path,"OneLineList"],selectedElementPath:n.selectedElementPath,context:n.context,onOnImageOriginalSizeAdjusted:s[14]||(s[14]=a=>o("onImageOriginalSizeAdjusted",a)),onOnImageSizeAdjusted:s[15]||(s[15]=a=>o("onImageSizeAdjusted",a)),onOnElementClicked:s[16]||(s[16]=a=>o("onElementClicked",a)),onOnElementRemoved:s[17]||(s[17]=a=>o("onElementRemoved",a)),onOnElementUpdatedEvent:s[18]||(s[18]=a=>o("onElementUpdatedEvent",a))},null,8,["deps","theme","element","path","selectedElementPath","context"])):Ue("",!0),n.element.If!==void 0?(O(),Ze(Egt,{key:7,deps:n.deps,theme:n.theme,element:n.element.If,context:n.context,path:[...n.path,"If"],selectedElementPath:n.selectedElementPath,onOnImageOriginalSizeAdjusted:s[19]||(s[19]=a=>o("onImageOriginalSizeAdjusted",a)),onOnImageSizeAdjusted:s[20]||(s[20]=a=>o("onImageSizeAdjusted",a)),onOnElementClicked:s[21]||(s[21]=a=>o("onElementClicked",a)),onOnElementRemoved:s[22]||(s[22]=a=>o("onElementRemoved",a)),onOnElementUpdatedEvent:s[23]||(s[23]=a=>o("onElementUpdatedEvent",a))},null,8,["deps","theme","element","context","path","selectedElementPath"])):Ue("",!0),n.element.UnsubscribeLink!==void 0?(O(),Ze(X1t,{key:8,theme:n.theme,element:n.element.UnsubscribeLink,class:$e({"element-selected":z(Df)(n.selectedElementPath,[...n.path,"UnsubscribeLink"])}),onOnElementClicked:s[24]||(s[24]=a=>r(n.element,"UnsubscribeLink"))},null,8,["theme","element","class"])):Ue("",!0),n.element.BackgroundImage!==void 0?(O(),Ze(CTt,{key:9,deps:n.deps,theme:n.theme,element:n.element.BackgroundImage,context:n.context,path:[...n.path,"BackgroundImage"],selectedElementPath:n.selectedElementPath,class:$e({"element-selected":z(Df)(n.selectedElementPath,[...n.path,"BackgroundImage"])}),onOnImageOriginalSizeAdjusted:s[25]||(s[25]=a=>o("onImageOriginalSizeAdjusted",a)),onOnImageSizeAdjusted:s[26]||(s[26]=a=>o("onImageSizeAdjusted",a)),onOnElementClicked:s[27]||(s[27]=a=>o("onElementClicked",a)),onOnElementRemoved:s[28]||(s[28]=a=>o("onElementRemoved",a)),onOnElementUpdatedEvent:s[29]||(s[29]=a=>o("onElementUpdatedEvent",a)),onOnElementWrapperClicked:s[30]||(s[30]=a=>r(n.element,"BackgroundImage"))},null,8,["deps","theme","element","context","path","selectedElementPath","class"])):Ue("",!0)]))}}),yTt=["align"],bTt=Xe({__name:"IteratedColumn",props:{deps:{},theme:{},iteratedColumn:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]},containerWidth:{}},emits:["onImageSizeAdjusted","onImageOriginalSizeAdjusted","onElementClicked","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){Im(i=>({v63736150:r.value}));const n=t,o=e,r=q(()=>n.iteratedColumn.WidthInPercents*n.containerWidth+"px");return(i,s)=>(O(),J("div",{class:"iterated-column",style:he({display:"inline-block",verticalAlign:n.iteratedColumn.VerticalAlign})},[_("table",{style:he([[z(Mw)({borderCollapse:n.iteratedColumn.BorderCollapse})],{width:"100%","border-spacing":"0"}]),width:"100%"},[_("tbody",null,[_("tr",null,[_("td",{align:z($c)({containerAlign:n.iteratedColumn.ContainerAlign}),style:he([[z(pd)({border:n.iteratedColumn.Border,themeColors:n.theme.Colors}),{backgroundColor:z(Nl)({color:n.iteratedColumn.BgColor,themeColors:n.theme.Colors})},z(Iu)({borderRadius:n.iteratedColumn.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner})],{"line-height":"normal"}])},[(O(!0),J(rt,null,$n(n.iteratedColumn.Elements,(a,l)=>(O(),Ze(xl,{key:l,deps:n.deps.elementsDeps,theme:n.theme,element:a,context:n.context,path:[...n.path,"Elements",l],selectedElementPath:n.selectedElementPath,onOnElementClicked:s[0]||(s[0]=u=>o("onElementClicked",u)),onOnImageSizeAdjusted:s[1]||(s[1]=u=>o("onImageSizeAdjusted",u)),onOnImageOriginalSizeAdjusted:s[2]||(s[2]=u=>o("onImageOriginalSizeAdjusted",u)),onOnElementUpdatedEvent:s[3]||(s[3]=u=>o("onElementUpdatedEvent",u)),onOnElementRemoved:s[4]||(s[4]=u=>o("onElementRemoved",u))},null,8,["deps","theme","element","context","path","selectedElementPath"]))),128))],12,yTt)])])],4)],4))}}),vTt=ot(bTt,[["__scopeId","data-v-4bdaa248"]]),TTt=["align"],xTt=Xe({__name:"IteratedColumnN21",props:{deps:{},theme:{},iteratedColumnN21:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]},containerWidth:{}},emits:["onImageSizeAdjusted","onImageOriginalSizeAdjusted","onElementClicked","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){Im(i=>({v2fbddeb4:r.value}));const n=t,o=e,r=q(()=>n.iteratedColumnN21.WidthInPercents*n.containerWidth+"px");return(i,s)=>(O(),J("div",{class:"iterated-column__N-2-1",style:he({display:"inline-block",verticalAlign:n.iteratedColumnN21.VerticalAlign})},[_("table",{style:he([[z(Mw)({borderCollapse:n.iteratedColumnN21.BorderCollapse})],{width:"100%","border-spacing":"0"}]),width:"100%"},[_("tbody",null,[_("tr",null,[_("td",{align:z($c)({containerAlign:n.iteratedColumnN21.ContainerAlign}),style:he([[z(pd)({border:n.iteratedColumnN21.Border,themeColors:n.theme.Colors}),{backgroundColor:z(Nl)({color:n.iteratedColumnN21.BgColor,themeColors:n.theme.Colors})},z(Iu)({borderRadius:n.iteratedColumnN21.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner})],{"line-height":"normal"}])},[(O(!0),J(rt,null,$n(n.iteratedColumnN21.Elements,(a,l)=>(O(),Ze(xl,{key:l,deps:n.deps.elementsDeps,theme:n.theme,element:a,context:n.context,path:[...n.path,"Elements",l],selectedElementPath:n.selectedElementPath,onOnElementClicked:s[0]||(s[0]=u=>o("onElementClicked",u)),onOnImageSizeAdjusted:s[1]||(s[1]=u=>o("onImageSizeAdjusted",u)),onOnImageOriginalSizeAdjusted:s[2]||(s[2]=u=>o("onImageOriginalSizeAdjusted",u)),onOnElementUpdatedEvent:s[3]||(s[3]=u=>o("onElementUpdatedEvent",u)),onOnElementRemoved:s[4]||(s[4]=u=>o("onElementRemoved",u))},null,8,["deps","theme","element","context","path","selectedElementPath"]))),128))],12,TTt)])])],4)],4))}}),FTt=ot(xTt,[["__scopeId","data-v-b46af162"]]),STt=["align"],wTt=Xe({__name:"IteratedColumnN22",props:{deps:{},theme:{},iteratedColumnN22:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]},containerWidth:{}},emits:["onImageSizeAdjusted","onImageOriginalSizeAdjusted","onElementClicked","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){Im(i=>({v904d8f2c:r.value}));const n=t,o=e,r=q(()=>n.iteratedColumnN22.WidthInPercents*n.containerWidth+"px");return(i,s)=>(O(),J("div",{class:"iterated-column__N-2-2",style:he({display:"inline-block",verticalAlign:n.iteratedColumnN22.VerticalAlign})},[_("table",{style:he([[z(Mw)({borderCollapse:n.iteratedColumnN22.BorderCollapse})],{width:"100%","border-spacing":"0"}]),width:"100%"},[_("tbody",null,[_("tr",null,[_("td",{align:z($c)({containerAlign:n.iteratedColumnN22.ContainerAlign}),style:he([[z(pd)({border:n.iteratedColumnN22.Border,themeColors:n.theme.Colors}),{backgroundColor:z(Nl)({color:n.iteratedColumnN22.BgColor,themeColors:n.theme.Colors})},z(Iu)({borderRadius:n.iteratedColumnN22.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner})],{"line-height":"normal"}])},[(O(!0),J(rt,null,$n(n.iteratedColumnN22.Elements,(a,l)=>(O(),Ze(xl,{key:l,deps:n.deps.elementsDeps,theme:n.theme,element:a,context:n.context,path:[...n.path,"Elements",l],selectedElementPath:n.selectedElementPath,onOnElementClicked:s[0]||(s[0]=u=>o("onElementClicked",u)),onOnImageSizeAdjusted:s[1]||(s[1]=u=>o("onImageSizeAdjusted",u)),onOnImageOriginalSizeAdjusted:s[2]||(s[2]=u=>o("onImageOriginalSizeAdjusted",u)),onOnElementUpdatedEvent:s[3]||(s[3]=u=>o("onElementUpdatedEvent",u)),onOnElementRemoved:s[4]||(s[4]=u=>o("onElementRemoved",u))},null,8,["deps","theme","element","context","path","selectedElementPath"]))),128))],12,STt)])])],4)],4))}}),kTt=ot(wTt,[["__scopeId","data-v-319c5209"]]),ETt={class:"iterated-column-container",style:{"border-spacing":"0","border-collapse":"collapse",width:"100%",margin:"0 auto"},width:"100%"},_Tt={align:"center",style:{"font-size":"0"}},RTt=Xe({__name:"IteratedColumnBodyRow",props:{deps:{},theme:{},iteratedColumnBodyRow:{},path:{},selectedElementPath:{},context:{},rowWidth:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){Im(l=>({a80c0c96:i.value}));const n=t,o=Vt({dataList:[],isLoaded:!1}),r=()=>n.deps.listExpressionEvaluator({listExpression:n.iteratedColumnBodyRow.DataSource,context:n.context}).then(l=>{o.dataList=l,o.isLoaded=!0});r(),an(()=>n.context,()=>r());const i=q(()=>Eo({paddingExpression:n.iteratedColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})+"px"),s={iteratedColumn:l=>l!==void 0,iteratedColumnVariant:l=>l!==void 0,iteratedColumnN21:l=>l!==void 0,iteratedColumnN22:l=>l!==void 0},a=e;return(l,u)=>(O(),J("table",ETt,[_("tbody",null,[_("tr",null,[_("td",_Tt,[(O(!0),J(rt,null,$n(o.dataList,(c,d)=>(O(),J(rt,{key:d},[s.iteratedColumn(n.iteratedColumnBodyRow.IteratedColumn)?(O(),Ze(vTt,{key:d,class:$e(["iterated-column-bottom-spacer",{"iterated-column__tablet-padding-right":(d+1)%2===1,"iterated-column__tablet-padding-left":(d+1)%2===0,"is-last-desktop-line":d>=o.dataList.length-n.iteratedColumnBodyRow.NumberColumnsInLine,"is-last-tablet-line":d>=o.dataList.length-2,"is-last-mobile-line":d==o.dataList.length-1}]),deps:n.deps.iteratedColumnDeps,theme:n.theme,style:he(z(LR)({numberColumnsInLine:n.iteratedColumnBodyRow.NumberColumnsInLine,index:d,paddingSize:z(Eo)({paddingExpression:n.iteratedColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),directionRtl:!1})),iteratedColumn:n.iteratedColumnBodyRow.IteratedColumn,path:[...n.path,"IteratedColumn"],selectedElementPath:n.selectedElementPath,context:{...n.context,[n.iteratedColumnBodyRow.IndexName]:c},containerWidth:n.rowWidth,onOnElementClicked:u[0]||(u[0]=h=>a("onElementClicked",h)),onOnImageOriginalSizeAdjusted:u[1]||(u[1]=h=>a("onImageOriginalSizeAdjusted",h)),onOnImageSizeAdjusted:u[2]||(u[2]=h=>a("onImageSizeAdjusted",h)),onOnElementUpdatedEvent:u[3]||(u[3]=h=>a("onElementUpdatedEvent",h)),onOnElementRemoved:u[4]||(u[4]=h=>a("onElementRemoved",h))},null,8,["deps","theme","class","style","iteratedColumn","path","selectedElementPath","context","containerWidth"])):Ue("",!0),s.iteratedColumnVariant(n.iteratedColumnBodyRow.IteratedColumnVariant)?(O(),J(rt,{key:1},[s.iteratedColumnN21(n.iteratedColumnBodyRow.IteratedColumnVariant.IteratedColumnN21)?(O(),Ze(FTt,{key:d,deps:n.deps.iteratedColumnVariantDeps.iteratedColumnN21Deps,theme:n.theme,class:$e(["iterated-column-bottom-spacer",{"iterated-column__tablet-padding-right":(d+1)%2===1,"iterated-column__tablet-padding-left":(d+1)%2===0,"is-last-desktop-line":d>=o.dataList.length-n.iteratedColumnBodyRow.NumberColumnsInLine,"is-last-tablet-line":d>=o.dataList.length-2,"is-last-mobile-line":d==o.dataList.length-1}]),style:he(z(LR)({numberColumnsInLine:n.iteratedColumnBodyRow.NumberColumnsInLine,index:d,paddingSize:z(Eo)({paddingExpression:n.iteratedColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),directionRtl:!1})),iteratedColumnN21:n.iteratedColumnBodyRow.IteratedColumnVariant.IteratedColumnN21,path:[...n.path,"IteratedColumnVariant","IteratedColumnN21"],selectedElementPath:n.selectedElementPath,context:{...n.context,[n.iteratedColumnBodyRow.IndexName]:c},containerWidth:n.rowWidth,onOnElementClicked:u[5]||(u[5]=h=>a("onElementClicked",h)),onOnImageOriginalSizeAdjusted:u[6]||(u[6]=h=>a("onImageOriginalSizeAdjusted",h)),onOnImageSizeAdjusted:u[7]||(u[7]=h=>a("onImageSizeAdjusted",h)),onOnElementUpdatedEvent:u[8]||(u[8]=h=>a("onElementUpdatedEvent",h)),onOnElementRemoved:u[9]||(u[9]=h=>a("onElementRemoved",h))},null,8,["deps","theme","class","style","iteratedColumnN21","path","selectedElementPath","context","containerWidth"])):Ue("",!0),s.iteratedColumnN22(n.iteratedColumnBodyRow.IteratedColumnVariant.IteratedColumnN22)?(O(),Ze(kTt,{key:d,deps:n.deps.iteratedColumnVariantDeps.iteratedColumnN22Deps,theme:n.theme,class:$e(["iterated-column-bottom-spacer",{"iterated-column__tablet-padding-right iterated-column__N-2-2_mobile-padding-right":(d+1)%2===1,"iterated-column__tablet-padding-left iterated-column__N-2-2_mobile-padding-left":(d+1)%2===0,"is-last-desktop-line":d>=o.dataList.length-n.iteratedColumnBodyRow.NumberColumnsInLine,"is-last-tablet-line is-last-mobile-line":d>=o.dataList.length-2}]),style:he(z(LR)({numberColumnsInLine:n.iteratedColumnBodyRow.NumberColumnsInLine,index:d,paddingSize:z(Eo)({paddingExpression:n.iteratedColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),directionRtl:!1})),iteratedColumnN22:n.iteratedColumnBodyRow.IteratedColumnVariant.IteratedColumnN22,path:[...n.path,"IteratedColumnVariant","IteratedColumnN22"],selectedElementPath:n.selectedElementPath,context:{...n.context,[n.iteratedColumnBodyRow.IndexName]:c},containerWidth:n.rowWidth,onOnElementClicked:u[10]||(u[10]=h=>a("onElementClicked",h)),onOnImageOriginalSizeAdjusted:u[11]||(u[11]=h=>a("onImageOriginalSizeAdjusted",h)),onOnImageSizeAdjusted:u[12]||(u[12]=h=>a("onImageSizeAdjusted",h)),onOnElementUpdatedEvent:u[13]||(u[13]=h=>a("onElementUpdatedEvent",h)),onOnElementRemoved:u[14]||(u[14]=h=>a("onElementRemoved",h))},null,8,["deps","theme","class","style","iteratedColumnN22","path","selectedElementPath","context","containerWidth"])):Ue("",!0)],64)):Ue("",!0)],64))),128))])])])]))}}),DTt=ot(RTt,[["__scopeId","data-v-69ed8d34"]]),ATt={style:{"border-spacing":"0","border-collapse":"collapse",width:"100%",margin:"0 auto"}},NTt=Xe({__name:"IteratedBodyRow",props:{theme:{},deps:{},iteratedBodyRow:{},path:{},selectedElementPath:{},context:{},containerWidth:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onColumnWidthAdjusted","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){const n=t,o=Vt({dataList:[]});n.deps.listExpressionEvaluator({listExpression:n.iteratedBodyRow.DataSource,context:n.context}).then(i=>o.dataList=i);const r=e;return(i,s)=>(O(),J("table",ATt,[(O(!0),J(rt,null,$n(o.dataList,(a,l)=>(O(),J("tr",{key:l},[_("td",{style:he([z(Ow)({paddings:n.iteratedBodyRow.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})])},[ie(Vxe,{emailComponentBodyRow:n.iteratedBodyRow.BodyRow,deps:{iteratedColumnBodyRowDeps:n.deps.iteratedColumnBodyRowDeps,multipleColumnBodyRowDeps:n.deps.multipleColumnBodyRowDeps,listExpressionEvaluator:n.deps.listExpressionEvaluator},theme:n.theme,context:{...n.context,[n.iteratedBodyRow.IndexName]:a},rowWidth:n.containerWidth,path:[...n.path,"BodyRow"],selectedElementPath:n.selectedElementPath,onOnElementClicked:s[0]||(s[0]=u=>r("onElementClicked",u)),onOnImageOriginalSizeAdjusted:s[1]||(s[1]=u=>r("onImageOriginalSizeAdjusted",u)),onOnImageSizeAdjusted:s[2]||(s[2]=u=>r("onImageSizeAdjusted",u)),onOnColumnWidthAdjusted:s[3]||(s[3]=u=>r("onColumnWidthAdjusted",u)),onOnElementUpdatedEvent:s[4]||(s[4]=u=>r("onElementUpdatedEvent",u)),onOnElementRemoved:s[5]||(s[5]=u=>r("onElementRemoved",u))},null,8,["emailComponentBodyRow","deps","theme","context","rowWidth","path","selectedElementPath"])],4)]))),128))]))}}),BTt=t=>({Match:e=>{switch(t){case"Top":return e.Top();case"Middle":return e.Middle();case"Bottom":return e.Bottom();case"Baseline":return e.Baseline()}}}),LTt=t=>BTt(t).Match({Top:()=>"start",Middle:()=>"center",Bottom:()=>"end",Baseline:()=>"baseline"}),$Tt=ec,VTt=t=>({JustifyWidth:{WidthInPixels:t}}),MTt=t=>({ShrinkToContentWidth:{WidthInPixels:t}}),OTt=Nct,ITt=["align"],PTt=Xe({__name:"MultipleColumn",props:{deps:{},theme:{},multipleColumn:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]},containerWidth:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onColumnWidthAdjusted","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){Im(l=>({acad954c:a.value,v1971599c:s.value,v72b8524e:i.value}));const n=t,o=e,r=l=>{$Tt(n.multipleColumn.Width).Match({JustifyWidth:()=>M2.Some(VTt(l)),ShrinkToContentWidth:()=>M2.Some(MTt(l)),WidthInPercents:()=>M2.None}).map(u=>o("onColumnWidthAdjusted",{Path:n.path,Width:u}))},i=q(()=>OTt(n.multipleColumn.Width).Match({default:()=>"",WidthInPercents:l=>l.Value*n.containerWidth+"px"})),s=q(()=>LTt(n.multipleColumn.VerticalAlign)),a=q(()=>n.multipleColumn.VerticalAlign);return(l,u)=>Ot((O(),J("div",{class:$e(["multiple-column",{"multiple-column--justifyWidth":n.multipleColumn.Width.JustifyWidth!==void 0,"multiple-column--shrinkToContentWidth":n.multipleColumn.Width.ShrinkToContentWidth!==void 0,"multiple-column--widthInPercents":n.multipleColumn.Width.WidthInPercents!==void 0}]),style:{direction:"ltr"}},[_("table",{style:he([{width:"100%","border-spacing":"0"},[z(Mw)({borderCollapse:n.multipleColumn.BorderCollapse})]]),width:"100%"},[_("tbody",null,[_("tr",null,[_("td",{align:z($c)({containerAlign:n.multipleColumn.ContainerAlign}),style:he([[z(pd)({border:n.multipleColumn.Border,themeColors:n.theme.Colors}),z(Iu)({borderRadius:n.multipleColumn.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner}),{backgroundColor:z(Nl)({color:n.multipleColumn.BgColor,themeColors:n.theme.Colors})},z(Ow)({paddings:n.multipleColumn.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})],{"line-height":"normal"}])},[(O(!0),J(rt,null,$n(n.multipleColumn.Elements,(c,d)=>(O(),Ze(xl,{key:d,deps:n.deps.elementsDeps,theme:n.theme,element:c,context:n.context,path:[...n.path,"Elements",d],selectedElementPath:n.selectedElementPath,onOnElementClicked:u[0]||(u[0]=h=>o("onElementClicked",h)),onOnImageSizeAdjusted:u[1]||(u[1]=h=>o("onImageSizeAdjusted",h)),onOnImageOriginalSizeAdjusted:u[2]||(u[2]=h=>o("onImageOriginalSizeAdjusted",h)),onOnElementUpdatedEvent:u[3]||(u[3]=h=>o("onElementUpdatedEvent",h)),onOnElementRemoved:u[4]||(u[4]=h=>o("onElementRemoved",h))},null,8,["deps","theme","element","context","path","selectedElementPath"]))),128))],12,ITt)])])],4)],2)),[[z(fS),c=>r(c.width)]])}}),WTt=ot(PTt,[["__scopeId","data-v-bfa1869f"]]),HTt=Xe({__name:"MultipleColumnBodyRow",props:{deps:{},theme:{},multipleColumnBodyRow:{},path:{},selectedElementPath:{},context:{type:[String,Number,Boolean,Array,Object]},rowWidth:{}},emits:["onElementClicked","onImageSizeAdjusted","onImageOriginalSizeAdjusted","onColumnWidthAdjusted","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){Im(i=>({v36e68443:r.value}));const n=t,o=e,r=q(()=>Eo({paddingExpression:n.multipleColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})+"px");return(i,s)=>(O(),J("table",{class:"multiple-column-container",style:he([[z(Mw)({borderCollapse:n.multipleColumnBodyRow.BorderCollapse}),z(pd)({border:n.multipleColumnBodyRow.Border,themeColors:n.theme.Colors}),z(Iu)({borderRadius:n.multipleColumnBodyRow.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner}),{backgroundColor:z(Nl)({color:n.multipleColumnBodyRow.BgColor,themeColors:n.theme.Colors})}],{"border-spacing":"0",width:"100%",margin:"0 auto"}]),width:"100%"},[_("tbody",null,[_("tr",null,[_("td",{class:"multiple-column-container__inner",style:he([{"font-size":"0"},[z(kgt)({containerAlign:n.multipleColumnBodyRow.ContainerAlign}),z(Ow)({paddings:n.multipleColumnBodyRow.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),n.multipleColumnBodyRow.DirectionRtl?{direction:"rtl"}:{direction:"ltr"}]])},[(O(!0),J(rt,null,$n(n.multipleColumnBodyRow.Columns,(a,l)=>(O(),Ze(WTt,{key:l,deps:n.deps.multipleColumnDeps,theme:n.theme,multipleColumn:a,path:[...n.path,"Columns",l],selectedElementPath:n.selectedElementPath,context:n.context,containerWidth:n.rowWidth-z(Eo)({paddingExpression:n.multipleColumnBodyRow.Paddings.Left,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})-z(Eo)({paddingExpression:n.multipleColumnBodyRow.Paddings.Right,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings})-n.multipleColumnBodyRow.Border.Left.Width-n.multipleColumnBodyRow.Border.Right.Width,style:he(z(LR)({numberColumnsInLine:n.multipleColumnBodyRow.Columns.length,index:l,paddingSize:z(Eo)({paddingExpression:n.multipleColumnBodyRow.ColumnSpacerSize,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings}),directionRtl:n.multipleColumnBodyRow.DirectionRtl})),class:$e({"is-last-tablet-line":l==n.multipleColumnBodyRow.Columns.length-1,"is-last-mobile-line":l==n.multipleColumnBodyRow.Columns.length-1}),onOnElementClicked:s[0]||(s[0]=u=>o("onElementClicked",u)),onOnColumnWidthAdjusted:s[1]||(s[1]=u=>o("onColumnWidthAdjusted",u)),onOnImageSizeAdjusted:s[2]||(s[2]=u=>o("onImageSizeAdjusted",u)),onOnImageOriginalSizeAdjusted:s[3]||(s[3]=u=>o("onImageOriginalSizeAdjusted",u)),onOnElementUpdatedEvent:s[4]||(s[4]=u=>o("onElementUpdatedEvent",u)),onOnElementRemoved:s[5]||(s[5]=u=>o("onElementRemoved",u))},null,8,["deps","theme","multipleColumn","path","selectedElementPath","context","containerWidth","style","class"]))),128))],4)])])],4))}}),zTt=ot(HTt,[["__scopeId","data-v-c6ebdc94"]]),Vxe=Xe({__name:"EmailComponentBodyRow",props:{deps:{},theme:{},emailComponentBodyRow:{},path:{},selectedElementPath:{},context:{},rowWidth:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onColumnWidthAdjusted","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){const n=t,o={multipleColumns:i=>i!==void 0,iteratedColumns:i=>i!==void 0,iteratedBodyRow:i=>i!==void 0},r=e;return(i,s)=>(O(),J("div",null,[o.multipleColumns(n.emailComponentBodyRow.MultipleColumnBodyRow)?(O(),Ze(zTt,{key:0,deps:n.deps.multipleColumnBodyRowDeps,theme:n.theme,multipleColumnBodyRow:n.emailComponentBodyRow.MultipleColumnBodyRow,path:[...n.path,"MultipleColumnBodyRow"],selectedElementPath:n.selectedElementPath,context:t.context,rowWidth:n.rowWidth,onOnColumnWidthAdjusted:s[0]||(s[0]=a=>r("onColumnWidthAdjusted",a)),onOnImageOriginalSizeAdjusted:s[1]||(s[1]=a=>r("onImageOriginalSizeAdjusted",a)),onOnImageSizeAdjusted:s[2]||(s[2]=a=>r("onImageSizeAdjusted",a)),onOnElementClicked:s[3]||(s[3]=a=>r("onElementClicked",a)),onOnElementUpdatedEvent:s[4]||(s[4]=a=>r("onElementUpdatedEvent",a)),onOnElementRemoved:s[5]||(s[5]=a=>r("onElementRemoved",a))},null,8,["deps","theme","multipleColumnBodyRow","path","selectedElementPath","context","rowWidth"])):Ue("",!0),o.iteratedColumns(n.emailComponentBodyRow.IteratedColumnBodyRow)?(O(),Ze(DTt,{key:1,deps:n.deps.iteratedColumnBodyRowDeps,theme:n.theme,iteratedColumnBodyRow:n.emailComponentBodyRow.IteratedColumnBodyRow,path:[...n.path,"IteratedColumnBodyRow"],selectedElementPath:n.selectedElementPath,context:t.context,rowWidth:n.rowWidth,onOnElementClicked:s[6]||(s[6]=a=>r("onElementClicked",a)),onOnImageOriginalSizeAdjusted:s[7]||(s[7]=a=>r("onImageOriginalSizeAdjusted",a)),onOnImageSizeAdjusted:s[8]||(s[8]=a=>r("onImageSizeAdjusted",a)),onOnElementUpdatedEvent:s[9]||(s[9]=a=>r("onElementUpdatedEvent",a)),onOnElementRemoved:s[10]||(s[10]=a=>r("onElementRemoved",a))},null,8,["deps","theme","iteratedColumnBodyRow","path","selectedElementPath","context","rowWidth"])):Ue("",!0),o.iteratedBodyRow(n.emailComponentBodyRow.IteratedBodyRow)?(O(),Ze(NTt,{key:2,deps:{iteratedColumnBodyRowDeps:n.deps.iteratedColumnBodyRowDeps,multipleColumnBodyRowDeps:n.deps.multipleColumnBodyRowDeps,listExpressionEvaluator:n.deps.listExpressionEvaluator},theme:n.theme,iteratedBodyRow:n.emailComponentBodyRow.IteratedBodyRow,path:[...n.path,"IteratedBodyRow"],selectedElementPath:n.selectedElementPath,context:t.context,containerWidth:n.rowWidth,onOnElementClicked:s[11]||(s[11]=a=>r("onElementClicked",a)),onOnImageOriginalSizeAdjusted:s[12]||(s[12]=a=>r("onImageOriginalSizeAdjusted",a)),onOnImageSizeAdjusted:s[13]||(s[13]=a=>r("onImageSizeAdjusted",a)),onOnElementUpdatedEvent:s[14]||(s[14]=a=>r("onElementUpdatedEvent",a)),onOnElementRemoved:s[15]||(s[15]=a=>r("onElementRemoved",a))},null,8,["deps","theme","iteratedBodyRow","path","selectedElementPath","context","containerWidth"])):Ue("",!0)]))}}),jTt={emptyEmailComponentText:"Product shelf is hidden due to insufficient products",emptyEmailComponentTooltip:"The product shelf won't be displayed to recipients until it contains enough products",requiredComponentNotification:"Without this component the letter will not be sent"},UTt={emptyEmailComponentText:"Товарная полка скрыта из-за недостатка товаров",emptyEmailComponentTooltip:"Товарная полка не будет отображаться у получателей письма пока в ней недостаточно товаров",requiredComponentNotification:"Без этого компонента письмо не будет отправлено"},nP=Xn({en:jTt,ru:UTt}),KTt={},qTt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function JTt(t,e){return O(),J("svg",qTt,[...e[0]||(e[0]=[_("path",{d:"M6.99967 13.6663C3.31777 13.6663 0.333008 10.6815 0.333008 6.99967C0.333008 3.31777 3.31777 0.333008 6.99967 0.333008C10.6815 0.333008 13.6663 3.31777 13.6663 6.99967C13.6663 10.6815 10.6815 13.6663 6.99967 13.6663ZM6.99967 12.333C9.94521 12.333 12.333 9.94521 12.333 6.99967C12.333 4.05415 9.94521 1.66634 6.99967 1.66634C4.05415 1.66634 1.66634 4.05415 1.66634 6.99967C1.66634 9.94521 4.05415 12.333 6.99967 12.333ZM6.33301 3.66634H7.66634V4.99967H6.33301V3.66634ZM6.33301 6.33301H7.66634V10.333H6.33301V6.33301Z",fill:"var(--gray-500)"},null,-1)])])}const GTt=ot(KTt,[["render",JTt]]),YTt={key:0},XTt={key:0,class:"is-required-notification"},QTt={class:"bootstrap-styles w-100 d-flex justify-content-center gap-5"},ZTt=Xe({__name:"EmailComponent",props:{deps:{},theme:{},emailComponent:{},path:{},selectedElementPath:{}},emits:["onElementClicked","onImageOriginalSizeAdjusted","onImageSizeAdjusted","onColumnWidthAdjusted","onElementUpdatedEvent","onElementRemoved"],setup(t,{emit:e}){const n=t,o=Vt({context:{},ifResult:!n.emailComponent.ContextBuilderExpression,isLoaded:!1}),r={emptyEmailComponentText:nP({localeKey:n.deps.localeKey}).emptyEmailComponentText,emptyEmailComponentTooltip:nP({localeKey:n.deps.localeKey}).emptyEmailComponentTooltip,requiredComponentNotification:nP({localeKey:n.deps.localeKey}).requiredComponentNotification},i=a=>{o.isLoaded=!1,n.deps.dataStructExpressionEvaluator({dataStructBuilderExpression:a,context:{}}).then(l=>{(n.emailComponent.IfExpression?n.deps.boolExpressionEvaluatorDelegate({boolExpression:n.emailComponent.IfExpression,context:l}):Promise.resolve(!0)).then(u=>{o.context=l,o.ifResult=u,o.isLoaded=!0})})};an(()=>n.emailComponent.ContextBuilderExpression,a=>{a&&i(a)});const s=e;return n.emailComponent.ContextBuilderExpression?i(n.emailComponent.ContextBuilderExpression):o.isLoaded=!0,(a,l)=>o.isLoaded?(O(),J("div",YTt,[n.emailComponent.IsRequired?(O(),J("div",XTt,[_("i",null,[ie(GTt)]),_("span",null,"   "+Gt(r.requiredComponentNotification),1)])):Ue("",!0),o.ifResult?(O(),J("table",{key:1,style:he([[{backgroundColor:z(Nl)({color:n.emailComponent.InnerBgColor,themeColors:n.theme.Colors})},z(Iu)({borderRadius:n.emailComponent.BorderRadius,borderRadiusCard:n.theme.BorderRadiusCard,bodyBorderRadius:n.theme.BorderRadius,borderButtonRadius:n.theme.BorderRadiusButton,borderBannerRadius:n.theme.BorderRadiusBanner}),{maxWidth:n.theme.BodyWidth+"px"}],{"border-spacing":"0","border-collapse":"collapse",width:"100%",margin:"0 auto"}])},[_("tbody",null,[_("tr",null,[_("td",{class:"row__inner",style:he([z(foe)({paddings:n.emailComponent.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings,fullWidth:n.emailComponent.FullWidth})])},[(O(!0),J(rt,null,$n(n.emailComponent.BodyRowList,(u,c)=>(O(),Ze(Vxe,{key:c,deps:n.deps.emailComponentBodyRowDeps,theme:n.theme,emailComponentBodyRow:u,context:o.context,rowWidth:n.emailComponent.FullWidth?n.theme.BodyWidth:n.theme.BodyWidth-n.theme.BodyPaddings.Left-n.theme.BodyPaddings.Right,path:[...n.path,"BodyRowList",c],selectedElementPath:n.selectedElementPath,onOnElementClicked:l[0]||(l[0]=d=>s("onElementClicked",d)),onOnImageSizeAdjusted:l[1]||(l[1]=d=>s("onImageSizeAdjusted",d)),onOnImageOriginalSizeAdjusted:l[2]||(l[2]=d=>s("onImageOriginalSizeAdjusted",d)),onOnColumnWidthAdjusted:l[3]||(l[3]=d=>s("onColumnWidthAdjusted",d)),onOnElementUpdatedEvent:l[4]||(l[4]=d=>s("onElementUpdatedEvent",d)),onOnElementRemoved:l[5]||(l[5]=d=>s("onElementRemoved",d))},null,8,["deps","theme","emailComponentBodyRow","context","rowWidth","path","selectedElementPath"]))),128))],4)])])],4)):(O(),J("div",{key:2,class:$e(["empty-email-component",{"is-required-component__paddings":n.emailComponent.IsRequired}])},[U0(Gt(r.emptyEmailComponentText)+" ",1),Ot((O(),J("i",null,[...l[6]||(l[6]=[_("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[_("path",{d:"M6.99967 13.6663C3.31777 13.6663 0.333008 10.6815 0.333008 6.99967C0.333008 3.31777 3.31777 0.333008 6.99967 0.333008C10.6815 0.333008 13.6663 3.31777 13.6663 6.99967C13.6663 10.6815 10.6815 13.6663 6.99967 13.6663ZM6.99967 12.333C9.94521 12.333 12.333 9.94521 12.333 6.99967C12.333 4.05415 9.94521 1.66634 6.99967 1.66634C4.05415 1.66634 1.66634 4.05415 1.66634 6.99967C1.66634 9.94521 4.05415 12.333 6.99967 12.333ZM6.33301 3.66634H7.66634V4.99967H6.33301V3.66634ZM6.33301 6.33301H7.66634V10.333H6.33301V6.33301Z",fill:"var(--gray-500)"})],-1)])])),[[z(Vo),{placement:"top",title:r.emptyEmailComponentTooltip}]])],2))])):(O(),J("div",{key:1,class:"bootstrap-styles w-100",style:he([z(foe)({paddings:n.emailComponent.Paddings,themeComponentPaddings:n.theme.ComponentPaddings,themeBodyPaddings:n.theme.BodyPaddings,fullWidth:n.emailComponent.FullWidth}),{backgroundColor:z(Nl)({color:n.emailComponent.InnerBgColor,themeColors:n.theme.Colors})||"transparent"}])},[ie(z(Rne),{type:"text"}),_("div",QTt,[(O(),J(rt,null,$n(3,u=>ie(z(Rne),{key:u,type:"image, text, text, text, button",style:{width:"100%"}})),64))])],4))}}),Mxe=ot(ZTt,[["__scopeId","data-v-7266764f"]]),ext={class:"scale-to-width-fit-component",style:{display:"inline-block","transform-origin":"left top"}},Oxe=Xe({__name:"ScaleToWidthFit",emits:["scaledElement"],setup(t,{emit:e}){const n=e;return(o,r)=>Ot((O(),J("div",ext,[j0(o.$slots,"default")])),[[z(fS),({width:i})=>{o.$el.style.transform=`scale(${o.$el.parentElement.clientWidth/i}`,n("scaledElement",o.$el)}]])}}),txt={title:"Preview",applyButton:"Select",cancelButton:"Cancel"},nxt={title:"Предпросмотр",applyButton:"Выбрать",cancelButton:"Отмена"},oP=Xn({en:txt,ru:nxt}),oxt={class:"email-template-preview__inner-padding scrollable"},rxt={class:"emailTemplate-border-top"},ixt={class:"emailTemplate-border-bottom"},sxt=Xe({__name:"EmailTemplatePreviewModalWindow",props:{template:{},deps:{}},emits:["favoriteTemplateSelected","close"],setup(t,{emit:e}){const n=t,o={title:oP({localeKey:n.deps.localeKey}).title,applyButton:oP({localeKey:n.deps.localeKey}).applyButton,cancelButton:oP({localeKey:n.deps.localeKey}).cancelButton},r=s=>{const a=s.parentElement;a&&(a.style.height=s.getBoundingClientRect().height+"px")},i=e;return(s,a)=>(O(),Ze(gxe,{headerText:o.title,class:"email-component__preview-modal-window",onClose:a[3]||(a[3]=()=>i("close"))},{body:Tu(()=>[_("div",{style:he({backgroundColor:t.template.Theme.Colors.EmailBackgroundColor})},[ie(Oxe,{onScaledElement:a[0]||(a[0]=l=>r(l))},{default:Tu(()=>[_("div",oxt,[_("div",{class:"bootstrap-styles pe-none email-template-preview",style:he({fontFamily:n.template.Theme.FontFamily,width:t.template.Theme.BodyWidth+"px"})},[_("div",{class:"webkit emailTemplate--desktop",style:he({borderTopLeftRadius:n.template.Theme.BorderRadius.TopLeft+"px",borderTopRightRadius:n.template.Theme.BorderRadius.TopRight+"px",borderBottomLeftRadius:n.template.Theme.BorderRadius.BottomLeft+"px",borderBottomRightRadius:n.template.Theme.BorderRadius.BottomRight+"px"})},[_("div",rxt,[_("table",{style:he([[{maxWidth:n.template.Theme.BodyWidth+"px",width:"100%"}],{"border-spacing":"0"}])},[_("tbody",null,[_("tr",null,[_("td",{style:he([{paddingTop:n.template.Theme.BodyPaddings.Top+"px"},{"font-size":"0","line-height":"0"}])},"   ",4)])])],4)]),(O(!0),J(rt,null,$n(n.template.Components,(l,u)=>(O(),J("div",{key:u},[ie(Mxe,{deps:t.deps.emailComponentDeps,theme:n.template.Theme,emailComponent:l,path:[],selectedElementPath:[]},null,8,["deps","theme","emailComponent"])]))),128)),_("div",ixt,[_("table",{style:he([[{maxWidth:n.template.Theme.BodyWidth+"px",width:"100%"}],{"border-spacing":"0"}])},[_("tbody",null,[_("tr",null,[_("td",{style:he([{paddingBottom:n.template.Theme.BodyPaddings.Bottom+"px"},{"font-size":"0","line-height":"0"}])},"   ",4)])])],4)])],4)],4)])]),_:1})],4)]),"footer-actions":Tu(()=>[_("button",{type:"button",class:"modal-footer__button bootstrap-styles d-flex justify-content-center align-center py-1 px-3 me-3 rounded-2 bg-blue-selected button__hover-blue-100 text-color-selected",onClick:a[1]||(a[1]=zo(()=>i("close"),["stop"]))},Gt(o.cancelButton),1),_("button",{type:"submit",class:"modal-footer__button bootstrap-styles d-flex justify-content-center align-center py-1 px-3 rounded-2 bg-color-selected text-white cursor-pointer button__hover-blue-400",onClick:a[2]||(a[2]=()=>{i("favoriteTemplateSelected")})},Gt(o.applyButton),1)]),_:1},8,["headerText"]))}}),axt=ot(sxt,[["__scopeId","data-v-a7898fb0"]]),lxt={class:"favorite-template-select__item-wrapper"},uxt={class:"favorite-template-select__item bootstrap-styles border rounded-3"},cxt={class:"email-template-preview__inner-padding scrollable"},dxt={class:"emailTemplate-border-top"},hxt={class:"emailTemplate-border-bottom"},mxt=Xe({__name:"EmailTemplatePreviewTile",props:{deps:{},template:{},templateName:{}},emits:["favoriteTemplateSelected"],setup(t,{emit:e}){Im(k=>({v3871f1be:s.value,v115088ee:a.value,v05d440ec:i.value.Title.fontWeight,v40460f14:i.value.Title.fontFamily,v7063b1a0:i.value.Title.color,v354cb820:i.value.Title.textDecoration,v7b95965f:i.value.Title.fontStyle,v06e67430:l.value,v200e2d33:u.value,v330c0660:i.value.Heading.fontWeight,v15d31f4c:i.value.Heading.fontFamily,d0cbc5ec:i.value.Heading.color,b8f0f814:i.value.Heading.textDecoration,v01743cc9:i.value.Heading.fontStyle,v5da513c8:c.value,v4f43a067:d.value,v59536306:i.value.SubHeading.fontWeight,v3c1a7bf2:i.value.SubHeading.fontFamily,v3768f0a4:i.value.SubHeading.color,v67e41d9c:i.value.SubHeading.textDecoration,v9fc8993a:i.value.SubHeading.fontStyle,v40ba636e:h.value,v0f4a8139:m.value,v15a6734c:i.value.LargeText.fontWeight,v50184174:i.value.LargeText.fontFamily,v92a86e60:i.value.LargeText.color,v32189220:i.value.LargeText.textDecoration,b6c2d4e2:i.value.LargeText.fontStyle,v28021f2e:f.value,v43924cf9:p.value,v224b6e98:i.value.NormalText.fontWeight,v5cbd3cc0:i.value.NormalText.fontFamily,v89ce9394:i.value.NormalText.color,v6f047c4a:i.value.NormalText.textDecoration,b72b4016:i.value.NormalText.fontStyle,v1182ba2f:g.value,v614fa88c:y.value,d7e5748e:i.value.DescriptionText.fontWeight,v76d45ea5:i.value.DescriptionText.fontFamily,v3502ea11:i.value.DescriptionText.color,v18b76ecf:i.value.DescriptionText.textDecoration,v17dda360:i.value.DescriptionText.fontStyle,v48efd5f4:b.value,v40252b82:F.value,v5c4cc5ee:i.value.Link.fontWeight,v3f13deda:i.value.Link.fontFamily,e8f14688:i.value.Link.color,v8fbc66f8:i.value.Link.textDecoration,v8f13590a:i.value.Link.fontStyle,v086d82ac:v.value,v929a6e12:T.value,v89491a14:i.value.Button.fontWeight,c3bae83c:i.value.Button.fontFamily,c89aaa98:i.value.Button.color,v6682b58c:i.value.Button.textDecoration,v05d9e573:i.value.Button.fontStyle}));const n=t,o=Vt({isPreviewComponentModalWindowShown:!1}),r=k=>{const R=k.parentElement;R&&(R.style.height=k.getBoundingClientRect().height+"px")},i=q(()=>{const{FontFamily:k,FontSettingsPresets:R,Colors:D}=n.template.Theme;return{Title:us({fontFamily:k,themeFontSettings:R.Title,themeColor:D.TitleColor}),Heading:us({fontFamily:k,themeFontSettings:R.Heading,themeColor:D.HeadingColor}),SubHeading:us({fontFamily:k,themeFontSettings:R.SubHeading,themeColor:D.SubHeadingColor}),LargeText:us({fontFamily:k,themeFontSettings:R.LargeText,themeColor:D.LargeTextColor}),NormalText:us({fontFamily:k,themeFontSettings:R.NormalText,themeColor:D.NormalTextColor}),DescriptionText:us({fontFamily:k,themeFontSettings:R.DescriptionText,themeColor:D.DescriptionTextColor}),Link:us({fontFamily:k,themeFontSettings:R.Link,themeColor:D.LinkColor}),Button:us({fontFamily:k,themeFontSettings:R.Button,themeColor:D.ButtonTextColor})}}),s=q(()=>i.value.Title.fontSize+"px"),a=q(()=>i.value.Title.lineHeight+"px"),l=q(()=>i.value.Heading.fontSize+"px"),u=q(()=>i.value.Heading.lineHeight+"px"),c=q(()=>i.value.SubHeading.fontSize+"px"),d=q(()=>i.value.SubHeading.lineHeight+"px"),h=q(()=>i.value.LargeText.fontSize+"px"),m=q(()=>i.value.LargeText.lineHeight+"px"),f=q(()=>i.value.NormalText.fontSize+"px"),p=q(()=>i.value.NormalText.lineHeight+"px"),g=q(()=>i.value.DescriptionText.fontSize+"px"),y=q(()=>i.value.DescriptionText.lineHeight+"px"),b=q(()=>i.value.Link.fontSize+"px"),F=q(()=>i.value.Link.lineHeight+"px"),v=q(()=>i.value.Button.fontSize+"px"),T=q(()=>i.value.Button.lineHeight+"px"),w=e;return(k,R)=>(O(),J("div",lxt,[_("div",uxt,[_("div",{class:"bootstrap-styles h-100",style:he({backgroundColor:n.template.Theme.Colors.EmailBackgroundColor}),onClick:R[1]||(R[1]=()=>{o.isPreviewComponentModalWindowShown=!0})},[ie(Oxe,{onScaledElement:R[0]||(R[0]=D=>r(D))},{default:Tu(()=>[_("div",cxt,[_("div",{class:"bootstrap-styles pe-none email-template-preview",style:he({fontFamily:n.template.Theme.FontFamily,width:t.template.Theme.BodyWidth+"px"})},[_("div",{class:"webkit emailTemplate--desktop",style:he({backgroundColor:n.template.Theme.Colors.BodyColor,borderTopLeftRadius:n.template.Theme.BorderRadius.TopLeft+"px",borderTopRightRadius:n.template.Theme.BorderRadius.TopRight+"px",borderBottomLeftRadius:n.template.Theme.BorderRadius.BottomLeft+"px",borderBottomRightRadius:n.template.Theme.BorderRadius.BottomRight+"px"})},[_("div",dxt,[_("table",{style:he([[{maxWidth:n.template.Theme.BodyWidth+"px",width:"100%"}],{"border-spacing":"0"}])},[_("tbody",null,[_("tr",null,[_("td",{style:he([{paddingTop:n.template.Theme.BodyPaddings.Top+"px"},{"font-size":"0","line-height":"0"}])},"   ",4)])])],4)]),(O(!0),J(rt,null,$n(n.template.Components,(D,V)=>(O(),J("div",{key:V},[ie(Mxe,{deps:n.deps.emailComponentDeps,theme:n.template.Theme,emailComponent:D,path:[],selectedElementPath:[]},null,8,["deps","theme","emailComponent"])]))),128)),_("div",hxt,[_("table",{style:he([[{maxWidth:n.template.Theme.BodyWidth+"px",width:"100%"}],{"border-spacing":"0"}])},[_("tbody",null,[_("tr",null,[_("td",{style:he([{paddingBottom:n.template.Theme.BodyPaddings.Bottom+"px"},{"font-size":"0","line-height":"0"}])},"   ",4)])])],4)])],4)],4)])]),_:1})],4),(O(),Ze(m9,{to:"#app"},[o.isPreviewComponentModalWindowShown?(O(),Ze(axt,{key:0,template:n.template,deps:n.deps.emailTemplatePreviewModalWindowDeps,onClose:R[2]||(R[2]=()=>o.isPreviewComponentModalWindowShown=!1),onFavoriteTemplateSelected:R[3]||(R[3]=()=>w("favoriteTemplateSelected"))},null,8,["template","deps"])):Ue("",!0)]))]),_("div",{class:"bootstrap-styles favorite-template__name mt-2",onClick:R[4]||(R[4]=()=>{o.isPreviewComponentModalWindowShown=!0})},Gt(n.templateName),1)]))}}),fxt=ot(mxt,[["__scopeId","data-v-66b13e3f"]]),pxt=t=>ec(t),gxt=t=>ec(t),Cxt=t=>ec(t),yxt=t=>ec(t),bxt=t=>({predicate:e,context:n})=>Promise.all([t.numberExpressionEvaluator({numberExpression:e.Left,context:n}),t.numberExpressionEvaluator({numberExpression:e.Right,context:n})]).then(([o,r])=>o===r),vxt=t=>({predicate:e,context:n})=>Promise.all([t.numberExpressionEvaluator({numberExpression:e.Left,context:n}),t.numberExpressionEvaluator({numberExpression:e.Right,context:n})]).then(([o,r])=>o<r),Txt=t=>({predicate:e,context:n})=>Promise.all([t.numberExpressionEvaluator({numberExpression:e.Left,context:n}),t.numberExpressionEvaluator({numberExpression:e.Right,context:n})]).then(([o,r])=>o>r),xxt=t=>{const e=bxt({numberExpressionEvaluator:t.numberExpressionEvaluator}),n=Txt({numberExpressionEvaluator:t.numberExpressionEvaluator}),o=vxt({numberExpressionEvaluator:t.numberExpressionEvaluator});return({numberPredicate:r,context:i})=>yxt(r).Match({Equal:s=>e({predicate:s,context:i}),GreaterThan:s=>n({predicate:s,context:i}),LessThan:s=>o({predicate:s,context:i})})},Fxt=t=>({predicate:e,context:n})=>Promise.all([t.stringExpressionEvaluator({stringExpression:e.Left,context:n}),t.stringExpressionEvaluator({stringExpression:e.Right,context:n})]).then(([o,r])=>o===r),Sxt=t=>({predicate:e,context:n})=>Promise.all([t.stringExpressionEvaluator({stringExpression:e.Left,context:n}),t.stringExpressionEvaluator({stringExpression:e.Contains,context:n})]).then(([o,r])=>o.includes(r)),wxt=t=>{const e=Fxt({stringExpressionEvaluator:t.stringExpressionEvaluator}),n=Sxt({stringExpressionEvaluator:t.stringExpressionEvaluator});return({stringPredicate:o,context:r})=>Cxt(o).Match({Contains:i=>n({predicate:i,context:r}),Equal:i=>e({predicate:i,context:r})})},kxt=t=>{const e=xxt({numberExpressionEvaluator:t.numberExpressionEvaluator}),n=wxt({stringExpressionEvaluator:t.stringExpressionEvaluator});return({predicate:o,context:r})=>gxt(o).Match({NumberPredicate:i=>e({numberPredicate:i,context:r}),StringPredicate:i=>n({stringPredicate:i,context:r})})},Ixe=t=>{const e=kxt({numberExpressionEvaluator:t.numberExpressionEvaluator,stringExpressionEvaluator:t.stringExpressionEvaluator}),n=({boolExpression:o,context:r})=>pxt(o).Match({AndExpression:i=>Promise.all(i.Expressions.map(s=>n({boolExpression:s,context:r}))).then(s=>s.every(a=>a)),OrExpression:i=>Promise.all(i.Expressions.map(s=>n({boolExpression:s,context:r}))).then(s=>s.some(a=>a)),NotExpression:async i=>!await n({boolExpression:i.Expression,context:r}),Predicate:i=>e({predicate:i,context:r})});return n},Ext=t=>Xe((e,n)=>()=>Ju(fxt,{template:t.template,templateName:t.templateName,deps:t.emailTemplatePreviewTileDeps,onFavoriteTemplateSelected:t.onFavoriteTemplateSelected})),Pxe=t=>t.reduce((e,n)=>(e[n.name]=n.value,e),{}),uC=t=>q1e({InternalProductId:t.internalProductId,Name:t.name,Description:t.description,Price:t.price,OldPrice:t.oldPrice,PictureUrl:t.pictureUrl,Url:t.url,CategoryIds:[],Vendor:t.vendor,Params:Pxe(t.parameters),DiscountPercentage:t.discountPercentage}),_xt=async t=>(await t.getPopularProductsHttpClient({body:{partnerId:t.partnerId,stockId:t.stockId}})).body.recommendations.map(e=>uC(e));var Rxt=typeof global=="object"&&global&&global.Object===Object&&global,Dxt=typeof self=="object"&&self&&self.Object===Object&&self,Axt=Rxt||Dxt||Function("return this")(),VN=Axt.Symbol;VN&&VN.toStringTag;VN&&VN.toStringTag;const{entries:Wxe,setPrototypeOf:Aoe,isFrozen:Nxt,getPrototypeOf:Bxt,getOwnPropertyDescriptor:Lxt}=Object;let{freeze:Di,seal:Pa,create:P5}=Object,{apply:W5,construct:H5}=typeof Reflect<"u"&&Reflect;Di||(Di=function(t){return t});Pa||(Pa=function(t){return t});W5||(W5=function(t,e){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return t.apply(e,o)});H5||(H5=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return new t(...n)});const DE=Ai(Array.prototype.forEach),$xt=Ai(Array.prototype.lastIndexOf),Noe=Ai(Array.prototype.pop),T1=Ai(Array.prototype.push),Vxt=Ai(Array.prototype.splice),VR=Ai(String.prototype.toLowerCase),rP=Ai(String.prototype.toString),iP=Ai(String.prototype.match),x1=Ai(String.prototype.replace),Mxt=Ai(String.prototype.indexOf),Oxt=Ai(String.prototype.trim),fl=Ai(Object.prototype.hasOwnProperty),qr=Ai(RegExp.prototype.test),F1=Ixt(TypeError);function Ai(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return W5(t,e,o)}}function Ixt(t){return function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return H5(t,n)}}function Wt(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:VR;Aoe&&Aoe(t,null);let o=e.length;for(;o--;){let r=e[o];if(typeof r=="string"){const i=n(r);i!==r&&(Nxt(e)||(e[o]=i),r=i)}t[r]=!0}return t}function Pxt(t){for(let e=0;e<t.length;e++)fl(t,e)||(t[e]=null);return t}function Ql(t){const e=P5(null);for(const[n,o]of Wxe(t))fl(t,n)&&(Array.isArray(o)?e[n]=Pxt(o):o&&typeof o=="object"&&o.constructor===Object?e[n]=Ql(o):e[n]=o);return e}function S1(t,e){for(;t!==null;){const o=Lxt(t,e);if(o){if(o.get)return Ai(o.get);if(typeof o.value=="function")return Ai(o.value)}t=Bxt(t)}function n(){return null}return n}const Boe=Di(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),sP=Di(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),aP=Di(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Wxt=Di(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),lP=Di(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Hxt=Di(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Loe=Di(["#text"]),$oe=Di(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),uP=Di(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Voe=Di(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),AE=Di(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),zxt=Pa(/\{\{[\w\W]*|[\w\W]*\}\}/gm),jxt=Pa(/<%[\w\W]*|[\w\W]*%>/gm),Uxt=Pa(/\$\{[\w\W]*/gm),Kxt=Pa(/^data-[\-\w.\u00B7-\uFFFF]+$/),qxt=Pa(/^aria-[\-\w]+$/),Hxe=Pa(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Jxt=Pa(/^(?:\w+script|data):/i),Gxt=Pa(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zxe=Pa(/^html$/i),Yxt=Pa(/^[a-z][.\w]*(-[.\w]+)+$/i);var Moe=Object.freeze({__proto__:null,ARIA_ATTR:qxt,ATTR_WHITESPACE:Gxt,CUSTOM_ELEMENT:Yxt,DATA_ATTR:Kxt,DOCTYPE_NAME:zxe,ERB_EXPR:jxt,IS_ALLOWED_URI:Hxe,IS_SCRIPT_OR_DATA:Jxt,MUSTACHE_EXPR:zxt,TMPLIT_EXPR:Uxt});const w1={element:1,text:3,progressingInstruction:7,comment:8,document:9},Xxt=function(){return typeof window>"u"?null:window},Qxt=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const o="data-tt-policy-suffix";e&&e.hasAttribute(o)&&(n=e.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return t.createPolicy(r,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},Ooe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function jxe(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xxt();const e=C=>jxe(C);if(e.version="3.3.1",e.removed=[],!t||!t.document||t.document.nodeType!==w1.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const o=n,r=o.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:u,NamedNodeMap:c=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:m}=t,f=l.prototype,p=S1(f,"cloneNode"),g=S1(f,"remove"),y=S1(f,"nextSibling"),b=S1(f,"childNodes"),F=S1(f,"parentNode");if(typeof s=="function"){const C=n.createElement("template");C.content&&C.content.ownerDocument&&(n=C.content.ownerDocument)}let v,T="";const{implementation:w,createNodeIterator:k,createDocumentFragment:R,getElementsByTagName:D}=n,{importNode:V}=o;let E=Ooe();e.isSupported=typeof Wxe=="function"&&typeof F=="function"&&w&&w.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:A,ERB_EXPR:N,TMPLIT_EXPR:I,DATA_ATTR:M,ARIA_ATTR:$,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:ke,CUSTOM_ELEMENT:Oe}=Moe;let{IS_ALLOWED_URI:ve}=Moe,K=null;const Pe=Wt({},[...Boe,...sP,...aP,...lP,...Loe]);let Y=null;const He=Wt({},[...$oe,...uP,...Voe,...AE]);let P=Object.seal(P5(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ee=null,ae=null;const ne=Object.seal(P5(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let St=!0,vt=!0,Tt=!1,B=!0,L=!1,j=!0,G=!1,Q=!1,Z=!1,te=!1,oe=!1,U=!1,X=!0,Ve=!1;const ce="user-content-";let ue=!0,de=!1,Te={},le=null;const ze=Wt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let cn=null;const dn=Wt({},["audio","video","img","source","image","track"]);let sn=null;const bn=Wt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),nn="http://www.w3.org/1998/Math/MathML",hn="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml";let ft=Ke,An=!1,Nn=null;const il=Wt({},[nn,hn,Ke],rP);let gn=Wt({},["mi","mo","mn","ms","mtext"]),Cn=Wt({},["annotation-xml"]);const sl=Wt({},["title","style","font","a","script"]);let on=null;const al=["application/xhtml+xml","text/html"],ll="text/html";let re=null,Rt=null;const ul=n.createElement("form"),lr=function(C){return C instanceof RegExp||C instanceof Function},Qn=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Rt&&Rt===C)){if((!C||typeof C!="object")&&(C={}),C=Ql(C),on=al.indexOf(C.PARSER_MEDIA_TYPE)===-1?ll:C.PARSER_MEDIA_TYPE,re=on==="application/xhtml+xml"?rP:VR,K=fl(C,"ALLOWED_TAGS")?Wt({},C.ALLOWED_TAGS,re):Pe,Y=fl(C,"ALLOWED_ATTR")?Wt({},C.ALLOWED_ATTR,re):He,Nn=fl(C,"ALLOWED_NAMESPACES")?Wt({},C.ALLOWED_NAMESPACES,rP):il,sn=fl(C,"ADD_URI_SAFE_ATTR")?Wt(Ql(bn),C.ADD_URI_SAFE_ATTR,re):bn,cn=fl(C,"ADD_DATA_URI_TAGS")?Wt(Ql(dn),C.ADD_DATA_URI_TAGS,re):dn,le=fl(C,"FORBID_CONTENTS")?Wt({},C.FORBID_CONTENTS,re):ze,Ee=fl(C,"FORBID_TAGS")?Wt({},C.FORBID_TAGS,re):Ql({}),ae=fl(C,"FORBID_ATTR")?Wt({},C.FORBID_ATTR,re):Ql({}),Te=fl(C,"USE_PROFILES")?C.USE_PROFILES:!1,St=C.ALLOW_ARIA_ATTR!==!1,vt=C.ALLOW_DATA_ATTR!==!1,Tt=C.ALLOW_UNKNOWN_PROTOCOLS||!1,B=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,L=C.SAFE_FOR_TEMPLATES||!1,j=C.SAFE_FOR_XML!==!1,G=C.WHOLE_DOCUMENT||!1,te=C.RETURN_DOM||!1,oe=C.RETURN_DOM_FRAGMENT||!1,U=C.RETURN_TRUSTED_TYPE||!1,Z=C.FORCE_BODY||!1,X=C.SANITIZE_DOM!==!1,Ve=C.SANITIZE_NAMED_PROPS||!1,ue=C.KEEP_CONTENT!==!1,de=C.IN_PLACE||!1,ve=C.ALLOWED_URI_REGEXP||Hxe,ft=C.NAMESPACE||Ke,gn=C.MATHML_TEXT_INTEGRATION_POINTS||gn,Cn=C.HTML_INTEGRATION_POINTS||Cn,P=C.CUSTOM_ELEMENT_HANDLING||{},C.CUSTOM_ELEMENT_HANDLING&&lr(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(P.tagNameCheck=C.CUSTOM_ELEMENT_HANDLING.tagNameCheck),C.CUSTOM_ELEMENT_HANDLING&&lr(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(P.attributeNameCheck=C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(P.allowCustomizedBuiltInElements=C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),L&&(vt=!1),oe&&(te=!0),Te&&(K=Wt({},Loe),Y=[],Te.html===!0&&(Wt(K,Boe),Wt(Y,$oe)),Te.svg===!0&&(Wt(K,sP),Wt(Y,uP),Wt(Y,AE)),Te.svgFilters===!0&&(Wt(K,aP),Wt(Y,uP),Wt(Y,AE)),Te.mathMl===!0&&(Wt(K,lP),Wt(Y,Voe),Wt(Y,AE))),C.ADD_TAGS&&(typeof C.ADD_TAGS=="function"?ne.tagCheck=C.ADD_TAGS:(K===Pe&&(K=Ql(K)),Wt(K,C.ADD_TAGS,re))),C.ADD_ATTR&&(typeof C.ADD_ATTR=="function"?ne.attributeCheck=C.ADD_ATTR:(Y===He&&(Y=Ql(Y)),Wt(Y,C.ADD_ATTR,re))),C.ADD_URI_SAFE_ATTR&&Wt(sn,C.ADD_URI_SAFE_ATTR,re),C.FORBID_CONTENTS&&(le===ze&&(le=Ql(le)),Wt(le,C.FORBID_CONTENTS,re)),C.ADD_FORBID_CONTENTS&&(le===ze&&(le=Ql(le)),Wt(le,C.ADD_FORBID_CONTENTS,re)),ue&&(K["#text"]=!0),G&&Wt(K,["html","head","body"]),K.table&&(Wt(K,["tbody"]),delete Ee.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw F1('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw F1('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=C.TRUSTED_TYPES_POLICY,T=v.createHTML("")}else v===void 0&&(v=Qxt(m,r)),v!==null&&typeof T=="string"&&(T=v.createHTML(""));Di&&Di(C),Rt=C}},ur=Wt({},[...sP,...aP,...Wxt]),cr=Wt({},[...lP,...Hxt]),cl=function(C){let x=F(C);(!x||!x.tagName)&&(x={namespaceURI:ft,tagName:"template"});const S=VR(C.tagName),W=VR(x.tagName);return Nn[C.namespaceURI]?C.namespaceURI===hn?x.namespaceURI===Ke?S==="svg":x.namespaceURI===nn?S==="svg"&&(W==="annotation-xml"||gn[W]):!!ur[S]:C.namespaceURI===nn?x.namespaceURI===Ke?S==="math":x.namespaceURI===hn?S==="math"&&Cn[W]:!!cr[S]:C.namespaceURI===Ke?x.namespaceURI===hn&&!Cn[W]||x.namespaceURI===nn&&!gn[W]?!1:!cr[S]&&(sl[S]||!ur[S]):!!(on==="application/xhtml+xml"&&Nn[C.namespaceURI]):!1},gt=function(C){T1(e.removed,{element:C});try{F(C).removeChild(C)}catch{g(C)}},Ft=function(C,x){try{T1(e.removed,{attribute:x.getAttributeNode(C),from:x})}catch{T1(e.removed,{attribute:null,from:x})}if(x.removeAttribute(C),C==="is")if(te||oe)try{gt(x)}catch{}else try{x.setAttribute(C,"")}catch{}},dr=function(C){let x=null,S=null;if(Z)C="<remove></remove>"+C;else{const ee=iP(C,/^[\r\n\t ]+/);S=ee&&ee[0]}on==="application/xhtml+xml"&&ft===Ke&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");const W=v?v.createHTML(C):C;if(ft===Ke)try{x=new h().parseFromString(W,on)}catch{}if(!x||!x.documentElement){x=w.createDocument(ft,"template",null);try{x.documentElement.innerHTML=An?T:W}catch{}}const se=x.body||x.documentElement;return C&&S&&se.insertBefore(n.createTextNode(S),se.childNodes[0]||null),ft===Ke?D.call(x,G?"html":"body")[0]:G?x.documentElement:se},hr=function(C){return k.call(C.ownerDocument||C,C,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Zn=function(C){return C instanceof d&&(typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||!(C.attributes instanceof c)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function")},mr=function(C){return typeof a=="function"&&C instanceof a};function it(C,x,S){DE(C,W=>{W.call(e,x,S,Rt)})}const fr=function(C){let x=null;if(it(E.beforeSanitizeElements,C,null),Zn(C))return gt(C),!0;const S=re(C.nodeName);if(it(E.uponSanitizeElement,C,{tagName:S,allowedTags:K}),j&&C.hasChildNodes()&&!mr(C.firstElementChild)&&qr(/<[/\w!]/g,C.innerHTML)&&qr(/<[/\w!]/g,C.textContent)||C.nodeType===w1.progressingInstruction||j&&C.nodeType===w1.comment&&qr(/<[/\w]/g,C.data))return gt(C),!0;if(!(ne.tagCheck instanceof Function&&ne.tagCheck(S))&&(!K[S]||Ee[S])){if(!Ee[S]&&gr(S)&&(P.tagNameCheck instanceof RegExp&&qr(P.tagNameCheck,S)||P.tagNameCheck instanceof Function&&P.tagNameCheck(S)))return!1;if(ue&&!le[S]){const W=F(C)||C.parentNode,se=b(C)||C.childNodes;if(se&&W){const ee=se.length;for(let qe=ee-1;qe>=0;--qe){const je=p(se[qe],!0);je.__removalCount=(C.__removalCount||0)+1,W.insertBefore(je,y(C))}}}return gt(C),!0}return C instanceof l&&!cl(C)||(S==="noscript"||S==="noembed"||S==="noframes")&&qr(/<\/no(script|embed|frames)/i,C.innerHTML)?(gt(C),!0):(L&&C.nodeType===w1.text&&(x=C.textContent,DE([A,N,I],W=>{x=x1(x,W," ")}),C.textContent!==x&&(T1(e.removed,{element:C.cloneNode()}),C.textContent=x)),it(E.afterSanitizeElements,C,null),!1)},pr=function(C,x,S){if(X&&(x==="id"||x==="name")&&(S in n||S in ul))return!1;if(!(vt&&!ae[x]&&qr(M,x))&&!(St&&qr($,x))&&!(ne.attributeCheck instanceof Function&&ne.attributeCheck(x,C))){if(!Y[x]||ae[x]){if(!(gr(C)&&(P.tagNameCheck instanceof RegExp&&qr(P.tagNameCheck,C)||P.tagNameCheck instanceof Function&&P.tagNameCheck(C))&&(P.attributeNameCheck instanceof RegExp&&qr(P.attributeNameCheck,x)||P.attributeNameCheck instanceof Function&&P.attributeNameCheck(x,C))||x==="is"&&P.allowCustomizedBuiltInElements&&(P.tagNameCheck instanceof RegExp&&qr(P.tagNameCheck,S)||P.tagNameCheck instanceof Function&&P.tagNameCheck(S))))return!1}else if(!sn[x]&&!qr(ve,x1(S,ke,""))&&!((x==="src"||x==="xlink:href"||x==="href")&&C!=="script"&&Mxt(S,"data:")===0&&cn[C])&&!(Tt&&!qr(H,x1(S,ke,"")))&&S)return!1}return!0},gr=function(C){return C!=="annotation-xml"&&iP(C,Oe)},Cr=function(C){it(E.beforeSanitizeAttributes,C,null);const{attributes:x}=C;if(!x||Zn(C))return;const S={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y,forceKeepAttr:void 0};let W=x.length;for(;W--;){const se=x[W],{name:ee,namespaceURI:qe,value:je}=se,Qe=re(ee),Bn=je;let _e=ee==="value"?Bn:Oxt(Bn);if(S.attrName=Qe,S.attrValue=_e,S.keepAttr=!0,S.forceKeepAttr=void 0,it(E.uponSanitizeAttribute,C,S),_e=S.attrValue,Ve&&(Qe==="id"||Qe==="name")&&(Ft(ee,C),_e=ce+_e),j&&qr(/((--!?|])>)|<\/(style|title|textarea)/i,_e)){Ft(ee,C);continue}if(Qe==="attributename"&&iP(_e,"href")){Ft(ee,C);continue}if(S.forceKeepAttr)continue;if(!S.keepAttr){Ft(ee,C);continue}if(!B&&qr(/\/>/i,_e)){Ft(ee,C);continue}L&&DE([A,N,I],na=>{_e=x1(_e,na," ")});const mn=re(C.nodeName);if(!pr(mn,Qe,_e)){Ft(ee,C);continue}if(v&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!qe)switch(m.getAttributeType(mn,Qe)){case"TrustedHTML":{_e=v.createHTML(_e);break}case"TrustedScriptURL":{_e=v.createScriptURL(_e);break}}if(_e!==Bn)try{qe?C.setAttributeNS(qe,ee,_e):C.setAttribute(ee,_e),Zn(C)?gt(C):Noe(e.removed)}catch{Ft(ee,C)}}it(E.afterSanitizeAttributes,C,null)},dl=function C(x){let S=null;const W=hr(x);for(it(E.beforeSanitizeShadowDOM,x,null);S=W.nextNode();)it(E.uponSanitizeShadowNode,S,null),fr(S),Cr(S),S.content instanceof i&&C(S.content);it(E.afterSanitizeShadowDOM,x,null)};return e.sanitize=function(C){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=null,W=null,se=null,ee=null;if(An=!C,An&&(C="<!-->"),typeof C!="string"&&!mr(C))if(typeof C.toString=="function"){if(C=C.toString(),typeof C!="string")throw F1("dirty is not a string, aborting")}else throw F1("toString is not a function");if(!e.isSupported)return C;if(Q||Qn(x),e.removed=[],typeof C=="string"&&(de=!1),de){if(C.nodeName){const Qe=re(C.nodeName);if(!K[Qe]||Ee[Qe])throw F1("root node is forbidden and cannot be sanitized in-place")}}else if(C instanceof a)S=dr("<!---->"),W=S.ownerDocument.importNode(C,!0),W.nodeType===w1.element&&W.nodeName==="BODY"||W.nodeName==="HTML"?S=W:S.appendChild(W);else{if(!te&&!L&&!G&&C.indexOf("<")===-1)return v&&U?v.createHTML(C):C;if(S=dr(C),!S)return te?null:U?T:""}S&&Z&&gt(S.firstChild);const qe=hr(de?C:S);for(;se=qe.nextNode();)fr(se),Cr(se),se.content instanceof i&&dl(se.content);if(de)return C;if(te){if(oe)for(ee=R.call(S.ownerDocument);S.firstChild;)ee.appendChild(S.firstChild);else ee=S;return(Y.shadowroot||Y.shadowrootmode)&&(ee=V.call(o,ee,!0)),ee}let je=G?S.outerHTML:S.innerHTML;return G&&K["!doctype"]&&S.ownerDocument&&S.ownerDocument.doctype&&S.ownerDocument.doctype.name&&qr(zxe,S.ownerDocument.doctype.name)&&(je="<!DOCTYPE "+S.ownerDocument.doctype.name+`>
195
195
  `+je),L&&DE([A,N,I],Qe=>{je=x1(je,Qe," ")}),v&&U?v.createHTML(je):je},e.setConfig=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Qn(C),Q=!0},e.clearConfig=function(){Rt=null,Q=!1},e.isValidAttribute=function(C,x,S){Rt||Qn({});const W=re(C),se=re(x);return pr(W,se,S)},e.addHook=function(C,x){typeof x=="function"&&T1(E[C],x)},e.removeHook=function(C,x){if(x!==void 0){const S=$xt(E[C],x);return S===-1?void 0:Vxt(E[C],S,1)[0]}return Noe(E[C])},e.removeHooks=function(C){E[C]=[]},e.removeAllHooks=function(){E=Ooe()},e}jxe();function vr(t){this.content=t}vr.prototype={constructor:vr,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var o=n&&n!=t?this.remove(n):this,r=o.find(t),i=o.content.slice();return r==-1?i.push(n||t,e):(i[r+1]=e,n&&(i[r]=n)),new vr(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new vr(n)},addToStart:function(t,e){return new vr([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new vr(n)},addBefore:function(t,e,n){var o=this.remove(e),r=o.content.slice(),i=o.find(t);return r.splice(i==-1?r.length:i,0,e,n),new vr(r)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=vr.from(t),t.size?new vr(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=vr.from(t),t.size?new vr(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=vr.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};vr.from=function(t){if(t instanceof vr)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new vr(e)};function Uxe(t,e,n){for(let o=0;;o++){if(o==t.childCount||o==e.childCount)return t.childCount==e.childCount?null:n;let r=t.child(o),i=e.child(o);if(r==i){n+=r.nodeSize;continue}if(!r.sameMarkup(i))return n;if(r.isText&&r.text!=i.text){for(let s=0;r.text[s]==i.text[s];s++)n++;return n}if(r.content.size||i.content.size){let s=Uxe(r.content,i.content,n+1);if(s!=null)return s}n+=r.nodeSize}}function Kxe(t,e,n,o){for(let r=t.childCount,i=e.childCount;;){if(r==0||i==0)return r==i?null:{a:n,b:o};let s=t.child(--r),a=e.child(--i),l=s.nodeSize;if(s==a){n-=l,o-=l;continue}if(!s.sameMarkup(a))return{a:n,b:o};if(s.isText&&s.text!=a.text){let u=0,c=Math.min(s.text.length,a.text.length);for(;u<c&&s.text[s.text.length-u-1]==a.text[a.text.length-u-1];)u++,n--,o--;return{a:n,b:o}}if(s.content.size||a.content.size){let u=Kxe(s.content,a.content,n-1,o-1);if(u)return u}n-=l,o-=l}}let We=class Zr{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let o=0;o<e.length;o++)this.size+=e[o].nodeSize}nodesBetween(e,n,o,r=0,i){for(let s=0,a=0;a<n;s++){let l=this.content[s],u=a+l.nodeSize;if(u>e&&o(l,r+a,i||null,s)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,n-c),o,r+c)}a=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,o,r){let i="",s=!0;return this.nodesBetween(e,n,(a,l)=>{let u=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?r?typeof r=="function"?r(a):r:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&o&&(s?s=!1:i+=o),i+=u},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,o=e.firstChild,r=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(o)&&(r[r.length-1]=n.withText(n.text+o.text),i=1);i<e.content.length;i++)r.push(e.content[i]);return new Zr(r,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let o=[],r=0;if(n>e)for(let i=0,s=0;s<n;i++){let a=this.content[i],l=s+a.nodeSize;l>e&&((s<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,n-s-1))),o.push(a),r+=a.nodeSize),s=l}return new Zr(o,r)}cutByIndex(e,n){return e==n?Zr.empty:e==0&&n==this.content.length?this:new Zr(this.content.slice(e,n))}replaceChild(e,n){let o=this.content[e];if(o==n)return this;let r=this.content.slice(),i=this.size+n.nodeSize-o.nodeSize;return r[e]=n,new Zr(r,i)}addToStart(e){return new Zr([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Zr(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,o=0;n<this.content.length;n++){let r=this.content[n];e(r,o,n),o+=r.nodeSize}}findDiffStart(e,n=0){return Uxe(this,e,n)}findDiffEnd(e,n=this.size,o=e.size){return Kxe(this,e,n,o)}findIndex(e){if(e==0)return NE(0,e);if(e==this.size)return NE(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,o=0;;n++){let r=this.child(n),i=o+r.nodeSize;if(i>=e)return i==e?NE(n+1,i):NE(n,o);o=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return Zr.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Zr(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Zr.empty;let n,o=0;for(let r=0;r<e.length;r++){let i=e[r];o+=i.nodeSize,r&&i.isText&&e[r-1].sameMarkup(i)?(n||(n=e.slice(0,r)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new Zr(n||e,o)}static from(e){if(!e)return Zr.empty;if(e instanceof Zr)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Zr([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};We.empty=new We([],0);const cP={index:0,offset:0};function NE(t,e){return cP.index=t,cP.offset=e,cP}function MN(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let o=0;o<t.length;o++)if(!MN(t[o],e[o]))return!1}else{for(let o in t)if(!(o in e)||!MN(t[o],e[o]))return!1;for(let o in e)if(!(o in t))return!1}return!0}let Un=class z5{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,o=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,r));else{if(i.type.excludes(this.type))return e;!o&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,r)),n.push(this),o=!0),n&&n.push(i)}}return n||(n=e.slice()),o||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&MN(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let o=e.marks[n.type];if(!o)throw new RangeError(`There is no mark type ${n.type} in this schema`);let r=o.create(n.attrs);return o.checkAttrs(r.attrs),r}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let o=0;o<e.length;o++)if(!e[o].eq(n[o]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return z5.none;if(e instanceof z5)return[e];let n=e.slice();return n.sort((o,r)=>o.type.rank-r.type.rank),n}};Un.none=[];let ON=class extends Error{},tt=class Ay{constructor(e,n,o){this.content=e,this.openStart=n,this.openEnd=o}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let o=Jxe(this.content,e+this.openStart,n);return o&&new Ay(o,this.openStart,this.openEnd)}removeBetween(e,n){return new Ay(qxe(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return Ay.empty;let o=n.openStart||0,r=n.openEnd||0;if(typeof o!="number"||typeof r!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Ay(We.fromJSON(e,n.content),o,r)}static maxOpen(e,n=!0){let o=0,r=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)o++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)r++;return new Ay(e,o,r)}};tt.empty=new tt(We.empty,0,0);function qxe(t,e,n){let{index:o,offset:r}=t.findIndex(e),i=t.maybeChild(o),{index:s,offset:a}=t.findIndex(n);if(r==e||i.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(o!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(o,i.copy(qxe(i.content,e-r-1,n-r-1)))}function Jxe(t,e,n,o){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r);if(i==e||s.isText)return o&&!o.canReplace(r,r,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=Jxe(s.content,e-i-1,n,s);return a&&t.replaceChild(r,s.copy(a))}function Zxt(t,e,n){if(n.openStart>t.depth)throw new ON("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new ON("Inconsistent open depths");return Gxe(t,e,n,0)}function Gxe(t,e,n,o){let r=t.index(o),i=t.node(o);if(r==e.index(o)&&o<t.depth-n.openStart){let s=Gxe(t,e,n,o+1);return i.copy(i.content.replaceChild(r,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==o&&e.depth==o){let s=t.parent,a=s.content;return Ip(s,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=eFt(n,t);return Ip(i,Xxe(t,s,a,e,o))}else return Ip(i,IN(t,e,o))}function Yxe(t,e){if(!e.type.compatibleContent(t.type))throw new ON("Cannot join "+e.type.name+" onto "+t.type.name)}function j5(t,e,n){let o=t.node(n);return Yxe(o,e.node(n)),o}function Op(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Dx(t,e,n,o){let r=(e||t).node(n),i=0,s=e?e.index(n):r.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(Op(t.nodeAfter,o),i++));for(let a=i;a<s;a++)Op(r.child(a),o);e&&e.depth==n&&e.textOffset&&Op(e.nodeBefore,o)}function Ip(t,e){return t.type.checkContent(e),t.copy(e)}function Xxe(t,e,n,o,r){let i=t.depth>r&&j5(t,e,r+1),s=o.depth>r&&j5(n,o,r+1),a=[];return Dx(null,t,r,a),i&&s&&e.index(r)==n.index(r)?(Yxe(i,s),Op(Ip(i,Xxe(t,e,n,o,r+1)),a)):(i&&Op(Ip(i,IN(t,e,r+1)),a),Dx(e,n,r,a),s&&Op(Ip(s,IN(n,o,r+1)),a)),Dx(o,null,r,a),new We(a)}function IN(t,e,n){let o=[];if(Dx(null,t,n,o),t.depth>n){let r=j5(t,e,n+1);Op(Ip(r,IN(t,e,n+1)),o)}return Dx(e,null,n,o),new We(o)}function eFt(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let r=n-1;r>=0;r--)o=e.node(r).copy(We.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}let Ioe=class U5{constructor(e,n,o){this.pos=e,this.path=n,this.parentOffset=o,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let o=this.pos-this.path[this.path.length-1],r=e.child(n);return o?e.child(n).cut(o):r}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let o=this.path[n*3],r=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)r+=o.child(i).nodeSize;return r}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return Un.none;if(this.textOffset)return e.child(n).marks;let o=e.maybeChild(n-1),r=e.maybeChild(n);if(!o){let a=o;o=r,r=a}let i=o.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!r||!i[s].isInSet(r.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let o=n.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<o.length;i++)o[i].type.spec.inclusive===!1&&(!r||!o[i].isInSet(r.marks))&&(o=o[i--].removeFromSet(o));return o}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let o=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);o>=0;o--)if(e.pos<=this.end(o)&&(!n||n(this.node(o))))return new PN(this,e,o);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let o=[],r=0,i=n;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(i),u=i-l;if(o.push(s,a,r+l),!u||(s=s.child(a),s.isText))break;i=u-1,r+=l+1}return new U5(n,o,i)}static resolveCached(e,n){let o=Poe.get(e);if(o)for(let i=0;i<o.elts.length;i++){let s=o.elts[i];if(s.pos==n)return s}else Poe.set(e,o=new tFt);let r=o.elts[o.i]=U5.resolve(e,n);return o.i=(o.i+1)%nFt,r}};class tFt{constructor(){this.elts=[],this.i=0}}const nFt=12,Poe=new WeakMap;let PN=class{constructor(e,n,o){this.$from=e,this.$to=n,this.depth=o}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}};const oFt=Object.create(null);let Pp=class K5{constructor(e,n,o,r=Un.none){this.type=e,this.attrs=n,this.marks=r,this.content=o||We.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,o,r=0){this.content.nodesBetween(e,n,o,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,o,r){return this.content.textBetween(e,n,o,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,o){return this.type==e&&MN(this.attrs,n||e.defaultAttrs||oFt)&&Un.sameSet(this.marks,o||Un.none)}copy(e=null){return e==this.content?this:new K5(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new K5(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,o=!1){if(e==n)return tt.empty;let r=this.resolve(e),i=this.resolve(n),s=o?0:r.sharedDepth(n),a=r.start(s),l=r.node(s).content.cut(r.pos-a,i.pos-a);return new tt(l,r.depth-s,i.depth-s)}replace(e,n,o){return Zxt(this.resolve(e),this.resolve(n),o)}nodeAt(e){for(let n=this;;){let{index:o,offset:r}=n.content.findIndex(e);if(n=n.maybeChild(o),!n)return null;if(r==e||n.isText)return n;e-=r+1}}childAfter(e){let{index:n,offset:o}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:o}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:o}=this.content.findIndex(e);if(o<e)return{node:this.content.child(n),index:n,offset:o};let r=this.content.child(n-1);return{node:r,index:n-1,offset:o-r.nodeSize}}resolve(e){return Ioe.resolveCached(this,e)}resolveNoCache(e){return Ioe.resolve(this,e)}rangeHasMark(e,n,o){let r=!1;return n>e&&this.nodesBetween(e,n,i=>(o.isInSet(i.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Qxe(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,o=We.empty,r=0,i=o.childCount){let s=this.contentMatchAt(e).matchFragment(o,r,i),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=r;l<i;l++)if(!this.type.allowsMarks(o.child(l).marks))return!1;return!0}canReplaceWith(e,n,o,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(o),s=i&&i.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Un.none;for(let n=0;n<this.marks.length;n++){let o=this.marks[n];o.type.checkAttrs(o.attrs),e=o.addToSet(e)}if(!Un.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let o;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");o=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,o)}let r=We.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,r,o);return i.type.checkAttrs(i.attrs),i}};Pp.prototype.text=void 0;let rFt=class q5 extends Pp{constructor(e,n,o,r){if(super(e,n,null,r),!o)throw new RangeError("Empty text nodes are not allowed");this.text=o}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Qxe(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new q5(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new q5(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function Qxe(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}let pS=class Zxe{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let o=new iFt(e,n);if(o.next==null)return Zxe.empty;let r=eFe(o);o.next&&o.err("Unexpected trailing text");let i=hFt(dFt(r));return mFt(i,o),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,o=e.childCount){let r=this;for(let i=n;r&&i<o;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let o=0;o<e.next.length;o++)if(this.next[n].type==e.next[o].type)return!0;return!1}fillBefore(e,n=!1,o=0){let r=[this];function i(s,a){let l=s.matchFragment(e,o);if(l&&(!n||l.validEnd))return We.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!(c.isText||c.hasRequiredAttrs())&&r.indexOf(d)==-1){r.push(d);let h=i(d,a.concat(c));if(h)return h}}return null}return i(this,[])}findWrapping(e){for(let o=0;o<this.wrapCache.length;o+=2)if(this.wrapCache[o]==e)return this.wrapCache[o+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),o=[{match:this,type:null,via:null}];for(;o.length;){let r=o.shift(),i=r.match;if(i.matchType(e)){let s=[];for(let a=r;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:a,next:l}=i.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!r.type||l.validEnd)&&(o.push({match:a.contentMatch,type:a,via:r}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(o){e.push(o);for(let r=0;r<o.next.length;r++)e.indexOf(o.next[r].next)==-1&&n(o.next[r].next)}return n(this),e.map((o,r)=>{let i=r+(o.validEnd?"*":" ")+" ";for(let s=0;s<o.next.length;s++)i+=(s?", ":"")+o.next[s].type.name+"->"+e.indexOf(o.next[s].next);return i}).join(`
196
196
  `)}};pS.empty=new pS(!0);class iFt{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function eFe(t){let e=[];do e.push(sFt(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function sFt(t){let e=[];do e.push(aFt(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function aFt(t){let e=cFt(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=lFt(t,e);else break;return e}function Woe(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function lFt(t,e){let n=Woe(t),o=n;return t.eat(",")&&(t.next!="}"?o=Woe(t):o=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:o,expr:e}}function uFt(t,e){let n=t.nodeTypes,o=n[e];if(o)return[o];let r=[];for(let i in n){let s=n[i];s.isInGroup(e)&&r.push(s)}return r.length==0&&t.err("No node type or group '"+e+"' found"),r}function cFt(t){if(t.eat("(")){let e=eFe(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=uFt(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function dFt(t){let e=[[]];return r(i(t,0),n()),e;function n(){return e.push([])-1}function o(s,a,l){let u={term:l,to:a};return e[s].push(u),u}function r(s,a){s.forEach(l=>l.to=a)}function i(s,a){if(s.type=="choice")return s.exprs.reduce((l,u)=>l.concat(i(u,a)),[]);if(s.type=="seq")for(let l=0;;l++){let u=i(s.exprs[l],a);if(l==s.exprs.length-1)return u;r(u,a=n())}else if(s.type=="star"){let l=n();return o(a,l),r(i(s.expr,l),l),[o(l)]}else if(s.type=="plus"){let l=n();return r(i(s.expr,a),l),r(i(s.expr,l),l),[o(l)]}else{if(s.type=="opt")return[o(a)].concat(i(s.expr,a));if(s.type=="range"){let l=a;for(let u=0;u<s.min;u++){let c=n();r(i(s.expr,l),c),l=c}if(s.max==-1)r(i(s.expr,l),l);else for(let u=s.min;u<s.max;u++){let c=n();o(l,c),r(i(s.expr,l),c),l=c}return[o(l)]}else{if(s.type=="name")return[o(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function tFe(t,e){return e-t}function Hoe(t,e){let n=[];return o(e),n.sort(tFe);function o(r){let i=t[r];if(i.length==1&&!i[0].term)return o(i[0].to);n.push(r);for(let s=0;s<i.length;s++){let{term:a,to:l}=i[s];!a&&n.indexOf(l)==-1&&o(l)}}}function hFt(t){let e=Object.create(null);return n(Hoe(t,0));function n(o){let r=[];o.forEach(s=>{t[s].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let c=0;c<r.length;c++)r[c][0]==a&&(u=r[c][1]);Hoe(t,l).forEach(c=>{u||r.push([a,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let i=e[o.join(",")]=new pS(o.indexOf(t.length-1)>-1);for(let s=0;s<r.length;s++){let a=r[s][1].sort(tFe);i.next.push({type:r[s][0],next:e[a.join(",")]||n(a)})}return i}}function mFt(t,e){for(let n=0,o=[t];n<o.length;n++){let r=o[n],i=!r.validEnd,s=[];for(let a=0;a<r.next.length;a++){let{type:l,next:u}=r.next[a];s.push(l.name),i&&!(l.isText||l.hasRequiredAttrs())&&(i=!1),o.indexOf(u)==-1&&o.push(u)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function nFe(t){let e=Object.create(null);for(let n in t){let o=t[n];if(!o.hasDefault)return null;e[n]=o.default}return e}function oFe(t,e){let n=Object.create(null);for(let o in t){let r=e&&e[o];if(r===void 0){let i=t[o];if(i.hasDefault)r=i.default;else throw new RangeError("No value supplied for attribute "+o)}n[o]=r}return n}function rFe(t,e,n,o){for(let r in e)if(!(r in t))throw new RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let r in t){let i=t[r];i.validate&&i.validate(e[r])}}function iFe(t,e){let n=Object.create(null);if(e)for(let o in e)n[o]=new pFt(t,o,e[o]);return n}let zoe=class sFe{constructor(e,n,o){this.name=e,this.schema=n,this.spec=o,this.markSet=null,this.groups=o.group?o.group.split(" "):[],this.attrs=iFe(e,o.attrs),this.defaultAttrs=nFe(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(o.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==pS.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:oFe(this.attrs,e)}create(e=null,n,o){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Pp(this,this.computeAttrs(e),We.from(n),Un.setFrom(o))}createChecked(e=null,n,o){return n=We.from(n),this.checkContent(n),new Pp(this,this.computeAttrs(e),n,Un.setFrom(o))}createAndFill(e=null,n,o){if(e=this.computeAttrs(e),n=We.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let r=this.contentMatch.matchFragment(n),i=r&&r.fillBefore(We.empty,!0);return i?new Pp(this,e,n.append(i),Un.setFrom(o)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let o=0;o<e.childCount;o++)if(!this.allowsMarks(e.child(o).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){rFe(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let o=0;o<e.length;o++)this.allowsMarkType(e[o].type)?n&&n.push(e[o]):n||(n=e.slice(0,o));return n?n.length?n:Un.none:e}static compile(e,n){let o=Object.create(null);e.forEach((i,s)=>o[i]=new sFe(i,n,s));let r=n.spec.topNode||"doc";if(!o[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!o.text)throw new RangeError("Every schema needs a 'text' type");for(let i in o.text.attrs)throw new RangeError("The text node type should not have attributes");return o}};function fFt(t,e,n){let o=n.split("|");return r=>{let i=r===null?"null":typeof r;if(o.indexOf(i)<0)throw new RangeError(`Expected value of type ${o} for attribute ${e} on type ${t}, got ${i}`)}}class pFt{constructor(e,n,o){this.hasDefault=Object.prototype.hasOwnProperty.call(o,"default"),this.default=o.default,this.validate=typeof o.validate=="string"?fFt(e,n,o.validate):o.validate}get isRequired(){return!this.hasDefault}}let aFe=class lFe{constructor(e,n,o,r){this.name=e,this.rank=n,this.schema=o,this.spec=r,this.attrs=iFe(e,r.attrs),this.excluded=null;let i=nFe(this.attrs);this.instance=i?new Un(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Un(this,oFe(this.attrs,e))}static compile(e,n){let o=Object.create(null),r=0;return e.forEach((i,s)=>o[i]=new lFe(i,r++,n,s)),o}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){rFe(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}};class gFt{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let r in e)n[r]=e[r];n.nodes=vr.from(e.nodes),n.marks=vr.from(e.marks||{}),this.nodes=zoe.compile(this.spec.nodes,this),this.marks=aFe.compile(this.spec.marks,this);let o=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let i=this.nodes[r],s=i.spec.content||"",a=i.spec.marks;if(i.contentMatch=o[s]||(o[s]=pS.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=a=="_"?null:a?joe(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(let r in this.marks){let i=this.marks[r],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:joe(this,s.split(" "))}this.nodeFromJSON=r=>Pp.fromJSON(this,r),this.markFromJSON=r=>Un.fromJSON(this,r),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,o,r){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof zoe){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,o,r)}text(e,n){let o=this.nodes.text;return new rFt(o,o.defaultAttrs,e,Un.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function joe(t,e){let n=[];for(let o=0;o<e.length;o++){let r=e[o],i=t.marks[r],s=i;if(i)n.push(i);else for(let a in t.marks){let l=t.marks[a];(r=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(r)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[o]+"'")}return n}function CFt(t){return t.tag!=null}function yFt(t){return t.style!=null}class Wp{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let o=this.matchedStyles=[];n.forEach(r=>{if(CFt(r))this.tags.push(r);else if(yFt(r)){let i=/[^=]*/.exec(r.style)[0];o.indexOf(i)<0&&o.push(i),this.styles.push(r)}}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let i=e.nodes[r.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let o=new Koe(this,n,!1);return o.addAll(e,Un.none,n.from,n.to),o.finish()}parseSlice(e,n={}){let o=new Koe(this,n,!0);return o.addAll(e,Un.none,n.from,n.to),tt.maxOpen(o.finish())}matchTag(e,n,o){for(let r=o?this.tags.indexOf(o)+1:0;r<this.tags.length;r++){let i=this.tags[r];if(TFt(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let s=i.getAttrs(e);if(s===!1)continue;i.attrs=s||void 0}return i}}}matchStyle(e,n,o,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let s=this.styles[i],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!o.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let n=[];function o(r){let i=r.priority==null?50:r.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<i)break}n.splice(s,0,r)}for(let r in e.marks){let i=e.marks[r].spec.parseDOM;i&&i.forEach(s=>{o(s=qoe(s)),s.mark||s.ignore||s.clearMark||(s.mark=r)})}for(let r in e.nodes){let i=e.nodes[r].spec.parseDOM;i&&i.forEach(s=>{o(s=qoe(s)),s.node||s.ignore||s.mark||(s.node=r)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Wp(e,Wp.schemaRules(e)))}}const uFe={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},bFt={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},cFe={ol:!0,ul:!0},gS=1,J5=2,Ax=4;function Uoe(t,e,n){return e!=null?(e?gS:0)|(e==="full"?J5:0):t&&t.whitespace=="pre"?gS|J5:n&~Ax}let BE=class{constructor(e,n,o,r,i,s){this.type=e,this.attrs=n,this.marks=o,this.solid=r,this.options=s,this.content=[],this.activeMarks=Un.none,this.match=i||(s&Ax?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(We.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let o=this.type.contentMatch,r;return(r=o.findWrapping(e.type))?(this.match=o,r):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&gS)){let o=this.content[this.content.length-1],r;if(o&&o.isText&&(r=/[ \t\r\n\u000c]+$/.exec(o.text))){let i=o;o.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-r[0].length))}}let n=We.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(We.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!uFe.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},Koe=class{constructor(e,n,o){this.parser=e,this.options=n,this.isOpen=o,this.open=0,this.localPreserveWS=!1;let r=n.topNode,i,s=Uoe(null,n.preserveWhitespace,0)|(o?Ax:0);r?i=new BE(r.type,r.attrs,Un.none,!0,n.topMatch||r.type.contentMatch,s):o?i=new BE(null,null,Un.none,!0,null,s):i=new BE(e.schema.topNodeType,null,Un.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let o=e.nodeValue,r=this.top,i=r.options&J5?"full":this.localPreserveWS||(r.options&gS)>0,{schema:s}=this.parser;if(i==="full"||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(o)){if(i)if(i==="full")o=o.replace(/\r\n?/g,`
197
197
  `);else if(s.linebreakReplacement&&/[\r\n]/.test(o)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=o.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),n,!0),a[l]&&this.insertNode(s.text(a[l]),n,!/\S/.test(a[l]));o=""}else o=o.replace(/\r?\n|\r/g," ");else if(o=o.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(o)&&this.open==this.nodes.length-1){let a=r.content[r.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(o=o.slice(1))}o&&this.insertNode(s.text(o),n,!/\S/.test(o)),this.findInText(e)}else this.findInside(e)}addElement(e,n,o){let r=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),a;cFe.hasOwnProperty(s)&&this.parser.normalizeLists&&vFt(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,o));e:if(l?l.ignore:bFt.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let u,c=this.needsBlock;if(uFe.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),u=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=l&&l.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),u&&this.sync(i),this.needsBlock=c}else{let u=this.readStyles(e,n);u&&this.addElementByRule(e,l,u,l.consuming===!1?a:void 0)}this.localPreserveWS=r}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`