%PDF- %PDF-
Direktori : /var/www/projetos/korean.ongrace.com/wp-content/plugins/otter-blocks/build/animation/ |
Current File : /var/www/projetos/korean.ongrace.com/wp-content/plugins/otter-blocks/build/animation/anim-typing.js |
!function(){"use strict";const t={none:void 0,"o-typing-slower":.4,"o-typing-slow":.25,"o-typing-fast":.05,"o-typing-faster":.01};var e;e=()=>{const e={root:null,rootMargin:"0px",threshold:[.6]};let n="\n\t\t.o-anim-typing-caret::after {\n\t\t\tfont-weight: 100;\n\t\t\tcontent: '|';\n\t\t\tcolor: #2E3D48;\n\t\t\tanimation: 1s blink step-end infinite;\n\t\t}\n\t\n\t\t@keyframes blink {\n\t\t\tfrom, to {\n\t\t\t color: transparent;\n\t\t }\n\t\t\t50% {\n\t\t\t color: black;\n\t\t }\n\t\t}\n\t";n=n.replace(/(\r\n|\n|\r|\t)/gm,"");let i=!1;setTimeout((()=>{document.querySelectorAll("o-anim-typing").forEach((l=>{if(!i){const t=document.createElement("style");t.innerText=n,document.head.appendChild(t),i=!0}const o=(e=>{const n=(null==e?void 0:e.innerHTML)||"",i=(e=>{let n=e.parentElement;for(let e=0;e<3;++e)if(Array.from(n.classList).some((t=>t.includes("o-typing-")))){var i,l;const e=Array.from(n.classList),o=e.filter((t=>t.includes("o-typing-delay-"))).pop(),r=parseInt((null==o||null===(i=o.split("-"))||void 0===i?void 0:i[3])||"0"),s=null==o?void 0:o.includes("ms"),a=Object.keys(t),c=(null==e||null===(l=e.filter((t=>a.includes(t))))||void 0===l?void 0:l.pop())||"fast";return{speed:t[c],delay:r*(s?0:1e3)}}})(e);null!=n&&n.length||returnl;const l=n.length,o=((null==i?void 0:i.speed)||.1)*l,{start:r,steps:s,stop:a}=((t,e)=>{let n,i=0;const l=Math.ceil(t/e)+1||1,o=t=>{clearInterval(n),null==t||t()};return{steps:l,start:(t,r)=>{n=setInterval((()=>{i<l?(null==t||t(i),i+=1):o(r)}),1e3*e)},stop:o}})(o,(null==i?void 0:i.speed)||.1),c=document.createElement("span");c.classList.add("o-anim-typing-caret"),c.style.whiteSpace="pre-wrap";const d=document.createElement("span");d.style.whiteSpace="pre-wrap",d.style.visibility="hidden";const p=e.innerHTML;return e.innerHTML="",e.appendChild(c),e.appendChild(d),c.innerHTML=n.slice(0,0),d.innerHTML=n.slice(0),()=>{setTimeout((()=>{r((t=>{c.innerHTML=n.slice(0,t),t<l&&(d.innerHTML=n.slice(t)),l>=s&&a()}),(()=>{e.innerHTML=p}))}),(null==i?void 0:i.delay)||0)}})(l),r=new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&0<t.intersectionRect.height&&(r.unobserve(l),o())}))}),e);r.observe(l)}))}),100)},"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",e):e())}();