","");case Ae:return'').concat(i||"
","");default:return'').concat(i||"
","")}}},{key:"getRowFirstFontSettings",value:function(e){for(var t={},n=ve()(e,1)[0];n.children;){n=ve()(n.children,1)[0]}var r=this.calculateFontSize(n);return t.fontSize="".concat(r,"px"),t.fontWeight=n.fontSettings.fontWeight,t.fontStyle=n.fontSettings.fontStyle,t.fontFamily="'".concat(n.fontSettings.fontPrefix||"").concat(n.fontSettings.fontFamily.replace(new RegExp("'","g"),"\\'"),"'"),t}},{key:"serialize",value:function(e){var t=this;if(void 0!==e.text)return this.parseTextElement(e);var n=e.children.map((function(e){return t.serialize(e)})).join(""),r=e.style||{};return delete r.fontUrl,delete r.fontType,delete r.fontFaceUrl,r=q()({},r,{},this.getRowFirstFontSettings(e.children)),e.type,'
').concat(n,"
")}},{key:"hasWordAnimation",value:function(e){var t=e.buildIn,n=e.buildOut,r="none"!==t.type,i="none"!==n.type;return r&&("alpha-words"===t.type||"blur-words"===t.type)||i&&("alpha-words"===n.type||"blur-words"===n.type)}},{key:"recursivelySerializeListElement",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!e.type)return this.parseTextElement(e);var i=n,a=r;e.type===xe&&(a+=1),e.type===Se&&(i+=1);var o=function(){if(e.type===Se)switch(i){case 1:return"disc";case 2:return"circle";case 3:return"disc";default:return""}else if(e.type===xe)switch(a){case 1:return"arabic";case 2:return"lower-latin";case 3:return"lower-roman";default:return""}return""},s=e.children.map((function(e){return t.recursivelySerializeListElement(e,i,a)})).join(""),l="";if(e.children&&e.children[0]&&e.children[0].color){var c=e.children[0],u=c.color,d=c.gradient,p=u;d&&"solid"===d.type?p=d.scolor:d&&"lgrad"===d.type?p=d.gradColors[0].c:d&&"rgrad"===d.type&&(p=d.gradColors[d.gradColors.length-1].c),l+="color:".concat(p,";")}if(e.children&&e.children[0]&&e.children[0][Ce.FONT_SETTINGS]){var h=e.children[0][Ce.FONT_SETTINGS];h.fontFamily&&(l+="font-family:'".concat(h.fontPrefix||"").concat(h.fontFamily.replace(new RegExp("'","g"),"\\'"),"';")),h.fontWeight&&(l+="font-weight:'".concat(h.fontWeight,"';")),h.fontStyle&&(l+="font-style:'".concat(h.fontStyle,"';"))}this.hasWordAnimation(this.properties)&&(l+="display:block; vertical-align:top;");var f=this.getFirstLeaf(),y=this.calculateFontSize(f);l+="font-size:".concat(y,"px;");var b="\n margin-top: 0;\n margin-bottom: 0;\n padding-left: 12px;\n list-style-type:".concat(o(),";\n list-style-position: inside;\n ");switch(e.type){case ke:return'- ').concat(s,"
- ').concat(s,"
Author
-
Arnie Aurellano is chief reporter and website content editor at Scotsman Guide.