1!(function (e, t) { 2 "use strict"; 3 4 var i = { 5 init: function () { 6 7 elementorFrontend.hooks.addAction( 'frontend/element_ready/rivax-fancy-text.default', i.Fancy_Animated_Text ); 8 }, 9 Fancy_Animated_Text: function (t) { 10 t.find('.rivax-fancy-text-list').addClass('initialized'); 11 if (!t.find(".rivax-fancy-text").hasClass("type")) { 12 t.find('.rivax-fancy-text-list').css('width', t.find('.rivax-fancy-text-item.is-visible').outerWidth()); 13 } 14 15 let i = t.find(".rivax-fancy-text").data("animation-settings"); 16 let n = i.animationDelay, 17 a = i.loadingBar, 18 s = a - 3e3, 19 o = i.lettersDelay, 20 l = i.typeLettersDelay, 21 r = i.duration, 22 d = r + 800, 23 c = i.revealDuration, 24 p = i.revealAnimationDelay; 25 26 function animateFancyText() { 27 var i, o; 28 t 29 .find(".rivax-fancy-text.letters") 30 .find("b") 31 .each(function () { 32 var t = e(this), 33 i = t.text().split(""), 34 n = t.hasClass("is-visible"); 35 for (let e in i) { 36 if (i[e] == " ") { 37 i[e] = " "; 38 } 39 i[e] = n ? '<i class="in">' + i[e] + "</i>" : "<i>" + i[e] + "</i>"; 40 } 41 var a = i.join(""); 42 t.html(a); 43 } 44 ); 45 i = t.find(".rivax-fancy-text"); 46 o = n; 47 48 i.each(function () { 49 var t = e(this); 50 if (t.hasClass("bar-loading")) { 51 o = a; 52 setTimeout(function () { 53 t.find(".rivax-fancy-text-list").addClass("is-loading"); 54 }, s); 55 } 56 else if (t.hasClass("clip")) { 57 var i = t.find(".rivax-fancy-text-list"), 58 n = i.outerWidth(); 59 i.css("width", n); 60 } 61 else if (t.hasClass("rotate-1")) { 62 var l = t.find(".rivax-fancy-text-item"), 63 r = 0, 64 d = 0; 65 l.each(function () { 66 (d = e(this).outerWidth()) > r && (r = d);
67 }); 68 69 t.find(".rivax-fancy-text-list").css("min-width", r); 70 71 } 72 73 setTimeout(function () { 74 hideWord(t.find(".is-visible").eq(0)); 75 }, o); 76 77 }); 78 } 79 80 function hideWord($word) { 81 var nextWord = takeNext($word); 82 83 if(!$word.parents(".rivax-fancy-text").hasClass("clip") && !$word.parents(".rivax-fancy-text").hasClass("type")) { 84 $word.parent(".rivax-fancy-text-list").css('width', nextWord.outerWidth()); 85 } 86 87 if ($word.parents(".rivax-fancy-text").hasClass("type")) { 88 89 var parentFancy = $word.parent(".rivax-fancy-text-list"); 90 parentFancy.addClass("selected").removeClass("waiting"); 91 setTimeout(function () { 92 parentFancy.removeClass("selected"); 93 $word.removeClass("is-visible").addClass("is-hidden").children("i").removeClass("in").addClass("out"); 94 }, r); 95 setTimeout(function () { 96 showWord(nextWord, l); 97 }, d); 98 } 99 else if ($word.parents(".rivax-fancy-text").hasClass("letters")) { 100 101 var p = $word.children("i").length >= nextWord.children("i").length; 102 switchWord($word, nextWord); 103 hideLetter($word.find("i").eq(0), $word, p, o); 104 showLetter(nextWord.find("i").eq(0), nextWord, p, o); 105 } 106 else if( $word.parents(".rivax-fancy-text").hasClass("clip") ) { 107 108 $word.parents(".rivax-fancy-text-list").animate({ width: "2px" }, c, function () { 109 switchWord($word, nextWord); 110 showWord(nextWord); 111 }); 112 } 113 else if( $word.parents(".rivax-fancy-text").hasClass("bar-loading") ) { 114 115 $word.parents(".rivax-fancy-text-list").removeClass("is-loading"); 116 switchWord($word, nextWord); 117 setTimeout(function () { 118 hideWord(nextWord); 119 }, a); 120 setTimeout(function () { 121 $word.parents(".rivax-fancy-text-list").addClass("is-loading"); 122 }, s); 123 } 124 else { 125 126 switchWord($word, nextWord); 127 setTimeout(function () { 128 hideWord(nextWord); 129 }, n); 130 } 131 } 132 133 function showWord($word, $duration) { 134 135 if( $word.parents(".rivax-fancy-text").hasClass("type") ) { 136 137 showLetter($word.find("i").eq(0), $word, false, $duration); 138 $word.addClass("is-visible").removeClass("is-hidden"); 139 } 140 else if( $word.parents(".rivax-fancy-text").hasClass("clip") ) { 141 142 $word.parents(".rivax-fancy-text-list").animate({ width: $word.outerWidth() }, c, function () { 143 setTimeout(function () { 144 hideWord($word); 145 }, p); 146 }); 147 } 148 } 149 150 function hideLetter($letter, $word, $bool, $duration) { 151 152 $letter.removeClass("in").addClass("out"); 153 if( $letter.is(":last-child") ) { 154 155 $bool && 156 setTimeout(function () { 157 hideWord(takeNext($word)); 158 }, n); 159 } 160 else { 161 162 setTimeout(function () { 163 hideLetter($letter.next(), $word, $bool, $duration); 164 }, $duration); 165 } 166 } 167 168 function showLetter($letter, $word, $bool, $duration) { 169 170 $letter.addClass("in").removeClass("out"); 171 if( $letter.is(":last-child") ) { 172 173 if ( $word.parents(".rivax-fancy-text").hasClass("type") ) { 174 setTimeout(function () { 175 $word.parents(".rivax-fancy-text-list").addClass("waiting"); 176 }, 200); 177 } 178 179 if (!$bool) { 180 setTimeout(function () { 181 hideWord($word); 182 }, n); 183 } 184 } 185 else { 186 setTimeout(function () { 187 showLetter($letter.next(), $word, $bool, $duration); 188 }, $duration); 189 } 190 } 191 192 function takeNext($word) { 193 return $word.is(":last-child") ? $word.parent().children().eq(0) : $word.next(); 194 } 195 196 function switchWord($oldWord, $newWord) { 197 $oldWord.removeClass("is-visible").addClass("is-hidden"); 198 $newWord.removeClass("is-hidden").addClass("is-visible"); 199 } 200 201 animateFancyText(); 202 }, 203 }; 204 e(window).on("elementor/frontend/init", i.init); 205})(jQuery, window.elementorFrontend);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.