MARIJuANA
— DIOS — NO — CREA — NADA — EN — VANO —
Linux instance-20230208-1745 6.8.0-1013-oracle #13~22.04.1-Ubuntu SMP Mon Sep 2 13:02:56 UTC 2024 x86_64
  SOFT : Apache/2.4.52 (Ubuntu) PHP : 8.1.2-1ubuntu2.19
/var/www/pocoes/transparencia/src/js/
10.0.0.135

 
[ NAME ] [ SIZE ] [ PERM ] [ DATE ] [ ACT ]
+FILE +DIR
core.js 98.756 KB -rw-rw-r-- 2019-03-27 19:54 R E G D
fullscreen.js 4.574 KB -rw-rw-r-- 2019-03-27 19:54 R E G D
guestures.js 24.454 KB -rw-rw-r-- 2019-03-27 19:54 R E G D
hash.js 5.935 KB -rw-rw-r-- 2019-03-27 19:54 R E G D
media.js 5.604 KB -rw-rw-r-- 2019-03-27 19:54 R E G D
share.js 3.764 KB -rw-rw-r-- 2019-03-27 19:54 R E G D
slideshow.js 4.373 KB -rw-rw-r-- 2019-03-27 19:54 R E G D
thumbs.js 6.939 KB -rw-rw-r-- 2019-03-27 19:54 R E G D
wheel.js 0.912 KB -rw-rw-r-- 2019-03-27 19:54 R E G D
REQUEST EXIT
// ========================================================================== // // Guestures // Adds touch guestures, handles click and tap events // // ========================================================================== ;(function (window, document, $) { 'use strict'; var requestAFrame = (function () { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || // if all else fails, use setTimeout function (callback) { return window.setTimeout(callback, 1000 / 60); }; })(); var cancelAFrame = (function () { return window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || function (id) { window.clearTimeout(id); }; })(); var pointers = function( e ) { var result = []; e = e.originalEvent || e || window.e; e = e.touches && e.touches.length ? e.touches : ( e.changedTouches && e.changedTouches.length ? e.changedTouches : [ e ] ); for ( var key in e ) { if ( e[ key ].pageX ) { result.push( { x : e[ key ].pageX, y : e[ key ].pageY } ); } else if ( e[ key ].clientX ) { result.push( { x : e[ key ].clientX, y : e[ key ].clientY } ); } } return result; }; var distance = function( point2, point1, what ) { if ( !point1 || !point2 ) { return 0; } if ( what === 'x' ) { return point2.x - point1.x; } else if ( what === 'y' ) { return point2.y - point1.y; } return Math.sqrt( Math.pow( point2.x - point1.x, 2 ) + Math.pow( point2.y - point1.y, 2 ) ); }; var isClickable = function( $el ) { if ( $el.is('a,area,button,[role="button"],input,label,select,summary,textarea') || $.isFunction( $el.get(0).onclick ) || $el.data('selectable') ) { return true; } // Check for attributes like data-fancybox-next or data-fancybox-close for ( var i = 0, atts = $el[0].attributes, n = atts.length; i < n; i++ ) { if ( atts[i].nodeName.substr(0, 14) === 'data-fancybox-' ) { return true; } } return false; }; var hasScrollbars = function( el ) { var overflowY = window.getComputedStyle( el )['overflow-y']; var overflowX = window.getComputedStyle( el )['overflow-x']; var vertical = (overflowY === 'scroll' || overflowY === 'auto') && el.scrollHeight > el.clientHeight; var horizontal = (overflowX === 'scroll' || overflowX === 'auto') && el.scrollWidth > el.clientWidth; return vertical || horizontal; }; var isScrollable = function ( $el ) { var rez = false; while ( true ) { rez = hasScrollbars( $el.get(0) ); if ( rez ) { break; } $el = $el.parent(); if ( !$el.length || $el.hasClass( 'fancybox-stage' ) || $el.is( 'body' ) ) { break; } } return rez; }; var Guestures = function ( instance ) { var self = this; self.instance = instance; self.$bg = instance.$refs.bg; self.$stage = instance.$refs.stage; self.$container = instance.$refs.container; self.destroy(); self.$container.on( 'touchstart.fb.touch mousedown.fb.touch', $.proxy(self, 'ontouchstart') ); }; Guestures.prototype.destroy = function() { this.$container.off( '.fb.touch' ); }; Guestures.prototype.ontouchstart = function( e ) { var self = this; var $target = $( e.target ); var instance = self.instance; var current = instance.current; var $content = current.$content; var isTouchDevice = ( e.type == 'touchstart' ); // Do not respond to both (touch and mouse) events if ( isTouchDevice ) { self.$container.off( 'mousedown.fb.touch' ); } // Ignore right click if ( e.originalEvent && e.originalEvent.button == 2 ) { return; } // Ignore taping on links, buttons, input elements if ( !$target.length || isClickable( $target ) || isClickable( $target.parent() ) ) { return; } // Ignore clicks on the scrollbar if ( !$target.is('img') && e.originalEvent.clientX > $target[0].clientWidth + $target.offset().left ) { return; } // Ignore clicks while zooming or closing if ( !current || self.instance.isAnimating || self.instance.isClosing ) { e.stopPropagation(); e.preventDefault(); return; } self.realPoints = self.startPoints = pointers( e ); if ( !self.startPoints ) { return; } e.stopPropagation(); self.startEvent = e; self.canTap = true; self.$target = $target; self.$content = $content; self.opts = current.opts.touch; self.isPanning = false; self.isSwiping = false; self.isZooming = false; self.isScrolling = false; self.sliderStartPos = self.sliderLastPos || { top: 0, left: 0 }; self.contentStartPos = $.fancybox.getTranslate( self.$content ); self.contentLastPos = null; self.startTime = new Date().getTime(); self.distanceX = self.distanceY = self.distance = 0; self.canvasWidth = Math.round( current.$slide[0].clientWidth ); self.canvasHeight = Math.round( current.$slide[0].clientHeight ); $(document) .off( '.fb.touch' ) .on( isTouchDevice ? 'touchend.fb.touch touchcancel.fb.touch' : 'mouseup.fb.touch mouseleave.fb.touch', $.proxy(self, "ontouchend")) .on( isTouchDevice ? 'touchmove.fb.touch' : 'mousemove.fb.touch', $.proxy(self, "ontouchmove")); if ( $.fancybox.isMobile ) { document.addEventListener('scroll', self.onscroll, true); } if ( !(self.opts || instance.canPan() ) || !( $target.is( self.$stage ) || self.$stage.find( $target ).length ) ) { // Prevent image ghosting while dragging if ( $target.is('img') ) { e.preventDefault(); } return; } if ( !( $.fancybox.isMobile && ( isScrollable( $target ) || isScrollable( $target.parent() ) ) ) ) { e.preventDefault(); } if ( self.startPoints.length === 1 ) { if ( current.type === 'image' && ( self.contentStartPos.width > self.canvasWidth + 1 || self.contentStartPos.height > self.canvasHeight + 1 ) ) { $.fancybox.stop( self.$content ); self.$content.css( 'transition-duration', '' ); self.isPanning = true; } else { self.isSwiping = true; } self.$container.addClass( 'fancybox-controls--isGrabbing' ); } if ( self.startPoints.length === 2 && !instance.isAnimating && !current.hasError && current.type === 'image' && ( current.isLoaded || current.$ghost ) ) { self.canTap = false; self.isSwiping = false; self.isPanning = false; self.isZooming = true; $.fancybox.stop( self.$content ); self.$content.css( 'transition-duration', '' ); self.centerPointStartX = ( ( self.startPoints[0].x + self.startPoints[1].x ) * 0.5 ) - $(window).scrollLeft(); self.centerPointStartY = ( ( self.startPoints[0].y + self.startPoints[1].y ) * 0.5 ) - $(window).scrollTop(); self.percentageOfImageAtPinchPointX = ( self.centerPointStartX - self.contentStartPos.left ) / self.contentStartPos.width; self.percentageOfImageAtPinchPointY = ( self.centerPointStartY - self.contentStartPos.top ) / self.contentStartPos.height; self.startDistanceBetweenFingers = distance( self.startPoints[0], self.startPoints[1] ); } }; Guestures.prototype.onscroll = function(e) { self.isScrolling = true; }; Guestures.prototype.ontouchmove = function( e ) { var self = this, $target = $(e.target); if ( self.isScrolling || !( $target.is( self.$stage ) || self.$stage.find( $target ).length ) ) { self.canTap = false; return; } self.newPoints = pointers( e ); if ( !( self.opts || self.instance.canPan() ) || !self.newPoints || !self.newPoints.length ) { return; } if ( !(self.isSwiping && self.isSwiping === true) ) { e.preventDefault(); } self.distanceX = distance( self.newPoints[0], self.startPoints[0], 'x' ); self.distanceY = distance( self.newPoints[0], self.startPoints[0], 'y' ); self.distance = distance( self.newPoints[0], self.startPoints[0] ) // Skip false ontouchmove events (Chrome) if ( self.distance > 0 ) { if ( self.isSwiping ) { self.onSwipe(e); } else if ( self.isPanning ) { self.onPan(); } else if ( self.isZooming ) { self.onZoom(); } } }; Guestures.prototype.onSwipe = function(e) { var self = this, swiping = self.isSwiping, left = self.sliderStartPos.left || 0, angle; // If direction is not yet determined if ( swiping === true ) { // We need at least 10px distance to correctly calculate an angle if ( Math.abs( self.distance ) > 10 ) { self.canTap = false; if ( self.instance.group.length < 2 && self.opts.vertical ) { self.isSwiping = 'y'; } else if ( self.instance.isDragging || self.opts.vertical === false || ( self.opts.vertical === 'auto' && $( window ).width() > 800 ) ) { self.isSwiping = 'x'; } else { angle = Math.abs( Math.atan2( self.distanceY, self.distanceX ) * 180 / Math.PI ); self.isSwiping = ( angle > 45 && angle < 135 ) ? 'y' : 'x'; } self.canTap = false; if ( self.isSwiping === 'y' && $.fancybox.isMobile && ( isScrollable( self.$target ) || isScrollable( self.$target.parent() ) ) ) { self.isScrolling = true; return; } self.instance.isDragging = self.isSwiping; // Reset points to avoid jumping, because we dropped first swipes to calculate the angle self.startPoints = self.newPoints; $.each(self.instance.slides, function( index, slide ) { $.fancybox.stop( slide.$slide ); slide.$slide.css( 'transition-duration', '' ); slide.inTransition = false; if ( slide.pos === self.instance.current.pos ) { self.sliderStartPos.left = $.fancybox.getTranslate( slide.$slide ).left; } }); // Stop slideshow if ( self.instance.SlideShow && self.instance.SlideShow.isActive ) { self.instance.SlideShow.stop(); } } return; } // Sticky edges if ( swiping == 'x' ) { if ( self.distanceX > 0 && ( self.instance.group.length < 2 || ( self.instance.current.index === 0 && !self.instance.current.opts.loop ) ) ) { left = left + Math.pow( self.distanceX, 0.8 ); } else if ( self.distanceX < 0 && ( self.instance.group.length < 2 || ( self.instance.current.index === self.instance.group.length - 1 && !self.instance.current.opts.loop ) ) ) { left = left - Math.pow( -self.distanceX, 0.8 ); } else { left = left + self.distanceX; } } self.sliderLastPos = { top : swiping == 'x' ? 0 : self.sliderStartPos.top + self.distanceY, left : left }; if ( self.requestId ) { cancelAFrame( self.requestId ); self.requestId = null; } self.requestId = requestAFrame(function() { if ( self.sliderLastPos ) { $.each(self.instance.slides, function( index, slide ) { var pos = slide.pos - self.instance.currPos; $.fancybox.setTranslate( slide.$slide, { top : self.sliderLastPos.top, left : self.sliderLastPos.left + ( pos * self.canvasWidth ) + ( pos * slide.opts.gutter ) }); }); self.$container.addClass( 'fancybox-is-sliding' ); } }); }; Guestures.prototype.onPan = function() { var self = this; // Sometimes, when tapping causally, image can move a bit and that breaks double tapping if ( distance( self.newPoints[0], self.realPoints[0] ) < ($.fancybox.isMobile ? 10 : 5) ) { self.startPoints = self.newPoints; return; } self.canTap = false; self.contentLastPos = self.limitMovement(); if ( self.requestId ) { cancelAFrame( self.requestId ); self.requestId = null; } self.requestId = requestAFrame(function() { $.fancybox.setTranslate( self.$content, self.contentLastPos ); }); }; // Make panning sticky to the edges Guestures.prototype.limitMovement = function() { var self = this; var canvasWidth = self.canvasWidth; var canvasHeight = self.canvasHeight; var distanceX = self.distanceX; var distanceY = self.distanceY; var contentStartPos = self.contentStartPos; var currentOffsetX = contentStartPos.left; var currentOffsetY = contentStartPos.top; var currentWidth = contentStartPos.width; var currentHeight = contentStartPos.height; var minTranslateX, minTranslateY, maxTranslateX, maxTra