PageSourceSearch

https://qawatake.com/js/swipe.min.989e074dfb92ce7f57a92c1df7027f88b53c50a54fd9ad450a673a64aa91bfa4.js

js qawatake.com collected 2026-10-05 22:52:18 UTC 7,610 bytes, 7 lines download raw bytes

1/*!
2 * Swipe 2.2.14
3 *
4 * Brad Birdsall
5 * Copyright 2013, MIT License
6 *
7*/!function(a,b){"function"==typeof define&&define.amd?define([],function(){return a.Swipe=b(),a.Swipe}):"object"==typeof module&&module.exports?module.exports=b():a.Swipe=b()}(this,function(){var b,a="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this,c=a.document;function d(v,e){"use strict";var r,L,z={},k={},u=(e=e||{}).auto||0,x=!1,O=function(){},N=function(a){setTimeout(a||O,0)},J=function(a){return!!a&&("boolean"!=typeof a.cancelable||a.cancelable)},l={addEventListener:!!a.addEventListener,passiveEvents:function(){var b=!1,c;try{c=Object.defineProperty({},"passive",{get:function(){b=!0}}),a.addEventListener("testEvent",null,c),a.removeEventListener("testEvent",null,c)}catch(a){b=!1}return b}(),touch:"ontouchstart"in a||a.DocumentTouch&&c instanceof DocumentTouch,transitions:function(b){var a=["transitionProperty","WebkitTransition","MozTransition","OTransition","msTransition"],c;for(c in a)if(void 0!==b.style[a[c]])return!0;return!1}(c.createElement("swipe"))},g,m,f,s,d,b,n,E,D,p,B,j;if(v)return d=v.children[0],b=parseInt(e.startSlide,10)||0,n=e.speed||300,e.continuous=void 0===e.continuous||e.continuous,p=((E=v).currentStyle?D=E.currentStyle.direction:a.getComputedStyle&&(D=a.getComputedStyle(E,null).getPropertyValue("direction")),"rtl"===D?"right":"left"),e.autoRestart=void 0!==e.autoRestart&&e.autoRestart,B=function(e,b){b=b||100;var a=null;function c(){a&&clearTimeout(a)}function d(){var d=this,f=arguments;c(),a=setTimeout(function(){a=null,e.apply(d,f)},b)}return d.cancel=c,d}(C),j={handleEvent:function(a){if(!x){switch(a.type){case"mousedown":case"touchstart":this.start(a);break;case"mousemove":case"touchmove":this.move(a);break;case"mouseup":case"mouseleave":case"touchend":this.end(a);break;case"webkitTransitionEnd":case"msTransitionEnd":case"oTransitionEnd":case"otransitionend":case"transitionend":this.transitionEnd(a);break;case"resize":B()}e.stopPropagation&&a.stopPropagation()}},start:function(a){var b;A(a)?(b=a,a.preventDefault()):b=a.touches[0],z={x:b.pageX,y:b.pageY,time:+new Date},r=void 0,k={},A(a)?(d.addEventListener("mousemove",this,!1),d.addEventListener("mouseup",this,!1),d.addEventListener("mouseleave",this,!1)):(d.addEventListener("touchmove",this,!!l.passiveEvents&&{passive:!1}),d.addEventListener("touchend",this,!1))},move:function(a){var c;if(A(a))c=a;else{if(a.touches.length>1||a.scale&&1!==a.scale)return;e.disableScroll&&J(a)&&a.preventDefault(),c=a.touches[0]}k={x:c.pageX-z.x,y:c.pageY-z.y},void 0===r&&(r=!!(r||Math.abs(k.x)<Math.abs(k.y))),r||(J(a)&&a.preventDefault(),o(),e.continuous?(q(i(b-1),k.x+m[i(b-1)],0),q(b,k.x+m[b],0),q(i(b+1),k.x+m[i(b+1)],0)):(k.x=k.x/(!b&&k.x>0||b===g.length-1&&k.x<0?Math.abs(k.x)/f+1:1),q(b-1,k.x+m[b-1],0),q(b,k.x+m[b],0),q(b+1,k.x+m[b+1],0)))},end:function(o){var p=+new Date-z.time,q=Number(p)<250&&Math.abs(k.x)>20||Math.abs(k.x)>f/2,a=!b&&k.x>0||b===g.length-1&&k.x<0,c;e.continuous&&(a=!1),c=Math.abs(k.x)/k.x,r||(q&&!a?(c<0?(e.continuous?(h(i(b-1),-f,0),h(i(b+2),f,0)):h(b-1,-f,0),h(b,m[b]-f,n),h(i(b+1),m[i(b+1)]-f,n),b=i(b+1)):(e.continuous?(h(i(b+1),f,0),h(i(b-2),-f,0)):h(b+1,f,0),h(b,m[b]+f,n),h(i(b-1),m[i(b-1)]+f,n),b=i(b-1)),H(t(),g[b],c)):e.continuous?(h(i(b-1),-f,n),h(b,0,n),h(i(b+1),f,n)):(h(b-1,-f,n),h(b,0,n),h(b+1,f,n))),A(o)?(d.removeEventListener("mousemove",j,!1),d.removeEventListener("mouseup",j,!1),d.removeEventListener("mouseleave",j,!1)):(d.removeEventListener("touchmove",j,!!l.passiveEvents&&{passive:!1}),d.removeEventListener("touchend",j,!1))},transitionEnd:function(a){parseInt(a.target.getAttribute("data-index"),10)===b&&((u||e.autoRestart)&&y(),F(t(),g[b]))}},C(),K(),{setup:C,slide:function(a,b){o(),w(a,b)},prev:function(){o(),function(){if(x)return;e.continuous?w(b-1):b&&w(b-1)}()},next:function(){o(),I()},restart:y,stop:o,getPos:t,disable:function(){o(),x=!0},enable:function(){x=!1,y()},getNumSlides:function(){return s},kill:function(){var b,a,c;for(o(),v.style.visibility="",d.style.width="",d.style[p]="",b=g.length;b--;)l.transitions&&q(b,0,0),a=g[b],a.getAttribute("data-cloned")&&(c=a.parentElement,c.removeChild(a)),a.style.width="",a.style[p]="",a.style.webkitTransitionDuration=a.style.MozTransitionDuration=a.style.msTransitionDuration=a.style.OTransitionDuration=a.style.transitionDuration="",a.style.webkitTransform=a.style.msTransform=a.style.MozTransform=a.style.OTransform="";G(),B.cancel()}};function G(){l.addEventListener?(d.removeEventListener("touchstart",j,!!l.passiveEvents&&{passive:!0}),d.removeEventListener("mousedown",j,!1),d.removeEventListener("webkitTransitionEnd",j,!1),d.removeEventListener("msTransitionEnd",j,!1),d.removeEventListener("oTransitionEnd",j,!1),d.removeEventListener("otransitionend",j,!1),d.removeEventListener("transitionend",j,!1),a.removeEventListener("resize",j,!1)):a.onresize=null}function M(b){var a=b.cloneNode(!0);d.appendChild(a),a.setAttribute("data-cloned",!0),a.removeAttribute("id")}function C(r){var t,n,o,k,q;if(null!=r)for(t in r)e[t]=r[t];g=d.children,s=g.length;for(n=0;n<g.length;n++)g[n].getAttribute("data-cloned")&&s--;if(g.length<2&&(e.continuous=!1),l.transitions&&e.continuous&&g.length<3&&(M(g[0]),M(g[1]),g=d.children),"right"===p)for(o=0;o<g.length;o++)g[o].style.float="right";m=new Array(g.length),f=a.innerWidth-(a.innerWidth-c.documentElement.clientWidth),d.style.width=g.length*f*2+"px";for(k=g.length;k--;)q=g[k],q.style.width=f+"px",q.setAttribute("data-index",k),l.transitions&&(q.style[p]=k*-f+"px",h(k,b>k?-f:b<k?f:0,0));e.continuous&&l.transitions&&(h(i(b-1),-f,0),h(i(b+1),f,0)),l.transitions||(d.style[p]=b*-f+"px"),v.style.visibility="visible",G(),l.addEventListener?(l.touch&&d.addEventListener("touchstart",j,!!l.passiveEvents&&{passive:!0}),e.draggable&&d.addEventListener("mousedown",j,!1),l.transitions&&(d.addEventListener("webkitTransitionEnd",j,!1),d.addEventListener("msTransitionEnd",j,!1),d.addEventListener("oTransitionEnd",j,!1),d.addEventListener("otransitionend",j,!1),d.addEventListener("transitionend",j,!1)),a.addEventListener("resize",j,!1)):a.onresize=B}function I(){x||(e.continuous?w(b+1):b<g.length-1&&w(b+1))}function H(a,b,c){e.callback&&e.callback(a,b,c)}function F(a,b){e.transitionEnd&&e.transitionEnd(a,b)}function i(a){return(g.length+a%g.length)%g.length}function t(){var a=b;return a>=s&&(a-=s),a}function w(a,j){var c,o,k;if(a="number"!=typeof a?parseInt(a,10):a,b!==a){if(l.transitions){c=Math.abs(b-a)/(b-a),e.continuous&&(o=c,(c=-m[i(a)]/f)!==o&&(a=-c*g.length+a));for(k=Math.abs(b-a)-1;k--;)h(i((a>b?a:b)-k-1),f*c,0);a=i(a),h(b,f*c,j||n),h(a,0,j||n),e.continuous&&h(i(a-c),-f*c,0)}else a=i(a),function(f,a,c){if(!c)return void(d.style[p]=a+"px");var h=+new Date,i=setInterval(function(){var j=+new Date-h;if(j>c)return d.style[p]=a+"px",(u||e.autoRestart)&&y(),F(t(),g[b]),void clearInterval(i);d.style[p]=(a-f)*(Math.floor(j/c*100)/100)+f+"px"},4)}(b*-f,a*-f,j||n);b=a,N(function(){H(t(),g[b],c)})}}function h(a,b,c){q(a,b,c),m[a]=b}function q(c,d,e){var b=g[c],a=b&&b.style;a&&(a.webkitTransitionDuration=a.MozTransitionDuration=a.msTransitionDuration=a.OTransitionDuration=a.transitionDuration=e+"ms",a.webkitTransform=a.msTransform=a.MozTransform=a.OTransform=a.transform="translateX("+d+"px)")}
7function K(){(u=e.auto||0)&&(L=setTimeout(I,u))}function o(){u=0,clearTimeout(L)}function y(){o(),K()}function A(a){return/^mouse/.test(a.type)}}return(a.jQuery||a.Zepto)&&((b=a.jQuery||a.Zepto).fn.Swipe=function(a){return this.each(function(){b(this).data("Swipe",new d(b(this)[0],a))})}),d})

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.