@emailmaker/emailmaker 1.3.4 → 1.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +20 -0
  3. package/emailmaker-core.091c986b.js +874 -0
  4. package/emailmaker-esm.js +53 -39
  5. package/{emailmaker-po.87ebe001.js → emailmaker-po.091c986b.js} +1 -1
  6. package/emailmaker.d.ts +95 -5
  7. package/emailmaker.js +54 -40
  8. package/iframe/.vite/manifest.json +4 -4
  9. package/iframe/css/sandbox-dark.css +2 -9
  10. package/iframe/css/sandbox-light.css +2 -9
  11. package/iframe/css/sandbox.css +13 -23
  12. package/iframe/{iframe-eblock.87ebe001.html → iframe-eblock.091c986b.html} +2 -2
  13. package/iframe/{iframe.87ebe001.html → iframe.091c986b.html} +2 -2
  14. package/iframe/js/elMarkupHelper.DoIAMao4.js +279 -0
  15. package/iframe/js/{iframe-eblock.body.87ebe001.js → iframe-eblock.body.091c986b.js} +1 -1
  16. package/iframe/js/iframe-eblock.js +2 -2
  17. package/iframe/js/iframe.body.091c986b.js +129 -0
  18. package/iframe/js/iframe.js +2 -2
  19. package/package.json +1 -1
  20. package/runtime/react/index.js +1 -1
  21. package/static/core/166a67bd.js +1 -0
  22. package/static/core/1a65ef0f.js +1 -0
  23. package/static/core/{4cdd6e6c.js → 1c67ab93.js} +1 -1
  24. package/static/core/{27599903.js → 1d004581.js} +1 -1
  25. package/static/core/{79e13595.js → 220d7d31.js} +1 -1
  26. package/static/core/{afb0d556.js → 2da7d310.js} +2 -2
  27. package/static/core/322d3e9f.js +1 -0
  28. package/static/core/{d8175c7f.js → 34756b09.js} +1 -1
  29. package/static/core/36f3f772.js +1 -0
  30. package/static/core/3b9931cd.js +1 -0
  31. package/static/core/{312fb954.js → 3bff2ae6.js} +1 -1
  32. package/static/core/{5afad425.js → 454350da.js} +1 -1
  33. package/static/core/{4797d4f7.js → 4852c0de.js} +6 -6
  34. package/static/core/{75a2537a.js → 5272f5b2.js} +1 -1
  35. package/static/core/{76163cc7.js → 5f176d0a.js} +1 -1
  36. package/static/core/674e22a5.js +1 -0
  37. package/static/core/{27986c36.js → 6ce85877.js} +1 -1
  38. package/static/core/7b8fbc31.js +1 -0
  39. package/static/core/{5ebf9f1e.js → 867b1e0a.js} +1 -1
  40. package/static/core/89b1052c.js +1 -0
  41. package/static/core/{81c0d133.js → 8b8c93f4.js} +1 -1
  42. package/static/core/8e97c82c.js +163 -0
  43. package/static/core/8eea6488.js +1 -0
  44. package/static/core/9a4cfb0a.js +1 -0
  45. package/static/core/{81a16991.js → 9d388494.js} +1 -1
  46. package/static/core/{2269bf04.js → 9e1370a6.js} +1 -1
  47. package/static/core/{9a7e933e.js → a59d579e.js} +1 -1
  48. package/static/core/{87c47034.js → a6abc393.js} +2 -2
  49. package/static/core/aa33047a.js +1 -0
  50. package/static/core/abde5a43.js +2 -0
  51. package/static/core/{d833a29f.js → b69579c4.js} +1 -1
  52. package/static/core/{489390a3.js → bcc4db3e.js} +1 -1
  53. package/static/core/{78916fed.js → c0b0ceff.js} +3 -3
  54. package/static/core/c5edcfc7.js +1 -0
  55. package/static/core/{122c5ed9.js → c9d5118c.js} +1 -1
  56. package/static/core/{81cc5690.js → caf9f1a6.js} +1 -1
  57. package/static/core/{7601732d.js → d241119a.js} +1 -1
  58. package/static/core/d4c10a7e.js +10 -0
  59. package/static/core/d517188a.js +1 -0
  60. package/static/core/db92581b.js +19 -0
  61. package/static/core/{a15ab3fe.js → de0d3c9a.js} +1 -1
  62. package/static/core/{8cebeef2.js → e995a70d.js} +1 -1
  63. package/static/core/ee26ef3d.js +1 -0
  64. package/static/core/f399000c.js +1 -0
  65. package/static/core/{67cc6cb2.js → f875f388.js} +1 -1
  66. package/static/esm/{9610f2de.js → 95cbf920.js} +1 -1
  67. package/static/umd-runtime/{runtime.BHEKxbjr.js → runtime.CV4WRxRc.js} +1 -1
  68. package/vendor/@emailmaker/ui-kit/package.json +1 -1
  69. package/emailmaker-core.87ebe001.js +0 -859
  70. package/iframe/js/elMarkupHelper.CO37NCd9.js +0 -278
  71. package/iframe/js/iframe.body.87ebe001.js +0 -129
  72. package/static/core/32e15918.js +0 -1
  73. package/static/core/b8941eda.js +0 -28
@@ -0,0 +1 @@
1
+ __emailmaker__.define("static/core/322d3e9f.js",["require","exports","module","static/core/ee980948.js","static/core/c948c45f.js"],function(m,_,x){const u=m("./ee980948.js"),a=m("./c948c45f.js");var h=["link_check","image_check","spam_check"],d={optimisation:0,link_check:0,image_check:0,spam_check:0},g={link_check:"link_check_counter",image_check:"image_check_counter",spam_check:"spam_check_counter"},p={link_check:"link_check_limit",image_check:"image_check_limit",spam_check:"spam_check_limit"},S=(e,t)=>{const i=Object.values(g),n=Object.values(p);return i.some(s=>e?.[s]!==void 0)||n.some(s=>t?.[s]!==void 0)||i.some(s=>t?.[s]!==void 0)||n.some(s=>e?.[s]!==void 0)},l=(e,t,i=0)=>{const n=e?.[t];return typeof n=="number"&&!Number.isNaN(n)?n:i},k=(e,t)=>({counter:e,limit:t,disabled:t>0&&e>=t});function f({isPlugin:e,config:t,card:i}){const n=e?t.counters:i?.counters,s=e?t.limits:i?.limits??{optimization_limit:0},r=!!(t.limits&&t.counters)&&e;return{counters:n,limits:s,limitsInPlugin:r,perTypeAvailable:r&&S(n,s)}}function b(e,t){const{limits:i,limitsInPlugin:n,perTypeAvailable:s}=f(e),r=l(i,"optimization_limit",0),c={};return h.forEach(o=>{c[o]=s?k(t[o],l(i,p[o],0)):k(t.optimisation,r)}),{limitsInPlugin:n,perTypeAvailable:s,aggregateLimit:r,aggregateCounter:t.optimisation,disableFields:!s&&t.optimisation>=r&&r>0,typeLimits:c}}function I(e,t){return e.perTypeAvailable?e.typeLimits[t].disabled:e.disableFields}function O(e){const{counters:t,limitsInPlugin:i,perTypeAvailable:n}=f(e);if(!i){const r=e.card?.counters?.optimization_counter;return e.isPlugin||!r?void 0:{optimisation:r}}const s={optimisation:l(t,"optimization_counter",0)};return n&&h.forEach(r=>{s[r]=l(t,g[r],0)}),s}var y=e=>(e.statusCode!==null?e.statusCode<300&&(e.page?.secure??!0):e.type!=="invalid")?a.VALID:(e.statusCode&&e.statusCode<400||e.statusCode===200&&(e.page?.secure??!0))&&e.type!=="invalid"?a.WARNINGS:a.ERRORS,T=e=>e.statusCode!==null&&e.statusCode<300?a.VALID:e.statusCode<400&&e.statusCode>=300||e.statusCode===200&&!e.valid?a.WARNINGS:a.ERRORS,v=e=>({valid:e.filter(t=>t.status===a.VALID).length,warnings:e.filter(t=>t.status===a.WARNINGS).length,errors:e.filter(t=>t.status===a.ERRORS).length}),L=u.createIdentifier$1("optimise.checks"),N={},P={link_check:!1,image_check:!1,spam_check:!1},A={link_check:"optimizeLinksEnabled",image_check:"optimizeImagesEnabled",spam_check:"optimizeSpamAssassinEnabled"},R={link_check:"LinkCheckCount",image_check:"ImageCheckCount",spam_check:"SpamCheckCount"},j={link_check:a.optimiseApi.endpoints.editLinks,image_check:a.optimiseApi.endpoints.editImages,spam_check:a.optimiseApi.endpoints.editSpam};function C(e){return new DOMParser().parseFromString(e,"text/html")}var D={link_check:e=>{const t={},i={};return C(e).querySelectorAll("a[href]").forEach((n,s)=>{t[`link_${s}`]=n.getAttribute("href"),i[`link_${s}`]=n.textContent||""}),{data:t,texts:i}},image_check:e=>{const t={};return C(e).querySelectorAll("img").forEach((i,n)=>{t[`image_${n}`]=i.src}),{data:t,texts:{}}},spam_check:e=>({data:{html:e},texts:{}})},M={link_check:e=>!!e?.result,image_check:e=>!!e?.result,spam_check:e=>!!e?.success&&!!e.result},E=(e,t)=>Number(e)-Number(t),w={link_check:(e,t)=>{const i=[...e.result].sort((n,s)=>E(n.linkId,s.linkId)).map(n=>({...n,text:t[n.linkId],status:y(n)}));return{links:i,summary:v(i)}},image_check:e=>{const t=Object.values(e.result);t.sort((s,r)=>E(s.imageId,r.imageId));const i=t.map(s=>({...s,status:T(s)})),n=t.reduce((s,r)=>s+Math.round(r.image.bytes/1024),0);return{images:i,summary:v(i),totalKb:n}},spam_check:e=>{const t=e.result,i=!!t.report&&Object.values(t.report);return i&&i.sort((n,s)=>n.score-s.score),{...t,report:i}}};function K(e){const t=e;return t?.status===401&&t?.data?.code==="usage_limit_exceeded"}function U(e){e.dispatch(a.limitsApi.util.invalidateTags(["LimitsStats","LimitsWarnings"]))}var z=class{_container;_counters=d;_seedKey;_seedProject;_running=P;_cached;_listeners=new Set;constructor(e){this._container=e}snapshot(){const e=this._input();this._reseed(e);const t=this._cached;if(t&&t.input.config===e.config&&t.input.card===e.card&&t.counters===this._counters&&t.running===this._running)return t.snapshot;const i={limits:b(e,this._counters),running:this._running};return this._cached={input:e,counters:this._counters,running:this._running,snapshot:i},i}watch(e){const t=()=>e();this._listeners.add(t);const i=this._container.getInstance(u.CONFIG_SOURCE_ID)?.watch(t),n=a.provideCurrentProject(this._container).watch(t);return{dispose:()=>{this._listeners.delete(t),i?.dispose(),n.dispose()}}}async preflight(e,t={}){const i=this._gate(e,t);if("ok"in i)return i;const{store:n,limits:s}=i;{const{counter:r,limit:c}=s.typeLimits[e];return s.limitsInPlugin&&c>0?{ok:!0,remaining:Math.max(c-r,0)}:{ok:!0}}}async run(e,t={}){const i=this._gate(e,t);if("ok"in i)return i;const{store:n,readContent:s,entityId:r,limits:c}=i;this._countUsage(e,c);const{data:o,texts:G}=D[e](s());t.beforeRequest?.();const Y=await this._request(n,e,{entity_id:r,data:o});return this._outcome(n,e,Y,G)}_gate(e,t){const i=this._container.getInstance(u.STORE_ID);if(!i)return{ok:!1,reason:"noStore"};const n=a.getOpenEmailDocuments(this._container)?.current(),s=t.readContent??(n?()=>n.getContent():void 0);if(!s)return{ok:!1,reason:"noDocument"};if(!t.ignoreEnabledFlag&&!this._input().config[A[e]])return{ok:!1,reason:"disabled"};const r=n?.get(),c=t.entityId??r?.serverId??r?.docId;if(!c)return{ok:!1,reason:"notSaved"};const{limits:o}=this.snapshot();return I(o,e)?{ok:!1,reason:"typeLimit",type:e}:{store:i,readContent:s,entityId:c,limits:o}}_outcome(e,t,{data:i,error:n},s){if(n)return K(n)?(U(e),{ok:!1,reason:"usageLimit",type:t}):{ok:!1,reason:"failed",error:n};if(!M[t](i))return{ok:!1,reason:"failed",data:i};let r;try{r=w[t](i,s)}catch(o){return{ok:!1,reason:"failed",error:o}}this._projectId();const c=i.limit_warning&&i.limit_remaining!=null?i.limit_remaining:void 0;return{ok:!0,value:r,limitRemaining:c}}async _request(e,t,i){this._setRunning(t,!0);try{return await e.dispatch(j[t].initiate(i,{track:!1}))}catch(n){return{error:n}}finally{this._setRunning(t,!1)}}_countUsage(e,t){if(!t.limitsInPlugin)return;const i=t.perTypeAvailable?e:"optimisation",n=this._counters[i]+1;this._counters={...this._counters,[i]:n},this._notify();const s=t.perTypeAvailable?R[e]:"OptimizationCount";a.getEmitter(this._container,u.events.ON_LIMIT_ID).fire({name:s,count:n})}_setRunning(e,t){this._running={...this._running,[e]:t},this._notify()}_notify(){this._listeners.forEach(e=>e())}_input(){return{isPlugin:!0,config:this._container.getInstance(u.CONFIG_SOURCE_ID)?.get()??N,card:void 0}}_reseed(e){const t=e.card?.id;t!==this._seedProject&&(this._seedProject=t,this._seedKey=void 0,this._counters=d);const i=O(e),n=e.isPlugin?e.config.counters:i&&JSON.stringify(i);!i||n===this._seedKey||(this._seedKey=n,this._counters={...this._counters,...i})}_projectId(){const e=a.getCurrentProject(this._container).card?.id;return e!=null&&e!==""?String(e):void 0}};function F(e){return e.getOrCreateInstance(L,()=>new z(e))}Object.defineProperty(_,"OPTIMISE_LIMIT_TYPES",{enumerable:!0,get:function(){return h}}),Object.defineProperty(_,"getOptimiseChecks",{enumerable:!0,get:function(){return F}}),Object.defineProperty(_,"isOptimiseTypeDisabled",{enumerable:!0,get:function(){return I}})});
@@ -1 +1 @@
1
- __emailmaker__.define("static/core/d8175c7f.js",["require","exports","module","static/core/281afc68.js"],function(u,t,s){const r=u("./281afc68.js");var n="https://cdn.ampproject.org/v0",i=`${n}.js`,c=`script[src='${i}']`;function a(e){return r.isElement(e)&&(e.tagName.startsWith("AMP")||e.tagName==="FORM"||e.tagName==="TEMPLATE"&&e.getAttribute("type")?.toLowerCase()==="amp-mustache")}function m(e){return r.isScriptElement(e)&&e.src?.startsWith("https://cdn.ampproject.org/v0")}Object.defineProperty(t,"AMP_BASE_SCRIPT",{enumerable:!0,get:function(){return i}}),Object.defineProperty(t,"AMP_BASE_SELECTOR",{enumerable:!0,get:function(){return c}}),Object.defineProperty(t,"AMP_SCRIPTS_PATH",{enumerable:!0,get:function(){return n}}),Object.defineProperty(t,"isAmpElement",{enumerable:!0,get:function(){return a}}),Object.defineProperty(t,"isAmpScript",{enumerable:!0,get:function(){return m}})});
1
+ __emailmaker__.define("static/core/34756b09.js",["require","exports","module","static/core/c948c45f.js"],function(u,t,s){const r=u("./c948c45f.js");var n="https://cdn.ampproject.org/v0",i=`${n}.js`,c=`script[src='${i}']`;function a(e){return r.isElement(e)&&(e.tagName.startsWith("AMP")||e.tagName==="FORM"||e.tagName==="TEMPLATE"&&e.getAttribute("type")?.toLowerCase()==="amp-mustache")}function m(e){return r.isScriptElement(e)&&e.src?.startsWith("https://cdn.ampproject.org/v0")}Object.defineProperty(t,"AMP_BASE_SCRIPT",{enumerable:!0,get:function(){return i}}),Object.defineProperty(t,"AMP_BASE_SELECTOR",{enumerable:!0,get:function(){return c}}),Object.defineProperty(t,"AMP_SCRIPTS_PATH",{enumerable:!0,get:function(){return n}}),Object.defineProperty(t,"isAmpElement",{enumerable:!0,get:function(){return a}}),Object.defineProperty(t,"isAmpScript",{enumerable:!0,get:function(){return m}})});
@@ -0,0 +1 @@
1
+ __emailmaker__.define("static/core/36f3f772.js",["require","exports","module","static/core/5dc34752.js","static/core/ee980948.js","static/core/c948c45f.js","react","react/jsx-runtime","__delivery__/libs"],function(C,ve,Me){const F=C("./5dc34752.js"),he=C("./ee980948.js"),e=C("./c948c45f.js");let o=C("react");o=F.__toESM(o);let A=C("react/jsx-runtime"),P=C("__delivery__/libs");var d=F.__toESM(e.require_prop_types()),Q=t=>t?.message??t?.data?.message??"The block was not saved.",X=({block:t=null,isEditableRights:z,rightCol:D,autoSaveBlockResult:ke,disabled:Ee,ownsDocument:O=!1})=>{const{__:m}=e.useI18n(),{blockId:J}=e.useRouteParams(),j=e.useEditorProjectId();let Be=e.useSelector(e.selectIsCodeMode$1),Se=e.useSelector(e.selectIsCodeMode$1);e.useDispatch();const c=e.useNotification(),B=e.useContentReader(),{document:K}=e.useDocumentSessionContext(),W=e.useStore(),Z=e.useSendPostMessage(),[ee,te]=(0,o.useState)(!1),[Te,ye]=(0,o.useState)(null),[Ie,g]=(0,o.useState)(!1),[M,Ce]=(0,o.useState)(0),[G,Oe]=(0,o.useState)(0),S=M!==G,T=(0,o.useCallback)(()=>Ce(s=>s+1),[]),Re=e.usePushToDataLayer(),se=e.useEventEmitter(he.events.ON_BLOCK_SAVEBUTTON_CLICK_ID),w=e.useAppConfig().saveHotkeyEnabled!==!1,x=e.useContainer(),H=(0,o.useRef)([]),V=(0,o.useRef)(!0);(0,o.useEffect)(()=>{window?.navigator?.userAgent.includes("Macintosh")&&ye(!0)},[]);const{data:N,refetch:oe}=e.useGetProjectQuery(+j,{skip:!+j}),[ae]=e.useAddTermMutation(),[q,$]=e.useEditBlockMutation(),[ne,U]=e.useAddBlockMutation(),[ie]=e.useEditProjectMutation(),{data:re}=e.useGetTermsQuery({project:N,kind:e.BLOCK_TAGS},{skip:!N?.id}),b=(0,o.useCallback)((s,r)=>{g(!0);let R=!1;const i=y=>{R||(R=!0,r?.(y))};if(!z&&t.lock&&S){i({ok:!1,reason:"locked",message:"No access to edit the block.",notified:!0}),c.error({id:"BLOCK_ACCESS_TO_LOCKED_ERROR",title:m("No access to edit the block."),data:e.getBlockDesc(t)}),g(!1);return}if((t.tags?.length||t.blocktags?.length)>10&&S){i({ok:!1,reason:"failed",message:"Maximum 10 tags available.",notified:!0,refusal:"The block has more tags than allowed (10 at most), so nothing was saved."}),c.error({id:"BLOCK_TOO_MANY_TAGS_ERROR",title:m("Maximum 10 tags available."),data:e.getBlockDesc(t)}),g(!1);return}if(t.type===""){i({ok:!1,reason:"failed",message:"The block type is not set.",notified:!0,refusal:"The block type is not set, so nothing was saved; ask the user to set it in the block settings."}),c.error({title:m("Set the type"),description:m("Please set the 'Type' field in the Settings section.")}),g(!1);return}const u=y=>{const le=t.tags?.map(n=>{const _=re?.find(p=>p.name===n);return _?_.id:ae({project:N,kind:e.BLOCK_TAGS,name:n,parent:y}).then(({error:p,data:L})=>{if(p?.status===400)return e.existingTermIdFromError(p);if(L)return L.id;p&&(c.fromError("TAG_CREATING_ERROR",n,p),g(!1))})}),f=O&&K?K:void 0,de=(n=null)=>{let _=null;const p=f?.get().version,L=f?f.get().serverId==null:!!t?.isNew,me=f?.get().serverId??t?.id,ge=a=>{const v=a?.id;if(f&&p!==void 0){f.markSaved(p,L&&v!=null?String(v):void 0);const E=a;e.writeSourceReport(f,e.fromServerFacts(E&&{wpId:E.wpId,secretHash:E.secretHash}))}i({ok:!0}),W.dispatch(e.taxonomiesApi.endpoints.getTerms.initiate({project:N,kind:e.BLOCK_TAGS})),oe();const l=a,k=l.global_block?e.globalBlockMark(l):void 0;k&&Z({operation:e.EVENT_TYPES.SANDBOX_EBLOCK_SET_EM_BLOCK_ID,settings:{emBlockId:k,..._?{emBlockVersion:_}:{}}}),S&&(c.success({id:"BLOCK_EDITING_SUCCESS",title:m("The block was successfully saved."),data:e.getBlockDesc(t)}),g(!1));const I=e.wpEmailTarget(l,j),h=I?.emailId??(e.isBlocksV2Enabled()?void 0:l.id);h!=null&&fetch(e.blockPreviewHref(e.BLOCK,I?.projectId??j,h,l.modified),{mode:"no-cors"}).then(()=>{})},_e=a=>i({ok:!1,reason:"failed",message:Q(a),notified:!0}),pe=e.getTaxonomy(t,e.EMAIL_TAGS).filter(a=>(n||t.blocktags).includes(a.id)).map(a=>a.name);if(L){if(f||U.status!=="pending")return ne({source:s,title:t.title===null?m("New block title"):t.title,project:t.project,type:t.type?t.type:"Other",description:t.description,html:B(),blocktags:n?n.join(","):t.blocktags,tags:pe,...e.hasOwnMeta(t)?{meta:t.meta}:{}}).then(async({data:a,error:v})=>{if(v)c.fromError("BLOCK_CREATING_ERROR",{title:t.title,html:B()},v),g(!1),_e(v);else{let l=a;const k=B();if(a?.global_block&&a?.id&&e.globalBlockMark(a)&&k){const I=new Date,h=e.injectEmBlockIdIntoBlockHtml(k,e.globalBlockMark(a),I);if(_=e.formatEmBlockVersion(I),h!==k){const E=await q({blockId:a.id,html:h});E.error?c.fromError("BLOCK_EDITING_ERROR",e.getBlockDesc(t),E.error):E.data&&(l=E.data)}}ge(l)}})}else if(f||$.status!=="pending"){const a=B(),v=new Date,l=t.global_block?e.globalBlockMark({...t,id:me}):void 0,k=l?e.injectEmBlockIdIntoBlockHtml(a,l,v):a;return l&&(_=e.formatEmBlockVersion(v)),q({blockId:me,source:s,title:t.title,project:t.project,type:t.type?t.type:"Other",description:t.description,html:k,...n||Array.isArray(t.tags)?{blocktags:n||t.blocktags,tags:pe}:{},...e.hasOwnMeta(t)?{meta:t.meta}:{}}).then(({data:I,error:h})=>{h&&S?(c.fromError("BLOCK_EDITING_ERROR",e.getBlockDesc(t),h),g(!1),_e(h)):ge(I)})}return i({ok:!1,reason:"failed",message:"Another block save is in progress."}),Promise.resolve()},ue=n=>{try{return f?e.runBlockSave(f,()=>de(n)):de(n)}catch(_){return Promise.reject(_)}},fe=n=>{c.fromError("BLOCK_EDITING_ERROR",e.getBlockDesc(t),n),g(!1),i({ok:!1,reason:"failed",message:Q(n),notified:!0})};le?Promise.all(le).then(n=>ue(n)).catch(fe):ue(null).catch(fe)};g(!0),u(void 0)},[U.status,ne,$.status,q,t,z,ae,ie,j,m,S,B,c,re,oe,W,Z,O,K]);(0,o.useEffect)(()=>{if(S){const s=b,r=H.current.splice(0),R=M-G>r.filter(({settle:i})=>i).length;se.fire({...t,html:B()}).then(i=>{i.some(u=>u===!1)?r.forEach(({settle:u})=>u?.({ok:!1,reason:"aborted",message:"The save was cancelled by the host."})):V.current?r.length?s(void 0,u=>r.forEach(({settle:y})=>y?.(u))):s():(r.forEach(({settle:u})=>u?.({ok:!1,reason:"failed",message:"The save button was removed."})),R&&s())}).catch(i=>{c.fromError("SAVE_BUTTON_CLICK_EVENT_ERROR",e.getBlockDesc(t),i,!0);const u=i instanceof Error?i.message:"The save button handler failed.";r.forEach(({settle:y})=>y?.({ok:!1,reason:"failed",message:u,notified:!0}))}),Oe(M)}},[S,M,G,b,se,t,B,c]),(0,o.useEffect)(()=>{V.current=!0;const s=H.current;return()=>{V.current=!1,s.splice(0).forEach(({settle:r})=>r?.({ok:!1,reason:"failed",message:"The save button was removed."}))}},[]),e.useCommand(e.SAVE_BLOCK_COMMAND_ID,(0,o.useCallback)(s=>{O&&(H.current.push(e.isSaveRequest(s)?s:{}),T())},[O,T])),(0,o.useEffect)(()=>O&&x?e.registerSaveListener(x,"block"):void 0,[O,x]);const Y=(0,o.useCallback)(s=>{(s.ctrlKey||s.metaKey)&&s.keyCode===83&&(s.preventDefault(),w&&T())},[w,T]);(0,o.useEffect)(()=>(document.addEventListener("keydown",Y),()=>{document.removeEventListener("keydown",Y)}),[Y]);const je=(0,o.useCallback)(s=>{const r=s.data.operation,R=s.data.action;r===e.EVENT_TYPES.APPLICATION_ACTION&&R==="save_email"&&w&&T()},[w,T]);e.useListenPostMessage(je),(0,o.useEffect)(()=>{const s=setTimeout(()=>{te(!0)},1e4);return()=>{clearTimeout(s)}},[]),(0,o.useEffect)(()=>{t.isNew&&!J&&ee&&(b(),te(!1))},[ee,t,b,J]);const Le=$.isLoading||ie.isLoading||U.isLoading||Ie,ce=!!ke?.isLoading,Ae=Le||ce;return(0,A.jsx)(P.ui_kit$Tooltip,{title:m(Te?"Save by ⌘S":"Save by Ctrl+S"),placement:D?"right":"bottomRight",children:(0,A.jsx)("span",{className:"em-analytics__block-save-tooltip-target",children:(0,A.jsx)(P.ui_kit$Button,{type:"primary",block:D,disabled:Ee||ce,className:"em-analytics__block-save",icon:(0,A.jsx)(e.EmIcons,{icon:"SaveOutlined",component:P.icons$SaveOutlined}),onClick:s=>{const r=s.currentTarget;Re({event:"click",action:"save_block"}),T();try{r?.blur?.()}catch{}},loading:Ae,children:D||Be||Se?"":m("Save")})})})};X.propTypes={block:d.default.shape({id:d.default.string,isNew:d.default.bool,lock:d.default.bool,type:d.default.string,html:d.default.string,description:d.default.string,project:d.default.number,title:d.default.string}),isEditableRights:d.default.bool.isRequired,ownsDocument:d.default.bool},Object.defineProperty(ve,"SaveBlockBtn",{enumerable:!0,get:function(){return X}})});
@@ -0,0 +1 @@
1
+ __emailmaker__.define("static/core/3b9931cd.js",["require","exports","module","static/core/5dc34752.js","static/core/c948c45f.js","static/core/d4c10a7e.js","dayjs"],function(l,_,v){const A=l("./5dc34752.js"),t=l("./c948c45f.js"),i=l("./d4c10a7e.js");let r=l("dayjs");r=A.__toESM(r);var m=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],E=[i.GMAIL_ANNOTATION_TYPES.PRODUCT_CAROUSEL,i.GMAIL_ANNOTATION_TYPES.SINGLE_IMAGE_PREVIEW],c=n=>n;function f(n){const e=t.openDocument(n)?.get().attributes.utm_parameters;return Object.fromEntries(m.map(a=>[a,e?.[a]??""]))}function T(n,e){return n.map((a,o)=>({id:e?.cards?.[o]?.id??"",image:a.image??"",url:a.url??"",headline:a.headline??"",price:a.price??"",priceCurrency:a.priceCurrency??"",discountPercent:a.discountPercent??""}))}function O(n){return{"document.getUtm":()=>t.emailOnlyRefusal(n,"UTM marks")??t.featureRefusal(n,"utm_editor","UTM marks")??f(n),"document.setUtm":({params:e})=>{const a=t.emailOnlyRefusal(n,"UTM marks")??t.featureRefusal(n,"utm_editor","UTM marks");if(a)return a;if(t.isReadOnly(n))return t.readOnlyError();const o=Object.keys(e).filter(u=>!m.includes(u));if(o.length)return t.err("invalidArgs",`Unknown UTM marks: ${o.join(", ")}. Allowed: ${m.join(", ")}.`);const s={...f(n),...e};return t.writeEmailAttributes(t.openDocument(n),{utm_parameters:s}),t.ok(s)},"document.setAnnotations":e=>{const a=t.emailOnlyRefusal(n,"Gmail annotations");if(a)return a;if(t.isReadOnly(n))return t.readOnlyError();const o=t.openDocument(n),s=["availabilityStarts","availabilityEnds"].find(y=>e[y]!==void 0&&!(0,r.default)(e[y]).isValid());if(s)return t.err("invalidArgs",`"${s}" must be an ISO 8601 date, for example 2026-12-31T00:00:00Z.`);if(!o)return t.noDocument();const u=T(e.cards??[],i.parseGmailAnnotations(o.getContent())),d=i.buildAnnotationsData({annotationType:e.annotationType,annotationLogo:e.logo,description:e.description,discountCode:e.discountCode,availabilityStarts:e.availabilityStarts?(0,r.default)(e.availabilityStarts):null,availabilityEnds:e.availabilityEnds?(0,r.default)(e.availabilityEnds):null,offerPageUrl:e.offerPageUrl,merchantHomepageUrl:e.merchantHomepageUrl,cards:u}),p=[...i.getAnnotationsApplyBlockers(d,c),...E.includes(e.annotationType)?i.getDiscountPercentBlockers(u,c):[]];return p.length||!i.canApplyGmailAnnotations(d)?t.err("invalidArgs",`The annotations cannot be applied: ${p.join("; ")||"required fields are empty"}.`):t.ok({changed:i.applyAnnotationsEditToDocument(o,d)})},"document.removeAnnotations":()=>{const e=t.emailOnlyRefusal(n,"Gmail annotations"),a=t.openDocument(n);return e||(t.isReadOnly(n)?t.readOnlyError():t.ok({changed:a?i.removeAnnotationsFromDocument(a):!1}))}}}_.agentFinishHandlers=O});
@@ -1,2 +1,2 @@
1
1
  (function(){try{if(typeof document<"u"){var r=".blocks-app .image-editor-modal .ant-modal-container{flex-direction:column;min-height:100vh;display:flex;border-radius:0!important}.blocks-app .image-editor-modal .ant-modal-body{border-bottom:1px solid #d9d9d9;flex-grow:1;display:flex}.blocks-app .image-editor-modal .ant-modal-body #filerobot-editor{flex-grow:1;height:calc(100vh - 70px);min-height:calc(100vh - 70px);overflow:hidden}.blocks-app .image-editor-modal .pi .text-on-primary{background:var(--em-colorPrimary);border-color:var(--em-colorPrimary)}.blocks-app .image-editor-modal .pi .text-on-primary:hover{background:var(--em-colorPrimaryHover);border-color:var(--em-colorPrimaryHover)}.blocks-app .image-editor-modal .pi .text-on-primary.rounded-full{border-radius:calc(var(--em-borderRadius) * 1px)}.blocks-app .image-editor-modal .pi .shadow-xl{box-shadow:none}.blocks-app .image-editor-modal .w-\\[4ch\\].text-sm.text-center{width:5ch}.blocks-app .image-editor-modal .pi .border-white{border-color:var(--em-colorPrimary)}.blocks-app .image-editor-modal .pi .bg-white\\/50{background-color:var(--em-colorPrimary)}.blocks-app .image-editor-modal .pi .text-on-primary{color:var(--em-colorWhite)}",e=window.__emailmaker_styles__||(window.__emailmaker_styles__={sheets:{},order:[]}),i=r;if(!e.sheets[i]){var t=null;try{typeof CSSStyleSheet=="function"&&"replaceSync"in CSSStyleSheet.prototype&&(t=new CSSStyleSheet,t.replaceSync(r))}catch{t=null}if(t){if(!e.host||!e.host.isConnected||!e.host.sheet){var o=document.createElement("style");o.setAttribute("data-emailmaker","true"),document.head.appendChild(o),e.host=o}for(var d=e.host.sheet,l=0;l<t.cssRules.length;l++)try{d.insertRule(t.cssRules[l].cssText,d.cssRules.length)}catch{}(e.texts||(e.texts=[])).push(r),(e.listeners||[]).forEach(function(a){try{a(r)}catch{}})}else{var o=document.createElement("style");o.setAttribute("data-emailmaker","true"),o.appendChild(document.createTextNode(r)),document.head.appendChild(o)}e.sheets[i]=!0,e.order.push(i)}}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- __emailmaker__.define("static/core/312fb954.js",["require","exports","module","static/core/5dc34752.js","static/core/ee980948.js","static/core/281afc68.js","static/core/81c0d133.js","static/core/afb0d556.js","static/core/a15ab3fe.js","static/core/61378c9e.js","react","react/jsx-runtime","__delivery__/libs"],function(r,N,Z){const F=r("./5dc34752.js"),E=r("./ee980948.js"),e=r("./281afc68.js"),v=r("./81c0d133.js");r("./afb0d556.js");const d=r("./a15ab3fe.js"),U=r("./61378c9e.js");let s=r("react");s=F.__toESM(s);let c=r("react/jsx-runtime"),_=r("__delivery__/libs");var L={width:"100%",height:"100%"},P=[d.TABS_IDS.ADJUST,d.TABS_IDS.ANNOTATE,d.TABS_IDS.RESIZE],$={presetsItems:v.C};function z(n,l){if(n==="json")return new Blob([l],{type:"application/json"});if(n==="svg")return new Blob([l],{type:"image/svg+xml"});const f=`image/${n}`,m=l.replace(/data:image\/([a-z]*)?;base64,/,"");return U.base64ToBlob(m,f)}var J=({currentImageLink:n,prefetchedBlob:l,resolveImageBlob:f,onSave:m,uploadImageResultIsLoading:K})=>{const I=e.useCookieManager(),[b,S]=(0,s.useState)(),[R,D]=(0,s.useState)(),{__:T}=e.useI18n();let g=e.useDispatch();const k=e.useStore(),y=e.useAppConfig(),w=e.useEditorLocale(),G=e.useSelector(e.selectSecondModal),O=e.useProjectData();(0,s.useMemo)(()=>{if(!y?.icons)return;const o={};for(const[i,t]of Object.entries(y.icons))typeof t=="string"&&(o[i]=e.sanitizeHtml(t));return Object.keys(o).length>0?o:void 0},[y?.icons]);const[H,x]=(0,s.useState)(!1),h=(0,s.useRef)(),A=(0,s.useRef)(null),j=d.useCornerRadiusSync(A),B=e.useEventEmitter(E.events.FILE_PROXY_EVENT_ID);(0,s.useEffect)(()=>{let o=!1;return(async()=>{const t=n;if(!t&&!l)return;let a=l;if(!a&&t)try{typeof f=="function"?a=await f(t):a=await(await fetch(t)).blob()}catch{if(o)return;if(a=await B.fire({url:t,project:O}).filter(u=>u instanceof Blob)[0],!a){const u=I.get(e.APP_COOKIES.em_token)||await e.di.getContainer(k)?.getInstance(E.TOKEN_ID);a=await(await fetch(`https://app.emailmaker.ru/api/wp-json/cors-proxy/v1/get?url=${encodeURIComponent(t)}`,{headers:{authorization:`Bearer ${u}`}})).blob()}}if(o||!a)return;const p=new FileReader;p.onload=()=>{if(o)return;const u=p.result;typeof u=="string"&&(S(u),D(a.type))},p.onerror=()=>{},p.readAsDataURL(a)})().catch(t=>{}),()=>{o=!0}},[n,l,f,I,B,O,k]);const V=(0,s.useCallback)(()=>{S(null),D(null),x(!1),g(e.closeSecondModal()),g(e.closeModal$1(e.MODALS.UPLOAD_IMAGE_MODAL))},[g]),M=(0,s.useRef)();M.current=async function(o,i,t){try{const a=z(t,o);m&&await m(new File([a],i,{lastModified:Date.now(),type:a.type}))}catch(a){throw a}};const Y=(0,s.useCallback)(o=>{x(!!o)},[]),W=(0,s.useCallback)(()=>{if(!h.current)return;const o=n?.split("/").pop().split(".")[0]||"image",i=j.isRounded?"png":R?.split("/")[1]||"png";try{const{imageData:t}=h.current({name:o,extension:i},void 0,!1),a=t.imageBase64??(t.imageCanvas?t.imageCanvas.toDataURL(`image/${i}`):void 0);if(!a)throw new Error("FIE не вернул ни imageBase64, ни imageCanvas");M.current(a,o,i)}catch{}},[j.isRounded,n,R]),C=w?w.replace("_","-"):"ru-RU",X=(0,s.useMemo)(()=>v._(C),[C]);return(0,c.jsxs)(_.ui_kit$Modal,{afterOpenChange:Y,width:"100%",style:{maxWidth:"100%",minHeight:"100vh"},className:"image-editor-modal",centered:!0,closable:!1,zIndex:1100,mask:!1,open:G,footer:[(0,c.jsx)(_.ui_kit$Button,{className:"em-analytics__profile-cancel",onClick:V,children:T("Cancel")},"Cancel"),(0,c.jsx)(_.ui_kit$Button,{className:"em-analytics__profile-updafilerobotte",id:"save",type:"primary",onClick:W,children:T("Update")},"Ok")],children:[K&&(0,c.jsx)("div",{style:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:e.emCssVar("colorBgLayout"),zIndex:10,opacity:.7},children:(0,c.jsx)(_.ui_kit$Spin,{size:"large"})}),(0,c.jsx)("div",{id:"filerobot-editor",ref:A,style:L,children:H&&b&&(0,c.jsx)(d.AssemblyPoint_default,{source:b,useBackendTranslations:!1,language:C.split("-")[0],translations:X,tabsIds:P,defaultTabId:d.TABS_IDS.ADJUST,Crop:$,...j.editorConfig,avoidChangesNotSavedAlertOnLeave:!0,removeSaveButton:!0,getCurrentImgDataFnRef:h})})]})};N.default=J});
2
+ __emailmaker__.define("static/core/3bff2ae6.js",["require","exports","module","static/core/5dc34752.js","static/core/ee980948.js","static/core/c948c45f.js","static/core/8b8c93f4.js","static/core/2da7d310.js","static/core/de0d3c9a.js","static/core/61378c9e.js","react","react/jsx-runtime","__delivery__/libs"],function(r,N,Z){const F=r("./5dc34752.js"),E=r("./ee980948.js"),e=r("./c948c45f.js"),v=r("./8b8c93f4.js");r("./2da7d310.js");const d=r("./de0d3c9a.js"),U=r("./61378c9e.js");let s=r("react");s=F.__toESM(s);let c=r("react/jsx-runtime"),_=r("__delivery__/libs");var L={width:"100%",height:"100%"},P=[d.TABS_IDS.ADJUST,d.TABS_IDS.ANNOTATE,d.TABS_IDS.RESIZE],$={presetsItems:v.C};function z(n,l){if(n==="json")return new Blob([l],{type:"application/json"});if(n==="svg")return new Blob([l],{type:"image/svg+xml"});const f=`image/${n}`,m=l.replace(/data:image\/([a-z]*)?;base64,/,"");return U.base64ToBlob(m,f)}var G=({currentImageLink:n,prefetchedBlob:l,resolveImageBlob:f,onSave:m,uploadImageResultIsLoading:H})=>{const I=e.useCookieManager(),[b,S]=(0,s.useState)(),[R,D]=(0,s.useState)(),{__:T}=e.useI18n();let g=e.useDispatch();const k=e.useStore(),y=e.useAppConfig(),w=e.useEditorLocale(),J=e.useSelector(e.selectSecondModal),O=e.useProjectData();(0,s.useMemo)(()=>{if(!y?.icons)return;const o={};for(const[i,t]of Object.entries(y.icons))typeof t=="string"&&(o[i]=e.sanitizeHtml(t));return Object.keys(o).length>0?o:void 0},[y?.icons]);const[K,x]=(0,s.useState)(!1),h=(0,s.useRef)(),A=(0,s.useRef)(null),j=d.useCornerRadiusSync(A),B=e.useEventEmitter(E.events.FILE_PROXY_EVENT_ID);(0,s.useEffect)(()=>{let o=!1;return(async()=>{const t=n;if(!t&&!l)return;let a=l;if(!a&&t)try{typeof f=="function"?a=await f(t):a=await(await fetch(t)).blob()}catch{if(o)return;if(a=await B.fire({url:t,project:O}).filter(u=>u instanceof Blob)[0],!a){const u=I.get(e.APP_COOKIES.em_token)||await e.di.getContainer(k)?.getInstance(E.TOKEN_ID);a=await(await fetch(`https://app.emailmaker.ru/api/wp-json/cors-proxy/v1/get?url=${encodeURIComponent(t)}`,{headers:{authorization:`Bearer ${u}`}})).blob()}}if(o||!a)return;const p=new FileReader;p.onload=()=>{if(o)return;const u=p.result;typeof u=="string"&&(S(u),D(a.type))},p.onerror=()=>{},p.readAsDataURL(a)})().catch(t=>{}),()=>{o=!0}},[n,l,f,I,B,O,k]);const V=(0,s.useCallback)(()=>{S(null),D(null),x(!1),g(e.closeSecondModal()),g(e.closeModal$1(e.MODALS.UPLOAD_IMAGE_MODAL))},[g]),M=(0,s.useRef)();M.current=async function(o,i,t){try{const a=z(t,o);m&&await m(new File([a],i,{lastModified:Date.now(),type:a.type}))}catch(a){throw a}};const Y=(0,s.useCallback)(o=>{x(!!o)},[]),W=(0,s.useCallback)(()=>{if(!h.current)return;const o=n?.split("/").pop().split(".")[0]||"image",i=j.isRounded?"png":R?.split("/")[1]||"png";try{const{imageData:t}=h.current({name:o,extension:i},void 0,!1),a=t.imageBase64??(t.imageCanvas?t.imageCanvas.toDataURL(`image/${i}`):void 0);if(!a)throw new Error("FIE не вернул ни imageBase64, ни imageCanvas");M.current(a,o,i)}catch{}},[j.isRounded,n,R]),C=w?w.replace("_","-"):"ru-RU",X=(0,s.useMemo)(()=>v._(C),[C]);return(0,c.jsxs)(_.ui_kit$Modal,{afterOpenChange:Y,width:"100%",style:{maxWidth:"100%",minHeight:"100vh"},className:"image-editor-modal",centered:!0,closable:!1,zIndex:1100,mask:!1,open:J,footer:[(0,c.jsx)(_.ui_kit$Button,{className:"em-analytics__profile-cancel",onClick:V,children:T("Cancel")},"Cancel"),(0,c.jsx)(_.ui_kit$Button,{className:"em-analytics__profile-updafilerobotte",id:"save",type:"primary",onClick:W,children:T("Update")},"Ok")],children:[H&&(0,c.jsx)("div",{style:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:e.emCssVar("colorBgLayout"),zIndex:10,opacity:.7},children:(0,c.jsx)(_.ui_kit$Spin,{size:"large"})}),(0,c.jsx)("div",{id:"filerobot-editor",ref:A,style:L,children:K&&b&&(0,c.jsx)(d.AssemblyPoint_default,{source:b,useBackendTranslations:!1,language:C.split("-")[0],translations:X,tabsIds:P,defaultTabId:d.TABS_IDS.ADJUST,Crop:$,...j.editorConfig,avoidChangesNotSavedAlertOnLeave:!0,removeSaveButton:!0,getCurrentImgDataFnRef:h})})]})};N.default=G});
@@ -1,6 +1,6 @@
1
1
  __emailmaker__.define("static/core/a54d9b28.js",["require","exports","module","static/core/5dc34752.js"],function(e,t,s){const o=e("./5dc34752.js");var a=[{name:"META",selector:"head > meta[charset]",required:!0,requiredParent:"HEAD",attrs:[{name:"charset",value:["utf-8"],required:!0}],unique:!0},{name:"SCRIPT",selector:"head > script[src]",required:!0,requiredParent:"HEAD",attrs:[{name:"src",value:["https://cdn.ampproject.org/v0.js"],required:!0}],attrLists:["nonce-attr","amphtml-engine-attrs"],unique:!0},{name:"STYLE",selector:"head > style[amp-custom-length-check]",requiredParent:"HEAD",attrs:[{name:"amp-custom-length-check",value:[""],required:!0},{name:"type",value:["text/css"]}],attrLists:["nonce-attr"],unique:!0},{name:"STYLE",selector:"head > style[amp-custom]",requiredParent:"HEAD",attrs:[{name:"amp-custom",value:[""],required:!0},{name:"type",value:["text/css"]}],unique:!0},{name:"STYLE",selector:"head > style[amp-custom]",requiredParent:"HEAD",attrs:[{name:"amp-custom",value:[""],required:!0},{name:"type",value:["text/css"]}],unique:!0},{name:"STYLE",selector:"head > style[amp4email-boilerplate]",requiredParent:"HEAD",attrs:[{name:"amp4email-boilerplate",value:[""],required:!0}],unique:!0},{name:"SCRIPT",selector:"amp-state > script[type]",requiresExtension:["amp-bind"],requiredParent:"AMP-STATE",attrs:[{name:"type",value:["application/json"],required:!0}],attrLists:["nonce-attr"]},{name:"HEAD",selector:"html > head",required:!0,requiredParent:"HTML",attrs:[],unique:!0},{name:"BODY",selector:"html > body",required:!0,requiredParent:"HTML",attrs:[],unique:!0},{name:"SECTION",selector:"amp-accordion > section",requiredParent:"AMP-ACCORDION",attrs:[{name:"expanded",value:[""]},{name:"[data-expand]"}]},{name:"DIV",selector:"div[submit-success][template]",attrs:[{name:"align"},{name:"submit-success",required:!0},{name:"template",required:!0}]},{name:"DIV",selector:"div[submit-error][template]",attrs:[{name:"align"},{name:"submit-error",required:!0},{name:"template",required:!0}]},{name:"SCRIPT",selector:"script[type][template]",requiresExtension:["amp-mustache"],attrs:[{name:"id",disallowedValueRegex:"(^|\\s)(__amp_\\S*|__count__|__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__noSuchMethod__|__parent__|__proto__|__AMP_\\S*|\\$p|\\$proxy|acceptCharset|addEventListener|appendChild|assignedSlot|attachShadow|AMP|baseURI|checkValidity|childElementCount|childNodes|classList|className|clientHeight|clientLeft|clientTop|clientWidth|compareDocumentPosition|computedName|computedRole|contentEditable|createShadowRoot|enqueAction|firstChild|firstElementChild|getAnimations|getAttribute|getAttributeNS|getAttributeNode|getAttributeNodeNS|getBoundingClientRect|getClientRects|getDestinationInsertionPoints|getElementsByClassName|getElementsByTagName|getElementsByTagNameNS|getRootNode|hasAttribute|hasAttributeNS|hasAttributes|hasChildNodes|hasPointerCapture|i-amphtml-\\S*|innerHTML|innerText|inputMode|insertAdjacentElement|insertAdjacentHTML|insertAdjacentText|isContentEditable|isDefaultNamespace|isEqualNode|isSameNode|lastChild|lastElementChild|lookupNamespaceURI|namespaceURI|nextElementSibling|nextSibling|nodeName|nodeType|nodeValue|offsetHeight|offsetLeft|offsetParent|offsetTop|offsetWidth|outerHTML|outerText|ownerDocument|parentElement|parentNode|previousElementSibling|previousSibling|querySelector|querySelectorAll|releasePointerCapture|removeAttribute|removeAttributeNS|removeAttributeNode|removeChild|removeEventListener|replaceChild|reportValidity|requestPointerLock|scrollHeight|scrollIntoView|scrollIntoViewIfNeeded|scrollLeft|scrollWidth|setAttribute|setAttributeNS|setAttributeNode|setAttributeNodeNS|setPointerCapture|shadowRoot|styleMap|tabIndex|tagName|textContent|toString|valueOf|(webkit|ms|moz|o)dropzone|(webkit|moz|ms|o)MatchesSelector|(webkit|moz|ms|o)RequestFullScreen|(webkit|moz|ms|o)RequestFullscreen)(\\s|$)"},{name:"type",value:["text/plain"],required:!0},{name:"template",value:["amp-mustache"],required:!0}],attrLists:["nonce-attr"]},{name:"FORM",selector:"form[action-xhr]",requiresExtension:["amp-form"],attrs:[{name:"accept"},{name:"accept-charset"},{name:"action-xhr",valueUrl:{protocol:["https"],allowRelative:!1},required:!0,disallowedValueRegex:"__amp_source_origin|{{|}}"},{name:"autocomplete"},{name:"custom-validation-reporting",value:["as-you-go","interact-and-submit","show-all-on-submit","show-first-on-submit"]},{name:"enctype"},{name:"method",value:["post"],required:!0},{name:"novalidate"},{name:"xssi-prefix"}]},{name:"DIV",selector:"div[submitting]",attrs:[{name:"align"},{name:"submitting",required:!0}]},{name:"DIV",selector:"div[submit-success]",attrs:[{name:"align"},{name:"submit-success",required:!0}]},{name:"DIV",selector:"div[submit-error]",attrs:[{name:"align"},{name:"submit-error",required:!0}]},{name:"SCRIPT",selector:"script[type]",attrs:[{name:"type",value:["application/ld+json"],required:!0}],attrLists:["nonce-attr"]},{name:"DIV",selector:"div[fetch-error]",attrs:[{name:"align"},{name:"fetch-error",required:!0}]},{name:"NAV",selector:"nav[toolbar]",requiredParent:"AMP-SIDEBAR",attrs:[{name:"toolbar",required:!0},{name:"toolbar-target",required:!0}]},{name:"HTML",selector:"html",required:!0,requiredParent:"$ROOT",attrs:[{name:"⚡4email",value:[""],required:!0},{name:"data-css-strict",value:[""],required:!0}],unique:!0},{name:"TITLE",selector:"title",deprecation:"Title tags in email have no meaning. This tag may become invalid in the future.",attrs:[{name:"[text]"}]},{name:"META",selector:"meta",attrs:[{name:"content"},{name:"itemprop"},{name:"name",disallowedValueRegex:"(^|\\s)(amp-.*|amp4ads-.*|apple-itunes-app|content-disposition|revisit-after|viewport)(\\s|$)"},{name:"media"},{name:"property"},{name:"scheme"}]},{name:"ARTICLE",selector:"article",attrs:[]},{name:"SECTION",selector:"section",attrs:[]},{name:"NAV",selector:"nav",attrs:[]},{name:"ASIDE",selector:"aside",attrs:[]},{name:"H1",selector:"h1",attrs:[{name:"align"}]},{name:"H2",selector:"h2",attrs:[{name:"align"}]},{name:"H3",selector:"h3",attrs:[{name:"align"}]},{name:"H4",selector:"h4",attrs:[{name:"align"}]},{name:"H5",selector:"h5",attrs:[{name:"align"}]},{name:"H6",selector:"h6",attrs:[{name:"align"}]},{name:"HEADER",selector:"header",attrs:[]},{name:"FOOTER",selector:"footer",attrs:[]},{name:"ADDRESS",selector:"address",attrs:[]},{name:"P",selector:"p",attrs:[{name:"align"}]},{name:"HR",selector:"hr",attrs:[]},{name:"PRE",selector:"pre",attrs:[]},{name:"BLOCKQUOTE",selector:"blockquote",attrs:[{name:"align"}],attrLists:["cite-attr"]},{name:"OL",selector:"ol",attrs:[{name:"reversed",value:[""]},{name:"start",valueRegex:"[0-9]*"},{name:"type",valueRegex:"[1AaIi]"}]},{name:"UL",selector:"ul",attrs:[]},{name:"LI",selector:"li",attrs:[{name:"value",valueRegex:"[0-9]*"}]},{name:"DL",selector:"dl",attrs:[]},{name:"DT",selector:"dt",attrs:[]},{name:"DD",selector:"dd",attrs:[]},{name:"FIGURE",selector:"figure",attrs:[]},{name:"FIGCAPTION",selector:"figcaption",attrs:[]},{name:"DIV",selector:"div",attrs:[{name:"align"}]},{name:"MAIN",selector:"main",attrs:[]},{name:"A",selector:"a",attrs:[{name:"border"},{name:"href",valueUrl:{protocol:["http","https","mailto","tel"],allowRelative:!1},disallowedValueRegex:"__amp_source_origin|(.|\\s){{|}}(.|\\s)|^{{.*[^}][^}]$|^[^{][^{].*}}$|^}}|{{$|{{#|{{/|{{\\^"},{name:"hreflang"},{name:"media"},{name:"role"},{name:"tabindex"},{name:"target",value:["_blank"]},{name:"type",value:["text/html"]}]},{name:"EM",selector:"em",attrs:[]},{name:"STRONG",selector:"strong",attrs:[]},{name:"SMALL",selector:"small",attrs:[]},{name:"S",selector:"s",attrs:[]},{name:"CITE",selector:"cite",attrs:[]},{name:"Q",selector:"q",attrs:[],attrLists:["cite-attr"]},{name:"DFN",selector:"dfn",attrs:[]},{name:"ABBR",selector:"abbr",attrs:[]},{name:"DATA",selector:"data",attrs:[]},{name:"TIME",selector:"time",attrs:[{name:"datetime"},{name:"pubdate",value:[""]}]},{name:"CODE",selector:"code",attrs:[]},{name:"VAR",selector:"var",attrs:[]},{name:"SAMP",selector:"samp",attrs:[]},{name:"KBD",selector:"kbd",attrs:[]},{name:"SUB",selector:"sub",attrs:[]},{name:"SUP",selector:"sup",attrs:[]},{name:"I",selector:"i",attrs:[]},{name:"B",selector:"b",attrs:[]},{name:"U",selector:"u",attrs:[]},{name:"MARK",selector:"mark",attrs:[]},{name:"RUBY",selector:"ruby",attrs:[]},{name:"RB",selector:"rb",attrs:[]},{name:"RT",selector:"rt",attrs:[]},{name:"RP",selector:"rp",attrs:[]},{name:"BDO",selector:"bdo",attrs:[{name:"dir"}]},{name:"SPAN",selector:"span",attrs:[]},{name:"BR",selector:"br",attrs:[]},{name:"WBR",selector:"wbr",attrs:[]},{name:"INS",selector:"ins",attrs:[{name:"datetime"}],attrLists:["cite-attr"]},{name:"DEL",selector:"del",attrs:[{name:"datetime"}],attrLists:["cite-attr"]},{name:"TABLE",selector:"table",attrs:[{name:"align"},{name:"bgcolor"},{name:"border",value:["0","1"]},{name:"cellpadding"},{name:"cellspacing"},{name:"width"}]},{name:"CAPTION",selector:"caption",attrs:[]},{name:"COLGROUP",selector:"colgroup",attrs:[{name:"span"}]},{name:"COL",selector:"col",attrs:[{name:"span"}]},{name:"TBODY",selector:"tbody",attrs:[]},{name:"THEAD",selector:"thead",attrs:[]},{name:"TFOOT",selector:"tfoot",attrs:[]},{name:"TR",selector:"tr",attrs:[{name:"align"},{name:"bgcolor"},{name:"height"},{name:"valign"}]},{name:"TD",selector:"td",attrs:[{name:"align"},{name:"bgcolor"},{name:"colspan"},{name:"headers"},{name:"height"},{name:"rowspan"},{name:"valign"},{name:"width"}]},{name:"TH",selector:"th",attrs:[{name:"abbr"},{name:"align"},{name:"bgcolor"},{name:"colspan"},{name:"headers"},{name:"height"},{name:"rowspan"},{name:"scope"},{name:"valign"},{name:"width"}]},{name:"FORM",selector:"form",requiresExtension:["amp-form"],attrs:[{name:"accept"},{name:"accept-charset"},{name:"action-xhr",valueUrl:{protocol:["https"],allowRelative:!1},disallowedValueRegex:"__amp_source_origin|{{|}}"},{name:"autocomplete"},{name:"custom-validation-reporting",value:["as-you-go","interact-and-submit","show-all-on-submit","show-first-on-submit"]},{name:"enctype"},{name:"method",value:["get"]},{name:"novalidate"},{name:"xssi-prefix"}]},{name:"LABEL",selector:"label",attrs:[{name:"for"}]},{name:"INPUT",selector:"input",attrs:[{name:"type",disallowedValueRegex:"(^|\\s)(file|image|password|)(\\s|$)"}],attrLists:["input-common-attr","name-attr"]},{name:"BUTTON",selector:"button",attrs:[{name:"disabled",value:[""]},{name:"role"},{name:"tabindex"},{name:"type"},{name:"value"},{name:"[disabled]"},{name:"[value]"}],attrLists:["name-attr"]},{name:"SELECT",selector:"select",attrs:[{name:"disabled"},{name:"multiple"},{name:"required"},{name:"size"},{name:"[disabled]"},{name:"[multiple]"},{name:"[required]"},{name:"[size]"}],attrLists:["name-attr"]},{name:"DATALIST",selector:"datalist",attrs:[]},{name:"OPTGROUP",selector:"optgroup",requiredParent:"SELECT",attrs:[{name:"disabled"},{name:"label"},{name:"[disabled]"},{name:"[label]"}]},{name:"OPTION",selector:"option",attrs:[{name:"disabled"},{name:"label"},{name:"selected"},{name:"value"},{name:"[disabled]"},{name:"[label]"},{name:"[selected]"},{name:"[value]"}]},{name:"TEXTAREA",selector:"textarea",attrs:[{name:"autocomplete"},{name:"autoexpand"},{name:"cols"},{name:"disabled"},{name:"maxlength"},{name:"minlength"},{name:"pattern"},{name:"placeholder"},{name:"readonly"},{name:"required"},{name:"rows"},{name:"spellcheck"},{name:"wrap"},{name:"[autocomplete]"},{name:"[cols]"},{name:"[defaulttext]"},{name:"[disabled]"},{name:"[maxlength]"},{name:"[minlength]"},{name:"[pattern]"},{name:"[placeholder]"},{name:"[readonly]"},{name:"[required]"},{name:"[rows]"},{name:"[spellcheck]"},{name:"[wrap]"}],attrLists:["name-attr"]},{name:"OUTPUT",selector:"output",attrs:[{name:"for"},{name:"form"}],attrLists:["name-attr"]},{name:"PROGRESS",selector:"progress",attrs:[{name:"max"},{name:"value"}]},{name:"METER",selector:"meter",attrs:[{name:"high"},{name:"low"},{name:"max"},{name:"min"},{name:"optimum"},{name:"value"}]},{name:"FIELDSET",selector:"fieldset",attrs:[{name:"disabled"},{name:"[disabled]"}],attrLists:["name-attr"]},{name:"LEGEND",selector:"legend",attrs:[]},{name:"DETAILS",selector:"details",attrs:[{name:"open",value:[""]},{name:"[open]"}]},{name:"SUMMARY",selector:"summary",requiredParent:"DETAILS",attrs:[]},{name:"AMP-IMG",selector:"amp-img",attrs:[{name:"alt"},{name:"attribution"},{name:"placeholder"},{name:"[alt]"},{name:"[attribution]"},{name:"layout",value:["responsive","fill","fixed","fixed_height","flex_item","intrinsic","nodisplay"],required:!0}],attrLists:["extended-amp-global","mandatory-src-amp4email","$AMP_LAYOUT_ATTRS"]},{name:"AMP-LAYOUT",selector:"amp-layout",attrs:[{name:"layout",value:["responsive","fill","fixed","fixed_height","flex_item","intrinsic","nodisplay","container"],required:!0}],attrLists:["extended-amp-global","$AMP_LAYOUT_ATTRS"]},{name:"SCRIPT",selector:"script[custom-element='amp-accordion']",attrs:[{name:"custom-element",value:["amp-accordion"],required:!0},{name:"src",value:["https://cdn.ampproject.org/v0/amp-accordion-0.1.js"],required:!0}],attrLists:["common-extension-attrs"]},{name:"AMP-ACCORDION",selector:"amp-accordion",requiresExtension:["amp-accordion"],attrs:[{name:"animate",value:[""]},{name:"expand-single-section",value:[""]},{name:"layout",value:["container"],required:!0}],attrLists:["extended-amp-global","$AMP_LAYOUT_ATTRS"]},{name:"SCRIPT",selector:"script[custom-element='amp-anim']",attrs:[{name:"custom-element",value:["amp-anim"],required:!0},{name:"src",value:["https://cdn.ampproject.org/v0/amp-anim-0.1.js"],required:!0}],attrLists:["common-extension-attrs"]},{name:"AMP-ANIM",selector:"amp-anim",requiresExtension:["amp-anim"],attrs:[{name:"alt"},{name:"attribution"},{name:"layout",value:["responsive","fill","fixed","fixed_height","flex_item","nodisplay"],required:!0}],attrLists:["extended-amp-global","mandatory-src-amp4email","$AMP_LAYOUT_ATTRS"]},{name:"SCRIPT",selector:"script[custom-element='amp-autocomplete']",attrs:[{name:"custom-element",value:["amp-autocomplete"],required:!0},{name:"src",value:["https://cdn.ampproject.org/v0/amp-autocomplete-0.1.js"],required:!0}],attrLists:["common-extension-attrs"]},{name:"AMP-AUTOCOMPLETE",selector:"amp-autocomplete",requiresExtension:["amp-autocomplete"],attrs:[{name:"highlight-user-entry"},{name:"inline"},{name:"items"},{name:"max-items"},{name:"min-characters"},{name:"prefetch"},{name:"query"},{name:"submit-on-enter"},{name:"suggest-first"},{name:"src",valueUrl:{protocol:["https"],allowRelative:!1},required:!0,disallowedValueRegex:"__amp_source_origin|{{|}}"},{name:"template"},{name:"layout",value:["container"],required:!0}],attrLists:["extended-amp-global","$AMP_LAYOUT_ATTRS"]},{name:"SCRIPT",selector:"script[custom-element='amp-bind']",attrs:[{name:"custom-element",value:["amp-bind"],required:!0},{name:"src",value:["https://cdn.ampproject.org/v0/amp-bind-0.1.js"],required:!0}],attrLists:["common-extension-attrs"]},{name:"AMP-STATE",selector:"amp-state",requiresExtension:["amp-bind"],attrs:[],attrLists:["mandatory-id-attr"]},{name:"AMP-BIND-MACRO",selector:"amp-bind-macro",requiresExtension:["amp-bind"],attrs:[{name:"arguments"},{name:"expression",required:!0}],attrLists:["mandatory-id-attr"]},{name:"SCRIPT",selector:"script[custom-element='amp-carousel']",attrs:[{name:"custom-element",value:["amp-carousel"],required:!0},{name:"src",value:["https://cdn.ampproject.org/v0/amp-carousel-0.1.js"],required:!0}],attrLists:["common-extension-attrs"]},{name:"AMP-CAROUSEL",selector:"amp-carousel",requiresExtension:["amp-carousel"],attrs:[{name:"layout",value:["responsive","fill","fixed","fixed_height","flex_item","intrinsic","nodisplay"],required:!0}],attrLists:["amp-carousel-common","extended-amp-global","$AMP_LAYOUT_ATTRS"]},{name:"SCRIPT",selector:"script[custom-element='amp-fit-text']",attrs:[{name:"custom-element",value:["amp-fit-text"],required:!0},{name:"src",value:["https://cdn.ampproject.org/v0/amp-fit-text-0.1.js"],required:!0}],attrLists:["common-extension-attrs"]},{name:"AMP-FIT-TEXT",selector:"amp-fit-text",requiresExtension:["amp-fit-text"],attrs:[{name:"max-font-size"},{name:"min-font-size"},{name:"layout",value:["responsive","fill","fixed","fixed_height","flex_item","intrinsic","nodisplay"],required:!0}],attrLists:["extended-amp-global","$AMP_LAYOUT_ATTRS"]},{name:"SCRIPT",selector:"script[custom-element='amp-form']",attrs:[{name:"custom-element",value:["amp-form"],required:!0},{name:"src",value:["https://cdn.ampproject.org/v0/amp-form-0.1.js"],required:!0}],attrLists:["common-extension-attrs"]},{name:"SCRIPT",selector:"script[custom-element='amp-image-lightbox']",deprecation:"amp-image-lightbox cannot be properly positioned in emails and will soon be invalid in AMP4EMAIL.",attrs:[{name:"custom-element",value:["amp-image-lightbox"],required:!0},{name:"src",value:["https://cdn.ampproject.org/v0/amp-image-lightbox-0.1.js","https://cdn.ampproject.org/v0/amp-image-lightbox-latest.js"],required:!0}],attrLists:["common-extension-attrs"]},{name:"AMP-IMAGE-LIGHTBOX",selector:"amp-image-lightbox",requiresExtension:["amp-image-lightbox"],attrs:[{name:"controls"},{name:"layout",value:["nodisplay"],required:!0}],attrLists:["extended-amp-global","$AMP_LAYOUT_ATTRS"]},{name:"SCRIPT",selector:"script[custom-element='amp-lightbox']",deprecation:"amp-lightbox cannot be properly positioned in emails and will soon be invalid in AMP4EMAIL.",attrs:[{name:"custom-element",value:["amp-lightbox"],required:!0},{name:"src",value:["https://cdn.ampproject.org/v0/amp-lightbox-0.1.js","https://cdn.ampproject.org/v0/amp-lightbox-latest.js"],required:!0}],attrLists:["common-extension-attrs"]},{name:"AMP-LIGHTBOX",selector:"amp-lightbox",requiresExtension:["amp-lightbox"],attrs:[{name:"animate-in",value:["fade-in","fly-in-bottom","fly-in-top"]},{name:"controls"},{name:"from"},{name:"[open]"},{name:"layout",value:["nodisplay"],required:!0}],attrLists:["extended-amp-global","$AMP_LAYOUT_ATTRS"]},{name:"SCRIPT",selector:"script[custom-element='amp-list']",attrs:[{name:"custom-element",value:["amp-list"],required:!0},{name:"src",value:["https://cdn.ampproject.org/v0/amp-list-0.1.js"],required:!0}],attrLists:["common-extension-attrs"]},{name:"AMP-LIST",selector:"amp-list",requiresExtension:["amp-list"],attrs:[{name:"binding",value:["always","no","refresh","refresh-evaluate"]},{name:"diffable",value:[""]},{name:"items"},{name:"max-items"},{name:"single-item"},{name:"src",valueUrl:{protocol:["https"],allowRelative:!1},required:!0,disallowedValueRegex:"__amp_source_origin|{{|}}"},{name:"template"},{name:"xssi-prefix"},{name:"[is-layout-container]"},{name:"layout",value:["responsive","container","fill","fixed","fixed_height","flex_item","nodisplay"],required:!0}],attrLists:["extended-amp-global","$AMP_LAYOUT_ATTRS"]},{name:"SCRIPT",selector:"script[custom-template='amp-mustache']",attrs:[{name:"custom-template",value:["amp-mustache"],required:!0},{name:"src",value:["https://cdn.ampproject.org/v0/amp-mustache-0.1.js","https://cdn.ampproject.org/v0/amp-mustache-0.2.js"],required:!0}],attrLists:["common-extension-attrs"]},{name:"TEMPLATE",selector:"template",requiresExtension:["amp-mustache"],attrs:[{name:"id",disallowedValueRegex:"(^|\\s)(__amp_\\S*|__count__|__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__noSuchMethod__|__parent__|__proto__|__AMP_\\S*|\\$p|\\$proxy|acceptCharset|addEventListener|appendChild|assignedSlot|attachShadow|AMP|baseURI|checkValidity|childElementCount|childNodes|classList|className|clientHeight|clientLeft|clientTop|clientWidth|compareDocumentPosition|computedName|computedRole|contentEditable|createShadowRoot|enqueAction|firstChild|firstElementChild|getAnimations|getAttribute|getAttributeNS|getAttributeNode|getAttributeNodeNS|getBoundingClientRect|getClientRects|getDestinationInsertionPoints|getElementsByClassName|getElementsByTagName|getElementsByTagNameNS|getRootNode|hasAttribute|hasAttributeNS|hasAttributes|hasChildNodes|hasPointerCapture|i-amphtml-\\S*|innerHTML|innerText|inputMode|insertAdjacentElement|insertAdjacentHTML|insertAdjacentText|isContentEditable|isDefaultNamespace|isEqualNode|isSameNode|lastChild|lastElementChild|lookupNamespaceURI|namespaceURI|nextElementSibling|nextSibling|nodeName|nodeType|nodeValue|offsetHeight|offsetLeft|offsetParent|offsetTop|offsetWidth|outerHTML|outerText|ownerDocument|parentElement|parentNode|previousElementSibling|previousSibling|querySelector|querySelectorAll|releasePointerCapture|removeAttribute|removeAttributeNS|removeAttributeNode|removeChild|removeEventListener|replaceChild|reportValidity|requestPointerLock|scrollHeight|scrollIntoView|scrollIntoViewIfNeeded|scrollLeft|scrollWidth|setAttribute|setAttributeNS|setAttributeNode|setAttributeNodeNS|setPointerCapture|shadowRoot|styleMap|tabIndex|tagName|textContent|toString|valueOf|(webkit|ms|moz|o)dropzone|(webkit|moz|ms|o)MatchesSelector|(webkit|moz|ms|o)RequestFullScreen|(webkit|moz|ms|o)RequestFullscreen)(\\s|$)"},{name:"type",value:["amp-mustache"],required:!0}]},{name:"SCRIPT",selector:"script[custom-element='amp-selector']",attrs:[{name:"custom-element",value:["amp-selector"],required:!0},{name:"src",value:["https://cdn.ampproject.org/v0/amp-selector-0.1.js"],required:!0}],attrLists:["common-extension-attrs"]},{name:"AMP-SELECTOR",selector:"amp-selector",requiresExtension:["amp-selector"],attrs:[{name:"disabled",value:[""]},{name:"form"},{name:"keyboard-select-mode",value:["focus","none","select"]},{name:"multiple",value:[""]},{name:"[disabled]"},{name:"[selected]"},{name:"layout",value:["responsive","fill","fixed","fixed_height","nodisplay","container"],required:!0}],attrLists:["extended-amp-global","name-attr","$AMP_LAYOUT_ATTRS"]},{name:"$REFERENCE_POINT",selector:"amp-selector option",attrs:[{name:"disabled",value:[""]},{name:"option",required:!0},{name:"selected",value:[""]}]},{name:"$REFERENCE_POINT",selector:"amp-selector child",attrs:[]},{name:"SCRIPT",selector:"script[custom-element='amp-sidebar']",attrs:[{name:"custom-element",value:["amp-sidebar"],required:!0},{name:"src",value:["https://cdn.ampproject.org/v0/amp-sidebar-0.1.js"],required:!0}],attrLists:["common-extension-attrs"]},{name:"AMP-SIDEBAR",selector:"amp-sidebar",requiresExtension:["amp-sidebar"],attrs:[{name:"side",value:["left","right"]},{name:"layout",value:["nodisplay"],required:!0}],attrLists:["extended-amp-global","$AMP_LAYOUT_ATTRS"]},{name:"SCRIPT",selector:"script[custom-element='amp-timeago']",attrs:[{name:"custom-element",value:["amp-timeago"],required:!0},{name:"src",value:["https://cdn.ampproject.org/v0/amp-timeago-0.1.js"],required:!0}],attrLists:["common-extension-attrs"]},{name:"AMP-TIMEAGO",selector:"amp-timeago",requiresExtension:["amp-timeago"],attrs:[{name:"cutoff",valueRegex:"\\d+"},{name:"datetime",valueRegex:"\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?(Z|[+-][0-1][0-9]:[0-5][0-9])",required:!0},{name:"locale"},{name:"[datetime]"},{name:"[title]"},{name:"layout",value:["responsive","fixed","fixed_height"],required:!0}],attrLists:["extended-amp-global","$AMP_LAYOUT_ATTRS"]}],n=[{name:"cite-attr",attrs:[{name:"cite",valueUrl:{protocol:["http","https"],allowEmpty:!0},disallowedValueRegex:"__amp_source_origin"}]},{name:"input-common-attr",attrs:[{name:"accept"},{name:"accesskey"},{name:"autocomplete"},{name:"checked"},{name:"disabled"},{name:"height"},{name:"max"},{name:"maxlength"},{name:"min"},{name:"minlength"},{name:"multiple"},{name:"pattern"},{name:"placeholder"},{name:"readonly"},{name:"required"},{name:"size"},{name:"spellcheck"},{name:"step"},{name:"tabindex"},{name:"value"},{name:"width"},{name:"[autocomplete]"},{name:"[checked]"},{name:"[disabled]"},{name:"[height]"},{name:"[max]"},{name:"[maxlength]"},{name:"[min]"},{name:"[minlength]"},{name:"[multiple]"},{name:"[pattern]"},{name:"[placeholder]"},{name:"[readonly]"},{name:"[required]"},{name:"[size]"},{name:"[spellcheck]"},{name:"[step]"},{name:"[value]"},{name:"[width]"}]},{name:"amphtml-engine-attrs",attrs:[{name:"async",value:[""],required:!0},{name:"crossorigin",value:["anonymous"]},{name:"type",value:["text/javascript"]}]},{name:"mandatory-src-amp4email",attrs:[{name:"src",valueUrl:{protocol:["https"],allowRelative:!1},required:!0,disallowedValueRegex:"__amp_source_origin|(.|\\s){{|}}(.|\\s)|^{{.*[^}][^}]$|^[^{][^{].*}}$|^}}|{{$|{{#|{{/|{{\\^"}]},{name:"extended-amp-global",attrs:[{name:"i-amphtml-layout",value:["container","fill","fixed","fixed-height","flex-item","fluid","intrinsic","nodisplay","responsive"]},{name:"media"},{name:"noloading",value:[""]}]},{name:"$AMP_LAYOUT_ATTRS",attrs:[{name:"disable-inline-width"},{name:"height"},{name:"heights"},{name:"layout"},{name:"sizes"},{name:"width"},{name:"[height]"},{name:"[width]"}]},{name:"nonce-attr",attrs:[]},{name:"common-extension-attrs",attrs:[{name:"async",value:[""],required:!0},{name:"crossorigin",value:["anonymous"]},{name:"type",value:["text/javascript"]}]},{name:"mandatory-id-attr",attrs:[{name:"id",required:!0,disallowedValueRegex:"(^|\\s)(__amp_\\S*|__count__|__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__noSuchMethod__|__parent__|__proto__|__AMP_\\S*|\\$p|\\$proxy|acceptCharset|addEventListener|appendChild|assignedSlot|attachShadow|AMP|baseURI|checkValidity|childElementCount|childNodes|classList|className|clientHeight|clientLeft|clientTop|clientWidth|compareDocumentPosition|computedName|computedRole|contentEditable|createShadowRoot|enqueAction|firstChild|firstElementChild|getAnimations|getAttribute|getAttributeNS|getAttributeNode|getAttributeNodeNS|getBoundingClientRect|getClientRects|getDestinationInsertionPoints|getElementsByClassName|getElementsByTagName|getElementsByTagNameNS|getRootNode|hasAttribute|hasAttributeNS|hasAttributes|hasChildNodes|hasPointerCapture|i-amphtml-\\S*|innerHTML|innerText|inputMode|insertAdjacentElement|insertAdjacentHTML|insertAdjacentText|isContentEditable|isDefaultNamespace|isEqualNode|isSameNode|lastChild|lastElementChild|lookupNamespaceURI|namespaceURI|nextElementSibling|nextSibling|nodeName|nodeType|nodeValue|offsetHeight|offsetLeft|offsetParent|offsetTop|offsetWidth|outerHTML|outerText|ownerDocument|parentElement|parentNode|previousElementSibling|previousSibling|querySelector|querySelectorAll|releasePointerCapture|removeAttribute|removeAttributeNS|removeAttributeNode|removeChild|removeEventListener|replaceChild|reportValidity|requestPointerLock|scrollHeight|scrollIntoView|scrollIntoViewIfNeeded|scrollLeft|scrollWidth|setAttribute|setAttributeNS|setAttributeNode|setAttributeNodeNS|setPointerCapture|shadowRoot|styleMap|tabIndex|tagName|textContent|toString|valueOf|(webkit|ms|moz|o)dropzone|(webkit|moz|ms|o)MatchesSelector|(webkit|moz|ms|o)RequestFullScreen|(webkit|moz|ms|o)RequestFullscreen)(\\s|$)"}]},{name:"name-attr",attrs:[{name:"name",disallowedValueRegex:"(^|\\s)(__amp_\\S*|__count__|__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__noSuchMethod__|__parent__|__proto__|__AMP_\\S*|\\$p|\\$proxy|acceptCharset|addEventListener|appendChild|assignedSlot|attachShadow|baseURI|checkValidity|childElementCount|childNodes|classList|className|clientHeight|clientLeft|clientTop|clientWidth|compareDocumentPosition|computedName|computedRole|contentEditable|createShadowRoot|enqueAction|firstChild|firstElementChild|getAnimations|getAttribute|getAttributeNS|getAttributeNode|getAttributeNodeNS|getBoundingClientRect|getClientRects|getDestinationInsertionPoints|getElementsByClassName|getElementsByTagName|getElementsByTagNameNS|getRootNode|hasAttribute|hasAttributeNS|hasAttributes|hasChildNodes|hasPointerCapture|innerHTML|innerText|inputMode|insertAdjacentElement|insertAdjacentHTML|insertAdjacentText|isContentEditable|isDefaultNamespace|isEqualNode|isSameNode|lastChild|lastElementChild|lookupNamespaceURI|namespaceURI|nextElementSibling|nextSibling|nodeName|nodeType|nodeValue|offsetHeight|offsetLeft|offsetParent|offsetTop|offsetWidth|outerHTML|outerText|ownerDocument|parentElement|parentNode|previousElementSibling|previousSibling|querySelector|querySelectorAll|releasePointerCapture|removeAttribute|removeAttributeNS|removeAttributeNode|removeChild|removeEventListener|replaceChild|reportValidity|requestPointerLock|scrollHeight|scrollIntoView|scrollIntoViewIfNeeded|scrollLeft|scrollWidth|setAttribute|setAttributeNS|setAttributeNode|setAttributeNodeNS|setPointerCapture|shadowRoot|styleMap|tabIndex|tagName|textContent|toString|valueOf|(webkit|ms|moz|o)dropzone|(webkit|moz|ms|o)MatchesSelector|(webkit|moz|ms|o)RequestFullScreen|(webkit|moz|ms|o)RequestFullscreen)(\\s|$)"}]},{name:"$GLOBAL_ATTRS",attrs:[{name:"itemid"},{name:"itemprop"},{name:"itemref"},{name:"itemscope"},{name:"itemtype"},{name:"about"},{name:"content"},{name:"datatype"},{name:"inlist"},{name:"prefix"},{name:"property"},{name:"rel",disallowedValueRegex:"(^|\\s)(canonical|components|dns-prefetch|import|manifest|preconnect|preload|prerender|serviceworker|stylesheet|subresource)(\\s|$)"},{name:"resource"},{name:"rev"},{name:"style"},{name:"typeof"},{name:"vocab"},{name:"accesskey"},{name:"class"},{name:"dir"},{name:"draggable"},{name:"hidden",value:[""]},{name:"id",disallowedValueRegex:"(^|\\s)(__amp_\\S*|__count__|__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__noSuchMethod__|__parent__|__proto__|__AMP_\\S*|\\$p|\\$proxy|acceptCharset|addEventListener|appendChild|assignedSlot|attachShadow|AMP|baseURI|checkValidity|childElementCount|childNodes|classList|className|clientHeight|clientLeft|clientTop|clientWidth|compareDocumentPosition|computedName|computedRole|contentEditable|createShadowRoot|enqueAction|firstChild|firstElementChild|getAnimations|getAttribute|getAttributeNS|getAttributeNode|getAttributeNodeNS|getBoundingClientRect|getClientRects|getDestinationInsertionPoints|getElementsByClassName|getElementsByTagName|getElementsByTagNameNS|getRootNode|hasAttribute|hasAttributeNS|hasAttributes|hasChildNodes|hasPointerCapture|i-amphtml-\\S*|innerHTML|innerText|inputMode|insertAdjacentElement|insertAdjacentHTML|insertAdjacentText|isContentEditable|isDefaultNamespace|isEqualNode|isSameNode|lastChild|lastElementChild|lookupNamespaceURI|namespaceURI|nextElementSibling|nextSibling|nodeName|nodeType|nodeValue|offsetHeight|offsetLeft|offsetParent|offsetTop|offsetWidth|outerHTML|outerText|ownerDocument|parentElement|parentNode|previousElementSibling|previousSibling|querySelector|querySelectorAll|releasePointerCapture|removeAttribute|removeAttributeNS|removeAttributeNode|removeChild|removeEventListener|replaceChild|reportValidity|requestPointerLock|scrollHeight|scrollIntoView|scrollIntoViewIfNeeded|scrollLeft|scrollWidth|setAttribute|setAttributeNS|setAttributeNode|setAttributeNodeNS|setPointerCapture|shadowRoot|styleMap|tabIndex|tagName|textContent|toString|valueOf|(webkit|ms|moz|o)dropzone|(webkit|moz|ms|o)MatchesSelector|(webkit|moz|ms|o)RequestFullScreen|(webkit|moz|ms|o)RequestFullscreen)(\\s|$)"},{name:"lang"},{name:"slot"},{name:"tabindex"},{name:"title"},{name:"translate"},{name:"aria-activedescendant"},{name:"aria-atomic"},{name:"aria-autocomplete"},{name:"aria-busy"},{name:"aria-checked"},{name:"aria-controls"},{name:"aria-current"},{name:"aria-describedby"},{name:"aria-disabled"},{name:"aria-dropeffect"},{name:"aria-expanded"},{name:"aria-flowto"},{name:"aria-grabbed"},{name:"aria-haspopup"},{name:"aria-hidden"},{name:"aria-invalid"},{name:"aria-label"},{name:"aria-labelledby"},{name:"aria-level"},{name:"aria-live"},{name:"aria-modal"},{name:"aria-multiline"},{name:"aria-multiselectable"},{name:"aria-orientation"},{name:"aria-owns"},{name:"aria-posinset"},{name:"aria-pressed"},{name:"aria-readonly"},{name:"aria-relevant"},{name:"aria-required"},{name:"aria-selected"},{name:"aria-setsize"},{name:"aria-sort"},{name:"aria-valuemax"},{name:"aria-valuemin"},{name:"aria-valuenow"},{name:"aria-valuetext"},{name:"on"},{name:"role"},{name:"placeholder",value:[""]},{name:"fallback",value:[""]},{name:"overflow"},{name:"amp-access"},{name:"amp-access-behavior"},{name:"amp-access-hide"},{name:"amp-access-id"},{name:"amp-access-loader"},{name:"amp-access-loading"},{name:"amp-access-off"},{name:"amp-access-on"},{name:"amp-access-show"},{name:"amp-access-style"},{name:"amp-access-template"},{name:"i-amp-access-id"},{name:"validation-for"},{name:"visible-when-invalid",value:["badInput","customError","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort","typeMismatch","valueMissing"]},{name:"amp-fx",valueRegex:"(fade-in|fade-in-scroll|float-in-bottom|float-in-top|fly-in-bottom|fly-in-left|fly-in-right|fly-in-top|parallax)(\\s|fade-in|fade-in-scroll|float-in-bottom|float-in-top|fly-in-bottom|fly-in-left|fly-in-right|fly-in-top|parallax)*"},{name:"subscriptions-action"},{name:"subscriptions-actions",value:[""]},{name:"subscriptions-decorate"},{name:"subscriptions-dialog",value:[""]},{name:"subscriptions-display"},{name:"subscriptions-lang"},{name:"subscriptions-section",value:["actions","content","content-not-granted","loading"]},{name:"subscriptions-service"},{name:"subscriptions-google-rtc"},{name:"next-page-hide"},{name:"next-page-replace"},{name:"[aria-activedescendant]"},{name:"[aria-atomic]"},{name:"[aria-autocomplete]"},{name:"[aria-busy]"},{name:"[aria-checked]"},{name:"[aria-controls]"},{name:"[aria-describedby]"},{name:"[aria-disabled]"},{name:"[aria-dropeffect]"},{name:"[aria-expanded]"},{name:"[aria-flowto]"},{name:"[aria-grabbed]"},{name:"[aria-haspopup]"},{name:"[aria-hidden]"},{name:"[aria-invalid]"},{name:"[aria-label]"},{name:"[aria-labelledby]"},{name:"[aria-level]"},{name:"[aria-live]"},{name:"[aria-multiline]"},{name:"[aria-multiselectable]"},{name:"[aria-orientation]"},{name:"[aria-owns]"},{name:"[aria-posinset]"},{name:"[aria-pressed]"},{name:"[aria-readonly]"},{name:"[aria-relevant]"},{name:"[aria-required]"},{name:"[aria-selected]"},{name:"[aria-setsize]"},{name:"[aria-sort]"},{name:"[aria-valuemax]"},{name:"[aria-valuemin]"},{name:"[aria-valuenow]"},{name:"[aria-valuetext]"},{name:"[class]"},{name:"[hidden]"},{name:"[text]"},{name:"i-amphtml-binding",value:[""]},{name:"autoscroll"}]},{name:"amp-carousel-common",attrs:[{name:"autoplay",valueRegex:"(|[0-9]+)"},{name:"controls"},{name:"delay",valueRegex:"[0-9]+"},{name:"loop",value:[""]},{name:"slide",valueRegex:"[0-9]+"},{name:"type",value:["carousel","slides"]},{name:"[slide]"}]}],r=[{name:"amp-accordion",versions:["0.1"]},{name:"amp-anim",versions:["0.1"]},{name:"amp-autocomplete",versions:["0.1"]},{name:"amp-bind",versions:["0.1"]},{name:"amp-carousel",versions:["0.1"]},{name:"amp-fit-text",versions:["0.1"]},{name:"amp-form",versions:["0.1"]},{name:"amp-image-lightbox",versions:["0.1","latest"]},{name:"amp-lightbox",versions:["0.1","latest"]},{name:"amp-list",versions:["0.1"]},{name:"amp-mustache",versions:["0.1","0.2"]},{name:"amp-selector",versions:["0.1"]},{name:"amp-sidebar",versions:["0.1"]},{name:"amp-timeago",versions:["0.1"]}],m=[{name:"-moz-appearance"},{name:"-webkit-appearance"},{name:"-webkit-tap-highlight-color"},{name:"align-content"},{name:"align-items"},{name:"align-self"},{name:"appearance"},{name:"aspect-ratio"},{name:"azimuth"},{name:"background"},{name:"background-attachment"},{name:"background-blend-mode"},{name:"background-clip"},{name:"background-color"},{name:"background-image"},{name:"background-origin"},{name:"background-position"},{name:"background-repeat"},{name:"background-size"},{name:"border"},{name:"border-bottom"},{name:"border-bottom-color"},{name:"border-bottom-left-radius"},{name:"border-bottom-right-radius"},{name:"border-bottom-style"},{name:"border-bottom-width"},{name:"border-collapse"},{name:"border-color"},{name:"border-left"},{name:"border-left-color"},{name:"border-left-style"},{name:"border-left-width"},{name:"border-radius"},{name:"border-right"},{name:"border-right-color"},{name:"border-right-style"},{name:"border-right-width"},{name:"border-spacing"},{name:"border-style"},{name:"border-top"},{name:"border-top-color"},{name:"border-top-left-radius"},{name:"border-top-right-radius"},{name:"border-top-style"},{name:"border-top-width"},{name:"border-width"},{name:"bottom"},{name:"box-shadow"},{name:"box-sizing"},{name:"break-after"},{name:"break-before"},{name:"break-inside"},{name:"caption-side"},{name:"caret-color"},{name:"clear"},{name:"color"},{name:"color-adjust"},{name:"column-count"},{name:"column-fill"},{name:"column-gap"},{name:"column-rule"},{name:"column-rule-color"},{name:"column-rule-style"},{name:"column-rule-width"},{name:"column-span"},{name:"column-width"},{name:"columns"},{name:"counter-increment"},{name:"counter-reset"},{name:"cursor",value:["initial","pointer"]},{name:"direction"},{name:"display"},{name:"elevation"},{name:"empty-cells"},{name:"filter",valueRegex:"^ *((blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)\\(([^() ]*|(rgb|rgba|hsl|hsla)\\([^()]*\\))( +([^() ]*|(rgb|rgba|hsl|hsla)\\([^()]*\\)))*\\) *)*$"},{name:"flex"},{name:"flex-basis"},{name:"flex-direction"},{name:"flex-flow"},{name:"flex-grow"},{name:"flex-shrink"},{name:"flex-wrap"},{name:"float"},{name:"font"},{name:"font-family"},{name:"font-feature-settings"},{name:"font-kerning"},{name:"font-size"},{name:"font-size-adjust"},{name:"font-stretch"},{name:"font-style"},{name:"font-synthesis"},{name:"font-variant"},{name:"font-variant-alternates"},{name:"font-variant-caps"},{name:"font-variant-east-asian"},{name:"font-variant-ligatures"},{name:"font-variant-numeric"},{name:"font-variation-settings"},{name:"font-weight"},{name:"gap"},{name:"grid"},{name:"grid-area"},{name:"grid-auto-columns"},{name:"grid-auto-flow"},{name:"grid-auto-rows"},{name:"grid-column"},{name:"grid-column-end"},{name:"grid-column-start"},{name:"grid-row"},{name:"grid-row-end"},{name:"grid-row-start"},{name:"grid-template"},{name:"grid-template-areas"},{name:"grid-template-columns"},{name:"grid-template-rows"},{name:"height"},{name:"hyphens"},{name:"image-orientation"},{name:"image-resolution"},{name:"inline-size"},{name:"isolation"},{name:"justify-content"},{name:"justify-items"},{name:"justify-self"},{name:"left"},{name:"letter-spacing"},{name:"line-break"},{name:"line-height"},{name:"list-style"},{name:"list-style-position"},{name:"list-style-type"},{name:"margin"},{name:"margin-bottom"},{name:"margin-left"},{name:"margin-right"},{name:"margin-top"},{name:"max-height"},{name:"max-width"},{name:"min-height"},{name:"min-width"},{name:"mix-blend-mode"},{name:"object-fit"},{name:"object-position"},{name:"offset-distance"},{name:"opacity"},{name:"order"},{name:"outline"},{name:"outline-color"},{name:"outline-offset"},{name:"outline-style"},{name:"outline-width"},{name:"overflow"},{name:"overflow-wrap"},{name:"overflow-x"},{name:"overflow-y"},{name:"padding"},{name:"padding-bottom"},{name:"padding-left"},{name:"padding-right"},{name:"padding-top"},{name:"pause"},{name:"pause-after"},{name:"pause-before"},{name:"perspective"},{name:"perspective-origin"},{name:"pitch"},{name:"pitch-range"},{name:"place-items"},{name:"position"},{name:"quotes"},{name:"resize"},{name:"richness"},{name:"right"},{name:"row-gap"},{name:"speak"},{name:"speak-header"},{name:"speak-numeral"},{name:"speak-punctuation"},{name:"speech-rate"},{name:"stress"},{name:"table-layout"},{name:"text-align"},{name:"text-align-last"},{name:"text-combine-upright"},{name:"text-decoration"},{name:"text-decoration-color"},{name:"text-decoration-line"},{name:"text-decoration-skip"},{name:"text-decoration-style"},{name:"text-emphasis"},{name:"text-emphasis-color"},{name:"text-emphasis-position"},{name:"text-emphasis-style"},{name:"text-indent"},{name:"text-justify"},{name:"text-orientation"},{name:"text-overflow"},{name:"text-shadow"},{name:"text-transform"},{name:"text-underline-position"},{name:"top"},{name:"transform"},{name:"transform-box"},{name:"transform-origin"},{name:"transform-style"},{name:"transition",valueRegex:"^ *((initial|unset)|(((none|offset-distance|opacity|transform|visibility)( *(|-|\\+)([0-9]+|[0-9]*\\.[0-9]+)(e(|-|\\+)?[0-9]+)?(s|ms)( *(linear|(ease|ease-in|ease-out|ease-in-out|cubic-bezier\\( *(|-|\\+)([0-9]+|[0-9]*\\.[0-9]+)(e(|-|\\+)?[0-9]+)?(, *(|-|\\+)([0-9]+|[0-9]*\\.[0-9]+)(e(|-|\\+)?[0-9]+)?){3} *\\))|(step-start|step-end|steps\\( *(|-|\\+)[0-9]+(, *(jump-start|jump-end|jump-none|jump-both|start|end))? *\\)))( *(|-|\\+)([0-9]+|[0-9]*\\.[0-9]+)(e(|-|\\+)?[0-9]+)?(s|ms))?)?)?)(, *((none|offset-distance|opacity|transform|visibility)( *(|-|\\+)([0-9]+|[0-9]*\\.[0-9]+)(e(|-|\\+)?[0-9]+)?(s|ms)( *(linear|(ease|ease-in|ease-out|ease-in-out|cubic-bezier\\( *(|-|\\+)([0-9]+|[0-9]*\\.[0-9]+)(e(|-|\\+)?[0-9]+)?(, *(|-|\\+)([0-9]+|[0-9]*\\.[0-9]+)(e(|-|\\+)?[0-9]+)?){3} *\\))|(step-start|step-end|steps\\( *(|-|\\+)[0-9]+(, *(jump-start|jump-end|jump-none|jump-both|start|end))? *\\)))( *(|-|\\+)([0-9]+|[0-9]*\\.[0-9]+)(e(|-|\\+)?[0-9]+)?(s|ms))?)?)?))*)) *$"},{name:"transition-delay"},{name:"transition-duration"},{name:"transition-property",valueRegex:"^ *(initial|unset|(none|offset-distance|opacity|transform|visibility)(, *(none|offset-distance|opacity|transform|visibility))*) *$"},{name:"transition-timing-function"},{name:"unicode-bidi"},{name:"vertical-align"},{name:"visibility",value:["hidden","initial","visible"]},{name:"voice-family"},{name:"white-space"},{name:"width"},{name:"word-break"},{name:"word-spacing"},{name:"word-wrap"},{name:"writing-mode"},{name:"z-index",valueRegex:"([-+]?0)|([-+]?100)|([-+]?[1-9][0-9]?)"}],i={tags:a,attrLists:n,extensions:r,declarations:m};t.default=i});
2
2
 
3
- __emailmaker__.define("static/core/5afad425.js",["require","exports","module","static/core/5dc34752.js","static/core/281afc68.js","static/core/d8175c7f.js","vite/preload-helper"],function(R,C,Ae){const ge=R("./5dc34752.js"),d=R("./281afc68.js"),E=R("./d8175c7f.js");let G=R("vite/preload-helper");function D(e){let t=e.documentElement;return t||(t=e.createElement("html"),e.appendChild(t)),t}function P(e){let t=e.head;if(!t){t=e.createElement("head");const i=D(e);i.insertBefore(t,i.firstChild)}return t}function I(e){const t=Object.create(null),i=e.getAttributeNames();for(const r of i)t[r]=e.getAttribute(r);return t}function Y(e){for(const t of document.querySelectorAll("iframe"))if(t.contentDocument===e.ownerDocument)return t}function J(e){const t=P(e);if(!e.querySelector("style[amp4email-boilerplate]")){const i=e.createElement("style");i.setAttribute("amp4email-boilerplate",""),i.innerHTML="body{visibility:hidden}",t.prepend(i)}}function K(e){const t=e.querySelector("style[amp4email-boilerplate]");t&&t.remove()}var q="amp-custom";function Q(e,t){return`em-${e.replaceAll("-","_")}-${t.toLowerCase()}`}function H(e,t,i){for(const r of t)if(d.css.isStyleRule(r)){const l=r.selectorText.split(/\+>~/).flatMap(s=>s.trim().split(" "));if(l.length===1&&l[0].trim().startsWith(".em-")){for(const s of r.style)if(r.style.getPropertyPriority(s)==="important"){for(const o of e.querySelectorAll(r.selectorText))if(d.isHtmlElement(o)){const u=o.style;for(const c of[...u])if(c.startsWith(s)){const g=i(c,u.getPropertyValue(c)),w=o.getAttribute("class");o.setAttribute("class",w?`${g} ${w}`:g),u.removeProperty(c)}}}}}else d.css.isMediaRule(r)&&H(e,r.cssRules,i)}function U(e,t){const i=t.sheet;if(i){const s=new Set;H(e,i.cssRules,(o,u)=>{const c=Q(o,u),g=[...i.cssRules],w=`.${c} { ${o}: ${u} }`;return!g.find(v=>d.css.isStyleRule(v)&&v.selectorText===`.${c}`)&&!s.has(w)&&(s.add(w),t.innerHTML=`
3
+ __emailmaker__.define("static/core/454350da.js",["require","exports","module","static/core/5dc34752.js","static/core/c948c45f.js","static/core/34756b09.js","vite/preload-helper"],function(R,C,Ae){const ge=R("./5dc34752.js"),d=R("./c948c45f.js"),E=R("./34756b09.js");let G=R("vite/preload-helper");function D(e){let t=e.documentElement;return t||(t=e.createElement("html"),e.appendChild(t)),t}function P(e){let t=e.head;if(!t){t=e.createElement("head");const i=D(e);i.insertBefore(t,i.firstChild)}return t}function I(e){const t=Object.create(null),i=e.getAttributeNames();for(const r of i)t[r]=e.getAttribute(r);return t}function Y(e){for(const t of document.querySelectorAll("iframe"))if(t.contentDocument===e.ownerDocument)return t}function J(e){const t=P(e);if(!e.querySelector("style[amp4email-boilerplate]")){const i=e.createElement("style");i.setAttribute("amp4email-boilerplate",""),i.innerHTML="body{visibility:hidden}",t.prepend(i)}}function K(e){const t=e.querySelector("style[amp4email-boilerplate]");t&&t.remove()}var q="amp-custom";function Q(e,t){return`em-${e.replaceAll("-","_")}-${t.toLowerCase()}`}function H(e,t,i){for(const r of t)if(d.css.isStyleRule(r)){const l=r.selectorText.split(/\+>~/).flatMap(s=>s.trim().split(" "));if(l.length===1&&l[0].trim().startsWith(".em-")){for(const s of r.style)if(r.style.getPropertyPriority(s)==="important"){for(const o of e.querySelectorAll(r.selectorText))if(d.isHtmlElement(o)){const u=o.style;for(const c of[...u])if(c.startsWith(s)){const g=i(c,u.getPropertyValue(c)),w=o.getAttribute("class");o.setAttribute("class",w?`${g} ${w}`:g),u.removeProperty(c)}}}}}else d.css.isMediaRule(r)&&H(e,r.cssRules,i)}function U(e,t){const i=t.sheet;if(i){const s=new Set;H(e,i.cssRules,(o,u)=>{const c=Q(o,u),g=[...i.cssRules],w=`.${c} { ${o}: ${u} }`;return!g.find(v=>d.css.isStyleRule(v)&&v.selectorText===`.${c}`)&&!s.has(w)&&(s.add(w),t.innerHTML=`
4
4
  .${c} { ${o}: ${u} };
5
5
  ${t.innerHTML}`),c}),s.size&&(t.innerHTML=`
6
6
  ${[...s].join(`
@@ -1,7 +1,7 @@
1
- __emailmaker__.define("static/core/4797d4f7.js",["require","exports","module","static/core/5dc34752.js"],function(Ct,Et,nn){const on=Ct("./5dc34752.js");function x(t){const e=new Map;return t&&t.split(";").map(n=>n.trim()).filter(Boolean).forEach(n=>{const o=n.indexOf(":");if(o===-1)return;const r=n.slice(0,o).trim().toLowerCase(),i=n.slice(o+1).trim();r&&e.set(r,i)}),e}function R(t){return t.replace(/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])(?![0-9a-fA-F])/g,(e,n,o,r)=>`#${n}${n}${o}${o}${r}${r}`)}function P(t){return Array.from(t.entries()).filter(([,e])=>e!==""&&e!=null).map(([e,n])=>`${e}: ${R(n)};`).join(" ")}function E(t){const e=o=>{if(!o)return null;const r=/^(-?\d+(?:\.\d+)?)px$/.exec(o.trim());return r?Math.round(parseFloat(r[1])):/^0$/.test(o.trim())?0:null},n=t.get("padding");if(n){const o=n.trim().split(/\s+/);if(o.length===1){const r=e(o[0]);return{top:r,right:r,bottom:r,left:r}}if(o.length===2){const r=e(o[0]),i=e(o[1]);return{top:r,right:i,bottom:r,left:i}}if(o.length===3)return{top:e(o[0]),right:e(o[1]),bottom:e(o[2]),left:e(o[1])};if(o.length===4)return{top:e(o[0]),right:e(o[1]),bottom:e(o[2]),left:e(o[3])}}return{top:e(t.get("padding-top")),right:e(t.get("padding-right")),bottom:e(t.get("padding-bottom")),left:e(t.get("padding-left"))}}function T(t,e){return t==null&&e==null?null:(t??0)+(e??0)}function Pt(t,e){return{top:T(t.top,e.top),right:T(t.right,e.right),bottom:T(t.bottom,e.bottom),left:T(t.left,e.left)}}function Q(t,e,n){if(!e&&!n)return;const o=E(t),r=o.top??0,i=(o.right??0)+n,l=o.bottom??0,s=(o.left??0)+e;t.delete("padding"),t.delete("padding-top"),t.delete("padding-right"),t.delete("padding-bottom"),t.delete("padding-left"),t.set("padding",`${r}px ${i}px ${l}px ${s}px`)}function Mt(t){const e=t.top??0,n=t.right??0,o=t.bottom??0,r=t.left??0;return e===0&&n===0&&o===0&&r===0?"":`padding: ${e}px ${n}px ${o}px ${r}px;`}function L(t,e){if(t)return x(t.getAttribute("style")).get(e.toLowerCase())}function M(t){if(!t)return null;const e=t.getAttribute("width");if(e){const o=e.trim();if(/^\d+(\.\d+)?$/.test(o))return Math.round(parseFloat(o));const r=/^(\d+(?:\.\d+)?)px$/i.exec(o);if(r)return Math.round(parseFloat(r[1]))}const n=L(t,"width")??L(t,"max-width");if(n){const o=/^(\d+(?:\.\d+)?)px$/i.exec(n.trim());if(o)return Math.round(parseFloat(o[1]))}return null}function Ft(t,e){const n=M(t);if(n!=null)return n;const o=t.getAttribute("width")?.trim()??"",r=/^(\d+(?:\.\d+)?)%$/.exec(o);return r?Math.round(parseFloat(r[1])/100*e):e}function y(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Tt(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Lt=["font-family","font-size","font-weight","font-style","line-height","letter-spacing","color","direction","text-decoration","text-transform"];function Nt(...t){const e=new Map;return Lt.forEach(n=>{for(const o of t){const r=o?.get(n);if(r!=null&&r!==""){e.set(n,r);break}}}),e}function Bt(t){if(!t)return null;const e=/^(-?\d+(?:\.\d+)?)px$/i.exec(t.trim());return e?parseFloat(e[1]):null}function Rt(t){const e=t.get("line-height")?.trim();if(!e||e==="normal"||e==="inherit")return;const n=/^(-?\d+(?:\.\d+)?)px$/i.exec(e);if(n){t.set("line-height",`${Math.round(parseFloat(n[1]))}px`);return}const o=Bt(t.get("font-size"));if(o==null)return;const r=/^(\d+(?:\.\d+)?)%$/.exec(e);if(r){t.set("line-height",`${Math.round(o*parseFloat(r[1])/100)}px`);return}const i=/^(\d+(?:\.\d+)?)em$/i.exec(e);if(i){t.set("line-height",`${Math.round(o*parseFloat(i[1]))}px`);return}const l=/^(\d+(?:\.\d+)?)$/.exec(e);l&&t.set("line-height",`${Math.round(o*parseFloat(l[1]))}px`)}function zt(t){const e=t.get("letter-spacing")?.trim();e!=null&&(/^-?(?:\d+(?:\.\d+)?|\.\d+)/.test(e)||t.delete("letter-spacing"))}function Ht(t,e){[t,...Array.from(t.querySelectorAll("[style]"))].forEach(n=>{const o=n.getAttribute("style");if(!o||!o.toLowerCase().includes(e.toLowerCase()))return;const r=x(o);if(!r.has(e))return;r.delete(e);const i=P(r);i?n.setAttribute("style",i):n.removeAttribute("style")})}function qt(t){t.get("direction")?.trim().toLowerCase()==="ltr"&&t.delete("direction")}function It(...t){for(const e of t){const n=e?.get("text-align");if(n)return n}}function tt(t){const e=t?/^(\d+(?:\.\d+)?)px$/.exec(t.trim()):null;return e?Math.round(parseFloat(e[1])):null}function et(t,e){const n=tt(t.get(`margin-${e}`));if(n!=null)return n;const o=t.get("margin");if(!o)return null;const r=o.trim().split(/\s+/);return tt(r[e==="top"||r.length<3?0:2])}function jt(t){return et(t,"top")}function Ot(t){return et(t,"bottom")}var D={top:null,right:null,bottom:null,left:null};function Wt(){return{padPadding:{top:null,right:null,bottom:null,left:null},divFontSize:null,divLineHeight:null,divTextAlign:null,btnFontSize:null,btnLineHeight:null,btnWidthPerc:null,spacerHeight:null}}function G(t){if(!t)return null;const e=/^(-?\d+(?:\.\d+)?)px$/i.exec(t.trim());if(e)return Math.round(parseFloat(e[1]));const n=/^(-?\d+(?:\.\d+)?)$/.exec(t.trim());return n?Math.round(parseFloat(n[1])):null}function Dt(t){if(!t)return null;const e=/^(\d+(?:\.\d+)?)%$/.exec(t.trim());return e?Math.round(parseFloat(e[1])):null}function Gt(t){const e=t?.trim().toLowerCase();return e==="left"||e==="center"||e==="right"?e:null}function nt(t,e){let n=0;for(let o=e;o<t.length;o+=1)if(t[o]==="{")n+=1;else if(t[o]==="}"&&(n-=1,n===0))return o;return-1}function U(t,e){["top","right","bottom","left"].forEach(n=>{e[n]!=null&&(t[n]=e[n])})}function Ut(t){const e=x(t.replace(/!important/gi,"")),n=["padding","padding-top","padding-right","padding-bottom","padding-left"].some(o=>e.has(o));return{padding:n?E(e):{...D},hasPadding:n,fontSize:G(e.get("font-size")),lineHeight:G(e.get("line-height")),textAlign:Gt(e.get("text-align")),widthPerc:Dt(e.get("width")),height:G(e.get("height"))}}function Vt(t,e){const n=t.blocks.get(e);if(n)return n;const o=Wt();return t.blocks.set(e,o),o}function Zt(t,e,n){const o=/\.row-(\d+)\b/.exec(t);if(!o)return;const r=o[1],i=/\.column-(\d+)\b/.exec(t),l=/\.block-(\d+)\b/.exec(t);if(t.includes(".row-content")&&!i&&!l){if(e.hasPadding){const b=n.rowContentPadding.get(r)??{...D};U(b,e.padding),n.rowContentPadding.set(r,b)}return}if(i&&!l&&!t.includes(".row-content")){if(e.hasPadding){const b=`${r}|${i[1]}`,d=n.columnPadding.get(b)??{...D};U(d,e.padding),n.columnPadding.set(b,d)}return}if(!i||!l)return;const s=Vt(n,`${r}|${i[1]}|${l[1]}`),c=/td\.pad\s*>\s*div/.test(t)||/\bh[1-6]\b/.test(t),a=/\.button\b/.test(t),h=/\bspan\b/.test(t),f=/\.spacer_block\b/.test(t),g=/td\.pad\b/.test(t);if(f){e.height!=null&&(s.spacerHeight=e.height);return}if(c){e.fontSize!=null&&(s.divFontSize=e.fontSize),e.lineHeight!=null&&(s.divLineHeight=e.lineHeight),e.textAlign!=null&&(s.divTextAlign=e.textAlign);return}if(h){e.fontSize!=null&&(s.btnFontSize=e.fontSize),e.lineHeight!=null&&(s.btnLineHeight=e.lineHeight);return}if(a){e.widthPerc!=null&&(s.btnWidthPerc=e.widthPerc);return}g&&e.hasPadding&&U(s.padPadding,e.padding)}function Kt(t,e){let n=0;for(;n<t.length;){const o=t.indexOf("{",n);if(o===-1)break;const r=t.slice(n,o).trim(),i=nt(t,o);if(i===-1)break;const l=t.slice(o+1,i);if(!r.startsWith("@")){const s=Ut(l);r.split(",").forEach(c=>Zt(c.trim(),s,e))}n=i+1}}function Yt(t){const e={rowContentPadding:new Map,columnPadding:new Map,blocks:new Map},n=Array.from(t.querySelectorAll("style")).map(r=>r.textContent??"").join(`
2
- `);let o=0;for(;o<n.length;){const r=n.indexOf("@media",o);if(r===-1)break;const i=n.indexOf("{",r);if(i===-1)break;const l=n.slice(r,i),s=nt(n,i);if(s===-1)break;/max-width|max-device-width/i.test(l)&&Kt(n.slice(i+1,s),e),o=s+1}return e}function ot(t,e){if(!t)return[];const n=["top","right","bottom","left"],o=[];return n.forEach(r=>{const i=t[r];i!=null&&i!==(e[r]??0)&&o.push(`em-mob-padding_${r}-${i}`)}),o}function Xt(t){const e=/\bblock-(\d+)\b/.exec(t.getAttribute("class")??""),n=t.closest("td.column"),o=n?/\bcolumn-(\d+)\b/.exec(n.getAttribute("class")??""):null,r=t.closest("table.row"),i=r?/\brow-(\d+)\b/.exec(r.getAttribute("class")??""):null;return!i||!o||!e?null:`${i[1]}|${o[1]}|${e[1]}`}var Jt="em-show-td-mobile",Qt="em-show-td-desktop";function rt(t){const e=t.getAttribute("class")??"";return/\bdesktop_hide\b/.test(e)?"mobile":/\bmobile_hide\b/.test(e)?"desktop":"all"}function te(t){return t==="mobile"?{className:Jt,inlineStyle:"display: none;",wrapNonMso:!0}:t==="desktop"?{className:Qt,inlineStyle:"",wrapNonMso:!1}:{className:"",inlineStyle:"",wrapNonMso:!1}}var it="-apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif";function lt(t,e){if(!e)return null;const n=(t.get("font-style")??"").toLowerCase().includes("italic"),o=e.register(t.get("font-family"),t.get("font-weight"),n);return o?(t.set("font-family",o.fallback),o.emClass):null}function ee(t){const e=t.closest("table")?.getAttribute("cellpadding");if(e==null)return null;const n=parseInt(e.trim(),10);return Number.isFinite(n)?n:null}function st(t,e){const n=E(e),o=ee(t);return o==null?n:{top:n.top??o,right:n.right??o,bottom:n.bottom??o,left:n.left??o}}function at(t,e){return t==null?null:(e??0)+t}function ne(t){const e=t.top??0,n=t.right??0,o=t.bottom??0,r=t.left??0;return e===0&&n===0&&o===0&&r===0?"":`padding: ${e}px ${n}px ${o}px ${r}px;`}function ct(t,e,n){const o=n?.left??0,r=n?.right??0,i=n?.mobileLeft??o,l=n?.mobileRight??r,s=t.top??0,c=(t.right??0)+r,a=t.bottom??0,h=(t.left??0)+o,f=[],g=(b,d,w)=>{d!==w&&f.push(`em-mob-padding_${b}-${d}`)};return e?.top!=null&&g("top",e.top,s),e?.bottom!=null&&g("bottom",e.bottom,a),(e?.left!=null||i!==o)&&g("left",(e?.left??t.left??0)+i,h),(e?.right!=null||l!==r)&&g("right",(e?.right??t.right??0)+l,c),{style:ne({top:s,right:c,bottom:a,left:h}),classes:f}}function N(t,e,n=""){const o=[];t.align&&o.push(`align="${y(t.align)}"`),t.valign&&o.push(`valign="${y(t.valign)}"`),t.width&&o.push(`width="${y(t.width)}"`),t.height&&o.push(`height="${y(t.height)}"`),t.className&&o.push(`class="${y(t.className)}"`);let r=t.style??"";if(t.insetX&&(t.insetX.left||t.insetX.right)){const a=x(r);Q(a,t.insetX.left,t.insetX.right),r=P(a)}r&&o.push(`style="${y(r)}"`);const i=o.length?` ${o.join(" ")}`:"",l=["em-mob-width-100perc"];let s="";t.visibility==="desktop"?l.push("em-show-table-desktop"):t.visibility==="mobile"&&(l.push("em-show-table-mobile"),s=' style="display: none;"');const c=`<table cellpadding="0" cellspacing="0" border="0" width="100%" class="${l.join(" ")}"${s} em="atom"${n}><tr><td${i}>${e}</td></tr></table>`;return t.visibility==="mobile"?`<!--[if !mso]><!-->${c}<!--<![endif]-->`:c}function ut(t){return t.querySelector("td.pad")??t.querySelector("td")}function j(t,e){if(!e)return;const n=Xt(t);return n?e.blocks.get(n):void 0}function z(t,e,n,o){const r=ut(t),i=r?st(r,x(r.getAttribute("style"))):{top:null,right:null,bottom:null,left:null},l=i.top==null&&i.right==null&&i.bottom==null&&i.left==null,s=j(t,e);return ct(o&&l?o:i,s?.padPadding,n)}function oe(t){if(!t)return[];const e=[];return t.divFontSize!=null&&e.push(`em-mob-font_size-${t.divFontSize}px`),t.divLineHeight!=null&&e.push(`em-mob-line_height-${t.divLineHeight}px`),e}var O="p, h1, h2, h3, h4, h5, h6",dt="data-em-text-run",re=`${O}, [${dt}]`;function ie(t){const e=t;return t.nodeType===1&&e.querySelector(O)!=null}function le(t){return t.map(e=>e.textContent??"").join("").replace(/\u00a0/g," ").trim()!==""?!0:t.some(e=>{const n=e;return e.nodeType===1&&(n.matches("img")||n.querySelector("img")!=null)})}function se(t){const e=t.ownerDocument;if(!e)return;const n=o=>{let r=[];const i=()=>{const l=r;if(r=[],l.length===0||!le(l))return;const s=e.createElement("div");s.setAttribute(dt,""),o.insertBefore(s,l[0]),l.forEach(c=>s.appendChild(c))};Array.from(o.childNodes).forEach(l=>{if(l.nodeType===1&&l.matches(O)){i();return}if(ie(l)){i(),n(l);return}r.push(l)}),i()};n(t)}function ft(t,e){let n=t;for(;n;){const o=Array.from(n.classList).find(r=>r.startsWith("em-font-"));if(o)return o;if(n===e)return null;n=n.parentElement}return null}function ae(t,e){let n=t.parentElement;for(;n&&n!==e;){const o=x(n.getAttribute("style"));if(o.get("font-family")||o.get("font-size")||o.get("color"))return o;n=n.parentElement}return new Map}function ce(t,e,n,o,r){const i=ut(t);if(!i)return"";const l=x(i.getAttribute("style")),s=st(i,l),c=i.getAttribute("align")??void 0,a=j(t,e),h=oe(a);i.querySelector(O)&&se(i);let f=Array.from(i.querySelectorAll(re));if(f.length===0){const d=i.querySelector("div");d&&(d.textContent??"").trim()!==""?f=[d]:(i.textContent??"").trim()!==""&&(f=[i])}if(f.length===0)return"";const g=/\bheading_block\b/.test(t.getAttribute("class")??""),b=f.length;return f.map((d,w)=>{const m=x(d.getAttribute("style")),u=ae(d,i),p=Nt(m,u,l);g&&!p.get("font-weight")&&p.set("font-weight","700"),p.get("font-family")||p.set("font-family",it),Rt(p),zt(p),qt(p);const A=lt(p,n)??ft(d,i),_=It(m,u,l)??d.getAttribute("align")??c??"left",C=jt(m),$=Ot(m),k={top:T(C,w===0?s.top:null),right:s.right,bottom:T($,w===b-1?s.bottom:null),left:s.left};Ht(d,"word-break");const v=d.innerHTML.trim(),B=A?[...h,A]:h,H=`<div${B.length?` class="${B.join(" ")}"`:""} style="${P(p)}">${v}</div>`,{style:q,classes:I}=ct(k,{top:w===0?at(a?.padPadding.top,C):null,right:a?.padPadding.right??null,bottom:w===b-1?at(a?.padPadding.bottom,$):null,left:a?.padPadding.left??null},o),F=[...I];return a?.divTextAlign!=null&&F.push(`em-mob-text_align-${a.divTextAlign}`),N({align:_??void 0,style:q||void 0,className:F.length?F.join(" "):void 0,visibility:r},H)}).join(`
3
- `)}function ue(t,e,n,o){const r=t.querySelector("img");if(!r)return"";const i=r.getAttribute("src")??"";if(!i)return"";const l=r.getAttribute("alt")??"",s=r.getAttribute("width"),c=x(r.getAttribute("style")),a=r.closest('div[style*="max-width"]'),h=a?L(a,"max-width"):c.get("max-width"),f=new Map;f.set("display","block"),f.set("width","100%"),h&&f.set("max-width",h);const g=c.get("border-radius");g&&f.set("border-radius",g);const b=r.getAttribute("title")??"",d=`<img src="${y(i)}"${s?` width="${y(s)}"`:""} border="0" alt="${y(l)}"${b?` title="${y(b)}"`:""} style="${P(f)}">`,w=r.closest("a")?.getAttribute("href"),m=w?`<a href="${y(w)}" target="_blank">${d}</a>`:d,u=(t.querySelector(".alignment")??t.querySelector("[align]"))?.getAttribute("align")??"center",{style:p,classes:A}=z(t,e,n);return N({align:u,style:p||void 0,className:A.length?A.join(" "):void 0,visibility:o},m)}function V(t,e){for(const n of t){const o=L(n,e);if(o)return o}}function de(t,e){const n=t.querySelector("span.button");if(n)return n;if(x(e.getAttribute("style")).has("background-color"))return e;const o=Array.from(e.querySelectorAll("div, span")).find(r=>x(r.getAttribute("style")).has("background-color"));return o||(Array.from(e.children).find(r=>/^(?:div|span)$/i.test(r.tagName))??e)}function fe(t,e){let n=E(e);return n.top!=null&&n.right!=null&&n.bottom!=null&&n.left!=null||Array.from(t.querySelectorAll("span, div")).forEach(o=>{const r=E(x(o.getAttribute("style")));n={top:n.top??r.top,right:n.right??r.right,bottom:n.bottom??r.bottom,left:n.left??r.left}}),n}function he(t){const e=(t.get("width")??"").trim();if(e===""||e==="auto")return"";const n=/^(\d+(?:\.\d+)?)px$/.exec(e);return n?` width="${n[1]}"`:/^\d+(?:\.\d+)?%$/.test(e)?` width="${e}"`:""}function ge(t){const e=[],n=o=>{Array.from(o.childNodes).forEach(r=>{if(r.nodeType===Node.TEXT_NODE){e.push(Tt((r.textContent??"").replace(/\s+/g," ")));return}if(r instanceof Element){if(r.tagName.toLowerCase()==="br"){e.push("<br>");return}n(r)}})};return n(t),e.join("").replace(/ *<br> */g,"<br>").replace(/^(?:<br>)+|(?:<br>)+$/g,"").trim()||"Button"}function me(t,e,n,o,r){const i=t.querySelector("a[href]");if(!i)return"";const l=i.getAttribute("href")??"",s=de(t,i),c=x(s.getAttribute("style")),a=Array.from(s.querySelectorAll("span")),h=j(t,e),f=R(c.get("background-color")??"#1C52DC"),g=R(c.get("color")??"#FFFFFF"),b=c.get("border-radius")??"5px",d=c.get("font-size")??V(a,"font-size")??"16px",w=c.get("font-family")??it,m=c.get("font-weight")??V(a,"font-weight"),u=fe(s,c),p=u.top!=null||u.right!=null||u.bottom!=null||u.left!=null?`${u.top??0}px ${u.right??0}px ${u.bottom??0}px ${u.left??0}px`:"10px 20px",A=V(a,"line-height")??c.get("line-height")??`${parseInt(d,10)+12}px`,_=ge(s),C=new Map;f&&f!=="transparent"&&C.set("background-color",f),C.set("border-radius",b);const $=new Map;$.set("display","block"),$.set("font-family",w),m&&$.set("font-weight",m),$.set("color",g),$.set("font-size",d),$.set("line-height",A),$.set("padding",p),$.set("text-decoration","none"),c.get("white-space")==="nowrap"&&$.set("white-space","nowrap");const k=lt($,n)??ft(s,t),v=[];k&&v.push(k),h?.btnFontSize!=null&&v.push(`em-mob-font_size-${h.btnFontSize}px`),h?.btnLineHeight!=null&&v.push(`em-mob-line_height-${h.btnLineHeight}px`);const B=v.length?` class="${v.join(" ")}"`:"",H=h?.btnWidthPerc!=null?` class="em-mob-width-${h.btnWidthPerc}perc"`:"",q=`<table cellpadding="0" cellspacing="0" border="0"${he(c)}${H}><tr><td align="center" valign="middle"${f&&f!=="transparent"?` bgcolor="${y(R(f))}"`:""} style="${P(C)}"><a href="${y(l)}" target="_blank"${B} style="${P($)}">${_}</a></td></tr></table>`,I=(t.querySelector(".alignment")??t.querySelector("[align]"))?.getAttribute("align")??"center",{style:F,classes:W}=z(t,e,o,{top:10,right:null,bottom:10,left:null});return N({align:I,style:F||void 0,className:W.length?W.join(" "):void 0,visibility:r},q)}function pe(t,e,n,o){const r=t.querySelector(".divider_inner")??t.querySelector('td[style*="border-top"]'),i=L(r,"border-top")??"1px solid #BFBFBF",{style:l,classes:s}=z(t,e,n,{top:20,right:null,bottom:null,left:null});return N({height:"0",style:`${l}${l?" ":""}border-top: ${i};`,className:s.length?s.join(" "):void 0,visibility:o},"&nbsp;")}function be(t,e,n,o){const r=t.matches(".spacer_block")?t:t.querySelector(".spacer_block"),i=r?L(r,"height"):void 0,l=i?parseInt(i,10):NaN;if(!Number.isFinite(l)||l<=0)return"";const s=j(t,e),c=[];s?.spacerHeight!=null&&s.spacerHeight!==l&&c.push(`em-mob-height-${s.spacerHeight}px`);const{style:a,classes:h}=z(t,e,n);return c.push(...h),N({height:String(l),style:a||void 0,className:c.length?c.join(" "):void 0,visibility:o},"")}function we(t,e,n,o){const r=Array.from(t.querySelectorAll("a")).map(h=>{const f=h.getAttribute("href")??"",g=h.querySelector("img");if(!g)return"";const b=g.getAttribute("src")??"",d=g.getAttribute("width")??"40",w=g.getAttribute("alt")??"",m=g.getAttribute("title")??"",u=Math.round(parseFloat(d))||40,p=Math.round(parseFloat(g.getAttribute("height")??""))||null,A=p?` height="${p}"`:"",_=p?"":"height:auto;";return`<td><a href="${y(f)}" target="_blank"><img src="${y(b)}" width="${u}"${A} border="0" alt="${y(w)}"${m?` title="${y(m)}"`:""} style="display:block;${_}"></a></td>`}).filter(Boolean);if(r.length===0)return"";const i=r.reduce((h,f,g)=>(g>0&&h.push('<td width="5">&nbsp;</td>'),h.push(f),h),[]),l=(t.querySelector(".alignment")??t.querySelector("[align]"))?.getAttribute("align")??"center",s=`<table border="0" cellspacing="0" cellpadding="0"><tr>${i.join("")}</tr></table>`,{style:c,classes:a}=z(t,e,n);return N({align:l,style:c||void 0,className:a.length?a.join(" "):void 0,visibility:o},s,' em-type="social"')}function Z(t,e,n,o){const r=t.getAttribute("class")??"",i=rt(t);return/\bheading_block\b/.test(r)||/\bparagraph_block\b/.test(r)||/\btext_block\b/.test(r)?ce(t,e,n,o,i):/\bimage_block\b/.test(r)?ue(t,e,o,i):/\bbutton_block\b/.test(r)?me(t,e,n,o,i):/\bdivider_block\b/.test(r)?pe(t,e,o,i):/\bspacer_block\b/.test(r)?be(t,e,o,i):/\bsocial_block\b/.test(r)?we(t,e,o,i):""}function ye(t){const e=[];return Array.from(t.children).forEach(n=>{n.tagName.toLowerCase()==="tbody"?e.push(...Array.from(n.children)):e.push(n)}),e.filter(n=>n.tagName.toLowerCase()==="tr")}function ht(t){return ye(t).find(e=>/\bem-structure\b/.test(e.getAttribute("class")??""))??null}function xe(t){return/\brow-content\b/.test(t.getAttribute("class")??"")}function $e(t){return t.tagName.toLowerCase()!=="table"||t.getAttribute("em")!=="block"||xe(t)?!1:ht(t)!==null}function gt(t){const e=ht(t);if(!e)return null;const n=Array.from(e.children).filter(o=>o.tagName.toLowerCase()==="td");return n.length===0?null:`<tr em="block">${n.map(o=>o.outerHTML).join("")}</tr>`}var rn=".paragraph_block, .text_block, .heading_block, .image_block, .button_block, .divider_block, .spacer_block, .social_block";function Ae(t){return t.tagName.toLowerCase()==="table"&&/\brow-content\b/.test(t.getAttribute("class")??"")}function Se(t){return Ae(t)?"row-content":$e(t)?"em-block":t.matches(".paragraph_block, .text_block, .heading_block, .image_block, .button_block, .divider_block, .spacer_block, .social_block")?"beefree-block":null}function K(t){return(t.textContent??"").trim()!==""||t.querySelector("img")!==null}function ke(t){return t.tagName.toLowerCase()!=="table"?!1:K(t)}function mt(t,e){return(t.getAttribute("class")??"").split(/\s+/).includes(e)}function ve(t){return t.tagName.toLowerCase()==="table"&&(mt(t,"row")||mt(t,"row-content"))}function _e(t,e){let n=e;for(;n&&n.parentElement!==t;)n=n.parentElement;return n}function Ce(t){if(t)for(let e=0;e<8;e+=1){const n=new Map;let o=!1;if(Array.from(t.querySelectorAll("table")).forEach(r=>{if(!ve(r)||!r.parentElement?.closest("table.row-content"))return;const i=_e(t,r);!i||i===r||((n.get(i)??i).insertAdjacentElement("afterend",r),n.set(i,r),o=!0)}),!o)return}}function Ee(t){const e=[];if(!t)return e;const n=o=>{if(o.matches(".preheader"))return;const r=Se(o);if(r){e.push({kind:r,element:o});return}const i=e.length;Array.from(o.children).forEach(n),e.length===i&&ke(o)&&e.push({kind:"unknown",element:o})};return Array.from(t.children).forEach(n),e}var Pe=/^\.(em-mob-[A-Za-z0-9_-]+)$/,pt=/([^{}]+)\{([^{}]*)\}/g;function Me(t){return t.split(";").map(e=>e.trim()).filter(e=>e!=="").map(e=>` ${e};`).join(`
4
- `)}function Fe(t){const e=new Map;return t.querySelectorAll('style[em="styles"]').forEach(n=>{const o=n.textContent??"";let r;for(pt.lastIndex=0;(r=pt.exec(o))!==null;){const i=r[1].trim(),l=Pe.exec(i);if(!l||e.has(l[1]))continue;const s=Me(r[2]);s!==""&&e.set(l[1],s)}}),e}var bt={Thin:"100","Thin Italic":"100i",ExtraLight:"200","ExtraLight Italic":"200i",Light:"300","Light Italic":"300i",Regular:"400","Regular Italic":"400i",Medium:"500","Medium Italic":"500i",SemiBold:"600","SemiBold Italic":"600i",Bold:"700","Bold Italic":"700i",ExtraBold:"800","ExtraBold Italic":"800i",Black:"900","Black Italic":"900i"},Te={"Sans Serif":"sans-serif",Serif:"serif"},Le={100:"Thin",200:"ExtraLight",300:"Light",400:"Regular",500:"Medium",600:"SemiBold",700:"Bold",800:"ExtraBold",900:"Black"};function Y(t){return t.replace(/\s+/g," ").trim().toLowerCase()}function wt(t){return(t.split(",")[0]??"").trim().replace(/^['"]/,"").replace(/['"]$/,"").trim()}function yt(t){const e=t.split(",").map(n=>n.trim().replace(/^['"]|['"]$/g,"").toLowerCase());return e.includes("serif")&&!e.includes("sans-serif")?"Serif":"Sans Serif"}function xt(t,e){let n=(t??"").trim().toLowerCase();n==="bold"?n="700":(n==="normal"||n==="")&&(n="400");const o=Le[n]??"Regular";return e?`${o} Italic`:o}function Ne(t,e){return`em-font-${t.replace(/\s/g,"")}-${e.replace(/\s/g,"")}`}function $t(t){const e=[],n=t.split("?")[1];return n&&n.split("&").forEach(o=>{const r=o.indexOf("=");if(r===-1)return;const i=o.slice(0,r),l=o.slice(r+1);if(i!=="family"||!l)return;let s=l;try{s=decodeURIComponent(l.replace(/\+/g," "))}catch{s=l.replace(/\+/g," ")}s.split("|").forEach(c=>{const a=c.split(":")[0].trim();a&&e.push(a)})}),e}function Be(t){const e=new Set;t.querySelectorAll("link[href]").forEach(o=>{const r=o.getAttribute("href")??"";r.includes("fonts.googleapis.com")&&$t(r).forEach(i=>e.add(Y(i)))});const n=/@import\s+(?:url\(\s*)?['"]?(https?:\/\/fonts\.googleapis\.com\/[^'")\s]+)/g;return t.querySelectorAll("style").forEach(o=>{const r=o.textContent??"";let i;for(;(i=n.exec(r))!==null;)$t(i[1]).forEach(l=>e.add(Y(l)))}),e}function Re(t,e){const n=new RegExp(`(?:^|;)\\s*${e}\\s*:([^;]+)`,"i").exec(t)?.[1];return n?n.replace(/!important/gi,"").trim():void 0}function ze(t){const e=new Map,n=/([^{}]+)\{([^{}]*)\}/g;t.querySelectorAll("style").forEach(r=>{const i=r.textContent??"";let l;for(n.lastIndex=0;(l=n.exec(i))!==null;){const s=l[2];l[1].split(",").forEach(c=>{const a=/^\s*\.(em-font-[A-Za-z0-9_-]+)\s*$/.exec(c);if(!a)return;const h=e.get(a[1])??new Map;["font-family","font-weight","font-style"].forEach(f=>{const g=Re(s,f);g&&h.set(f,g)}),e.set(a[1],h)})}});const o=new Map;return e.forEach((r,i)=>{const l=r.get("font-family"),s=l?wt(l):"";if(!l||!s)return;const c=(r.get("font-style")??"").toLowerCase().includes("italic");o.set(i,{emClass:i,family:s,variant:xt(r.get("font-weight"),c),category:yt(l)})}),o}var He=class{imported;emFontRules;used=new Map;constructor(t,e=new Map){this.imported=t,this.emFontRules=e}register(t,e,n=!1){if(!t)return null;const o=wt(t);if(!o||!this.imported.has(Y(o)))return null;const r=yt(t),i=xt(e,n),l=Ne(o,i);return this.used.has(l)||this.used.set(l,{emClass:l,family:o,variant:i,category:r}),{emClass:l,fallback:r==="Serif"?'"Times New Roman", Times, serif':"Helvetica, Arial, sans-serif"}}registerEmFontClasses(t){const e=/em-font-[A-Za-z0-9_-]+/g;let n;for(;(n=e.exec(t))!==null;){const o=this.emFontRules.get(n[0]);o&&!this.used.has(o.emClass)&&this.used.set(o.emClass,o)}}get hasFonts(){return this.used.size>0}linkTags(){return Array.from(this.used.values()).map(({emClass:t,family:e,variant:n})=>{const o=bt[n]??"400",r=o.includes("i"),i=o.replace(/i/g,"");return` <link rel="stylesheet" href="${`https://fonts.googleapis.com/css2?family=${e}:ital,wght@${r?"1":"0"},${i}&display=swap`}" em-class="${t}">`}).join(`
1
+ __emailmaker__.define("static/core/4852c0de.js",["require","exports","module","static/core/5dc34752.js"],function(Ct,Et,nn){const on=Ct("./5dc34752.js");function x(t){const e=new Map;return t&&t.split(";").map(n=>n.trim()).filter(Boolean).forEach(n=>{const o=n.indexOf(":");if(o===-1)return;const r=n.slice(0,o).trim().toLowerCase(),i=n.slice(o+1).trim();r&&e.set(r,i)}),e}function R(t){return t.replace(/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])(?![0-9a-fA-F])/g,(e,n,o,r)=>`#${n}${n}${o}${o}${r}${r}`)}function P(t){return Array.from(t.entries()).filter(([,e])=>e!==""&&e!=null).map(([e,n])=>`${e}: ${R(n)};`).join(" ")}function E(t){const e=o=>{if(!o)return null;const r=/^(-?\d+(?:\.\d+)?)px$/.exec(o.trim());return r?Math.round(parseFloat(r[1])):/^0$/.test(o.trim())?0:null},n=t.get("padding");if(n){const o=n.trim().split(/\s+/);if(o.length===1){const r=e(o[0]);return{top:r,right:r,bottom:r,left:r}}if(o.length===2){const r=e(o[0]),i=e(o[1]);return{top:r,right:i,bottom:r,left:i}}if(o.length===3)return{top:e(o[0]),right:e(o[1]),bottom:e(o[2]),left:e(o[1])};if(o.length===4)return{top:e(o[0]),right:e(o[1]),bottom:e(o[2]),left:e(o[3])}}return{top:e(t.get("padding-top")),right:e(t.get("padding-right")),bottom:e(t.get("padding-bottom")),left:e(t.get("padding-left"))}}function T(t,e){return t==null&&e==null?null:(t??0)+(e??0)}function Pt(t,e){return{top:T(t.top,e.top),right:T(t.right,e.right),bottom:T(t.bottom,e.bottom),left:T(t.left,e.left)}}function J(t,e,n){if(!e&&!n)return;const o=E(t),r=o.top??0,i=(o.right??0)+n,l=o.bottom??0,s=(o.left??0)+e;t.delete("padding"),t.delete("padding-top"),t.delete("padding-right"),t.delete("padding-bottom"),t.delete("padding-left"),t.set("padding",`${r}px ${i}px ${l}px ${s}px`)}function Ft(t){const e=t.top??0,n=t.right??0,o=t.bottom??0,r=t.left??0;return e===0&&n===0&&o===0&&r===0?"":`padding: ${e}px ${n}px ${o}px ${r}px;`}function L(t,e){if(t)return x(t.getAttribute("style")).get(e.toLowerCase())}function F(t){if(!t)return null;const e=t.getAttribute("width");if(e){const o=e.trim();if(/^\d+(\.\d+)?$/.test(o))return Math.round(parseFloat(o));const r=/^(\d+(?:\.\d+)?)px$/i.exec(o);if(r)return Math.round(parseFloat(r[1]))}const n=L(t,"width")??L(t,"max-width");if(n){const o=/^(\d+(?:\.\d+)?)px$/i.exec(n.trim());if(o)return Math.round(parseFloat(o[1]))}return null}function Mt(t,e){const n=F(t);if(n!=null)return n;const o=t.getAttribute("width")?.trim()??"",r=/^(\d+(?:\.\d+)?)%$/.exec(o);return r?Math.round(parseFloat(r[1])/100*e):e}function y(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Tt(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Lt=["font-family","font-size","font-weight","font-style","line-height","letter-spacing","color","direction","text-decoration","text-transform"];function Nt(...t){const e=new Map;return Lt.forEach(n=>{for(const o of t){const r=o?.get(n);if(r!=null&&r!==""){e.set(n,r);break}}}),e}function Bt(t){if(!t)return null;const e=/^(-?\d+(?:\.\d+)?)px$/i.exec(t.trim());return e?parseFloat(e[1]):null}function Rt(t){const e=t.get("line-height")?.trim();if(!e||e==="normal"||e==="inherit")return;const n=/^(-?\d+(?:\.\d+)?)px$/i.exec(e);if(n){t.set("line-height",`${Math.round(parseFloat(n[1]))}px`);return}const o=Bt(t.get("font-size"));if(o==null)return;const r=/^(\d+(?:\.\d+)?)%$/.exec(e);if(r){t.set("line-height",`${Math.round(o*parseFloat(r[1])/100)}px`);return}const i=/^(\d+(?:\.\d+)?)em$/i.exec(e);if(i){t.set("line-height",`${Math.round(o*parseFloat(i[1]))}px`);return}const l=/^(\d+(?:\.\d+)?)$/.exec(e);l&&t.set("line-height",`${Math.round(o*parseFloat(l[1]))}px`)}function zt(t){const e=t.get("letter-spacing")?.trim();e!=null&&(/^-?(?:\d+(?:\.\d+)?|\.\d+)/.test(e)||t.delete("letter-spacing"))}function Ht(t,e){[t,...Array.from(t.querySelectorAll("[style]"))].forEach(n=>{const o=n.getAttribute("style");if(!o||!o.toLowerCase().includes(e.toLowerCase()))return;const r=x(o);if(!r.has(e))return;r.delete(e);const i=P(r);i?n.setAttribute("style",i):n.removeAttribute("style")})}function qt(t){t.get("direction")?.trim().toLowerCase()==="ltr"&&t.delete("direction")}function It(...t){for(const e of t){const n=e?.get("text-align");if(n)return n}}function tt(t){const e=t?/^(\d+(?:\.\d+)?)px$/.exec(t.trim()):null;return e?Math.round(parseFloat(e[1])):null}function et(t,e){const n=tt(t.get(`margin-${e}`));if(n!=null)return n;const o=t.get("margin");if(!o)return null;const r=o.trim().split(/\s+/);return tt(r[e==="top"||r.length<3?0:2])}function jt(t){return et(t,"top")}function Ot(t){return et(t,"bottom")}var D={top:null,right:null,bottom:null,left:null};function Wt(){return{padPadding:{top:null,right:null,bottom:null,left:null},divFontSize:null,divLineHeight:null,divTextAlign:null,btnFontSize:null,btnLineHeight:null,btnWidthPerc:null,spacerHeight:null}}function G(t){if(!t)return null;const e=/^(-?\d+(?:\.\d+)?)px$/i.exec(t.trim());if(e)return Math.round(parseFloat(e[1]));const n=/^(-?\d+(?:\.\d+)?)$/.exec(t.trim());return n?Math.round(parseFloat(n[1])):null}function Dt(t){if(!t)return null;const e=/^(\d+(?:\.\d+)?)%$/.exec(t.trim());return e?Math.round(parseFloat(e[1])):null}function Gt(t){const e=t?.trim().toLowerCase();return e==="left"||e==="center"||e==="right"?e:null}function nt(t,e){let n=0;for(let o=e;o<t.length;o+=1)if(t[o]==="{")n+=1;else if(t[o]==="}"&&(n-=1,n===0))return o;return-1}function U(t,e){["top","right","bottom","left"].forEach(n=>{e[n]!=null&&(t[n]=e[n])})}function Ut(t){const e=x(t.replace(/!important/gi,"")),n=["padding","padding-top","padding-right","padding-bottom","padding-left"].some(o=>e.has(o));return{padding:n?E(e):{...D},hasPadding:n,fontSize:G(e.get("font-size")),lineHeight:G(e.get("line-height")),textAlign:Gt(e.get("text-align")),widthPerc:Dt(e.get("width")),height:G(e.get("height"))}}function Vt(t,e){const n=t.blocks.get(e);if(n)return n;const o=Wt();return t.blocks.set(e,o),o}function Zt(t,e,n){const o=/\.row-(\d+)\b/.exec(t);if(!o)return;const r=o[1],i=/\.column-(\d+)\b/.exec(t),l=/\.block-(\d+)\b/.exec(t);if(t.includes(".row-content")&&!i&&!l){if(e.hasPadding){const b=n.rowContentPadding.get(r)??{...D};U(b,e.padding),n.rowContentPadding.set(r,b)}return}if(i&&!l&&!t.includes(".row-content")){if(e.hasPadding){const b=`${r}|${i[1]}`,d=n.columnPadding.get(b)??{...D};U(d,e.padding),n.columnPadding.set(b,d)}return}if(!i||!l)return;const s=Vt(n,`${r}|${i[1]}|${l[1]}`),c=/td\.pad\s*>\s*div/.test(t)||/\bh[1-6]\b/.test(t),a=/\.button\b/.test(t),h=/\bspan\b/.test(t),f=/\.spacer_block\b/.test(t),g=/td\.pad\b/.test(t);if(f){e.height!=null&&(s.spacerHeight=e.height);return}if(c){e.fontSize!=null&&(s.divFontSize=e.fontSize),e.lineHeight!=null&&(s.divLineHeight=e.lineHeight),e.textAlign!=null&&(s.divTextAlign=e.textAlign);return}if(h){e.fontSize!=null&&(s.btnFontSize=e.fontSize),e.lineHeight!=null&&(s.btnLineHeight=e.lineHeight);return}if(a){e.widthPerc!=null&&(s.btnWidthPerc=e.widthPerc);return}g&&e.hasPadding&&U(s.padPadding,e.padding)}function Kt(t,e){let n=0;for(;n<t.length;){const o=t.indexOf("{",n);if(o===-1)break;const r=t.slice(n,o).trim(),i=nt(t,o);if(i===-1)break;const l=t.slice(o+1,i);if(!r.startsWith("@")){const s=Ut(l);r.split(",").forEach(c=>Zt(c.trim(),s,e))}n=i+1}}function Yt(t){const e={rowContentPadding:new Map,columnPadding:new Map,blocks:new Map},n=Array.from(t.querySelectorAll("style")).map(r=>r.textContent??"").join(`
2
+ `);let o=0;for(;o<n.length;){const r=n.indexOf("@media",o);if(r===-1)break;const i=n.indexOf("{",r);if(i===-1)break;const l=n.slice(r,i),s=nt(n,i);if(s===-1)break;/max-width|max-device-width/i.test(l)&&Kt(n.slice(i+1,s),e),o=s+1}return e}function ot(t,e){if(!t)return[];const n=["top","right","bottom","left"],o=[];return n.forEach(r=>{const i=t[r];i!=null&&i!==(e[r]??0)&&o.push(`em-mob-padding_${r}-${i}`)}),o}function Xt(t){const e=/\bblock-(\d+)\b/.exec(t.getAttribute("class")??""),n=t.closest("td.column"),o=n?/\bcolumn-(\d+)\b/.exec(n.getAttribute("class")??""):null,r=t.closest("table.row"),i=r?/\brow-(\d+)\b/.exec(r.getAttribute("class")??""):null;return!i||!o||!e?null:`${i[1]}|${o[1]}|${e[1]}`}var Qt="em-show-td-mobile",Jt="em-show-td-desktop";function rt(t){const e=t.getAttribute("class")??"";return/\bdesktop_hide\b/.test(e)?"mobile":/\bmobile_hide\b/.test(e)?"desktop":"all"}function te(t){return t==="mobile"?{className:Qt,inlineStyle:"display: none;",wrapNonMso:!0}:t==="desktop"?{className:Jt,inlineStyle:"",wrapNonMso:!1}:{className:"",inlineStyle:"",wrapNonMso:!1}}var it="-apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif";function lt(t,e){if(!e)return null;const n=(t.get("font-style")??"").toLowerCase().includes("italic"),o=e.register(t.get("font-family"),t.get("font-weight"),n);return o?(t.set("font-family",o.fallback),o.emClass):null}function ee(t){const e=t.closest("table")?.getAttribute("cellpadding");if(e==null)return null;const n=parseInt(e.trim(),10);return Number.isFinite(n)?n:null}function st(t,e){const n=E(e),o=ee(t);return o==null?n:{top:n.top??o,right:n.right??o,bottom:n.bottom??o,left:n.left??o}}function at(t,e){return t==null?null:(e??0)+t}function ne(t){const e=t.top??0,n=t.right??0,o=t.bottom??0,r=t.left??0;return e===0&&n===0&&o===0&&r===0?"":`padding: ${e}px ${n}px ${o}px ${r}px;`}function ct(t,e,n){const o=n?.left??0,r=n?.right??0,i=n?.mobileLeft??o,l=n?.mobileRight??r,s=t.top??0,c=(t.right??0)+r,a=t.bottom??0,h=(t.left??0)+o,f=[],g=(b,d,w)=>{d!==w&&f.push(`em-mob-padding_${b}-${d}`)};return e?.top!=null&&g("top",e.top,s),e?.bottom!=null&&g("bottom",e.bottom,a),(e?.left!=null||i!==o)&&g("left",(e?.left??t.left??0)+i,h),(e?.right!=null||l!==r)&&g("right",(e?.right??t.right??0)+l,c),{style:ne({top:s,right:c,bottom:a,left:h}),classes:f}}function N(t,e,n=""){const o=[];t.align&&o.push(`align="${y(t.align)}"`),t.valign&&o.push(`valign="${y(t.valign)}"`),t.width&&o.push(`width="${y(t.width)}"`),t.height&&o.push(`height="${y(t.height)}"`),t.className&&o.push(`class="${y(t.className)}"`);let r=t.style??"";if(t.insetX&&(t.insetX.left||t.insetX.right)){const a=x(r);J(a,t.insetX.left,t.insetX.right),r=P(a)}r&&o.push(`style="${y(r)}"`);const i=o.length?` ${o.join(" ")}`:"",l=["em-mob-width-100perc"];let s="";t.visibility==="desktop"?l.push("em-show-table-desktop"):t.visibility==="mobile"&&(l.push("em-show-table-mobile"),s=' style="display: none;"');const c=`<table cellpadding="0" cellspacing="0" border="0" width="100%" class="${l.join(" ")}"${s} em="atom"${n}><tr><td${i}>${e}</td></tr></table>`;return t.visibility==="mobile"?`<!--[if !mso]><!-->${c}<!--<![endif]-->`:c}function ut(t){return t.querySelector("td.pad")??t.querySelector("td")}function j(t,e){if(!e)return;const n=Xt(t);return n?e.blocks.get(n):void 0}function z(t,e,n,o){const r=ut(t),i=r?st(r,x(r.getAttribute("style"))):{top:null,right:null,bottom:null,left:null},l=i.top==null&&i.right==null&&i.bottom==null&&i.left==null,s=j(t,e);return ct(o&&l?o:i,s?.padPadding,n)}function oe(t){if(!t)return[];const e=[];return t.divFontSize!=null&&e.push(`em-mob-font_size-${t.divFontSize}px`),t.divLineHeight!=null&&e.push(`em-mob-line_height-${t.divLineHeight}px`),e}var O="p, h1, h2, h3, h4, h5, h6",dt="data-em-text-run",re=`${O}, [${dt}]`;function ie(t){const e=t;return t.nodeType===1&&e.querySelector(O)!=null}function le(t){return t.map(e=>e.textContent??"").join("").replace(/\u00a0/g," ").trim()!==""?!0:t.some(e=>{const n=e;return e.nodeType===1&&(n.matches("img")||n.querySelector("img")!=null)})}function se(t){const e=t.ownerDocument;if(!e)return;const n=o=>{let r=[];const i=()=>{const l=r;if(r=[],l.length===0||!le(l))return;const s=e.createElement("div");s.setAttribute(dt,""),o.insertBefore(s,l[0]),l.forEach(c=>s.appendChild(c))};Array.from(o.childNodes).forEach(l=>{if(l.nodeType===1&&l.matches(O)){i();return}if(ie(l)){i(),n(l);return}r.push(l)}),i()};n(t)}function ft(t,e){let n=t;for(;n;){const o=Array.from(n.classList).find(r=>r.startsWith("em-font-"));if(o)return o;if(n===e)return null;n=n.parentElement}return null}function ae(t,e){let n=t.parentElement;for(;n&&n!==e;){const o=x(n.getAttribute("style"));if(o.get("font-family")||o.get("font-size")||o.get("color"))return o;n=n.parentElement}return new Map}function ce(t,e,n,o,r){const i=ut(t);if(!i)return"";const l=x(i.getAttribute("style")),s=st(i,l),c=i.getAttribute("align")??void 0,a=j(t,e),h=oe(a);i.querySelector(O)&&se(i);let f=Array.from(i.querySelectorAll(re));if(f.length===0){const d=i.querySelector("div");d&&(d.textContent??"").trim()!==""?f=[d]:(i.textContent??"").trim()!==""&&(f=[i])}if(f.length===0)return"";const g=/\bheading_block\b/.test(t.getAttribute("class")??""),b=f.length;return f.map((d,w)=>{const m=x(d.getAttribute("style")),u=ae(d,i),p=Nt(m,u,l);g&&!p.get("font-weight")&&p.set("font-weight","700"),p.get("font-family")||p.set("font-family",it),Rt(p),zt(p),qt(p);const A=lt(p,n)??ft(d,i),_=It(m,u,l)??d.getAttribute("align")??c??"left",C=jt(m),$=Ot(m),k={top:T(C,w===0?s.top:null),right:s.right,bottom:T($,w===b-1?s.bottom:null),left:s.left};Ht(d,"word-break");const v=d.innerHTML.trim(),B=A?[...h,A]:h,H=`<div${B.length?` class="${B.join(" ")}"`:""} style="${P(p)}">${v}</div>`,{style:q,classes:I}=ct(k,{top:w===0?at(a?.padPadding.top,C):null,right:a?.padPadding.right??null,bottom:w===b-1?at(a?.padPadding.bottom,$):null,left:a?.padPadding.left??null},o),M=[...I];return a?.divTextAlign!=null&&M.push(`em-mob-text_align-${a.divTextAlign}`),N({align:_??void 0,style:q||void 0,className:M.length?M.join(" "):void 0,visibility:r},H)}).join(`
3
+ `)}function ue(t,e,n,o){const r=t.querySelector("img");if(!r)return"";const i=r.getAttribute("src")??"";if(!i)return"";const l=r.getAttribute("alt")??"",s=r.getAttribute("width"),c=x(r.getAttribute("style")),a=r.closest('div[style*="max-width"]'),h=a?L(a,"max-width"):c.get("max-width"),f=new Map;f.set("display","block"),f.set("width","100%"),h&&f.set("max-width",h);const g=c.get("border-radius");g&&f.set("border-radius",g);const b=r.getAttribute("title")??"",d=`<img src="${y(i)}"${s?` width="${y(s)}"`:""} border="0" alt="${y(l)}"${b?` title="${y(b)}"`:""} style="${P(f)}">`,w=r.closest("a")?.getAttribute("href"),m=w?`<a href="${y(w)}" target="_blank">${d}</a>`:d,u=(t.querySelector(".alignment")??t.querySelector("[align]"))?.getAttribute("align")??"center",{style:p,classes:A}=z(t,e,n);return N({align:u,style:p||void 0,className:A.length?A.join(" "):void 0,visibility:o},m)}function V(t,e){for(const n of t){const o=L(n,e);if(o)return o}}function de(t,e){const n=t.querySelector("span.button");if(n)return n;if(x(e.getAttribute("style")).has("background-color"))return e;const o=Array.from(e.querySelectorAll("div, span")).find(r=>x(r.getAttribute("style")).has("background-color"));return o||(Array.from(e.children).find(r=>/^(?:div|span)$/i.test(r.tagName))??e)}function fe(t,e){let n=E(e);return n.top!=null&&n.right!=null&&n.bottom!=null&&n.left!=null||Array.from(t.querySelectorAll("span, div")).forEach(o=>{const r=E(x(o.getAttribute("style")));n={top:n.top??r.top,right:n.right??r.right,bottom:n.bottom??r.bottom,left:n.left??r.left}}),n}function he(t){const e=(t.get("width")??"").trim();if(e===""||e==="auto")return"";const n=/^(\d+(?:\.\d+)?)px$/.exec(e);return n?` width="${n[1]}"`:/^\d+(?:\.\d+)?%$/.test(e)?` width="${e}"`:""}function ge(t){const e=[],n=o=>{Array.from(o.childNodes).forEach(r=>{if(r.nodeType===Node.TEXT_NODE){e.push(Tt((r.textContent??"").replace(/\s+/g," ")));return}if(r instanceof Element){if(r.tagName.toLowerCase()==="br"){e.push("<br>");return}n(r)}})};return n(t),e.join("").replace(/ *<br> */g,"<br>").replace(/^(?:<br>)+|(?:<br>)+$/g,"").trim()||"Button"}function me(t,e,n,o,r){const i=t.querySelector("a[href]");if(!i)return"";const l=i.getAttribute("href")??"",s=de(t,i),c=x(s.getAttribute("style")),a=Array.from(s.querySelectorAll("span")),h=j(t,e),f=R(c.get("background-color")??"#1C52DC"),g=R(c.get("color")??"#FFFFFF"),b=c.get("border-radius")??"5px",d=c.get("font-size")??V(a,"font-size")??"16px",w=c.get("font-family")??it,m=c.get("font-weight")??V(a,"font-weight"),u=fe(s,c),p=u.top!=null||u.right!=null||u.bottom!=null||u.left!=null?`${u.top??0}px ${u.right??0}px ${u.bottom??0}px ${u.left??0}px`:"10px 20px",A=V(a,"line-height")??c.get("line-height")??`${parseInt(d,10)+12}px`,_=ge(s),C=new Map;f&&f!=="transparent"&&C.set("background-color",f),C.set("border-radius",b);const $=new Map;$.set("display","block"),$.set("font-family",w),m&&$.set("font-weight",m),$.set("color",g),$.set("font-size",d),$.set("line-height",A),$.set("padding",p),$.set("text-decoration","none"),c.get("white-space")==="nowrap"&&$.set("white-space","nowrap");const k=lt($,n)??ft(s,t),v=[];k&&v.push(k),h?.btnFontSize!=null&&v.push(`em-mob-font_size-${h.btnFontSize}px`),h?.btnLineHeight!=null&&v.push(`em-mob-line_height-${h.btnLineHeight}px`);const B=v.length?` class="${v.join(" ")}"`:"",H=h?.btnWidthPerc!=null?` class="em-mob-width-${h.btnWidthPerc}perc"`:"",q=`<table cellpadding="0" cellspacing="0" border="0"${he(c)}${H}><tr><td align="center" valign="middle"${f&&f!=="transparent"?` bgcolor="${y(R(f))}"`:""} style="${P(C)}"><a href="${y(l)}" target="_blank"${B} style="${P($)}">${_}</a></td></tr></table>`,I=(t.querySelector(".alignment")??t.querySelector("[align]"))?.getAttribute("align")??"center",{style:M,classes:W}=z(t,e,o,{top:10,right:null,bottom:10,left:null});return N({align:I,style:M||void 0,className:W.length?W.join(" "):void 0,visibility:r},q)}function pe(t,e,n,o){const r=t.querySelector(".divider_inner")??t.querySelector('td[style*="border-top"]'),i=L(r,"border-top")??"1px solid #BFBFBF",{style:l,classes:s}=z(t,e,n,{top:20,right:null,bottom:null,left:null});return N({height:"0",style:`${l}${l?" ":""}border-top: ${i};`,className:s.length?s.join(" "):void 0,visibility:o},"&nbsp;")}function be(t,e,n,o){const r=t.matches(".spacer_block")?t:t.querySelector(".spacer_block"),i=r?L(r,"height"):void 0,l=i?parseInt(i,10):NaN;if(!Number.isFinite(l)||l<=0)return"";const s=j(t,e),c=[];s?.spacerHeight!=null&&s.spacerHeight!==l&&c.push(`em-mob-height-${s.spacerHeight}px`);const{style:a,classes:h}=z(t,e,n);return c.push(...h),N({height:String(l),style:a||void 0,className:c.length?c.join(" "):void 0,visibility:o},"")}function we(t,e,n,o){const r=Array.from(t.querySelectorAll("a")).map(h=>{const f=h.getAttribute("href")??"",g=h.querySelector("img");if(!g)return"";const b=g.getAttribute("src")??"",d=g.getAttribute("width")??"40",w=g.getAttribute("alt")??"",m=g.getAttribute("title")??"",u=Math.round(parseFloat(d))||40,p=Math.round(parseFloat(g.getAttribute("height")??""))||null,A=p?` height="${p}"`:"",_=p?"":"height:auto;";return`<td><a href="${y(f)}" target="_blank"><img src="${y(b)}" width="${u}"${A} border="0" alt="${y(w)}"${m?` title="${y(m)}"`:""} style="display:block;${_}"></a></td>`}).filter(Boolean);if(r.length===0)return"";const i=r.reduce((h,f,g)=>(g>0&&h.push('<td width="5">&nbsp;</td>'),h.push(f),h),[]),l=(t.querySelector(".alignment")??t.querySelector("[align]"))?.getAttribute("align")??"center",s=`<table border="0" cellspacing="0" cellpadding="0"><tr>${i.join("")}</tr></table>`,{style:c,classes:a}=z(t,e,n);return N({align:l,style:c||void 0,className:a.length?a.join(" "):void 0,visibility:o},s,' em-type="social"')}function Z(t,e,n,o){const r=t.getAttribute("class")??"",i=rt(t);return/\bheading_block\b/.test(r)||/\bparagraph_block\b/.test(r)||/\btext_block\b/.test(r)?ce(t,e,n,o,i):/\bimage_block\b/.test(r)?ue(t,e,o,i):/\bbutton_block\b/.test(r)?me(t,e,n,o,i):/\bdivider_block\b/.test(r)?pe(t,e,o,i):/\bspacer_block\b/.test(r)?be(t,e,o,i):/\bsocial_block\b/.test(r)?we(t,e,o,i):""}function ye(t){const e=[];return Array.from(t.children).forEach(n=>{n.tagName.toLowerCase()==="tbody"?e.push(...Array.from(n.children)):e.push(n)}),e.filter(n=>n.tagName.toLowerCase()==="tr")}function ht(t){return ye(t).find(e=>/\bem-structure\b/.test(e.getAttribute("class")??""))??null}function xe(t){return/\brow-content\b/.test(t.getAttribute("class")??"")}function $e(t){return t.tagName.toLowerCase()!=="table"||t.getAttribute("em")!=="block"||xe(t)?!1:ht(t)!==null}function gt(t){const e=ht(t);if(!e)return null;const n=Array.from(e.children).filter(o=>o.tagName.toLowerCase()==="td");return n.length===0?null:`<tr em="block">${n.map(o=>o.outerHTML).join("")}</tr>`}var rn=".paragraph_block, .text_block, .heading_block, .image_block, .button_block, .divider_block, .spacer_block, .social_block";function Ae(t){return t.tagName.toLowerCase()==="table"&&/\brow-content\b/.test(t.getAttribute("class")??"")}function Se(t){return Ae(t)?"row-content":$e(t)?"em-block":t.matches(".paragraph_block, .text_block, .heading_block, .image_block, .button_block, .divider_block, .spacer_block, .social_block")?"beefree-block":null}function K(t){return(t.textContent??"").trim()!==""||t.querySelector("img")!==null}function ke(t){return t.tagName.toLowerCase()!=="table"?!1:K(t)}function mt(t,e){return(t.getAttribute("class")??"").split(/\s+/).includes(e)}function ve(t){return t.tagName.toLowerCase()==="table"&&(mt(t,"row")||mt(t,"row-content"))}function _e(t,e){let n=e;for(;n&&n.parentElement!==t;)n=n.parentElement;return n}function Ce(t){if(t)for(let e=0;e<8;e+=1){const n=new Map;let o=!1;if(Array.from(t.querySelectorAll("table")).forEach(r=>{if(!ve(r)||!r.parentElement?.closest("table.row-content"))return;const i=_e(t,r);!i||i===r||((n.get(i)??i).insertAdjacentElement("afterend",r),n.set(i,r),o=!0)}),!o)return}}function Ee(t){const e=[];if(!t)return e;const n=o=>{if(o.matches(".preheader"))return;const r=Se(o);if(r){e.push({kind:r,element:o});return}const i=e.length;Array.from(o.children).forEach(n),e.length===i&&ke(o)&&e.push({kind:"unknown",element:o})};return Array.from(t.children).forEach(n),e}var Pe=/^\.(em-mob-[A-Za-z0-9_-]+)$/,pt=/([^{}]+)\{([^{}]*)\}/g;function Fe(t){return t.split(";").map(e=>e.trim()).filter(e=>e!=="").map(e=>` ${e};`).join(`
4
+ `)}function Me(t){const e=new Map;return t.querySelectorAll('style[em="styles"]').forEach(n=>{const o=n.textContent??"";let r;for(pt.lastIndex=0;(r=pt.exec(o))!==null;){const i=r[1].trim(),l=Pe.exec(i);if(!l||e.has(l[1]))continue;const s=Fe(r[2]);s!==""&&e.set(l[1],s)}}),e}var bt={Thin:"100","Thin Italic":"100i",ExtraLight:"200","ExtraLight Italic":"200i",Light:"300","Light Italic":"300i",Regular:"400","Regular Italic":"400i",Medium:"500","Medium Italic":"500i",SemiBold:"600","SemiBold Italic":"600i",Bold:"700","Bold Italic":"700i",ExtraBold:"800","ExtraBold Italic":"800i",Black:"900","Black Italic":"900i"},Te={"Sans Serif":"sans-serif",Serif:"serif"},Le={100:"Thin",200:"ExtraLight",300:"Light",400:"Regular",500:"Medium",600:"SemiBold",700:"Bold",800:"ExtraBold",900:"Black"};function Y(t){return t.replace(/\s+/g," ").trim().toLowerCase()}function wt(t){return(t.split(",")[0]??"").trim().replace(/^['"]/,"").replace(/['"]$/,"").trim()}function yt(t){const e=t.split(",").map(n=>n.trim().replace(/^['"]|['"]$/g,"").toLowerCase());return e.includes("serif")&&!e.includes("sans-serif")?"Serif":"Sans Serif"}function xt(t,e){let n=(t??"").trim().toLowerCase();n==="bold"?n="700":(n==="normal"||n==="")&&(n="400");const o=Le[n]??"Regular";return e?`${o} Italic`:o}function Ne(t,e){return`em-font-${t.replace(/\s/g,"")}-${e.replace(/\s/g,"")}`}function $t(t){const e=[],n=t.split("?")[1];return n&&n.split("&").forEach(o=>{const r=o.indexOf("=");if(r===-1)return;const i=o.slice(0,r),l=o.slice(r+1);if(i!=="family"||!l)return;let s=l;try{s=decodeURIComponent(l.replace(/\+/g," "))}catch{s=l.replace(/\+/g," ")}s.split("|").forEach(c=>{const a=c.split(":")[0].trim();a&&e.push(a)})}),e}function Be(t){const e=new Set;t.querySelectorAll("link[href]").forEach(o=>{const r=o.getAttribute("href")??"";r.includes("fonts.googleapis.com")&&$t(r).forEach(i=>e.add(Y(i)))});const n=/@import\s+(?:url\(\s*)?['"]?(https?:\/\/fonts\.googleapis\.com\/[^'")\s]+)/g;return t.querySelectorAll("style").forEach(o=>{const r=o.textContent??"";let i;for(;(i=n.exec(r))!==null;)$t(i[1]).forEach(l=>e.add(Y(l)))}),e}function Re(t,e){const n=new RegExp(`(?:^|;)\\s*${e}\\s*:([^;]+)`,"i").exec(t)?.[1];return n?n.replace(/!important/gi,"").trim():void 0}function ze(t){const e=new Map,n=/([^{}]+)\{([^{}]*)\}/g;t.querySelectorAll("style").forEach(r=>{const i=r.textContent??"";let l;for(n.lastIndex=0;(l=n.exec(i))!==null;){const s=l[2];l[1].split(",").forEach(c=>{const a=/^\s*\.(em-font-[A-Za-z0-9_-]+)\s*$/.exec(c);if(!a)return;const h=e.get(a[1])??new Map;["font-family","font-weight","font-style"].forEach(f=>{const g=Re(s,f);g&&h.set(f,g)}),e.set(a[1],h)})}});const o=new Map;return e.forEach((r,i)=>{const l=r.get("font-family"),s=l?wt(l):"";if(!l||!s)return;const c=(r.get("font-style")??"").toLowerCase().includes("italic");o.set(i,{emClass:i,family:s,variant:xt(r.get("font-weight"),c),category:yt(l)})}),o}var He=class{imported;emFontRules;used=new Map;constructor(t,e=new Map){this.imported=t,this.emFontRules=e}register(t,e,n=!1){if(!t)return null;const o=wt(t);if(!o||!this.imported.has(Y(o)))return null;const r=yt(t),i=xt(e,n),l=Ne(o,i);return this.used.has(l)||this.used.set(l,{emClass:l,family:o,variant:i,category:r}),{emClass:l,fallback:r==="Serif"?'"Times New Roman", Times, serif':"Helvetica, Arial, sans-serif"}}registerEmFontClasses(t){const e=/em-font-[A-Za-z0-9_-]+/g;let n;for(;(n=e.exec(t))!==null;){const o=this.emFontRules.get(n[0]);o&&!this.used.has(o.emClass)&&this.used.set(o.emClass,o)}}get hasFonts(){return this.used.size>0}linkTags(){return Array.from(this.used.values()).map(({emClass:t,family:e,variant:n})=>{const o=bt[n]??"400",r=o.includes("i"),i=o.replace(/i/g,"");return` <link rel="stylesheet" href="${`https://fonts.googleapis.com/css2?family=${e}:ital,wght@${r?"1":"0"},${i}&display=swap`}" em-class="${t}">`}).join(`
5
5
  `)}styleRules(){return Array.from(this.used.values()).map(({emClass:t,family:e,variant:n,category:o})=>{const r=bt[n]??"400",i=r.includes("i"),l=r.replace(/i/g,"");let s=`font-family: '${e}', ${Te[o]??"sans-serif"}!important; font-weight: ${l}!important;`;return i&&(s+=" font-style: italic!important;"),` .${t} { ${s} }`})}};function At(t,e){const n=new Set;let o;for(;(o=e.exec(t))!==null;)n.add(o[1]);return Array.from(n).sort((r,i)=>Number(r)-Number(i))}function qe(t){const e=new Set;return t.forEach(n=>{(n.split("{")[0].match(/\.[A-Za-z][A-Za-z0-9_-]*/g)??[]).forEach(o=>e.add(o.slice(1)))}),e}function Ie(t,e,n=[],o=new Map){const r=[];r.push(` .em-narrow-table {
6
6
  width: 100%!important;
7
7
  max-width: ${e}px!important;
@@ -87,5 +87,5 @@ ${l}
87
87
  </table>
88
88
  </body>
89
89
  </html>`}var Oe=["background-color","border","border-top","border-right","border-bottom","border-left","border-radius","box-shadow"],We=["padding","padding-top","padding-right","padding-bottom","padding-left"];function St(t,e){const n=new Map;return Oe.forEach(o=>{const r=t.get(o);r&&n.set(o,r)}),e&&We.forEach(o=>{const r=t.get(o);r&&n.set(o,r)}),n}function De(t){const e=t.querySelector(".preheader");if(!e)return"";const n=e.cloneNode(!0);return n.querySelectorAll("vk-snippet-end").forEach(o=>o.remove()),(n.textContent??"").replace(/[\u034F\u200C\u200B\u00AD\uFEFF\u2800]/g,"").replace(/\u00A0/g," ").replace(/\s+/g," ").trim()}function Ge(t){return t.nonWrap?["em-mob-wrap","em-mob-wrap-cancel",`em-mob-width-${t.columnWidthPerc}perc`]:["em-mob-wrap","em-mob-width-100perc"]}function Ue(t,e){const n=t.closest("table.row"),o=n?/\brow-(\d+)\b/.exec(n.getAttribute("class")??""):null,r=/\bcolumn-(\d+)\b/.exec(t.getAttribute("class")??"");if(!(!o||!r))return e.columnPadding.get(`${o[1]}|${r[1]}`)}function Ve(t,e){const n=t?{top:t.top,right:null,bottom:t.bottom,left:null}:void 0,o={top:e.top,right:null,bottom:e.bottom,left:null};return ot(n,o)}function Ze(t,e){const n=t.querySelector("td.col-pad"),o=E(n?x(n.getAttribute("style")):new Map);return Pt(E(e),o)}function Ke(t,e,n,o){const r=[],i=s=>{s.matches(".paragraph_block, .text_block, .heading_block, .image_block, .button_block, .divider_block, .spacer_block, .social_block")&&r.push(Z(s,e,n,o)),Array.from(s.children).forEach(i)},l=s=>{if(s.matches(".paragraph_block, .text_block, .heading_block, .image_block, .button_block, .divider_block, .spacer_block, .social_block")){r.push(Z(s,e,n,o)),Array.from(s.children).forEach(i);return}if(s.querySelector(".paragraph_block, .text_block, .heading_block, .image_block, .button_block, .divider_block, .spacer_block, .social_block")){Array.from(s.children).forEach(l);return}K(s)&&r.push(s.outerHTML)};return Array.from(t.children).forEach(l),r.filter(s=>s.trim()!=="").join(`
90
- `)}function Ye(t,e,n,o,r,i){const l=x(t.getAttribute("style")),s=Ft(t,e),c=St(l,!1),a=Ze(t,l),h=Ue(t,n),f={left:a.left??0,right:a.right??0},g={left:h?.left??null,right:h?.right??null},b={top:a.top,right:null,bottom:a.bottom,left:null},d=i?{left:f.left,right:f.right,mobileLeft:g.left,mobileRight:g.right}:{left:0,right:0},w=[P(c),Mt(b)].filter(Boolean).join(" "),m=Ke(t,n,o,d),u=[...Ge(r),...Ve(h,a)],p=w?` style="${y(w)}"`:"";return{cellHtml:`<td width="${s}" valign="top" class="${u.join(" ")}"${p}>${m||"&nbsp;"}</td>`,hasContent:m.trim()!=="",hoistedHorizontal:i?{left:0,right:0,mobileLeft:null,mobileRight:null}:{left:f.left,right:f.right,mobileLeft:g.left,mobileRight:g.right}}}function kt(t,e){return`<td width="${t}" class="em-mob-wrap${e.nonWrap?" em-mob-wrap-cancel":""} em-mob-height-${t}px">&nbsp;</td>`}function Xe(t,e){const n=t.querySelector("table");return kt(M(n)??M(t)??0,e)}function Je(t,e,n){const o=t.closest("table.row"),r=x(t.getAttribute("style"));if(o&&!r.has("background-color")){const S=x(o.getAttribute("style")).get("background-color")??o.getAttribute("bgcolor")??"";S&&S!=="transparent"&&r.set("background-color",S)}const i=M(t)??660,l=Array.from(t.querySelectorAll("td.column")).filter(S=>!/\bgap\b/.test(S.getAttribute("class")??""));if(l.length===0){const S=gt(t);return S?{html:S,width:i}:null}const s=/\bstack\b/.test(t.getAttribute("class")??""),c=l.length>1,a=!s&&c,h={nonWrap:a,columnWidthPerc:a?Math.round(100/l.length)-2:100},f=l[0].parentElement,g=f?Array.from(f.children):l,b=[];let d=!1,w=!1,m={left:0,right:0,mobileLeft:null,mobileRight:null};if(g.forEach(S=>{if(!(S instanceof Element)||S.tagName.toLowerCase()!=="td")return;const X=S.getAttribute("class")??"";if(/\bcolumn\b/.test(X)&&/\bgap\b/.test(X))b.push(Xe(S,h)),w=!1;else if(/\bcolumn\b/.test(X)){w&&b.push(kt(0,h));const J=Ye(S,i,e,n,h,c);b.push(J.cellHtml),d=d||J.hasContent,m=J.hoistedHorizontal,w=!0}}),!d)return null;const u=`<table cellpadding="0" cellspacing="0" border="0" class="em-mob-width-100perc"><tr>${b.join("")}</tr></table>`,p=St(r,!0);Q(p,m.left,m.right);const A=P(p),_=o?rt(o):"all",C=te(_),$=o?/\brow-(\d+)\b/.exec(o.getAttribute("class")??""):null,k=$?e.rowContentPadding.get($[1]):void 0,v=E(p),B=(v.left??0)-m.left,H=(v.right??0)-m.right,q={top:k?.top??null,bottom:k?.bottom??null,left:m.mobileLeft!=null?(k?.left??B)+m.mobileLeft:k?.left??null,right:m.mobileRight!=null?(k?.right??H)+m.mobileRight:k?.right??null},I=ot(q,v),F=[C.className,...I].filter(Boolean),W=F.length?` class="${F.join(" ")}"`:"",vt=[A,C.inlineStyle].filter(Boolean).join(" "),_t=`<td${W}${vt?` style="${y(vt)}"`:""}>${u}</td>`;return{html:`<tr em="block">${C.wrapNonMso?`<!--[if !mso]><!-->${_t}<!--<![endif]-->`:_t}</tr>`,width:i}}function Qe(t,e,n,o){const r=Z(t,e,n,{left:0,right:0});return r.trim()===""?null:{html:`<tr em="block"><td>${`<table cellpadding="0" cellspacing="0" border="0" class="em-mob-width-100perc"><tr><td width="${o}" valign="top" class="em-mob-wrap em-mob-width-100perc">${r}</td></tr></table>`}</td></tr>`,width:o}}function tn(t){let e=0;return t.querySelectorAll('table.row-content, table[em="block"]').forEach(n=>{e=Math.max(e,M(n)??0)}),e>0?e:660}function en(t){const e=new DOMParser().parseFromString(t,"text/html"),n=x(e.body?.getAttribute("style")),o=R(n.get("background-color")??"#FFFFFF"),r=De(e),i=(e.querySelector("title")?.textContent??"").trim()||"Email";Ce(e.body);const l=Yt(e),s=new He(Be(e),ze(e)),c=[];let a=0;const h=tn(e);Ee(e.body).forEach(d=>{if(d.kind==="row-content"){const m=Je(d.element,l,s);if(m){c.push(m.html),a=Math.max(a,m.width);return}K(d.element)&&(c.push(`<tr em="block"><td>${d.element.outerHTML}</td></tr>`),a=Math.max(a,M(d.element)??0));return}if(d.kind==="beefree-block"){const m=Qe(d.element,l,s,h);m&&(c.push(m.html),a=Math.max(a,m.width));return}if(d.kind==="unknown"){c.push(`<tr em="block"><td>${d.element.outerHTML}</td></tr>`),a=Math.max(a,M(d.element)??0);return}const w=gt(d.element);w&&(c.push(w),a=Math.max(a,M(d.element)??0))});const f=a>0?a:660,g=c.map(d=>` ${d}`).join(`
91
- `);s.registerEmFontClasses(g);const b=Ie(g,f,s.styleRules(),Fe(e));return je({title:i,preheader:r,outerBackground:o,narrowWidth:f,stylesBlock:b,blocksHtml:g,fontLinks:s.linkTags()})}Et.convertBeeFreeToEmailMaker=en});
90
+ `)}function Ye(t,e,n,o,r,i){const l=x(t.getAttribute("style")),s=Mt(t,e),c=St(l,!1),a=Ze(t,l),h=Ue(t,n),f={left:a.left??0,right:a.right??0},g={left:h?.left??null,right:h?.right??null},b={top:a.top,right:null,bottom:a.bottom,left:null},d=i?{left:f.left,right:f.right,mobileLeft:g.left,mobileRight:g.right}:{left:0,right:0},w=[P(c),Ft(b)].filter(Boolean).join(" "),m=Ke(t,n,o,d),u=[...Ge(r),...Ve(h,a)],p=w?` style="${y(w)}"`:"";return{cellHtml:`<td width="${s}" valign="top" class="${u.join(" ")}"${p}>${m||"&nbsp;"}</td>`,hasContent:m.trim()!=="",hoistedHorizontal:i?{left:0,right:0,mobileLeft:null,mobileRight:null}:{left:f.left,right:f.right,mobileLeft:g.left,mobileRight:g.right}}}function kt(t,e){return`<td width="${t}" class="em-mob-wrap${e.nonWrap?" em-mob-wrap-cancel":""} em-mob-height-${t}px">&nbsp;</td>`}function Xe(t,e){const n=t.querySelector("table");return kt(F(n)??F(t)??0,e)}function Qe(t,e,n){const o=t.closest("table.row"),r=x(t.getAttribute("style"));if(o&&!r.has("background-color")){const S=x(o.getAttribute("style")).get("background-color")??o.getAttribute("bgcolor")??"";S&&S!=="transparent"&&r.set("background-color",S)}const i=F(t)??660,l=Array.from(t.querySelectorAll("td.column")).filter(S=>!/\bgap\b/.test(S.getAttribute("class")??""));if(l.length===0){const S=gt(t);return S?{html:S,width:i}:null}const s=/\bstack\b/.test(t.getAttribute("class")??""),c=l.length>1,a=!s&&c,h={nonWrap:a,columnWidthPerc:a?Math.round(100/l.length)-2:100},f=l[0].parentElement,g=f?Array.from(f.children):l,b=[];let d=!1,w=!1,m={left:0,right:0,mobileLeft:null,mobileRight:null};if(g.forEach(S=>{if(!(S instanceof Element)||S.tagName.toLowerCase()!=="td")return;const X=S.getAttribute("class")??"";if(/\bcolumn\b/.test(X)&&/\bgap\b/.test(X))b.push(Xe(S,h)),w=!1;else if(/\bcolumn\b/.test(X)){w&&b.push(kt(0,h));const Q=Ye(S,i,e,n,h,c);b.push(Q.cellHtml),d=d||Q.hasContent,m=Q.hoistedHorizontal,w=!0}}),!d)return null;const u=`<table cellpadding="0" cellspacing="0" border="0" class="em-mob-width-100perc"><tr>${b.join("")}</tr></table>`,p=St(r,!0);J(p,m.left,m.right);const A=P(p),_=o?rt(o):"all",C=te(_),$=o?/\brow-(\d+)\b/.exec(o.getAttribute("class")??""):null,k=$?e.rowContentPadding.get($[1]):void 0,v=E(p),B=(v.left??0)-m.left,H=(v.right??0)-m.right,q={top:k?.top??null,bottom:k?.bottom??null,left:m.mobileLeft!=null?(k?.left??B)+m.mobileLeft:k?.left??null,right:m.mobileRight!=null?(k?.right??H)+m.mobileRight:k?.right??null},I=ot(q,v),M=[C.className,...I].filter(Boolean),W=M.length?` class="${M.join(" ")}"`:"",vt=[A,C.inlineStyle].filter(Boolean).join(" "),_t=`<td${W}${vt?` style="${y(vt)}"`:""}>${u}</td>`;return{html:`<tr em="block">${C.wrapNonMso?`<!--[if !mso]><!-->${_t}<!--<![endif]-->`:_t}</tr>`,width:i}}function Je(t,e,n,o){const r=Z(t,e,n,{left:0,right:0});return r.trim()===""?null:{html:`<tr em="block"><td>${`<table cellpadding="0" cellspacing="0" border="0" class="em-mob-width-100perc"><tr><td width="${o}" valign="top" class="em-mob-wrap em-mob-width-100perc">${r}</td></tr></table>`}</td></tr>`,width:o}}function tn(t){let e=0;return t.querySelectorAll('table.row-content, table[em="block"]').forEach(n=>{e=Math.max(e,F(n)??0)}),e>0?e:660}function en(t){const e=new DOMParser().parseFromString(t,"text/html"),n=x(e.body?.getAttribute("style")),o=R(n.get("background-color")??"#FFFFFF"),r=De(e),i=(e.querySelector("title")?.textContent??"").trim()||"Email";Ce(e.body);const l=Yt(e),s=new He(Be(e),ze(e)),c=[];let a=0;const h=tn(e);Ee(e.body).forEach(d=>{if(d.kind==="row-content"){const m=Qe(d.element,l,s);if(m){c.push(m.html),a=Math.max(a,m.width);return}K(d.element)&&(c.push(`<tr em="block"><td>${d.element.outerHTML}</td></tr>`),a=Math.max(a,F(d.element)??0));return}if(d.kind==="beefree-block"){const m=Je(d.element,l,s,h);m&&(c.push(m.html),a=Math.max(a,m.width));return}if(d.kind==="unknown"){c.push(`<tr em="block"><td>${d.element.outerHTML}</td></tr>`),a=Math.max(a,F(d.element)??0);return}const w=gt(d.element);w&&(c.push(w),a=Math.max(a,F(d.element)??0))});const f=a>0?a:660,g=c.map(d=>` ${d}`).join(`
91
+ `);s.registerEmFontClasses(g);const b=Ie(g,f,s.styleRules(),Me(e));return je({title:i,preheader:r,outerBackground:o,narrowWidth:f,stylesBlock:b,blocksHtml:g,fontLinks:s.linkTags()})}Et.convertBeeFreeToEmailMaker=en});
@@ -1 +1 @@
1
- __emailmaker__.define("static/core/75a2537a.js",["require","exports","module","static/core/5dc34752.js","static/core/281afc68.js","static/core/8cebeef2.js"],function(f,M,it){const D=f("./5dc34752.js"),s=f("./281afc68.js"),h=f("./8cebeef2.js");var F=1.25,O=80,$=3,k=1,p=16,L="p, div, td, th";function d(t){if(!t)return;const e=parseFloat(t);if(Number.isFinite(e))return t.trim().endsWith("pt")?e*4/3:e}function A(t){return t.style}function l(t){const e=A(t);if(!e)return!1;if(e.display==="none"||e.visibility==="hidden"||e.opacity==="0")return!0;const r=d(e.fontSize);return r!==void 0&&r<=k&&N(t)<=k?!0:d(e.maxHeight)===0}function u(t){for(let e=t;e;e=e.parentElement){const r=d(A(e)?.fontSize);if(r!==void 0)return r}return p}function w(t,e){for(const r of Array.from(t.childNodes)){if(s.isTextNode(r)){const n=r.data.trim().length;if(n){const i=u(r.parentElement);e.set(i,(e.get(i)??0)+n)}continue}!s.isElement(r)||l(r)||w(r,e)}}function j(t){const e=new Map;w(t,e);let r=p,n=0;for(const[i,o]of e)o>n&&(r=i,n=o);return r}function N(t){let e=u(t);for(const r of Array.from(t.querySelectorAll("*")))r.textContent?.trim()&&(e=Math.max(e,u(r)));return e}function q(t,e){return t.querySelector("a")?.textContent?.trim()===e}function b(t){return Array.from(t.querySelectorAll(L)).some(e=>e.textContent?.trim())}function G(t){const e=j(t),r=[];for(const o of Array.from(t.querySelectorAll(L))){if(l(o)||b(o))continue;const a=o.textContent?.trim()??"";if(!a||a.length>O||q(o,a))continue;const c=N(o);c>=e*F&&r.push({elem:o,size:c})}const n=[...new Set(r.map(o=>o.size))].sort((o,a)=>a-o),i=new Map;for(const{elem:o,size:a}of r)i.set(o,Math.min(n.indexOf(a)+1,$));return{headingLevels:i}}var R=D.__exportAll({markdownAnchor:()=>Y,markdownBlock:()=>X,markdownImage:()=>Q,markdownInline:()=>J,markdownOrderedList:()=>Z,markdownStrong:()=>K,markdownUnorderedList:()=>U}),E=h.formatList,_=20;function W(t){return!t||t.includes("%")?NaN:parseFloat(t)}function m(t,e){const r=t.style,n=e==="width"?"maxWidth":"maxHeight";for(const i of[t.getAttribute(e),r?.[e],r?.[n]]){const o=W(i);if(Number.isFinite(o))return o}return NaN}function x(t){return(t.getAttribute("alt")??"").trim()?!1:m(t,"width")<=_||m(t,"height")<=_}function S(t){return t.replace(/ /g,"%20").replace(/\(/g,"%28").replace(/\)/g,"%29")}function B(t){const e=t.getAttribute("href");return!e||e.startsWith("#")?"":e}function g(t){for(const e of Array.from(t.childNodes)){if(s.isTextNode(e)){if(/\S/.test(e.data))return!0;continue}if(!s.isElement(e))continue;const r=e.tagName.toLowerCase();if(r==="img"){if(e.getAttribute("src")&&!x(e))return!0;continue}if(r==="hr"||r==="a"&&B(e)&&v(e)||g(e))return!0}return!1}function v(t){const e=(t.getAttribute("title")??"").trim();if(e)return e;const r=t.querySelector("img");return r?(r.getAttribute("title")??"").trim():""}function y(t,e,r){r.addLiteral("["),e(),r.addLiteral(`](${S(t)})`)}function I(t,e){return t.parentElement?.tagName.toLowerCase()!=="li"?e:{...e,leadingLineBreaks:1,trailingLineBreaks:1}}var U=(t,e,r,n)=>{E(t,e,r,I(t,n),()=>"- ")},Z=(t,e,r,n)=>{let i=Number(t.getAttribute("start")??"1")||1;E(t,e,r,I(t,n),()=>`${i++}. `)},V={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6};function z(t,e){return V[t.tagName.toLowerCase()]??e.metadata?.headingLevels.get(t)}var X=(t,e,r,n)=>{if(l(t)||!g(t))return;const i=z(t,r);r.openBlock({leadingLineBreaks:i?2:n.leadingLineBreaks}),i&&r.addLiteral(`${"#".repeat(i)} `),e(Array.from(t.childNodes),r),r.closeBlock({trailingLineBreaks:i?2:n.trailingLineBreaks})};function P(t,e){for(let r=t.parentElement;r;r=r.parentElement)if(z(r,e))return!0;return!1}function C(t){return s.isTextNode(t)?!/\S/.test(t.data):s.isElement(t)&&t.tagName.toLowerCase()==="br"}var K=(t,e,r)=>{const n=Array.from(t.childNodes);if(P(t,r)){e(n,r);return}let i=0,o=n.length;for(;i<o&&C(n[i]);)i++;for(;o>i&&C(n[o-1]);)o--;const a=n.slice(i,o),c=a.map(nt=>nt.textContent??"").join("");if(!a.length||c!==c.trim()){e(n,r);return}e(n.slice(0,i),r),r.addLiteral("**"),e(a,r),r.addLiteral("**"),e(n.slice(o),r)},J=(t,e,r)=>{l(t)||e(Array.from(t.childNodes),r)};function T(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function H(t,e){const r=m(t,e);return Number.isFinite(r)?` ${e}="${Math.round(r)}"`:""}var Q=(t,e,r)=>{const n=t.getAttribute("src");if(!n||x(t))return;const i=t.getAttribute("alt")??"",o=H(t,"width"),a=H(t,"height");if(o||a){r.addLiteral(`<img src="${T(n)}" alt="${T(i)}"${o}${a}>`);return}r.addLiteral("!["),r.addInline(i),r.addLiteral(`](${S(n)})`)},Y=(t,e,r)=>{const n=B(t);if(!n){e(Array.from(t.childNodes),r);return}if(g(t)){y(n,()=>e(Array.from(t.childNodes),r),r);return}const i=v(t);i&&y(n,()=>r.addInline(i),r)},tt={"\\":"\\\\","`":"\\`","*":"\\*",_:"\\_","[":"\\[","]":"\\]","#":"\\#",">":"\\>"},et={wordwrap:!1,encodeCharacters:tt,baseElements:{selectors:["body"]},formatters:R,selectors:[{selector:"*",format:"markdownInline"},{selector:"p",format:"markdownBlock",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"div",format:"markdownBlock",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"td",format:"markdownBlock",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"table",format:"markdownBlock",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"th",format:"markdownBlock",options:{leadingLineBreaks:1,trailingLineBreaks:1}},...["h1","h2","h3","h4","h5","h6"].map(t=>({selector:t,format:"markdownBlock"})),{selector:"a",format:"markdownAnchor"},{selector:"img",format:"markdownImage"},{selector:"ul",format:"markdownUnorderedList"},{selector:"ol",format:"markdownOrderedList"},{selector:"hr",format:"blockString",options:{string:"---",leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"b",format:"markdownStrong"},{selector:"strong",format:"markdownStrong"},{selector:"i",format:"inlineSurround",options:{prefix:"*",suffix:"*"}},{selector:"em",format:"inlineSurround",options:{prefix:"*",suffix:"*"}}]};function rt(t){return h.convert(t,et,G(t))}M.htmlToMarkdown=rt});
1
+ __emailmaker__.define("static/core/5272f5b2.js",["require","exports","module","static/core/5dc34752.js","static/core/c948c45f.js","static/core/e995a70d.js"],function(f,M,it){const D=f("./5dc34752.js"),s=f("./c948c45f.js"),h=f("./e995a70d.js");var F=1.25,O=80,$=3,k=1,p=16,L="p, div, td, th";function d(t){if(!t)return;const e=parseFloat(t);if(Number.isFinite(e))return t.trim().endsWith("pt")?e*4/3:e}function A(t){return t.style}function l(t){const e=A(t);if(!e)return!1;if(e.display==="none"||e.visibility==="hidden"||e.opacity==="0")return!0;const r=d(e.fontSize);return r!==void 0&&r<=k&&N(t)<=k?!0:d(e.maxHeight)===0}function u(t){for(let e=t;e;e=e.parentElement){const r=d(A(e)?.fontSize);if(r!==void 0)return r}return p}function w(t,e){for(const r of Array.from(t.childNodes)){if(s.isTextNode(r)){const n=r.data.trim().length;if(n){const i=u(r.parentElement);e.set(i,(e.get(i)??0)+n)}continue}!s.isElement(r)||l(r)||w(r,e)}}function j(t){const e=new Map;w(t,e);let r=p,n=0;for(const[i,o]of e)o>n&&(r=i,n=o);return r}function N(t){let e=u(t);for(const r of Array.from(t.querySelectorAll("*")))r.textContent?.trim()&&(e=Math.max(e,u(r)));return e}function q(t,e){return t.querySelector("a")?.textContent?.trim()===e}function b(t){return Array.from(t.querySelectorAll(L)).some(e=>e.textContent?.trim())}function G(t){const e=j(t),r=[];for(const o of Array.from(t.querySelectorAll(L))){if(l(o)||b(o))continue;const a=o.textContent?.trim()??"";if(!a||a.length>O||q(o,a))continue;const c=N(o);c>=e*F&&r.push({elem:o,size:c})}const n=[...new Set(r.map(o=>o.size))].sort((o,a)=>a-o),i=new Map;for(const{elem:o,size:a}of r)i.set(o,Math.min(n.indexOf(a)+1,$));return{headingLevels:i}}var R=D.__exportAll({markdownAnchor:()=>Y,markdownBlock:()=>X,markdownImage:()=>Q,markdownInline:()=>J,markdownOrderedList:()=>Z,markdownStrong:()=>K,markdownUnorderedList:()=>U}),E=h.formatList,_=20;function W(t){return!t||t.includes("%")?NaN:parseFloat(t)}function m(t,e){const r=t.style,n=e==="width"?"maxWidth":"maxHeight";for(const i of[t.getAttribute(e),r?.[e],r?.[n]]){const o=W(i);if(Number.isFinite(o))return o}return NaN}function x(t){return(t.getAttribute("alt")??"").trim()?!1:m(t,"width")<=_||m(t,"height")<=_}function S(t){return t.replace(/ /g,"%20").replace(/\(/g,"%28").replace(/\)/g,"%29")}function B(t){const e=t.getAttribute("href");return!e||e.startsWith("#")?"":e}function g(t){for(const e of Array.from(t.childNodes)){if(s.isTextNode(e)){if(/\S/.test(e.data))return!0;continue}if(!s.isElement(e))continue;const r=e.tagName.toLowerCase();if(r==="img"){if(e.getAttribute("src")&&!x(e))return!0;continue}if(r==="hr"||r==="a"&&B(e)&&v(e)||g(e))return!0}return!1}function v(t){const e=(t.getAttribute("title")??"").trim();if(e)return e;const r=t.querySelector("img");return r?(r.getAttribute("title")??"").trim():""}function y(t,e,r){r.addLiteral("["),e(),r.addLiteral(`](${S(t)})`)}function I(t,e){return t.parentElement?.tagName.toLowerCase()!=="li"?e:{...e,leadingLineBreaks:1,trailingLineBreaks:1}}var U=(t,e,r,n)=>{E(t,e,r,I(t,n),()=>"- ")},Z=(t,e,r,n)=>{let i=Number(t.getAttribute("start")??"1")||1;E(t,e,r,I(t,n),()=>`${i++}. `)},V={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6};function z(t,e){return V[t.tagName.toLowerCase()]??e.metadata?.headingLevels.get(t)}var X=(t,e,r,n)=>{if(l(t)||!g(t))return;const i=z(t,r);r.openBlock({leadingLineBreaks:i?2:n.leadingLineBreaks}),i&&r.addLiteral(`${"#".repeat(i)} `),e(Array.from(t.childNodes),r),r.closeBlock({trailingLineBreaks:i?2:n.trailingLineBreaks})};function P(t,e){for(let r=t.parentElement;r;r=r.parentElement)if(z(r,e))return!0;return!1}function C(t){return s.isTextNode(t)?!/\S/.test(t.data):s.isElement(t)&&t.tagName.toLowerCase()==="br"}var K=(t,e,r)=>{const n=Array.from(t.childNodes);if(P(t,r)){e(n,r);return}let i=0,o=n.length;for(;i<o&&C(n[i]);)i++;for(;o>i&&C(n[o-1]);)o--;const a=n.slice(i,o),c=a.map(nt=>nt.textContent??"").join("");if(!a.length||c!==c.trim()){e(n,r);return}e(n.slice(0,i),r),r.addLiteral("**"),e(a,r),r.addLiteral("**"),e(n.slice(o),r)},J=(t,e,r)=>{l(t)||e(Array.from(t.childNodes),r)};function T(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function H(t,e){const r=m(t,e);return Number.isFinite(r)?` ${e}="${Math.round(r)}"`:""}var Q=(t,e,r)=>{const n=t.getAttribute("src");if(!n||x(t))return;const i=t.getAttribute("alt")??"",o=H(t,"width"),a=H(t,"height");if(o||a){r.addLiteral(`<img src="${T(n)}" alt="${T(i)}"${o}${a}>`);return}r.addLiteral("!["),r.addInline(i),r.addLiteral(`](${S(n)})`)},Y=(t,e,r)=>{const n=B(t);if(!n){e(Array.from(t.childNodes),r);return}if(g(t)){y(n,()=>e(Array.from(t.childNodes),r),r);return}const i=v(t);i&&y(n,()=>r.addInline(i),r)},tt={"\\":"\\\\","`":"\\`","*":"\\*",_:"\\_","[":"\\[","]":"\\]","#":"\\#",">":"\\>"},et={wordwrap:!1,encodeCharacters:tt,baseElements:{selectors:["body"]},formatters:R,selectors:[{selector:"*",format:"markdownInline"},{selector:"p",format:"markdownBlock",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"div",format:"markdownBlock",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"td",format:"markdownBlock",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"table",format:"markdownBlock",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"th",format:"markdownBlock",options:{leadingLineBreaks:1,trailingLineBreaks:1}},...["h1","h2","h3","h4","h5","h6"].map(t=>({selector:t,format:"markdownBlock"})),{selector:"a",format:"markdownAnchor"},{selector:"img",format:"markdownImage"},{selector:"ul",format:"markdownUnorderedList"},{selector:"ol",format:"markdownOrderedList"},{selector:"hr",format:"blockString",options:{string:"---",leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"b",format:"markdownStrong"},{selector:"strong",format:"markdownStrong"},{selector:"i",format:"inlineSurround",options:{prefix:"*",suffix:"*"}},{selector:"em",format:"inlineSurround",options:{prefix:"*",suffix:"*"}}]};function rt(t){return h.convert(t,et,G(t))}M.htmlToMarkdown=rt});
@@ -1,2 +1,2 @@
1
1
  (function(){try{if(typeof document<"u"){var o=".blocks-app .block-page-header__dropdown-menu{top:10px}.blocks-app .anticon.anticon-edit.block-page-header__icon-edit{color:#8c8c8c;margin-left:6px;font-size:16px}.blocks-app .ant-typography-edit:hover .anticon.anticon-edit.block-page-header__icon-edit{color:var(--em-colorPrimaryHover)}.blocks-app .ant-page-header.block-page-header{margin-bottom:20px;padding-left:0;padding-right:0}@media (width<=1450px){.blocks-app .ant-page-header.block-page-header{padding-left:12px;padding-right:12px}}.blocks-app .block-page-header .ant-page-header-heading-left{flex-grow:1;overflow:visible}.blocks-app .block-page-header .ant-page-header-back{align-self:flex-start;margin-left:12px;margin-right:0;padding-top:12px}.blocks-app .block-page-header .ant-page-header-heading-title{white-space:pre-wrap;flex-grow:1;font-weight:500;overflow:visible}.blocks-app .block-page-header .ant-typography{margin-bottom:0;padding:4px 12px}.blocks-app .block-page-header .ant-typography-edit-content{margin-top:0;padding:0;left:auto}.blocks-app .block-page-header .ant-input{font-size:inherit;font-weight:inherit}.blocks-app .block-page-header .ant-page-header-heading-extra>*{margin-left:8px}.blocks-app .block-page-header .ant-btn.block-page-header__btn_extra,.blocks-app header .ant-btn.block-page-header__btn_extra{width:32px;padding:0}.blocks-app .block-page__row{margin-bottom:60px}@media (width>=1700px){.blocks-app .block-page__row{margin-right:-60px}}",e=window.__emailmaker_styles__||(window.__emailmaker_styles__={sheets:{},order:[]}),n=o;if(!e.sheets[n]){var t=null;try{typeof CSSStyleSheet=="function"&&"replaceSync"in CSSStyleSheet.prototype&&(t=new CSSStyleSheet,t.replaceSync(o))}catch{t=null}if(t){if(!e.host||!e.host.isConnected||!e.host.sheet){var a=document.createElement("style");a.setAttribute("data-emailmaker","true"),document.head.appendChild(a),e.host=a}for(var l=e.host.sheet,i=0;i<t.cssRules.length;i++)try{l.insertRule(t.cssRules[i].cssText,l.cssRules.length)}catch{}(e.texts||(e.texts=[])).push(o),(e.listeners||[]).forEach(function(p){try{p(o)}catch{}})}else{var a=document.createElement("style");a.setAttribute("data-emailmaker","true"),a.appendChild(document.createTextNode(o)),document.head.appendChild(a)}e.sheets[n]=!0,e.order.push(n)}}}catch(p){console.error("vite-plugin-css-injected-by-js",p)}})();
2
- __emailmaker__.define("static/core/76163cc7.js",["require","exports","module","static/core/5dc34752.js","static/core/ee980948.js","static/core/281afc68.js","static/core/324c471b.js","static/core/32e15918.js","react","react/jsx-runtime","__delivery__/libs","classnames"],function(h,re,he){const te=h("./5dc34752.js"),X=h("./ee980948.js"),e=h("./281afc68.js"),z=h("./324c471b.js"),le=h("./32e15918.js");let n=h("react");n=te.__toESM(n);let o=h("react/jsx-runtime"),r=h("__delivery__/libs"),Z=h("classnames");Z=te.__toESM(Z);var oe={fontSize:"16px"},ae={color:"#ff4d4f"},se=({block:t,autoSaveBlockResult:d})=>{const{__:s,_x:c}=e.useI18n();let E=e.useDispatch();const l=e.useEmailAttributesWriter(),g=e.useAppNavigate(),a=e.useCurrentUser(),{modal:p}=r.ui_kit$App.useApp(),f=e.useNotification(),{confirm:b}=p,{token:$}=(0,r.ui_kit$useToken)(),W=e.useAppConfig(),M=e.useContainer(),y=e.usePluginMenuItems("menu:document"),S=e.usePluginItems("toolbar"),j=(0,n.useMemo)(()=>e.filterPluginItems(S,"collaboration"),[S]),K=(0,n.useMemo)(()=>e.filterPluginItems(S,e.TOOLBAR_GROUPS_BEFORE_SAVE),[S]),O=e.usePluginMenuItems("menu:save"),w=j.length>0,Q=K.length>0,k=O.length>0,R=()=>{e.leaveBlock(M)},H=e.useSelector(e.selectCodeModeDirection),J=t.hasOwnProperty("type")?e.BLOCK:e.EMAIL,U=e.useSelector(e.selectElementSettings$1),I=e.useSelector(e.selectElementSettings),P=J==="email"?U:I,A=e.useSelector(e.selectIsCodeMode),q=()=>(P?.type===e.ELEMENT_TYPES.TEXT||P?.type===e.ELEMENT_TYPES.LINK||P.type===e.ELEMENT_TYPES.BUTTON)&&A&&H!=="bottom",v=e.useProjectData(),F=e.isAuthoredByMe(t.author,a,v?.members),{owner:x,admin:T}=e.useMyRoles(),G=e.useStore(),V=(u,ee)=>G.dispatch(e.blocksApi.endpoints.deleteBlock.initiate(u.id)).then(ce=>{if(ce.error){f.fromError("BLOCK_REMOVING_ERROR",e.getBlockDesc(u),ce.error);return}R(),ee(`/projects/${v?.id??u.project}/blocks`),f.success({id:"BLOCK_REMOVING_SUCCESS",title:s("The block “")+u.title+c("” was successfully removed.","block"),data:e.getBlockDesc(u)})}),i=(u,ee)=>{b({mask:{closable:!0},centered:!0,title:c("Are you sure you want to delete the “","block")+u.title+s("” block?"),icon:(0,o.jsx)(e.EmIcons,{icon:"DeleteOutlined",component:r.icons$DeleteOutlined,size:22,style:{color:r.ui_kit$iconColors.danger,marginInlineEnd:12,flexShrink:0}}),okText:s("Yes"),cancelText:s("No"),onOk:()=>V(u,ee)})},m=()=>{R(),g(`/projects/${v.id}/blocks`)},_=u=>{l({title:u})},[B,C]=e.useAddBlockMutation(),Y=e.useContentReader(),D=()=>{t.isNew?t.isNew?f.warning({id:"COPY_NOT_SAVED",payload:t,title:s("To create a copy, you need to save the block.")}):B({title:e.generateCopyTitle(t.title),blocktags:t.blocktags,project:v.id,subject:t.subject,description:t.description,html:e.stripEmBlockMark(Y()),type:t.type?t.type:"Other"}).then(u=>{if(u.error||E(e.limitsApi.util.invalidateTags(["LimitsStats","LimitsWarnings"])),u.error){f.error({id:"BLOCK_CLONING_ERROR",data:e.getBlockDesc(t),innerException:u.error,title:u.error.data.code,description:u.error.data.message});return}g(`/projects/${v.id}/blocks/${u.data.id}`),f.success({id:"BLOCK_CLONING_SUCCESS",data:e.getBlockDesc(t),title:s("The copy of block “")+t.title+c("” was successfully created.","block")})}):e.getEmitter(M,X.events.ON_BLOCK_CLONE_ID).fire(t)},L=()=>{t.isNew?(R(),g(`/projects/${v.id}/blocks`),f.success({id:"BLOCK_REMOVING_SUCCESS",title:s("The draft of the block has been deleted."),data:e.getBlockDesc(t)})):i(t,g)};let N=[];N.push({label:s("Clone"),icon:(0,o.jsx)(e.EmIcons,{icon:"CopyOutlined",component:r.icons$CopyOutlined,size:16}),key:"Clone",className:"em-analytics__block-clone",disabled:C.isLoading,onClick:D}),N.push(...e.menuGroup(y,"document"),...e.menuGroup(y,"plugins"));const ie=x||T||F;ie&&N.push({label:(0,o.jsx)(e.SwitchLockBtn,{element:t},"Lock"),icon:t.lock?(0,o.jsx)(e.EmIcons,{icon:"UnlockOutlined",component:r.icons$UnlockOutlined,style:oe}):(0,o.jsx)(e.EmIcons,{icon:"LockOutlined",component:r.icons$LockOutlined,style:oe}),disabled:!!t.isNew}),N.push(...e.menuGroup(y,"access")),ie&&N.push({label:s("Remove"),icon:(0,o.jsx)(e.EmIcons,{icon:"DeleteOutlined",component:r.icons$DeleteOutlined,size:16}),key:"Remove",className:"em-analytics__block-remove",onClick:L,style:ae}),N.push(...e.menuGroup(y,"danger")),e.useSetTitle(t.title===null?s("New block title"):t.title);const Ee=(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)(r.ui_kit$Space,{size:10,children:[W.headerArrowBackVisible&&(0,o.jsx)(r.ui_kit$Tooltip,{title:s("Back"),placement:"left",children:(0,o.jsx)(r.ui_kit$Button,{type:"text",icon:(0,o.jsx)(e.EmIcons,{icon:"ArrowLeftOutlined",component:r.icons$ArrowLeftOutlined}),onClick:m,shape:"circle"})}),(0,o.jsx)(r.ui_kit$Paragraph,{className:"ant-page-header-heading-title",editable:{triggerType:["text","icon"],icon:(0,o.jsx)(e.EmIcons,{icon:"EditOutlined",component:r.icons$EditOutlined,className:"email-page-header__icon-edit"}),onChange:_},children:t.title===null?s("New block title"):t.title})]})}),_e=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(z.EmailPreviewMenu,{emailElement:t}),t.lock?(0,o.jsx)(e.EmIcons,{icon:"LockOutlined",component:r.icons$LockOutlined,className:(0,Z.default)("lock-icon",{"lock-icon__disabled":!(x||T||F)}),style:{color:$.colorPrimary,fontSize:"16px"}},"Lock"):null,w&&(0,o.jsx)(e.PluginButtons,{items:j}),(0,o.jsx)(r.ui_kit$Dropdown,{arrow:"true",menu:{items:N},children:(0,o.jsx)(r.ui_kit$Button,{className:"block-page-header__btn block-page-header__btn_extra",onClick:()=>{},children:(0,o.jsx)(e.EmIcons,{icon:"EllipsisOutlined",component:r.icons$EllipsisOutlined})})},"Actions"),Q&&(0,o.jsx)(e.PluginButtons,{items:K}),(0,o.jsx)(le.SaveBlockBtn,{className:"em-analytics__block-save",block:t,isEditableRights:x||T||F,autoSaveBlockResult:d,ownsDocument:!0},"Save"),k&&(0,o.jsx)(e.PluginSaveMore,{items:O})]}),ye=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(z.EmailPreviewMenu,{emailElement:t}),w&&(0,o.jsx)(e.PluginButtons,{items:j}),y.length>0&&(0,o.jsx)(e.PluginMenuButton,{location:"menu:document",items:y,className:"block-page-header__btn block-page-header__btn_extra"}),Q&&(0,o.jsx)(e.PluginButtons,{items:K}),k&&(0,o.jsx)(e.PluginSaveMore,{items:O})]}),ve=W.commandButtonsEnabled?_e:ye;return(0,o.jsx)(e.Header,{leftBlock:Ee,rightBlock:ve,className:"header_blocks",isHeaderCodeMenuOpen:q()})};se.propTypes={};function ne(t=document){const d=t.getElementById("email_iframe_slot");return{slot:d,area:d?.closest("[data-scroll-area]")??null}}function de(t){if(t)return t.renderGuid??(t.id!=null?String(t.id):void 0)}function ue(t,d={}){const s=e.useStore(),c=d.key??de(t),E=d.recovery===!0,l=(0,n.useMemo)(()=>{if(c===void 0)return;const p=e.getEmailDocuments(X.getContainer(s));return E?t?.id!=null?p.open(String(t.id),{email:t}):p.openDraft(t):p.openBlock(c,t)},[c,s,E]),g=t?.modified,a=t?.lock;return(0,n.useEffect)(()=>{e.writeSourceReport(l,e.fromServerFacts({modified:g,lock:a}))},[l,g,a]),l}function me(){const t=e.useContainer(),d=e.useNotification(),{__:s}=e.useI18n(),c=(0,n.useRef)(void 0),E=(0,n.useRef)(0);(0,n.useEffect)(()=>{const l=e.getOpenEmailDocuments(t??void 0);if(l)return l.subscribe(()=>{const{error:g,failures:a,failedIntent:p}=l.saveState(),f=a>E.current;if(E.current=a,a===0||!e.isLockedBlockRefusal(g)){c.current=void 0;return}const b=l.current()?.get(),$=b?.savedVersion??null;!f||p!=="snapshot"||c.current?.saved===$||(c.current={saved:$},d.error({id:"BLOCK_ACCESS_TO_LOCKED_ERROR",title:s("No access to edit the block."),data:e.getBlockDesc({id:b?.serverId??void 0,title:b?.attributes.title})}))})},[t,d,s])}var ge={status:0,data:{code:"timeout",message:"request timed out"}};function pe(t,d){const s=d?void 0:t,c=(0,n.useMemo)(()=>({key:s,inFlight:s!==void 0&&e.isBlockAutosaveInFlight(s)}),[s]),[E,l]=(0,n.useState)(void 0),g=E?.opening===c?E.settled:void 0,a=c.inFlight&&g===void 0;(0,n.useEffect)(()=>a&&c.key!==void 0?e.whenBlockAutosaveSettledWithin(c.key,e.getSaveTimeoutMs(),f=>l({opening:c,settled:f})):void 0,[a,c]);const p=e.useGetBlockQuery(t,{skip:d||a});return a?{...p,data:void 0,isSuccess:!1,isLoading:!0}:g===!1?{...p,data:void 0,isSuccess:!1,isLoading:!1,isError:!0,error:ge}:p}var{Content:Se}=r.ui_kit$Layout,fe=({session:t})=>{const{__:d}=e.useI18n(),s=e.useSendPostMessage(),{blockId:c,projectId:E}=e.useRouteParams();me();const l=e.useDispatch();e.useAppNavigate();const g=e.useCookieManager();e.useSelector(e.selectMonacoFocusing),e.useSelector(e.selectIsPanelHistoryCollapsed),e.useAppConfig();const a=g.get(e.APP_COOKIES.em_new_block),{isSuccess:p,data:f}=e.useGetBlockQuery(+a,{skip:!!t||!a}),[b,$]=(0,n.useState)(!1),{isLoading:W,isSuccess:M,isError:y,error:S,data:j}=pe(c,!!t||!c);(0,n.useEffect)(()=>{y&&S&&e.reportEntityLoadError("block",c,S)},[y,S,c]);const K=a?p:M,O=M&&j?.id?j:p&&f,w=t?t.block:O,Q=ue(t?void 0:O||void 0,{key:!t&&O?.id!=null?e.blockSessionKey(O.id):void 0}),k=t?t.document:Q,R=e.useDocumentAttributes(k),H=(0,n.useMemo)(()=>k?e.resolveOpenEmail({attributes:R,readContent:()=>k.getContent(),docId:k.get().docId,hasSession:!0,serverId:k.get().serverId,show:void 0}):w,[R,k,w]),J=e.useStore(),U=e.getEmailDocuments(X.getContainer(J)).history();e.usePublishDocumentSession(k,U);const I=e.useUserUndo({document:k,history:U}),P=(0,n.useCallback)(()=>{I.undo()},[I]),A=(0,n.useCallback)(()=>{I.redo()},[I]),q=(0,n.useCallback)(()=>I.clear(),[I]);e.useEditorUiReset(k?.get().docId,q);const v=(0,n.useCallback)(i=>{(window.navigator.appVersion.indexOf("Mac")&&i.metaKey||i.ctrlKey)&&(i.code==="KeyZ"?(i.preventDefault(),i.shiftKey?A():P()):i.code==="KeyY"&&!i.shiftKey&&(i.preventDefault(),A()))},[P,A]);(0,n.useEffect)(()=>(document.body.classList.add("editor"),()=>{l(e.resetPanes()),l(e.closeModal$1()),l(e.resetElementHistorySlice()),l(e.setActiveSettingsTab(e.BUILD))}),[l]);const F=i=>{const m=i.data.operation,_=i.data.action,B=document.getElementById("iframe-scroll-top"),C=document.getElementById("iframe-scroll-bottom");if(m===e.EVENT_TYPES.APPLICATION_ACTION&&(_==="undo"?P():_==="redo"&&A()),m===e.EVENT_TYPES.APPLICATION_SCROLL_BLOCK_SHOW){const{slot:Y}=ne(),D=document.body.getBoundingClientRect().height,L=Y?.getClientRects()[0];if(!L||!B||!C)return;L.top<0&&(B.style.display="block"),L.top+L.height>D&&(C.style.display="block")}m===e.EVENT_TYPES.APPLICATION_SCROLL_BLOCK_HIDE&&B&&C&&(B.style.display="none",C.style.display="none")};e.useListenPostMessage(F);const x=(0,n.useCallback)(i=>{i.target?.closest?.(".file-manager, .ant-modal.file-manager")||(i.preventDefault(),i.target&&s({operation:e.EVENT_TYPES.SANDBOX_DRAG_CANCEL}))},[s]),T=(0,n.useCallback)(()=>{},[]),G=(0,n.useCallback)(i=>{if(i.preventDefault(),i.target?.closest?.(".file-manager, .ant-modal.file-manager"))return;const m=document.getElementById("iframe-scroll-top"),_=document.getElementById("iframe-scroll-bottom"),{slot:B,area:C}=ne();if(!B||!m||!_)return;const{height:Y,top:D}=B.getBoundingClientRect(),L=document.body.getBoundingClientRect().height;D>1?m.style.display==="block"&&(m.style.display="none"):m.style.display==="none"&&(m.style.display="block"),Y-L+D<1?_.style.display==="block"&&(_.style.display="none"):_.style.display==="none"&&(_.style.display="block"),i.target===m&&C?.scrollBy(0,-20),i.target===_&&C?.scrollBy(0,20)},[]),V=(0,n.useCallback)(()=>{const i=document.getElementById("iframe-scroll-top"),m=document.getElementById("iframe-scroll-bottom");i&&m&&(i.style.display="none",m.style.display="none")},[]);return(0,n.useEffect)(()=>(window.addEventListener("dragstart",T),window.addEventListener("drop",x),window.addEventListener("dragend",V),window.addEventListener("dragover",G),window.addEventListener("keydown",v),()=>{window.removeEventListener("dragstart",T),window.removeEventListener("drop",x),window.removeEventListener("dragover",G),window.removeEventListener("dragend",V),window.removeEventListener("keydown",v)}),[v,T,x,V,G]),(0,o.jsx)(e.DocumentSessionProvider,{document:k,history:U,children:(0,o.jsxs)(r.ui_kit$Layout,{className:"block-page",children:[w&&(0,o.jsx)(se,{block:H}),W&&(0,o.jsx)(r.ui_kit$PageLoader,{}),y&&S&&!1,t?w&&(0,o.jsx)(z.EmailPane_default,{emailElement:H,kind:"block",isSuccess:!0}):(!c&&(a?b&&f:!0)||M&&j)&&(0,o.jsx)(z.EmailPane_default,{emailElement:H,kind:"block",isSuccess:K})]})})},ke=()=>{const{document:t,email:d}=e.useOpenEmail(),s=(0,n.useMemo)(()=>({document:t,block:d}),[t,d]);return(0,o.jsx)(fe,{session:s})};re.default=ke});
2
+ __emailmaker__.define("static/core/5f176d0a.js",["require","exports","module","static/core/5dc34752.js","static/core/ee980948.js","static/core/c948c45f.js","static/core/f2be7351.js","static/core/36f3f772.js","react","react/jsx-runtime","__delivery__/libs","classnames"],function(h,re,he){const te=h("./5dc34752.js"),X=h("./ee980948.js"),e=h("./c948c45f.js"),z=h("./f2be7351.js"),le=h("./36f3f772.js");let n=h("react");n=te.__toESM(n);let o=h("react/jsx-runtime"),r=h("__delivery__/libs"),Z=h("classnames");Z=te.__toESM(Z);var oe={fontSize:"16px"},ae={color:"#ff4d4f"},se=({block:t,autoSaveBlockResult:d})=>{const{__:s,_x:c}=e.useI18n();let E=e.useDispatch();const l=e.useEmailAttributesWriter(),g=e.useAppNavigate(),a=e.useCurrentUser(),{modal:p}=r.ui_kit$App.useApp(),f=e.useNotification(),{confirm:b}=p,{token:$}=(0,r.ui_kit$useToken)(),W=e.useAppConfig(),M=e.useContainer(),y=e.usePluginMenuItems("menu:document"),S=e.usePluginItems("toolbar"),j=(0,n.useMemo)(()=>e.filterPluginItems(S,"collaboration"),[S]),K=(0,n.useMemo)(()=>e.filterPluginItems(S,e.TOOLBAR_GROUPS_BEFORE_SAVE),[S]),O=e.usePluginMenuItems("menu:save"),w=j.length>0,Q=K.length>0,k=O.length>0,R=()=>{e.leaveBlock(M)},H=e.useSelector(e.selectCodeModeDirection),J=t.hasOwnProperty("type")?e.BLOCK:e.EMAIL,U=e.useSelector(e.selectElementSettings$1),I=e.useSelector(e.selectElementSettings),P=J==="email"?U:I,A=e.useSelector(e.selectIsCodeMode),q=()=>(P?.type===e.ELEMENT_TYPES.TEXT||P?.type===e.ELEMENT_TYPES.LINK||P.type===e.ELEMENT_TYPES.BUTTON)&&A&&H!=="bottom",v=e.useProjectData(),F=e.isAuthoredByMe(t.author,a,v?.members),{owner:x,admin:T}=e.useMyRoles(),G=e.useStore(),V=(u,ee)=>G.dispatch(e.blocksApi.endpoints.deleteBlock.initiate(u.id)).then(ce=>{if(ce.error){f.fromError("BLOCK_REMOVING_ERROR",e.getBlockDesc(u),ce.error);return}R(),ee(`/projects/${v?.id??u.project}/blocks`),f.success({id:"BLOCK_REMOVING_SUCCESS",title:s("The block “")+u.title+c("” was successfully removed.","block"),data:e.getBlockDesc(u)})}),i=(u,ee)=>{b({mask:{closable:!0},centered:!0,title:c("Are you sure you want to delete the “","block")+u.title+s("” block?"),icon:(0,o.jsx)(e.EmIcons,{icon:"DeleteOutlined",component:r.icons$DeleteOutlined,size:22,style:{color:r.ui_kit$iconColors.danger,marginInlineEnd:12,flexShrink:0}}),okText:s("Yes"),cancelText:s("No"),onOk:()=>V(u,ee)})},m=()=>{R(),g(`/projects/${v.id}/blocks`)},_=u=>{l({title:u})},[B,C]=e.useAddBlockMutation(),Y=e.useContentReader(),D=()=>{t.isNew?t.isNew?f.warning({id:"COPY_NOT_SAVED",payload:t,title:s("To create a copy, you need to save the block.")}):B({title:e.generateCopyTitle(t.title),blocktags:t.blocktags,project:v.id,subject:t.subject,description:t.description,html:e.stripEmBlockMark(Y()),type:t.type?t.type:"Other"}).then(u=>{if(u.error||E(e.limitsApi.util.invalidateTags(["LimitsStats","LimitsWarnings"])),u.error){f.error({id:"BLOCK_CLONING_ERROR",data:e.getBlockDesc(t),innerException:u.error,title:u.error.data.code,description:u.error.data.message});return}g(`/projects/${v.id}/blocks/${u.data.id}`),f.success({id:"BLOCK_CLONING_SUCCESS",data:e.getBlockDesc(t),title:s("The copy of block “")+t.title+c("” was successfully created.","block")})}):e.getEmitter(M,X.events.ON_BLOCK_CLONE_ID).fire(t)},L=()=>{t.isNew?(R(),g(`/projects/${v.id}/blocks`),f.success({id:"BLOCK_REMOVING_SUCCESS",title:s("The draft of the block has been deleted."),data:e.getBlockDesc(t)})):i(t,g)};let N=[];N.push({label:s("Clone"),icon:(0,o.jsx)(e.EmIcons,{icon:"CopyOutlined",component:r.icons$CopyOutlined,size:16}),key:"Clone",className:"em-analytics__block-clone",disabled:C.isLoading,onClick:D}),N.push(...e.menuGroup(y,"document"),...e.menuGroup(y,"plugins"));const ie=x||T||F;ie&&N.push({label:(0,o.jsx)(e.SwitchLockBtn,{element:t},"Lock"),icon:t.lock?(0,o.jsx)(e.EmIcons,{icon:"UnlockOutlined",component:r.icons$UnlockOutlined,style:oe}):(0,o.jsx)(e.EmIcons,{icon:"LockOutlined",component:r.icons$LockOutlined,style:oe}),disabled:!!t.isNew}),N.push(...e.menuGroup(y,"access")),ie&&N.push({label:s("Remove"),icon:(0,o.jsx)(e.EmIcons,{icon:"DeleteOutlined",component:r.icons$DeleteOutlined,size:16}),key:"Remove",className:"em-analytics__block-remove",onClick:L,style:ae}),N.push(...e.menuGroup(y,"danger")),e.useSetTitle(t.title===null?s("New block title"):t.title);const Ee=(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)(r.ui_kit$Space,{size:10,children:[W.headerArrowBackVisible&&(0,o.jsx)(r.ui_kit$Tooltip,{title:s("Back"),placement:"left",children:(0,o.jsx)(r.ui_kit$Button,{type:"text",icon:(0,o.jsx)(e.EmIcons,{icon:"ArrowLeftOutlined",component:r.icons$ArrowLeftOutlined}),onClick:m,shape:"circle"})}),(0,o.jsx)(r.ui_kit$Paragraph,{className:"ant-page-header-heading-title",editable:{triggerType:["text","icon"],icon:(0,o.jsx)(e.EmIcons,{icon:"EditOutlined",component:r.icons$EditOutlined,className:"email-page-header__icon-edit"}),onChange:_},children:t.title===null?s("New block title"):t.title})]})}),_e=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(z.EmailPreviewMenu,{emailElement:t}),t.lock?(0,o.jsx)(e.EmIcons,{icon:"LockOutlined",component:r.icons$LockOutlined,className:(0,Z.default)("lock-icon",{"lock-icon__disabled":!(x||T||F)}),style:{color:$.colorPrimary,fontSize:"16px"}},"Lock"):null,w&&(0,o.jsx)(e.PluginButtons,{items:j}),(0,o.jsx)(r.ui_kit$Dropdown,{arrow:"true",menu:{items:N},children:(0,o.jsx)(r.ui_kit$Button,{className:"block-page-header__btn block-page-header__btn_extra",onClick:()=>{},children:(0,o.jsx)(e.EmIcons,{icon:"EllipsisOutlined",component:r.icons$EllipsisOutlined})})},"Actions"),Q&&(0,o.jsx)(e.PluginButtons,{items:K}),(0,o.jsx)(le.SaveBlockBtn,{className:"em-analytics__block-save",block:t,isEditableRights:x||T||F,autoSaveBlockResult:d,ownsDocument:!0},"Save"),k&&(0,o.jsx)(e.PluginSaveMore,{items:O})]}),ye=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(z.EmailPreviewMenu,{emailElement:t}),w&&(0,o.jsx)(e.PluginButtons,{items:j}),y.length>0&&(0,o.jsx)(e.PluginMenuButton,{location:"menu:document",items:y,className:"block-page-header__btn block-page-header__btn_extra"}),Q&&(0,o.jsx)(e.PluginButtons,{items:K}),k&&(0,o.jsx)(e.PluginSaveMore,{items:O})]}),ve=W.commandButtonsEnabled?_e:ye;return(0,o.jsx)(e.Header,{leftBlock:Ee,rightBlock:ve,className:"header_blocks",isHeaderCodeMenuOpen:q()})};se.propTypes={};function ne(t=document){const d=t.getElementById("email_iframe_slot");return{slot:d,area:d?.closest("[data-scroll-area]")??null}}function de(t){if(t)return t.renderGuid??(t.id!=null?String(t.id):void 0)}function ue(t,d={}){const s=e.useStore(),c=d.key??de(t),E=d.recovery===!0,l=(0,n.useMemo)(()=>{if(c===void 0)return;const p=e.getEmailDocuments(X.getContainer(s));return E?t?.id!=null?p.open(String(t.id),{email:t}):p.openDraft(t):p.openBlock(c,t)},[c,s,E]),g=t?.modified,a=t?.lock;return(0,n.useEffect)(()=>{e.writeSourceReport(l,e.fromServerFacts({modified:g,lock:a}))},[l,g,a]),l}function me(){const t=e.useContainer(),d=e.useNotification(),{__:s}=e.useI18n(),c=(0,n.useRef)(void 0),E=(0,n.useRef)(0);(0,n.useEffect)(()=>{const l=e.getOpenEmailDocuments(t??void 0);if(l)return l.subscribe(()=>{const{error:g,failures:a,failedIntent:p}=l.saveState(),f=a>E.current;if(E.current=a,a===0||!e.isLockedBlockRefusal(g)){c.current=void 0;return}const b=l.current()?.get(),$=b?.savedVersion??null;!f||p!=="snapshot"||c.current?.saved===$||(c.current={saved:$},d.error({id:"BLOCK_ACCESS_TO_LOCKED_ERROR",title:s("No access to edit the block."),data:e.getBlockDesc({id:b?.serverId??void 0,title:b?.attributes.title})}))})},[t,d,s])}var ge={status:0,data:{code:"timeout",message:"request timed out"}};function pe(t,d){const s=d?void 0:t,c=(0,n.useMemo)(()=>({key:s,inFlight:s!==void 0&&e.isBlockAutosaveInFlight(s)}),[s]),[E,l]=(0,n.useState)(void 0),g=E?.opening===c?E.settled:void 0,a=c.inFlight&&g===void 0;(0,n.useEffect)(()=>a&&c.key!==void 0?e.whenBlockAutosaveSettledWithin(c.key,e.getSaveTimeoutMs(),f=>l({opening:c,settled:f})):void 0,[a,c]);const p=e.useGetBlockQuery(t,{skip:d||a});return a?{...p,data:void 0,isSuccess:!1,isLoading:!0}:g===!1?{...p,data:void 0,isSuccess:!1,isLoading:!1,isError:!0,error:ge}:p}var{Content:Se}=r.ui_kit$Layout,fe=({session:t})=>{const{__:d}=e.useI18n(),s=e.useSendPostMessage(),{blockId:c,projectId:E}=e.useRouteParams();me();const l=e.useDispatch();e.useAppNavigate();const g=e.useCookieManager();e.useSelector(e.selectMonacoFocusing),e.useSelector(e.selectIsPanelHistoryCollapsed),e.useAppConfig();const a=g.get(e.APP_COOKIES.em_new_block),{isSuccess:p,data:f}=e.useGetBlockQuery(+a,{skip:!!t||!a}),[b,$]=(0,n.useState)(!1),{isLoading:W,isSuccess:M,isError:y,error:S,data:j}=pe(c,!!t||!c);(0,n.useEffect)(()=>{y&&S&&e.reportEntityLoadError("block",c,S)},[y,S,c]);const K=a?p:M,O=M&&j?.id?j:p&&f,w=t?t.block:O,Q=ue(t?void 0:O||void 0,{key:!t&&O?.id!=null?e.blockSessionKey(O.id):void 0}),k=t?t.document:Q,R=e.useDocumentAttributes(k),H=(0,n.useMemo)(()=>k?e.resolveOpenEmail({attributes:R,readContent:()=>k.getContent(),docId:k.get().docId,hasSession:!0,serverId:k.get().serverId,show:void 0}):w,[R,k,w]),J=e.useStore(),U=e.getEmailDocuments(X.getContainer(J)).history();e.usePublishDocumentSession(k,U);const I=e.useUserUndo({document:k,history:U}),P=(0,n.useCallback)(()=>{I.undo()},[I]),A=(0,n.useCallback)(()=>{I.redo()},[I]),q=(0,n.useCallback)(()=>I.clear(),[I]);e.useEditorUiReset(k?.get().docId,q);const v=(0,n.useCallback)(i=>{(window.navigator.appVersion.indexOf("Mac")&&i.metaKey||i.ctrlKey)&&(i.code==="KeyZ"?(i.preventDefault(),i.shiftKey?A():P()):i.code==="KeyY"&&!i.shiftKey&&(i.preventDefault(),A()))},[P,A]);(0,n.useEffect)(()=>(document.body.classList.add("editor"),()=>{l(e.resetPanes()),l(e.closeModal$1()),l(e.resetElementHistorySlice()),l(e.setActiveSettingsTab(e.BUILD))}),[l]);const F=i=>{const m=i.data.operation,_=i.data.action,B=document.getElementById("iframe-scroll-top"),C=document.getElementById("iframe-scroll-bottom");if(m===e.EVENT_TYPES.APPLICATION_ACTION&&(_==="undo"?P():_==="redo"&&A()),m===e.EVENT_TYPES.APPLICATION_SCROLL_BLOCK_SHOW){const{slot:Y}=ne(),D=document.body.getBoundingClientRect().height,L=Y?.getClientRects()[0];if(!L||!B||!C)return;L.top<0&&(B.style.display="block"),L.top+L.height>D&&(C.style.display="block")}m===e.EVENT_TYPES.APPLICATION_SCROLL_BLOCK_HIDE&&B&&C&&(B.style.display="none",C.style.display="none")};e.useListenPostMessage(F);const x=(0,n.useCallback)(i=>{i.target?.closest?.(".file-manager, .ant-modal.file-manager")||(i.preventDefault(),i.target&&s({operation:e.EVENT_TYPES.SANDBOX_DRAG_CANCEL}))},[s]),T=(0,n.useCallback)(()=>{},[]),G=(0,n.useCallback)(i=>{if(i.preventDefault(),i.target?.closest?.(".file-manager, .ant-modal.file-manager"))return;const m=document.getElementById("iframe-scroll-top"),_=document.getElementById("iframe-scroll-bottom"),{slot:B,area:C}=ne();if(!B||!m||!_)return;const{height:Y,top:D}=B.getBoundingClientRect(),L=document.body.getBoundingClientRect().height;D>1?m.style.display==="block"&&(m.style.display="none"):m.style.display==="none"&&(m.style.display="block"),Y-L+D<1?_.style.display==="block"&&(_.style.display="none"):_.style.display==="none"&&(_.style.display="block"),i.target===m&&C?.scrollBy(0,-20),i.target===_&&C?.scrollBy(0,20)},[]),V=(0,n.useCallback)(()=>{const i=document.getElementById("iframe-scroll-top"),m=document.getElementById("iframe-scroll-bottom");i&&m&&(i.style.display="none",m.style.display="none")},[]);return(0,n.useEffect)(()=>(window.addEventListener("dragstart",T),window.addEventListener("drop",x),window.addEventListener("dragend",V),window.addEventListener("dragover",G),window.addEventListener("keydown",v),()=>{window.removeEventListener("dragstart",T),window.removeEventListener("drop",x),window.removeEventListener("dragover",G),window.removeEventListener("dragend",V),window.removeEventListener("keydown",v)}),[v,T,x,V,G]),(0,o.jsx)(e.DocumentSessionProvider,{document:k,history:U,children:(0,o.jsxs)(r.ui_kit$Layout,{className:"block-page",children:[w&&(0,o.jsx)(se,{block:H}),W&&(0,o.jsx)(r.ui_kit$PageLoader,{}),y&&S&&!1,t?w&&(0,o.jsx)(z.EmailPane_default,{emailElement:H,kind:"block",isSuccess:!0}):(!c&&(a?b&&f:!0)||M&&j)&&(0,o.jsx)(z.EmailPane_default,{emailElement:H,kind:"block",isSuccess:K})]})})},ke=()=>{const{document:t,email:d}=e.useOpenEmail(),s=(0,n.useMemo)(()=>({document:t,block:d}),[t,d]);return(0,o.jsx)(fe,{session:s})};re.default=ke});
@@ -0,0 +1 @@
1
+ __emailmaker__.define("static/core/674e22a5.js",["require","exports","module","static/core/ee980948.js","static/core/c948c45f.js","react"],function(h,d,K){const w=h("./ee980948.js"),f=h("./c948c45f.js");let P=h("react");function p(t){return t.trim()}var T=67108864,O=2e3;function b(t){t.abandonTimer!==void 0&&(clearTimeout(t.abandonTimer),t.abandonTimer=void 0)}function A(t,n){return n?new Promise((c,i)=>{if(n.aborted){i(new DOMException("Aborted","AbortError"));return}const o=()=>{i(new DOMException("Aborted","AbortError"))};n.addEventListener("abort",o,{once:!0}),t.then(a=>{n.removeEventListener("abort",o),c(a)},a=>{n.removeEventListener("abort",o),i(a)})}):t}function x(t={}){const n=t.maxCacheBytes??T,c=t.abandonDelayMs??O,i=new Map,o=new Map;let a=0;function u(r){const e=i.get(r);e&&(a-=e.size,i.delete(r))}function y(r,e){if(u(r),!(e.size>n)){i.set(r,e),a+=e.size;for(const l of i.keys()){if(a<=n)break;u(l)}}}function m(r){const e=o.get(r);e&&(b(e),o.delete(r))}function _(r,e){e.waiters-=1,!(e.waiters>0||e.abandonTimer!==void 0||o.get(r)!==e)&&(e.abandonTimer=setTimeout(()=>{e.abandonTimer=void 0,!(o.get(r)!==e||e.waiters>0)&&(o.delete(r),e.controller.abort())},c))}function F(r,e,l){return e.waiters+=1,b(e),l.then(()=>_(r,e),()=>_(r,e)),l}async function j(r,e,l){const s=p(r);if(!s)throw new Error("Empty image URL");const v=i.get(s);if(v){if(e?.aborted)throw new DOMException("Aborted","AbortError");return i.delete(s),i.set(s,v),v}const E=o.get(s);if(E)return F(s,E,A(E.promise,e));const I=new AbortController,B={promise:l(s,I.signal).then(g=>(m(s),y(s,g),g)).catch(g=>{throw m(s),g}),controller:I,waiters:0,abandonTimer:void 0};return o.set(s,B),F(s,B,A(B.promise,e))}function W(r){const e=p(r);if(!e)return;const l=o.get(e);l&&(b(l),l.controller.abort(),o.delete(e)),u(e)}function z(){for(const[,r]of o)b(r),r.controller.abort();o.clear(),i.clear(),a=0}return{resolve:j,abandonKey:W,invalidateAll:z}}function C(t){if(!(t instanceof Blob)||t.size===0)throw new f.e("Failed to download file from the URL.","UploadUrlDownloadFailed");const n=t.type?.split(";")[0]?.trim()||"image/png";if(!n.startsWith("image/"))throw new f.e("Content type at the URL is not allowed.","UploadUrlContentTypeNotAllowed");return{blob:t,mimeType:n}}async function D(t,n){const c=await fetch(t,n);if(!c.ok)throw new Error(`Server returned ${c.status}`);return c.blob()}async function R(t,n,c){const i=c?{signal:c}:void 0,{blob:o}=await f.ue(t,{handleFileProxy:async a=>{const u=await n.fireFileProxy(a);return f.pickFileProxyBlobFromFireResults(u)??null},handleProxyUrl:async a=>{const u=await n.fireProxyUrl(a);return f.pickProxyUrlOverrideFromFireResults(u,a)},fetchWithProxy:(a,u,y)=>w.fetchWithResourceProxy(a,{config:n.appConfig,standalone:n.isStandalone,intent:y?.intent||"downloadBlob",validateBlob:async m=>!m.type||m.type.startsWith("image/"),init:u})},a=>D(a,i),C,{fetchInit:i});return o}function U(t){return w.getContainer(t).getOrCreateInstance(w.IMAGE_BLOB_RESOLVER_ID,()=>x())}function L(){const t=f.useStore();return(0,P.useMemo)(()=>U(t),[t])}function M(t){const n=String(t??"").split(";")[0].trim();if(!n)return"";const c=n.toLowerCase(),i=c.indexOf("/");if(i===-1)return c;const o=c.slice(i+1);return o==="svg+xml"?"svg":o}Object.defineProperty(d,"canonicalImageUrlKey",{enumerable:!0,get:function(){return p}}),Object.defineProperty(d,"fetchEditorImageBlobByUrl",{enumerable:!0,get:function(){return R}}),Object.defineProperty(d,"getImageBlobResolver",{enumerable:!0,get:function(){return U}}),Object.defineProperty(d,"normalizeImageFormatForDisplay",{enumerable:!0,get:function(){return M}}),Object.defineProperty(d,"useImageBlobResolver",{enumerable:!0,get:function(){return L}})});