function textUpdate(){var h=ad.root.querySelectorAll(".text:not(.clip), .text-left:not(.clip), .text-right:not(.clip), .text-bottom:not(.clip), .text-top-left:not(.clip)");var a=ad.root.querySelectorAll(".text.clip, .text-left.clip, .text-right.clip, .text-bottom.clip, .text-top-left.clip");if(a&&a.length){for(var e=0;en){var j=m.innerHTML;var l=j.split(" ");var p=l.length;for(var f=0;fn){var j=g.innerHTML;var l=j.split(" ");var p=l.length;for(var f=0;fn||m.offsetWidth>c){for(var f=o-1;f>0;f--){g.style.fontSize=f+"px";if(m.offsetHeight<=n&&m.offsetWidth<=c){break}}}}else{var d=g.style.height;g.style.height="auto";if(g.offsetHeight>n||g.offsetWidth>c){for(var f=o-1;f>0;f--){g.style.fontSize=f+"px";if(g.offsetHeight<=n&&g.offsetWidth<=c){break}}}g.style.height=d}}}var clipText=function(g,a){if(g.length&&g.length>a){var e=g.match(/\<.*?\>/g);g=g.split(/\<.*?\>/g);var h=0,d=true;g=g.map(function(i){if(d){if((h+i.length)>a){d=false;i=i.substring(0,(a-h))+"..."}}else{i=""}h+=i.length;return i});var f=g,c=e,b;if(f.length/g);d=d&&d.length?d:[];var g=e.innerHTML.split(/\<.*?\>/g);var h=0,c=true;g=g.map(function(i){return i.split("").map(function(j){return''+j+""}).join("")});var f=g,b=d,a;if(f.length/g).join("").split(/\<\/type\>/g).join("")}};var typingAnimation=function(c,d,b){if(c){addTypingContent(c);var a=setInterval(function(){var e=c.querySelectorAll("type.transparent");if(e&&e.length){e[0].removeAttribute("class")}else{clearInterval(a);removeTypingContent(c);if(b&&typeof b=="function"){b()}}},d)}};var Ad=function(d){var b=d.width,o=d.height,m=d.root;var a="borderWidth" in d&&d.borderWidth?d.borderWidth:1;var e="borderColor" in d&&d.borderColor?d.borderColor:"#000";var h={},k={},n=[];var l=function(t,q){if(t&&typeof t=="string"){var u=t;t=[];t.push(u)}if(t&&typeof t=="object"&&t.length){var s=[];var r=document.querySelector("head");function p(v){s.push(this);if(s.length==t.length){q(s)}}t.forEach(function(y){if(y&&typeof y=="string"&&y.length){if(y.indexOf(".js")>0){var v=document.createElement("script");v.type="text/javascript";v.onload=p;v.src=y;r.appendChild(v)}else{if(y.indexOf(".css")>0){var w=document.createElement("style");w.type="text/css";w.setAttribute("rel","stylesheet");w.onload=p;w.setAttribute("href",y);r.appendChild(w)}else{var x=new Image();x.onload=p;x.src=y}}}})}};var g=function(p,r){var q=typeof p=="string"&&p&&p.length&&m.querySelector(p)?m.querySelector(p):p;if(q&&r&&r.length){q.textContent=r;while(q.clientHeight
';var s=document.createElement("div");s.className="ad-borders";s.innerHTML=t;m.appendChild(s)};var i=function(r,q){var p=r.match(/\!\{(.*?)\}/g);if(p){p.forEach(function(u){var s=u.split("!{").join("").split("}").join("");for(var t in q){if(t==s){s=q[t]}}r=r.split(u).join(s)})}return r};var f=function(){var t=m.innerHTML.replace(/(\r\n|\n|\r)/gm," ").trim();var z=t.split(" ");while(z.length>1){t=t.split(" ").join(" ").split("> <").join("><");z=t.split(" ")}var u=n[0];m.innerHTML=t;var y=m.querySelectorAll("[data-image]");if(y.length){for(var v=0;v';w.removeAttribute("data-image")}}var r=m.querySelectorAll("[data-text]");if(r.length){for(var v=0;v"+(w.dataset.text.indexOf("!{")==-1?(w.dataset.text in u?u[w.dataset.text]:w.dataset.text):i(w.dataset.text,u))+"";w.removeAttribute("data-text")}}t=m.innerHTML;t=i(t,u);m.innerHTML=t;var p=document.querySelectorAll("[data-dynamic]");for(var v=0;v