@emailmaker/emailmaker 1.0.41 → 1.0.42

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.
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[4877],{79381:(e,t,s)=>{s.d(t,{A:()=>se});var i=s(92810),r=s(64617),n=s(41919),a=s(95838),l=s(71157),o=s(98915),c=s(17590),d=s(21195),m=s(45934),u=s(38883),p=s.n(u),h=s(43005),g=s(24696),_=s(94822),v=s(23287),x=s(3824),j=s(75111),f=s(81325),y=s(74919),A=s(39475),b=s(8375),w=s(32293),N=s(9588),k=s(68631),S=s(84501),I=s(85025),C=s(94219),T=s(81577),E=s(64936),L=s(36404),z=s(86286),D=s(39990),M=s(32269),O=s(90070),R=s(85163),B=s(70082);const F=({isMenuCollapsed:e,setIsMenuCollapsed:t,isLocked:s})=>{var n;const{__:a}=(0,v.s9)();let l=(0,m.wA)(),o=(0,r.Zp)();const{projectId:c}=(0,r.g)(),{pathname:d}=(0,r.zy)(),[u,F]=(0,i.useState)(""),P=(0,m.d4)(L.yN),H=(0,m.d4)(z.C1),$=(0,O.p6)(),q=(0,i.useCallback)((()=>{d.includes("blocks")?F("Blocks"):d.includes("emails")?F("Emails"):d.includes("members")&&F("Members"),!s&&t(!0)}),[d,t,s]);(0,i.useEffect)((()=>{q()}),[q]);let W=[],V=[];const U=(null===P||void 0===P?void 0:P.title)||"";let X=[{label:(0,B.jsx)("a",{href:"https://emailmaker.ru/help/",target:"_blank",rel:"noopener noreferrer",children:a("Help")}),key:"Help center",icon:(0,B.jsx)(x.A,{style:{fontSize:"16px"}}),className:"help-center"},{label:a("Chat support"),key:"Support chat",icon:(0,B.jsx)(j.A,{style:{fontSize:"16px"}}),className:"open-support-chat",onClick:()=>{try{window.carrotquest.open()}catch(e){console.log(e)}}}],Y=[{label:a("Account settings"),key:"Account settings",icon:(0,B.jsx)(f.A,{style:{fontSize:"16px"}}),className:"em-analytics__account-settings",onClick:()=>{l((0,E.qf)(R.lx.EDIT_PROFILE_MODAL)),!s&&t(!0)}},{label:(0,B.jsx)(_.N_,{to:"/billing",children:a("Billing")}),key:"Billing",icon:(0,B.jsx)(y.A,{style:{fontSize:"16px"}}),className:"em-analytics__billing"},{label:a("Sign out"),icon:(0,B.jsx)(A.A,{style:{fontSize:"16px"}}),key:"Sign out",className:"em-analytics__sign-out",onClick:()=>{(0,M.Id)($),l(D.Q2.util.resetApiState()),o("/auth",{replace:!0})}}];const Z="/projects"+(c?"/"+c+"/emails?page=1":""),J=[{label:(0,B.jsx)(_.N_,{style:{fontSize:16},to:Z,children:U}),key:"Project",popupOffset:[0,16],style:{fontWeight:500},icon:c?(0,B.jsx)(_.N_,{to:Z,className:"project-menu__block",style:{fontSize:"18px",zIndex:99},children:(0,B.jsx)(h.Ay,{type:"primary",className:"project-menu__block-button",children:null===U||void 0===U?void 0:U.split(" ").slice(0,2).map((e=>Array.from(e)[0]))})}):(0,B.jsxs)(_.N_,{to:Z,rel:"noopener noreferrer",className:"project-menu__block",style:{fontSize:"28px"},children:[(0,B.jsxs)("b",{children:[(0,B.jsx)("span",{className:"letters",children:"E"}),(!e||s)&&(0,B.jsx)("span",{className:"hidden-text",children:"mail"})]}),(0,B.jsx)("span",{className:"letters",children:"M"}),(!e||s)&&(0,B.jsx)("span",{className:"hidden-text",children:"aker"})]}),className:p()("project-menu__list-item project-menu__list-item_project project-menu__list-item_project",{"project-menu__list-item_logo":!c,"project-menu__list-item_project":c}),children:c&&[{label:a("Project settings"),key:"Project settings",className:"em-analytics__account-settings",icon:(0,B.jsx)(b.A,{style:{fontSize:"16px"}}),onClick:()=>{l((0,E.qf)(R.lx.EDIT_PROJECT_MODAL)),!s&&t(!0)}},{label:(0,B.jsx)(_.N_,{to:"/projects",children:a("List of projects")}),key:"List of projects",icon:(0,B.jsx)(w.A,{style:{fontSize:"16px"}}),className:"em-analytics__sign-out"}]},{type:"divider"}];return W.push({icon:(0,B.jsx)(N.A,{style:{fontSize:20}}),label:(0,B.jsx)(_.N_,{to:`/projects/${c}/emails`,rel:"noopener noreferrer",children:a("Emails")}),key:"Emails",className:"project-menu__list-item em-analytics__project-menu-emails"},{icon:(0,B.jsx)(k.A,{style:{fontSize:20}}),label:(0,B.jsx)(_.N_,{to:`/projects/${c}/blocks`,rel:"noopener noreferrer",children:a("Blocks")}),key:"Blocks",className:"project-menu__list-item em-analytics__project-menu-blocks"},{icon:(0,B.jsx)(S.A,{style:{fontSize:20}}),label:(0,B.jsx)(_.N_,{to:`/projects/${c}/members`,rel:"noopener noreferrer",children:a("Members")}),key:"Members",className:"project-menu__list-item em-analytics__project-menu-members"}),"community"===H.subscription.post_name&&c&&H.counters.emails_counter>2&&V.push({icon:(0,B.jsx)(I.A,{style:{fontSize:20,lineHeight:"44px"}}),label:(0,B.jsx)(_.N_,{to:"/billing",rel:"noopener noreferrer",style:{fontSize:16,color:"white"},children:a("Upgrade")}),key:"Emails",className:"project-menu__list-item"}),V.push({icon:(0,B.jsx)(C.A,{style:{fontSize:18}}),label:a("Help menu"),key:"Help menu",className:"project-menu__list-item support-center-menu",children:X},{icon:(0,B.jsx)(T.A,{style:{fontSize:18}}),label:a("What's new"),key:"What's new",className:"project-menu__list-item ducalis-changelog-widget em-analytics__project-menu-ducalis"},{icon:(0,B.jsx)("span",{style:{width:"20px",height:"20px",fontSize:"20px"},className:"user-profile__avatar anticon",children:null!==H&&void 0!==H&&null!==(n=H.avatar_urls)&&void 0!==n&&n[24]?[(0,B.jsx)("img",{style:{width:"100%"},src:null===H||void 0===H?void 0:H.avatar_urls[24],alt:null!==H&&void 0!==H&&H.name?`${null===H||void 0===H?void 0:H.name} avatar`:"User avatar",className:"user-profile__avatar-img"},"img"),(0,B.jsx)(f.A,{style:{position:"absolute",fontSize:20,borderRadius:100,overflow:"hidden",height:20,width:20,lineHeight:0,zIndex:-1}},"UserOutlined")]:(0,B.jsx)(f.A,{style:{color:"white"}})}),label:(null===H||void 0===H?void 0:H.name)||null,key:"User profile",className:"project-menu__list-item user-profile",children:Y}),(0,B.jsx)(B.Fragment,{children:(0,B.jsxs)("div",{className:"project-menu",children:[(0,B.jsxs)("div",{children:[(0,B.jsx)(g.A,{disabledOverflow:!0,className:"project-menu__list project-menu__list_top",style:{fontSize:16},items:J,triggerSubMenuAction:"hover",subMenuOpenDelay:.3,subMenuCloseDelay:.6,selectable:!1}),c&&(0,B.jsx)(g.A,{disabledOverflow:!0,selectable:!0,selectedKeys:[u],className:"project-menu__list project-menu__list_second",style:{fontSize:16,marginTop:30},items:W,triggerSubMenuAction:"hover"})]}),(0,B.jsx)(g.A,{disabledOverflow:!0,selectable:!0,selectedKeys:["Emails"],forceSubMenuRender:"true",className:"project-menu__list project-menu__list_bottom",style:{fontSize:14,marginBottom:6},subMenuOpenDelay:.3,subMenuCloseDelay:.6,items:V,triggerSubMenuAction:"hover"})]})})};var P=s(35285),H=s(65052),$=s(70656),q=s(62689),W=s(65983),V=s(7760),U=s(19366),X=s(3289),Y=s(78451),Z=s(32411),J=s(69156),G=s(13329),K=s(56991),Q=s(28316);const{Sider:ee}=n.A,{useToken:te}=a.A,se=()=>{const{token:e}=te();let t=(0,r.zy)();const s=(0,m.wA)(),a=(0,r.Zp)(),{emailId:u,blockId:h}=(0,r.g)(),g=(0,m.d4)(z.C1),_=(0,m.d4)(E.cL),v=(0,i.useRef)(),[x]=(0,q.bw)(),j=(0,l.hN)();v.current||(v.current=(0,Z.$Z)()),(0,i.useEffect)((()=>{(0,J.FN)(e)}),[e]);const{data:f=[],isSuccess:y}=(0,q.I9)(g.id,{pollingInterval:3e4,skip:_});(0,i.useEffect)((()=>{const e=f.filter((e=>""===e.seen||null===e.seen));setTimeout((()=>{e.length&&y&&e.forEach((e=>{var t,s;j[e.type]({message:(0,B.jsx)("div",{dangerouslySetInnerHTML:{__html:(null===(t=e.title)||void 0===t?void 0:t.rendered)||e.title||""}}),description:(0,B.jsx)("div",{dangerouslySetInnerHTML:{__html:(null===(s=e.content)||void 0===s?void 0:s.rendered)||""}}),placement:"bottomRight"});const i=(new Date).toLocaleString();x({id:e.id,datetime:i}).unwrap()}))}),5e3)}),[y,x,f,j]),(0,U.A)(),(0,X.A)(),(0,Y.A)(),(0,i.useEffect)((()=>{h||s((0,V.nJ)()),u||s((0,W.ss)())}),[h,u,s,t.pathname]);let A=null;(u||h||t.pathname.endsWith("/new"))&&(A=v.current);const b=JSON.parse(localStorage.getItem(R.V0.em_menu_is_locked)),[w,N]=(0,i.useState)((null===b||void 0===b?void 0:b.isLocked)||!1),[k,S]=(0,i.useState)(!0);return(0,i.useEffect)((()=>{const e=()=>localStorage.setItem(R.V0.em_menu_is_locked,JSON.stringify({isLocked:w}));return e(),e()}),[w]),(0,G.D3)(Q._1,(0,i.useCallback)((e=>{const t=(0,K.Mu)(e);a(t)}),[a])),(0,B.jsx)("div",{className:"main",children:(0,B.jsx)(Z.kx.Provider,{value:A,children:(0,B.jsx)("div",{className:"main__pane main__pane_main",children:(0,B.jsx)("div",{className:"main__pane-content",id:"pane-content-iframe",children:(0,B.jsxs)(n.A,{className:"main__pane-layout",hasSider:!0,children:[!R.EW.isPlugin&&(0,B.jsx)(ee,{theme:"light",style:{borderColor:e.colorBorder,position:"fixed"},collapsible:!0,collapsed:!w&&k,defaultCollapsed:!0,reverseArrow:!w&&!k||w&&!k,trigger:(0,B.jsxs)("div",{className:"main__pane-trigger",children:[w?(0,B.jsx)(d.A,{style:{fontSize:18}}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(o.A,{style:{fontSize:18}}),(0,B.jsx)(c.A,{style:{fontSize:18}})]}),(0,B.jsx)($.A,{})]}),className:p()("main__menu",{main__menu_lock:w}),width:260,onCollapse:(e,t)=>{e?!w&&S(!0):S(!e),N(!w)},onMouseEnter:()=>!w&&S(!1),onMouseLeave:()=>!w&&S(!0),children:(0,B.jsx)(F,{isMenuCollapsed:k,setIsMenuCollapsed:S,isLocked:w})}),(0,B.jsx)(P.A,{isModalVisible:_===R.lx.EDIT_PROJECT_MODAL}),(0,B.jsx)(H.A,{isModalVisible:_===R.lx.EDIT_PROFILE_MODAL}),(0,B.jsx)(r.sv,{})]})})})})})}},24495:(e,t,s)=>{s.d(t,{A:()=>E});var i=s(92810),r=s(76662),n=s(41919),a=s(43005),l=s(71157),o=s(20258),c=s(64617),d=s(12280),m=s(55039),u=s(45934),p=s(23287),h=s(4800),g=s(21349),_=s(8114),v=s(85163);const x=(e,t,s,i,r,n)=>{var a,l;const o=n("Owner","member"),c=n("Administrator","member"),d=r("The invitation has been sent");let m=[];e.role===d?m.push({label:r("Revoke the invite"),key:v.JE,className:"em-analytics__revoke-invite",onClick:({key:t})=>i(t,e)}):(e.role!==o&&m.push({label:r("Assign the project owner"),key:v.gY,className:"em-analytics__members-owner",onClick:({key:t})=>i(t,e)}),e.role!==c&&m.push({label:r("Change role to Administrator"),key:v.Qz,className:"em-analytics__members-admin",onClick:({key:t})=>i(t,e)}),e.role===c&&m.push({label:r("Change role to User"),key:v.aO,className:"em-analytics__members-user",onClick:({key:t})=>i(t,e)}),m.push({label:r("Remove member"),key:v.eA,onClick:({key:t})=>i(t,e)}));let u=[];(null===(a=e.ID)||void 0===a?void 0:a.toString())===(null===(l=s.id)||void 0===l?void 0:l.toString())&&u.push({label:r("Change role to User"),key:v.aO,className:"em-analytics__members-user",onClick:({key:t})=>i(t,e)}),e.role===v.m3&&u.push({label:r("Change role to Administrator"),key:v.Qz,className:"em-analytics__members-admin",onClick:({key:t})=>i(t,e)}),e.role===v.G$?u.push({label:r("Revoke the invite"),key:v.JE,className:"em-analytics__revoke-invite",onClick:({key:t})=>i(t,e)}):u.push({label:r("Remove member"),key:v.eA,className:"em-analytics__members-remove",onClick:({key:t})=>{i(t,e)}});let p=[{label:r("Remove member"),key:v.eA,className:"em-analytics__members-remove",onClick:({key:t})=>i(t,e)}];switch(t){case v.yo:return m;case v.St:return u;case v.m3:return p;default:return null}};x.propTypes={};const j=x;var f=s(86286),y=s(84568),A=s(31844),b=s(32269),w=s(70082);const N=()=>{const{__:e,_x:t}=(0,p.s9)(),s=(0,u.d4)(f.C1),{owner:r,admin:n}=(0,A.A)();let a=(0,c.Zp)();const o=(0,l.hN)(),[d,m]=(0,i.useState)(""),x=t("Owner","member"),N=t("Administrator","member"),k=e("user"),S=e("The invitation has been sent");(0,i.useEffect)((()=>{r||n||m(v.m3),r&&m(v.yo),n&&m(v.St)}),[r,n,s]);const{data:I,isFetching:C,refetch:T}=(0,c.KC)(),[E,L]=(0,i.useState)([]);(0,i.useEffect)((()=>{const{owner:s,admins:i,users:r,invited_users:n}=I.members||{};L([s&&{...s,role:t("Owner","member")},i&&Array.isArray(i)&&i.map((e=>({...e,role:t("Administrator","member")}))),r&&Array.isArray(r)&&r.map((t=>({...t,role:e("user")}))),n&&Array.isArray(n)&&n.filter((e=>null===e||void 0===e?void 0:e.invited_user_email)).map((t=>({role:e("The invitation has been sent"),user_email:t.invited_user_email,user_firstname:" ",user_lastname:" "})))].filter((e=>e)).flat(1))}),[I.members,e,t]);const[z,D]=(0,y.OD)(),M=(i,{role:r,...n})=>{var l,c;let d,m={};switch(i){case v.gY:if(r===N){const e=I.members.admins,t=I.members.owner;m={admins:e&&Array.isArray(e)&&e.length>0?[...e.filter((e=>e.ID!==n.ID)).map((e=>e.ID)),t.ID]:0,owner:n.ID}}if(r===k){const e=I.members.users,t=I.members.owner;m={users:e&&Array.isArray(e)&&e.length>0?[...e.filter((e=>e.ID!==n.ID)).map((e=>e.ID)),t.ID]:0,owner:n.ID}}d=e("You changed the role of ")+n.display_name+t(" to ","member")+e("owner")+".";break;case v.Qz:if(r===k){const s=I.members.users,i=I.members.admins;m={users:s&&Array.isArray(s)&&s.length>1?s.filter((e=>e.ID!==n.ID)).map((e=>e.ID)):0,admins:i&&Array.isArray(i)&&i.length>0?[...i.map((e=>e.ID)),n.ID]:[n.ID]},d=e("You changed the role of ")+n.display_name+t(" to ","member")+e("Administrator")+"."}break;case v.aO:if(r===N){const s=I.members.admins,i=I.members.users;m={admins:s&&Array.isArray(s)&&s.length>1?s.filter((e=>e.ID!==n.ID)).map((e=>e.ID)):0,users:i&&Array.isArray(i)&&i.length>0?[...i.map((e=>e.ID)),n.ID]:[n.ID]},d=e("You changed the role of ")+n.display_name+t(" to ","member")+e("user")+"."}break;case v.eA:if(r===N){const e=I.members.admins;m={admins:e&&Array.isArray(e)&&e.length>1?e.filter((e=>e.ID!==n.ID)).map((e=>e.ID)):0}}if(r===k){const e=I.members.users;m={users:e&&Array.isArray(e)&&e.length>1?e.filter((e=>e.ID!==n.ID)).map((e=>e.ID)):0}}d=(null===(l=s.id)||void 0===l?void 0:l.toString())===(null===(c=n.ID)||void 0===c?void 0:c.toString())?e("You deleted yourself from the project successfully."):e("You deleted ")+n.display_name+" "+e(" from the project successfully.");break;case v.JE:const i=I.members.invited_users;m={invited_users:!!(i&&Array.isArray(i)&&i.length>0)&&i.filter((e=>e.invited_user_email&&e.invited_user_email!==n.user_email))},d=e("You revoke invite for ")+n.user_email+" "+e(" from the project successfully.");break;default:return}z({projectId:I.id,members:{...I.members,...m}}).then((e=>{var t,i;if(e.error)return(null===(t=s.id)||void 0===t?void 0:t.toString())===(null===(i=n.ID)||void 0===i?void 0:i.toString())?((0,b.wB)(d,o),void a("/projects")):void(0,b.p6)(e,o);T(),(0,b.wB)(d,o)}))},O=[{width:"25%",title:e("Email"),dataIndex:["user_email"]},{width:"25%",title:e("Name"),dataIndex:["user_firstname"],render:(e,{user_lastname:t})=>(0,w.jsx)(w.Fragment,{children:e||t?`${e} ${t}`:"-"})},{width:"25%",title:e("Role"),dataIndex:["role"],render:(e,t,s)=>e},{width:"3%",title:"",dataIndex:"",key:"x",onCell:()=>({style:{padding:0}}),render:(i,a)=>{const l=j(a,d,s,M,e,t);return a.role===x||!r&&!n&&a.role===N||n&&a.role===N&&s.id!==a.ID||!r&&!n&&a.role===k&&s.id!==a.ID||!r&&!n&&a.role===S?null:(0,w.jsx)(h.A,{arrow:"true",placement:"bottomRight",menu:{items:l},trigger:["hover"],children:(0,w.jsx)("span",{className:"members-table__actions",children:(0,w.jsx)(_.A,{})})})}}];return(0,w.jsx)("div",{children:(0,w.jsx)(g.A,{bordered:!0,className:"members-table",rowClassName:e=>e.role===S?"members-table__invite_member_row":"",rowKey:e=>`${e.role}_${e.ID||e.user_email}`,dataSource:E,columns:O,loading:D.isLoading||C,showSizeChanger:!1,pagination:{showSizeChanger:!1,hideOnSinglePage:!0,position:["bottomLeft"]}})})};var k=s(20757),S=s(53200),I=s(22197);const{Paragraph:C}=r.A,{Content:T}=n.A,E=()=>{const{__:e}=(0,p.s9)(),t=(0,u.wA)(),{owner:s,admin:r}=(0,A.A)(),[h]=d.A.useForm(),g=(0,l.hN)(),[_,v]=(0,S.N)(),{data:x,refetch:j}=(0,c.KC)();(0,I.A)(e("Members")),(0,i.useEffect)((()=>{document.body.classList.remove("editor")}));const f=(0,w.jsx)(w.Fragment,{children:(0,w.jsx)(C,{className:"ant-page-header-heading-title",children:e("Members")})}),E=(0,w.jsx)(w.Fragment,{children:s||r?[(0,w.jsxs)(d.A,{form:h,name:"search-members-form",initialValues:{remember:!0},onFinish:({email:e})=>{_({email:e,project_id:x.id}).then((e=>{var s,i,r;e.isError?(0,b.p6)(e,g):(null===(s=e.data)||void 0===s||null===(i=s.data)||void 0===i?void 0:i.status)<400?(h.resetFields(),j(),(0,b.wB)(null===e||void 0===e||null===(r=e.data)||void 0===r?void 0:r.message,g),t(y.Nq.util.invalidateTags([{type:"Projects",id:x.id}]))):g.error({message:(0,w.jsx)("div",{dangerouslySetInnerHTML:{__html:e.data.code}}),description:(0,w.jsx)("div",{dangerouslySetInnerHTML:{__html:e.data.message}}),placement:"bottomRight"})}))},autoComplete:"off",layout:"inline",validateTrigger:"onSubmit",onValuesChange:()=>{h.setFields([{errors:[],name:["email"]}])},className:"members-page__search-form",children:[(0,w.jsx)(d.A.Item,{className:"members-page__search-form-item members-page__search-form-item_input-item",name:"email",rules:[{required:!0,message:e("Please enter the correct email address."),type:"email"}],children:(0,w.jsx)(m.A,{placeholder:e("Email of a new member"),disabled:v.isLoading})}),(0,w.jsx)(d.A.Item,{className:"members-page__search-form-item",children:(0,w.jsx)(a.Ay,{type:"primary",className:"em-analytics__members-add",htmlType:"submit",disabled:v.isLoading,icon:(0,w.jsx)(o.A,{}),children:e("Add a member")})})]},"search-members-form")]:[]});return(0,w.jsxs)(n.A,{className:"members-page",children:[(0,w.jsx)(k.A,{leftBlock:f,rightBlock:E}),(0,w.jsx)(T,{className:"members-page__container",children:(0,w.jsx)("div",{className:"members-page__content container",children:(0,w.jsx)(N,{})})})]})}},92779:(e,t,s)=>{s.d(t,{A:()=>m});var i=s(92810),r=s(14852),n=s(89831),a=s(43005),l=s(23287),o=s(64617),c=s(47381),d=s(70082);const m=({open:e,sideOnOk:t,onCancel:s,initialSlide:m=0})=>{const{__:u}=(0,l.s9)(),p=(0,o.Zp)(),[h,g]=(0,i.useState)(m),_=(0,i.useRef)(null);(0,i.useEffect)((()=>{e&&_.current&&(_.current.goTo(m,!0),g(m))}),[e,m]);const v=(0,i.useMemo)((()=>[{image:u("https://cdn.useblocks.io/1351/241017_18_1sGjUaZ.png"),backgroundColor:"var(--blue-2)",title:u("More editing functions"),description:u("Use our visual editor to customize every element to your needs: change borders and their radius, box shadows, paddings, background, and much more.")},{image:u("https://cdn.useblocks.io/1351/241017_18_J7QtvZ3.png"),backgroundColor:"var(--purple-2)",title:u("Work with the HTML code"),description:u("Edit the HTML version of your email template in \xabCode\xbb mode and see the changes in real time. Blocks has no restrictions on the code: you can create templates of any complexity!")},{image:u("https://cdn.useblocks.io/1351/241017_18_2fjDRfL.png"),backgroundColor:"var(--cyan-2)",title:u("AI image generation"),description:u("Generate stunning visuals for your emails with ease. We have trained our AI model to ensure the highest quality images.")},{image:u("https://cdn.useblocks.io/1351/241017_18_D5C25Zp.png"),backgroundColor:"var(--green-2)",title:u("Stock photos and GIFs"),description:u("Search the vast gallery of stock photos and GIFs to find visuals for any occasion. You can filter the results by image orientation, color scheme, and more.")},{image:u("https://cdn.useblocks.io/1351/241017_18_NDYloAO.png"),backgroundColor:"var(--magenta-2)",title:u("Version history"),description:u("Check who and when made changes to the email template and, if necessary, restore one of the previous versions.")},{image:u("https://cdn.useblocks.io/1351/241017_18_g5mVlmh.png"),backgroundColor:"var(--red-2)",title:u("Image editor"),description:u("Want to resize an image, add some text, or apply a filter? No need to leave Blocks! You can make all the basic changes in our image editor.")},{image:u("https://cdn.useblocks.io/1351/241017_18_ur8Lh3W.png"),backgroundColor:"var(--orange-2)",title:u("Email optimization"),description:u("Check your email against broken links, missing alt texts, heavy images, and other obstacles that might prevent your emails from hitting inboxes.")},{image:u("https://cdn.useblocks.io/1351/241017_18_S5Pld9p.png"),backgroundColor:"var(--volcano-2)",title:u("Team collaboration"),description:u("Add your team members and work on your project simultaneously. Attach comments to individual email blocks and discuss necessary edits right in the editor.")},{image:u("https://cdn.useblocks.io/1351/241017_18_tGbb2j9.png"),backgroundColor:"var(--geekblue-2)",title:u("Email testing"),description:u("Check how your email will look like across various devices and email clients.")},{image:u("https://cdn.useblocks.io/1351/241017_18_gDXi4uM.png"),backgroundColor:"var(--geekblue-2)",title:u("AI assistant"),description:u("Let our AI assistant enhance your email template! From creating subject lines and preheaders based on the email copy to generating the whole email with your website in mind!")}]),[u]);return(0,i.useEffect)((()=>{if(e&&_.current){_.current.goTo(m,!0),g(m);const e=v[m];(0,c.d)({event:"open_modal",action:"open_premium-features_modal",modal_id:"premium-features",offer_id:e.title})}}),[e,v,m]),(0,d.jsxs)(r.A,{open:e,footer:null,onCancel:s,centered:!0,closable:!1,className:"premium-features-modal",classNames:{mask:"premium-features-modal-mask"},styles:{mask:{background:"rgba(0, 0, 0, 0.65)"}},width:1100,style:{maxWidth:"80%"},children:[(0,d.jsx)(n.A,{dots:!0,slidesToShow:1,slidesToScroll:1,autoplay:!0,className:"carousel-slider",draggable:!0,autoplaySpeed:5e3,initialSlide:h,ref:_,children:v.map(((e,t)=>(0,d.jsx)("div",{children:(0,d.jsxs)("div",{className:"carousel-slide",style:{background:`${e.backgroundColor}`},children:[(0,d.jsx)("div",{className:"slide-item-image",children:(0,d.jsx)("img",{src:e.image,alt:`slide-${t}`})}),(0,d.jsxs)("div",{className:"slide-item-content",children:[(0,d.jsx)("h3",{className:"slide-title",children:e.title}),(0,d.jsx)("p",{className:"slide-description",children:e.description})]})]})},t)))}),(0,d.jsx)("div",{className:"modal-subtitle",children:u("This and other features are available for you on any paid billing plan.")}),(0,d.jsxs)("div",{className:"modal-buttons",children:[(0,d.jsx)(a.Ay,{size:"large",onClick:()=>s(!1),children:u("Cancel")}),(0,d.jsx)(a.Ay,{type:"primary",size:"large",onClick:()=>{t&&t(),p("/billing"),s(!1)},style:{padding:"0 30px"},children:u("Select plan")})]})]})}},84e3:(e,t,s)=>{s.d(t,{A:()=>A});var i=s(92810),r=s(71503),n=s(45934),a=s(887),l=s(45695),o=s(44396),c=s(86286),d=s(65983),m=s(7760),u=s(53204),p=s(64037),h=s(60382),g=s(85163),_=s(8685),v=s(32411),x=s(56991),j=s(93982),f=s(13522),y=s(70082);h.languages.html.htmlDefaults.options.format.wrapLineLength=0,r.wG.config({monaco:h}),(0,o.Q)(),(0,_.Gr)(h),(0,_.Wz)(h,["html"]);const A=({email:e,readOnly:t})=>{const s=(0,v.fn)(),o=(0,j.ml)(f.A.ON_CODE_VALIDATE_ID),_=(0,l.XW)(),A=(0,n.d4)(d.Up),b=(0,n.d4)(m.Up),w=(0,n.d4)(d.VZ),N=null!==e&&void 0!==e&&e.hasOwnProperty("type")?b:A,k=(0,n.d4)(c.hZ),S=(0,n.wA)(),I=(0,i.useRef)(null),C=(0,i.useRef)(null),T=(0,x.rD)(),E=(0,i.useCallback)((()=>{S((0,c.ku)(!1))}),[S]);(0,i.useEffect)((()=>E()),[E]),(0,i.useEffect)((()=>{if(w){const{current:e}=I;e&&(e.revealRangeInCenterIfOutsideViewport(w),e.setSelection(w))}}),[w]);(0,i.useEffect)((()=>{matchMedia(g.F3).addEventListener("change",(t=>{const s=window.localStorage.getItem(g.V0.em_color_scheme),i=t.matches?g.nd:g.T;e.hasOwnProperty("type")?S(s?(0,m.eX)(s===g.nd?`vs-${s}`:g.T):(0,m.eX)(i===g.nd?`vs-${i}`:g.T)):S(s?(0,d.eX)(s===g.nd?`vs-${s}`:g.T):(0,d.eX)(i===g.nd?`vs-${i}`:g.T))}))}),[S,e]),(0,i.useEffect)((()=>{const t=window.localStorage.getItem(g.V0.em_color_scheme),s=matchMedia(g.F3).matches?g.nd:g.T;null!==e&&void 0!==e&&e.hasOwnProperty("type")?S(t?(0,m.eX)(t===g.nd?`vs-${t}`:g.T):(0,m.eX)(s===g.nd?`vs-${s}`:g.T)):S(t?(0,d.eX)(t===g.nd?`vs-${t}`:g.T):(0,d.eX)(s===g.nd?`vs-${s}`:g.T))}),[S,e]);(0,p.A)((e=>{const t=e.data.operation,s=e.data;C.current=t,t===g.Ru.UPDATE_EDITOR_POSITION_FROM_IFRAME&&(e=>{const{current:t}=I;if(t&&!t.hasTextFocus()){const s=t.getModel(),i=s.getPositionAt(e.start),r=s.getPositionAt(e.end),n={startColumn:i.column,startLineNumber:i.lineNumber,endColumn:r.column,endLineNumber:r.lineNumber};t.revealRangeInCenterIfOutsideViewport(n),t.setSelection(n)}})(s.data)}));const L=(0,i.useMemo)((()=>document.createElement("div")),[]),z=(0,i.useMemo)((()=>({...k,domReadOnly:t,readOnly:t,unusualLineTerminators:"off",mouseWheelZoom:!0,wordWrap:T.onlyCodeModeInMobile?"off":k.wordWrap,ariaContainerElement:L})),[k,T.onlyCodeModeInMobile,t,L]);return(null===s||void 0===s?void 0:s.uri)&&(0,y.jsx)(r.Ay,{theme:N,className:"monaco-editor",defaultLanguage:"html",onMount:(e,t)=>{I.current=e;const s=e.getContribution("editor.linkDetector").openerService,i=s.open.bind(s),r=document.createElement("div");new a.Ay(e,h,{"doctype-html5":!1,"html-lang-require":!1,"head-script-disabled":!1,"style-disabled":!1,"script-disabled":!1,"attr-lowercase":!1,"attr-value-single-quotes":!1,"attr-value-not-empty":!1,"attr-sorted":!1,"attr-whitespace":!1,"input-requires-label":!1,"tag-self-close":!1,"tagname-lowercase":!1,"href-abs-or-rel":!1,"inline-style-disabled":!1,"space-tab-mixed-disabled":!1,"attr-no-unnecessary-whitespace":!0,"tags-check":{img:{selfclosing:!1,attrsRequired:["src","alt"]},a:{selfclosing:!1,attrsRequired:["href"]}},"empty-tag-not-self-closed":!1,"attr-value-double-quotes":!0,"doctype-first":!0,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0,"title-require":!0,"alt-require":!0,"inline-script-disabled":!0,"id-class-value":!1,"id-class-ad-disabled":!0,"attr-unsafe-chars":!0,csslint:{"display-property-grouping":!0,"known-properties":!0}}).watch(),e.getContribution("editor.linkDetector").openerService.open=e=>(r.innerHTML=e,i(r.textContent)),S((0,c.ku)(!0)),e.onMouseUp((()=>{const t=e.getSelection();t.startColumn===t.endColumn&&t.startLineNumber===t.endLineNumber&&(async e=>{const{current:t}=I;if(t){const s=t.getModel();_({operation:g.Ru.UPDATE_EDITOR_POSITION_FROM_EDITOR,data:s.getOffsetAt(e)})}})(e.getPosition())})),e.onDidBlurEditorWidget((()=>{_({operation:g.Ru.EDITOR_CHANGE_FOCUS,data:!1}),S((0,u.YT)(!1))})),e.onDidFocusEditorWidget((()=>{_({operation:g.Ru.EDITOR_CHANGE_FOCUS,data:!0}),S((0,u.YT)(!0))}))},options:z,keepCurrentModel:!0,path:s.uri.toString(),onValidate:function(e){var t;"Doctype must be declared first."!==(null===(t=e[0])||void 0===t?void 0:t.message)&&(g.EW.isPlugin&&o.fire(e),S((0,d.Bj)(e)))}})}},21999:(e,t,s)=>{s.d(t,{A:()=>n});s(92810);var i=s(64617),r=s(70082);const n=({lastProjectId:e})=>{const{pathname:t,search:s}=(0,i.zy)();return!1===e?(0,r.jsx)(i.C5,{to:"/projects"}):e&&(0,r.jsx)(i.C5,{to:`/projects/${e+t+s}`})}},32983:(e,t,s)=>{s.d(t,{A:()=>n});s(92810);var i=s(64617),r=s(70082);const n=({to:e})=>(0,r.jsx)(i.C5,{to:e})},24239:(e,t,s)=>{s.d(t,{A:()=>m});s(92810);var i=s(41919),r=s(25072),n=s(43005),a=s(64617),l=s(23287),o=s(32269),c=s(70082);const{Content:d}=i.A,m=()=>{const{__:e}=(0,l.s9)();let t=(0,a.Zp)();return(0,c.jsx)(i.A,{children:(0,c.jsx)(d,{className:"container",children:(0,c.jsx)(r.Ay,{status:"500",title:"404",subTitle:e("Sorry, the page you visited does not exist."),extra:(0,c.jsx)(n.Ay,{type:"primary",onClick:()=>(0,o.XZ)(t,"/projects"),children:e("Back Home")})})})})}},26201:(e,t,s)=>{s.d(t,{A:()=>X});var i=s(92810),r=s(45934),n=s(64617),a=s(94822),l=s(76662),o=s(81e3),c=s(66522),d=s(43005),m=s(71086),u=s(2018),p=s(7744),h=s(29234),g=s(57806),_=s(67661),v=s(66726),x=s(31022),j=s(3329),f=s(13932),y=s(69825),A=s(58133),b=s(38883),w=s.n(b),N=s(88528),k=s(65983),S=s(84568),I=s(32269),C=s(71157),T=s(45695),E=s(23287),L=s(32411),z=s(85163),D=s(70082);const{Text:M,Link:O,Title:R}=l.A,B="Links",F="Images",P="Spam assassin",H="Problems",$="valid",q="warnings",W="errors",V=[$,W,q],U=({summary:e,__:t,selectedTags:s,setSelectedTags:i})=>(0,D.jsx)(R,{level:5,style:{margin:0,fontSize:"14px"},children:(0,D.jsx)(o.A,{style:{flexWrap:"wrap"},gap:"6",children:V.map(((r,n)=>(0,D.jsxs)(c.A.CheckableTag,{checked:null===s||void 0===s?void 0:s.includes(r),onChange:e=>((e,t)=>{const r=t?2===s.length?[]:[...s,e]:s.filter((t=>t!==e));i(r)})(r,e),className:w()(`${r} optimise__button`,{[`${r}_active`]:s.includes(r)}),children:[t(r===$?"Valid":r===q?"Warnings":"Errors"),":"," ",(null===e||void 0===e?void 0:e[r])||0]},r+n)))})}),X=()=>{var e,t,s,l,o;const{__:c,_n:b}=(0,E.s9)(),V=(0,r.wA)(),{emailId:X,projectId:Y}=(0,n.g)(),Z=(0,C.hN)(),J=(0,T.QC)(),G=(0,L.fn)(),K=(0,r.d4)(k.rd),[Q,ee]=(0,N.ku)(),[te,se]=(0,N.Ju)(),[ie,re]=(0,N.Sr)(),{data:ne,isSuccess:ae,refetch:le}=(0,S.fo)(+Y,{skip:!!z.EW.isPlugin||!+Y}),{limits:oe}=ne&&!z.EW.isPlugin?ne:{limits:{optimization_limit:0}},{optimization_limit:ce}=oe,de=ce>0,[me,ue]=(0,i.useState)([]),[pe,he]=(0,i.useState)([]),[ge,_e]=(0,i.useState)([]),[ve,xe]=(0,i.useState)([]),[je,fe]=(0,i.useState)([]),[ye,Ae]=(0,i.useState)([]),[be,we]=(0,i.useState)(),[Ne,ke]=(0,i.useState)(0);(0,i.useEffect)((()=>{var e;ae&&(null===ne||void 0===ne||null===(e=ne.counters)||void 0===e?void 0:e.optimization_counter)&&ke(ne.counters.optimization_counter)}),[ae,ne]),(0,i.useEffect)((()=>{var e,t;be===B&&me.links&&fe(ve.length>0?null===(e=me.links)||void 0===e?void 0:e.filter((e=>ve.includes(e.status))):me.links);be===F&&pe.images&&Ae(ve.length>0?null===(t=pe.images)||void 0===t?void 0:t.filter((e=>ve.includes(e.status))):pe.images)}),[me.links,pe.images,ve,be]);const Se=()=>{if(!X)return void Z.error({message:(0,D.jsx)("div",{dangerouslySetInnerHTML:{__html:"Save the mail first."}}),placement:"bottomRight"});let e;const t=G.getValue(),s=(new DOMParser).parseFromString(t,"text/html"),i={},r={};s.querySelectorAll("a[href]").forEach(((e,t)=>{i[`link_${t}`]=e.getAttribute("href"),r[`link_${t}`]=e.innerText})),J.send({operation:"sandbox_set_attr_to_links"}),Q({entity_id:X,data:i}).then((({data:t,error:s})=>{if(s)(0,I.p6)({error:s},Z);else if(null!==t&&void 0!==t&&t.result){let s=[...t.result];null===s||void 0===s||s.sort(((e,t)=>e.linkId-t.linkId));const i=e=>{var t,s,i,r;return(null!==e.statusCode?e.statusCode<300&&(null===(t=null===(s=e.page)||void 0===s?void 0:s.secure)||void 0===t||t):"invalid"!==e.type)?$:(e.statusCode&&e.statusCode<400||200===e.statusCode&&(null===(i=null===(r=e.page)||void 0===r?void 0:r.secure)||void 0===i||i))&&"invalid"!==e.type?q:W};e={links:s.map((e=>({...e,text:r[e.linkId],status:i(e)}))),summary:{valid:s.filter((e=>i(e)===$)).length||0,warnings:s.filter((e=>i(e)===q)).length||0,errors:s.filter((e=>i(e)===W)).length||0}},ue(e),(0,I.wB)(c("Links validation was successfully completed"),Z),!z.EW.isPlugin&&le()}else t.statusCode>300||!t.success?(0,I.p6)({error:{data:t}},Z):Z.error({message:(0,D.jsx)("div",{dangerouslySetInnerHTML:{__html:"\u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430"}}),placement:"bottomRight"}),!me.links&&Te("")})).catch((e=>{(0,I.p6)({error:e},Z)}))},Ie=()=>{if(!X)return void Z.error({message:(0,D.jsx)("div",{dangerouslySetInnerHTML:{__html:"Save the mail first."}}),placement:"bottomRight"});const e=G.getValue(),t=(new DOMParser).parseFromString(e,"text/html");let s={};t.querySelectorAll("img").forEach(((e,t)=>s[`image_${t}`]=e.src)),J.send({operation:"sandbox_set_attr_to_images"}),te({entity_id:X,data:s}).then((({data:e,error:t})=>{let s;if(t)(0,I.p6)({error:t},Z);else if(null!==e&&void 0!==e&&e.result){let t=Object.values(e.result);t.sort(((e,t)=>e.imageId-t.imageId));let i=t.reduce(((e,t)=>e+Math.round(t.image.bytes/1024)),0);const r=e=>null!==e.statusCode&&e.statusCode<300?$:e.statusCode<400&&e.statusCode>=300||200===e.statusCode&&!e.valid?q:W;s={images:t.map((e=>({...e,status:r(e)})))||[],summary:{valid:t.filter((e=>r(e)===$)).length||0,warnings:t.filter((e=>r(e)===q)).length||0,errors:t.filter((e=>r(e)===W)).length||0},summaryTime:{value:(i>1200?i/1e3:i).toFixed(1),name:c(i>1200?"MB":"KB")}},s&&he(s),(0,I.wB)(c("Images validation was successfully completed"),Z),!z.EW.isPlugin&&le()}else{var i;e.statusCode>300||!e.success?(0,I.p6)({error:{data:e}},Z):Z.error({message:(0,D.jsx)("div",{dangerouslySetInnerHTML:{__html:"\u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430"}}),placement:"bottomRight"}),(null===pe||void 0===pe||null===(i=pe.images)||void 0===i||!i.length)&&Te("")}})).catch((e=>{(0,I.p6)({error:e},Z)}))},Ce=()=>{X?ie({entity_id:X,data:{html:G.getValue()}}).then((({data:e,error:t})=>{if(t)(0,I.p6)({error:t},Z);else if(e&&e.success){const t=!!e.result.report&&Object.values(e.result.report);t&&(t.sort(((e,t)=>e.score-t.score)),_e({...e.result,report:t})),(0,I.wB)(c("Spam validation was successfully completed"),Z),!z.EW.isPlugin&&le()}else e.statusCode>300||!e.success?(0,I.p6)({error:{data:e}},Z):Z.error({message:(0,D.jsx)("div",{dangerouslySetInnerHTML:{__html:"\u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430."}}),placement:"bottomRight"}),(null===ge||void 0===ge||!ge.length)&&Te("")})).catch((e=>{(0,I.p6)({error:e},Z)})):Z.error({message:(0,D.jsx)("div",{dangerouslySetInnerHTML:{__html:"Save the mail first."}}),placement:"bottomRight"})},Te=e=>{we(e!==be?e:""),xe([])};let Ee=null;return(0,i.useEffect)((()=>{de&&Ne>=+ce&&Z.error({message:c("The usage limit has been exceeded"),description:c("The maximum number of requests for the current subscription period has been reached.\nSelect the appropriate plan to fulfil more requests"),placement:"bottomRight"})}),[Ne,ce,c,Z,de]),(0,D.jsxs)("div",{className:"optimise selected_form-props-wrapper selected_form-props-wrapper_optimize",children:[(0,D.jsxs)("div",{className:"optimise__couter-wrapper",children:[!z.EW.isPlugin&&(0,D.jsx)(d.Ay,{className:w()("optimise__counter-bar",{"optimise__counter-bar_full":de&&Ne>=+ce}),size:"small",children:Ne+" "+c("of")+" "+(de?ce:"\u221e")+" "+b("test","tests",ce)+" "+c(" were used")}),de&&(0,D.jsx)(a.N_,{style:{fontSize:14,textDecoration:"underline"},to:"/billing",children:c("Need more?")})]}),(0,D.jsx)(m.A,{className:"selected-td-form__divider",style:{marginTop:0,marginBottom:0}}),(0,D.jsxs)(u.A,{gutter:10,align:"middle",children:[(0,D.jsx)(p.A,{span:20,children:(0,D.jsx)("div",{className:"form-group-title",children:c("Links validation")})}),(0,D.jsx)(p.A,{span:4,align:"right",children:(0,D.jsx)(d.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{var e;Te(B),null!==me&&void 0!==me&&null!==(e=me.links)&&void 0!==e&&e.length||be===B||Se()},loading:ee.isLoading,children:!ee.isLoading&&(be===B?(0,D.jsx)(x.A,{}):(0,D.jsx)(j.A,{}))})})]}),be===B&&!(null===me||void 0===me||!me.links)&&(0===(null===me||void 0===me||null===(e=me.links)||void 0===e?void 0:e.length)?(0,D.jsx)(u.A,{style:{marginBottom:24},children:(0,D.jsx)(h.A,{message:c("No links found."),type:"info"})}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(u.A,{style:{marginBottom:14},children:(0,D.jsxs)("div",{className:"optimise__title-wrapper",children:[(0,D.jsx)(U,{__:c,summary:me.summary,setSelectedTags:xe,selectedTags:ve}),(0,D.jsx)(d.Ay,{loading:ee.isLoading,onClick:Se,icon:(0,D.jsx)(f.A,{}),children:c("Refresh")})]})}),(0,D.jsx)(u.A,{style:{marginBottom:24},children:(0,D.jsx)(p.A,{span:24,children:(0,D.jsx)(g.A,{itemLayout:"horizontal",dataSource:je,renderItem:(e,t)=>{var s;return(0,D.jsx)(g.A.Item,{style:{border:"none"},children:(0,D.jsx)(g.A.Item.Meta,{avatar:e.status===$?(0,D.jsx)(y.A,{className:$}):e.status===q?(0,D.jsx)(y.A,{className:q}):(0,D.jsx)(A.A,{className:W}),title:(0,D.jsx)(O,{className:"optimise__link",style:{color:"#177ddc",textDecoration:"underline",userSelect:"text"},draggable:!1,onClick:()=>{return t=e.linkId,s=600>e.statusCode>399||!e.statusCode,void J.send({operation:z.Ru.SANDBOX_SET_POSITION_TO_LINK,settings:{elementId:t,isError:s}});var t,s},children:""===e.url?c("empty link"):e.url}),description:(0,D.jsxs)(D.Fragment,{children:[!(null===(s=e.text)||void 0===s||!s.length)&&(0,D.jsx)(D.Fragment,{children:(0,D.jsx)(M,{type:"secondary",children:e.text})}),e.page.title&&e.page.title,e.page.secure&&e.status===$&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("span",{className:"image-size-splitter",children:"\xa0\u2022\xa0"}),(0,D.jsx)("span",{className:$,children:c("secure")})]}),!e.resolvedUrl&&!e.statusCode&&"url"===e.type&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("span",{className:"image-size-splitter",children:"\xa0\u2022\xa0"}),(0,D.jsx)(M,{type:"secondary",children:c("Failed to load")})]})]})})},t+"_"+e.id)}})})})]})),(0,D.jsx)(m.A,{className:"selected-td-form__divider",style:{marginTop:0,marginBottom:0}}),(0,D.jsxs)(u.A,{gutter:10,align:"middle",children:[(0,D.jsx)(p.A,{span:20,children:(0,D.jsx)("div",{className:"form-group-title",children:c("Images validation")})}),(0,D.jsx)(p.A,{span:4,align:"right",children:(0,D.jsx)(d.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>{var e;Te(F),null!==pe&&void 0!==pe&&null!==(e=pe.images)&&void 0!==e&&e.length||be===F||Ie()},loading:se.isLoading,children:!se.isLoading&&(be===F?(0,D.jsx)(x.A,{}):(0,D.jsx)(j.A,{}))})})]}),be===F&&!(null===pe||void 0===pe||!pe.images)&&(0===(null===pe||void 0===pe||null===(t=pe.images)||void 0===t?void 0:t.length)?(0,D.jsx)(u.A,{style:{marginBottom:24},children:(0,D.jsx)(h.A,{message:c("No images found."),type:"info"})}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(u.A,{style:{marginBottom:16},children:(0,D.jsx)(h.A,{style:{padding:14,paddingBottom:10,width:"100%"},message:(0,D.jsxs)("div",{className:"optimise__summary",children:[(0,D.jsxs)("div",{children:[(0,D.jsxs)(R,{level:4,style:{marginBottom:"0"},children:[pe.images.length," "]}),(0,D.jsx)("span",{style:{fontSize:"12px"},children:c("images")})]}),(0,D.jsxs)("div",{children:[(0,D.jsxs)(R,{level:4,style:{marginBottom:"0"},children:[null===(s=pe.summaryTime)||void 0===s?void 0:s.value,null===(l=pe.summaryTime)||void 0===l?void 0:l.name]}),(0,D.jsx)("span",{style:{fontSize:"12px"},children:c("total size")})]}),(0,D.jsxs)("div",{children:[(0,D.jsx)(R,{level:4,style:{marginBottom:"0"},children:(Math.max(...pe.images.map((e=>e.image.responseTime)))/1e3).toFixed(2)+c("s")}),(0,D.jsx)("span",{style:{fontSize:"12px"},children:c("time to load")})]})]}),type:"warning"})}),(0,D.jsx)(u.A,{style:{marginBottom:12},children:(0,D.jsxs)("div",{className:"optimise__title-wrapper",children:[(0,D.jsx)(U,{__:c,summary:pe.summary,setSelectedTags:xe,selectedTags:ve}),(0,D.jsx)(d.Ay,{loading:se.isLoading,onClick:()=>Ie(),icon:(0,D.jsx)(f.A,{}),children:c("Refresh")})]})}),(0,D.jsx)(u.A,{style:{marginBottom:12},children:(0,D.jsx)(p.A,{span:24,children:(0,D.jsx)(g.A,{className:"optimise__result-list",itemLayout:"horizontal",dataSource:ye,renderItem:(e,t)=>(0,D.jsx)(g.A.Item,{className:"optimise__image-item image-item",style:{border:"none"},children:(0,D.jsx)(g.A.Item.Meta,{className:w()("image-item__meta",{"image-item__meta_fail":!e.resolvedUrl&&!e.statusCode}),avatar:(0,D.jsx)(_.A,{className:w()("image-item__image",{"image-item__image_fail":!e.resolvedUrl||!e.valid}),width:92,height:"auto",style:{height:"auto"},src:e.resolvedUrl||"",preview:!1,onMouseEnter:()=>{var t;return((e,t)=>{clearTimeout(Ee);let s=document.querySelector(".img-preview")?document.querySelector(".img-preview"):null,i=document.querySelector(".img-preview-content")?document.querySelector(".img-preview-content"):null;document.querySelector(".img-preview")||(s=document.createElement("div"),s.classList.add("img-preview"),i=document.createElement("div"),i.classList.add("img-preview-content"),s.append(i),document.querySelector(".email-pane__col_settings-inner").append(s)),i.innerHTML=`<table cellspacing="0" cellpadding="0" border="0" width="100%"><img height="auto" width=${t+"px"} alt="" style="max-width: 100%; object-fit: contain" src=${e}></table>`,"1"!==s.style.opacity&&setTimeout((function(){s.style.opacity="1",s.style.transform="translateX(-100%)"}),10)})(e.url,null===(t=e.image.dimensions)||void 0===t?void 0:t.width)},onMouseLeave:()=>(()=>{let e=document.querySelector(".img-preview");e&&(Ee=setTimeout((()=>{e.style.opacity="0",e.style.transform="translateX(-99%)",setTimeout((function(){e.remove()}),300)}),300))})()}),title:e.url?(0,D.jsx)(v.A,{placement:"top",title:e.message,children:(0,D.jsx)(O,{className:"optimise__link",style:{color:"#177ddc",textDecoration:"underline",userSelect:"text"},draggable:!1,onClick:()=>{return t=e.imageId,s=600>e.statusCode>399||!e.statusCode,void J.send({operation:z.Ru.SANDBOX_SET_POSITION_TO_IMG,settings:{elementId:t,isError:s}});var t,s},children:""===(null===e||void 0===e?void 0:e.url)?c("empty src"):e.url})}):e.message,description:(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)("div",{className:"image-size",children:[e.image.dimensions&&(0,D.jsxs)(D.Fragment,{children:[e.image.dimensions.width+" \xd7 "+e.image.dimensions.height,(0,D.jsx)("span",{className:"image-size-splitter",children:" \xa0\u2022\xa0 "}),(0,D.jsxs)("span",{children:[Math.round(e.image.bytes/1024),c("kB")]}),(0,D.jsx)("span",{className:"image-size-splitter",children:" \xa0\u2022\xa0 "}),(0,D.jsxs)("span",{children:[e.image.responseTime,c("ms")]}),(0,D.jsx)("span",{className:"image-size-splitter",children:" \xa0\u2022\xa0 "}),(0,D.jsx)("span",{className:"image-size-format",children:e.image.contentType})]}),e.image.secure&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("span",{className:"image-size-splitter",children:" \xa0\u2022\xa0 "}),(0,D.jsx)("span",{className:$,children:c("secure")})]}),e.resolvedUrl&&!e.valid&&(0,D.jsx)(M,{type:"danger",children:c("not valid")})]})," ",!e.resolvedUrl&&!e.statusCode&&(0,D.jsx)(M,{type:"danger",children:c("Failed to load")})]})})},t)})})})]})),(0,D.jsx)(m.A,{className:"selected-td-form__divider",style:{marginTop:0,marginBottom:0}}),(0,D.jsxs)(u.A,{gutter:10,align:"middle",children:[(0,D.jsx)(p.A,{span:20,children:(0,D.jsx)("div",{className:"form-group-title",children:c("SpamAssassin")})}),(0,D.jsx)(p.A,{span:4,align:"right",children:(0,D.jsx)(d.Ay,{className:"selected-td-form__button ghost-button",type:"text",loading:re.isLoading,onClick:()=>{var e;Te(P),null!==(e=ge.report)&&void 0!==e&&e.length||Ce()},children:!re.isLoading&&(be===P?(0,D.jsx)(x.A,{}):(0,D.jsx)(j.A,{}))})})]}),be===P&&!(null===(o=ge.report)||void 0===o||!o.length)&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(u.A,{style:{marginBottom:8},children:[(0,D.jsxs)("div",{className:"optimise__title-wrapper optimise__title-wrapper_spam",children:[(0,D.jsxs)(R,{level:1,style:{margin:0},type:ge.spamScore<2||!ge.spamScore||ge.spamScore<=ge.baseSpamScore-1?"success":ge.spamScore<ge.baseSpamScore-1?"warning":"danger",children:[(0,D.jsx)("span",{style:{marginRight:"12px"},children:ge.spamScore||0}),(0,D.jsx)(M,{style:{marginRight:"12px",fontSize:"20px"},children:"Score"})]}),(0,D.jsx)(d.Ay,{icon:(0,D.jsx)(f.A,{}),loading:re.isLoading,onClick:Ce,children:c("Refresh")})]}),ge.spamScore>ge.baseSpamScore-1&&(0,D.jsx)(M,{children:c("Lower scores are better. Aim for a score less than ")+(ge.baseSpamScore-1)+"."})]}),(0,D.jsx)(u.A,{style:{marginBottom:8},children:(0,D.jsx)(p.A,{span:24,children:(0,D.jsx)(g.A,{itemLayout:"horizontal",dataSource:ge.report,renderItem:e=>(0,D.jsx)(g.A.Item,{style:{border:"none"},children:(0,D.jsx)(g.A.Item.Meta,{title:(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(M,{style:{fontSize:"20px"},children:e.score}),(0,D.jsx)("span",{style:{marginLeft:"12px"},children:e.description})]})})})})})})]}),(0,D.jsx)(m.A,{className:"selected-td-form__divider",style:{marginTop:0,marginBottom:0}}),(0,D.jsxs)(u.A,{gutter:10,align:"middle",children:[(0,D.jsx)(p.A,{span:20,children:(0,D.jsx)("div",{className:"form-group-title",children:c("Source code validation")})}),(0,D.jsx)(p.A,{span:4,align:"right",children:(0,D.jsx)(d.Ay,{className:"selected-td-form__button ghost-button",type:"text",onClick:()=>Te(H),children:be===H?(0,D.jsx)(x.A,{}):(0,D.jsx)(j.A,{})})})]}),be===H&&(0,D.jsx)(D.Fragment,{children:null!==K&&void 0!==K&&K.length?(0,D.jsx)(D.Fragment,{children:(0,D.jsx)(u.A,{style:{marginBottom:8},children:(0,D.jsx)(p.A,{span:24,children:(0,D.jsx)(g.A,{itemLayout:"horizontal",dataSource:K,renderItem:e=>(0,D.jsx)(g.A.Item,{style:{border:"none"},children:(0,D.jsx)(g.A.Item.Meta,{avatar:e.severity<6?(0,D.jsx)(A.A,{className:q}):(0,D.jsx)(A.A,{className:W}),title:(0,D.jsx)(D.Fragment,{children:(0,D.jsxs)(M,{onClick:()=>(e=>{const t={startColumn:e.startColumn,startLineNumber:e.startLineNumber,endColumn:e.endColumn,endLineNumber:e.endLineNumber};V((0,k.ps)(t))})(e),style:{cursor:"pointer"},className:e.severity<6?"warning":"error",children:["Line: ",e.startLineNumber," ",e.startLineNumber!==e.endLineNumber&&" \u2013 "+e.endLineNumber]})}),description:(0,D.jsx)(M,{children:e.message})})})})})})}):(0,D.jsx)(u.A,{style:{marginBottom:24},children:(0,D.jsx)(h.A,{message:c("No problems found."),type:"info"})})})]})}},72981:(e,t,s)=>{s.d(t,{A:()=>l});s(92810);var i=s(81e3),r=s(24293),n=s(79716),a=s(70082);const l=({small:e=!1,style:t,wrap:s=!1})=>{const l={width:e?"100%":"100vw",height:"80vh",display:"flex",justifyContent:"center",alignItems:"center",...t},o=(0,a.jsx)(n.A,{style:{fontSize:48},spin:!0});return(0,a.jsx)(i.A,{size:"large",style:l,wrap:s,children:(0,a.jsx)(r.A,{indicator:o})})}},53765:(e,t,s)=>{s.d(t,{A:()=>te});var i=s(92810),r=s(64617),n=s(29218),a=s(76662),l=s(66726),o=s(29234),c=s(81e3),d=s(43005),m=s(2018),u=s(7744),p=s(86889),h=s(73035),g=s(85677),_=s(38587),v=s(45934),x=s(23287),j=s(38883),f=s.n(j),y=s(84e3),A=s(79060),b=s(4800),w=s(79304),N=s(94822),k=s(8375),S=s(32293),I=s(35285),C=s(64936),T=s(36404),E=s(85163),L=s(70082);const z=({title:e})=>{const{__:t}=(0,x.s9)();let s=(0,v.wA)();const{projectId:n}=(0,r.g)(),a=(0,v.d4)(C.cL),l=(0,v.d4)(T.yN);let o=[{label:t("Project settings"),key:"Project settings",className:"em-analytics__account-settings",icon:(0,L.jsx)(k.A,{style:{fontSize:"16px"}}),onClick:()=>{s((0,C.qf)(E.lx.EDIT_PROJECT_MODAL))}},{label:(0,L.jsx)(N.N_,{to:"/projects",children:t("List of projects")}),key:"List of projects",icon:(0,L.jsx)(S.A,{style:{fontSize:"16px"}}),className:"em-analytics__sign-out"}];const c=(null===l||void 0===l?void 0:l.title)||e;return(0,i.useEffect)((()=>{if(n){const e=document.querySelector(".header__project");null===e||void 0===e||e.setAttribute("data-project-id",n)}}),[n]),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(b.A,{menu:{items:o},arrow:"true",overlayStyle:{minWidth:0},getPopupContainer:()=>document.querySelector("header"),children:(0,L.jsxs)(N.N_,{to:"/projects/"+n+"/emails?page=1",className:"header__project",children:[(0,L.jsxs)(w.A,{size:28,style:{backgroundColor:"#777",marginRight:8,fontWeight:700,fontSize:18,textTransform:"uppercase"},children:[null===c||void 0===c?void 0:c[0],null!==c&&void 0!==c&&c.split(" ")[1]?c.split(" ")[1][0]:""]}),c]})}),(0,L.jsx)(I.A,{isModalVisible:a===E.lx.EDIT_PROJECT_MODAL})]})};var D=s(97562),M=s(57918),O=s(47358),R=s(7760),B=s(8493),F=s(64037),P=s(18777),H=s(17581),$=s(32269),q=s(45695),W=s(69106);const V=[50,50],U=[420,420],X=[45,10,45],Y=[0,100,0],Z=[50,420,50],J="all 0.5s ease 0s",{Paragraph:G}=a.A,K="code",Q="view",ee=({email:e,viewMode:t="view",isLoggedIn:s})=>{const{__:a,_x:j}=(0,x.s9)(),b=(0,v.wA)(),w=(0,v.d4)(O.Fv),{emailId:N,blockId:k}=(0,r.g)(),S=(0,q.QC)(),[I,C]=(0,i.useState)(t),[T,ee]=(0,i.useState)(I===Q?Y:V),[te,se]=(0,i.useState)(I===Q?Z:U),[ie,re]=(0,i.useState)([]),[ne,ae]=(0,i.useState)(!1),[le,oe]=(0,i.useState)(!1),ce=(0,i.useRef)(null),de=(0,i.useRef)(),me=(0,i.useRef)(),ue=(0,i.useRef)(),pe=N||k,{data:he=[],refetch:ge}=(0,P.Cf)(pe);(0,i.useEffect)((()=>{pe&&ge(pe)}),[I,pe,ge]),(0,W.f)(e);(0,F.A)((e=>{const t=e.data.operation,s=document.querySelector(".preview-mode__pane_editor")?document.getElementById("pane-content-iframe"):document.querySelector(".preview-mode__row > .preview-mode__col_preview");t===E.Ru.APPLICATION_SCROLL_TO&&setTimeout((()=>{s.scrollTo({top:e.data.settings.value,behavior:"smooth"})}),100),t===E.Ru.APPLICATION_IFRAME_SET_HEIGHT&&(document.querySelector(".preview-mode__iframe").style.height=e.data.settings.height+"px")}));const _e=e=>{e.target.classList.contains("preview-mode__resizer")&&(de.current&&(de.current.style.transition="none"),me.current&&(me.current.style.transition="none"),ue.current&&(ue.current.style.transition="none"))},ve=()=>{const e=I===Q?J:"none";de.current.style.transition!==J&&(de.current&&(de.current.style.transition=e),me.current&&(me.current.style.transition=e),ue.current&&(ue.current.style.transition=e))};(0,i.useEffect)((()=>(document.addEventListener("mousedown",_e),document.addEventListener("mouseup",ve),()=>{document.removeEventListener("mousedown",_e),document.removeEventListener("mouseup",ve)}))),(0,i.useEffect)((()=>{const e=S.onInit((()=>{S.send({operation:E.Ru.SANDBOX_LOCK_EDIT,data:t===Q}),S.send({operation:E.Ru.SANDBOX_LOCK_DISCUSS,value:ne})}));return()=>e.dispose()}),[t,I,ne,S]),(0,i.useEffect)((()=>{ee(I===Q?Y:V),se(I===Q?Z:U)}),[I]);const xe=({key:e,domEvent:t})=>{switch(t.preventDefault(),de.current.style.transition=J,me.current.style.transition=J,ue.current.style.transition=J,ce.current.resize(),e){case"Desktop":default:ee(I===Q?Y:V);break;case"Mobile":ee(X)}setTimeout((()=>{S.send({operation:E.Ru.SANDBOX_IFRAME_SETSIZE,settings:{iframeWidth:de.current.getBoundingClientRect().width}}),ce.current.resize()}),550)};(0,i.useEffect)((()=>{const e=new $.jG;if(ie.length<2){var t,s;const i=null===(t=de.current)||void 0===t?void 0:t.getBoundingClientRect(),r=null===(s=document.getElementById("pane-content-iframe"))||void 0===s?void 0:s.getBoundingClientRect(),n=setInterval(l,50);re((e=>[...e,n]));const a=t=>{e.addDisposable(S.onInit((()=>{S.send({operation:E.Ru.SANDBOX_WINDOW_CHARACTERISTIC,settings:t})})))};function l(){a({iframeOffsetTop:i.top-r.top,scrollTop:r.top?-r.top:0,innerHeight:window.innerHeight,previewHeight:document.querySelector(".preview-mode__pane-content").getBoundingClientRect().height,mode:K})}}return e.addDispose((()=>clearInterval(ie[ie.length-1]))),()=>e.dispose()}),[ie,S]),(0,i.useEffect)((()=>{if(I===K){const e=window.localStorage.getItem(E.V0.em_code_mode_pane_sizes);e&&ee(JSON.parse(e))}}),[I]);const je=e=>{if(I===K&&window.localStorage.setItem(E.V0.em_code_mode_pane_sizes,JSON.stringify(e)),I===Q){const t=(e[2]+e[0])/2;ee([t,e[1],t])}else ee(e);S.send({operation:E.Ru.SANDBOX_IFRAME_SETSIZE,settings:{iframeWidth:de.current.getBoundingClientRect().width}}),ce.current.resize()},fe=()=>{ce.current.resize()},ye=(0,i.useCallback)((()=>{e.hasOwnProperty("type")?b((0,R.vs)()):b((0,O.vs)())}),[b,e]);let Ae;const be=()=>{var e,t;const s=null===(e=de.current)||void 0===e?void 0:e.getBoundingClientRect(),i=null===(t=document.getElementById("pane-content-iframe"))||void 0===t?void 0:t.getBoundingClientRect();Ae&&window.clearTimeout(Ae),Ae=window.setTimeout((function(){S.send({operation:E.Ru.SANDBOX_WINDOW_CHARACTERISTIC,settings:{iframeOffsetTop:s.top-i.top,scrollTop:document.getElementById("pane-content-iframe").scrollTop,innerHeight:window.innerHeight,previewHeight:document.querySelector(".preview-mode__pane-content").getBoundingClientRect().height,CODE:K}})}),100)};(0,i.useEffect)((()=>(document.addEventListener("scroll",be,!0),()=>{document.removeEventListener("scroll",be,!0)})));const we=()=>{ae((e=>!e)),S.send({operation:E.Ru.SANDBOX_LOCK_DISCUSS,value:!ne})},Ne=()=>{C(le?Q:K),oe((e=>!e))};let ke=[{key:E.yI,children:(0,L.jsx)("div",{className:"preview-mode__collapse-wrapper"})},{label:(0,L.jsxs)(l.A,{placement:"right",title:j("Discuss","tab"),children:[(0,L.jsx)(h.A,{}),!!he.length&&(0,L.jsx)("span",{className:"email-pane__comment-counter",children:he.filter((e=>"deleted"!==e.comment_status)).length})]}),key:E.hc,className:"preview-mode__tab-discuss em-analytics__email-tab-discuss",style:{overflow:"hidden"},children:(0,L.jsx)("div",{className:"email-pane__collapse-wrapper",children:pe?(0,L.jsx)("div",{className:"ant-tabs-content discuss-wrapper",children:(0,L.jsx)(D.A,{email:e,comments:he,subjectId:pe,isLoggedIn:!0})}):(0,L.jsx)("div",{className:"aside-content-wrapper",children:e.hasOwnProperty("type")?(0,L.jsx)(o.A,{description:a("Save the block before commenting."),type:"info",showIcon:!0}):(0,L.jsx)(o.A,{description:a("Save the email before commenting."),type:"info",showIcon:!0})})})}];return(0,L.jsxs)("div",{className:f()("preview-mode",{"preview-mode_view":I===Q}),children:[(0,L.jsx)("div",{style:{display:"none"},children:(0,L.jsx)(y.A,{email:e,readOnly:t===Q})}),(0,L.jsxs)("div",{className:"preview-mode__header",children:[(0,L.jsxs)("div",{className:"preview-mode__header__title",children:[(0,L.jsx)(z,{style:{float:"left",cursor:"none"},title:null===e||void 0===e?void 0:e.project_title}),(0,L.jsx)(G,{editable:w&&{icon:(0,L.jsx)(g.A,{className:"email-page-header__icon-edit"}),onChange:t=>{e.isNew?b((0,B.BQ)(t)):b(H.GY.util.updateQueryData("getEmail",e.id,(e=>{Object.assign(e,{title:t})})))}},children:null===e.title?a("New email title"):e.title})]}),(0,L.jsx)("div",{children:(0,L.jsx)("div",{className:"preview-mode__buttons",children:(0,L.jsx)(c.A,{size:10,children:(s||w)&&(0,L.jsx)(l.A,{placement:"bottom",title:a("Close"),children:(0,L.jsx)(d.Ay,{className:"preview-mode__close-btn",onClick:w?ye:()=>{window.close(),window.location.href="/"},children:(0,L.jsx)(_.A,{})})})})})})]}),t!==K&&(0,L.jsx)("div",{className:"preview-mode__wrapper",children:(0,L.jsxs)(m.A,{className:"preview-mode__row",children:[(0,L.jsx)(u.A,{xl:{span:ne?6:0},lg:{span:ne?6:0},md:{span:ne?10:0},sm:{span:0},xs:{span:0},className:f()("preview-mode__col preview-mode__col_settings comment-block",{"preview-mode__col_settings-collapsed":!ne,"preview-mode__col_code-mode":I===K}),children:ne&&(0,L.jsx)(p.A,{className:"preview-mode__col_settings-inner",size:"middle",animated:{inkBar:!1,tabPane:!0},activeKey:E.hc,onTabClick:we,renderTabBar:(e,t)=>(0,L.jsx)(t,{className:"preview-mode__tab-bar",...e}),tabPosition:"left",items:ke})}),I===K&&(0,L.jsxs)(u.A,{xl:{span:ne?18:24},lg:{span:ne?18:24},md:{span:ne?14:24},sm:{span:24},xs:{span:24},className:f()("preview-mode__col preview-mode__col_preview preview-mode__code-mode",{"preview-mode__col_preview-collapsed":!ne}),children:[!ne&&(0,L.jsx)("div",{className:"preview-mode__content-col preview-mode__content-col_menu",children:(0,L.jsx)("div",{className:"preview-mode__comments-icon-wrapper",onClick:we,children:(0,L.jsxs)(l.A,{placement:"right",title:j("Discuss","tab"),children:[(0,L.jsx)(h.A,{style:{fontSize:"20px"}}),!!he.length&&(0,L.jsx)("span",{className:"preview-mode__comment-counter",children:he.filter((e=>"deleted"!==e.comment_status)).length})]})})}),(0,L.jsxs)(n.A,{className:"preview-mode__panes",direction:"horizontal",gutterSize:0,snapOffset:0,sizes:T,minSize:te,gutter:()=>(0,$.Dx)("preview-mode__panes-resizer"),onDragEnd:je,onDrag:fe,children:[(0,L.jsx)("div",{className:"preview-mode__pane preview-mode__pane_editor",children:(0,L.jsx)("div",{className:"preview-mode__pane-content",children:(0,L.jsx)(y.A,{email:e,readOnly:t===Q})})}),(0,L.jsx)("div",{className:"preview-mode__pane preview-mode__pane_main",ref:de,children:(0,L.jsxs)("div",{className:"preview-mode__pane-content",id:"pane-content-iframe",children:[(0,L.jsx)("div",{className:"preview-mode__iframe-scroll-top",id:"iframe-scroll-top"}),(0,L.jsx)(A.A,{ref:ce,email:e}),(0,L.jsx)("div",{className:"preview-mode__iframe-scroll-bottom",id:"iframe-scroll-bottom"})]})})]}),(0,L.jsx)("div",{className:"preview-mode__content-col preview-mode__content-col_menu preview-mode__content-col_menu-right",children:(0,L.jsx)(M.A,{setSizes:xe,sizes:[T[1]],codeModeShow:Ne,codeModeIsVisible:le,email:e})})]}),I===Q&&(0,L.jsx)(u.A,{xl:{span:ne?18:24},lg:{span:ne?18:24},md:{span:ne?14:24},sm:{span:24},xs:{span:24},className:f()("preview-mode__col preview-mode__col_preview",{"preview-mode__col_preview-collapsed":!ne}),children:(0,L.jsxs)(n.A,{className:"preview-mode__content",sizes:T,minSize:Z,snapOffset:0,gutter:()=>(0,$.Dx)("preview-mode__resizer"),onDragEnd:je,onDrag:fe,expandToMin:!0,gutterAlign:"center",dragInterval:1,children:[(0,L.jsx)("div",{className:"preview-mode__content-col preview-mode__content-col_menu",ref:me,children:!ne&&(0,L.jsx)("div",{className:"element-preview-menu",style:{width:"100%"},children:(0,L.jsx)("div",{className:"preview-mode__comments-icon-wrapper",onClick:we,children:(0,L.jsxs)(l.A,{placement:"right",title:j("Discuss","tab"),children:[(0,L.jsx)(h.A,{style:{fontSize:"20px"}}),!!he.length&&(0,L.jsx)("span",{className:"preview-mode__comment-counter",children:he.filter((e=>"deleted"!==e.comment_status)).length})]})})})}),(0,L.jsxs)("div",{className:"preview-mode__content-col preview-mode__pane-content preview-mode__content-col_main",ref:de,id:"pane-content-iframe",children:[(0,L.jsx)("div",{className:"preview-mode__iframe-scroll-top",id:"iframe-scroll-top"}),(0,L.jsx)(A.A,{ref:ce,className:"preview-mode__iframe",email:e,handlerSendPosition:be}),(0,L.jsx)("div",{className:"preview-mode__iframe-scroll-bottom",id:"iframe-scroll-bottom"})]}),(0,L.jsx)("div",{className:"preview-mode__content-col preview-mode__content-col_menu preview-mode__content-col_menu-right",ref:ue,children:(0,L.jsx)(M.A,{setSizes:xe,sizes:[T[1]],codeModeShow:Ne,codeModeIsVisible:le,email:e})})]})})]})}),(0,L.jsx)("div",{className:"preview-mode__footer"})]})};ee.defaultProps={viewMode:K,sendOptionsHandler:()=>{}};const te=ee},19817:(e,t,s)=>{s.d(t,{A:()=>h});var i=s(92810),r=s(71157),n=s(64617),a=s(94822),l=s(39990),o=s(32269),c=s(90070),d=s(47381),m=s(85163),u=s(70082);const p="emailmaker.ru",h=({children:e})=>{const t=(0,n.zy)(),s=(0,r.hN)(),h=(0,c.p6)(),[g,_]=(0,a.ok)(),[v,{isError:x,isSuccess:j,error:f,data:y}]=(0,l.i2)(),{isError:A,isUninitialized:b,isLoading:w,isSuccess:N,error:k,data:S,refetch:I}=(0,l.CR)("",{skip:m.EW.isPlugin||!h.get(m.A9.em_token)}),C=(0,i.useMemo)((()=>({email:g.get("email"),hash:g.get("hash"),event:"confirmation"===g.get("event")})),[g]);if((0,i.useEffect)((()=>{x?(0,o.p6)({error:f},s):j&&((0,d.d)({event:"email_confirmation",user_email:null===y||void 0===y?void 0:y.email}),(0,o.wB)(y.message,s),S&&I())}),[y,f,x,j,s,S,I]),(0,i.useEffect)((()=>{!(C.email&&C.hash&&C.event)||!1!==(null===S||void 0===S?void 0:S.email_confirmation)&&h.get(m.A9.em_token)||y||v({hash:C.hash,email:C.email,event:C.event}).catch((e=>{console.warn("e",e)})).finally((()=>_("")))}),[C,v,S,h,_,y]),(0,i.useEffect)((()=>{A&&k&&((0,o.p6)({error:k},s),(0,o.Id)(h))}),[S,A,k,s,h]),m.EW.isPlugin)return e;if(!m.EW.isPlugin&&!h.get(m.A9.em_token)&&!t.pathname.includes("auth"))return(0,u.jsx)(n.C5,{to:"/auth",state:{from:t}});if((b||w)&&!t.pathname.includes("auth"))return(0,u.jsx)(u.Fragment,{});if(A&&!t.pathname.includes("auth"))return(0,u.jsx)(n.C5,{to:"/auth",state:{from:t}});if(N){const{id:s,email:i,name:r,locale:a,carrotquest_hash:l,ducalis_hash:o,email_subscription_consent:c,last_used_project:d}=S;return h.set(m.A9.em_id,s,{domain:p}),h.set(m.A9.em_email,i,{domain:p}),h.set(m.A9.em_name,r,{domain:p}),h.set(m.A9.em_locale,a,{domain:p}),h.set(m.A9.em_carrotquest_hash,l,{domain:p}),h.set(m.A9.em_ducalis_hash,o,{domain:p}),h.set(m.A9.em_email_subscription_consent,c,{domain:p}),d&&"/"===t.pathname?(0,u.jsx)(n.C5,{to:`/projects/${d}/emails`,replace:!0}):e}return t.pathname.includes("auth")?e:void 0}},19263:(e,t,s)=>{s.d(t,{A:()=>S});var i=s(92810),r=s(41919),n=s(37005),a=s(66726),l=s(32085),o=s(32293),c=s(64617),d=s(94822),m=s(45934),u=s(23287),p=s(29067),h=s(30961),g=s(20757),_=s(32398),v=s(34524),x=s(7760),j=s(85163),f=s(22197),y=s(90070),A=s(32269),b=s(93563),w=s(64936),N=s(70082);const{Content:k}=r.A,S=()=>{var e,t,s;const{__:S}=(0,u.s9)(),I=(0,m.wA)(),C=(0,y.p6)(),T=C.get(j.A9.em_elements_view),{data:E}=(0,c.KC)(),[L]=(0,d.ok)(),z=(0,m.d4)(x.b9),D=(0,m.d4)(w.o8),M=L.get("folder"),O=+L.get("tag"),R=(0,A.HT)(E,j.YY),[B,F]=(0,i.useState)(M||(O?null:j.y2)),[P,H]=(0,i.useState)(O||null),[$,q]=(0,i.useState)(T||j.Y$),{data:W,refetch:V}=(0,b.Jz)({parent:null===(e=E.blockfolder)||void 0===e?void 0:e[0]},{skip:!(null!==(t=E.blockfolder)&&void 0!==t&&t[0])});(0,i.useEffect)((()=>{I((0,w.sB)(W||[]))}),[I,W]);const U=(e=!1,t=null)=>{H(t),F(e),I((0,x.om)({...z,tags:t?[t]:[],folderTag:e}))};(0,i.useEffect)((()=>{var e;O&&null!==R&&void 0!==R&&R.find((e=>e.id===O))&&(null===z||void 0===z||null===(e=z.tags)||void 0===e?void 0:e[0])!==P&&I((0,x.om)({...z,tags:[O],folderTag:B}))}),[R,O,P,I,z,B]);(0,f.A)(S("Blocks")+" "+E.title),(0,i.useEffect)((()=>{document.body.classList.remove("editor")}),[]);const X=(0,N.jsx)(h.A,{isBlocks:!0}),Y=(0,N.jsx)(N.Fragment,{children:(0,N.jsx)(n.A,{defaultValue:$,onChange:e=>{q(e),I((0,v.NK)(e)),C.set(j.A9.em_elements_view,e)},value:$,options:[{value:j.Y$,label:(0,N.jsx)(a.A,{title:S("Cards view"),placement:"top",children:(0,N.jsx)(l.A,{})})},{value:j.rl,label:(0,N.jsx)(a.A,{title:S("Table view"),placement:"top",children:(0,N.jsx)(o.A,{})})}]},"Switch radio")});return(0,N.jsxs)(r.A,{className:"project-blocks-page",children:[(0,N.jsx)(g.A,{leftBlock:X,rightBlock:Y}),(0,N.jsx)(k,{className:"project-blocks-page__container",children:(0,N.jsxs)("div",{className:"project-blocks-page__content container",children:[(0,N.jsx)("div",{className:"project-blocks-page__menu-wrapper",children:(0,N.jsx)(_.A,{currentFolderId:B,setCurrentFolderId:F,activeTagId:P,setActiveTagHandler:U,projectTags:R,folderTaxonomy:"blockfolder"})}),(0,N.jsx)(p.A,{projectId:E.id,projectEmailsCounter:+(null===E||void 0===E||null===(s=E.counters)||void 0===s?void 0:s.blocks_counter),emailsView:$,currentFolderId:B,foldersList:D,refetchProjectFolders:D.length?V:()=>{},projectTags:R,activeTagId:P,setActiveTagHandler:U})]})})]})}},6099:(e,t,s)=>{s.d(t,{A:()=>_});var i=s(92810),r=s(64617),n=s(45934),a=s(41919),l=s(25072),o=s(43005),c=s(23287),d=s(84568),m=s(36404),u=s(72981),p=s(32269),h=s(70082);const{Content:g}=a.A,_=()=>{var e;const{__:t}=(0,c.s9)(),{projectId:s}=(0,r.g)();let _=(0,r.Zp)(),v=(0,r.zy)();const x=(0,n.wA)(),j=(0,d.fo)(+s,{skip:!s}),{isLoading:f,isError:y,error:A,isSuccess:b,data:w}=j;return(0,i.useEffect)((()=>{b&&(null===w||void 0===w?void 0:w.id)!==s&&x((0,m.od)(w))}),[b,w,x,s]),(0,i.useEffect)((()=>{b&&s&&v.pathname.endsWith(s)&&_(`${v.pathname}/emails`)}),[b,v,_,s]),(0,h.jsxs)(h.Fragment,{children:[f&&(0,h.jsx)(u.A,{}),y&&A&&(0,h.jsx)(a.A,{className:"project-outlet",children:(0,h.jsx)(g,{className:"project-outlet__container container",children:(0,h.jsx)(l.Ay,{status:A.status,title:A.status,subTitle:null===(e=A.data)||void 0===e?void 0:e.message,extra:(0,h.jsx)(o.Ay,{type:"primary",onClick:()=>(0,p.XZ)(_,"/projects"),children:t("Back To Projects")})})})}),b&&(0,h.jsx)(r.sv,{context:{...j}})]})}},44338:(e,t,s)=>{s.d(t,{A:()=>W});var i=s(92810),r=s(41919),n=s(37005),a=s(66726),l=s(43005),o=s(71157),c=s(32085),d=s(32293),m=s(3625),u=s(52360),p=s(64617),h=s(94822),g=s(45934),_=s(23287),v=s(44335),x=s(98655),j=s(30961),f=s(28288),y=s(72981),A=s(32398),b=s(20757),w=s(47358),N=s(94925),k=s(86286),S=s(64936),I=s(65983),C=s(39990),T=s(46312),E=s(17581),L=s(63531),z=s(93563),D=s(85163),M=s(22197),O=s(14598),R=s(58689),B=s(47381),F=s(32269),P=s(90070),H=s(7205),$=s(70082);const{Content:q}=r.A,W=()=>{var e;const{__:t,_n:s}=(0,_.s9)(),W=(0,g.wA)(),V=(0,p.Zp)(),U=(0,P.p6)(),X=(0,o.hN)();let Y=(0,p.zy)();const Z=(0,g.d4)(I.CT),J=(0,g.d4)(k.C1),G=(0,g.d4)(w.cL),K=(0,g.d4)(S.o8),Q=(0,g.d4)(S.uM),[ee]=(0,C.on)(),[te]=(0,E.Kh)(),[se]=(0,L.dS)(),[ie]=(0,T.mI)(),[re]=(0,h.ok)(),{data:ne}=(0,p.KC)(),[ae,le]=(0,i.useState)(!1),oe=re.get("folder"),ce=(0,F.HT)(ne,D.zh),{data:de,refetch:me}=(0,z.Jz)({parent:ne.folder[0]},{skip:!ne.folder[0]}),[ue,pe]=(0,i.useState)(oe||(Q?null:D.y2));(0,i.useEffect)((()=>{W((0,S.sB)(de||[]))}),[W,de]);const[he,ge]=(0,i.useState)(U.get(D.A9.em_elements_view)||D.Y$);(0,M.A)(t("Emails")+" "+ne.title),(0,i.useEffect)((()=>{(null===J||void 0===J?void 0:J.last_used_project)!==ne.id&&W(C.Q2.endpoints.editMe.initiate({last_used_project:ne.id}))}),[W,ne.id,null===J||void 0===J?void 0:J.last_used_project]);const[_e,ve]=(0,i.useState)(null);const xe=async e=>{if(1===e.length){const t=e[0];try{le(!0);const e=await(0,O.q2)(t,(async(e,t)=>{let s;if("string"===typeof e)try{var i;e=(0,H.A)(e),s=null===(i=await ie({url:e}))||void 0===i?void 0:i.data}catch(l){return e}else s=e;if(s){if(t.split(".").length<2){const e=v.extension(s.type);e&&(t=`${t}.${e}`)}const e=new File([s],t.toLowerCase()),i=await se({user_id:J.id,folder:ne.id,file:e});var r,n,a;if(!i.error)if(400!==(null===(r=i.data.data)||void 0===r?void 0:r.status))return null===(n=i.data)||void 0===n||null===(a=n[0])||void 0===a?void 0:a.file_url}return"string"===typeof e?e:""})),[s]=(0,R.Ay)(t.name),i=(0,F.ez)(e)||s||"";return te({title:i,project:ne.id,subject:i,description:"",html:e,parent_email:D.iU,folder:oe!==D.y2?[+oe]:[]}).then((e=>{e&&(e.error?X.error({message:(0,$.jsx)("div",{dangerouslySetInnerHTML:{__html:e.error.data.code}}),description:(0,$.jsx)("div",{dangerouslySetInnerHTML:{__html:e.error.data.message}}),placement:"bottomRight"}):(de&&me(),V(`/projects/${ne.id}/emails/${e.data.id}`),(0,B.d)({event:"upload_file",action:"import_email"})))})).finally((()=>le(!1)))}catch(i){le(!1);const e=i instanceof Error?i.message:i;X.error({message:(0,$.jsx)("div",{dangerouslySetInnerHTML:{__html:e}}),placement:"bottomRight"})}}else{const r=[];le(!0);for(let s=0;s<e.length;s++){let n=e[s];const a=await(0,O.q2)(n,(async(e,t)=>{let s;if("string"===typeof e)try{var r;e=(0,H.A)(e),s=null===(r=await ie({url:e}))||void 0===r?void 0:r.data}catch(i){return e}else s=e;if(t.split(".").length<2){const e=v.extension(s.type);e&&(t=`${t}.${e}`)}const n=new File([s],t.toLowerCase()),a=await se({user_id:J.id,folder:ne.id,file:n});var l,o,c;if(!a.error&&400!==(null===(l=a.data.data)||void 0===l?void 0:l.status))return null===(o=a.data)||void 0===o||null===(c=o[0])||void 0===c?void 0:c.file_url;return"string"===typeof e?e:""})),[l]=(0,R.Ay)(n.name),o=(0,F.ez)(a)||l||"",c=te({title:o,project:ne.id,subject:o,description:"",html:a,parent_email:D.iU,folder:oe!==D.y2?[+oe]:[]}).then((e=>{if(e)return e.error?(X.error({message:(0,$.jsx)("div",{dangerouslySetInnerHTML:{__html:e.error.data.code}}),description:(0,$.jsx)("div",{dangerouslySetInnerHTML:{__html:e.error.data.message}}),placement:"bottomRight"}),null):(X.success({message:t("The email \u201c")+e.data.title+t("\u201d was successfully imported."),placement:"bottomRight"}),e.data)})).catch((e=>{const t=e instanceof Error?e.message:e;return X.error({message:(0,$.jsx)("div",{dangerouslySetInnerHTML:{__html:t}}),placement:"bottomRight"}),null}));r.push(c)}let n=await Promise.all(r);le(!1),n=n.filter((e=>!!e)),n.length&&X.success({message:n.length+s(" email was"," emails were",n.length)+t(" successfully imported."),placement:"bottomRight"}),_e&&_e.refetch()}},[je,fe]=(0,i.useState)(!1);(0,i.useEffect)((()=>{!je&&J.counters.emails_counter<3&&(ee(),fe(!0))}),[ee,J.counters.emails_counter,je]),(0,i.useEffect)((()=>{document.body.classList.remove("editor"),U.remove(D.A9.em_folder)}),[W,U]);const ye=(e=!1,t=null)=>{W((0,S.Cj)(t)),pe(e),W((0,I.om)({...Z,tags:t?[t]:[],folderTag:e}))},Ae=(0,$.jsx)(j.A,{isBlocks:!1}),be=(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(n.A,{defaultValue:he,onChange:e=>{U.set(D.A9.em_elements_view,e),ge(e),W((0,N.NK)(e))},value:he,options:[{value:D.Y$,label:(0,$.jsx)(a.A,{title:t("Cards view"),placement:"top",children:(0,$.jsx)(c.A,{})})},{value:D.rl,label:(0,$.jsx)(a.A,{title:t("Table view"),placement:"top",children:(0,$.jsx)(d.A,{})})}]},"Switch radio"),(0,$.jsx)(a.A,{title:t("Available formats: HTML, EML, ZIP"),placement:"top",children:(0,$.jsx)(l.Ay,{className:"em-analytics__project-page__import",type:"default",icon:(0,$.jsx)(m.A,{}),onClick:()=>{(0,B.d)({event:"click",action:"import_email"}),(0,O.QM)("application/zip, message/rfc822, text/html",xe)},children:t("Import email")},"Import email from file")},"Import email from file tooltip"),(0,$.jsx)(l.Ay,{className:"em-analytics__email-create",type:"primary",icon:(0,$.jsx)(u.A,{}),onClick:()=>{W((0,I.om)({tags:[]})),U.set(D.A9.em_folder,"deleted"===oe?D.y2:oe),(0,F.XZ)(V,`${Y.pathname}/create/`),(0,B.d)({event:"click",action:"create_new_email",description:"Go to the email template selection"})},children:t("Create a new email")},"Create new email")]});return(0,$.jsxs)(r.A,{className:"project-page",children:[(0,$.jsx)(b.A,{leftBlock:Ae,rightBlock:be}),(0,$.jsx)(q,{className:"project-page__container",children:(0,$.jsxs)("div",{className:"project-page__content container",children:[(0,$.jsx)("div",{className:"project-page__menu-wrapper",children:(0,$.jsx)(A.A,{currentFolderId:ue,setCurrentFolderId:pe,activeTagId:Q,setActiveTagHandler:ye,projectTags:ce,folderTaxonomy:"folder"})}),(0,$.jsx)(x.A,{projectId:ne.id,projectEmailsCounter:+(null===ne||void 0===ne||null===(e=ne.counters)||void 0===e?void 0:e.emails_counter),emailsView:he,currentFolderId:ue,foldersList:K,refetchProjectFolders:K.length?me:()=>{},projectTags:ce,activeTagId:Q,setActiveTagHandler:ye,registerFunction:ve})]})}),ae&&(0,$.jsx)(y.A,{wrap:!0,style:{position:"fixed",width:"100%",height:"100%",top:0,left:0}}),(0,$.jsx)(f.A,{isModalVisible:G===D.lx.ADD_NEW_EMAIL_MODAL})]})}},24420:(e,t,s)=>{s.d(t,{A:()=>O});var i=s(92810),r=s(41919),n=s(43005),a=s(45934),l=s(23287),o=s(68919),c=s(33206),d=s(4800),m=s(49246),u=s(29234),p=s(21349),h=s(71157),g=s(9452),_=s(22339),v=s(8375),x=s(45130),j=s(8114),f=s(74267),y=s(64617),A=s(94822),b=s(35285),w=s(84568),N=s(64936),k=s(32269),S=s(85163),I=s(70082);const C=(e,t)=>`${e.pathname.replace(/\/+$/,"")}/${t.id}/emails?page=1`,T=(e,t)=>`${e.pathname.replace(/\/+$/,"")}/${t.id}/members`,E=()=>{const{__:e,_x:t}=(0,l.s9)();let s=(0,a.d4)(N.vW),r=(0,y.zy)(),n=(0,a.wA)(),o=(0,a.d4)(N.cL);const{modal:E}=c.A.useApp(),L=(0,h.hN)(),{confirm:z}=E,D=(0,a.Pj)(),M=s=>{z({maskClosable:!0,centered:!0,title:t("Are you sure to delete \u201c","project")+s.title+e("\u201d project?"),icon:(0,I.jsx)(g.A,{}),okText:e("Yes"),cancelText:e("No"),onOk:()=>(t=>D.dispatch(w.Nq.endpoints.deleteProject.initiate(t.id)).then((t=>{t.error?(0,k.p6)(t,L):t.data&&(0,k.wB)(e("The project \u201c")+t.data.title+e("\u201d was successfully removed."),L)})))(s)})},[O,R]=(0,i.useState)({page:1}),{isLoading:B,isSuccess:F,isError:P,isFetching:H,data:$=[]}=(0,w.su)(O),[q,W]=(0,i.useState)(null),V=[{width:"35%",title:e("Project"),dataIndex:"title",render:(e,t,s)=>(0,I.jsx)(A.N_,{to:C(r,t),children:e})},{width:"16%",title:e("Owner"),dataIndex:["members","owner","nickname"],render:(e,t,s)=>e||t.members.owner.user_email},{width:"12%",title:t("Created","block"),dataIndex:"date",render:(t,s,i)=>(0,k.Yq)((0,f.A)(t),e),sorter:!0,sortOrder:(0,k.Np)(O.order)},{width:"10%",title:e("Emails"),dataIndex:"emails",sorter:!0,render:(e,t,s)=>null!==e&&void 0!==e&&e.length?null===e||void 0===e?void 0:e.length:"\u2013"},{width:"10%",title:e("Blocks"),dataIndex:"blocks",render:(e,t,s)=>null!==e&&void 0!==e&&e.length?null===e||void 0===e?void 0:e.length:"\u2013"},{width:"3%",title:"",dataIndex:"",key:"x",onCell:()=>({style:{padding:0}}),render:(t,s)=>{let i=[];return i.push({label:(0,I.jsx)(A.N_,{to:C(r,s),children:e("Open")}),key:"Enter",icon:(0,I.jsx)(_.A,{style:{fontSize:"16px"}}),className:"em-analytics__open"},{label:e("Settings"),key:"Edit",icon:(0,I.jsx)(v.A,{style:{fontSize:"16px"}}),className:"em-analytics__edit",onClick:()=>(W(s),void n((0,N.qf)(S.lx.EDIT_PROJECT_MODAL)))},{label:(0,I.jsx)(A.N_,{to:T(r,s),children:e("Members")}),key:"Members",icon:(0,I.jsx)(x.A,{style:{fontSize:"16px"}}),className:"em-analytics__members"},{label:e("Remove"),key:"Remove",icon:(0,I.jsx)(g.A,{style:{fontSize:"16px"}}),className:"em-analytics__remove",style:{color:"#ff4d4f"},onClick:()=>M(s)}),(0,I.jsx)(d.A,{arrow:"true",placement:"bottom",menu:{items:i},trigger:["hover"],children:(0,I.jsx)("span",{className:"projects-table__actions",children:(0,I.jsx)(j.A,{})})})}}];return(0,I.jsxs)("div",{className:"container",children:[B&&(0,I.jsx)(m.A,{active:!0}),P&&(0,I.jsx)(u.A,{message:e("Error"),description:e("Error when receiving data. Try again (reload page) or contact support."),type:"error",showIcon:!0}),F&&0===$.length&&(0,I.jsx)(u.A,{message:e("You don't have any projects yet."),description:e("Click the Add a new project button to add your first project."),type:"info",showIcon:!0}),F&&$.length>0&&(0,I.jsx)(p.A,{rowKey:e=>e.id,dataSource:$,bordered:!0,columns:V,loading:H,onChange:(e,t,{order:s,field:i},{action:r})=>{"sort"===r&&R(s?{page:1,order:(0,k.gq)(s),orderby:i}:{page:1})},showSizeChanger:!1,pagination:{showSizeChanger:!1,hideOnSinglePage:!0,position:["bottomCenter"],current:O.page,total:s,onChange:(e,t)=>{R({page:e})}},className:"projects-table"}),(0,I.jsx)(b.A,{isModalVisible:o===S.lx.EDIT_PROJECT_MODAL,selectedProject:q})]})};var L=s(20757),z=s(47381),D=s(22197);const{Content:M}=r.A,O=()=>{const{__:e}=(0,l.s9)(),t=(0,a.d4)(N.cL),s=(0,a.wA)();(0,D.A)(e("Projects")),(0,i.useEffect)((()=>{document.body.classList.remove("editor")}),[]);const c=(0,I.jsx)("div",{className:"ant-page-header-heading-title",children:e("Projects")}),d=(0,I.jsx)(n.Ay,{className:"em-analytics__add-project",type:"primary",onClick:()=>{(0,z.d)({event:"open_modal",action:"create_new_project"}),s((0,N.qf)(S.lx.ADD_NEW_PROJECT_MODAL))},children:e("Add a new project")},"Add a new project");return(0,I.jsxs)(r.A,{className:"projects-page",children:[(0,I.jsx)(L.A,{leftBlock:c,rightBlock:d}),(0,I.jsxs)(M,{className:"projects-page__container",children:[(0,I.jsx)(E,{}),(0,I.jsx)(o.A,{isModalVisible:t===S.lx.ADD_NEW_PROJECT_MODAL})]})]})}},36852:(e,t,s)=>{s.d(t,{A:()=>N});var i=s(92810),r=s(59297),n=s(76662),a=s(12280),l=s(55039),o=s(43005),c=s(71157),d=s(9588),m=s(82013),u=s(48236),p=s(64617),h=s(94822),g=s(38883),_=s.n(g),v=s(23287),x=s(65119),j=s(85163),f=s(47381),y=s(70082);const{Title:A,Text:b}=n.A,w=({className:e})=>{const{__:t}=(0,v.s9)();let s=(0,p.Zp)();const r=(0,c.hN)(),[n,g]=(0,i.useState)(!1),w={name:"email",rules:[{required:!0,message:t("Please type your email address."),type:"email"}],placeholder:t("email"),prefix:(0,y.jsx)(d.A,{style:{color:j.VG}})},N={name:"password",rules:[{required:!0,message:t("Please type your password.")},()=>({validator:(e,s)=>s.length>=8&&/[0-9]/.test(s)&&/[a-z]/.test(s)&&/[A-Z]/.test(s)&&/\W+|_/g.test(s)?Promise.resolve():Promise.reject(new Error(t("The password is too simple.")))})],placeholder:t("password"),prefix:(0,y.jsx)(m.A,{style:{color:j.VG}})},k={name:"code",rules:[{required:!0,message:t("Please type your password confirmation code.")}],placeholder:t("confirmation code"),prefix:(0,y.jsx)(u.A,{style:{color:j.VG}})},[S,I]=(0,x.Lv)(),[C,T]=(0,x.kg)(),[E,L]=(0,i.useState)("");(0,i.useEffect)((()=>{I.isError&&r.error({message:(0,y.jsx)("div",{dangerouslySetInnerHTML:{__html:I.error.data.code}}),description:(0,y.jsx)("div",{dangerouslySetInnerHTML:{__html:I.error.data.message}}),placement:"bottomRight"})}),[I,r]),(0,i.useEffect)((()=>{T.isError&&r.error({message:(0,y.jsx)("div",{dangerouslySetInnerHTML:{__html:T.error.data.code}}),description:(0,y.jsx)("div",{dangerouslySetInnerHTML:{__html:T.error.data.message}}),placement:"bottomRight"}),T.isSuccess&&(r.success({message:t("Your password successfully reset."),description:t("Try sign in with your new password."),placement:"bottomRight"}),s("/auth",{replace:!0}))}),[T,s,t,r]);return(0,y.jsxs)("div",{className:_()("recover-password-form",{[e]:e}),children:[!I.isSuccess&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("div",{className:"recover-password-form__heading",children:[(0,y.jsx)(A,{level:2,style:{fontWeight:500,fontSize:24},children:t("Forgot the password?")}),(0,y.jsx)(b,{className:"recover-password-form__sub-title",children:t("Enter your email address and we will send you password reset instructions.")})]}),(0,y.jsxs)(a.A,{name:"recover_password_form",initialValues:{remember:!0},onFinish:e=>{L(e.email),(0,f.d)({event:"submit_form",action:"password_recovery",label:e.email}),S({email:e.email})},onFinishFailed:()=>{},autoComplete:"off",children:[(0,y.jsx)(a.A.Item,{name:w.name,rules:w.rules,children:(0,y.jsx)(l.A,{size:"large",disabled:I.isLoading,placeholder:w.name,prefix:w.prefix})}),(0,y.jsx)(a.A.Item,{children:(0,y.jsx)(o.Ay,{size:"large",loading:I.isLoading,block:!0,type:"primary",htmlType:"submit",className:"em-analytics__password-reset",children:t("Send")})}),(0,y.jsx)(a.A.Item,{children:(0,y.jsx)(h.N_,{to:"/auth",children:t("Back to Log In")})})]})]}),I.isSuccess&&!T.isSuccess&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("div",{className:"recover-password-form__heading",children:[(0,y.jsx)(A,{level:2,style:{fontWeight:500,fontSize:24},children:t("Set new password")}),(0,y.jsx)(b,{className:"recover-password-form__sub-title",children:t("Enter the confirmation code from the email and set a new password.")})]}),(0,y.jsxs)(a.A,{name:"set_new_password_form",initialValues:{remember:!0},onFinish:e=>{C({email:E,password:e.password,code:e.code})},onFinishFailed:()=>{},autoComplete:"off",children:[(0,y.jsx)(a.A.Item,{name:N.name,rules:N.rules,extra:t("At least 8 characters, including a combination of uppercase and lowercase letters, numbers, and special characters."),children:(0,y.jsx)(l.A.Password,{readOnly:!n,onFocus:()=>g(!0),size:"large",type:"password",disabled:T.isLoading,placeholder:t("new password"),prefix:N.prefix})}),(0,y.jsx)(a.A.Item,{name:k.name,rules:k.rules,children:(0,y.jsx)(l.A,{size:"large",disabled:T.isLoading,placeholder:k.placeholder,prefix:k.prefix})}),(0,y.jsx)(a.A.Item,{children:(0,y.jsx)(o.Ay,{size:"large",loading:T.isLoading,block:!0,type:"primary",htmlType:"submit",children:t("Recover password")})}),(0,y.jsx)(a.A.Item,{children:(0,y.jsx)(h.N_,{to:"/auth",children:t("Back to Log In")})})]})]})]})},N=()=>(0,y.jsx)(r.A,{className:"recover-password-page",children:(0,y.jsx)(w,{className:"recover-password-page__form"})})},70431:(e,t,s)=>{s.d(t,{A:()=>g});var i=s(92810),r=s(12280),n=s(14852),a=s(43005),l=s(55039),o=s(71157),c=s(45934),d=s(23287),m=s(93563),u=s(64936),p=s(85163),h=s(70082);const g=({folder:e,refetch:t})=>{const{__:s,_x:g}=(0,d.s9)(),_=(0,c.wA)(),[v]=r.A.useForm(),x=(0,i.useRef)(null),j=(0,c.d4)(u.cL)===p.lx.EDIT_FOLDER_NAME_MODAL,f=(0,o.hN)(),{folderId:y=null,folderName:A=""}=e,b=()=>_((0,u.Oo)()),[w,N]=(0,m.$s)();(0,i.useEffect)((()=>{j&&v.setFieldsValue({name:A})}),[j,A,v]);const k=()=>{v.validateFields().then((({name:e})=>{w({id:y,data:{name:e}}).then((({data:e,error:i})=>{i?(f.error({message:(0,h.jsx)("div",{dangerouslySetInnerHTML:{__html:i.data.code}}),description:(0,h.jsx)("div",{dangerouslySetInnerHTML:{__html:i.data.message}}),placement:"bottomRight"}),v.setFieldValue("name",A)):(t().then((({data:e})=>{if(e){var t,s,i;const r=null===(t=e[0])||void 0===t||null===(s=t.children)||void 0===s||null===(i=s.find((e=>e.id===y)))||void 0===i?void 0:i.name;v.setFieldValue("name",r)}})),b(),f.success({message:s("The folder \u201c")+A+g("\u201d was successfully changed to \u201c","folder")+e.name+s("\u201d."),placement:"bottomRight"}))}))}))};return(0,h.jsx)(n.A,{title:s("Change folder name"),open:j,onOk:k,onCancel:b,className:"new-folder-name-modal",centered:!0,footer:[(0,h.jsx)(a.Ay,{type:"primary",size:"large",loading:N.isLoading,onClick:k,children:s("Change name")},"submit")],children:(0,h.jsx)(r.A,{form:v,layout:"vertical",name:"rename_folder_form",onFinish:k,initialValues:{remember:!1,name:A},autoComplete:"off",style:{paddingTop:10},children:(0,h.jsx)(r.A.Item,{name:"name",rules:[{required:!0,message:s("Please enter the folder name")}],children:(0,h.jsx)(l.A,{disabled:N.isLoading,size:"large",placeholder:s("Enter the folder name"),ref:x,style:{marginBottom:5}})})})})}},33284:(e,t,s)=>{s.d(t,{A:()=>p});var i=s(92810),r=s(43005),n=s(45934),a=s(33206),l=s(56920),o=s(86286),c=s(62303),d=s(32269),m=s(23287),u=s(70082);const p=()=>{const{__:e}=(0,m.s9)(),{notification:t}=a.A.useApp(),s=(0,n.d4)(o.C1),[p]=(0,l.C)(),[h,g]=(0,i.useState)(!1);(0,i.useEffect)((()=>{s.hasOwnProperty("email_confirmation")&&g(s.email_confirmation)}),[s,h]);return null!==s&&void 0!==s&&s.email_confirmation||null===s||void 0===s||!s.privacy_policy_agreement?null:(0,u.jsx)("div",{className:"main__ribbon",children:(0,u.jsxs)("span",{children:[(0,u.jsx)(c.A,{icon:"EmailConfirmation",style:{fontSize:20,position:"relative",top:2}})," ",e("Confirmation email was sent to"),"\xa0",(0,u.jsx)("em",{children:s.email}),".\xa0",e("Didn't receive an email?"),"\xa0",(0,u.jsxs)(r.Ay,{type:"primary",size:"small",style:{fontSize:16,lineHeight:1},onClick:()=>{p({userId:s.id,email:s.email}).then((({data:i,error:r})=>{i?(0,d.wB)(e("Confirmation email has been sent to {confirmedEmail}.").replace("{confirmedEmail}",s.email),t):r&&(0,d.p6)(r,t)}))},children:[e("Resend")," ",(0,u.jsx)(c.A,{icon:"SendOutlined",style:{verticalAlign:"middle"}})]})]})})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[78],{7760:(e,a,l)=>{l.d(a,{A9:()=>p,Ay:()=>B,DL:()=>g,Dz:()=>c,Fv:()=>v,JV:()=>k,Up:()=>y,b9:()=>T,eX:()=>m,gm:()=>M,iy:()=>f,nJ:()=>E,om:()=>b,qX:()=>S,rc:()=>u,vs:()=>r});var t=l(90536),o=l(31770),i=l(55701);const d=(0,o.ur)({invalidateBlockId:null,isCodeMode:!1,codeModeDirection:"right",editorThemeColor:"light",isSettingsDisabled:!1,settings:{width:""},elementSettings:{},searchFilters:{},block:{id:void 0,isNew:!1,subject:"",description:"",html:"",project:void 0,project_title:"",project_author:void 0,tags:[],type:"Other",title:null,isAmp:!1},monacoDidMount:!1}),n="blockSlice",s=(0,t.createSlice)({name:n,initialState:d,reducers:{switchCodeMode:e=>{e.isCodeMode=!e.isCodeMode},setEditorThemeColor:(e,a)=>{e.editorThemeColor=a.payload},setBlockSettings:(e,a)=>{Object.assign(e,{...e,settings:a.payload,isSettingsDisabled:!1})},setBlockSettingsDisable:(e,a)=>{e.isSettingsDisabled=a.payload},setElementSettings:(e,a)=>{e.elementSettings=a.payload},setSearchFilters:(e,a)=>{e.searchFilters=a.payload},setBlockHtml:(e,a)=>{e.block.html=a.payload},resetBlockSlice:()=>d,setBlockIsAmp:(e,a)=>{e.block.isAmp=a.payload}},extraReducers:e=>{e.addMatcher((e=>"blocksApi/queries/queryResultPatched"===e.type),((e,a)=>{var l,t;const o=a.payload.queryCacheKey.match(/\(([0-9]+)\)/),i=null===(l=a.payload)||void 0===l?void 0:l.patches[0];if(null!==i&&void 0!==i&&null!==(t=i.path)&&void 0!==t&&t[0]&&(e.block[null===i||void 0===i?void 0:i.path[0]]=i.value),null!==o&&void 0!==o&&o[1]&&(e.invalidateBlockId=o[1]),a.payload.queryCacheKey.startsWith("getBlock")){var d,n;const l=null===(d=a.payload)||void 0===d?void 0:d.patches[0];null!==l&&void 0!==l&&null!==(n=l.path)&&void 0!==n&&n[0]&&(e.block[null===l||void 0===l?void 0:l.path[0]]=l.value)}})),e.addMatcher((e=>"blocksApi/invalidateTags"===e.type),((e,a)=>{if(a.payload[0].id===+e.invalidateBlockId)return{...d,isCodeMode:null===e||void 0===e?void 0:e.isCodeMode,codeModeDirection:e.codeModeDirection}})),e.addMatcher(i.VM.endpoints.editBlock.matchFulfilled,((e,{payload:a})=>{e.invalidateBlockId=null,e.block={...e.block,...a,renderGuid:e.block.renderGuid}})),e.addMatcher(i.VM.endpoints.autoSaveBlock.matchFulfilled,((e,a)=>{var l,t;(null===e||void 0===e||null===(l=e.block.id)||void 0===l?void 0:l.toString())===(null===(t=a.payload.id)||void 0===t?void 0:t.toString())&&(e.block.html=a.payload.html)})),e.addMatcher(i.VM.endpoints.getBlock.matchFulfilled,((e,{payload:a})=>{e.block={...d.block,...a}}))}}),{switchCodeMode:r,setEditorThemeColor:m,setBlockSettings:c,setElementSettings:p,setBlockSettingsDisable:u,setSearchFilters:b,setBlockHtml:g,resetBlockSlice:E,setBlockIsAmp:h}=s.actions,v=e=>e[n].isCodeMode,y=e=>e[n].editorThemeColor,k=e=>e[n].settings,S=e=>e[n].elementSettings,f=e=>e[n].isSettingsDisabled,T=e=>e[n].searchFilters,M=e=>e[n].block,B=s},34524:(e,a,l)=>{l.d(a,{Ay:()=>k,D2:()=>b,FC:()=>c,LZ:()=>g,NK:()=>p,NP:()=>E,dV:()=>y,qM:()=>h,ux:()=>v,wK:()=>u});var t=l(90536),o=l(55701),i=l(49211),d=l(85163);const n=(0,l(31770).ur)({blocksTotal:null,blocksTotalPages:null,parentEmailBlocksTotal:null,parentEmailBlocksTotalPages:null,templateBlocks:[],templateBlocksTotal:null,templateBlocksTotalPages:null,elementsView:!d.EW.isPlugin&&i.A.get(d.A9.em_elements_view)||d.Y$,elementsList:[],customFolders:{},blocksTrashTotal:0,elementsTrashList:[]}),s="blocksPageSlice",r=(0,t.createSlice)({name:s,initialState:n,reducers:{resetPagesAndTotal:()=>n,resetElementsList:e=>{e.elementsList=[]},toggleElementsView:(e,a)=>{e.elementsView=a.payload},removeBlockFromList:(e,{payload:a})=>{var l;let t=e.customFolders;a.folder!==d.y2&&null!==(l=t[a.folder])&&void 0!==l&&l.list&&(t[a.folder]={...t[a.folder],list:t[a.folder].list.filter((e=>e.id!==a.emailId)),total:t[a.folder].total-1},e.customFolders=t)}},extraReducers:e=>{e.addMatcher(o.VM.endpoints.getBlocks.matchFulfilled,((e,{meta:a,payload:l})=>{var t,o,i,d,n,s,r,m;const c=null===(t=a.baseQueryMeta)||void 0===t?void 0:t.response.headers.get("X-WP-Total"),p="trash"===(null===(o=a.arg.originalArgs)||void 0===o?void 0:o.status),u=!(null===(i=a.arg.originalArgs)||void 0===i||null===(d=i.name)||void 0===d||!d.length),b=null===(n=a.arg.originalArgs)||void 0===n?void 0:n.page,g=(null===(s=a.arg.originalArgs)||void 0===s?void 0:s.folderTag)||(null===(r=a.arg.originalArgs)||void 0===r||null===(m=r.tags)||void 0===m?void 0:m[0]);p?(u||(e.blocksTrashTotal=c),e.elementsTrashList=l):g?e.customFolders={...e.customFolders,[g]:{list:l,page:b,total:c}}:(a.arg.originalArgs.tags||u||(e.blocksTotal=c),e.elementsList=l)})),e.addMatcher(o.VM.endpoints.getParentEmailBlocks.matchFulfilled,((e,{meta:a})=>{var l,t;const o=null===(l=a.baseQueryMeta)||void 0===l?void 0:l.response.headers.get("X-WP-Total"),i=null===(t=a.baseQueryMeta)||void 0===t?void 0:t.response.headers.get("X-WP-TotalPages");e.parentEmailBlocksTotal=o,e.parentEmailBlocksTotalPages=i})),e.addMatcher(o.VM.endpoints.getTemplateBlocks.matchFulfilled,((e,{meta:a,payload:l})=>{var t,o;const i=null===(t=a.baseQueryMeta)||void 0===t?void 0:t.response.headers.get("X-WP-Total"),d=null===(o=a.baseQueryMeta)||void 0===o?void 0:o.response.headers.get("X-WP-TotalPages");e.templateBlocks=l,e.templateBlocksTotal=i,e.templateBlocksTotalPages=d})),e.addMatcher(o.VM.endpoints.editBlock.matchFulfilled,((e,{payload:a})=>{e.elementsList.map((e=>{var l,t;return(null===(l=e.id)||void 0===l?void 0:l.toString())===(null===(t=a.id)||void 0===t?void 0:t.toString())?Object.assign(e,{lock:a.lock,title:a.title,blocktags:a.blocktags}):e}))}))}}),{resetPagesAndTotal:m,resetElementsList:c,toggleElementsView:p,removeBlockFromList:u}=r.actions,b=e=>e[s].blocksTotal,g=e=>e[s].templateBlocks,E=e=>e[s].customFolders,h=e=>e[s].elementsList,v=e=>e[s].elementsTrashList,y=e=>e[s].blocksTrashTotal,k=r},99751:(e,a,l)=>{l.d(a,{i:()=>i,$:()=>o});const t={pro:{config:{mode:"pro",autosaveTimeout:1e4,theme:"",themes:{},mergeTags:void 0,styles:"",revisionService:!1,headerShow:!0,headerTitleVisible:!0,headerPreheaderVisible:!0,headerArrowBackVisible:!0,historyEnabled:!0,codeEnabled:!0,codeSideEnabled:!0,previewIconEnabled:!0,previewModeEnabled:!0,livePreviewEnabled:!0,sendTestEnabled:!0,sharePreviewEnabled:!0,webversionEnabled:!0,emailDropdownMenuEnabled:!0,emailDropdownMenuClone:!0,emailDropdownMenuImport:!0,emailDropdownMenuLock:!0,emailDropdownMenuRemove:!0,emailExportEnabled:!0,exportHtmlEnabled:!0,exportZipEnabled:!0,exportClipboardEnabled:!0,exportWebHookEnabled:!0,exportOutlookEnabled:!0,exportPdfEnabled:!0,exportPngEnabled:!0,nextButtonEnabled:!1,nextButtonText:"",saveButtonEnabled:!0,saveButtonText:"",commandButtonsEnabled:!0,emailIdShow:!1,sidePanelFloating:!0,desktopMobileSwitchRule:!0,desktopMobileSwitchPanel:!1,onlyCodeModeInMobile:!1,pathEnabled:!0,copyPasteEnabled:!0,saveBlockEnabled:!0,editImageControlEnabled:!0,menuDirection:"right",defaultBuildPanel:"",commentsEnabled:!0,aiAssistentEnabled:!0,optimizeEnabled:!0,settingsEnabled:!0,UTMEnabled:!0,subjectEnabled:!0,preheaderEnabled:!0,descriptionEnabled:!0,tagsEnabled:!0,switchDesktopMobilePropsEnabled:!0,stepToOtherElementEnabled:!0,deleteButtonEnabled:!0,toggleSidePanel:!0,blocksSectionsShow:!0,blocksEmptyEnabled:!0,blocksSavedEnabled:!0,blocksCommonEnabled:!0,blocksTemplateEnabled:!0,blocksSearchEnabled:!0,formFieldImageTitleEnabled:!0,formFieldBorderEnabled:!0,formFieldBorderRadiusEnabled:!0,formFieldBoxShadowEnabled:!0,formFieldVisibilityEnabled:!0,formFieldExportAsPictureEnabled:!0,emailPaneDesktopSize:0,formButtonFieldInsertImageEnabled:!0,formButtonFieldVerticalAlignEnabled:!0,formButtonFieldTextAlignEnabled:!0,formButtonFieldBackgroundImageEnabled:!0,formButtonFieldPaddingsEnabled:!0,formCellFieldVerticalAlignEnabled:!0,formCellFieldBackgroundImageEnabled:!0,formCellFieldPaddingsEnabled:!0,formLinkFieldInsertImageEnabled:!0,formTableFieldBackgroundImageEnabled:!0,formDivFieldBackgroundImageEnabled:!0,formEmailFieldBackgroundImageEnabled:!0,elementImageEnabled:!0,elementTextEnabled:!0,elementHeaderEnabled:!0,elementButtonEnabled:!0,elementListULEnabled:!0,elementListOLEnabled:!0,elementDividerEnabled:!0,elementSpacerEnabled:!0,elementSocialEnabled:!0,elementTableEnabled:!0,elementCountdownEnabled:!0,elementVideoEnabled:!0,elementAIimageEnabled:!0,elementAItextEnabled:!0,elementCarouselEnabled:!0,elementAccordionEnabled:!0,elementFormEnabled:!0,preventSendDataToEM:!1,imageInfoToolUrl:"",imageCenterStockEnabled:!0,imageCenterGifEnabled:!0,imageCenterEditorEnabled:!0,compressMaxSize:.7,compressMaxWidthOrHeight:2e3,ampExportEnabled:!0,formFieldAmpVisibilityEnabled:!0,testEmails:[]},project:void 0,page:{isNew:!0,type:"email",project:0,id:""}},editor:{config:{mode:"editor",autosaveTimeout:1e4,theme:"",themes:{},mergeTags:void 0,styles:"",headerShow:!0,headerTitleVisible:!0,headerPreheaderVisible:!0,headerArrowBackVisible:!0,historyEnabled:!0,codeEnabled:!0,codeSideEnabled:!0,previewIconEnabled:!0,previewModeEnabled:!0,livePreviewEnabled:!0,sendTestEnabled:!0,sharePreviewEnabled:!0,webversionEnabled:!0,emailDropdownMenuEnabled:!0,emailDropdownMenuClone:!0,emailDropdownMenuImport:!0,emailDropdownMenuLock:!0,emailDropdownMenuRemove:!0,emailExportEnabled:!0,exportHtmlEnabled:!0,exportZipEnabled:!0,exportClipboardEnabled:!0,exportWebHookEnabled:!0,exportOutlookEnabled:!0,exportPdfEnabled:!0,exportPngEnabled:!0,nextButtonEnabled:!1,nextButtonText:"",saveButtonEnabled:!0,saveButtonText:"",commandButtonsEnabled:!0,emailIdShow:!1,sidePanelFloating:!0,desktopMobileSwitchRule:!0,desktopMobileSwitchPanel:!1,onlyCodeModeInMobile:!1,pathEnabled:!0,copyPasteEnabled:!0,saveBlockEnabled:!1,editImageControlEnabled:!0,menuDirection:"right",defaultBuildPanel:"",commentsEnabled:!0,aiAssistentEnabled:!0,optimizeEnabled:!0,settingsEnabled:!0,UTMEnabled:!0,subjectEnabled:!0,preheaderEnabled:!0,descriptionEnabled:!0,tagsEnabled:!0,switchDesktopMobilePropsEnabled:!0,stepToOtherElementEnabled:!0,deleteButtonEnabled:!0,toggleSidePanel:!0,blocksSectionsShow:!0,blocksEmptyEnabled:!0,blocksSavedEnabled:!0,blocksCommonEnabled:!0,blocksTemplateEnabled:!0,blocksSearchEnabled:!0,formFieldImageTitleEnabled:!0,formFieldBorderEnabled:!1,formFieldBorderRadiusEnabled:!1,formFieldBoxShadowEnabled:!1,formFieldVisibilityEnabled:!1,formFieldExportAsPictureEnabled:!1,emailPaneDesktopSize:0,formButtonFieldInsertImageEnabled:!0,formButtonFieldVerticalAlignEnabled:!0,formButtonFieldTextAlignEnabled:!0,formButtonFieldBackgroundImageEnabled:!0,formButtonFieldPaddingsEnabled:!0,formCellFieldVerticalAlignEnabled:!0,formCellFieldBackgroundImageEnabled:!0,formCellFieldPaddingsEnabled:!1,formLinkFieldInsertImageEnabled:!0,formTableFieldBackgroundImageEnabled:!0,formDivFieldBackgroundImageEnabled:!0,formEmailFieldBackgroundImageEnabled:!0,elementImageEnabled:!0,elementTextEnabled:!0,elementHeaderEnabled:!0,elementButtonEnabled:!0,elementListULEnabled:!0,elementListOLEnabled:!0,elementDividerEnabled:!0,elementSpacerEnabled:!0,elementSocialEnabled:!0,elementTableEnabled:!0,elementCountdownEnabled:!0,elementVideoEnabled:!0,elementAIimageEnabled:!0,elementAItextEnabled:!0,elementCarouselEnabled:!0,elementAccordionEnabled:!0,elementFormEnabled:!0,preventSendDataToEM:!1,imageInfoToolUrl:"",imageCenterStockEnabled:!0,imageCenterGifEnabled:!0,imageCenterEditorEnabled:!0,compressMaxSize:.7,compressMaxWidthOrHeight:2e3,ampExportEnabled:!0,formFieldAmpVisibilityEnabled:!0,testEmails:[]},project:void 0,page:{isNew:!1,type:"email",project:0,id:""}},simple:{config:{mode:"simple",autosaveTimeout:1e4,theme:"",themes:{},mergeTags:void 0,styles:"",headerShow:!0,headerTitleVisible:!0,headerPreheaderVisible:!0,headerArrowBackVisible:!0,historyEnabled:!0,codeEnabled:!0,codeSideEnabled:!0,previewIconEnabled:!0,previewModeEnabled:!0,livePreviewEnabled:!0,sendTestEnabled:!0,sharePreviewEnabled:!0,emailDropdownMenuEnabled:!0,emailDropdownMenuClone:!0,emailDropdownMenuImport:!0,emailDropdownMenuLock:!0,emailDropdownMenuRemove:!0,emailExportEnabled:!0,exportHtmlEnabled:!0,exportZipEnabled:!0,exportClipboardEnabled:!0,exportWebHookEnabled:!0,exportOutlookEnabled:!1,exportPdfEnabled:!0,exportPngEnabled:!0,nextButtonEnabled:!1,nextButtonText:"",saveButtonEnabled:!0,saveButtonText:"",commandButtonsEnabled:!0,emailIdShow:!1,sidePanelFloating:!0,desktopMobileSwitchRule:!0,desktopMobileSwitchPanel:!1,onlyCodeModeInMobile:!1,pathEnabled:!0,copyPasteEnabled:!0,saveBlockEnabled:!0,editImageControlEnabled:!0,menuDirection:"right",defaultBuildPanel:"",commentsEnabled:!0,aiAssistentEnabled:!0,optimizeEnabled:!0,settingsEnabled:!0,UTMEnabled:!1,subjectEnabled:!0,preheaderEnabled:!0,descriptionEnabled:!0,tagsEnabled:!0,switchDesktopMobilePropsEnabled:!0,stepToOtherElementEnabled:!0,deleteButtonEnabled:!0,toggleSidePanel:!0,blocksSectionsShow:!0,blocksEmptyEnabled:!0,blocksSavedEnabled:!0,blocksCommonEnabled:!0,blocksTemplateEnabled:!0,blocksSearchEnabled:!0,formFieldImageTitleEnabled:!0,formFieldBorderEnabled:!1,formFieldBorderRadiusEnabled:!1,formFieldBoxShadowEnabled:!1,formFieldVisibilityEnabled:!1,formFieldExportAsPictureEnabled:!1,emailPaneDesktopSize:0,formButtonFieldInsertImageEnabled:!0,formButtonFieldVerticalAlignEnabled:!0,formButtonFieldTextAlignEnabled:!0,formButtonFieldBackgroundImageEnabled:!0,formButtonFieldPaddingsEnabled:!0,formCellFieldVerticalAlignEnabled:!0,formCellFieldBackgroundImageEnabled:!0,formCellFieldPaddingsEnabled:!0,formLinkFieldInsertImageEnabled:!0,formTableFieldBackgroundImageEnabled:!0,formDivFieldBackgroundImageEnabled:!0,formEmailFieldBackgroundImageEnabled:!0,elementImageEnabled:!0,elementTextEnabled:!0,elementHeaderEnabled:!0,elementButtonEnabled:!0,elementListULEnabled:!0,elementListOLEnabled:!0,elementDividerEnabled:!0,elementSpacerEnabled:!0,elementSocialEnabled:!0,elementTableEnabled:!0,elementCountdownEnabled:!1,elementVideoEnabled:!1,elementAIimageEnabled:!0,elementAItextEnabled:!1,elementCarouselEnabled:!1,elementAccordionEnabled:!1,elementFormEnabled:!1,preventSendDataToEM:!1,imageInfoToolUrl:"",imageCenterStockEnabled:!0,imageCenterGifEnabled:!0,imageCenterEditorEnabled:!0,compressMaxSize:.7,compressMaxWidthOrHeight:2e3,ampExportEnabled:!1,formFieldAmpVisibilityEnabled:!1,testEmails:[]},project:void 0,page:{isNew:!1,type:"email",project:0,id:""}}},o=e=>{const a=t[e];return a||t.editor},i=["mode","formFieldBorderEnabled","formFieldBorderRadiusEnabled","formFieldBoxShadowEnabled","formFieldVisibilityEnabled","formFieldExportAsPictureEnabled","formButtonFieldInsertImageEnabled","formButtonFieldVerticalAlignEnabled","formButtonFieldTextAlignEnabled","formButtonFieldBackgroundImageEnabled","formButtonFieldPaddingsEnabled","formCellFieldVerticalAlignEnabled","formCellFieldBackgroundImageEnabled","formCellFieldPaddingsEnabled","formLinkFieldInsertImageEnabled","formTableFieldBackgroundImageEnabled","formDivFieldBackgroundImageEnabled","formEmailFieldBackgroundImageEnabled"]},53204:(e,a,l)=>{l.d(a,{Ay:()=>m,M:()=>r,YT:()=>s,rI:()=>n});var t=l(90536);const o=(0,l(31770).ur)({isCollapsed:!0,isMonacoFocusing:!1}),i="defaultModePanesSlice",d=(0,t.createSlice)({name:i,initialState:o,reducers:{setMonacoFocusing:(e,a)=>{e.isMonacoFocusing=a.payload},resetPanes:()=>o}}),{resetPanes:n,setMonacoFocusing:s}=d.actions,r=e=>e[i].isMonacoFocusing,m=d},65983:(e,a,l)=>{l.d(a,{A9:()=>c,AJ:()=>E,Ay:()=>j,Bj:()=>f,CT:()=>I,G_:()=>m,HO:()=>b,Hs:()=>P,M7:()=>p,Up:()=>B,VK:()=>v,VO:()=>S,VZ:()=>_,Wm:()=>k,eX:()=>r,iy:()=>C,no:()=>y,om:()=>u,pl:()=>g,ps:()=>T,qX:()=>w,rd:()=>A,ss:()=>h,uJ:()=>F,zn:()=>M});var t=l(90536),o=l(31770),i=l(17581);const d=(0,o.ur)({invalidateEmailId:null,editorThemeColor:"light",isSettingsDisabled:!1,settings:{backgroundColor:"",backgroundImage:[{type:"url",value:""}],backgroundPositionX:"",backgroundPositionY:"",backgroundRepeat:"",textStrong:!1,textItalic:!1,textUnderline:!1},elementSettings:{},searchFilters:{},emailCommonStyles:"",saveTime:null,mobileViewActive:{shutdown:!0,styles:!0},email:{id:void 0,is_inited:!1,isNew:!1,hasAmp:!1,subject:void 0,preheader:void 0,description:"",html:"",project:void 0,project_author:"",project_title:"",tags:[],utm_parameters:{utm_source:"",utm_medium:"",utm_campaign:"",utm_term:"",utm_content:""},parent_email:null,common_styles:"",title:null,emailtags:[],isAmp:!1},emailIsEdit:!1,isCodeMode:!1,codeModeDirection:void 0,emailViewType:void 0,changeKey:null,problemsList:[],activeProblemRange:null}),n="emailSlice",s=(0,t.createSlice)({name:n,initialState:d,reducers:{setEditorThemeColor:(e,a)=>{e.editorThemeColor=a.payload},setEmailFromHistory:(e,{payload:a})=>{const l=e.email,t=void 0===(null===a||void 0===a?void 0:a.preheader),o=void 0===(null===a||void 0===a?void 0:a.subject);e.email={...l,html:null===a||void 0===a?void 0:a.html,preheader:t?l.preheader:null===a||void 0===a?void 0:a.preheader,subject:o?l.subject:null===a||void 0===a?void 0:a.subject,common_styles:void 0===(null===a||void 0===a?void 0:a.common_styles)?l.common_styles:null===a||void 0===a?void 0:a.common_styles}},setEmailSettings:(e,{payload:a})=>{Object.assign(e,{...e,settings:{...a},isSettingsDisabled:!1})},setEmailSettingsDisable:(e,a)=>{e.isSettingsDisabled=a.payload},setElementSettings:(e,{payload:a})=>{e.elementSettings=a},setSearchFilters:(e,a)=>{e.searchFilters=a.payload},setEmailHTML:(e,a)=>{e.email.html=a.payload},setEmailSubject:(e,a)=>{e.email.title!==e.email.subject&&(e.email.subject||e.email.title)||(e.email.title=a.payload),e.email.subject=a.payload},setEmailPreheader:(e,a)=>{e.email.preheader=a.payload},resetEmailSlice:e=>d,setEmailTitle:(e,a)=>{e.email.title=a.payload},setIsInited:(e,a)=>{e.email.is_inited=a.payload},setEmailIsAmp:(e,a)=>{e.email.isAmp=a.payload},setProblemsList:(e,a)=>{e.problemsList=a.payload},setActiveProblemRange:(e,a)=>{e.activeProblemRange=a.payload}},extraReducers:e=>{e.addMatcher((e=>"emailsApi/queries/queryResultPatched"===e.type),((e,a)=>{var l,t;const o=a.payload.queryCacheKey.match(/\("([0-9]+)"\)/),i=null===(l=a.payload)||void 0===l?void 0:l.patches[0];null!==i&&void 0!==i&&null!==(t=i.path)&&void 0!==t&&t[0]&&(e.email[null===i||void 0===i?void 0:i.path[0]]=i.value),null!==o&&void 0!==o&&o[1]&&(e.invalidateEmailId=o[1]),e.emailIsEdit=!0})),e.addMatcher((e=>"emailsApi/invalidateTags"===e.type),((e,a)=>{if(a.payload[0].id===+e.invalidateEmailId)return d})),e.addMatcher(i.GY.endpoints.editEmail.matchFulfilled,((e,{payload:a})=>{e.invalidateEmailId=null,e.email={...e.email,...a,renderGuid:e.email.renderGuid}})),e.addMatcher(i.GY.endpoints.autoSaveEmail.matchFulfilled,((e,a)=>{var l,t;(null===(l=e.email.id)||void 0===l?void 0:l.toString())===(null===(t=a.payload.id)||void 0===t?void 0:t.toString())&&(e.email.html=a.payload.html)})),e.addMatcher(i.GY.endpoints.getEmail.matchFulfilled,((e,{payload:a})=>{var l,t;e.email={...d.email,...a,is_inited:a.is_inited||(a.id===(null===(l=e.email)||void 0===l?void 0:l.id)?null===(t=e.email)||void 0===t?void 0:t.is_inited:d.email.is_inited)},e.emailIsEdit=!1}))}}),{setEditorThemeColor:r,setEmailSettings:m,setElementSettings:c,setEmailSettingsDisable:p,setSearchFilters:u,setEmailSubject:b,setEmailPreheader:g,setEmailHTML:E,resetEmailSlice:h,setEmailTitle:v,setEmailFromHistory:y,setIsInited:k,setEmailIsAmp:S,setProblemsList:f,setActiveProblemRange:T}=s.actions,M=e=>e[n].invalidateEmailId,B=e=>e[n].editorThemeColor,F=e=>e[n].settings,w=e=>e[n].elementSettings,C=e=>e[n].isSettingsDisabled,I=e=>e[n].searchFilters,P=e=>e[n].email,A=e=>e[n].problemsList,_=e=>e[n].activeProblemRange,j=s},94925:(e,a,l)=>{l.d(a,{Ay:()=>y,FC:()=>p,MY:()=>b,NK:()=>c,NP:()=>v,X:()=>u,aO:()=>h,ff:()=>m,qM:()=>g,ux:()=>E});var t=l(90536),o=l(17581),i=l(49211),d=l(85163);const n=(0,l(31770).ur)({emailsTotal:0,elementsList:[],emailsTrashTotal:0,elementsTrashList:[],customFolders:{},elementsView:!d.EW.isPlugin&&i.A.get(d.A9.em_elements_view)||d.Y$}),s="emailsPageSlice",r=(0,t.createSlice)({name:s,initialState:n,reducers:{resetPagesAndTotal:()=>n,resetElementsList:e=>{e.elementsList=[]},toggleElementsView:(e,a)=>{e.elementsView=a.payload},removeEmailFromList:(e,{payload:a})=>{var l;let t=e.customFolders;a.folder!==d.y2&&null!==(l=t[a.folder])&&void 0!==l&&l.list&&(t[a.folder]={...t[a.folder],list:t[a.folder].list.filter((e=>e.id!==a.emailId)),total:t[a.folder].total-1},e.customFolders=t)}},extraReducers:e=>{e.addMatcher(o.GY.endpoints.getEmails.matchFulfilled,((e,{meta:a,payload:l})=>{var t,o,i,d,n,s,r,m;const c=+(null===(t=a.baseQueryMeta)||void 0===t?void 0:t.response.headers.get("X-WP-Total"))||0,p="trash"===(null===(o=a.arg.originalArgs)||void 0===o?void 0:o.status),u=!(null===(i=a.arg.originalArgs)||void 0===i||null===(d=i.name)||void 0===d||!d.length),b=null===(n=a.arg.originalArgs)||void 0===n?void 0:n.page,g=(null===(s=a.arg.originalArgs)||void 0===s?void 0:s.folderTag)||(null===(r=a.arg.originalArgs)||void 0===r||null===(m=r.tags)||void 0===m?void 0:m[0]);p?(u||(e.emailsTrashTotal=c),e.elementsTrashList=l):g?e.customFolders={...e.customFolders,[g]:{list:l,page:b,total:c}}:(a.arg.originalArgs.tags||u||(e.emailsTotal=c),e.elementsList=l)})),e.addMatcher(o.GY.endpoints.getTemplateEmails.matchFulfilled,((e,{meta:a,payload:l})=>{var t;const o=+(null===(t=a.baseQueryMeta)||void 0===t?void 0:t.response.headers.get("X-WP-Total"))||0;e.elementsList=l,e.emailsTotal=o})),e.addMatcher(o.GY.endpoints.editEmail.matchFulfilled,((e,{payload:a})=>{e.elementsList.map((e=>{var l,t;return(null===(l=e.id)||void 0===l?void 0:l.toString())===(null===(t=a.id)||void 0===t?void 0:t.toString())?Object.assign(e,{lock:a.lock,title:a.title,emailtags:a.emailtags}):e}))}))}}),{resetPagesAndTotal:m,toggleElementsView:c,resetElementsList:p,removeEmailFromList:u}=r.actions,b=e=>e[s].emailsTotal,g=e=>e[s].elementsList,E=e=>e[s].elementsTrashList,h=e=>e[s].emailsTrashTotal,v=e=>e[s].customFolders,y=r},77532:(e,a,l)=>{l.d(a,{Ac:()=>b,Ay:()=>g,BK:()=>c,Uf:()=>u,Yw:()=>r,e_:()=>m,js:()=>p,tm:()=>s});var t=l(90536),o=l(31770);const i="imageSlice",d=(0,o.ur)({currentImage:"",currentBackground:"",currentImageName:""}),n=(0,t.createSlice)({name:i,initialState:d,reducers:{setCurrentImageName(e,a){e.currentImageName=a.payload},setCurrentImage(e,a){e.currentImage=a.payload},setCurrentBackground(e,a){e.currentBackground=a.payload},clearCurrentImages(e,a){e.currentImage="",e.currentBackground=""}}}),{setCurrentImage:s,setCurrentImageName:r,setCurrentBackground:m,clearCurrentImages:c}=n.actions,p=e=>e[i].currentImage,u=e=>e[i].currentImageName,b=e=>e[i].currentBackground,g=n},87790:(e,a,l)=>{l.d(a,{AS:()=>u,Ay:()=>k,Bp:()=>c,Sl:()=>y,TB:()=>g,X8:()=>E,ah:()=>v,qT:()=>p});var t=l(90536),o=l(55701),i=l(84568),d=l(35880),n=l.n(d);const s=(0,l(31770).ur)({block:{isNew:!0,subject:"",description:"",html:'<table cellspacing="0" cellpadding="0" border="0" width="100%">'+n()+"</table>",project:void 0,project_title:"",tags:[],type:"Other",title:null},hasChanged:!1}),r="newBlockSlice",m=(0,t.createSlice)({name:r,initialState:s,reducers:{setNewBlockAll:(e,{payload:{subject:a="",description:l="",renderGuid:t,html:o='<table cellspacing="0" cellpadding="0" border="0" width="100%">'+n()+"</table>",tags:i=[],type:d="Other",title:s,isAmp:r=!1}})=>{e.hasChanged||(e.hasChanged=!0),e.block.title=s,e.block.subject=a,e.block.description=l,e.block.html=o,e.block.tags=i,e.block.type=d,e.block.renderGuid=t,e.block.isAmp=r},setNewBlockTitle:(e,a)=>{e.hasChanged||(e.hasChanged=!0),e.block.title=a.payload},setNewBlockDescription:(e,a)=>{e.hasChanged||(e.hasChanged=!0),e.block.description=a.payload},setNewBlockHtml:(e,a)=>{e.hasChanged||(e.hasChanged=!0),e.block.html=a.payload},setNewBlockTags:(e,a)=>{e.hasChanged||(e.hasChanged=!0),e.block.tags=a.payload},resetNewBlockSlice:e=>({...s,block:{...s.block,project:e.block.project,project_title:e.block.project_title}}),setBlockIsAmp:(e,a)=>{e.block.isAmp=a.payload}},extraReducers:e=>{e.addMatcher(i.Nq.endpoints.getProject.matchFulfilled,((e,a)=>{e.block.project=a.payload.id,e.block.project_title=a.payload.title})),e.addMatcher(o.VM.endpoints.getBlock.matchFulfilled,(e=>({...s,block:{...s.block,project:e.block.project,project_title:e.block.project_title}})))}}),{setNewBlockAll:c,setNewBlockTitle:p,setNewBlockDescription:u,setNewBlockHtml:b,setNewBlockTags:g,resetNewBlockSlice:E,setBlockIsAmp:h}=m.actions,v=e=>e[r].block,y=e=>e[r].hasChanged,k=m},8493:(e,a,l)=>{l.d(a,{$S:()=>j,Ay:()=>x,BQ:()=>E,Et:()=>I,K3:()=>M,MZ:()=>g,P3:()=>F,TC:()=>k,TU:()=>h,Uh:()=>P,YG:()=>_,Zs:()=>y,aY:()=>S,lg:()=>A,mk:()=>w,ol:()=>B,x3:()=>v,yY:()=>T,zH:()=>C});var t=l(90536),o=l(17581),i=l(84568),d=l(85163),n=l(573),s=l.n(n),r=l(31770),m=l(71210),c=l(32269);const p=(0,r.ur)({emailtags:[],email:{isNew:!0,is_inited:!1,subject:void 0,preheader:void 0,description:"",html:s(),project:void 0,project_title:"",tags:[],utm_parameters:{utm_source:"",utm_medium:"",utm_campaign:"",utm_term:"",utm_content:""},parent_email:null,common_styles:"{}",title:"",emailtags:[],isAmp:!1},hasChanged:!1}),u="newEmailSlice",b=(0,t.createSlice)({name:u,initialState:p,reducers:{setNewEmailAll:(e,{payload:{id:a,subject:l,description:t="",preheader:o,html:i=s(),utm_parameters:{utm_source:n="",utm_medium:r="",utm_campaign:m="",utm_term:p="",utm_content:u=""}={},common_styles:b={},emailtags:g=null,renderGuid:E,title:h,_embedded:v,isAmp:y=!1}})=>{var k;e.hasChanged||(e.hasChanged=!0),e.email.isAmp=y,e.email.title=h,e.emailtags=g,e.email.subject=l,e.email.description=t,e.email.common_styles=JSON.stringify(b),e.email.preheader=o,e.email.is_template=!1,e.email.html=i,e.email.tags=(null===(k=(0,c._q)({_embedded:v},d.zh))||void 0===k?void 0:k.map((e=>e.name)))||[],e.email.renderGuid=E,e.email.parent_email=a,e.email.utm_parameters={utm_source:n,utm_medium:r,utm_campaign:m,utm_term:p,utm_content:u},e.email.common_styles=JSON.stringify(d.BD)},setNewEmailTitle:(e,a)=>{e.hasChanged||(e.hasChanged=!0),e.email.title=a.payload},setNewEmailSubject:(e,a)=>{e.hasChanged||e.email.subject===a.payload||(e.hasChanged=!0),e.email.title!==e.email.subject&&(e.email.subject||e.email.title)||(e.email.title=a.payload),e.email.subject=a.payload},setNewEmailPreheader:(e,a)=>{e.hasChanged||e.email.preheader===a.payload||(e.hasChanged=!0),e.email.preheader=a.payload},setNewEmailDescription:(e,a)=>{e.hasChanged||(e.hasChanged=!0),e.email.description=a.payload},setNewEmailIsTemplate:(e,a)=>{e.hasChanged||(e.hasChanged=!0),e.email.is_template=a.payload},setNewEmailHtml:(e,a)=>{e.hasChanged||(e.hasChanged=!0),a.payload&&(e.email.html=a.payload)},setNewCommonStyles:(e,a)=>{e.hasChanged||(e.hasChanged=!0),a.payload&&(e.email.common_styles=a.payload)},setNewEmailTags:(e,a)=>{e.hasChanged||(e.hasChanged=!0),e.email.tags=a.payload},setNewEmailUtmSource:(e,a)=>{e.hasChanged||(e.hasChanged=!0),e.email.utm_parameters.utm_source=a.payload},setNewEmailUtmMedium:(e,a)=>{e.hasChanged||(e.hasChanged=!0),e.email.utm_parameters.utm_medium=a.payload},setNewEmailUtmCampaign:(e,a)=>{e.hasChanged||(e.hasChanged=!0),e.email.utm_parameters.utm_campaign=a.payload},setNewEmailUtmTerm:(e,a)=>{e.hasChanged||(e.hasChanged=!0),e.email.utm_parameters.utm_term=a.payload},setNewEmailUtmContent:(e,a)=>{e.hasChanged||(e.hasChanged=!0),e.email.utm_parameters.utm_content=a.payload},setNewIsInited:(e,a)=>{e.email.is_inited=a.payload},setNewEmailIsAmp:(e,a)=>{e.email.isAmp=a.payload},resetNewEmailSlice:e=>({...p,email:{...p.email,guid:(0,m.l)(),project:e.email.project,project_title:e.email.project_title}})},extraReducers:e=>{e.addMatcher(i.Nq.endpoints.getProject.matchFulfilled,((e,a)=>{e.email.project=a.payload.id,e.email.project_title=a.payload.title})),e.addMatcher(o.GY.endpoints.getEmail.matchFulfilled,(e=>({...p,email:{...p.email,project:e.email.project,project_title:e.email.project_title}})))}}),{setNewEmailAll:g,setNewEmailTitle:E,setNewEmailSubject:h,setNewEmailPreheader:v,setNewEmailDescription:y,setNewEmailIsTemplate:k,setNewEmailHtml:S,setNewCommonStyles:f,setNewEmailTags:T,setNewEmailUtmSource:M,setNewEmailUtmMedium:B,setNewEmailUtmCampaign:F,setNewEmailUtmContent:w,setNewEmailUtmTerm:C,resetNewEmailSlice:I,setNewIsInited:P,setNewEmailIsAmp:A}=b.actions,_=e=>e[u].email,j=e=>e[u].hasChanged,x=b},36404:(e,a,l)=>{l.d(a,{Ay:()=>c,od:()=>r,yN:()=>m});var t=l(90536),o=l(31770),i=l(84568);const d=(0,o.ur)({project:null}),n="projectSlice",s=(0,t.createSlice)({name:n,initialState:d,reducers:{setProject:(e,{payload:a})=>{e.project=a}},extraReducers:e=>{e.addMatcher(i.Nq.endpoints.getProject.matchFulfilled,((e,{payload:a})=>{e.project={...d.project,...a}})),e.addMatcher(i.Nq.endpoints.editProject.matchFulfilled,((e,{payload:a})=>{e.project={...d.project,...a}}))}}),{setProject:r}=s.actions,m=e=>e[n].project,c=s},64936:(e,a,l)=>{l.d(a,{Ay:()=>w,Cj:()=>k,Oo:()=>E,Os:()=>v,Wz:()=>h,YF:()=>g,cL:()=>S,gU:()=>F,o8:()=>M,qf:()=>b,sB:()=>y,sK:()=>f,uM:()=>B,vW:()=>T});var t=l(90536),o=l(31770),i=l(84568),d=l(93563),n=l(85163);const s=new URLSearchParams(window.location.search),r=s.get("tag"),m=s.get("folder"),c=(0,o.ur)({activeModal:"",secondModal:"",projectsTotal:"",projectsTotalPages:"",folders:[],activeTagId:r||null,activeFolderId:m||(r?null:n.y2),activeTab:null}),p="projectsPageSlice",u=(0,t.createSlice)({name:p,initialState:c,reducers:{openModal(e,a){e.activeModal=a.payload},setActiveTab(e,a){e.activeTab=a.payload},closeModal(e){e.activeModal=""},openSecondModal(e,a){e.secondModal=a.payload},closeSecondModal(e){e.secondModal=""},setFolders(e,{payload:a}){e.folders=a},setActiveTagId(e,{payload:a}){e.activeTagId=a}},extraReducers:e=>{e.addMatcher(i.Nq.endpoints.getProjects.matchFulfilled,((e,{meta:a})=>{var l,t;const o=null===(l=a.baseQueryMeta)||void 0===l?void 0:l.response.headers.get("X-WP-Total"),i=null===(t=a.baseQueryMeta)||void 0===t?void 0:t.response.headers.get("X-WP-TotalPages");e.projectsTotal=o,e.projectsTotalPages=i})),e.addMatcher(d.kE.endpoints.getFolders.matchFulfilled,((e,{payload:a})=>{e.folders=a}))}}),{openModal:b,setActiveTab:g,closeModal:E,openSecondModal:h,closeSecondModal:v,setFolders:y,setActiveTagId:k}=u.actions,S=e=>e[p].activeModal,f=e=>e[p].secondModal,T=e=>e[p].projectsTotal,M=e=>e[p].folders,B=e=>e[p].activeTagId,F=e=>e[p].activeTab,w=u},39738:(e,a,l)=>{l.d(a,{Ay:()=>u,RL:()=>p,p1:()=>c,qX:()=>r});var t=l(90536),o=l(17581),i=l(55701);const d=(0,l(31770).ur)({historyData:[],elementHistoryTotalPages:1}),n="revisionHistorySlice",s=(0,t.createSlice)({name:n,initialState:d,reducers:{resetElementHistorySlice:()=>({...d}),setElementHistory:(e,a)=>{0!==a.payload.length&&(e.historyData=a.payload)}},extraReducers:e=>{e.addMatcher(o.GY.endpoints.getEmailHistory.matchFulfilled,((e,{meta:a,payload:l})=>{var t;e.elementHistoryTotalPages=+(null===(t=a.baseQueryMeta)||void 0===t?void 0:t.response.headers.get("X-WP-TotalPages")),a.arg.originalArgs.page&&1!==a.arg.originalArgs.page||(e.historyData=l.data||[])})),e.addMatcher(i.VM.endpoints.getBlockHistory.matchFulfilled,((e,{meta:a,payload:l})=>{var t;e.elementHistoryTotalPages=+(null===(t=a.baseQueryMeta)||void 0===t?void 0:t.response.headers.get("X-WP-TotalPages")),l.args.page&&1!==l.args.page||(e.historyData=l.data||[])}))}}),{resetElementHistorySlice:r}=s.actions,{setElementHistory:m}=s.actions,c=e=>e[n].historyData,p=e=>e[n].elementHistoryTotalPages,u=s},86286:(e,a,l)=>{l.d(a,{Ay:()=>S,B:()=>E,B$:()=>k,C1:()=>h,hZ:()=>y,ko:()=>u,ku:()=>c,ww:()=>r,yf:()=>v});var t=l(90536),o=l(39990),i=l(85163),d=l(32269);const n=(0,l(31770).ur)({currentUser:{},currentSchema:{},monacoOptions:i.rW,monacoDidMount:!1}),s="userSlice",r=(0,t.createAsyncThunk)("user/setMonacoOptions",(async(e,{getState:a})=>{const l=a()[s],t="string"===typeof e.font_family?`${e.font_family}, sans-serif`:void 0,o=void 0!==e.word_wrap?e.word_wrap?"on":"off":void 0;return t&&l.monacoOptions.fontFamily!==t&&await(0,d.iV)(e.font_family),{tabSize:e.tab_size,fontFamily:t,fontSize:e.font_size,wordWrap:o,insertSpaces:e.insert_spaces,minimap:{enabled:e.minimap}}})),m=(0,t.createSlice)({name:s,initialState:n,reducers:{setMonacoDidMount:(e,{payload:a})=>{e.monacoDidMount=a},setTheme:(e,{payload:a})=>{e.currentUser.theme=a},setUserLocale:(e,{payload:a})=>{e.currentUser.locale=a},setUserAutosaves:(e,{payload:a})=>{e.currentUser.autosaves=a},setUser:(e,{payload:a})=>{e.currentUser={...e.currentUser,...a}}},extraReducers:e=>{e.addCase(r.fulfilled,((e,a)=>{const l=a.payload;e.monacoOptions=(0,d.i0)({...e.monacoOptions},l)})),e.addMatcher(o.Q2.endpoints.editMe.matchFulfilled,((e,a)=>{e.currentUser=a.payload})),e.addMatcher(o.Q2.endpoints.getMe.matchFulfilled,((e,a)=>{e.currentUser=a.payload})),e.addMatcher(o.Q2.endpoints.getSchema.matchFulfilled,((e,a)=>{e.currentSchema=a.payload.schema}))}}),{setMonacoDidMount:c,setTheme:p,setUserLocale:u,setUserAutosaves:b,setUser:g}=m.actions,E=e=>{var a;return null===(a=e[s].currentUser)||void 0===a?void 0:a.locale},h=e=>e[s].currentUser,v=e=>e[s].currentSchema,y=e=>e[s].monacoOptions,k=e=>{var a;return 3891!==(null===(a=e[s].currentUser.subscription)||void 0===a?void 0:a.ID)},S=m}}]);