1"use strict";function _typeof(obj){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(obj2){return typeof obj2}:_typeof=function(obj2){return obj2&&typeof Symbol=="function"&&obj2.constructor===Symbol&&obj2!==Symbol.prototype?"symbol":typeof obj2},_typeof(obj)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _get(target,property,receiver){return typeof Reflect!="undefined"&&Reflect.get?_get=Reflect.get:_get=function(target2,property2,receiver2){var base=_superPropBase(target2,property2);if(base){var desc=Object.getOwnPropertyDescriptor(base,property2);return desc.get?desc.get.call(receiver2):desc.value}},_get(target,property,receiver||target)}function _superPropBase(object,property){for(;!Object.prototype.hasOwnProperty.call(object,property)&&(object=_getPrototypeOf(object),object!==null););return object}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}function _inherits(subClass,superClass){if(typeof superClass!="function"&&superClass!==null)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf||function(o2,p2){return o2.__proto__=p2,o2},_setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){return call&&(_typeof(call)==="object"||typeof call=="function")?call:_assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _isNativeReflectConstruct(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o2){return o2.__proto__||Object.getPrototypeOf(o2)},_getPrototypeOf(o)}(function(window2){var SlideFX=(function(_window$AbstractEleme){_inherits(SlideFX2,_window$AbstractEleme);var _super=_createSuper(SlideFX2);_createClass(SlideFX2,null,[{key:"GLITCH_EFFECT",get:function(){return"glitch_effect"}},{key:"ADJUSTMENT_EFFECT",get:function(){return"adjustment_effect"}}]);function SlideFX2(id,options){var _this;_classCallCheck(this,SlideFX2);var OPTIONS_MANDATORY={watchResize:!0,watchResizeTimeout:900};return options=$.extend(!0,_.clone(options),OPTIONS_MANDATORY),_this=_super.call(this,id,options),_this.$canvas=null,_this.$img=_this.$domElement.find("img"),_this.textureSourceEl=_this.$img.get(0),_this.$vid=_this.$domElement.find("video"),_this.video=_this.$vid.get(0),_this.$canvasWrapper=$('<div class="slide-hover-fx__canvas-wrapper" style="\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n "></div>'),_this.$domElement.append(_this.$canvasWrapper),_this}return _createClass(SlideFX2,[{key:"init",value:function(){var _this2=this;this.textureSourceEl?this.textureSourceEl.complete?this._initCanvas():this.$img.on("load",function(event){_this2._initCanvas()}):this.video&&(this.video.videoWidth?this._initCanvas():this.$vid.one("loadedmetadata",function(event){event.stopPropagation(),_this2._initCanvas()})),_get(_getPrototypeOf(SlideFX2.prototype),"init",this).call(this)}}
1,{key:"_initCanvas",value:function(){var _this3=this;this.textureSourceEl?(this.MEDIA_ORIGINAL_WIDTH=this.textureSourceEl.naturalWidth,this.MEDIA_ORIGINAL_HEIGHT=this.textureSourceEl.naturalHeight):this.video&&(this.MEDIA_ORIGINAL_WIDTH=this.video.videoWidth,this.MEDIA_ORIGINAL_HEIGHT=this.video.videoHeight),this.sprite=new PIXI.Sprite,this.$img.length?(this.sprite.texture=PIXI.Texture.fromImage(this.textureSourceEl.currentSrc),this.sprite.texture.on("update",function(event){_this3.resizeTimeoutHandler()})):this.$vid.length&&(this.sprite.texture=PIXI.Texture.fromVideo(this.video.currentSrc.replace(/\?.*$/,"")),this.sprite.texture.baseTexture.source.muted=!0,this.resizeTimeoutHandler()),this.fx=new GlitchFX,this.sprite.filters=this.fx.filters,window2.render=this.renderer=PIXI.autoDetectRenderer(this.$canvasWrapper.width(),this.$canvasWrapper.height(),{transparent:!0,antialias:!0,resolution:1}),this.renderer.autoResize=!0,this.$canvasWrapper.html(this.renderer.view),this.$canvas=this.$canvasWrapper.find("canvas"),window2.stage=this.stage=new PIXI.Container,this.stage.addChild(this.sprite),this.options.mode=="interactive"?(this.$domElement.on("pointerenter",this.pointerEnterHandler.bind(this)),this.$domElement.on("pointerleave",this.pointerLeaveHandler.bind(this))):this.options.mode=="auto"&&this.play(),this.fx.onStart=function(){TweenMax.set(_this3.$canvasWrapper,{opacity:1}),_this3.renderer.render(_this3.stage)},this.fx.onUpdate=function(){_this3.renderer.render(_this3.stage)},this.fx.onComplete=function(){_this3.pointerLeaveHandler(),_this3.options.mode=="auto"&&(_this3._autoModeTimeout=window2.setTimeout(_this3.startFX.bind(_this3),2e3+Math.random()*5e3))},this.resizeTimeoutHandler(),this.pointerLeaveHandler()}},{key:"play",value:function(){this._kill(),this._autoModeTimeout=window2.setTimeout(this.startFX.bind(this),this.options.mode=="auto"?2e3+Math.random()*5e3:0)}},{key:"pause",value:function(){this.pointerLeaveHandler()}},{key:"_disposeWebGL",value:function(){this.renderer&&(this.renderer.destroy(!0),this.renderer=null),this.stage&&(this.stage.destroy(),this.stage=null),this.$canvas=null}},{key:"startFX",value:function(){this._kill(),this.fx.run()}},{key:"pointerEnterHandler",value:function(event){event&&event.stopPropagation(),this.startFX()}},{key:"pointerLeaveHandler",value:function(event){event&&event.stopPropagation(),this._kill(),TweenMax.set(this.$canvasWrapper,{opacity:0})}},{key:"resizeTimeoutHandler",value:function(){var event=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;this.renderer&&this.renderer.resize(this.$canvasWrapper.width(),this.$canvasWrapper.height());var PROPS=window2.ObjectFitResizer.fit(this.$canvasWrapper.width(),this.$canvasWrapper.height(),this.MEDIA_ORIGINAL_WIDTH,this.MEDIA_ORIGINAL_HEIGHT,window2.ObjectFitResizer.RESIZE_TYPE_COVER,!1);!this.sprite||!this.sprite.texture.baseTexture||(this.sprite.x=PROPS.x,this.sprite.y=PROPS.y,this.sprite.width=PROPS.width,this.sprite.height=PROPS.height,this.renderer&&this.renderer.render(this.stage))}},{key:"dispose",value:function(){this.pointerLeaveHandler(),window2.clearTimeout(this._autoModeTimeout),this.sprite&&(this.sprite.texture&&this.sprite.texture.off(),this.sprite.destroy(),this.sprite=null),this._disposeWebGL(),this.$domElement.off(),this.$img.off(),this.$img=null,_get(_getPrototypeOf(SlideFX2.prototype),"dispose",this).call(this)}},{key:"_kill",value:function(){this.fx&&this.fx.kill(),window2.clearTimeout(this._autoModeTimeout)}}]),SlideFX2})(window2.AbstractElement);window2.SlideFX=SlideFX;var GlitchFX=(function(){function GlitchFX2(){_classCallCheck(this,GlitchFX2),this.glitch=new PIXI.filters.GlitchFilter({slices:5,offset:100,direction:0,fillMode:0,seed:0,average:!1,minSize:8,sampleSize:512,red:[0,0],green:[0,0],blue:[0,0]}),this.film=new PIXI.filters.OldFilmFilter({sepia:0,noise:.1,noiseSize:1,scratch:.2,scratchDensity:.5,scratchWidth:1,vignetting:0,vignettingAlpha:0,vignettingBlur:0},Math.random()),this._filters=[this.glitch,this.film]}return _createClass(GlitchFX2,[{key:"run",value:function(){var _self=this,PASSES=parseInt(4+Math.random()*8),counter=0;function fxPass(){_self.updateFX(),++counter<=PASSES?_self._updateFXTimeout=window2.setTimeout(fxPass,Math.random()*100):_self.onComplete()}fxPass(),this.onStart()}},{key:"updateFX",value:function(){function getRange(n1,n2){return n1+Math.random()*(n2-n1)}this.glitch.red=[getRange(-10,10),getRange(-10,10)],this.glitch.green=[getRange(-10,10),getRange(-10,10)],this.glitch.blue=[getRange(-10,10),getRange(-10,10)],this.glitch.refresh(),this.film.seed=Math.random(),this.film.noise=getRange(.05,.15),this.film.scratchDensity=getRange(.3,.6),this.onUpdate()}},{key:"kill",value:function(){window2.clearTimeout(this._updateFXTimeout)}},{key:"filters",get:function(){return this._filters}}]),GlitchFX2})(),AdjustmentFX=(function(){function AdjustmentFX2(){_classCallCheck(this,AdjustmentFX2),this.adjustment=new PIXI.filters.AdjustmentFilter({gamma:1,saturation:1,contrast:1,brightness:1,red:1,green:1,blue:1,alpha:1}),this.bloom=new PIXI.filters.AdvancedBloomFilter({threshold:1,bloomScale:.5,brightness:1,blur:10,quality:10}),this._filters=[this.adjustment,this.bloom]}return _createClass(AdjustmentFX2,[{key:"run",value:function(){this._tl=new TimelineMax({onStart:this.onStart.bind(this),onComplete:this.onComplete.bind(this),onUpdate:this.onUpdate.bind(this)}),this._tl.to(this.adjustment,.6,{gamma:1.5,contrast:1.5,brightness:.7,saturation:1.5,ease:Expo.easeInOut},0),this._tl.to(this.bloom,.6,{threshold:.65,brightness:1.2,ease:Expo.easeInOut},0),this._tl.to(this.adjustment,.6,{gamma:1,contrast:1,brightness:1,saturation:1,ease:Circ.easeOut},1),this._tl.to(this.bloom,.6,{threshold:1,brightness:1,ease:Circ.easeOut},1)}},{key:"kill",value:function(){this._tl&&this._tl.kill()}},{key:"filters",get:function(){return this._filters}}]),AdjustmentFX2})(),GodRaysFX=(function(){function GodRaysFX2(){_classCallCheck(this,GodRaysFX2),this.godray=new PIXI.filters.GodrayFilter({angle:30,gain:.5,lacunrity:2.8,parallel:!0,time:0,center:[0,0]}),this._filters=[this.godray]}return _createClass(GodRaysFX2,[{key:"run",value:function(){this._tl=new TimelineMax({onStart:this.onStart.bind(this),onComplete:this.onComplete.bind(this),onUpdate:this.onUpdate.bind(this)}),this._tl.fromTo(this.godray,1.2,{time:0},{time:1,ease:Linear.easeNone})}},{key:"kill",value:function(){this._tl&&this._tl.kill()}},{key:"filters",get:function(){return this._filters}}]),GodRaysFX2})()})(window); 2//# sourceMappingURL=/cdn/shop/t/36/assets/SlideFX.ta.js.map?v=112493455413970260391629708105
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.