/**
 * @preserve
 * @author    ThemePunch <info@themepunch.com>
 * @link      http://www.themepunch.com/
 * @copyright 2021 ThemePunch
 * @version 1.0.3
 */
!function(){"use strict";window._R_is_Editor?RVS._R=void 0===RVS._R?{}:RVS._R:window._R_is_Editor=!1,jQuery.fn.revolution=jQuery.fn.revolution||{};var t=window._R_is_Editor?RVS._R:jQuery.fn.revolution;function e(t){var e,a,r,i=t.opt,s=i.twa-.5,n="simple"===i.twe?0:1,o=!!i.twf;i.twc?(e="\n\t\tvarying vec2 vUv;\n\t\tvarying float opacity;\n\n\t\tuniform float twistValue;\n\t\tuniform float twistProg;\n\t\tuniform float anchor;\n\t\tuniform float twistStart;\n\t\tuniform float twistEf;\n\t\tuniform float twistDir;\n\t\tuniform float twistDist;\n\t\tuniform int uvPos;\n\n\t\tmat4 rotation3d(vec3 axis, float angle) {\n\t\t\taxis = normalize(axis);\n\t\t\tfloat s = sin(angle);\n\t\t\tfloat c = cos(angle);\n\t\t\tfloat oc = 1.0 - c;\n\t\n\t\t\treturn mat4(\n\t\t\toc * axis.x * axis.x + c,           oc * axis.x * axis.y - axis.z * s,  oc * axis.z * axis.x + axis.y * s,  0.0,\n\t\t\toc * axis.x * axis.y + axis.z * s,  oc * axis.y * axis.y + c,           oc * axis.y * axis.z - axis.x * s,  0.0,\n\t\t\toc * axis.z * axis.x - axis.y * s,  oc * axis.y * axis.z + axis.x * s,  oc * axis.z * axis.z + c,           0.0,\n\t\t\t0.0,                                0.0,                                0.0,                                1.0\n\t\t\t);\n\t\t}\n\n\t\tvec3 rotate(vec3 v, vec3 axis, float angle) {\n\t\t\treturn (rotation3d(axis, angle) * vec4(v, 1.0)).xyz;\n\t\t}\n\n\t\tvoid main() {\n\t\t\tvUv = uv;\n\t\n\t\t\tvec3 pos = position;\n\t\n\t\t\tvec3 axis = uvPos == 0 ? vec3(1., 0., 0.) : vec3(0., 1., 0.);\n\t\t\tfloat twist = -twistValue;\n\t\t\tfloat angle = 0.0;\n\t\t\t\n\t\t\tif(twistEf == 1.0) {\n\t\t\t\topacity = twistDir == 1. ? smoothstep(twistStart, twistStart - twistDist, pos[uvPos]) : smoothstep(twistStart -twistDist, twistStart, pos[uvPos]);\n\t\t\t\tangle = smoothstep(twistStart, twistStart - twistDist, pos[uvPos]) * twist;\n\t\t\t} else angle = (pos[uvPos] - anchor) * twist;\n\t\t\t\n\t\t\tvec3 rotated = rotate(vec3(pos.x , pos.y, pos.z), axis, angle);\n\t\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4(rotated, 1.);\n\t\t}\n\t\t",a="\n\t\tvarying vec2 vUv;\n\t\tvarying float opacity;\n\n\t\tuniform sampler2D uTexture;\n\t\tuniform sampler2D uTexture1;\n\t\tuniform float hideTexture;\n\t\tuniform float twistProg;\n\t\tuniform vec4 textureColor;\n\t\tuniform vec4 shadowColor;\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t\tuniform vec4 fogColor;\n\t\tuniform int uvPos;\n\n\t\tfloat pi = 3.141592653;\n\t\tvoid main() {\n\t\t\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\t\t\tfloat depth = gl_FragDepthEXT / gl_FragCoord.w;\n\t\t\t#else\n\t\t\t\tfloat depth = gl_FragCoord.z / gl_FragCoord.w;\n\t\t\t#endif\n\n\t\t\tvec4 texture = texture2D(uTexture, vUv) * opacity \n\t\t\t+ (mix(texture2D(uTexture1, vUv), textureColor, hideTexture)) * (1.0 - opacity);\n\t\t\t\n\t\t\tgl_FragColor = texture;\n\n\t\t\tfloat range = (1. - sin((vUv[1 - uvPos]) * pi)) * twistProg;\n\t\t\tgl_FragColor = mix(gl_FragColor, mix(gl_FragColor, shadowColor, shadowColor.a), range);\n\t\t\t#ifdef USEFOG\t\n\t\t\t\tfloat fogFactor = smoothstep(fogNear, fogFar, depth);\n\t\t\t\tgl_FragColor = mix(gl_FragColor, fogColor, fogFactor);\n\t\t\t#endif\n\t\t}",(r={twistValue:{value:0},twistProg:{value:0},uTexture:{value:t.coming},uTexture1:{value:void 0!==t.leaving?t.leaving:t.coming},twistStart:{value:-.5},anchor:{value:s},twistEf:{value:n},twistDist:{value:i.twdi},twistDir:{value:"right"===i.twd?0:1}}).hideTexture={value:void 0!==t.leaving||_R_is_Editor?0:1},r.textureColor={value:void 0===t.leaving?i.twf:[1,1,1,1]}):(e="\n\t\tvarying vec2 vUv;\n\n\t\tuniform float twistValue;\n\t\tuniform float twistProg;\n\t\tuniform float anchor;\n\t\tuniform float twistStart;\n\t\tuniform float twistEf;\n\t\tuniform float twistDir;\n\t\tuniform float twistDist;\n\t\tuniform int uvPos;\n\n\t\tmat4 rotation3d(vec3 axis, float angle) {\n\t\t\taxis = normalize(axis);\n\t\t\tfloat s = sin(angle);\n\t\t\tfloat c = cos(angle);\n\t\t\tfloat oc = 1.0 - c;\n\t\n\t\t\treturn mat4(\n\t\t\toc * axis.x * axis.x + c,           oc * axis.x * axis.y - axis.z * s,  oc * axis.z * axis.x + axis.y * s,  0.0,\n\t\t\toc * axis.x * axis.y + axis.z * s,  oc * axis.y * axis.y + c,           oc * axis.y * axis.z - axis.x * s,  0.0,\n\t\t\toc * axis.z * axis.x - axis.y * s,  oc * axis.y * axis.z + axis.x * s,  oc * axis.z * axis.z + c,           0.0,\n\t\t\t0.0,                                0.0,                                0.0,                                1.0\n\t\t\t);\n\t\t}\n\n\t\tvec3 rotate(vec3 v, vec3 axis, float angle) {\n\t\t\treturn (rotation3d(axis, angle) * vec4(v, 1.0)).xyz;\n\t\t}\n\n\t\tvoid main() {\n\t\t\tvUv = uv;\n\t\n\t\t\tvec3 pos = position;\n\t\t\tvec3 axis = uvPos == 0 ? vec3(1., 0., 0.) : vec3(0., 1., 0.);\n\t\t\tfloat twist = -twistValue;\n\t\t\tfloat angle = 0.0;\n\t\t\t\n\t\t\tif(twistEf == 1.0) {\n\t\t\t\tangle = smoothstep(twistStart, twistStart - twistDist, pos[uvPos]) * twist;\n\t\t\t} else angle = (pos[uvPos] - anchor) * twist;\n\t\t\t\n\t\t\t\n\t\t\tvec3 rotated = rotate(vec3(pos.x , pos.y, pos.z), axis, angle);\n\t\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4(rotated, 1.);\n\t\t}\n\t\t",a="\n\t\tvarying vec2 vUv;\n\t\tuniform sampler2D uTexture;\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t\tuniform float twistValue;\n\t\tuniform float twistProg;\n\t\tuniform vec4 fogColor;\n\t\tuniform vec4 shadowColor;\n\t\tuniform int uvPos;\n\n\t\tfloat pi = 3.141592653;\n\t\tvoid main() {\n\t\t\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\t\t\tfloat depth = gl_FragDepthEXT / gl_FragCoord.w;\n\t\t\t#else\n\t\t\t\tfloat depth = gl_FragCoord.z / gl_FragCoord.w;\n\t\t\t#endif\n\n\t\t\tgl_FragColor = texture2D(uTexture, vUv);\n\t\t\t\n\t\t\tfloat range = (1. - sin((vUv[1 - uvPos]) * pi)) * twistProg;\n\t\t\tgl_FragColor = mix(gl_FragColor, mix(gl_FragColor, shadowColor, shadowColor.a), range);\n\t\t\t\n\t\t\t#ifdef USEFOG\t\n\t\t\t\tfloat fogFactor = smoothstep(fogNear, fogFar, depth);\n\t\t\t\tgl_FragColor = mix(gl_FragColor, fogColor, fogFactor);\n\t\t\t#endif\n\t\t\t\n\t\t}",r={twistValue:{value:0},twistProg:{value:0},uTexture:{value:t.map},twistStart:{value:-.5},anchor:{value:s},twistEf:{value:n},twistDist:{value:i.twdi},shadowColor:{value:i.tws}});r.uvPos={value:i.vert?1:0},o&&(r.fogColor={value:i.twf},r.fogNear={type:"f",value:1},r.fogFar={type:"f",value:1});var l={PI:Math.PI,USEFOG:o};return new THREE.ShaderMaterial({vertexShader:e,fragmentShader:a,uniforms:r,defines:l,side:THREE.frontSide,transparent:!0})}function a(t){return t*Math.PI/180}function r(t,e){return"t1"!==e&&"t2"!==e&&(e="random"),"random"===e&&(e=Math.random()>.5?"t1":"t2"),"t1"===e?"1. - uv."+t:"uv."+t}function i(t){return 3==(t=tpGS.gsap.utils.splitColor(t)).length&&(t[3]=1),t[0]/=255,t[1]/=255,t[2]/=255,t}jQuery.extend(!0,t,{transitionpackInit:function(e,a){t.transitionPackUrl=void 0===a||window._R_is_Editor?RVS.ENV.TRANSITIONPACK_URL:a.url,THREE.Cache.enabled=!0},transitionPackUtils:{dplmlib:{1:{src:"transition/transition1.png"},2:{src:"transition/transition2.png"},3:{src:"transition/transition3.png"},4:{src:"transition/transition4.png"},5:{src:"transition/transition5.png"},6:{src:"transition/transition6.png"},7:{src:"displacement/disp1.jpg"},8:{src:"displacement/disp2.jpg"},9:{src:"displacement/disp3.jpg"},10:{src:"transition/transition7.png"},11:{src:"displacement/cracks.jpg"},12:{src:"displacement/tunnel.jpg"},13:{src:"displacement/waterfall.jpg"},14:{src:"displacement/wire.jpg"},15:{src:"displacement/zigzag.jpg"},16:{src:"displacement/paper.jpg"},17:{src:"transition/transition5v.png"}},addPASS:function(e,a){if(void 0!==t.postProcessing)switch(e.tpack.pp){case"glitches":e.tpack.ppga=parseFloat(e.tpack.ppga),e.tpack.ppgs=parseFloat(e.tpack.ppgs),e.tpack.ppgr=parseFloat(e.tpack.ppgr),e.tpack.ppgl=parseFloat(e.tpack.ppgl),e.three.postRendering=t.postProcessing[e.tpack.pp].init(e.three.renderer,e.three.scene,e.three.camera,{seed:e.tpack.ppgs,amount:e.tpack.ppga,repeat:e.tpack.ppgr,len:e.tpack.ppgl});break;case"glitch2":e.three.postRendering=t.postProcessing[e.tpack.pp].init(e.three.renderer,e.three.scene,e.three.camera,{duration:a.dur,width:e.mDIM.width,height:e.mDIM.height});break;case"blur":if("d3"===e.tpack.ppbt)e.tpack.ppbf=parseFloat(e.tpack.ppbf),e.tpack.ppbm=parseFloat(e.tpack.ppbm),e.tpack.ppba=parseFloat(e.tpack.ppba),e.three.postRendering=t.postProcessing[e.tpack.ppbt].init(e.three.renderer,e.three.scene,e.three.camera,{focus:e.tpack.ppbf,aperture:1e-4*e.tpack.ppba,maxblur:.001*e.tpack.ppbm,width:e.mDIM.width,height:e.mDIM.height});else if("motion"===e.tpack.ppbt){var r={};if("skew"==e.tpack.ef&&1==e.tpack.sh&&(r.name="m=qinticOut(m, 10.);",r.function="float qinticOut(float t, float power) { return 1.0 - pow(1. - t, power); }"),!isNaN(Math.round(e.tpack.smartX))&&!isNaN(Math.round(e.tpack.smartY))){e.three.postRendering=t.postProcessing[e.tpack.ppbt].init(e.three.renderer,e.three.scene,e.three.camera,{left:Math.round(e.tpack.smartX),top:Math.round(e.tpack.smartY),width:e.mDIM.width,height:e.mDIM.height},r);break}}break;case"film":e.tpack.ppfn=parseFloat(e.tpack.ppfn),e.tpack.ppfs=parseFloat(e.tpack.ppfs),e.tpack.ppfh=parseFloat(e.tpack.ppfh),e.tpack.ppfbw="true"==e.tpack.ppfbw||1==e.tpack.ppfbw&&"false"!=e.tpack.ppfbw,e.three.postRendering=t.postProcessing[e.tpack.pp].init(e.three.renderer,e.three.scene,e.three.camera,{noise:e.tpack.ppfn/100,scale:e.tpack.ppfs/100,size:e.tpack.ppfh,grayscale:e.tpack.ppfbw})}},fitCameraToObject:function(e){e.three.lastDim={width:e.mDIM.width,height:e.mDIM.height},e.three.camera.aspect=e.mDIM.width/e.mDIM.height,"cubetwist"===e.tpack.ef&&e.mDIM.height>e.mDIM.width&&(e.three.camera.aspect=e.mDIM.height/e.mDIM.width),e.three.CY=1/e.three.camera.aspect,e.three.camera.updateProjectionMatrix(),e.three.renderer.setSize(e.mDIM.width,e.mDIM.height,!1),t.transitionPackEffects[e.callFromAnimatedCanvasUpdateEffect].fit(e),e.three.camera.fov=2*Math.atan(e.three.CY/(2*e.three.camera.position.z))*(180/Math.PI),e.three.camera.updateProjectionMatrix()},webGlSceneUpdate:function(e){void 0!==e&&void 0!==e.three&&void 0!==e.three.canvas&&void 0!==e.three.camera&&(void 0!==e.three.lastDim&&e.three.lastDim.width===e.mDIM.width&&e.three.lastDim.height===e.mDIM.height||t.transitionPackUtils.fitCameraToObject(e),(e.video||e.panzoom)&&(e.three.texture.needsUpdate=!0),e.three.camera.updateProjectionMatrix(),e.three.renderer.render(e.three.scene,e.three.camera),e.three.postRendering&&e.three.postRendering.effectPass&&e.three.postRendering.effectPass.uniforms&&e.three.postRendering.effectPass.uniforms.progress&&(e.three.postRendering.effectPass.uniforms.progress.value=e.three.progress.value),e.three.postRendering&&e.three.postRendering.composer&&e.three.postRendering.composer.render(),e.three.postRendering&&e.three.postRendering.nodepost&&e.postRendering.nodepost.render(e.three.scene,e.three.camera,e.postRendering.frame),"spin"!==e.tpack.ef&&"rings"!==e.tpack.ef&&"perspective"!==e.tpack.ef&&"zoom"!==e.tpack.ef&&"blur"!==e.tpack.ef||void 0===e.tpack.ao||"none"===e.tpack.ao||function(t){var e=parseFloat(t.tpack.ox)/100,a=parseFloat(t.tpack.oy)/100;if("center"===t.tpack.ao)e+=(1-e-.5)*t.three.progress.value,a+=(1-a-.5)*t.three.progress.value;else if("inverse"===t.tpack.ao)e+=(1-e-e)*t.three.progress.value,a+=(1-a-a)*t.three.progress.value;else{var r="";t.tpack.ao,r="M0,0 C0,31 12.502,53.904 21,71.666 23.297,76.474 41.612,87.014 41.612,87.014 41.612,87.014 55.195,91.292 59.191,89.37 65.079,86.535 74.337,76.113 76.821,70.068 79.289,64.058 79.603,50.337 77.786,44.101 76.012,38.014 68.806,26.324 63.206,23.354 58.575,20.897 46.201,21.762 42.33,25.295 38.918,28.407 39.793,39.227 40.895,43.712 41.873,47.695 50.179,57.243 50.179,57.243";var i={x:0,y:0},s=tpGS.gsap.to(i,{motionPath:{path:r},ease:"none"});s.pause().progress(t.three.progress.value),e=i.x/100,a=1-i.y/100,s.kill(),s=null}"perspective"===t.tpack.ef&&(t.three.material.uniforms.angle.value=Math.atan2(.5-e,.5-a));t.three.material.uniforms.ox.value=e,t.three.material.uniforms.oy.value=a}(e))},getWebGLCanvas:function(){let t=document.createElement("canvas");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.zIndex=2,t.width=1600,t.height=1200,{canvas:t}},getEndRotation:function(e,a,r){let i=90*t.SATools.getSpecialValue(t.valBeau(e),a,r);return i=tpGS.gsap.utils.snap(90,i<0?Math.min(-90,i):Math.max(90,i)),i=i%360==0?i+90:i,i=0===i?90:i,i},getPlane:function(t,e){return new THREE.Mesh(new THREE.PlaneGeometry(1,1,2,2),e)},getCube:function(e,a,r,i,s){let n;return"col"===e?(n=new THREE.Mesh(new THREE.BoxBufferGeometry(a,1,1),r),n.position.x=i*a-(.5-a/2),t.transitionPackUtils.cubeSidesUV(n.geometry.attributes.uv,a,1,1,i,0,0,e)):(n=new THREE.Mesh(new THREE.BoxBufferGeometry(1,a,1),r),n.position.y=i*a*s-(.5*s-a*s/2),t.transitionPackUtils.cubeSidesUV(n.geometry.attributes.uv,1,a,1,0,i,0,e)),n},cubeSidesUV:function(t,e,a,r,i,s,n,o){t.setXY(0,n*r,(s+1)*a),t.setXY(1,(n+1)*r,(s+1)*a),t.setXY(2,n*r,s*a),t.setXY(3,(n+1)*r,s*a),t.setXY(4,n*r,(s+1)*a),t.setXY(5,(n+1)*r,(s+1)*a),t.setXY(6,n*r,s*a),t.setXY(7,(n+1)*r,s*a),t.setXY(8,i*e,r),t.setXY(9,(i+1)*e,r),t.setXY(10,i*e,0),t.setXY(11,(i+1)*e,0),t.setXY(12,i*e,r),t.setXY(13,(i+1)*e,r),t.setXY(14,i*e,0),t.setXY(15,(i+1)*e,0),t.setXY(16,i*e,(s+1)*a),t.setXY(17,(i+1)*e,(s+1)*a),t.setXY(18,i*e,s*a),t.setXY(19,(i+1)*e,s*a),"row"===o?(t.setXY(20,i*e,(s+1)*a),t.setXY(21,(i+1)*e,(s+1)*a),t.setXY(22,i*e,s*a),t.setXY(23,(i+1)*e,s*a)):(t.setXY(20,(i+1)*e,s*a),t.setXY(21,i*e,s*a),t.setXY(22,(i+1)*e,(s+1)*a),t.setXY(23,i*e,(s+1)*a)),t.needsUpdate=!0},getTpackDatas:function(t,e){if(void 0===e||""==e)return{};var a,r={},i=e.split(";");for(var s in i)i.hasOwnProperty(s)&&void 0!==(a=i[s].split(":"))[0]&&void 0!==a[1]&&(r[a[0]]=a[1]);return r}},transitionPackEffects:{defaults:function(){return{tpack:{sx:1,sy:1,sz:1,o:0,sr:1,rx:180,ry:180,rz:90,col:1,row:1,cgz:250,gz:250,gx:0,gy:0,ie:"power2.inOut",ige:"power2.inOut",pp:"none",ppbf:100,ppbm:4,ppba:20,ppbt:"motion",ppga:90,ppgr:5,ppgs:.3,ppgl:120,ppfn:80,ppfs:82,ppfh:256,ppfbw:!1,ef:"fade",dplm:1,mfl:0,dir:0,dbas:!1,tlt:0,rad:90,w:35,iny:1,x:0,y:0,z:250,td:1,ref:.4,flo:30,twe:"simple",twa:0,twv:230,twz:30,twd:"left",twdi:30,tws:"rgba(0, 0, 0, 0.7)",twf:"rgba(0, 0, 0, 0.7)",prange:100,stri:30,strs:1,strf:1,sko:0,sh:!1,shx:0,shy:0,shz:0,shr:0,shv:80,roz:-2,ox:50,oy:50,cicl:"rgba(0, 0, 0, 0.3)",cish:0,cispl:4,cimw:!1,cio:"alternate",cico:!1,ciad:!1,chm1:"random",chm2:"random",chm3:"random",chm4:"random"}}},tpbasic:{build:function(t,e){var a=t.three;a.CY=1/a.camera.aspect,a.scene.remove(a.light),a.light=new THREE.AmbientLight("#ffffff",1),a.scene.add(a.light),a.texture=new THREE.CanvasTexture(t.shadowCanvas),a.texture.wrapS=THREE.RepeatWrapping,a.texture.wrapT=THREE.RepeatWrapping,a.texture.repeat.set(1,1),window._R_is_Editor||void 0===e.BG||(a.texture_leaving=new THREE.CanvasTexture(e.BG.shadowCanvas),a.texture_leaving.wrapS=THREE.RepeatWrapping,a.texture_leaving.wrapT=THREE.RepeatWrapping,a.texture_leaving.repeat.set(1,1),a.material_leaving=new THREE.MeshPhongMaterial({transparent:!0,map:a.texture_leaving}))},init:function(e,a,r,i){e.tpack.ef="fadeb"===e.tpack.ef?"fade":e.tpack.ef,t.transitionPackEffects.tpbasic.build(e,r);var s=t.transitionPackEffects.tpbasic.getUniforms(e,r.sdir),n=window.TP_SHDRS[e.tpack.ef];"chaos"===e.tpack.ef&&(n=n.replace("#replaceChaos",s.replace),delete s.replace);var o={extensions:{derivatives:"#extension GL_OES_standard_derivatives : enable"},side:THREE.DoubleSide,uniforms:jQuery.extend(!0,{src1:{value:e.three.texture_leaving},src2:{value:e.three.texture},progress:{value:0},threshold:{value:.1},resolution:{value:new THREE.Vector4}},s),vertexShader:"varying vec2 vUv;void main() {vUv = uv;gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );}",fragmentShader:n};void 0!==s.defines&&(o.defines=s.defines,delete s.defines),o.fragmentShader="#if __VERSION__ < 130 \n#define TEXTURE2D texture2D \n#else \n#define TEXTURE2D texture \n#endif\n"+o.fragmentShader,e.three.material=new THREE.ShaderMaterial(o),t.transitionPackEffects.tpbasic.planeAndFit(e),t.transitionPackUtils.addPASS(e,a),t.transitionPackEffects.tpbasic.updateResolution(e)},getUniforms:function(e,s){let n;switch(e.tpack.smartX=t.SATools.getSpecialValue(t.valBeau(e.tpack.x),void 0,s),e.tpack.smartY=t.SATools.getSpecialValue(t.valBeau(e.tpack.y),void 0,s),e.tpack.smartZ=t.SATools.getSpecialValue(t.valBeau(e.tpack.z),void 0,s),e.tpack.smartTilt=t.SATools.getSpecialValue(t.valBeau(e.tpack.tlt),void 0,s),e.tpack.smartIntensity=t.SATools.getSpecialValue(t.valBeau(e.tpack.iny),void 0,s),1==e.tpack.dbas&&(e.tpack.dir=1===s?e.tpack.dir:0==e.tpack.dir?1:1==e.tpack.dir?0:2==e.tpack.dir?3:2),e.tpack.ef){case"fade":let b=void 0!==e.tpack.mfl&&0!=e.tpack.mfl&&(1==e.tpack.mfl||1!==s),P=17==e.tpack.dplm||6==e.tpack.dplm;n={flipx:{value:!P&&b},flipy:{value:!!P&&b},src1:{value:e.three.texture},src2:void 0===e.three.texture_leaving?{value:0}:{value:e.three.texture_leaving},displacement:{value:(new THREE.TextureLoader).load(t.transitionPackUrl+"public/assets/textures/"+t.transitionPackUtils.dplmlib[e.tpack.dplm].src)}};break;case"wave":n={radius:{value:parseInt(e.tpack.rad)/100,min:.1,max:2},width:{value:parseInt(e.tpack.w)/100,min:0,max:1},displacement:{value:(new THREE.TextureLoader).load(t.transitionPackUrl+"public/assets/textures/"+t.transitionPackUtils.dplmlib[e.tpack.dplm].src)}};break;case"burnover":n={displacement:{value:(new THREE.TextureLoader).load(t.transitionPackUrl+"public/assets/textures/"+t.transitionPackUtils.dplmlib[e.tpack.dplm].src)}};break;case"burn":n={intensity:{value:.03*parseFloat(e.tpack.smartIntensity)},dir:{value:e.tpack.dir}};break;case"chaos":var o="vw.x = "+r("y",e.tpack.chm1)+" * "+r("x",e.tpack.chm2)+" * intensity; vw.y = "+r("x",e.tpack.chm3)+" * "+r("y",e.tpack.chm4)+" * intensity;";n={src1:window._R_is_Editor?{value:e.three.texture}:{value:e.three.texture_leaving},left:{value:Math.round(e.tpack.smartX)},top:{value:Math.round(e.tpack.smartY)},intensity:{value:parseFloat(e.tpack.smartIntensity)/10},prange:{value:parseInt(e.tpack.prange)/100*.5},replace:o};break;case"stretch":var l=parseInt(e.tpack.strs)/10,p=l<1?tpGS.gsap.utils.mapRange(0,1,100,10,l):tpGS.gsap.utils.mapRange(1,10,10,2,l);n={src1:window._R_is_Editor?{value:e.three.texture}:{value:e.three.texture_leaving},left:{value:Math.round(e.tpack.smartX)},top:{value:0==e.tpack.smartX?Math.round(e.tpack.smartY):0},dir:{value:0==e.tpack.smartX?2:1},intensity:{value:e.tpack.smartIntensity},twistIntensity:{value:parseInt(e.tpack.stri)/10},twistSize:{value:p},flipTwist:{value:e.tpack.strf?-1:1}};break;case"skew":var c=0!=e.tpack.smartX&&0!=e.tpack.smartY?0:0==e.tpack.smartX?2:1,u=t.SATools.getSpecialValue(t.valBeau(e.tpack.shr));n={src1:window._R_is_Editor?{value:e.three.texture}:{value:e.three.texture_leaving},left:{value:Math.round(e.tpack.smartX)},top:{value:Math.round(e.tpack.smartY)},dir:{value:c},intensity:{value:e.tpack.smartIntensity/100*(0==c?10:30)},origin:{value:parseInt(e.tpack.sko)/100},prange:{value:parseInt(e.tpack.prange)/100*.5},sh:{value:e.tpack.sh},shx:{value:t.SATools.getSpecialValue(t.valBeau(e.tpack.shx),void 0,s)/100},shy:{value:t.SATools.getSpecialValue(t.valBeau(e.tpack.shy),void 0,s)/100},shz:{value:t.SATools.getSpecialValue(t.valBeau(e.tpack.shz),void 0,s)/50},shr:{value:0===u?0:a(u)},shv:{value:tpGS.gsap.utils.mapRange(0,100,6,1,parseInt(e.tpack.shv))}};break;case"perspective":var d=parseInt(e.tpack.ox)/100,v=parseInt(e.tpack.oy)/100,m=Math.atan2(.5-d,.5-v),h=t.SATools.getSpecialValue(t.valBeau(e.tpack.roz),void 0,s);n={src1:window._R_is_Editor?{value:e.three.texture}:{value:e.three.texture_leaving},ox:{value:d},oy:{value:v},intensity:{value:parseInt(e.tpack.pr)},rotation:{value:a(180*Math.round(h,void 0,s))},isShort:{value:h%2!=0},angle:{value:m},prange:{value:parseInt(e.tpack.prange)/100*.5}};break;case"spin":d=parseInt(e.tpack.ox)/100,v=parseInt(e.tpack.oy)/100;var g=0===e.tpack.smartIntensity?0:e.tpack.smartIntensity/100,f=(h=Math.round(t.SATools.getSpecialValue(t.valBeau(e.tpack.roz),void 0,s)),-e.tpack.smartZ);n={src1:window._R_is_Editor?{value:e.three.texture}:{value:e.three.texture_leaving},ox:{value:d},oy:{value:v},intensity:{value:g},roz:{value:h},zoom:{value:f>0?f/10:f/100},isShort:{value:h%2!=0},prange:{value:parseInt(e.tpack.prange)/100*.5}};break;case"rings":d=parseInt(e.tpack.ox)/100,v=parseInt(e.tpack.oy)/100,g=0===e.tpack.smartIntensity?0:e.tpack.smartIntensity/10,h=Math.round(t.SATools.getSpecialValue(t.valBeau(e.tpack.roz),void 0,s));var k="none"!=e.tpack.cio,w="none"==e.tpack.cio||"alternate"==e.tpack.cio?0:"grad"==e.tpack.cio?1:2,x=i(e.tpack.cicl);g=11-g,n={src1:window._R_is_Editor?{value:e.three.texture}:{value:e.three.texture_leaving},ox:{value:d},oy:{value:v},iny:{value:g},roz:{value:h},isShort:{value:h%2!=0},Splits:{value:e.tpack.cispl},iColor:{value:x},s:{value:parseInt(e.tpack.cish)/100},useo:{value:k},grado:{value:w},cover:{value:e.tpack.cico},altDir:{value:e.tpack.ciad},cnprog:{value:e.tpack.cimw},prange:{value:parseInt(e.tpack.prange)/100*.5},defines:{splits:e.tpack.cispl}};break;case"zoom":d=parseInt(e.tpack.ox)/100,v=parseInt(e.tpack.oy)/100,h=Math.round(t.SATools.getSpecialValue(t.valBeau(e.tpack.roz),void 0,s));var E=-parseFloat(e.tpack.zi),R=-parseFloat(e.tpack.zo),y=parseFloat(e.tpack.zwo),S=parseFloat(e.tpack.zwi);n={src1:window._R_is_Editor?{value:e.three.texture}:{value:e.three.texture_leaving},ox:{value:d},oy:{value:v},roz:{value:h},isShort:{value:h%2!=0},zOut:{value:R>0?R/10:R/100},zIn:{value:E>0?E/10:E/100},blur:{value:parseFloat(e.tpack.zb)/100},warpOut:{value:0===y?0:tpGS.gsap.utils.mapRange(0,100,10,.5,y)},warpIn:{value:0===S?0:tpGS.gsap.utils.mapRange(0,100,10,.5,parseFloat(S))},prange:{value:parseInt(e.tpack.prange)/100*.3*.5},rEnd:{value:parseFloat(e.tpack.zre)/100}};break;case"cut":n={dir:{value:e.tpack.dir},width:{value:parseInt(e.tpack.w)/10,min:0,max:10},scaleX:{value:parseInt(e.tpack.ssx)/100*60,min:.1,max:60},scaleY:{value:parseInt(e.tpack.ssy)/100*60,min:.1,max:60},displacement:{value:(new THREE.TextureLoader).load(t.transitionPackUrl+"public/assets/textures/"+t.transitionPackUtils.dplmlib[e.tpack.dplm].src)}};break;case"flat":n={src1:window._R_is_Editor?{value:e.three.texture}:{value:e.three.texture_leaving},left:{value:Math.round(e.tpack.smartX)},top:{value:Math.round(e.tpack.smartY)},tilt:{value:e.tpack.smartTilt/100},zoom:{value:e.tpack.smartZ/100},prange:{value:parseInt(e.tpack.prange)/100*.5}};break;case"pano":n={src1:window._R_is_Editor?{value:e.three.texture}:{value:e.three.texture_leaving},left:{value:Math.round(e.tpack.smartX)},top:{value:Math.round(e.tpack.smartY)},tilt:{value:e.tpack.smartTilt/100},pano:{value:1-e.tpack.smartIntensity/100},zoomOut:{value:e.tpack.smartZ/100},prange:{value:parseInt(e.tpack.prange)/100*.5}};break;case"overroll":n={src1:window._R_is_Editor?{value:e.three.texture}:{value:e.three.texture_leaving},dir:{value:e.tpack.dir},intensity:{value:.01*e.tpack.smartIntensity},displacement:{value:(new THREE.TextureLoader).load(t.transitionPackUrl+"public/assets/textures/"+t.transitionPackUtils.dplmlib[e.tpack.dplm].src)}};break;case"water":n={intensity:{value:e.tpack.smartIntensity/100*10,min:0,max:10}};break;case"colorflow":var _=Math.round(e.tpack.smartX),T=Math.round(e.tpack.smartY);n={angle:{value:m=Math.atan2(_,T)-a(45)},left:{value:_=Math.abs(_)},top:{value:T=Math.abs(T)},intensity:{value:e.tpack.smartIntensity/100*3,min:0,max:3},displacement:{value:(new THREE.TextureLoader).load(t.transitionPackUrl+"public/assets/textures/"+t.transitionPackUtils.dplmlib[e.tpack.dplm].src)}};break;case"zoomover":n={src1:window._R_is_Editor?{value:e.three.texture}:{value:e.three.texture_leaving},intensity:{value:e.tpack.smartIntensity/100,min:0,max:3}};break;case"morph":n={left:{value:Math.round(e.tpack.smartX)},top:{value:Math.round(e.tpack.smartY)},src1:window._R_is_Editor?{value:e.three.texture}:{value:e.three.texture_leaving},intensity:{value:e.tpack.smartIntensity/100,min:0,max:1}};break;case"blur":d=parseInt(e.tpack.ox)/100,v=parseInt(e.tpack.oy)/100,h=Math.round(t.SATools.getSpecialValue(t.valBeau(e.tpack.roz),void 0,s)),E=-parseFloat(e.tpack.zi),R=-parseFloat(e.tpack.zo);n={left:{value:Math.round(e.tpack.smartX)},top:{value:Math.round(e.tpack.smartY)},ox:{value:d},oy:{value:v},roz:{value:h},isShort:{value:h%2!=0},zOut:{value:R>0?R/10:R/100},zIn:{value:E>0?E/10:E/100},prange:{value:parseInt(e.tpack.prange)/100*.3*.5},rEnd:{value:parseFloat(e.tpack.zre)/100},src1:window._R_is_Editor?{value:e.three.texture}:{value:e.three.texture_leaving},intensity:{value:e.tpack.smartIntensity/100,min:0,max:1}};break;case"waterdrop":n={src1:window._R_is_Editor?{value:e.three.texture}:{value:e.three.texture_leaving},speed:{value:e.tpack.smartIntensity},amplitude:{value:parseInt(e.tpack.rad)}};break;case"mosaic":n={src1:window._R_is_Editor?{value:e.three.texture}:{value:e.three.texture_leaving},endx:{value:e.tpack.smartX,min:-50,max:50},endy:{value:e.tpack.smartY,min:-50,max:50}};break;case"mirrorcube":n={src1:window._R_is_Editor?{value:e.three.texture}:{value:e.three.texture_leaving},persp:{value:.7},unzoom:{value:parseFloat(e.tpack.gz)/100},reflection:{value:e.tpack.ref},floating:{value:parseFloat(e.tpack.flo)/10}}}return n||{}},planeAndFit:function(e){e.three.plane=t.transitionPackUtils.getPlane(e,e.three.material,e.three.CY),e.three.scene.add(e.three.plane),t.transitionPackUtils.fitCameraToObject(e)},updateResolution:function(t){t.three.material.uniforms.resolution.value.x=t.mDIM.width,t.three.material.uniforms.resolution.value.y=t.mDIM.height,t.three.material.uniforms.resolution.value.z=1,t.three.material.uniforms.resolution.value.w=1,t.three.imageAspect=t.three.texture.image.height/t.three.texture.image.width,t.video||t.panzoom||(t.mDIM.height/t.mDIM.width>this.imageAspect?t.three.material.uniforms.resolution.value.z=t.mDIM.width/t.mDIM.height*t.three.imageAspect:t.three.material.uniforms.resolution.value.w=t.mDIM.height/t.mDIM.width/t.three.imageAspect)},extendTL:function(t,e,a,r){var i=new tpGS.gsap.timeline;return e.three.progress={value:1},i.add(tpGS.gsap.from(e.three.progress,a.dur,{value:0,delay:.05,ease:e.tpack.ie})),i},tick:function(t){t.three.material.uniforms.progress.value=t.three.progress.value},fit:function(t){t.three.plane.scale.set(1,t.three.CY)}},cube:{init:function(e,a,r,i){var s=e.three;if(s.splitdir=e.tpack.col<=1||void 0===e.tpack.col?"row":"col",s.split="row"==s.splitdir?e.tpack.row||1:e.tpack.col||1,s.divto=1/s.split,s.light=new THREE.SpotLight(16777215,1.1),s.light.position.set(5,5,10),s.light.castShadow=!0,s.scene.add(s.light),s.cubes=[s.split],s.texture=new THREE.CanvasTexture(e.shadowCanvas),s.texture.wrapS=THREE.RepeatWrapping,s.texture.wrapT=THREE.RepeatWrapping,s.texture.repeat.set(1,1),window._R_is_Editor||void 0===r.BG)s.material=new THREE.MeshPhongMaterial({transparent:!0,map:s.texture});else{s.texture_leaving=new THREE.CanvasTexture(r.BG.shadowCanvas),s.texture_leaving.wrapS=THREE.RepeatWrapping,s.texture_leaving.wrapT=THREE.RepeatWrapping,s.texture_leaving.repeat.set(1,1);var n=new THREE.MeshPhongMaterial({transparent:!0,map:s.texture}),o=new THREE.MeshPhongMaterial({transparent:!0,map:s.texture_leaving});let a={col:{90:3,180:5,270:2,"-90":2,"-180":5,"-270":3},row:{90:0,180:5,270:1,"-90":1,"-180":5,"-270":0}};s.material=[n,o,o,n,o,n];let i=t.transitionPackUtils.getEndRotation(e.tpack.sr,0,r.sdir)%360;s.material[a[s.splitdir][i]]=n}s.GRP=new THREE.Group,s.CY=1/s.camera.aspect;for(var l=0;l<s.split;l++)s.cubes[l]=t.transitionPackUtils.getCube(s.splitdir,s.divto,void 0===s.material.length?s.material.clone():[s.material[0].clone(),s.material[1].clone(),s.material[2].clone(),s.material[3].clone(),s.material[4].clone(),s.material[5].clone()],l,s.CY),s.GRP.add(s.cubes[l]);t.transitionPackUtils.fitCameraToObject(e),s.scene.add(e.three.GRP),t.transitionPackUtils.addPASS(e,a)},extendTL:function(e,a,r,i){var s,n=new tpGS.gsap.timeline,o=a.three;if(o.boxes=Array(o.split),window._R_is_Editor||t[e].firstSlideAnimDone){for(s=0;s<o.split;s++)o.boxes[s]={sr:0,rx:0,ry:0,o:1,sx:1,sy:1,sz:1};let e=tpGS.gsap.timeline();e.add(tpGS.gsap.to(o.boxes,r.dur/2,{ease:a.tpack.ie,sx:t.SATools.getSpecialValue(t.valBeau(a.tpack.sx)),sy:t.SATools.getSpecialValue(t.valBeau(a.tpack.sy)),sz:t.SATools.getSpecialValue(t.valBeau(a.tpack.sz)),stagger:{amount:"nodelay"===r.f?0:r.ms/r.stasec/2,grid:[o.split,1],from:"nodelay"===r.f?"start":r.f}},0)),e.add(tpGS.gsap.to(o.boxes,r.dur/2,{ease:a.tpack.ie,sx:1,sy:1,sz:1,stagger:{amount:"nodelay"===r.f?0:r.ms/r.stasec/2,grid:[o.split,1],from:"nodelay"===r.f?"start":r.f}})),n.add(e,i.delay);let l=e.duration()/2;n.add(tpGS.gsap.to(o.boxes,r.dur,{sr:function(e){return-THREE.Math.degToRad(t.transitionPackUtils.getEndRotation(a.tpack.sr,e,i.sdir))},ease:a.tpack.ie,stagger:{amount:"nodelay"===r.f?0:r.ms/r.stasec/2,grid:[o.split,1],from:"nodelay"===r.f?"start":r.f}}),0),n.add(tpGS.gsap.fromTo(o.GRP.rotation,l/5*4,{z:0,y:0},{z:-THREE.Math.degToRad(t.SATools.getSpecialValue(t.valBeau(a.tpack.rz),s,i.sdir)),y:-THREE.Math.degToRad(t.SATools.getSpecialValue(t.valBeau(a.tpack.ry),s,i.sdir)),x:-THREE.Math.degToRad(t.SATools.getSpecialValue(t.valBeau(a.tpack.rx),s,i.sdir)),ease:a.tpack.ige}),0),n.add(tpGS.gsap.fromTo(o.GRP.position,l,{z:0,x:0,y:0},{z:-parseFloat(a.tpack.cgz)||0,x:parseFloat(a.tpack.gx)/100||0,y:parseFloat(a.tpack.gy)/100||0}),0),n.add(tpGS.gsap.to(o.GRP.rotation,l/5*4,{z:-THREE.Math.degToRad(tpGS.gsap.utils.snap(360,t.SATools.getSpecialValue(t.valBeau(a.tpack.rz),s,i.sdir))),y:-THREE.Math.degToRad(tpGS.gsap.utils.snap(360,t.SATools.getSpecialValue(t.valBeau(a.tpack.ry),s,i.sdir))),x:-THREE.Math.degToRad(tpGS.gsap.utils.snap(360,t.SATools.getSpecialValue(t.valBeau(a.tpack.rx),s,i.sdir))),ease:a.tpack.ige}),l/5*4),n.add(tpGS.gsap.to(o.GRP.position,l,{z:0,x:0,y:0}),l)}else{for(s=0;s<o.split;s++)o.boxes[s]={o:0,sr:-THREE.Math.degToRad(t.transitionPackUtils.getEndRotation(a.tpack.sr,s,i.sdir)),sx:t.SATools.getSpecialValue(t.valBeau(a.tpack.sx)),sy:t.SATools.getSpecialValue(t.valBeau(a.tpack.sy)),sz:t.SATools.getSpecialValue(t.valBeau(a.tpack.sz))};var l=tpGS.gsap.to(o.boxes,r.dur,{o:1,sr:0,sx:1,sy:1,ease:a.tpack.ie,sz:1,stagger:{amount:"nodelay"===r.f?0:r.ms/r.stasec,grid:[o.split,1],from:"nodelay"===r.f?"start":r.f}});let e=l.duration();n.add(l,i.delay),n.add(tpGS.gsap.from(o.GRP.rotation,e/5*4,{z:-THREE.Math.degToRad(t.SATools.getSpecialValue(t.valBeau(a.tpack.rz),s,i.sdir)),y:-THREE.Math.degToRad(t.SATools.getSpecialValue(t.valBeau(a.tpack.ry),s,i.sdir)),x:-THREE.Math.degToRad(t.SATools.getSpecialValue(t.valBeau(a.tpack.rx),s,i.sdir)),ease:tpGS.Power2.inOut}),0),n.add(tpGS.gsap.from(o.GRP.position,e,{z:-parseFloat(a.tpack.cgz)||0,x:parseFloat(a.tpack.gx)/100||0,y:parseFloat(a.tpack.gy)/100||0}),0)}return n},tick:function(t){let e,a,r=t.three;for(e=0;e<r.split;e++){if(r.cubes[e].rotation["col"===r.splitdir?"x":"y"]=r.boxes[e].sr,r.cubes[e].scale.set(r.boxes[e].sx,r.CY*r.boxes[e].sy,("col"===r.splitdir?r.CY:1)*r.boxes[e].sz),void 0!==r.boxes[e].o)if(void 0===r.cubes[e].material.length)r.cubes[e].material.opacity=Math.max(0,Math.min(1,r.boxes[e].o));else for(a=0;a<r.cubes[e].material.length;a++)r.cubes[e].material[a].opacity=Math.max(0,Math.min(1,r.boxes[e].o));r.texture.needsUpdate=!0}},fit:function(t){for(var e=0;e<t.three.split;e++)void 0!==t.three.cubes&&void 0!==t.three.cubes[e]&&("row"===t.three.splitdir&&(t.three.cubes[e].position.y=e*t.three.divto*t.three.CY-(.5*t.three.CY-t.three.divto*t.three.CY/2)),t.three.cubes[e].scale.set(1,1/t.three.camera.aspect,1))}},twist:{init:function(a,r,s,n){var o=a.tpack,l=a.three;if(o.twdi=parseFloat(o.twdi),o.twv=parseFloat(o.twv),o.twz*=-1,o.twa=parseFloat(o.twa)/100,o.twdi/=100,o.twf=i(o.twf),o.tws=i(o.tws),o.vert=a.mDIM.height>a.mDIM.width,l.texture=new THREE.CanvasTexture(a.shadowCanvas),l.texture.wrapS=THREE.RepeatWrapping,l.texture.wrapT=THREE.RepeatWrapping,l.texture.repeat.set(1,1),window._R_is_Editor||void 0===s.BG)l.material=e({transparent:!0,map:l.texture,opt:o,coming:l.texture});else{l.texture_leaving=new THREE.CanvasTexture(s.BG.shadowCanvas),l.texture_leaving.wrapS=THREE.RepeatWrapping,l.texture_leaving.wrapT=THREE.RepeatWrapping,l.texture_leaving.repeat.set(1,1);var p=e({transparent:!0,map:l.texture,opt:o,coming:l.texture,leaving:l.texture_leaving}),c=e({transparent:!0,map:l.texture_leaving,opt:o,coming:l.texture,leaving:l.texture_leaving});l.material=[c,c,c,c,p,c]}l.cube=new THREE.Mesh(new THREE.BoxBufferGeometry(1,1,1,64,64,64),l.material),l.GRP=new THREE.Group,l.CY=1/l.camera.aspect,l.GRP.add(l.cube),t.transitionPackUtils.fitCameraToObject(a),l.scene.add(l.GRP),t.transitionPackUtils.addPASS(a,r),l.cube.scale.set(1,1/l.camera.aspect,1/l.camera.aspect)},extendTL:function(t,e,r,i){var s=e.tpack,n="simple"!==s.twe,o=e.three.cube,l=e.three.GRP,p=s.ie,c=a(s.twv),u=s.twc?1:.7;u="right"===s.twd?u:-u;var d=new tpGS.gsap.timeline({onUpdate:function(){var t;if(s.twf&&(t=Math.abs(e.three.cube.position.z+e.three.GRP.position.z)+e.three.camera.position.z,t-=.3*(t-50)/s.twz*-1),e.three.cube.material.length)for(var a=0;a<e.three.cube.material.length;a++)e.three.cube.material[a].uniforms.twistProg.value=e.three.cube.material[a].uniforms.twistValue.value/c,s.twf&&(e.three.cube.material[a].uniforms.fogNear.value=t,e.three.cube.material[a].uniforms.fogFar.value=t+.5);else e.three.cube.material.uniforms.twistProg.value=e.three.cube.material.uniforms.twistValue.value/c,s.twf&&(e.three.cube.material.uniforms.fogNear.value=t,e.three.cube.material.uniforms.fogFar.value=t+.5)}});if(s.vert?d.set(o.rotation,{y:a(90)}):d.set(o.rotation,{x:a(90)}),d.fromTo(l.position,{z:0},{z:s.twz}),d.fromTo(l.rotation,{x:0},{x:a(s.rx)},0),d.fromTo(l.rotation,{y:0},{y:a(s.ry)},0),d.fromTo(l.rotation,{z:0},{z:a(s.rz)},0),d.addLabel("in","-=0.4"),e.three.cube.material.length)for(var v=0;v<e.three.cube.material.length;v++){if(n){var m=e.three.cube.material[v].uniforms.twistStart;d.fromTo(m,{value:u},{value:-u,ease:p,duration:s.twc?2:1},"in")}m=e.three.cube.material[v].uniforms.twistValue;d.fromTo(m,{value:0},{value:c,duration:1,ease:p,immediateRender:!1},"in")}else n&&d.fromTo(o.material.uniforms.twistStart,{value:u},{value:-u,ease:p,duration:s.twc?2:1},"in"),d.fromTo(o.material.uniforms.twistValue,{value:0},{value:c,duration:1,ease:p,immediateRender:!1},"in");if(d.addLabel("out",s.twc?"-=1.5":"-=0"),o.material.length)for(v=0;v<e.three.cube.material.length;v++){if(n&&!s.twc){m=o.material[v].uniforms.twistStart;d.fromTo(m,{value:s.twc?0:-u},{value:s.twc?-u:u,duration:1,ease:p,onStartParams:[v]},"out")}m=e.three.cube.material[v].uniforms.twistValue;d.to(m,{value:0,duration:1,ease:p,immediateRender:!1},"out")}else n&&!s.twc&&d.fromTo(o.material.uniforms.twistStart,{value:s.twc?0:-u},{value:s.twc?-u:u,duration:1,ease:p},"out"),d.to(o.material.uniforms.twistValue,{value:0,duration:1,ease:p,immediateRender:!1},"out");return d.to(l.rotation,{x:0},"out"),d.to(l.rotation,{y:0},"out"),d.to(l.rotation,{z:0},"out"),s.vert?d.to(o.rotation,{y:0,duration:1},"out"):d.to(o.rotation,{x:0,duration:1},"out"),d.to(l.position,{z:0,duration:1},"out+=0.7"),d.duration(r.dur),d},tick:function(t){},fit:function(t){}}},transitionPack:function(e,a,r,i){if("out"!==i.direction){window._R_is_Editor&&void 0===t.tansPackInited&&(t.transitionpackInit(),t.tansPackInited=!0),window._R_is_Editor?a.tpack=jQuery.extend(!0,t.transitionPackEffects.defaults().tpack,void 0!==i&&void 0!==i.addOns&&void 0!==i.addOns.tpack?{...i.addOns.tpack}:{...RVS.SLIDER[RVS.S.slideId].slide.slideChange.addOns.tpack}):t[e].sbgs[a.key].slideanimation.addOns&&t[e].sbgs[a.key].slideanimation.addOns.tpack?a.tpack=jQuery.extend(!0,t.transitionPackEffects.defaults().tpack,t[e].sbgs[a.key].slideanimation.addOns.tpack):a.tpack=jQuery.extend(!0,t.transitionPackEffects.defaults().tpack,t.transitionPackUtils.getTpackDatas(e,t.gA(t[e].pr_next_slide[0],"tpack"))),a.tpack.oy=100-parseInt(a.tpack.oy),r.dur=r.ms/r.sec;if(a.three){for(;a.three.scene.children.length>0;)a.three.scene.remove(a.three.scene.children[0]);null!==a.three.canvas.parentNode&&a.three.canvas.parentNode.removeChild(a.three.canvas)}a.three=t.transitionPackUtils.getWebGLCanvas(),window._R_is_Editor||void 0===i.BG?a.canvas.parentNode.appendChild(a.three.canvas):i.BG.canvas.parentNode.appendChild(a.three.canvas),a.canvas.style.display="none",a.three.planeAspectRatio=16/9,a.three.fov=150,a.callFromAnimatedCanvasUpdate=t.transitionPackUtils.webGlSceneUpdate,a.callFromAnimatedCanvasUpdateEffect=i.effect,t.animatedCanvasUpdate(e,a),a.three.renderer=new THREE.WebGLRenderer({canvas:a.three.canvas,alpha:!0}),a.three.renderer.setClearColor(16777215,0),a.three.camera=new THREE.PerspectiveCamera(a.three.fov,a.three.canvas.width/a.three.canvas.height,.1,1e3),a.three.camera.position.z=50,a.three.scene=new THREE.Scene,t.transitionPackEffects[i.effect].init(a,r,i,e);var s=tpGS.gsap.timeline({onUpdate:function(){window._R_is_Editor&&(a.canvas.style.display="none",tpGS.gsap.set(a.three.canvas,{autoAlpha:1}),i.BG&&(i.BG.canvas.style.display="none")),t.transitionPackEffects[i.effect].tick(a,i),t.transitionPackUtils.webGlSceneUpdate(a)},onStart:function(){i.BG&&(i.BG.canvas.style.display="none")},onComplete:function(){t.slideAnimFinished(e,a,{direction:"in",BG:i.BG,slide:i.slide},!0),tpGS.gsap.set(i.slide,{zIndex:20}),void 0!==i.BG&&t.slideAnimFinished(e,i.BG,{direction:"out",slide:i.outslide}),delete a.callFromAnimatedCanvasUpdate,void 0!==i.BG&&(i.BG.canvas.style.display="block",i.BG.canvas.style.opacity=0),t.updateSlideBGs(e),tpGS.gsap.to(a.three.canvas,.3,{autoAlpha:0,onStart:function(){a.canvas.style.display="block",i.BG&&tpGS.gsap.set(i.outslide,{zIndex:10})},onComplete:function(){if(!window._R_is_Editor){for(;a.three.scene.children.length>0;)a.three.scene.remove(a.three.scene.children[0]);null!==a.three.canvas.parentNode&&a.three.canvas.parentNode.removeChild(a.three.canvas),void 0!==i.BG&&i.BG.ctx.clearRect(0,0,2*a.canvas.width,2*a.canvas.height)}}})}});s.add(t.transitionPackEffects[i.effect].extendTL(e,a,r,i),0),window._R_is_Editor?RVS.TL[RVS.S.slideId].slide.add(s,0):t[e].mtl.add(s,i.delay)}}}),window.RS_MODULES=window.RS_MODULES||{},window.RS_MODULES.tpack={loaded:!0,version:"3.0.0"},window.RS_MODULES.checkMinimal&&window.RS_MODULES.checkMinimal()}();