1 2 3/*! 4 * jQuery Magnify Plugin v2.3.3 by T. H. Doan (https://thdoan.github.io/magnify/) 5 * Based on http://thecodeplayer.com/walkthrough/magnifying-glass-for-images-using-jquery-and-css3 6 * 7 * jQuery Magnify by T. H. Doan is licensed under the MIT License. 8 * Read a copy of the license in the LICENSE file or at https://choosealicense.com/licenses/mit/ 9 */ 10(function(a){a.fn.magnify=function(d){d=a.extend({src:"",speed:100,timeout:-1,touchBottomOffset:0,finalWidth:null,finalHeight:null,magnifiedWidth:null,magnifiedHeight:null,limitBounds:false,mobileCloseEvent:"touchstart",afterLoad:function(){}},d);var c=this,b=a("html"),g=function(h){var l=a(h),w=l.closest("a"),A={};for(var D in d){A[D]=l.attr("data-magnify-"+D.toLowerCase())}var y=A.src||d.src||w.attr("href")||"";if(!y){return}var C,j,G,s,B,t,H,p,n=0,m=0,v,u,z,x,q,o,k=function(){var i=C.offset();o={top:(l.offset().top-i.top)+parseInt(l.css("border-top-width"))+parseInt(l.css("padding-top")),left:(l.offset().left-i.left)+parseInt(l.css("border-left-width"))+parseInt(l.css("padding-left"))};i.top+=o.top;i.left+=o.left;return i},F=function(){if(j.is(":visible")){j.fadeOut(d.speed,function(){b.removeClass("magnifying").trigger("magnifyend")})}},E=function(M){if(!s){e();return}if(M){M.preventDefault();v=M.pageX||M.originalEvent.touches[0].pageX;u=M.pageY||M.originalEvent.touches[0].pageY;l.data("lastPos",{x:v,y:u})}else{v=l.data("lastPos").x;u=l.data("lastPos").y}z=v-q.left,x=(u-q.top)-d.touchBottomOffset;if(!j.is(":animated")){if(z>n&&z<G-n&&x>m&&x<s-m){if(j.is(":hidden")){b.addClass("magnifying").trigger("magnifystart");j.fadeIn(d.speed)}}else{F()}}if(j.is(":visible")){var K="";if(B&&t){var J=-Math.round(z/G*B-H/2),i=-Math.round(x/s*t-p/2);if(d.limitBounds){var L=-Math.round((G-n)/G*B-H/2),I=-Math.round((s-m)/s*t-p/2);if(J>0){J=0}else{if(J<L){J=L}}if(i>0){i=0}else{if(i<I){i=I}}}K=J+"px "+i+"px"}j.css({top:Math.round(x-p/2)+o.top+"px",left:Math.round(z-H/2)+o.left+"px","background-position":K})}};if(!isNaN(+A.speed)){d.speed=+A.speed}if(!isNaN(+A.timeout)){d.timeout=+A.timeout}if(!isNaN(+A.finalWidth)){d.finalWidth=+A.finalWidth}if(!isNaN(+A.finalHeight)){d.finalHeight=+A.finalHeight}if(!isNaN(+A.magnifiedWidth)){d.magnifiedWidth=+A.magnifiedWidth}if(!isNaN(+A.magnifiedHeight)){d.magnifiedHeight=+A.magnifiedHeight}if(A.limitBounds==="true"){d.limitBounds=true}if(typeof window[A.afterLoad]==="function"){d.afterLoad=window[A.afterLoad]}if(/\b(Android|BlackBerry|IEMobile|iPad|iPhone|Mobile|Opera Mini)\b/.test(navigator.userAgent)){if(!isNaN(+A.touchBottomOffset)){d.touchBottomOffset=+A.touchBottomOffset}}else{d.touchBottomOffset=0}l.data("originalStyle",l.attr("style"));var r=new Image();a(r).on({load:function(){l.css("display","block");if(!l.parent(".magnify").length){l.wrap('<div class="magnify"></div>')}C=l.parent(".magnify");if(l.prev(".magnify-lens").length){C.children(".magnify-lens").css("background-image","url('"+y+"')")}else{l.before('<div class="magnify-lens loading" style="background:url(\''+y+"') 0 0 no-repeat\"></div>")}j=C.children(".magnify-lens");j.removeClass("loading");G=d.finalWidth||l.width();s=d.finalHeight||l.height();B=d.magnifiedWidth||r.width;t=d.magnifiedHeight||r.height;H=j.width();p=j.height();q=k();if(d.limitBounds){n=(H/2)/(B/G);m=(p/2)/(t/s)}if(B!==r.width||t!==r.height){j.css("background-size",B+"px "+t+"px")}l.data("zoomSize",{width:B,height:t});C.data("mobileCloseEvent",A.mobileCloseEvent||d.mobileCloseEvent);r=null;d.afterLoad();if(j.is(":visible")){E()}C.off().on({"mousemove touchmove":E,mouseenter:function(){q=k()},mouseleave:F});if(d.timeout>=0){C.on("touchend",function(){setTimeout(F,d.timeout)})}a("body").not(C).on("touchstart",F);var i=l.attr("usemap");if(i){var I=a("map[name="+i.slice(1)+"]");l.after(I);C.click(function(J){if(J.clientX||J.clientY){j.hide();var K=document.elementFromPoint(J.clientX||J.originalEvent.touches[0].clientX,J.clientY||J.originalEvent.touches[0].clientY);if(K.nodeName==="AREA"){K.click()}else{a("area",I).each(function(){var L=a(this).attr("coords").split(",");if(z>=L[0]&&z<=L[2]&&x>=L[1]&&x<=L[3]){this.click();return false}})}}})}if(w.length){w.css("display","inline-block");if(w.attr("href")&&!(A.src||d.src)){w.click(function(J){J.preventDefault()})}}},error:function(){r=null}});r.src=y},f=0,e=function(){clearTimeout(f);f=setTimeout(function(){c.destroy();c.magnify(d)},100)};this.destroy=function(){this.each(function(){var i=a(this),j=i.prev("div.magnify-lens"),h=i.data("originalStyle");if(i.parent("div.magnify").length&&j.length){if(h){i.attr("style",h)}else{i.removeAttr("style")}i.unwrap();j.remove()}});a(window).off("resize",e);return c};a(window).resize(e);return this.each(function(){g(this)})}}(jQuery));
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.