PageSourceSearch

https://www.keywordseo.com.tw/wp-content/plugins/xpro-elementor-addons/assets/vendor/js/reveal-fx.js?ver=1.0.0

js keywordseo.com.tw collected 2026-09-24 09:31:50 UTC 3,875 bytes, 8 lines download raw bytes

1/**
2 * Minified by jsDelivr using Terser v5.39.0.
3 * Original file: /npm/[email protected]/src/revealFx.js
4 *
5 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6 */
7!function(e){"use strict";function t(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function n(e,t,n){var i=document.createElement(e);return i.className=t||"",i.innerHTML=n||"",i}function i(e,t,n,i,r,s,a,o,l,y,c){e.style.position=t||"absolute",e.style.top=n||"0",e.style.left=i||"0",e.style.color=a||"#fff",e.style.width=r||"100%",e.style.height=s||"100%",e.style.backgroundColor=o||"#f0f0f0",e.style.opacity=l||"0",e.style.pointerEvents=y||"none",e.style.zIndex=c||0}function r(e,n){this.el=e,this.revealLayers=[],this.options=t({},this.options),t(this.options,n),this._init()}r.prototype.options={isContentHidden:!0,layers:1,revealSettings:{direction:"lr",bgColors:["#111"],duration:500,easing:"easeInOutQuint",coverArea:0,delay:100,onHalfway:function(e,t){return!1},onStart:function(e,t){return!1},onComplete:function(e,t){return!1}}},r.prototype._init=function(){this._layout()},r.prototype._layout=function(){var e=getComputedStyle(this.el).position;"fixed"!==e&&"absolute"!==e&&"relative"!==e&&(this.el.style.position="relative");this.content=n("div","block-revealer__content",this.el.innerHTML),this.options.isContentHidden&&(this.content.style.opacity=0),this.el.innerHTML="",this.el.appendChild(this.content);var t=0,r=0;const s=this.options.layers;for(var a="#111",o=0;o<s;o++){if(this.revealLayers.push(n("div","block-revealer__element")),a=this.options.revealSettings.bgColors[o]?this.options.revealSettings.bgColors[o]:"#111111","tb"===this.options.revealSettings.direction||"bt"===this.options.revealSettings.direction){var l=100/s;i(this.revealLayers[o],"absolute","0%",r+"%",l+"%","100%","#fff",a,"0","none"),r+=l}else{var y=100/s;i(this.revealLayers[o],"absolute",t+"%","0%","100%",y+.5+"%","#fff",a,"0","none"),t+=y}this.el.classList.add("block-revealer"),this.el.appendChild(this.revealLayers[o])}},r.prototype._getTransformSettings=function(e){var t,n,i;switch(e){case"lr":default:i="scaleY(1)",t="0 50%",n="100% 50%";break;case"rl":i="scaleY(1)",t="100% 50%",n="0 50%";break;case"tb":i="scaleX(1)",t="50% 0",n="50% 100%";break;case"bt":i="scaleX(1)",t="50% 100%",n="50% 0"}return{val:i,origin:{initial:t,halfway:n}}},r.prototype.reveal=function(e){if(this.isAnimating)return!1;this.isAnimating=!0;for(var t=500,n="easeInOutQuint",i=100,r=["#111111"],s="lr",a=0,o=(e=e||this.options.revealSettings).direction||s,l=e.delay||i,y=this._getTransformSettings(o),c=0;c<this.revealLayers.length;c++)this.revealLayers[c].style.WebkitTransform=this.revealLayers[c].style.transform=y.val,this.revealLayers[c].style.WebkitTransformOrigin=this.revealLayers[c].style.transformOrigin=y.origin.initial,this.revealLayers[c].style.opacity=1,e.bgColors[c]?this.revealLayers[c].style.backgroundColor=e.bgColors[c]:this.revealLayers[c].style.backgroundColor=r[0];var f=this,v={targets:f.revealLayers,delay:anime.stagger(parseInt(l)),complete:function(t){"function"==typeof e.onComplete&&e.onComplete(f.content,f.revealLayers),f.isAnimating=!1}},h={targets:f.revealLayers,delay:anime.stagger(parseInt(l)),complete:function(){for(var t=0;t<f.revealLayers.length;t++)f.revealLayers[t].style.WebkitTransformOrigin=f.revealLayers[t].style.transformOrigin=y.origin.halfway;"function"==typeof e.onHalfway&&e.onHalfway(f.content,f.revealLayers),anime(v)}};h.duration=v.duration=e.duration||t,h.easing=v.easing=e.easing||n;var p=e.coverArea||a;"lr"===o||"rl"===o?(h.scaleX=[0,1],v.scaleX=[1,p/100]):(h.scaleY=[0,1],v.scaleY=[1,p/100]),"function"==typeof e.onStart&&e.onStart(f.content,f.revealLayers),anime(h)},e.RevealFx=r}(window);
8//# sourceMappingURL=/sm/19202fedb180e5c4a39bf67a29065412e4dec99d702a5d46ecb1f7170ce3bdb8.map

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.