{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/object-assign/index.js","node_modules/performance-now/lib/performance-now.js","node_modules/process/browser.js","node_modules/raf/index.js","src/parallax.js"],"names":["f","exports","module","define","amd","window","global","self","this","Parallax","e","t","n","r","s","o","u","a","require","i","Error","code","l","call","length","1","toObject","val","undefined","TypeError","Object","getOwnPropertySymbols","hasOwnProperty","prototype","propIsEnumerable","propertyIsEnumerable","assign","test1","String","getOwnPropertyNames","test2","fromCharCode","map","join","test3","split","forEach","letter","keys","err","shouldUseNative","target","source","from","symbols","to","arguments","key","getNanoSeconds","hrtime","loadTime","moduleLoadTime","nodeLoadTime","upTime","performance","now","process","hr","uptime","Date","getTime","defaultSetTimout","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","setTimeout","runClearTimeout","marker","cachedClearTimeout","clearTimeout","cleanUpNextTick","draining","currentQueue","queue","concat","queueIndex","drainQueue","timeout","len","run","Item","array","noop","nextTick","args","Array","push","apply","title","browser","env","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","name","binding","cwd","chdir","dir","umask","root","vendors","suffix","raf","caf","last","id","callback","_now","next","Math","max","cp","slice","cancelled","round","handle","fn","cancel","polyfill","requestAnimationFrame","cancelAnimationFrame","rqAnFr","objectAssign","helpers","propertyCache","clamp","value","min","data","element","deserialize","getAttribute","isNaN","parseFloat","isFinite","camelCase","replace","match","character","toUpperCase","accelerate","css","transformSupport","document","createElement","propertySupport","propertyValue","featureSupport","cssProperty","jsProperty","style","body","documentElement","documentOverflow","overflow","isCreatedBody","appendChild","background","getComputedStyle","getPropertyValue","removeChild","removeAttribute","parentNode","property","DEFAULTS","relativeInput","clipRelativeInput","inputElement","hoverOnly","calibrationThreshold","calibrationDelay","supportDelay","calibrateX","calibrateY","invertX","invertY","limitX","limitY","scalarX","scalarY","frictionX","frictionY","originX","originY","pointerEvents","precision","onReady","selector","options","_classCallCheck","querySelector","calibrationTimer","calibrationFlag","enabled","depthsX","depthsY","bounds","elementPositionX","elementPositionY","elementWidth","elementHeight","elementCenterX","elementCenterY","elementRangeX","elementRangeY","calibrationX","calibrationY","inputX","inputY","motionX","motionY","velocityX","velocityY","onMouseMove","bind","onDeviceOrientation","onDeviceMotion","onOrientationTimer","onMotionTimer","onCalibrationTimer","onAnimationFrame","onWindowResize","windowWidth","windowHeight","windowCenterX","windowCenterY","windowRadiusX","windowRadiusY","portrait","desktop","navigator","userAgent","motionSupport","DeviceMotionEvent","orientationSupport","DeviceOrientationEvent","orientationStatus","motionStatus","initialise","transform2DSupport","transform3DSupport","position","updateLayers","updateDimensions","enable","queueCalibration","layers","querySelectorAll","children","console","warn","index","layer","display","left","top","depth","innerWidth","innerHeight","getBoundingClientRect","width","height","delay","addEventListener","detectionTimer","doReadyCallback","removeEventListener","x","y","toFixed","disable","updateBounds","calibratedInputX","calibratedInputY","abs","depthX","depthY","xOffset","yOffset","setPosition","beta","gamma","event","rotate","rotationRate","clientX","clientY"],"mappings":"CAAA,SAAAA,GAAA,GAAA,iBAAAC,SAAA,oBAAAC,OAAAA,OAAAD,QAAAD,SAAA,GAAA,mBAAAG,QAAAA,OAAAC,IAAAD,UAAAH,OAAA,EAAA,oBAAAK,OAAAA,OAAA,oBAAAC,OAAAA,OAAA,oBAAAC,KAAAA,KAAAC,MAAAC,SAAAT,KAAA,CAAA,WAAA,OAAA,SAAAU,EAAAC,EAAAC,EAAAC,GAAA,SAAAC,EAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,IAAAE,EAAA,mBAAAC,SAAAA,QAAA,IAAAF,GAAAC,EAAA,OAAAA,EAAAF,GAAA,GAAA,GAAAI,EAAA,OAAAA,EAAAJ,GAAA,GAAA,IAAAf,EAAA,IAAAoB,MAAA,uBAAAL,EAAA,KAAA,MAAAf,EAAAqB,KAAA,mBAAArB,EAAA,IAAAsB,EAAAV,EAAAG,IAAAd,YAAAU,EAAAI,GAAA,GAAA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KAAKsN,eAGzE,OAFAtN,KAAK6N,OAAS,OACd7N,KAAK8N,OAAS,GAId9N,KAAKmL,eAEHnL,KAAKoL,oBACPuH,EAAUhL,KAAKC,IAAI+K,EAAS3S,KAAKmN,kBACjCwF,EAAUhL,KAAKkB,IAAI8J,EAAS3S,KAAKmN,iBAAmBnN,KAAKqN,cACzDuF,EAAUjL,KAAKC,IAAIgL,EAAS5S,KAAKoN,kBACjCwF,EAAUjL,KAAKkB,IAAI+J,EAAS5S,KAAKoN,iBAAmBpN,KAAKsN,gBAGxDtN,KAAKyN,eAAiBzN,KAAK0N,gBAC5B1N,KAAK6N,QAAU8E,EAAU3S,KAAKmN,iBAAmBnN,KAAKuN,gBAAkBvN,KAAKyN,cAC7EzN,KAAK8N,QAAU8E,EAAU5S,KAAKoN,iBAAmBpN,KAAKwN,gBAAkBxN,KAAK0N,gBAI5E1N,KAAKgP,eAAiBhP,KAAKiP,gBAC5BjP,KAAK6N,QAAU8E,EAAU3S,KAAK8O,eAAiB9O,KAAKgP,cACpDhP,KAAK8N,QAAU8E,EAAU5S,KAAK+O,eAAiB/O,KAAKiP,iDAMxDjP,KAAK4R,UAELpN,aAAaxE,KAAK6M,kBAClBrI,aAAaxE,KAAKsR,gBAElBtR,KAAK+I,QAAQgC,gBAAgB,SAC7B,IAAK,IAAI0F,EAAQ,EAAGA,EAAQzQ,KAAKoQ,OAAOpP,OAAQyP,IAC9CzQ,KAAKoQ,OAAOK,GAAO1F,gBAAgB,gBAG9B/K,KAAK+I,eACL/I,KAAKoQ,yCAIZ,MAAO,iBAKX1Q,EAAOD,QAAUQ","file":"parallax.min.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","var now = require('performance-now')\n , root = typeof window === 'undefined' ? global : window\n , vendors = ['moz', 'webkit']\n , suffix = 'AnimationFrame'\n , raf = root['request' + suffix]\n , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix]\n caf = root[vendors[i] + 'Cancel' + suffix]\n || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n var last = 0\n , id = 0\n , queue = []\n , frameDuration = 1000 / 60\n\n raf = function(callback) {\n if(queue.length === 0) {\n var _now = now()\n , next = Math.max(0, frameDuration - (_now - last))\n last = next + _now\n setTimeout(function() {\n var cp = queue.slice(0)\n // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n queue.length = 0\n for(var i = 0; i < cp.length; i++) {\n if(!cp[i].cancelled) {\n try{\n cp[i].callback(last)\n } catch(e) {\n setTimeout(function() { throw e }, 0)\n }\n }\n }\n }, Math.round(next))\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n })\n return id\n }\n\n caf = function(handle) {\n for(var i = 0; i < queue.length; i++) {\n if(queue[i].handle === handle) {\n queue[i].cancelled = true\n }\n }\n }\n}\n\nmodule.exports = function(fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function() {\n root.requestAnimationFrame = raf\n root.cancelAnimationFrame = caf\n}\n","/**\n* Parallax.js\n* @author Matthew Wagerfield - @wagerfield, René Roth - mail@reneroth.org\n* @description Creates a parallax effect between an array of layers,\n* driving the motion from the gyroscope output of a smartdevice.\n* If no gyroscope is available, the cursor position is used.\n*/\n\nconst rqAnFr = require('raf')\nconst objectAssign = require('object-assign')\n\nconst helpers = {\n propertyCache: {},\n vendors: [null, ['-webkit-','webkit'], ['-moz-','Moz'], ['-o-','O'], ['-ms-','ms']],\n\n clamp(value, min, max) {\n return min < max\n ? (value < min ? min : value > max ? max : value)\n : (value < max ? max : value > min ? min : value)\n },\n\n data(element, name) {\n return helpers.deserialize(element.getAttribute('data-'+name))\n },\n\n deserialize(value) {\n if (value === 'true') {\n return true\n } else if (value === 'false') {\n return false\n } else if (value === 'null') {\n return null\n } else if (!isNaN(parseFloat(value)) && isFinite(value)) {\n return parseFloat(value)\n } else {\n return value\n }\n },\n\n camelCase(value) {\n return value.replace(/-+(.)?/g, (match, character) => {\n return character ? character.toUpperCase() : ''\n })\n },\n\n accelerate(element) {\n helpers.css(element, 'transform', 'translate3d(0,0,0) rotate(0.0001deg)')\n helpers.css(element, 'transform-style', 'preserve-3d')\n helpers.css(element, 'backface-visibility', 'hidden')\n },\n\n transformSupport(value) {\n let element = document.createElement('div'),\n propertySupport = false,\n propertyValue = null,\n featureSupport = false,\n cssProperty = null,\n jsProperty = null\n for (let i = 0, l = helpers.vendors.length; i < l; i++) {\n if (helpers.vendors[i] !== null) {\n cssProperty = helpers.vendors[i][0] + 'transform'\n jsProperty = helpers.vendors[i][1] + 'Transform'\n } else {\n cssProperty = 'transform'\n jsProperty = 'transform'\n }\n if (element.style[jsProperty] !== undefined) {\n propertySupport = true\n break\n }\n }\n switch(value) {\n case '2D':\n featureSupport = propertySupport\n break\n case '3D':\n if (propertySupport) {\n let body = document.body || document.createElement('body'),\n documentElement = document.documentElement,\n documentOverflow = documentElement.style.overflow,\n isCreatedBody = false\n\n if (!document.body) {\n isCreatedBody = true\n documentElement.style.overflow = 'hidden'\n documentElement.appendChild(body)\n body.style.overflow = 'hidden'\n body.style.background = ''\n }\n\n body.appendChild(element)\n element.style[jsProperty] = 'translate3d(1px,1px,1px)'\n propertyValue = window.getComputedStyle(element).getPropertyValue(cssProperty)\n featureSupport = propertyValue !== undefined && propertyValue.length > 0 && propertyValue !== 'none'\n documentElement.style.overflow = documentOverflow\n body.removeChild(element)\n\n if ( isCreatedBody ) {\n body.removeAttribute('style')\n body.parentNode.removeChild(body)\n }\n }\n break\n }\n return featureSupport\n },\n\n css(element, property, value) {\n let jsProperty = helpers.propertyCache[property]\n if (!jsProperty) {\n for (let i = 0, l = helpers.vendors.length; i < l; i++) {\n if (helpers.vendors[i] !== null) {\n jsProperty = helpers.camelCase(helpers.vendors[i][1] + '-' + property)\n } else {\n jsProperty = property\n }\n if (element.style[jsProperty] !== undefined) {\n helpers.propertyCache[property] = jsProperty\n break\n }\n }\n }\n element.style[jsProperty] = value\n }\n\n}\n\nconst MAGIC_NUMBER = 30,\n DEFAULTS = {\n relativeInput: false,\n clipRelativeInput: false,\n inputElement: null,\n hoverOnly: false,\n calibrationThreshold: 100,\n calibrationDelay: 500,\n supportDelay: 500,\n calibrateX: false,\n calibrateY: true,\n invertX: true,\n invertY: true,\n limitX: false,\n limitY: false,\n scalarX: 10.0,\n scalarY: 10.0,\n frictionX: 0.1,\n frictionY: 0.1,\n originX: 0.5,\n originY: 0.5,\n pointerEvents: false,\n precision: 1,\n onReady: null,\n selector: null\n }\n\nclass Parallax {\n constructor(element, options) {\n\n this.element = element\n\n const data = {\n calibrateX: helpers.data(this.element, 'calibrate-x'),\n calibrateY: helpers.data(this.element, 'calibrate-y'),\n invertX: helpers.data(this.element, 'invert-x'),\n invertY: helpers.data(this.element, 'invert-y'),\n limitX: helpers.data(this.element, 'limit-x'),\n limitY: helpers.data(this.element, 'limit-y'),\n scalarX: helpers.data(this.element, 'scalar-x'),\n scalarY: helpers.data(this.element, 'scalar-y'),\n frictionX: helpers.data(this.element, 'friction-x'),\n frictionY: helpers.data(this.element, 'friction-y'),\n originX: helpers.data(this.element, 'origin-x'),\n originY: helpers.data(this.element, 'origin-y'),\n pointerEvents: helpers.data(this.element, 'pointer-events'),\n precision: helpers.data(this.element, 'precision'),\n relativeInput: helpers.data(this.element, 'relative-input'),\n clipRelativeInput: helpers.data(this.element, 'clip-relative-input'),\n hoverOnly: helpers.data(this.element, 'hover-only'),\n inputElement: document.querySelector(helpers.data(this.element, 'input-element')),\n selector: helpers.data(this.element, 'selector')\n }\n\n for (let key in data) {\n if (data[key] === null) {\n delete data[key]\n }\n }\n\n objectAssign(this, DEFAULTS, data, options)\n\n if(!this.inputElement) {\n this.inputElement = this.element\n }\n\n this.calibrationTimer = null\n this.calibrationFlag = true\n this.enabled = false\n this.depthsX = []\n this.depthsY = []\n this.raf = null\n\n this.bounds = null\n this.elementPositionX = 0\n this.elementPositionY = 0\n this.elementWidth = 0\n this.elementHeight = 0\n\n this.elementCenterX = 0\n this.elementCenterY = 0\n\n this.elementRangeX = 0\n this.elementRangeY = 0\n\n this.calibrationX = 0\n this.calibrationY = 0\n\n this.inputX = 0\n this.inputY = 0\n\n this.motionX = 0\n this.motionY = 0\n\n this.velocityX = 0\n this.velocityY = 0\n\n this.onMouseMove = this.onMouseMove.bind(this)\n this.onDeviceOrientation = this.onDeviceOrientation.bind(this)\n this.onDeviceMotion = this.onDeviceMotion.bind(this)\n this.onOrientationTimer = this.onOrientationTimer.bind(this)\n this.onMotionTimer = this.onMotionTimer.bind(this)\n this.onCalibrationTimer = this.onCalibrationTimer.bind(this)\n this.onAnimationFrame = this.onAnimationFrame.bind(this)\n this.onWindowResize = this.onWindowResize.bind(this)\n\n this.windowWidth = null\n this.windowHeight = null\n this.windowCenterX = null\n this.windowCenterY = null\n this.windowRadiusX = null\n this.windowRadiusY = null\n this.portrait = false\n this.desktop = !navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|BB10|mobi|tablet|opera mini|nexus 7)/i)\n this.motionSupport = !!window.DeviceMotionEvent && !this.desktop\n this.orientationSupport = !!window.DeviceOrientationEvent && !this.desktop\n this.orientationStatus = 0\n this.motionStatus = 0\n\n this.initialise()\n }\n\n initialise() {\n if (this.transform2DSupport === undefined) {\n this.transform2DSupport = helpers.transformSupport('2D')\n this.transform3DSupport = helpers.transformSupport('3D')\n }\n\n // Configure Context Styles\n if (this.transform3DSupport) {\n helpers.accelerate(this.element)\n }\n\n let style = window.getComputedStyle(this.element)\n if (style.getPropertyValue('position') === 'static') {\n this.element.style.position = 'relative'\n }\n\n // Pointer events\n if(!this.pointerEvents) {\n this.element.style.pointerEvents = 'none'\n }\n\n // Setup\n this.updateLayers()\n this.updateDimensions()\n this.enable()\n this.queueCalibration(this.calibrationDelay)\n }\n\n doReadyCallback() {\n if(this.onReady) {\n this.onReady()\n }\n }\n\n updateLayers() {\n if(this.selector) {\n this.layers = this.element.querySelectorAll(this.selector)\n } else {\n this.layers = this.element.children\n }\n\n if(!this.layers.length) {\n console.warn('ParallaxJS: Your scene does not have any layers.')\n }\n\n this.depthsX = []\n this.depthsY = []\n\n for (let index = 0; index < this.layers.length; index++) {\n let layer = this.layers[index]\n\n if (this.transform3DSupport) {\n helpers.accelerate(layer)\n }\n\n layer.style.position = index ? 'absolute' : 'relative'\n layer.style.display = 'block'\n layer.style.left = 0\n layer.style.top = 0\n\n let depth = helpers.data(layer, 'depth') || 0\n this.depthsX.push(helpers.data(layer, 'depth-x') || depth)\n this.depthsY.push(helpers.data(layer, 'depth-y') || depth)\n }\n }\n\n updateDimensions() {\n this.windowWidth = window.innerWidth\n this.windowHeight = window.innerHeight\n this.windowCenterX = this.windowWidth * this.originX\n this.windowCenterY = this.windowHeight * this.originY\n this.windowRadiusX = Math.max(this.windowCenterX, this.windowWidth - this.windowCenterX)\n this.windowRadiusY = Math.max(this.windowCenterY, this.windowHeight - this.windowCenterY)\n }\n\n updateBounds() {\n this.bounds = this.inputElement.getBoundingClientRect()\n this.elementPositionX = this.bounds.left\n this.elementPositionY = this.bounds.top\n this.elementWidth = this.bounds.width\n this.elementHeight = this.bounds.height\n this.elementCenterX = this.elementWidth * this.originX\n this.elementCenterY = this.elementHeight * this.originY\n this.elementRangeX = Math.max(this.elementCenterX, this.elementWidth - this.elementCenterX)\n this.elementRangeY = Math.max(this.elementCenterY, this.elementHeight - this.elementCenterY)\n }\n\n queueCalibration(delay) {\n clearTimeout(this.calibrationTimer)\n this.calibrationTimer = setTimeout(this.onCalibrationTimer, delay)\n }\n\n enable() {\n if (this.enabled) {\n return\n }\n this.enabled = true\n\n if (this.orientationSupport) {\n this.portrait = false\n window.addEventListener('deviceorientation', this.onDeviceOrientation)\n this.detectionTimer = setTimeout(this.onOrientationTimer, this.supportDelay)\n } else if (this.motionSupport) {\n this.portrait = false\n window.addEventListener('devicemotion', this.onDeviceMotion)\n this.detectionTimer = setTimeout(this.onMotionTimer, this.supportDelay)\n } else {\n this.calibrationX = 0\n this.calibrationY = 0\n this.portrait = false\n window.addEventListener('mousemove', this.onMouseMove)\n this.doReadyCallback()\n }\n\n window.addEventListener('resize', this.onWindowResize)\n this.raf = rqAnFr(this.onAnimationFrame)\n }\n\n disable() {\n if (!this.enabled) {\n return\n }\n this.enabled = false\n\n if (this.orientationSupport) {\n window.removeEventListener('deviceorientation', this.onDeviceOrientation)\n } else if (this.motionSupport) {\n window.removeEventListener('devicemotion', this.onDeviceMotion)\n } else {\n window.removeEventListener('mousemove', this.onMouseMove)\n }\n\n window.removeEventListener('resize', this.onWindowResize)\n rqAnFr.cancel(this.raf)\n }\n\n calibrate(x, y) {\n this.calibrateX = x === undefined ? this.calibrateX : x\n this.calibrateY = y === undefined ? this.calibrateY : y\n }\n\n invert(x, y) {\n this.invertX = x === undefined ? this.invertX : x\n this.invertY = y === undefined ? this.invertY : y\n }\n\n friction(x, y) {\n this.frictionX = x === undefined ? this.frictionX : x\n this.frictionY = y === undefined ? this.frictionY : y\n }\n\n scalar(x, y) {\n this.scalarX = x === undefined ? this.scalarX : x\n this.scalarY = y === undefined ? this.scalarY : y\n }\n\n limit(x, y) {\n this.limitX = x === undefined ? this.limitX : x\n this.limitY = y === undefined ? this.limitY : y\n }\n\n origin(x, y) {\n this.originX = x === undefined ? this.originX : x\n this.originY = y === undefined ? this.originY : y\n }\n\n setInputElement(element) {\n this.inputElement = element\n this.updateDimensions()\n }\n\n setPosition(element, x, y) {\n x = x.toFixed(this.precision) + 'px'\n y = y.toFixed(this.precision) + 'px'\n if (this.transform3DSupport) {\n helpers.css(element, 'transform', 'translate3d(' + x + ',' + y + ',0)')\n } else if (this.transform2DSupport) {\n helpers.css(element, 'transform', 'translate(' + x + ',' + y + ')')\n } else {\n element.style.left = x\n element.style.top = y\n }\n }\n\n onOrientationTimer() {\n if (this.orientationSupport && this.orientationStatus === 0) {\n this.disable()\n this.orientationSupport = false\n this.enable()\n } else {\n this.doReadyCallback()\n }\n }\n\n onMotionTimer() {\n if (this.motionSupport && this.motionStatus === 0) {\n this.disable()\n this.motionSupport = false\n this.enable()\n } else {\n this.doReadyCallback()\n }\n }\n\n onCalibrationTimer() {\n this.calibrationFlag = true\n }\n\n onWindowResize() {\n this.updateDimensions()\n }\n\n onAnimationFrame() {\n this.updateBounds()\n let calibratedInputX = this.inputX - this.calibrationX,\n calibratedInputY = this.inputY - this.calibrationY\n if ((Math.abs(calibratedInputX) > this.calibrationThreshold) || (Math.abs(calibratedInputY) > this.calibrationThreshold)) {\n this.queueCalibration(0)\n }\n if (this.portrait) {\n this.motionX = this.calibrateX ? calibratedInputY : this.inputY\n this.motionY = this.calibrateY ? calibratedInputX : this.inputX\n } else {\n this.motionX = this.calibrateX ? calibratedInputX : this.inputX\n this.motionY = this.calibrateY ? calibratedInputY : this.inputY\n }\n this.motionX *= this.elementWidth * (this.scalarX / 100)\n this.motionY *= this.elementHeight * (this.scalarY / 100)\n if (!isNaN(parseFloat(this.limitX))) {\n this.motionX = helpers.clamp(this.motionX, -this.limitX, this.limitX)\n }\n if (!isNaN(parseFloat(this.limitY))) {\n this.motionY = helpers.clamp(this.motionY, -this.limitY, this.limitY)\n }\n this.velocityX += (this.motionX - this.velocityX) * this.frictionX\n this.velocityY += (this.motionY - this.velocityY) * this.frictionY\n for (let index = 0; index < this.layers.length; index++) {\n let layer = this.layers[index],\n depthX = this.depthsX[index],\n depthY = this.depthsY[index],\n xOffset = this.velocityX * (depthX * (this.invertX ? -1 : 1)),\n yOffset = this.velocityY * (depthY * (this.invertY ? -1 : 1))\n this.setPosition(layer, xOffset, yOffset)\n }\n this.raf = rqAnFr(this.onAnimationFrame)\n }\n\n rotate(beta, gamma){\n // Extract Rotation\n let x = (beta || 0) / MAGIC_NUMBER, // -90 :: 90\n y = (gamma || 0) / MAGIC_NUMBER // -180 :: 180\n\n // Detect Orientation Change\n let portrait = this.windowHeight > this.windowWidth\n if (this.portrait !== portrait) {\n this.portrait = portrait\n this.calibrationFlag = true\n }\n\n if (this.calibrationFlag) {\n this.calibrationFlag = false\n this.calibrationX = x\n this.calibrationY = y\n }\n\n this.inputX = x\n this.inputY = y\n }\n\n onDeviceOrientation(event) {\n let beta = event.beta\n let gamma = event.gamma\n if (beta !== null && gamma !== null) {\n this.orientationStatus = 1\n this.rotate(beta, gamma)\n }\n }\n\n onDeviceMotion(event) {\n let beta = event.rotationRate.beta\n let gamma = event.rotationRate.gamma\n if (beta !== null && gamma !== null) {\n this.motionStatus = 1\n this.rotate(beta, gamma)\n }\n }\n\n onMouseMove(event) {\n let clientX = event.clientX,\n clientY = event.clientY\n\n // reset input to center if hoverOnly is set and we're not hovering the element\n if(this.hoverOnly &&\n ((clientX < this.elementPositionX || clientX > this.elementPositionX + this.elementWidth) ||\n (clientY < this.elementPositionY || clientY > this.elementPositionY + this.elementHeight))) {\n this.inputX = 0\n this.inputY = 0\n return\n }\n\n if (this.relativeInput) {\n // Clip mouse coordinates inside element bounds.\n if (this.clipRelativeInput) {\n clientX = Math.max(clientX, this.elementPositionX)\n clientX = Math.min(clientX, this.elementPositionX + this.elementWidth)\n clientY = Math.max(clientY, this.elementPositionY)\n clientY = Math.min(clientY, this.elementPositionY + this.elementHeight)\n }\n // Calculate input relative to the element.\n if(this.elementRangeX && this.elementRangeY) {\n this.inputX = (clientX - this.elementPositionX - this.elementCenterX) / this.elementRangeX\n this.inputY = (clientY - this.elementPositionY - this.elementCenterY) / this.elementRangeY\n }\n } else {\n // Calculate input relative to the window.\n if(this.windowRadiusX && this.windowRadiusY) {\n this.inputX = (clientX - this.windowCenterX) / this.windowRadiusX\n this.inputY = (clientY - this.windowCenterY) / this.windowRadiusY\n }\n }\n }\n\n destroy() {\n this.disable()\n\n clearTimeout(this.calibrationTimer)\n clearTimeout(this.detectionTimer)\n\n this.element.removeAttribute('style')\n for (let index = 0; index < this.layers.length; index++) {\n this.layers[index].removeAttribute('style')\n }\n\n delete this.element\n delete this.layers\n }\n\n version() {\n return '3.1.0'\n }\n\n}\n\nmodule.exports = Parallax\n"]}