@unlayer/exporters 1.389.0
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.
- package/index.cjs +692 -0
- package/index.d.ts +73 -0
- package/index.js +692 -0
- package/package.json +45 -0
package/index.js
ADDED
|
@@ -0,0 +1,692 @@
|
|
|
1
|
+
// @unlayer/exporters — generated 2026-03-19T17:47:00.059Z
|
|
2
|
+
|
|
3
|
+
import De from"lodash/template";import Be from"lodash/unescape";import rr from"lodash/isPlainObject";var Ae=(e,t,o,r)=>{let i=[e,t,o,r];return Array.from(new Set(i)).length==1};function H(e){let o=(typeof e=="string"||typeof e=="number"?`${e||"0px"}`:"0px").trim().split(/\s+/).map(r=>parseFloat(r));return o.length===0?{top:void 0,right:void 0,bottom:void 0,left:void 0}:o.length===1?{top:o[0],right:o[0],bottom:o[0],left:o[0]}:o.length===2?{top:o[0],right:o[1],bottom:o[0],left:o[1]}:o.length===3?{top:o[0],right:o[1],bottom:o[2],left:o[1]}:{top:o[0],right:o[1],bottom:o[2],left:o[3]}}function He(e,t){if(!e)return 0;let{top:o,right:r,bottom:i,left:n}=H(e),l=o||0,s=r||0,a=n||0,d=i||0;if(Ae(l,s,a,d))return Math.round(l/(t/2)*100)/2;let m=(l+s+a+d)/4;return Math.round(m/(t/2)*100)/2}function re(e,t){if(!e)return"";let o=t?" !important":"";return`-webkit-border-radius: ${e+o}; -moz-border-radius: ${e+o};`}import{isEmpty as Tt,omit as We}from"lodash";import{isPlainObject as St}from"lodash";function N(e,t={}){let{deep:o}=t||{};return Object.keys(e).reduce((r,i)=>{if(e[i]===void 0)return r;let n=o&&St(e[i])?N(e[i],t):e[i];return{...r,[i]:n}},{})}function W(e,{escapeAndOperator:t=!1,escapeLT:o=!0,escapeGT:r=!0,escapeDoubleQuotes:i=!0,escapeSingleQuotes:n=!0}={}){if(!(e&&typeof e=="string"))return"";let l=e;return t&&(l=l.replace(/&/g,"&")),o&&(l=l.replace(/</g,"<")),r&&(l=l.replace(/>/g,">")),i&&(l=l.replace(/"/g,""")),n&&(l=l.replace(/'/g,"'")),l}function U(e){return!e||typeof e!="string"?"":e.replace(/\s+/g," ").trim()}function le(e,t={}){return W(e,{escapeAndOperator:!1,escapeDoubleQuotes:!0,escapeGT:!0,escapeLT:!0,escapeSingleQuotes:!1,...t})}function Ie(e,{shouldEscapeHtml:t=!0,isJSDOM:o=!1}={}){let r=t?le:i=>i;return typeof e=="string"||!e?{href:r(e||""),target:"_blank"}:"url"in e?{href:r(e.url||""),target:e.target||"_blank"}:(()=>{let{attrs:i,values:n}=e,l=D("onClick",i,n)||void 0;if(typeof l=="function"&&(l=`${l}`),l&&!(l.startsWith("function")||l.match(/\(([a-zA-Z0-9_,=\'\"\`\{\}:\s]?)+\)\s+=>/)||l.match(/[a-zA-Z0-9_]+\(([a-zA-Z0-9_,=\'\"\`\{\}:\s]?)+\)\s+\{/)||l.match(/[a-zA-Z0-9]+\s+=>/))&&Object.keys(e.values||{}).length&&Object.keys(e.values||{}).some(c=>l?.includes(c))&&!i?.onClick?.match(/\{\{[a-zA-Z_]+\}\}/)&&(l=`function({${Object.keys(e.values||{}).join(",")}}) {${l}}`),l&&!l.startsWith("function")&&l.match(/[a-zA-Z0-9_]+\s*\(([a-zA-Z0-9_,=\'\"\`\{\}:\s]?)+\)\s*\{/)&&(l=l.replace(/([a-zA-Z0-9_]+\s*)(\(([a-zA-Z0-9_,=\'\"\`\{\}:\s]?)+\)\s*\{)/,"function$2")),l&&l.startsWith("function")&&l.match(/[a-zA-Z0-9_]+\s*\([\s\{\,}]*\)\s*\{/)&&(l=l.replace(/([a-zA-Z0-9_]+\s*\([\s\{\,}]*\)\s*\{\s*)(.+)(\s*\}[\s;]*)/,"$2").trim()),l&&(l.startsWith("function")||l.match(/\(([a-zA-Z0-9_,=\'\"\`\{\}:\s]?)+\)\s+=>/)||l.match(/[a-zA-Z0-9]+\s+=>/))){let c=Object.keys(e.values||{}).map(u=>{let f=u==="class"?" ":",",g=e.values[u],h=Array.isArray(g)?g.map(M).join(f):M(g);return`${u}:"${h}"`}).join(",");l=`(${l})({${c}})`}let s=D("href",i,n)||"",a=Wt(i,n);if(Object.keys(i||{}).some(c=>ae(c)&&c.startsWith("data-")&&!c.startsWith("+"))&&Object.keys(a).every(u=>{let f=a[u];if(!f)return!0;if(typeof f!="string")return!1;let g=f.trim();return g===""||g.match(/^\{\{[^}]+\}\}$/)})&&!s&&!l)return{};let p={...a,href:r(s)||(l?"#":void 0),target:r(D("target",i,n))||(l?void 0:"_blank"),onClick:Ht(r(l))||void 0,[o?"className":"class"]:r(D("class",i,n))||void 0,download:D("download",i,n)==="true"||D("download",i,n)===!0?"true":void 0};return Object.keys(i||{}).some(c=>ae(c)&&c.startsWith("data-")&&!c.startsWith("+"))&&Object.keys(a).every(u=>!a[u]||a[u].trim()==="")&&!s&&!l?{}:N(p)})()}function y(e,t={href:""},{isJSDOM:o=!1}={}){let r={...We(e?.customAttrs,["onClick"]),href:e?.url||void 0,target:e?.target||void 0,onclick:e?.onClick||void 0,[o?"className":"class"]:e?.class||void 0};return e?.customAttrs&&Object.keys(e.customAttrs).length>0&&Object.keys(e.customAttrs).every(l=>!e.customAttrs[l]||e.customAttrs[l].trim()==="")&&!e?.url&&!e?.onClick?{}:{...t,...N(r)}}function C(e){if(!e)return!0;let t=We({...e},["target"]);return t.href||delete t.href,t.onclick||delete t.onclick,t.onClick||delete t.onClick,!!Tt(N(t))}function D(e,t,o){let r=`${(t&&t[e])??""}`,i=t&&t[`+${e}`];if(i){let l=r.startsWith("#")&&(i.startsWith("?")||i.startsWith("&"))?"":i.startsWith("?")&&r.includes("?")?i.replace("?","&"):i.startsWith("&")&&!r.includes("?")?i.replace("&","?"):i;r=`${r??""}${l??""}`}if(!r)return`${o&&o[e]||""}`;let n=r;if(Object.entries(o||{}).forEach(([l,s])=>{let a=(u,f=["{","}"])=>Array.from(u).map(g=>f.includes(g)?g:encodeURIComponent(g)).join(""),d=u=>a(u,["{","}"]),p=e==="class"?" ":",",m=Array.isArray(s)?s.map(M).map(d).join(p):M(s),c=Array.isArray(s)?s.map(M).map(d).join(p):d(M(s));n=n.replace(new RegExp(`{{${l}}}`,"g"),(u,f)=>r.indexOf("?")>=0&&f>r.indexOf("?")||f>(r.match(/&(?!amp;)/)?.index??1/0)?c:m)}),!(e==="href"&&(n.startsWith("mailto:")&&(n=n.replace(/([\?&]?)([\w]+)=(&|$)/gi,"$1")),n=n.replace(/[?&]$/,""),!n||n.trim()===""||n==="{{href}}"||n==="{{url}}"||n==="{{custom}}")))return n}function At(e){return`${e||""}`.replace(/(^|\s)+\/\*[\s\S]*?\*\/|(^|\s)+\/\/.*/g,"")}function Ht(e){return U(At(e))}function ae(e){return!["href","target","class","onClick"].includes(e)}function Wt(e,t){return e?Object.keys(e).reduce((o,r)=>ae(r)&&r.startsWith("data-")&&!r.startsWith("+")?{...o,[le(r)]:le(`${D(r,e,t)||t[r]||""}`)}:o,{}):{}}var M=e=>typeof e=="number"?`${e}`:`${(e&&typeof e=="object"&&"value"in e?e?.value:void 0)??e??""}`;import It from"lodash/kebabCase";function k(e,{kebab:t=!1}={}){return e?Object.entries(e).reduce((o,[r,i])=>{if(i==null)return o;let n=t?It(r):r;return`${o} ${n}="${i}"`.trim()},""):""}import Bt from"lodash/kebabCase";function j(e){return e?Object.entries(e).reduce((t,[o,r])=>r==null?t:`${t} ${Bt(o)}: ${r};`.trim(),""):""}function se(e){let t=e.toString(16);return t.length==1?`0${t}`:t}function $t(e,t,o){return`#${se(e)}${se(t)}${se(o)}`}function Dt(e){let t=100;if(e.indexOf("rgba")>-1){let o=e.replace("rgba(","").replace(")","").split(",");t=parseFloat(o[3])*100}return t}function I(e){if(!e||typeof e!="string"||!e.includes("rgb"))return e;if(Dt(e)<100)return"";let t=e.replace("rgba(","").replace(")","").split(",");return $t(parseFloat(t[0]),parseFloat(t[1]),parseFloat(t[2]))}function F(e,t){return e?["heading","button","paragraph"].includes(e)&&typeof t?.textJson=="string":!1}var $e=De(`
|
|
4
|
+
<div class="v-text-align" style="text-align: <%= values.textAlign %>;">
|
|
5
|
+
<a <%= objectToHtmlAttrs(linkAttrs) %> class="v-size-width v-line-height v-padding v-button-colors v-border v-border-radius v-font-family v-font-size v-font-weight v-letter-spacing" style="color:<%= values.buttonColors.color %>;background-color:<%= bgcolor %>;<% if (borderRadius) { %><%= borderRadius %><% } %>line-height:<%= values.lineHeight %>;display:inline-block;text-decoration:none;text-align:center;padding:<%= values.padding %>;width:<%= width || 'auto' %>;max-width:100%;word-wrap:break-word;<% if (border) { %><%= border %><% } %><% if (values.fontFamily) { %>font-family: <%= values.fontFamily?.value %>; <% } %>font-size: <%= values.fontSize %>;<% if (values.fontWeight) { %>font-weight: <%= values.fontWeight %>; <% } %><% if (values.letterSpacing) { %>letter-spacing: <%= values.letterSpacing %>; <% } %>">
|
|
6
|
+
<%= text %>
|
|
7
|
+
</a>
|
|
8
|
+
</div>
|
|
9
|
+
`,{imports:{objectToHtmlAttrs:k}}),Ft=De(`
|
|
10
|
+
<!--[if mso]><style>.v-button {background: transparent !important;}</style><![endif]-->
|
|
11
|
+
<div class="v-text-align" align="<%= values.textAlign %>">
|
|
12
|
+
<% if (parentHasBackgroundImage) { %><!--[if mso]><table role="presentation" border="0" cellspacing="0" cellpadding="0"><tr><td align="center" bgcolor="<%= values.buttonColors.backgroundColor %>" style="padding:<%= values.padding %>;" valign="top"><![endif]--><% } else { %><!--[if mso]><v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="<%= linkAttrs.href || '' %>" style="height:<%= calculatedHeight %>px; v-text-anchor:middle; width:<%= calculatedWidth %>px;" arcsize="<%= arcsize %>%" <% if (borderTopColor && borderTopWidth > 0) { %> strokecolor="<%= borderTopColor %>" strokeweight="<%= borderTopWidth %>px"<% } else { %> stroke="f"<% } %> fillcolor="<%= bgcolor %>"><w:anchorlock/><center style="color:<%= values.buttonColors.color %>;<% if (values.fontFamily) { %>font-family: <%= values.fontFamily?.value %>; <% } %>"><![endif]--><% } %>
|
|
13
|
+
<a <%= objectToHtmlAttrs(linkAttrs) %> class="v-button v-size-width v-button-colors v-border v-border-radius v-font-family v-font-size v-font-weight v-letter-spacing" style="box-sizing: border-box;display: inline-block;text-decoration: none;-webkit-text-size-adjust: none;text-align: center;color: <%= values.buttonColors.color %>; background-color: <%= values.buttonColors.backgroundColor %>;<% if (borderRadius) { %> <%= borderRadius %><% } %> width:<%= width || 'auto' %>; max-width:100%; overflow-wrap: break-word; word-break: break-word; word-wrap:break-word; mso-border-alt: none;<% if (border) { %><%= border %><% } %><% if (values.fontFamily) { %>font-family: <%= values.fontFamily?.value %>; <% } %>font-size: <%= values.fontSize %>;<% if (values.fontWeight) { %>font-weight: <%= values.fontWeight %>; <% } %><% if (values.letterSpacing) { %>letter-spacing: <%= values.letterSpacing %>; <% } %>"<% if (textDirection) { %> dir="<%= textDirection %>" <% } %>>
|
|
14
|
+
<span class="v-line-height v-padding" style="display:block;padding:<%= values.padding %>;line-height:<%= values.lineHeight %>;"><%= text %></span>
|
|
15
|
+
</a>
|
|
16
|
+
<% if (parentHasBackgroundImage) { %><!--[if mso]></td></tr></table><![endif]--><% } else { %><!--[if mso]></center></v:roundrect><![endif]--><% } %>
|
|
17
|
+
</div>
|
|
18
|
+
`,{imports:{objectToHtmlAttrs:k}}),de={web(e,t,o,r,i,n,l,s){let{exporterConfig:a}=s||{};e.border=e.border||{},e.buttonColors=e.buttonColors||{},e.size=e.size||{};let d=e.buttonColors.backgroundColor,p=j(e.border),m=e.borderRadius&&`border-radius: ${e.borderRadius};`,u=F("button",e)?a?.generateHtmlFromTextJson?.(e.textJson)||"":Be(e.text),f=e?._processedText||(a?.toSafeHtml?a.toSafeHtml(u):u)||"",g=e.size.width&&!e.size.autoWidth?e.size.width:"auto",h=y(e.href);return $e({bgcolor:d,border:p,borderRadius:m,linkAttrs:h,text:f,values:e,width:g})},email(e,t,o,r,i,n,l,s){let{exporterConfig:a}=s||{};e.border=e.border||{},e.buttonColors=e.buttonColors||{},e.size=e.size||{};let d=I(e.buttonColors.backgroundColor),p=j(e.border),m=I(e.border.borderTopColor),c=parseInt(e.border.borderTopWidth)||0,u=e.calculatedWidth||120,f=e.calculatedHeight||45,g=e.borderRadius&&`border-radius: ${e.borderRadius};`+re(e.borderRadius),h=He(e.borderRadius,f),_=F("button",e)?a?.generateHtmlFromTextJson?.(e.textJson)||"":Be(e.text),x=(a?.toSafeHtml?a.toSafeHtml(_):_)||"",w=e.size.width&&!e.size.autoWidth?e.size.width:"auto",L=n?.backgroundImage?.url,oe=y(e.href);delete oe.onclick;let Ct=x.includes('dir="')?void 0:a?.textDirection;return Ft({arcsize:h,bgcolor:d,border:p,borderRadius:g,borderTopColor:m,borderTopWidth:c,calculatedHeight:f,calculatedWidth:u,linkAttrs:oe,text:x,values:e,width:w,parentHasBackgroundImage:L,textDirection:Ct})},classic(e,t,o,r,i,n,l,s){let{exporterConfig:a}=s||{},d=e.buttonColors.backgroundColor,p=j(e.border),m=F("button",e)?a?.generateHtmlFromTextJson?.(e.textJson)||"":e.text||"",c=e?._processedText||(a?.toSafeHtml?a.toSafeHtml(m):m)||"",u=e.size.width&&!e.size.autoWidth?e.size.width:"auto",f=y(e.href);return $e({bgcolor:d,border:p,linkAttrs:f,text:c,values:e,width:u})},document(...e){return de.web?.(...e)||""}};import Pt from"lodash/template";var Vt=Pt(`
|
|
19
|
+
<% if (hoverColor || hoverBackgroundColor) { %>
|
|
20
|
+
#<%= values._meta.htmlID %> a:hover {
|
|
21
|
+
<% if (hoverColor) { %>
|
|
22
|
+
color: <%= hoverColor %> !important;
|
|
23
|
+
<% } %>
|
|
24
|
+
|
|
25
|
+
<% if (hoverBackgroundColor) { %>
|
|
26
|
+
background-color: <%= hoverBackgroundColor %> !important;
|
|
27
|
+
<% } %>
|
|
28
|
+
}
|
|
29
|
+
<% } %>
|
|
30
|
+
`),Fe={css(e,t,{displayMode:o,headConfig:r}){let i=!r?.hasFeature?.("legacy.disableHoverButtonColors")&&o!=="email";return Vt({values:e,hoverColor:i?e.buttonColors.hoverColor:void 0,hoverBackgroundColor:i?e.buttonColors.hoverBackgroundColor:void 0})}};import Ve from"react";import Ee from"react-dom/server";import Et from"lodash/template";import Pe from"react";var ce=e=>{let{values:{border:t,width:o,textAlign:r}}=e,i={width:o,display:"inline-block"};return t&&(i={...t?typeof t=="object"?t:{borderTop:t}:{},...i,lineHeight:t?.borderTopWidth??1,height:"0px",verticalAlign:"middle"}),Pe.createElement("div",{style:{textAlign:r,lineHeight:0},"aria-label":"divider"},Pe.createElement("div",{style:i}," "))};var zt=Et(`
|
|
31
|
+
<table role="presentation" aria-label="divider" align="<%= values.textAlign %>" border="0" cellpadding="0" cellspacing="0" width="<%= values.width %>" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%">
|
|
32
|
+
<tbody>
|
|
33
|
+
<tr style="vertical-align: top">
|
|
34
|
+
<td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top;border-top: <%= values.border.borderTopWidth %> <%= values.border.borderTopStyle %> <%= values.border.borderTopColor %>;font-size: 0px;line-height: 0px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%">
|
|
35
|
+
<!--[if gte mso 15]> <![endif]-->
|
|
36
|
+
</td>
|
|
37
|
+
</tr>
|
|
38
|
+
</tbody>
|
|
39
|
+
</table>
|
|
40
|
+
`),O={web(e){return Ee.renderToStaticMarkup(Ve.createElement(ce,{values:e,displayMode:"web"}))},email(e){return e.border=e.border&&typeof e.border=="object"?e.border:{},zt({values:e})},ampWeb(...e){return O.ampEmail?.(...e)||""},ampEmail(...e){return O.web?.(...e)||""},classic(...e){return O.email?.(...e)||""},document(e){return Ee.renderToStaticMarkup(Ve.createElement(ce,{values:e,displayMode:"document"}))}};import ze from"lodash/template";function T(e){return`${e||""}`.replace(/([^\s<>]) (<)/,"$1 $2")}var Rt=ze(`
|
|
41
|
+
<<%= values.headingType %> class="v-color v-text-align v-line-height v-font-size v-font-weight v-letter-spacing" style="margin: 0px; <% if (values.color) { %>color: <%= values.color %>; <% } %>line-height: <%= values.lineHeight %>; text-align: <%= values.textAlign %>; word-wrap: break-word; <% if (values.fontFamily) { %>font-family: <%= values.fontFamily?.value %>; <% } %><% if (values.letterSpacing) { %>letter-spacing: <%= values.letterSpacing %>; <% } %>font-size: <%= values.fontSize %>; font-weight: <%= values.fontWeight || '400' %>;"><%= text %></<%= values.headingType %>>
|
|
42
|
+
`),Lt=ze(`
|
|
43
|
+
<!--[if mso]><table role="presentation" width="100%"><tr><td><![endif]-->
|
|
44
|
+
<<%= values.headingType %> class="v-color v-text-align v-line-height v-font-size v-font-weight v-letter-spacing" style="margin: 0px; <% if (values.color) { %>color: <%= values.color %>; <% } %>line-height: <%= values.lineHeight %>; text-align: <%= values.textAlign %>; word-wrap: break-word; <% if (values.fontFamily) { %>font-family: <%= values.fontFamily?.value %>; <% } %><% if (values.letterSpacing) { %>letter-spacing: <%= values.letterSpacing %>; <% } %>font-size: <%= values.fontSize %>; font-weight: <%= values.fontWeight || '400' %>;"<% if (textDirection) { %> dir="<%= textDirection %>" <% } %>><%= text %></<%= values.headingType %>>
|
|
45
|
+
<!--[if mso]></td></tr></table><![endif]-->
|
|
46
|
+
`),pe={web(e,t,o,r,i,n,l,s){let{exporterConfig:a}=s||{},d=F("heading",e)?a?.generateHtmlFromTextJson?.(e.textJson)||"":e.text||"",p=T(a?.toSafeHtml?a.toSafeHtml(d):d||"");return Rt({values:e,text:p})},email(e,t,o,r,i,n,l,s){let{exporterConfig:a}=s||{},d=F("heading",e)?a?.generateHtmlFromTextJson?.(e.textJson)||"":e.text||"",p=T(a?.toSafeHtml?a.toSafeHtml(d):d||""),m=p.includes('dir="')?void 0:a?.textDirection;return Lt({values:e,text:p,textDirection:m})},document(...e){return pe.web?.(...e)||""}};import{template as Re}from"lodash";var Ut=Re(`
|
|
47
|
+
#<%= values._meta.htmlID %> a {
|
|
48
|
+
<% if (linkColorChanged) { %>color: <%= values.linkStyle.linkColor %>;<% } %>
|
|
49
|
+
<% if (linkUnderlineChanged) { %>text-decoration: <%= values.linkStyle.linkUnderline ? 'underline' : 'none' %>;<% } %>
|
|
50
|
+
}
|
|
51
|
+
`),Mt=Re(`
|
|
52
|
+
#<%= values._meta.htmlID %> a:hover {
|
|
53
|
+
<% if (linkHoverColorChanged) { %>color: <%= values.linkStyle.linkHoverColor %>;<% } %>
|
|
54
|
+
<% if (linkHoverUnderlineChanged) { %>text-decoration: <%= values.linkStyle.linkHoverUnderline ? 'underline' : 'none' %>;<% } %>
|
|
55
|
+
}
|
|
56
|
+
`),Le={css(e,t,{displayMode:o}){let r={...e},i={...t};i.linkStyle=i.linkStyle||{},r.linkStyle=r.linkStyle||{};let{linkStyle:n}=r;if(n.inherit)return;let l=!!n.linkColor&&n.linkColor!=i.linkStyle.linkColor,s=n.linkUnderline!==null&&n.linkUnderline!==i.linkStyle.linkUnderline,a=l||s,d=!!n.linkHoverColor&&n.linkHoverColor!=i.linkStyle.linkHoverColor,p=n.linkHoverUnderline!==null&&n.linkHoverUnderline!==n.linkUnderline,m=d||p,c=[];if(a&&c.push(Ut({values:r,linkColorChanged:l,linkUnderlineChanged:s})),o=="web"&&m&&c.push(Mt({values:r,linkHoverColorChanged:d,linkHoverUnderlineChanged:p})),c.length>0)return c.join(`
|
|
57
|
+
`)}};import ue from"react";import je from"lodash/template";import Ue from"react-dom/server";var Me=e=>{let{values:t,exporterConfig:o}=e,i={__html:o?.toSafeHtml?o.toSafeHtml(t.html):t.html};return ue.createElement("div",{dangerouslySetInnerHTML:i})},jt=je(`
|
|
58
|
+
<div>
|
|
59
|
+
<%= html %>
|
|
60
|
+
</div>
|
|
61
|
+
`),Nt=je(`
|
|
62
|
+
<div>
|
|
63
|
+
<%= html %>
|
|
64
|
+
</div>
|
|
65
|
+
`),Ne={web(e,t,o,r,i,n,l,s){let{exporterConfig:a}=s||{};return Ue.renderToStaticMarkup(ue.createElement(Me,{values:e,exporterConfig:a}))},email(e,t,o,r,i,n,l,s){let{exporterConfig:a}=s||{},d=a?.toSafeHtml?a?.toSafeHtml(e.html):e.html;return jt({values:e,html:d})},classic(e,t,o,r,i,n,l,s){let{exporterConfig:a}=s||{},d=a?.toSafeHtml?a.toSafeHtml(e.html):e.html;return Nt({values:e,html:d})},document(e,t,o,r,i,n,l,s){let{exporterConfig:a}=s||{};return Ue.renderToStaticMarkup(ue.createElement(Me,{values:e,exporterConfig:a}))}};import G from"lodash/template";import{kebabCase as Oe}from"lodash";import{isArray as Ot}from"lodash";var Jt=!1;function S(e,t=2){if(!(typeof e=="number"||typeof e=="string"))return;let o=parseFloat(`${e}`);if(!Number.isNaN(o))return parseFloat(o.toFixed(t))}function J(e,{decimalsPlace:t=2}={}){let o=S(e,t);if(typeof o=="number"&&!Number.isNaN(o)){if(typeof e=="number")return`${o}px`;if(typeof e=="string"&&e.endsWith("px"))return`${o}px`;if(typeof e=="string"&&e.endsWith("%"))return`${o}%`}}function P(e,t,o={}){let{decimalsPlace:r=2,ifNumberConsiderAsPercentage:i=!1}=o;if(typeof e=="number")return i?P(`${e*100}%`,t,{decimalsPlace:r}):S(Math.min(e,t??1/0),r);if(typeof e=="string"&&e.endsWith("px"))return P(parseFloat(e),t,o);if(t&&typeof e=="string"&&e.endsWith("%")){let n=parseFloat(e),l=t*n/100;return P(l,void 0,o)}}function V(e,{displayMode:t}){if(t==="email"&&!Jt)return;let{size:o,customSize:r}=e||{};if(o==="contain")return"contain";if(o==="cover")return"cover";if(o==="custom"&&Ot(r))return r.map(i=>i??"auto").join(" ")}import{isPlainObject as Qt}from"lodash";function Q(e){let o=(typeof e=="string"||typeof e=="number"?`${e||"0px"}`.trim():e&&Qt(e)?[`${e.borderTopWidth||"0px"}`.trim(),`${e.borderRightWidth||"0px"}`.trim(),`${e.borderBottomWidth||"0px"}`.trim(),`${e.borderLeftWidth||"0px"}`.trim()].join(" "):"0px").split(/\s+/).map(r=>parseFloat(r));return o.length===0?{top:void 0,right:void 0,bottom:void 0,left:void 0}:o.length===1?{top:o[0],right:o[0],bottom:o[0],left:o[0]}:o.length===2?{top:o[0],right:o[1],bottom:o[0],left:o[1]}:o.length===3?{top:o[0],right:o[1],bottom:o[2],left:o[1]}:{top:o[0],right:o[1],bottom:o[2],left:o[3]}}function B(e){return!`${e?.contentWidth}`.endsWith("%")}function Zt({body:e,fallbackBodyContentWidth:t=500}){let o=parseFloat(`${e?.values?.contentWidth||0}`)==e?.values?.contentWidth||`${e?.values?.contentWidth}`.endsWith("px")?parseFloat(`${e?.values?.contentWidth||0}`):t,r=H(e?.values?.padding),i=Q(e?.values?.border);return o-(r.left||0)-(r.right||0)-(i.left||0)-(i.right||0)}function Gt({body:e,row:t}){let o=Zt({body:e}),r=H(t?.values?.padding),i=Q(t?.values?.border);return o-(r.left||0)-(r.right||0)-(i.left||0)-(i.right||0)}function qt({body:e,row:t,column:o}){let r=Gt({body:e,row:t}),i=t?.cells?.reduce((d,p)=>d+p,0)||1,l=(t?.cells?.[o?.index]||1)/i*r,s=H(o?.values?.padding),a=Q(o?.values?.border);return l-(s.left||0)-(s.right||0)-(a.left||0)-(a.right||0)}function Xt({body:e,row:t,column:o,item:r}){let i=qt({body:e,row:t,column:o}),n=H(r?.values?.containerPadding),l=Q(r?.values?.border);return i-(n.left||0)-(n.right||0)-(l.left||0)-(l.right||0)}function v({values:e,columnIndex:t,columnValues:o,rowCells:r,rowValues:i,bodyValues:n}){return Xt({body:{values:n},row:{cells:r,values:i},column:{index:t,values:o},item:{values:e}})}function Yt(e,t){let{autoWidth:o=!0,maxWidth:r,width:i}=e||{},n=o?void 0:J(r)||void 0,l=n||"100%",s=n&&t?J(P(n,t)):J(n||(t&&i&&i>t?t:i)||"100%");return{width:l,maxWidth:s}}function A(e,t,o="src"){let{width:r,maxWidth:i}=Yt(e,t);return{imageCSSClassName:[o==="width"?"v-width":`v-${o}-width`,Oe(o)==="max-width"?"v-max-width":`v-${Oe(o)}-max-width`].filter(Boolean).join(" "),imageStyleObj:{width:r,maxWidth:i},imageCSSStyle:[r&&`width: ${r};`,i&&`max-width: ${i};`].filter(Boolean).join("")}}function Z(e,t){if(!(e&&typeof e=="string")||!t.dynamic)return e;let o=typeof t.resizeWidth=="number"||typeof t.resizeWidth=="string"&&t.resizeWidth.endsWith("px")?S(t.resizeWidth):void 0;if(!(o&&o>0))return e;let r=typeof t.originalWidth=="number"||typeof t.originalWidth=="string"&&t.originalWidth.endsWith("px")?S(t.originalWidth):void 0,i=t.allowUpscale===!0,n=o*2,l=n&&r?i?n:Math.min(n,r):n;if(l===r)return e;try{let s=new URL(e),a=J(l);return s.searchParams.set("w",a),s.toString()}catch{return e}}var Kt=G(`
|
|
66
|
+
<div class="v-text-align" style="position:relative;line-height:0px;text-align:<%= values.textAlign %>">
|
|
67
|
+
<% if (!isLinkAttrEmpty(linkAttrs)) { %><a <%= objectToHtmlAttrs(linkAttrs) %>><% } %>
|
|
68
|
+
<img alt="<%= altText %>" class="<%= imageCSSClassName %>" src="<%= src %>" style="<%= imageCSSStyle %>" title="<%= altText %>"/>
|
|
69
|
+
<% if (!isLinkAttrEmpty(linkAttrs)) { %></a><% } %>
|
|
70
|
+
</div>
|
|
71
|
+
`,{imports:{isLinkAttrEmpty:C,objectToHtmlAttrs:k}}),eo=G(`
|
|
72
|
+
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
73
|
+
<tr>
|
|
74
|
+
<td class="v-text-align" style="padding-right: 0px;padding-left: 0px;" align="<%= values.textAlign %>">
|
|
75
|
+
<% if (!isLinkAttrEmpty(linkAttrs)) { %><a <%= objectToHtmlAttrs(linkAttrs) %>><% } %>
|
|
76
|
+
<img align="<%= values.textAlign %>" border="0" src="<%= src %>" alt="<%= altText %>" title="<%= altText %>" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: inline-block !important;border: none;height: auto;float: none;<%= imageCSSStyle %>"<% if (!!width) { %> width="<%= width %>"<% } %><% if (!!height) { %> height="<%= height %>"<% } %><% if (!!imageCSSClassName) { %> class="<%= imageCSSClassName %>"<% } %>/>
|
|
77
|
+
<% if (!isLinkAttrEmpty(linkAttrs)) { %></a><% } %>
|
|
78
|
+
</td>
|
|
79
|
+
</tr>
|
|
80
|
+
</table>
|
|
81
|
+
`,{imports:{isLinkAttrEmpty:C,objectToHtmlAttrs:k}}),to=G(`
|
|
82
|
+
<div style="position:relative;line-height:0px;text-align:<%= values.textAlign %>">
|
|
83
|
+
<% if (!isLinkAttrEmpty(linkAttrs)) { %><a <%= objectToHtmlAttrs(linkAttrs) %>><% } %>
|
|
84
|
+
<amp-img
|
|
85
|
+
alt="<%= values.altText %>"
|
|
86
|
+
src="<%= values.src.url %>"
|
|
87
|
+
width="<%= values.src.width %>"
|
|
88
|
+
height="<%= values.src.height %>"
|
|
89
|
+
layout="responsive"
|
|
90
|
+
class="<%= imageCSSClassName %>"
|
|
91
|
+
>
|
|
92
|
+
</amp-img>
|
|
93
|
+
<% if (!isLinkAttrEmpty(linkAttrs)) { %></a><% } %>
|
|
94
|
+
</div>
|
|
95
|
+
`,{imports:{isLinkAttrEmpty:C,objectToHtmlAttrs:k}}),oo=G(`
|
|
96
|
+
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
97
|
+
<tr>
|
|
98
|
+
<td style="padding-right: 0px;padding-left: 0px;" align="<%= values.textAlign %>">
|
|
99
|
+
<% if (!isLinkAttrEmpty(linkAttrs)) { %><a <%= objectToHtmlAttrs(linkAttrs) %>><% } %>
|
|
100
|
+
<amp-img
|
|
101
|
+
alt="<%= values.altText %>"
|
|
102
|
+
src="<%= values.src.url %>"
|
|
103
|
+
width="<%= values.src.width %>"
|
|
104
|
+
height="<%= values.src.height %>"
|
|
105
|
+
layout="responsive"
|
|
106
|
+
class="<%= imageCSSClassName %>"
|
|
107
|
+
>
|
|
108
|
+
</amp-img>
|
|
109
|
+
<% if (!isLinkAttrEmpty(linkAttrs)) { %></a><% } %>
|
|
110
|
+
</td>
|
|
111
|
+
</tr>
|
|
112
|
+
</table>
|
|
113
|
+
`,{imports:{isLinkAttrEmpty:C,objectToHtmlAttrs:k}}),ro=G(`
|
|
114
|
+
<div class="v-text-align" style="position:relative;line-height:0px;text-align:<%= values.textAlign %>">
|
|
115
|
+
<% if (!isLinkAttrEmpty(linkAttrs)) { %><a <%= objectToHtmlAttrs(linkAttrs) %>><% } %>
|
|
116
|
+
<img alt="<%= altText %>" class="<%= imageCSSClassName %>" src="<%= src %>" style="<%= imageCSSStyle %>" title="<%= altText %>"/>
|
|
117
|
+
<% if (!isLinkAttrEmpty(linkAttrs)) { %></a><% } %>
|
|
118
|
+
</div>
|
|
119
|
+
`),me={web(e,t,o,r,i,n,l,s){let{columnIndex:a,columnValues:d,rowCells:p,rowValues:m,bodyValues:c}=s||{},u=B(c),f=v({values:e,columnIndex:a,columnValues:d,rowCells:p,rowValues:m,bodyValues:c}),{imageCSSClassName:g,imageStyleObj:h,imageCSSStyle:b}=A(e.src,u?f:0),_=Z(e?.src?.url,{dynamic:e?.src?.dynamic,resizeWidth:h?.maxWidth,originalWidth:e?.src?.width});return _?Kt({values:e,imageCSSClassName:g,imageCSSStyle:b,linkAttrs:y(e.action),src:W(_),altText:W(e.altText),width:S(h.maxWidth)}):""},email(e,t,o,r,i,n,l,s){let{columnIndex:a,columnValues:d,rowCells:p,rowValues:m,bodyValues:c}=s||{},u=v({values:e,columnIndex:a,columnValues:d,rowCells:p,rowValues:m,bodyValues:c}),{imageCSSClassName:f,imageCSSStyle:g,imageStyleObj:h}=A(e.src,u),b=y(e.action);delete b.onclick;let _=Z(e?.src?.url,{dynamic:e?.src?.dynamic,resizeWidth:h?.maxWidth,originalWidth:e?.src?.width});if(!_)return"";let x=S(h.maxWidth),w=e?.src?.width,L=e?.src?.height,oe=x&&w&&L?Math.round(x/w*L):void 0;return eo({imageCSSClassName:f,imageCSSStyle:g,linkAttrs:b,values:e,src:W(_),altText:W(e.altText),width:x,height:oe})},ampWeb(e,t,o,r,i,n,l,s){let{columnIndex:a,columnValues:d,rowCells:p,rowValues:m,bodyValues:c}=s||{},u=B(c),f=v({values:e,columnIndex:a,columnValues:d,rowCells:p,rowValues:m,bodyValues:c}),{imageCSSClassName:g,imageStyleObj:h}=A(e.src,u?f:0),b=y(e.action);delete b.onclick;let _=Z(e?.src?.url,{dynamic:e?.src?.dynamic,resizeWidth:h?.maxWidth,originalWidth:e?.src?.width});return to({imageCSSClassName:g,linkAttrs:b,values:{...e,src:{...e?.src,url:_}}})},ampEmail(e,t,o,r,i,n,l,s){let{columnIndex:a,columnValues:d,rowCells:p,rowValues:m,bodyValues:c}=s||{},u=v({values:e,columnIndex:a,columnValues:d,rowCells:p,rowValues:m,bodyValues:c}),{imageCSSClassName:f,imageStyleObj:g}=A(e.src,u),h=Z(e?.src?.url,{dynamic:e?.src?.dynamic,resizeWidth:g?.maxWidth,originalWidth:e?.src?.width});return oo({imageCSSClassName:f,linkAttrs:y(e.action),values:{...e,src:{...e?.src,url:h}}})},classic(e){let{imageCSSClassName:t,imageStyleObj:o,imageCSSStyle:r}=A(e.src);return ro({values:e,imageCSSClassName:t,imageCSSStyle:r,linkAttrs:y(e.action),src:W(e.src?.url),altText:W(e.altText),width:S(o.maxWidth)})},document(...e){return me.web?.(...e)||""}};import{template as io}from"lodash";var no=io(`
|
|
120
|
+
#<%= htmlID %> amp-img {
|
|
121
|
+
display: inline-block;
|
|
122
|
+
<%= imageCSSStyle %>
|
|
123
|
+
}
|
|
124
|
+
`),Je={css(e,t,{columnIndex:o,columnValues:r,rowCells:i,rowValues:n,bodyValues:l,variant:s,isViewer:a}){if(!a&&s==="amp"){let d=B(l),p=v({values:e,columnIndex:o,columnValues:r,rowCells:i,rowValues:n,bodyValues:l}),{imageCSSStyle:m}=A(e?.src,d?p:0);if(!m)return;let c=no({htmlID:e._meta.htmlID,imageCSSStyle:m}).trim();return c?U(c):void 0}}};import lo from"react";import ao from"react-dom/server";import so from"lodash/template";function Qe(e){return e!=null}function $(e){return e?Array.isArray(e)?e.filter(Qe):[]:[]}import fe from"react";var Ze=e=>{let{values:t,exporter:o}=e,{menu:{items:r},fontFamily:i,fontSize:n,linkColor:l,align:s,separator:a,textColor:d,padding:p,layout:m,fontWeight:c,letterSpacing:u}=t,f=$(r);return f.length===0?null:fe.createElement("div",{style:{textAlign:s,letterSpacing:u},"aria-label":"menu"},f.map((g,h)=>{let b=y(g.link);o&&typeof b.onclick=="string"&&(b["data-onclick-encoded"]=typeof globalThis<"u"&&typeof globalThis.btoa=="function"?globalThis.btoa(b.onclick):Buffer.from(b.onclick,"utf8").toString("base64"),delete b.onclick);let _=[fe.createElement("a",{...b,"aria-label":`Menu item - ${g?.text||h}`,key:`menu-item-${h}`,className:"v-padding v-font-size v-layout-display v-font-weight v-letter-spacing",style:{display:m==="horizontal"?"inline-block":"block",padding:p,fontSize:n,fontFamily:i?.value,color:b.href?l:d,textDecoration:"none",fontWeight:c}},g.text)];return a&&m!=="vertical"&&h+1<f.length&&_.push(fe.createElement("span",{"aria-label":"menu separator",className:"v-padding v-font-size v-letter-spacing hide-mobile",key:`menu-separator-${h}`,style:{display:"inline-block",padding:p,fontSize:n,fontFamily:i?.value,color:d,fontWeight:c}},a)),_}))};var co=so(`
|
|
125
|
+
<div aria-label="menu" class="menu" style="text-align:<%= values.align %>;<% if (values.letterSpacing) { %>letter-spacing: <%= values.letterSpacing %>; <% } %>">
|
|
126
|
+
<!--[if (mso)|(IE)]><table role="presentation" border="0" cellpadding="0" cellspacing="0" align="<%= values.align %>" style="<% if (values.letterSpacing) { %>letter-spacing: <%= values.letterSpacing %>; <% } %>"><tr><![endif]-->
|
|
127
|
+
<% (values.items || []).forEach(function(item, index) { %>
|
|
128
|
+
<!--[if (mso)|(IE)]><td style="padding:<%= values.padding %>"><![endif]-->
|
|
129
|
+
<% if (!isLinkAttrEmpty(item.linkAttrs)) { %>
|
|
130
|
+
<a aria-label="<%= item.ariaLabel %>" <%= objectToHtmlAttrs(item.linkAttrs) %> style="padding:<%= values.padding %>;display:<%= values.display %>;color:<%= values.linkColor %>;<% if (values.fontFamily) { %>font-family:<%= values.fontFamily %>;<% } %>font-size:<%= values.fontSize %>;<% if (values.fontWeight) { %>font-weight: <%= values.fontWeight %>;<% } %>text-decoration:none" class="v-padding v-font-size v-layout-display v-font-weight v-letter-spacing">
|
|
131
|
+
<%= item.text %>
|
|
132
|
+
</a>
|
|
133
|
+
<% } else { %>
|
|
134
|
+
<span aria-label="<%= item.ariaLabel %>" style="padding:<%= values.padding %>;display:<%= values.display %>;color:<%= values.textColor %>;<% if (values.fontFamily) { %>font-family:<%= values.fontFamily %>;<% } %>font-size:<%= values.fontSize %>;<% if (values.fontWeight) { %>font-weight: <%= values.fontWeight %>;<% } %>" class="v-padding v-font-size v-layout-display v-font-weight v-letter-spacing">
|
|
135
|
+
<%= item.text %>
|
|
136
|
+
</span>
|
|
137
|
+
<% } %>
|
|
138
|
+
<!--[if (mso)|(IE)]></td><![endif]-->
|
|
139
|
+
<% if (values.separator && values.layout != 'vertical' && index + 1 < (values.items || []).length) { %>
|
|
140
|
+
<!--[if (mso)|(IE)]><td style="padding:<%= values.padding %>"><![endif]-->
|
|
141
|
+
<span aria-label="menu separator" style="padding:<%= values.padding %>;display:<%= values.display %>;color:<%= values.textColor %>;<% if (values.fontFamily) { %>font-family:<%= values.fontFamily %>;<% } %>font-size:<%= values.fontSize %>;<% if (values.fontWeight) { %>font-weight: <%= values.fontWeight %>;<% } %>" class="v-padding v-font-size hide-mobile v-font-weight v-letter-spacing">
|
|
142
|
+
<%= values.separator %>
|
|
143
|
+
</span>
|
|
144
|
+
<!--[if (mso)|(IE)]></td><![endif]-->
|
|
145
|
+
<% } %>
|
|
146
|
+
<% }); %>
|
|
147
|
+
<!--[if (mso)|(IE)]></tr></table><![endif]-->
|
|
148
|
+
</div>
|
|
149
|
+
`,{imports:{isLinkAttrEmpty:C,objectToHtmlAttrs:k}}),Ge={web(e){let t={...e,menu:{...e?.menu,items:$(e?.menu?.items||[])}},o=ao.renderToStaticMarkup(lo.createElement(Ze,{values:t,exporter:!0}));return o=o.replace(/data-onclick-encoded="([^\"]+)"/gi,(r,i)=>`onclick="${typeof globalThis<"u"&&typeof globalThis.atob=="function"?globalThis.atob(i):Buffer.from(i,"base64").toString("utf8")}"`),o},email(e){let{menu:{items:t=[]},fontFamily:o,layout:r}=e,i=r=="horizontal"?"inline-block":"block",l=$(t).map((s,a)=>{let d=y(s?.link);return delete d.onclick,{text:s?.text,linkAttrs:d,ariaLabel:`Menu item - ${s?.text||a}`}});return co({values:{...e,items:l,display:i,fontFamily:o?.value}})}};import qe from"lodash/template";function ge(e){return e?.endsWith?.("%")?`${parseFloat(e)/100}`:e}var po=qe(`
|
|
150
|
+
<div class="v-color v-line-height v-font-weight v-font-family v-font-size v-letter-spacing v-text-align" style="<% if (values.fontFamily) { %>font-family: <%= values.fontFamily?.value %>; <% } %><% if (values.fontSize) { %>font-size: <%= values.fontSize %>; <% } %><% if (values.fontWeight) { %>font-weight: <%= values.fontWeight %>; <% } %><% if (values.color) { %>color: <%= values.color %>; <% } %><% if (values.letterSpacing) { %>letter-spacing: <%= values.letterSpacing %>; <% } %>line-height: <%= lineHeight %>; text-align: <%= values.textAlign %>; word-wrap: break-word;">
|
|
151
|
+
<%= text %>
|
|
152
|
+
</div>
|
|
153
|
+
`),uo=qe(`
|
|
154
|
+
<div class="v-color v-line-height v-font-weight v-font-family v-font-size v-letter-spacing v-text-align" style="<% if (values.fontFamily) { %>font-family: <%= values.fontFamily?.value %>; <% } %><% if (values.fontSize) { %>font-size: <%= values.fontSize %>; <% } %><% if (values.fontWeight) { %>font-weight: <%= values.fontWeight %>; <% } %><% if (values.color) { %>color: <%= values.color %>; <% } %><% if (values.letterSpacing) { %>letter-spacing: <%= values.letterSpacing %>; <% } %>line-height: <%= lineHeight %>; text-align: <%= values.textAlign %>; word-wrap: break-word;"<% if (textDirection) { %> dir="<%= textDirection %>"<% } %>>
|
|
155
|
+
<%= text %>
|
|
156
|
+
</div>
|
|
157
|
+
`),he={web(e,t,o,r,i,n,l,s){let{exporterConfig:a}=s||{},d=a?.generateHtmlFromTextJson?.(e.textJson)||"",p=T(a?.toSafeHtml?a.toSafeHtml(d,{allowOnClick:!0}):d||""),m=ge(e.lineHeight);return po({values:e,text:p,lineHeight:m})},email(e,t,o,r,i,n,l,s){let{exporterConfig:a}=s||{},d=a?.generateHtmlFromTextJson?.(e.textJson)||"",p=T(a?.toSafeHtml?a.toSafeHtml(d):d||""),m=p.includes('dir="')?void 0:a?.textDirection,c=ge(e.lineHeight);return uo({values:e,text:p,textDirection:m,lineHeight:c})},document(...e){return he.web?.(...e)||""}};import{template as Xe}from"lodash";var mo=Xe(`
|
|
158
|
+
<% if (linkColor || linkUnderline) { %>
|
|
159
|
+
#<%= htmlID %> a {
|
|
160
|
+
<% if (linkColor) { %>color: <%= linkColor %>;<% } %>
|
|
161
|
+
<% if (linkUnderline) { %>text-decoration: <%= linkUnderline %>;<% } %>
|
|
162
|
+
}
|
|
163
|
+
<% } %>
|
|
164
|
+
`),fo=Xe(`
|
|
165
|
+
<% if (linkHoverColor || linkHoverUnderline) { %>
|
|
166
|
+
#<%= htmlID %> a:hover {
|
|
167
|
+
<% if (linkHoverColor) { %>color: <%= linkHoverColor %>;<% } %>
|
|
168
|
+
<% if (linkHoverUnderline) { %>text-decoration: <%= linkHoverUnderline %>;<% } %>
|
|
169
|
+
}
|
|
170
|
+
<% } %>
|
|
171
|
+
`),Ye={css(e,t,{displayMode:o}){e.linkStyle=e.linkStyle||{};let{linkStyle:r}=e;if(r.inherit)return;let i=!r.inherit&&r.linkColor&&r.linkColor!==t.linkStyle.linkColor?r.linkColor:void 0,n=!r.inherit&&typeof r.linkUnderline=="boolean"&&r.linkUnderline!==t.linkStyle.linkUnderline?r.linkUnderline?"underline":"none":void 0,l=!r.inherit&&r.linkHoverColor&&r.linkHoverColor!==(i||t.linkStyle.linkHoverColor)?r.linkHoverColor:void 0,s=!r.inherit&&typeof r.linkHoverUnderline=="boolean"&&r.linkHoverUnderline!==r.linkUnderline?r.linkHoverUnderline?"underline":"none":void 0,a=[];return(i||n)&&a.push(mo({htmlID:e._meta.htmlID,linkColor:i,linkUnderline:n}).trim()),o!=="email"&&(l||s)&&a.push(fo({htmlID:e._meta.htmlID,linkHoverColor:l,linkHoverUnderline:s}).trim()),a.filter(Boolean).join(`
|
|
172
|
+
`).trim()||void 0}};import go from"react";import ho from"react-dom/server";import bo from"lodash/template";function be({icons:e,customIcons:t,iconType:o}){return e.map(i=>{if(!i)return;let n=t?.find(l=>l&&l.name===i.name);return{...i,imgUrl:n?n.icons[o]:void 0}}).filter(Boolean)}function q(e){return e?.name!=="Email"||e?.url?.includes("mailto")?e?.url:`mailto:${e?.url}`}import X from"react";function Ke(e){let{icons:t,iconType:o,iconSize:r,align:i,spacing:n,cdnBaseUrl:l}=e;return t?.length?X.createElement("div",{style:{textAlign:i,lineHeight:"0px",direction:"ltr"},"aria-label":"social"},t.map((s,a)=>{if(!s)return null;let d=s?.imgUrl||`${l}/social/icons/${o}/${s.name.toLowerCase()}.png`;return X.createElement("a",{key:`icon-${a}`,href:q(s),target:"_blank","aria-label":`${s.name} icon`,style:{display:"inline-block",width:`${r}px`,height:`${r}px`,marginRight:`${a==t.length-1?0:n}px`}},X.createElement("img",{alt:`${s?.name} icon`,src:d,width:r,height:r}))})):X.createElement("div",{style:{textAlign:i,lineHeight:"0px"}},X.createElement("img",{src:`${l}/social/icons/default.png`,height:r,alt:"social icon"}))}var _o=bo(`
|
|
173
|
+
<div align="<%= align %>" style="direction: ltr;" aria-label="social">
|
|
174
|
+
<div style="display: table; max-width:<%= maxWidth %>px;">
|
|
175
|
+
<!--[if (mso)|(IE)]><table role="presentation" width="<%= maxWidth %>" cellpadding="0" cellspacing="0" border="0"><tr><td style="border-collapse:collapse;" align="<%= align %>"><table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse; mso-table-lspace: 0pt;mso-table-rspace: 0pt; width:<%= maxWidth %>px;"><tr><![endif]-->
|
|
176
|
+
|
|
177
|
+
<% (icons || []).forEach(function(icon, index) { %>
|
|
178
|
+
<!--[if (mso)|(IE)]><td width="<%= iconSize %>" style="width:<%= iconSize %>px; padding-right: <%= (index == icons.length - 1) ? 0 : spacing %>px;" valign="top"><![endif]-->
|
|
179
|
+
<table role="presentation" aria-label="<%= icon.name %> icon" border="0" cellspacing="0" cellpadding="0" width="<%= iconSize %>" height="<%= iconSize %>" style="width: <%= iconSize %>px !important;height: <%= iconSize %>px !important;display: inline-block;border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;margin-right: <%= (index == icons.length - 1) ? 0 : spacing %>px">
|
|
180
|
+
<tbody><tr style="vertical-align: top"><td valign="middle" style="word-break: break-word;border-collapse: collapse !important;vertical-align: top">
|
|
181
|
+
<a<% if (icon.url) {%> href="<%= icon.url %>"<% } %> title="<%= icon.name %>" target="_blank">
|
|
182
|
+
<img src="<% if (icon.imgUrl) { %><%= icon.imgUrl %><% } else { %><%= cdnBaseUrl %>/social/icons/<%= iconType %>/<%= (icon.name || '').toLowerCase() %>.png<% } %>" alt="<%= icon.name %> icon" title="<%= icon.name %>" width="<%= iconSize %>" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block !important;border: none;height: auto;float: none;max-width: <%= iconSize %>px !important">
|
|
183
|
+
</a>
|
|
184
|
+
</td></tr>
|
|
185
|
+
</tbody></table>
|
|
186
|
+
<!--[if (mso)|(IE)]></td><![endif]-->
|
|
187
|
+
<% }); %>
|
|
188
|
+
|
|
189
|
+
<!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]-->
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
`),ie={web(e,t,o,r,i,n,l,s){let{exporterConfig:a}=s||{},{icons:{editor:{data:d}={},iconType:p,icons:m}={},align:c,spacing:u,iconSize:f}=e,g=a?.cdnBaseUrl||"",h=be({icons:$(m),customIcons:d?.customIcons,iconType:p}).map(b=>({...b,url:q(b)}));return ho.renderToStaticMarkup(go.createElement(Ke,{icons:h,iconType:p,iconSize:f,align:c,spacing:u,cdnBaseUrl:g}))},email(e,t,o,r,i,n,l,s){let{exporterConfig:a}=s||{},{icons:{editor:{data:d}={},iconType:p,icons:m}={},align:c,spacing:u,iconSize:f}=e,g=be({icons:$(m),customIcons:d?.customIcons,iconType:p}).map(_=>({..._,url:q(_)})),h=f*g.length+u*(g.length-1),b=a?.cdnBaseUrl||"";return _o({values:e,icons:g,iconType:p,iconSize:f,maxWidth:h,align:c,spacing:u,cdnBaseUrl:b})},ampEmail(...e){return ie.web(...e)},ampWeb(...e){return ie.ampEmail(...e)}};import yo from"lodash/template";var xo=e=>(e??"").trim()===""?"\u200B":e,et=yo(`
|
|
193
|
+
<table class="v-background-color v-border-border" style="<%= tableStyle %>">
|
|
194
|
+
<colgroup>
|
|
195
|
+
<% (values?.table?.headers?.[0]?.cells || values?.table?.rows?.[0]?.cells || []).forEach(cell => { %>
|
|
196
|
+
<col style="width: <%= cell.width || 50 %>%;" />
|
|
197
|
+
<% }); %>
|
|
198
|
+
</colgroup>
|
|
199
|
+
<% if (values?.enableHeader) { %>
|
|
200
|
+
<thead>
|
|
201
|
+
<% values?.table?.headers?.forEach(header => { %>
|
|
202
|
+
<tr<% if (header.height) { %> style="height: <%= header.height %>px;"<% } %>>
|
|
203
|
+
<% header.cells.forEach(cell => { %>
|
|
204
|
+
<th<% if (cell.width || cell.backgroundColor || cell.color || cell.textAlign || cell.verticalAlign || cell.padding || borderStyle) { %> style="<%= borderStyle %><% if (cell.width) { %> width: <%= cell.width %>%;<% } %><% if (cell.backgroundColor) { %> background-color: <%= cell.backgroundColor %>;<% } %><% if (cell.color) { %> color: <%= cell.color %>;<% } %><% if (cell.textAlign) { %> text-align: <%= cell.textAlign %>;<% } %><% if (cell.verticalAlign) { %> vertical-align: <%= cell.verticalAlign %>;<% } %><% if (cell.padding) { %> padding: <%= cell.padding %>;<% } %>"<% } %>><%= cleanupSpaceCharactersFromText(formatTableText(cell.text)) %></th>
|
|
205
|
+
<% }); %>
|
|
206
|
+
</tr>
|
|
207
|
+
<% }); %>
|
|
208
|
+
</thead>
|
|
209
|
+
<% } %>
|
|
210
|
+
<tbody>
|
|
211
|
+
<% if (values?.mergeTagGroup && values?.mergeTagRule && mergeTagBefore && mergeTagAfter) { %>
|
|
212
|
+
<%= mergeTagBefore %>
|
|
213
|
+
<% values?.table?.rows?.forEach((row, rowIndex) => { %>
|
|
214
|
+
<tr<% if (values?.stripedRows && rowIndex % 2 === 0 && values?.stripedRowsBackgroundColor) { %> class="v-striped-rows-background-color-background-color" style="background-color: <%= values?.stripedRowsBackgroundColor %>;<% if (row.height) { %> height: <%= row.height %>px;<% } %>"<% } else if (row.height) { %> style="height: <%= row.height %>px;"<% } %>>
|
|
215
|
+
<% row.cells.forEach(cell => { const isStripedRow = values?.stripedRows && rowIndex % 2 === 0 && values?.stripedRowsBackgroundColor; const cellBg = cell.backgroundColor || (isStripedRow ? values?.stripedRowsBackgroundColor : null); %>
|
|
216
|
+
<td<% if (cell.width || cellBg || cell.color || cell.textAlign || cell.verticalAlign || cell.padding || borderStyle) { %> style="<%= borderStyle %><% if (cell.width) { %> width: <%= cell.width %>%;<% } %><% if (cellBg) { %> background-color: <%= cellBg %>;<% } %><% if (cell.color) { %> color: <%= cell.color %>;<% } %><% if (cell.textAlign) { %> text-align: <%= cell.textAlign %>;<% } %><% if (cell.verticalAlign) { %> vertical-align: <%= cell.verticalAlign %>;<% } %><% if (cell.padding) { %> padding: <%= cell.padding %>;<% } %>"<% } %>><%= cleanupSpaceCharactersFromText(formatTableText(cell.text)) %></td>
|
|
217
|
+
<% }); %>
|
|
218
|
+
</tr>
|
|
219
|
+
<% }); %>
|
|
220
|
+
<%= mergeTagAfter %>
|
|
221
|
+
<% } else { %>
|
|
222
|
+
<% values?.table?.rows?.forEach((row, rowIndex) => { %>
|
|
223
|
+
<tr<% if (values?.stripedRows && rowIndex % 2 === 0 && values?.stripedRowsBackgroundColor) { %> class="v-striped-rows-background-color-background-color" style="background-color: <%= values?.stripedRowsBackgroundColor %>;<% if (row.height) { %> height: <%= row.height %>px;<% } %>"<% } else if (row.height) { %> style="height: <%= row.height %>px;"<% } %>>
|
|
224
|
+
<% row.cells.forEach(cell => { const isStripedRow = values?.stripedRows && rowIndex % 2 === 0 && values?.stripedRowsBackgroundColor; const cellBg = cell.backgroundColor || (isStripedRow ? values?.stripedRowsBackgroundColor : null); %>
|
|
225
|
+
<td<% if (cell.width || cellBg || cell.color || cell.textAlign || cell.verticalAlign || cell.padding || borderStyle) { %> style="<%= borderStyle %><% if (cell.width) { %> width: <%= cell.width %>%;<% } %><% if (cellBg) { %> background-color: <%= cellBg %>;<% } %><% if (cell.color) { %> color: <%= cell.color %>;<% } %><% if (cell.textAlign) { %> text-align: <%= cell.textAlign %>;<% } %><% if (cell.verticalAlign) { %> vertical-align: <%= cell.verticalAlign %>;<% } %><% if (cell.padding) { %> padding: <%= cell.padding %>;<% } %>"<% } %>><%= cleanupSpaceCharactersFromText(formatTableText(cell.text)) %></td>
|
|
226
|
+
<% }); %>
|
|
227
|
+
</tr>
|
|
228
|
+
<% }); %>
|
|
229
|
+
<% } %>
|
|
230
|
+
</tbody>
|
|
231
|
+
<% if (values?.enableFooter) { %>
|
|
232
|
+
<tfoot>
|
|
233
|
+
<% values?.table?.footers?.forEach(footer => { %>
|
|
234
|
+
<tr<% if (footer.height) { %> style="height: <%= footer.height %>px;"<% } %>>
|
|
235
|
+
<% footer.cells.forEach(cell => { %>
|
|
236
|
+
<td<% if (cell.width || cell.backgroundColor || cell.color || cell.textAlign || cell.verticalAlign || cell.padding || borderStyle) { %> style="<%= borderStyle %><% if (cell.width) { %> width: <%= cell.width %>%;<% } %><% if (cell.backgroundColor) { %> background-color: <%= cell.backgroundColor %>;<% } %><% if (cell.color) { %> color: <%= cell.color %>;<% } %><% if (cell.textAlign) { %> text-align: <%= cell.textAlign %>;<% } %><% if (cell.verticalAlign) { %> vertical-align: <%= cell.verticalAlign %>;<% } %><% if (cell.padding) { %> padding: <%= cell.padding %>;<% } %>"<% } %>><%= cleanupSpaceCharactersFromText(formatTableText(cell.text)) %></td>
|
|
237
|
+
<% }); %>
|
|
238
|
+
</tr>
|
|
239
|
+
<% }); %>
|
|
240
|
+
</tfoot>
|
|
241
|
+
<% } %>
|
|
242
|
+
</table>
|
|
243
|
+
`,{imports:{cleanupSpaceCharactersFromText:T,formatTableText:xo}}),tt=e=>{let t="";e?.border&&(t+=j(e?.border));let o=`width: 100%; border-collapse: collapse; table-layout: fixed; ${t}`;return{borderStyle:t,tableStyle:o}},_e={web(e,t,o,r,i,n,l,s){let{mergeTagState:a}=s||{},{borderStyle:d,tableStyle:p}=tt(e),m="",c="";if(a){let{mergeTagGroup:u,mergeTagRule:f,mergeTags:g}=a,h=g?.[u]?.rules?.[f];h&&(m=h.before,c=h.after)}return et({values:e,borderStyle:d,tableStyle:p,mergeTagBefore:m,mergeTagAfter:c})},email(e,t,o,r,i,n,l,s){let{exporterConfig:a,mergeTagState:d}=s||{},{borderStyle:p,tableStyle:m}=tt(e),u=T(a?.toSafeHtml?a.toSafeHtml(e?.text):e?.text||"").includes('dir="')?void 0:a?.textDirection,f="",g="";if(d){let{mergeTagGroup:h,mergeTagRule:b,mergeTags:_}=d,x=_?.[h]?.rules?.[b];x&&(f=x.before,g=x.after)}return et({values:e,textDirection:u,borderStyle:p,tableStyle:m,mergeTagBefore:f,mergeTagAfter:g})},document(...e){return _e.web(...e)}};import{template as Y}from"lodash";var ko=Y(`
|
|
244
|
+
#<%= values?._meta?.htmlID %> a:hover {
|
|
245
|
+
<% if (linkHoverColorChanged) { %>color: <%= values?.linkStyle?.linkHoverColor %>;<% } %>
|
|
246
|
+
<% if (linkHoverUnderlineChanged) { %>text-decoration: <%= values?.linkStyle?.linkHoverUnderline ? 'underline' : 'none' %>;<% } %>
|
|
247
|
+
}
|
|
248
|
+
`),vo=Y(`
|
|
249
|
+
#<%= values?._meta?.htmlID %> a {
|
|
250
|
+
<% if (linkColorChanged) { %>color: <%= values?.linkStyle?.linkColor %>;<% } %>
|
|
251
|
+
<% if (linkUnderlineChanged) { %>text-decoration: <%= values?.linkStyle?.linkUnderline ? 'underline' : 'none' %>;<% } %>
|
|
252
|
+
}
|
|
253
|
+
`),wo=Y(`
|
|
254
|
+
#<%= values?._meta?.htmlID %> table thead th {
|
|
255
|
+
vertical-align: <%= values?.headerVerticalAlign %>;
|
|
256
|
+
<% if (values?.headerPadding) { %>padding: <%= values?.headerPadding %>;<% } %>
|
|
257
|
+
<% if (values?.headerFontFamily?.value) { %>font-family: <%= values?.headerFontFamily?.value %>;<% } %>
|
|
258
|
+
<% if (values?.headerBackgroundColor) { %>background-color: <%= values?.headerBackgroundColor %>;<% } %>
|
|
259
|
+
<% if (values?.headerFontSize) { %>font-size: <%= values?.headerFontSize %>;<% } %>
|
|
260
|
+
<% if (values?.headerFontWeight) { %>font-weight: <%= values?.headerFontWeight %>;<% } %>
|
|
261
|
+
<% if (values?.headerTextAlign) { %>text-align: <%= values?.headerTextAlign %>;<% } %>
|
|
262
|
+
<% if (values?.headerColor) { %>color: <%= values?.headerColor %>;<% } %>
|
|
263
|
+
}
|
|
264
|
+
`),Co=Y(`
|
|
265
|
+
#<%= values?._meta?.htmlID %> table tfoot tr td {
|
|
266
|
+
vertical-align: <%= values?.footerVerticalAlign %>;
|
|
267
|
+
<% if (values?.footerPadding) { %>padding: <%= values?.footerPadding %>;<% } %>
|
|
268
|
+
<% if (values?.footerFontFamily?.value) { %>font-family: <%= values?.footerFontFamily?.value %>;<% } %>
|
|
269
|
+
<% if (values?.footerBackgroundColor) { %>background-color: <%= values?.footerBackgroundColor %>;<% } %>
|
|
270
|
+
<% if (values?.footerFontSize) { %>font-size: <%= values?.footerFontSize %>;<% } %>
|
|
271
|
+
<% if (values?.footerFontWeight) { %>font-weight: <%= values?.footerFontWeight %>;<% } %>
|
|
272
|
+
<% if (values?.footerTextAlign) { %>text-align: <%= values?.footerTextAlign %>;<% } %>
|
|
273
|
+
<% if (values?.footerColor) { %>color: <%= values?.footerColor %>;<% } %>
|
|
274
|
+
}
|
|
275
|
+
`),So=Y(`
|
|
276
|
+
#<%= values?._meta?.htmlID %> table tbody td {
|
|
277
|
+
vertical-align: <%= values?.contentVerticalAlign %>;
|
|
278
|
+
<% if (values?.contentPadding) { %>padding: <%= values?.contentPadding %>;<% } %>
|
|
279
|
+
<% if (values?.contentFontFamily?.value) { %>font-family: <%= values?.contentFontFamily?.value %>;<% } %>
|
|
280
|
+
<% if (values?.contentBackgroundColor) { %>background-color: <%= values?.contentBackgroundColor %>;<% } %>
|
|
281
|
+
<% if (values?.contentFontSize) { %>font-size: <%= values?.contentFontSize %>;<% } %>
|
|
282
|
+
<% if (values?.contentFontWeight) { %>font-weight: <%= values?.contentFontWeight %>;<% } %>
|
|
283
|
+
<% if (values?.contentTextAlign) { %>text-align: <%= values?.contentTextAlign %>;<% } %>
|
|
284
|
+
<% if (values?.contentColor) { %>color: <%= values?.contentColor %>;<% } %>
|
|
285
|
+
<% if (values?.contentLetterSpacing) { %>letter-spacing: <%= values?.contentLetterSpacing %>;<% } %>
|
|
286
|
+
<% if (values?.contentLineHeight) { %>line-height: <%= values?.contentLineHeight %>;<% } %>
|
|
287
|
+
}
|
|
288
|
+
`),ot={css(e,t,{displayMode:o}){let r=[];e?.enableHeader&&(e?.headerPadding||e?.headerFontFamily?.value||e?.headerBackgroundColor||e?.headerFontSize||e?.headerFontWeight||e?.headerTextAlign||e?.headerColor)&&r.push(wo({values:e})),e?.enableFooter&&(e?.footerPadding||e?.footerFontFamily?.value||e?.footerBackgroundColor||e?.footerFontSize||e?.footerFontWeight||e?.footerTextAlign||e?.footerColor)&&r.push(Co({values:e})),(e?.contentPadding||e?.contentFontFamily?.value||e?.contentBackgroundColor||e?.contentFontSize||e?.contentFontWeight||e?.contentTextAlign||e?.contentColor||e?.contentLetterSpacing||e?.contentLineHeight)&&r.push(So({values:e}));let{linkStyle:n}=e;if(!n?.inherit){let l=!!n?.linkColor&&n?.linkColor!==t?.linkStyle?.linkColor,s=n?.linkUnderline!==null&&n?.linkUnderline!==t?.linkStyle?.linkUnderline,a=l||s,d=!!n?.linkHoverColor&&n?.linkHoverColor!==t?.linkStyle?.linkHoverColor,p=n?.linkHoverUnderline!==null&&n?.linkHoverUnderline!==n?.linkUnderline,m=d||p;a&&r.push(vo({values:e,linkColorChanged:l,linkUnderlineChanged:s})),o==="web"&&m&&r.push(ko({values:e,linkHoverColorChanged:d,linkHoverUnderlineChanged:p}))}return r.join(`
|
|
289
|
+
`).trim()}};import rt from"lodash/template";var To=rt(`
|
|
290
|
+
<div class="v-color v-text-align v-line-height v-font-weight v-font-family v-font-size v-letter-spacing" style="<% if (values.fontFamily) { %>font-family: <%= values.fontFamily?.value %>; <% } %><% if (values.fontSize) { %>font-size: <%= values.fontSize %>; <% } %><% if (values.fontWeight) { %>font-weight: <%= values.fontWeight %>; <% } %><% if (values.color) { %>color: <%= values.color %>; <% } %><% if (values.letterSpacing) { %>letter-spacing: <%= values.letterSpacing %>; <% } %>line-height: <%= values.lineHeight %>; text-align: <%= values.textAlign %>; word-wrap: break-word;">
|
|
291
|
+
<%= text %>
|
|
292
|
+
</div>
|
|
293
|
+
`),Ao=rt(`
|
|
294
|
+
<div class="v-color v-text-align v-line-height v-font-weight v-font-family v-font-size v-letter-spacing" style="<% if (values.fontFamily) { %>font-family: <%= values.fontFamily?.value %>; <% } %><% if (values.fontSize) { %>font-size: <%= values.fontSize %>; <% } %><% if (values.fontWeight) { %>font-weight: <%= values.fontWeight %>; <% } %><% if (values.color) { %>color: <%= values.color %>; <% } %><% if (values.letterSpacing) { %>letter-spacing: <%= values.letterSpacing %>; <% } %>line-height: <%= values.lineHeight %>; text-align: <%= values.textAlign %>; word-wrap: break-word;"<% if (textDirection) { %> dir="<%= textDirection %>"<% } %>>
|
|
295
|
+
<%= text %>
|
|
296
|
+
</div>
|
|
297
|
+
`),ye={web(e,t,o,r,i,n,l,s){let{exporterConfig:a}=s||{},d=T(a?.toSafeHtml?a.toSafeHtml(e.text,{allowOnClick:!0}):e.text||"");return To({values:e,text:d})},email(e,t,o,r,i,n,l,s){let{exporterConfig:a}=s||{},d=T(a?.toSafeHtml?a.toSafeHtml(e.text):e.text||""),p=d.includes('dir="')?void 0:a?.textDirection;return Ao({values:e,text:d,textDirection:p})},document(...e){return ye.web?.(...e)||""}};import{template as it}from"lodash";var Ho=it(`
|
|
298
|
+
<% if (linkColor || linkUnderline) { %>
|
|
299
|
+
#<%= htmlID %> a {
|
|
300
|
+
<% if (linkColor) { %>color: <%= linkColor %>;<% } %>
|
|
301
|
+
<% if (linkUnderline) { %>text-decoration: <%= linkUnderline %>;<% } %>
|
|
302
|
+
}
|
|
303
|
+
<% } %>
|
|
304
|
+
`),Wo=it(`
|
|
305
|
+
<% if (linkHoverColor || linkHoverUnderline) { %>
|
|
306
|
+
#<%= htmlID %> a:hover {
|
|
307
|
+
<% if (linkHoverColor) { %>color: <%= linkHoverColor %>;<% } %>
|
|
308
|
+
<% if (linkHoverUnderline) { %>text-decoration: <%= linkHoverUnderline %>;<% } %>
|
|
309
|
+
}
|
|
310
|
+
<% } %>
|
|
311
|
+
`),nt={css(e,t,{displayMode:o}){e.linkStyle=e.linkStyle||{};let{linkStyle:r}=e;if(r.inherit)return;let i=!r.inherit&&r.linkColor&&r.linkColor!==t.linkStyle.linkColor?r.linkColor:void 0,n=!r.inherit&&typeof r.linkUnderline=="boolean"&&r.linkUnderline!==t.linkStyle.linkUnderline?r.linkUnderline?"underline":"none":void 0,l=!r.inherit&&r.linkHoverColor&&r.linkHoverColor!==(i||t.linkStyle.linkHoverColor)?r.linkHoverColor:void 0,s=!r.inherit&&typeof r.linkHoverUnderline=="boolean"&&r.linkHoverUnderline!==r.linkUnderline?r.linkHoverUnderline?"underline":"none":void 0,a=[];return(i||n)&&a.push(Ho({htmlID:e._meta.htmlID,linkColor:i,linkUnderline:n}).trim()),o!=="email"&&(l||s)&&a.push(Wo({htmlID:e._meta.htmlID,linkHoverColor:l,linkHoverUnderline:s}).trim()),a.filter(Boolean).join(`
|
|
312
|
+
`).trim()||void 0}};import xe from"lodash/template";function E(e,t){return A({...e.width,autoWidth:e?.width?.autoWidth,maxWidth:e?.width?.width,width:e?.countdown?.width,height:e?.countdown?.height},t,"width")}var Io=xe(`
|
|
313
|
+
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
314
|
+
<tr>
|
|
315
|
+
<td style="padding-right: 0px;padding-left: 0px;" align="<%= values.textAlign %>">
|
|
316
|
+
<% if (!isLinkAttrEmpty(linkAttrs)) { %><a <%= objectToHtmlAttrs(linkAttrs) %>><% } %>
|
|
317
|
+
<img align="<%= values.textAlign %>" border="0" src="<%= values.countdown.countdownUrl %>" alt="<%= values.altText %>" title="<%= values.altText %>" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block !important;border: none;height: auto;float: none;<%= imageCSSStyle %>"<% if (!!width) { %> width="<%= width %>"<% } %><% if (!!imageCSSClassName) { %> class="<%= imageCSSClassName %>"<% } %>/>
|
|
318
|
+
<% if (!isLinkAttrEmpty(linkAttrs)) { %></a><% } %>
|
|
319
|
+
</td>
|
|
320
|
+
</tr>
|
|
321
|
+
</table>
|
|
322
|
+
`,{imports:{isLinkAttrEmpty:C,objectToHtmlAttrs:k}}),Bo=xe(`
|
|
323
|
+
<div style="position:relative;line-height:0px;text-align:<%= values.textAlign %>">
|
|
324
|
+
<% if (!isLinkAttrEmpty(linkAttrs)) { %><a <%= objectToHtmlAttrs(linkAttrs) %>><% } %>
|
|
325
|
+
<img alt="<%= values.altText %>" class="<%= imageCSSClassName %>" src="<%= values.countdown.countdownUrl %>" style="<%= imageCSSStyle %>" title="<%= values.altText %>"/>
|
|
326
|
+
<% if (!isLinkAttrEmpty(linkAttrs)) { %></a><% } %>
|
|
327
|
+
</div>
|
|
328
|
+
`,{imports:{isLinkAttrEmpty:C,objectToHtmlAttrs:k}}),lt=xe(`
|
|
329
|
+
<div style="position:relative;line-height:0px;text-align:<%= values.textAlign %>">
|
|
330
|
+
<% if (!isLinkAttrEmpty(linkAttrs)) { %><a <%= objectToHtmlAttrs(linkAttrs) %>><% } %>
|
|
331
|
+
<amp-img
|
|
332
|
+
src="<%= values.countdown.countdownUrl %>"
|
|
333
|
+
class="<%= imageCSSClassName %>"
|
|
334
|
+
layout="responsive"
|
|
335
|
+
width="<%= values.countdown.width %>"
|
|
336
|
+
height="<%= values.countdown.height %>"
|
|
337
|
+
alt="<%= values.altText %>"
|
|
338
|
+
title="<%= values.altText %>"
|
|
339
|
+
style="display: inline-block;"
|
|
340
|
+
></amp-img>
|
|
341
|
+
<% if (!isLinkAttrEmpty(linkAttrs)) { %></a><% } %>
|
|
342
|
+
</div>
|
|
343
|
+
`,{imports:{isLinkAttrEmpty:C,objectToHtmlAttrs:k}}),at={web(e,t,o,r,i,n,l,s){let{columnIndex:a,columnValues:d,rowCells:p,rowValues:m,bodyValues:c}=s||{},{countdown:{loading:u,countdownUrl:f}}=e;if(u||!f)return"";let g=B(c),h=v({values:e,columnIndex:a,columnValues:d,rowCells:p,rowValues:m,bodyValues:c}),{imageCSSClassName:b,imageCSSStyle:_}=E(e,g?h:0);return Bo({values:e,imageCSSClassName:b,imageCSSStyle:_,linkAttrs:y(e.action)})},email(e,t,o,r,i,n,l,s){let{columnIndex:a,columnValues:d,rowCells:p,rowValues:m,bodyValues:c}=s||{},{countdown:{loading:u,countdownUrl:f}}=e;if(u||!f)return"";let g=v({values:e,columnIndex:a,columnValues:d,rowCells:p,rowValues:m,bodyValues:c}),{imageCSSClassName:h,imageStyleObj:b,imageCSSStyle:_}=E(e,g);return Io({imageCSSClassName:h,imageCSSStyle:_,linkAttrs:y(e.action),values:e,width:P(b.maxWidth||b.width,g)})},ampWeb(e,t,o,r,i,n,l,s){let{columnIndex:a,columnValues:d,rowCells:p,rowValues:m,bodyValues:c}=s||{},{countdown:u}=e;if(u?.loading||!u?.countdownUrl||!u?.width||!u?.height)return"";let f=B(c),g=v({values:e,columnIndex:a,columnValues:d,rowCells:p,rowValues:m,bodyValues:c}),{imageCSSClassName:h}=E(e,f?g:0);return lt({values:e,imageCSSClassName:h,linkAttrs:y(e.action)})},ampEmail(e,t,o,r,i,n,l,s){let{columnIndex:a,columnValues:d,rowCells:p,rowValues:m,bodyValues:c}=s||{},{countdown:u}=e;if(u?.loading||!u?.countdownUrl||!u?.width||!u?.height)return"";let f=v({values:e,columnIndex:a,columnValues:d,rowCells:p,rowValues:m,bodyValues:c}),{imageCSSClassName:g}=E(e,f);return lt({values:e,imageCSSClassName:g,linkAttrs:y(e.action)})}};import{template as $o}from"lodash";var Do=$o(`
|
|
344
|
+
<% if (imageCSSStyle) { %>
|
|
345
|
+
#<%= htmlID %> amp-img {
|
|
346
|
+
<%= imageCSSStyle %>
|
|
347
|
+
}
|
|
348
|
+
<% } %>
|
|
349
|
+
`),st={css(e,t,{variant:o,isViewer:r}){if(!r&&o==="amp"){let{imageCSSStyle:i}=E(e);if(!i)return;let n=Do({htmlID:e._meta.htmlID,imageCSSStyle:i}).trim();return n?U(n):void 0}}};import ct from"lodash/template";var ke=315/560;function ve(e,t="0px"){let{left:o,right:r}=H(t),i=parseInt(`${e||0}`,10)-(o||0)-(r||0),n=ke*i;return{embedWidth:i,embedHeight:n}}var Fo=ct(`
|
|
350
|
+
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
351
|
+
<tr>
|
|
352
|
+
<td style="padding-right: 0px; padding-left: 0px;" align="center">
|
|
353
|
+
<% if (!isLinkAttrEmpty(linkAttrs)) { %><a <%= objectToHtmlAttrs(linkAttrs) %>><% } %>
|
|
354
|
+
<img align="center" border="0" src="<%= video.thumbnail || (cdnBaseUrl + "/video/placeholder.png") %>" alt="Video" title="Video" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: block !important;border: none;height: auto;float: none;width: 100%;max-width: <%= embedWidth %>px;" width="<%= embedWidth %>" height="<%= embedHeight %>" class="fullwidth" aria-label="video thumbnail" />
|
|
355
|
+
<% if (!isLinkAttrEmpty(linkAttrs)) { %></a><% } %>
|
|
356
|
+
</td>
|
|
357
|
+
</tr>
|
|
358
|
+
</table>
|
|
359
|
+
`,{imports:{objectToHtmlAttrs:k,isLinkAttrEmpty:C}}),Po=ct(`
|
|
360
|
+
<div style="position: relative; padding-bottom: ${S(ke*100,2)}%; height: 0; overflow: hidden; max-width: 100%;">
|
|
361
|
+
<% if (video.loading || !video.videoId) { %>
|
|
362
|
+
<img
|
|
363
|
+
aria-label="video placeholder"
|
|
364
|
+
src="<%= cdnBaseUrl %>/video/placeholder.png" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"
|
|
365
|
+
width="<%= embedWidth %>"
|
|
366
|
+
height="<%= embedHeight %>"
|
|
367
|
+
/>
|
|
368
|
+
<% } %>
|
|
369
|
+
<% if (!video.loading && !!video.videoId && video.type == 'youtube') { %>
|
|
370
|
+
<iframe style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" width="<%= embedWidth %>" height="<%= embedHeight %>" src="https://www.youtube.com/embed/<%= video.videoId %>" frameBorder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
|
|
371
|
+
<% } %>
|
|
372
|
+
<% if (!video.loading && !!video.videoId && video.type == 'vimeo') { %>
|
|
373
|
+
<iframe style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" width="<%= embedWidth %>" height="<%= embedHeight %>" src="https://player.vimeo.com/video/<%= video.videoId %>" frameBorder="0" allowfullscreen></iframe>
|
|
374
|
+
<% } %>
|
|
375
|
+
</div>
|
|
376
|
+
`),dt={_email:(e,t,o,r,i,n,l,s)=>{let{bodyValues:a,columnIndex:d,columnValues:p,exporterConfig:m,rowCells:c,rowValues:u}=s||{},f=v({values:e,columnIndex:d,columnValues:p,rowCells:c,rowValues:u,bodyValues:a}),g=m?.cdnBaseUrl||"",{embedWidth:h,embedHeight:b}=ve(f),_=y(e.href);return Fo({cdnBaseUrl:g,embedWidth:h,embedHeight:b,video:e.video,linkAttrs:{..._,href:e?.href?.url||e.video.url}})}},we={web(e,t,o,r,i,n,l,s){let{bodyValues:a,columnIndex:d,columnValues:p,exporterConfig:m,rowCells:c,rowValues:u}=s||{},f=v({values:e,columnIndex:d,columnValues:p,rowCells:c,rowValues:u,bodyValues:a}),g=m?.cdnBaseUrl||"",{embedWidth:h,embedHeight:b}=ve(f);return Po({cdnBaseUrl:g,embedHeight:b,embedWidth:h,video:e.video})},email(...e){return dt._email(...e).replace(/\s+height="[\d.]+"/g,"")},ampWeb(...e){return we.web(...e).replace(/<iframe(\s)/g,'<amp-iframe sandbox="allow-scripts allow-same-origin" layout="responsive"$1').replace(/<\/iframe>/g,"</amp-iframe>").replace(/<img(\s)/g,'<amp-img layout="responsive"$1')},ampEmail(...e){return dt._email(...e).replace(/(<img\s+)align="center"\s+border="0"\s*/g,"$1").replace(/<img(\s)/g,'<amp-img layout="responsive"$1')}};var pt={tags(e,t,{displayMode:o,isViewer:r,variant:i}){let n=[];return i==="amp"&&o==="web"&&!r&&n.push('<script async custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>'),n}};import{template as K}from"lodash";import{isArray as Vo}from"lodash";var Eo=!0;function ut(e){switch(mt(e)){case"top-left":return[0,"auto","auto",0];case"top-center":return[0,"auto","auto","auto"];case"top-right":return[0,0,"auto","auto"];case"center-left":return["auto","auto","auto",0];case"center":return["auto"];case"center-right":return["auto",0,"auto","auto"];case"bottom-left":return["auto","auto",0,0];case"bottom-center":return["auto","auto",0,"auto"];case"bottom-right":return["auto",0,0,"auto"];default:return["auto"]}}function zo(e){let t=mt(e);switch(t){case"top-left":case"top-center":case"top-right":case"center-left":case"center-right":case"bottom-left":case"bottom-center":case"bottom-right":return t.split("-").reverse().join(" ");case"center":return"center center";default:return"auto auto"}}function z(e,{displayMode:t}){if(t==="email"&&!Eo)return;let{position:o,customPosition:r}=e||{};if(o!=="custom")return zo(o);if(o==="custom"&&Vo(r))return r.map(i=>i??"auto").join(" ")}function mt(e){switch(e){case"top":case"top-left":case"left":case"left-top":return"top-left";case"top-center":case"center-top":return"top-center";case"top-right":case"right":case"right-top":return"top-right";case"center":case"center-center":return"center";case"center-left":case"left-center":return"center-left";case"center-right":case"right-center":return"center-right";case"bottom":case"bottom-left":case"left-bottom":return"bottom-left";case"bottom-center":case"center-bottom":return"bottom-center";case"bottom-right":case"right-bottom":return"bottom-right";default:return}}var Ro=K(`
|
|
377
|
+
<div id="<%= values._meta.htmlID %>" class="<%= values._meta.htmlClassNames %>"<% if (style) { %> style="<%= style %>"<% } %>>
|
|
378
|
+
<%= innerHTML %>
|
|
379
|
+
</div>
|
|
380
|
+
`),Lo=K(`
|
|
381
|
+
<body id="<%= values._meta.htmlID %>" class="<%= values._meta.htmlClassNames %>">
|
|
382
|
+
<div class="<%= values._meta.htmlClassNames %> content<%= type === "headers" ? "-header" : type === "footers" ? "-footer" : "" %>"<% if (style) { %> style="<%= style %>"<% } %>>
|
|
383
|
+
<%= innerHTML %>
|
|
384
|
+
|
|
385
|
+
<% if (type !== "footers" && type !== "headers") { %>
|
|
386
|
+
<div style="page-break-before: always;" />
|
|
387
|
+
<% } %>
|
|
388
|
+
</div>
|
|
389
|
+
</body>
|
|
390
|
+
`),Uo=K(`
|
|
391
|
+
<body class="clean-body <%= values._meta.htmlClassNames %>" style="<%= style %>">
|
|
392
|
+
<!--[if IE]><div class="ie-container"><![endif]-->
|
|
393
|
+
<!--[if mso]><div class="mso-container"><![endif]-->
|
|
394
|
+
<table role="presentation" id="<%= values._meta.htmlID %>" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;min-width: 320px;Margin: 0 auto;background-color: <%= values.backgroundColor || "transparent" %>;width:100%" cellpadding="0" cellspacing="0">
|
|
395
|
+
<tbody><% if (preheaderText) { %>
|
|
396
|
+
<tr>
|
|
397
|
+
<td style="display:none !important;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;">
|
|
398
|
+
<%= preheaderText %>
|
|
399
|
+
</td>
|
|
400
|
+
</tr>
|
|
401
|
+
<% } %>
|
|
402
|
+
<tr style="vertical-align: top">
|
|
403
|
+
<td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top">
|
|
404
|
+
<!--[if (mso)|(IE)]><table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="<%= contentAlign %>" style="background-color: <%= bgcolor || "transparent" %>;"<% if (bgcolor) { %> bgcolor="<%= bgcolor %>"<% } %>><table role="presentation" cellpadding="0" cellspacing="0" border="0" width="<%= contentWidthNumber %>" align="<%= contentAlign %>" style="border-collapse: collapse;"><tr><td style="padding:0;"><![endif]-->
|
|
405
|
+
<%= innerHTML %>
|
|
406
|
+
<!--[if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]-->
|
|
407
|
+
</td>
|
|
408
|
+
</tr>
|
|
409
|
+
</tbody>
|
|
410
|
+
</table>
|
|
411
|
+
<!--[if mso]></div><![endif]-->
|
|
412
|
+
<!--[if IE]></div><![endif]-->
|
|
413
|
+
</body>
|
|
414
|
+
`),Mo=K(`
|
|
415
|
+
<div class="u-popup-main">
|
|
416
|
+
<% if (closeButton.html && closeButton.placement === 'header') { %>
|
|
417
|
+
<div class="u-popup-header">
|
|
418
|
+
<%= closeButton.html %>
|
|
419
|
+
</div>
|
|
420
|
+
<% } %>
|
|
421
|
+
|
|
422
|
+
<div class="u-popup-content">
|
|
423
|
+
<div
|
|
424
|
+
id="<%= values._meta.htmlID %>"
|
|
425
|
+
class="<%= values._meta.htmlClassNames %>"
|
|
426
|
+
style="<%= style %>">
|
|
427
|
+
<%= innerHTML %>
|
|
428
|
+
</div>
|
|
429
|
+
</div>
|
|
430
|
+
|
|
431
|
+
<% if (closeButton.html && closeButton.placement === 'footer') { %>
|
|
432
|
+
<div class="u-popup-footer">
|
|
433
|
+
<%= closeButton.html %>
|
|
434
|
+
</div>
|
|
435
|
+
<% } %>
|
|
436
|
+
</div>
|
|
437
|
+
`),ft={web(e,t){return Ro({innerHTML:e,values:t,style:"min-height: 100vh; display: flex; flex-direction: column;".trim()})},email(e,t,{bodyValues:o}){let{backgroundColor:r,textColor:i}=t,n=I(r),l=o?.contentAlign||"center",s=parseFloat(`${o?.contentWidth||600}`),a="margin: 0;padding: 0;-webkit-text-size-adjust: 100%;";return r&&(a+=`background-color: ${r};`),i&&(a+=`color: ${i}`),Uo({innerHTML:e,values:t,bgcolor:n,contentAlign:l,contentWidthNumber:s,preheaderText:t.preheaderText,style:a.trim()})},popup(e,t){let{borderRadius:o,contentVerticalAlign:r,fontFamily:i,popupBackgroundColor:n,popupBackgroundImage:l,popupCloseButton_action:s,popupCloseButton_position:a,popupHeight:d,textColor:p,fontWeight:m}=t,c="";if(r)switch(c+=" display: flex;",c+=" flex-direction: column;",r){case"top":{c+=" justify-content: flex-start;";break}case"bottom":{c+=" justify-content: flex-end;";break}default:{c+=" justify-content: center;";break}}d!=="auto"&&(c+=" min-height: 100%;".trim()),p&&(c+=` color: ${p};`.trim()),n&&(c+=` background-color: ${n};`.trim()),i&&(c+=` font-family: ${i?.value};`.trim()),m&&(c+=` font-weight: ${m};`.trim());let u=`${l?.url||""}`.trim().replace(/ /g,"%20");if(u){c+=` background-image: url('${u}');`,c+=` background-repeat: ${l?.repeat||"no-repeat"};`.trim();let h=z(l,{displayMode:"popup"});h&&(c+=` background-position: ${h};`.trim());let b=V(l,{displayMode:"popup"});b&&(c+=` background-size: ${b};`.trim())}o&&(c+=` border-radius: ${o};`);let g={html:jo({values:{linkAttrs:Ie(s)}}),placement:a?.startsWith("bottom")?"footer":"header"};return Mo({closeButton:g,innerHTML:e,style:c.trim(),values:t})},document(e,t,{type:o}){return Lo({innerHTML:e,values:t,type:o,style:`${o!=="headers"&&o!=="footers"?"min-height: 100vh;":""}`})}},jo=K(`
|
|
438
|
+
<a <%= objectToHtmlAttrs(values.linkAttrs) %> class="u-close-button">
|
|
439
|
+
<span class="icon-cross"></span>
|
|
440
|
+
</a>
|
|
441
|
+
`,{imports:{objectToHtmlAttrs:k}});import No from"lodash/template";var Oo=No(`
|
|
442
|
+
<% if (displayMode === "web") { %>
|
|
443
|
+
body {
|
|
444
|
+
font-family: <%= (fontFamily?.value) || 'Arial, Helvetica, sans-serif' %>;
|
|
445
|
+
font-size: <%= fontSize || '1rem' %>;
|
|
446
|
+
line-height: <%= lineHeight || '1.5' %>;
|
|
447
|
+
color: <%= textColor || '#000000' %>;
|
|
448
|
+
background-color: <%= backgroundColor || '#fff' %>;
|
|
449
|
+
<% if (values.fontWeight) { %>font-weight: <%= values.fontWeight %>; <% } %>
|
|
450
|
+
<% if (backgroundImage?.url) { %>
|
|
451
|
+
background-image: url('<%= backgroundImage.url %>');
|
|
452
|
+
background-repeat: <%= backgroundImage.repeat || 'no-repeat' %>;
|
|
453
|
+
<% if (backgroundPosition) { %>background-position: <%= backgroundPosition %>;<% } %>
|
|
454
|
+
<% if (backgroundSize) { %>background-size: <%= backgroundSize %>;<% } %>
|
|
455
|
+
<% } %>
|
|
456
|
+
}
|
|
457
|
+
<% } %>
|
|
458
|
+
|
|
459
|
+
<% if (displayMode === "document") { %>
|
|
460
|
+
.content<% if (type && type !== "") { %>-<%= type %><% } %> {
|
|
461
|
+
width: 100%;
|
|
462
|
+
font-family: <%= (fontFamily?.value) || 'Arial, Helvetica, sans-serif' %>;
|
|
463
|
+
font-size: 15px;
|
|
464
|
+
color: <%= textColor || '#000000' %>;
|
|
465
|
+
<% if (backgroundImage?.url) { %>
|
|
466
|
+
background-image: url('<%= backgroundImage?.url %>');
|
|
467
|
+
background-repeat: <%= backgroundImage?.repeat ? 'repeat' : 'no-repeat' %>;
|
|
468
|
+
background-position: <%= backgroundImage?.center ? 'center top' : 'left top' %>;
|
|
469
|
+
<% if (backgroundImage?.cover) { %>background-size: cover;<% } %>
|
|
470
|
+
<% } else { %>
|
|
471
|
+
background-color: <%= backgroundColor || '#fff' %>;
|
|
472
|
+
<% } %>
|
|
473
|
+
-webkit-print-color-adjust: exact;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
<% if (type && type !== "") { %>
|
|
477
|
+
#<%= type %> .content-<%= type %> {
|
|
478
|
+
width: 28cm;
|
|
479
|
+
transform: scale(0.75);
|
|
480
|
+
transform-origin: top left;
|
|
481
|
+
}
|
|
482
|
+
<% } %>
|
|
483
|
+
<% } %>
|
|
484
|
+
|
|
485
|
+
<% if (displayMode === "email" && !!textColor) { %>
|
|
486
|
+
table, td {
|
|
487
|
+
color: <%= textColor %>;
|
|
488
|
+
}
|
|
489
|
+
<% } %>
|
|
490
|
+
<% if (displayMode === "popup") { %>
|
|
491
|
+
.u-popup-container a {
|
|
492
|
+
<% } else { %>
|
|
493
|
+
#<%= values._meta.htmlID %> a {
|
|
494
|
+
<% } %>
|
|
495
|
+
<% if (!!linkColor) { %>color: <%= linkColor %>;<% } %>
|
|
496
|
+
text-decoration: <%= linkUnderline ? 'underline' : 'none' %>;
|
|
497
|
+
}
|
|
498
|
+
<% if (displayMode !== "email") { %>
|
|
499
|
+
#<%= values._meta.htmlID %> a:hover {
|
|
500
|
+
<% if (!!linkHoverColor) { %>color: <%= linkHoverColor %>;<% } %>
|
|
501
|
+
text-decoration: <%= linkHoverUnderline ? 'underline' : 'none' %>;
|
|
502
|
+
}
|
|
503
|
+
<% } %>
|
|
504
|
+
<% if (displayMode === "popup") { %>
|
|
505
|
+
.u-popup-container {
|
|
506
|
+
position: absolute;
|
|
507
|
+
left: 0;
|
|
508
|
+
right: 0;
|
|
509
|
+
bottom: 0;
|
|
510
|
+
top: 0;
|
|
511
|
+
display: flex;
|
|
512
|
+
flex-direction: column;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.u-popup-container .u-popup-overlay {
|
|
516
|
+
position: fixed;
|
|
517
|
+
left: 0;
|
|
518
|
+
right: 0;
|
|
519
|
+
bottom: 0;
|
|
520
|
+
top: 0;
|
|
521
|
+
background-color: <%= values.popupOverlay_backgroundColor %>;
|
|
522
|
+
z-index: 98;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
.u-popup-container .u-popup-main {
|
|
526
|
+
width: 100%;
|
|
527
|
+
max-width: <%= values.popupWidth || '80%' %>;
|
|
528
|
+
height: <%= values.popupHeight || '80%' %>;
|
|
529
|
+
margin: <%= popupMargin %>;
|
|
530
|
+
z-index: 99;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.u-popup-container .u-popup-header,
|
|
534
|
+
.u-popup-container .u-popup-footer {
|
|
535
|
+
position: relative;
|
|
536
|
+
width: 100%;
|
|
537
|
+
max-width: <%= values.popupWidth || '80%' %>;
|
|
538
|
+
margin: <%= popupMargin %>;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
.u-popup-container .u-popup-content {
|
|
542
|
+
height: 100%;
|
|
543
|
+
overflow-y: <%= values.popupHeight === 'auto' ? 'inherit' : 'auto' %>;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
<% if (typeof closeButton !== 'undefined' && !!closeButton) { %>
|
|
547
|
+
.u-popup-container .u-close-button {
|
|
548
|
+
position: absolute;
|
|
549
|
+
<% if (closeButton.position === 'top-left') { %>
|
|
550
|
+
top: 0px;
|
|
551
|
+
left: 0px;
|
|
552
|
+
<% } else if (closeButton.position === 'bottom-left') { %>
|
|
553
|
+
bottom: 0px;
|
|
554
|
+
left: 0px;
|
|
555
|
+
<% } else if (closeButton.position === 'bottom-right') { %>
|
|
556
|
+
bottom: 0px;
|
|
557
|
+
right: 0px;
|
|
558
|
+
<% } else { %>
|
|
559
|
+
top: 0px;
|
|
560
|
+
right: 0px;
|
|
561
|
+
<% } %>
|
|
562
|
+
display: flex;
|
|
563
|
+
flex-flow: column nowrap;
|
|
564
|
+
justify-content: center;
|
|
565
|
+
align-items: center;
|
|
566
|
+
margin: <%= closeButton.margin || '0px' %>;
|
|
567
|
+
padding: 0px;
|
|
568
|
+
width: 40px;
|
|
569
|
+
height: 40px;
|
|
570
|
+
background-color: <%= closeButton.backgroundColor %>;
|
|
571
|
+
border: 0;
|
|
572
|
+
border-radius: <%= closeButton.borderRadius || '0px' %>;
|
|
573
|
+
cursor: pointer;
|
|
574
|
+
z-index: 99;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.u-popup-container .u-close-button .icon-cross {
|
|
578
|
+
margin: 0;
|
|
579
|
+
padding: 0;
|
|
580
|
+
border: 0;
|
|
581
|
+
background: none;
|
|
582
|
+
position: relative;
|
|
583
|
+
width: 20px;
|
|
584
|
+
height: 20px;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.u-popup-container .u-close-button .icon-cross:before,
|
|
588
|
+
.u-popup-container .u-close-button .icon-cross:after {
|
|
589
|
+
content: "";
|
|
590
|
+
position: absolute;
|
|
591
|
+
top: 8px;
|
|
592
|
+
left: 0;
|
|
593
|
+
right: 0;
|
|
594
|
+
height: 3px;
|
|
595
|
+
background-color: <%= closeButton.iconColor %>;
|
|
596
|
+
border-radius: 6px;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.u-popup-container .u-close-button .icon-cross:before {
|
|
600
|
+
transform: rotate(45deg);
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.u-popup-container .u-close-button .icon-cross:after {
|
|
604
|
+
transform: rotate(-45deg);
|
|
605
|
+
}
|
|
606
|
+
<% } %>
|
|
607
|
+
<%= containerStyle %>
|
|
608
|
+
<% } %>
|
|
609
|
+
`),gt={css(e,t,{displayMode:o,type:r,isViewer:i,headConfig:n}){let l=n?.getInitialValues?.("bodies")||{},{backgroundColor:s,backgroundImage:a,fontFamily:d,fontSize:p,lineHeight:m,popupCloseButton_backgroundColor:c,popupCloseButton_borderRadius:u,popupCloseButton_iconColor:f,popupCloseButton_margin:g,popupCloseButton_position:h,textColor:b,popupDisplayDelay:_}=e,x="",w={...l.linkStyle,...e.linkStyle||{}};w.linkColor=w.linkColor||void 0,w.linkUnderline=w.linkUnderline||void 0,w.linkHoverColor=w.linkHoverColor||void 0,w.linkHoverUnderline=w.linkHoverUnderline||void 0;let L=r==="headers"?"header":r==="footers"?"footer":"";return!i&&_>0&&(x+=`
|
|
610
|
+
.u-popup-container {
|
|
611
|
+
display: none;
|
|
612
|
+
}
|
|
613
|
+
`),Oo({values:e,displayMode:o,type:L,backgroundColor:s,backgroundImage:a,backgroundPosition:z(a,{displayMode:o}),backgroundSize:V(a,{displayMode:o}),fontFamily:d||{},fontSize:p,lineHeight:m,textColor:b,popupMargin:ut(e.popupPosition).join(" "),...w,closeButton:{backgroundColor:c,borderRadius:u,iconColor:f,margin:g,position:h},containerStyle:x})},tags({popupDisplayDelay:e=0},t,{isViewer:o,variant:r}){let i=[];return r==="amp"&&!o&&i.push('<script async src="https://cdn.ampproject.org/v0.js"></script>'),r==="amp"&&o&&i.push('<script async src="https://cdn.ampproject.org/v0/validator_wasm.js"></script>'),!o&&e>0&&i.push(`
|
|
614
|
+
<script>
|
|
615
|
+
setTimeout(() => {
|
|
616
|
+
document.querySelector('.u-popup-container').style.display = 'flex';
|
|
617
|
+
}, ${e} * 1000);
|
|
618
|
+
</script>
|
|
619
|
+
`),i}};import{template as bt}from"lodash";function Ce(e={},{important:t=!1}={}){let{borderTopWidth:o,borderTopStyle:r,borderTopColor:i,borderLeftWidth:n,borderLeftStyle:l,borderLeftColor:s,borderRightWidth:a,borderRightStyle:d,borderRightColor:p,borderBottomWidth:m,borderBottomStyle:c,borderBottomColor:u}=e,f=parseInt(o||"0px")>0,g=parseInt(n||"0px")>0,h=parseInt(a||"0px")>0,b=parseInt(m||"0px")>0,_=t?" !important":"",x="";return x+=`border-top: ${o||"0px"} ${r||"solid"} ${f&&i||"transparent"}${_};`,x+=`border-left: ${n||"0px"} ${l||"solid"} ${g&&s||"transparent"}${_};`,x+=`border-right: ${a||"0px"} ${d||"solid"} ${h&&p||"transparent"}${_};`,x+=`border-bottom: ${m||"0px"} ${c||"solid"} ${b&&u||"transparent"}${_};`,x}import{first as nl,keys as ll,sortBy as al,uniqBy as dl}from"lodash";var pl=typeof process<"u"&&process?.env?.JEST_WORKER_ID!==void 0;function Se({rowSpan:e,colSpan:t}){let o=ht(t/e*100);return{value:o,className:Jo(o)}}function ht(e){return Math.round(e*100)/100}function Jo(e){return`${ht(e)}`.replace(/\./g,"p")}var Qo=bt(`
|
|
620
|
+
<div id="<%= values._meta.htmlID %>" class="<%= colClass %> <%= values._meta.htmlClassNames %> v-row-align-items v-col-background-color v-col-border v-col-border-radius" style="display:flex;<% if (rowValues.alignItems) { %>align-items:<%= rowValues.alignItems %>;<% } %><% if (values.backgroundColor) { %>background-color:<%= values.backgroundColor %>;<% } %><% if (border) { %><%= border %><% } %><% if (borderRadius) { %><%= borderRadius %><% } %>">
|
|
621
|
+
<div class="v-col-padding" style="width: 100%;padding:<%= padding %>;">
|
|
622
|
+
<%= innerHTML %>
|
|
623
|
+
</div>
|
|
624
|
+
</div>
|
|
625
|
+
`),Zo=bt(`
|
|
626
|
+
<!--[if (mso)|(IE)]><td align="center" width="<%= tableWidth %>" class="v-col-background-color v-col-border v-col-border-radius" style="<% if (values.backgroundColor) { %>background-color: <%= values.backgroundColor %>;<% } %>width: <%= tableWidth %>px;<% if (border) { %><%= border %><% } %><% if (borderRadius) { %><%= borderRadius %><% } %>" valign="top"><table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td class="v-col-padding" style="padding: <%= padding %>;"><![endif]-->
|
|
627
|
+
<div id="<%= values._meta.htmlID %>" class="u-col u-col-<%= widthPercent %> <%= values._meta.htmlClassNames %>" style="max-width: 320px;min-width: <%= width %>px;display: table-cell;vertical-align: top;">
|
|
628
|
+
<div class="v-col-background-color v-col-border-radius" style="<% if (values.backgroundColor) { %>background-color: <%= values.backgroundColor %>;<% } %>height: 100%;width: 100% !important;<% if (borderRadius) { %><%= borderRadius %><% } %>">
|
|
629
|
+
<!--[if (!mso)&(!IE)]><!--><div class="v-col-padding v-col-border v-col-border-radius" style="box-sizing: border-box; height: 100%; padding: <%= padding %>;<% if (border) { %><%= border %><% } %><% if (borderRadius) { %><%= borderRadius %><% } %>"><!--<![endif]-->
|
|
630
|
+
<%= innerHTML %>
|
|
631
|
+
<!--[if (!mso)&(!IE)]><!--></div><!--<![endif]-->
|
|
632
|
+
</div>
|
|
633
|
+
</div>
|
|
634
|
+
<!--[if (mso)|(IE)]></td></tr></table></td><![endif]-->`),ee={web(e,t,o,r,i,n){let l=r.reduce((u,f)=>u+f,0),s=r[o],d=`u-col u-col-${Se({rowSpan:l,colSpan:s}).className}`,p=Ce(t.border),m=t.borderRadius&&`border-radius: ${t.borderRadius};`,c=t.padding||"0px";return Qo({innerHTML:e,values:t,rowValues:n,colClass:d,border:p,padding:c,borderRadius:m})},email(e,t,o,r,i,n){let l=r.reduce((b,_)=>b+_,0),s=r[o],a=parseFloat(`${i.contentWidth||0}`),d=s/l*a,p=Se({rowSpan:l,colSpan:s}).className,m=Ce(t.border),c=t.border&&t.border.borderLeftWidth?parseInt(t.border.borderLeftWidth):0,u=t.border&&t.border.borderRightWidth?parseInt(t.border.borderRightWidth):0,f=Math.floor(d-c-u),g=t.padding||"0px",h=t.borderRadius&&`border-radius: ${t.borderRadius};`+re(t.borderRadius);return Zo({innerHTML:e,values:t,width:S(d,2),tableWidth:f,widthPercent:p,border:m,padding:g,borderRadius:h})},ampWeb(...e){return ee.web?.(...e)||""},ampEmail(...e){return ee.ampWeb?.(...e)||""},document(...e){return ee.web?.(...e)||""}};var _t={};import Te from"lodash/template";function ne(e,{amp:t=!1,defaultDevice:o="desktop"}={}){if(t)return!1;let r=e?._override?.desktop||{},i=e?._override?.tablet||{},n=e?._override?.mobile||{};switch(o){case"desktop":return!!r.hideDesktop;case"tablet":return!!i.hideTablet;case"mobile":return!!n.hideMobile;default:return!1}}import vl from"react";function R(e,t){return e&&!t?`<a name="${e}"></a>`:""}var Go=Te(`<%= anchor %>
|
|
635
|
+
<div id="<%= values._meta.htmlID %>" class="<%= values._meta.htmlClassNames %> v-container-padding-padding<% if (desktop.hideDesktop) { %> hide-desktop<% } %><% if (tablet.hideTablet) { %> hide-tablet<% } %><% if (mobile.hideMobile) { %> hide-mobile<% } %>" style="overflow-wrap: break-word;padding: <%= values.containerPadding %>;">
|
|
636
|
+
<%= innerHTML %>
|
|
637
|
+
</div>
|
|
638
|
+
`),qo=Te(`<%= anchor %>
|
|
639
|
+
<div id="<%= values._meta.htmlID %>" class="<%= values._meta.htmlClassNames %> v-container-padding" style="overflow-wrap: break-word;<% if (values.containerPadding) { %>padding: <%= values.containerPadding %>;<% } %>">
|
|
640
|
+
<%= innerHTML %>
|
|
641
|
+
</div>
|
|
642
|
+
`),Xo=Te(`<% if (anchor) { %><%= anchor %>
|
|
643
|
+
<% } %><% if (shouldHideByDefault) { %><!--[if !mso]><!--><% } %>
|
|
644
|
+
<table id="<%= values._meta.htmlID %>" class="<%= values._meta.htmlClassNames %><% if (shouldHideByDefault) { %> hide-default__display-table<% } %><% if (desktop.hideDesktop) { %> hide-desktop<% } %><% if (tablet.hideTablet) { %> hide-tablet<% } %><% if (mobile.hideMobile) { %> hide-mobile<% } %>" style="<% if (shouldHideByDefault) { %>display: none;mso-hide: all;<% } %>font-family:<%= bodyValues.fontFamily?.value %>;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
|
|
645
|
+
<tbody>
|
|
646
|
+
<tr>
|
|
647
|
+
<td class="v-container-padding-padding" style="overflow-wrap:break-word;word-break:break-word;padding:<%= values.containerPadding %>;font-family:<%= bodyValues.fontFamily?.value %>;" align="left">
|
|
648
|
+
<%= innerHTML %>
|
|
649
|
+
</td>
|
|
650
|
+
</tr>
|
|
651
|
+
</tbody>
|
|
652
|
+
</table>
|
|
653
|
+
<% if (shouldHideByDefault) { %><!--<![endif]--><% } %>`),yt={web(e,t,o,{variant:r}){return Go({innerHTML:e,values:t,anchor:R(t?.anchor,r==="amp"),desktop:t?._override?.desktop||{},tablet:t?._override?.tablet||{},mobile:t?._override?.mobile||{}})},email(e,t,o,r){let{defaultDevice:i,variant:n}=r;return Xo({innerHTML:e,values:t,bodyValues:o,anchor:R(t?.anchor,n==="amp"),shouldHideByDefault:ne(t,{amp:n==="amp",defaultDevice:i}),desktop:t?._override?.desktop||{},tablet:t?._override?.tablet||{},mobile:t?._override?.mobile||{}})},document(e,t){return qo({innerHTML:e,values:t,anchor:R(t?.anchor)})}};var xt={};import vt from"lodash/template";var Yo=vt(`<%= anchor %>
|
|
654
|
+
<<%= wrapperTag %> id="<%= values._meta.htmlID %>" class="<%= values._meta.htmlClassNames %> v-row-padding v-row-background-image--outer v-row-background-color<% if (desktop.hideDesktop) { %> hide-desktop<% } %><% if (tablet.hideTablet) { %> hide-tablet<% } %><% if (mobile.hideMobile) { %> hide-mobile<% } %>" style="<%= containerStyle %>">
|
|
655
|
+
<div class="container v-row-background-image--inner v-row-columns-background-color-background-color" style="<%= innerContainerStyle %>">
|
|
656
|
+
<div class="u-row<% if (mobile.noStackMobile) { %> no-stack<% } %> v-row-align-items"<% if (rowStyle) { %> style="<%= rowStyle %>"<% } %>>
|
|
657
|
+
<%= innerHTML %>
|
|
658
|
+
</div>
|
|
659
|
+
</div>
|
|
660
|
+
</<%= wrapperTag %>>
|
|
661
|
+
`),Ko=vt(`<%= anchor %>
|
|
662
|
+
<% if (shouldHideByDefault) { %><!--[if !mso]><!--><% } %>
|
|
663
|
+
<% if (hasBackgroundImageURL) { %>
|
|
664
|
+
<!--[if gte mso 9]>
|
|
665
|
+
<table role="presentation" cellpadding="0" cellspacing="0" border="0" width="<%= contentWidthNumber %>"<% if (bgcolor) { %> bgcolor="<%= bgcolor %>"<% } %>>
|
|
666
|
+
<tr>
|
|
667
|
+
<td background="<%= values.backgroundImage.url %>" valign="top">
|
|
668
|
+
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:<%= contentWidthWithUnit %>;">
|
|
669
|
+
<v:fill type="<%= backgroundImageRepeat ? 'tile' : 'frame' %>" src="<%= values.backgroundImage.url %>" />
|
|
670
|
+
<v:textbox style="mso-fit-shape-to-text:true" inset="0,0,0,0">
|
|
671
|
+
<![endif]-->
|
|
672
|
+
<% } %>
|
|
673
|
+
<<%= wrapperTag %> id="<%= values._meta.htmlID %>" class="u-row-container <%= values._meta.htmlClassNames %> v-row-padding--vertical v-row-background-image--outer v-row-background-color<% if (shouldHideByDefault) { %> hide-default__display-block<% } %><% if (desktop.hideDesktop) { %> hide-desktop<% } %><% if (tablet.hideTablet) { %> hide-tablet<% } %><% if (mobile.hideMobile) { %> hide-mobile<% } %>" style="<% if (shouldHideByDefault) { %>display: none;mso-hide: all;<% } %><% if (padding) { %>padding: <%= padding %>;<% } %><% if (hasBackgroundImageURL && !!values.backgroundImage.fullWidth) { %>background-image: url('<%= values.backgroundImage.url %>');background-repeat: <%= values.backgroundImage.repeat || "no-repeat" %>;<% if (backgroundPosition) { %>background-position: <%= backgroundPosition %>;<% } %><% } %><% if (backgroundSize) { %>background-size: <%= backgroundSize %>;<% } %>background-color: <%= bgcolor || "transparent" %>;">
|
|
674
|
+
<div class="u-row v-row-columns-background-color-background-color<% if (mobile.noStackMobile) { %> no-stack<% } %>" style="margin: <%= margin %>;min-width: 320px;max-width: <%= contentWidthWithUnit %>;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: <%= columnsBgcolor || "transparent" %>;">
|
|
675
|
+
<div class="v-row-background-image--inner" style="border-collapse: collapse;display: table;width: 100%;height: 100%;<% if (hasBackgroundImageURL && !values.backgroundImage.fullWidth) { %>background-image: url('<%= values.backgroundImage.url %>');background-repeat: <%= values.backgroundImage.repeat || "no-repeat" %>;<% if (backgroundPosition) { %>background-position: <%= backgroundPosition %>;<% } %><% } %><% if (backgroundSize) { %>background-size: <%= backgroundSize %>;<% } %>background-color: transparent;">
|
|
676
|
+
<!--[if (mso)|(IE)]><table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td class="v-row-padding v-row-background-image--outer v-row-background-color" style="<% if (padding) { %>padding: <%= padding %>;<% } %><% if (hasBackgroundImageURL && !!values.backgroundImage.fullWidth) { %>background-image: url('<%= values.backgroundImage.url %>');background-repeat: <%= values.backgroundImage.repeat || "no-repeat" %>;<% if (backgroundPosition) { %>background-position: <%= backgroundPosition %>;<% } %><% } %><% if (backgroundSize) { %>background-size: <%= backgroundSize %>;<% } %>background-color: <%= bgcolor || "transparent" %>;"><table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%"<% if (columnsBgcolor) { %> bgcolor="<%= columnsBgcolor %>"<% } %>><tr class="v-row-background-image--inner v-row-columns-background-color-background-color" style="<% if (hasBackgroundImageURL && !values.backgroundImage.fullWidth) { %>background-image: url('<%= values.backgroundImage.url %>');background-repeat: <%= values.backgroundImage.repeat || "no-repeat" %>;<% if (backgroundPosition) { %>background-position: <%= backgroundPosition %>;<% } %><% } %><% if (backgroundSize) { %>background-size: <%= backgroundSize %>;<% } %>background-color: <%= columnsBgcolor || "transparent" %>;"><![endif]-->
|
|
677
|
+
<%= innerHTML %>
|
|
678
|
+
<!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]-->
|
|
679
|
+
</div>
|
|
680
|
+
</div>
|
|
681
|
+
</<%= wrapperTag %>>
|
|
682
|
+
<% if (hasBackgroundImageURL) { %>
|
|
683
|
+
<!--[if gte mso 9]>
|
|
684
|
+
</v:textbox>
|
|
685
|
+
</v:rect>
|
|
686
|
+
</td>
|
|
687
|
+
</tr>
|
|
688
|
+
</table>
|
|
689
|
+
<![endif]-->
|
|
690
|
+
<% } %>
|
|
691
|
+
<% if (shouldHideByDefault) { %><!--<![endif]--><% } %>
|
|
692
|
+
`),te={web(e,t,o,{collection:r,variant:i}){let{backgroundColor:n,backgroundImage:l,padding:s,columnsBackgroundColor:a,alignItems:d}=t,p=parseFloat(`${o.contentWidth||0}`)==o.contentWidth?`${parseFloat(`${o.contentWidth||0}`)}px`:o.contentWidth,m=o.contentAlign==="left"?"0 auto 0 0":o.contentAlign==="right"?"0 0 0 auto":"0 auto",c=z(l,{displayMode:"web"}),u=V(l,{displayMode:"web"}),f="";n&&(f+=`background-color: ${n};`),s&&(f+=` padding: ${s};`),l?.url&&l?.fullWidth&&(f+=`background-image: url('${l.url}');`,f+=`background-repeat: ${l?.repeat||"no-repeat"};`,c&&(f+=`background-position: ${c};`),u&&(f+=`background-size: ${u};`)),r==="footers"&&(f+="margin-top: auto");let g=`max-width: ${p};margin: ${m};`;a&&(g+=`background-color: ${a};`),l?.url&&!l?.fullWidth&&(g+=`background-image: url('${l.url}');`,g+=`background-repeat: ${l?.repeat||"no-repeat"};`,c&&(g+=`background-position: ${c};`),u&&(g+=`background-size: ${u};`));let h="";d&&(h+=` align-items: ${d};`),f=f.trim(),g=g.trim(),h=h.trim();let b=R(t.anchor,i==="amp");return Yo({innerHTML:e,values:t,containerStyle:f,innerContainerStyle:g,rowStyle:h,anchor:b,wrapperTag:kt(r),desktop:t?._override?.desktop||{},tablet:t?._override?.tablet||{},mobile:t?._override?.mobile||{}})},email(e,t,o,r){let{defaultDevice:i,variant:n,collection:l}=r,s=I(t.backgroundColor),a=I(t.columnsBackgroundColor),d=parseFloat(`${o.contentWidth||0}`),p=d==o.contentWidth?`${d}px`:o.contentWidth,m=o.contentAlign==="left"?"0 auto 0 0":o.contentAlign==="right"?"0 0 0 auto":"0 auto",{padding:c}=t,u=R(t.anchor,n==="amp");return Ko({innerHTML:e,values:t,bgcolor:s,columnsBgcolor:a,contentWidthNumber:d,contentWidthWithUnit:p,hasBackgroundImageURL:!!t?.backgroundImage?.url,backgroundImage:t.backgroundImage,backgroundPosition:z(t.backgroundImage,{displayMode:"email"}),backgroundSize:V(t.backgroundImage,{displayMode:"email"}),margin:m,padding:c,shouldHideByDefault:ne(t,{amp:n==="amp",defaultDevice:i}),anchor:u,backgroundImageRepeat:typeof t?.backgroundImage?.repeat=="string"?t?.backgroundImage?.repeat.includes("repeat")&&t?.backgroundImage?.repeat!=="no-repeat":t?.backgroundImage?.repeat,desktop:t?._override?.desktop||{},tablet:t?._override?.tablet||{},mobile:t?._override?.mobile||{},wrapperTag:kt(l)})},ampWeb(...e){return te.web?.(...e)||""},ampEmail(...e){return te.ampWeb?.(...e)||""},document(...e){return te.web?.(...e)||""}},kt=e=>e==="headers"?"header":e==="footers"?"footer":"div";var wt={};var pa=24,ua={href:{name:"web",values:{href:"",target:"_blank"}},buttonColors:{color:"#FFFFFF",backgroundColor:"#0879A1",hoverColor:"#FFFFFF",hoverBackgroundColor:"#0879A1"},size:{autoWidth:!0,width:"100%"},fontSize:"14px",lineHeight:"120%",textAlign:"center",padding:"10px 20px",border:{},borderRadius:"4px"},ma={width:"100%",border:{borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"#BBBBBB"},textAlign:"center"},fa={headingType:"h1",fontSize:"22px",textAlign:"left",lineHeight:"140%",linkStyle:{inherit:!0,linkColor:"#0000ee",linkHoverColor:"#0000ee",linkUnderline:!0,linkHoverUnderline:!0}},ga={html:"<strong>Hello, world!</strong>"},ha={src:{url:"https://cdn.tools.unlayer.com/image/placeholder.png",width:1600,height:400},textAlign:"center",altText:"",action:{name:"web",values:{href:"",target:"_blank"}}},ba={menu:{items:[]},fontSize:"14px",textColor:"#444444",linkColor:"#0068A5",align:"center",layout:"horizontal",separator:"",padding:"5px 15px"},_a={fontSize:"14px",textAlign:"left",lineHeight:"140%",linkStyle:{inherit:!0,linkColor:"#0000ee",linkHoverColor:"#0000ee",linkUnderline:!0,linkHoverUnderline:!0}},ya={icons:{iconType:"circle",icons:[]},align:"center",iconSize:32,spacing:5},xa={columns:2,rows:2,border:{borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"#CCC",borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"#CCC",borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"#CCC",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"#CCC"},stripedRows:!1,stripedRowsBackgroundColor:"#CCC",enableHeader:!0,headerBackgroundColor:"#DDDDDD",headerFontWeight:700,headerFontSize:"14px",headerTextAlign:"left",headerVerticalAlign:"middle",headerPadding:"10px",contentBackgroundColor:"#FFFFFF",contentFontSize:"14px",contentTextAlign:"left",contentVerticalAlign:"middle",contentLineHeight:"140%",contentPadding:"10px",enableFooter:!1,footerBackgroundColor:"#DDDDDD",footerFontWeight:700,footerFontSize:"14px",footerTextAlign:"left",footerVerticalAlign:"middle",footerPadding:"10px",linkStyle:{body:!0,linkColor:"#0000ee",linkHoverColor:"#0000ee",linkUnderline:!0,linkHoverUnderline:!0}},ka={fontSize:"14px",textAlign:"left",lineHeight:"140%",linkStyle:{inherit:!0,linkColor:"#0000ee",linkHoverColor:"#0000ee",linkUnderline:!0,linkHoverUnderline:!0}},va={countdown:{countdownUrl:"https://cdn.tools.unlayer.com/countdown/countdown.gif",endTime:"",backgroundColor:"#FFFFFF",labelColor:"#A3A3A3",labelFontFamily:"Open Sans",labelFontSize:16,digitColor:"#404040",digitFontFamily:"Open Sans",digitFontSize:40,timezone:"America/Los_Angeles",locale:null,showLabels:!0,width:660,height:147},width:{autoWidth:!0,width:"100%"},textAlign:"center",altText:"Countdown",action:{name:"web",values:{href:"",target:"_blank"}}},wa={video:{}},Ca={displayCondition:null,columns:!1,_styleGuide:null,backgroundColor:"",columnsBackgroundColor:"",backgroundImage:{url:"",fullWidth:!0,repeat:"no-repeat",size:"custom",position:"center"},padding:"0px",anchor:"",noStackMobile:!1,_meta:{},selectable:!0,draggable:!0,duplicatable:!0,deletable:!0,hideable:!0,locked:!1},Sa={backgroundColor:"",padding:"0px",border:{},borderRadius:"0px",_meta:{},deletable:!0,locked:!1},Ta={_styleGuide:null,popupPosition:"center",popupDisplayDelay:0,popupWidth:"600px",popupHeight:"auto",borderRadius:"10px",contentAlign:"center",contentVerticalAlign:"middle",contentWidth:"500px",fontFamily:{label:"Arial",value:"arial,helvetica,sans-serif"},textColor:"#000000",popupBackgroundColor:"#FFFFFF",popupBackgroundImage:{url:"",fullWidth:!0,repeat:"no-repeat",size:"cover",position:"center"},popupOverlay_backgroundColor:"rgba(0, 0, 0, 0.1)",popupCloseButton_position:"top-right",popupCloseButton_backgroundColor:"#DDDDDD",popupCloseButton_iconColor:"#000000",popupCloseButton_borderRadius:"0px",popupCloseButton_margin:"0px",popupCloseButton_action:{name:"close_popup",attrs:{onClick:"document.querySelector('.u-popup-container').style.display = 'none';"}},language:{},backgroundColor:"#F7F8F9",preheaderText:"",linkStyle:{body:!0,linkColor:"#0000ee",linkHoverColor:"#0000ee",linkUnderline:!0,linkHoverUnderline:!0},backgroundImage:{url:"",fullWidth:!0,repeat:"no-repeat",size:"custom",position:"center"},accessibilityTitle:"",_meta:{}},Aa={Button:de,Divider:O,Heading:pe,Html:Ne,Image:me,Menu:Ge,Paragraph:he,Social:ie,Table:_e,Text:ye,Timer:at,Video:we,Body:ft,Column:ee,Content:yt,Row:te},Ha={Button:Fe||void 0,Divider:void 0,Heading:Le||void 0,Html:void 0,Image:Je||void 0,Menu:void 0,Paragraph:Ye||void 0,Social:void 0,Table:ot||void 0,Text:nt||void 0,Timer:st||void 0,Video:pt||void 0,Body:gt||void 0,Column:_t||void 0,Content:xt||void 0,Row:wt||void 0};export{Ta as BodyDefaults,ft as BodyExporters,gt as BodyHead,ua as ButtonDefaults,de as ButtonExporters,Fe as ButtonHead,Sa as ColumnDefaults,ee as ColumnExporters,_t as ColumnHead,yt as ContentExporters,xt as ContentHead,ma as DividerDefaults,O as DividerExporters,fa as HeadingDefaults,pe as HeadingExporters,Le as HeadingHead,ga as HtmlDefaults,Ne as HtmlExporters,ha as ImageDefaults,me as ImageExporters,Je as ImageHead,ba as MenuDefaults,Ge as MenuExporters,_a as ParagraphDefaults,he as ParagraphExporters,Ye as ParagraphHead,Ca as RowDefaults,te as RowExporters,wt as RowHead,ya as SocialDefaults,ie as SocialExporters,xa as TableDefaults,_e as TableExporters,ot as TableHead,ka as TextDefaults,ye as TextExporters,nt as TextHead,va as TimerDefaults,at as TimerExporters,st as TimerHead,wa as VideoDefaults,we as VideoExporters,pt as VideoHead,Aa as exporters,Ha as heads,pa as schemaVersion};
|