/usr/share/javascript/jquery-geo/jquery.geo.geographics.min.js is in libjs-jquery-geo 1.0~b1+ds1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 | (function(a,b){var c=function(){var a=5,b=document.createElement("div"),c=b.all||[];do b.innerHTML="<!--[if gt IE "+ ++a+"]><br><![endif]-->";while(c[0]);return a>6?a:!a}();a.widget("geo.geographics",{_$elem:b,_options:{},_trueCanvas:!0,_width:0,_height:0,_$canvas:b,_context:b,_blitcanvas:b,_blitcontext:b,_$labelsContainer:b,options:{style:{borderRadius:"8px",color:"#7f0000",fillOpacity:.2,height:"8px",opacity:1,strokeOpacity:1,strokeWidth:"2px",visibility:"visible",width:"8px"}},_create:function(){this._$elem=this.element,this._options=this.options,this._$elem.css({display:"inline-block",overflow:"hidden",textAlign:"left"}),this._$elem.css("position")=="static"&&this._$elem.css("position","relative"),this._$elem.addClass("geo-graphics"),this._width=this._$elem.width(),this._height=this._$elem.height();if(!this._width||!this._height)this._width=parseInt(this._$elem.css("width"),10),this._height=parseInt(this._$elem.css("height"),10);var a="position:absolute;left:0;top:0;margin:0;padding:0;",b="width:"+this._width+"px;height:"+this._height+"px;",d='width="'+this._width+'" height="'+this._height+'"';document.createElement("canvas").getContext?(this._$elem.append("<canvas "+d+' style="-webkit-transform:translateZ(0);'+a+'"></canvas>'),this._$canvas=this._$elem.children(":last"),this._context=this._$canvas[0].getContext("2d"),this._blitcanvas=document.createElement("canvas"),this._blitcanvas.width=this._width,this._blitcanvas.height=this._height,this._blitcontext=this._blitcanvas.getContext("2d")):c<=8&&(this._trueCanvas=!1,this._$elem.append("<div "+d+' style="'+a+b+'"></div>'),this._$canvas=this._$elem.children(":last"),G_vmlCanvasManager.initElement(this._$canvas[0]),this._context=this._$canvas[0].getContext("2d"),this._$canvas.children().css({backgroundColor:"transparent",width:this._width,height:this._height})),this._$elem.append('<div class="geo-labels-container" style="-webkit-transform:translateZ(0);'+a+b+'"></div>'),this._$labelsContainer=this._$elem.children(":last")},_setOption:function(b,c){b=="style"&&(c=a.extend({},this._options.style,c)),a.Widget.prototype._setOption.apply(this,arguments)},destroy:function(){a.Widget.prototype.destroy.apply(this,arguments),this._$elem.html(""),this._$elem.removeClass("geo-graphics")},clear:function(){this._context.clearRect(0,0,this._width,this._height),this._$labelsContainer.html("")},drawArc:function(a,b,c,d){d=this._getGraphicStyle(d);if(d.visibility!="hidden"&&d.opacity>0&&d.widthValue>0&&d.heightValue>0){var e=Math.min(d.widthValue,d.heightValue)/2;b=b*Math.PI/180,c=c*Math.PI/180,this._context.save(),this._context.translate(a[0],a[1]),d.widthValue>d.heightValue?this._context.scale(d.widthValue/d.heightValue,1):this._context.scale(1,d.heightValue/d.widthValue),this._context.beginPath(),this._context.arc(0,0,e,b,c,!1),this._trueCanvas&&this._context.restore(),d.doFill&&(this._context.fillStyle=d.fill,this._context.globalAlpha=d.opacity*d.fillOpacity,this._context.fill()),d.doStroke&&(this._context.lineJoin="round",this._context.lineWidth=d.strokeWidthValue,this._context.strokeStyle=d.stroke,this._context.globalAlpha=d.opacity*d.strokeOpacity,this._context.stroke()),this._trueCanvas||this._context.restore()}},drawPoint:function(a,b){b=this._getGraphicStyle(b),b.widthValue==b.heightValue&&b.heightValue==b.borderRadiusValue?this.drawArc(a,0,360,b):b.visibility!="hidden"&&b.opacity>0&&(b.borderRadiusValue=Math.min(Math.min(b.widthValue,b.heightValue)/2,b.borderRadiusValue),a[0]-=b.widthValue/2,a[1]-=b.heightValue/2,this._context.beginPath(),this._context.moveTo(a[0]+b.borderRadiusValue,a[1]),this._context.lineTo(a[0]+b.widthValue-b.borderRadiusValue,a[1]),this._context.quadraticCurveTo(a[0]+b.widthValue,a[1],a[0]+b.widthValue,a[1]+b.borderRadiusValue),this._context.lineTo(a[0]+b.widthValue,a[1]+b.heightValue-b.borderRadiusValue),this._context.quadraticCurveTo(a[0]+b.widthValue,a[1]+b.heightValue,a[0]+b.widthValue-b.borderRadiusValue,a[1]+b.heightValue),this._context.lineTo(a[0]+b.borderRadiusValue,a[1]+b.heightValue),this._context.quadraticCurveTo(a[0],a[1]+b.heightValue,a[0],a[1]+b.heightValue-b.borderRadiusValue),this._context.lineTo(a[0],a[1]+b.borderRadiusValue),this._context.quadraticCurveTo(a[0],a[1],a[0]+b.borderRadiusValue,a[1]),this._context.closePath(),b.doFill&&(this._context.fillStyle=b.fill,this._context.globalAlpha=b.opacity*b.fillOpacity,this._context.fill()),b.doStroke&&(this._context.lineJoin="round",this._context.lineWidth=b.strokeWidthValue,this._context.strokeStyle=b.stroke,this._context.globalAlpha=b.opacity*b.strokeOpacity,this._context.stroke()))},drawLineString:function(a,b){this._drawLines([a],!1,b)},drawPolygon:function(a,b){if(!this._trueCanvas||a.length==1)this._drawLines(a,!0,b);else{if(!a||!a.length||a[0].length<3)return;b=this._getGraphicStyle(b);var c,d,e;if(b.visibility!="hidden"&&b.opacity>0){this._blitcontext.clearRect(0,0,this._width,this._height);if(b.doFill&&a.length>1){this._blitcontext.globalCompositeOperation="source-out",this._blitcontext.globalAlpha=1;for(d=1;d<a.length;d++){this._blitcontext.beginPath(),this._blitcontext.moveTo(a[d][0][0],a[d][0][1]);for(e=1;e<a[d].length;e++)this._blitcontext.lineTo(a[d][e][0],a[d][e][1]);this._blitcontext.closePath(),this._blitcontext.fill()}}this._blitcontext.beginPath(),this._blitcontext.moveTo(a[0][0][0],a[0][0][1]),c=[a[0][0][0]-b.strokeWidthValue,a[0][0][1]-b.strokeWidthValue,a[0][0][0]+b.strokeWidthValue,a[0][0][1]+b.strokeWidthValue];for(d=1;d<a[0].length-1;d++)this._blitcontext.lineTo(a[0][d][0],a[0][d][1]),c[0]=Math.min(a[0][d][0]-b.strokeWidthValue,c[0]),c[1]=Math.min(a[0][d][1]-b.strokeWidthValue,c[1]),c[2]=Math.max(a[0][d][0]+b.strokeWidthValue,c[2]),c[3]=Math.max(a[0][d][1]+b.strokeWidthValue,c[3]);this._blitcontext.closePath(),this._blitcontext.globalCompositeOperation="source-out",b.doFill&&(this._blitcontext.fillStyle=b.fill,this._blitcontext.globalAlpha=b.opacity*b.fillOpacity,this._blitcontext.fill()),this._blitcontext.globalCompositeOperation="source-over";if(b.doStroke){this._blitcontext.lineCap=this._blitcontext.lineJoin="round",this._blitcontext.lineWidth=b.strokeWidthValue,this._blitcontext.strokeStyle=b.stroke,this._blitcontext.globalAlpha=b.opacity*b.strokeOpacity,this._blitcontext.stroke();if(a.length>1)for(d=1;d<a.length;d++){this._blitcontext.beginPath(),this._blitcontext.moveTo(a[d][0][0],a[d][0][1]);for(e=1;e<a[d].length;e++)this._blitcontext.lineTo(a[d][e][0],a[d][e][1]);this._blitcontext.closePath(),this._blitcontext.stroke()}}c[0]=Math.max(c[0],0),c[1]=Math.max(c[1],0),c[2]=Math.min(c[2],this._width),c[3]=Math.min(c[3],this._height),this._context.drawImage(this._blitcanvas,c[0],c[1],c[2]-c[0],c[3]-c[1],c[0],c[1],c[2]-c[0],c[3]-c[1])}}},drawBbox:function(a,b){this._drawLines([[[a[0],a[1]],[a[0],a[3]],[a[2],a[3]],[a[2],a[1]],[a[0],a[1]]]],!0,b)},drawLabel:function(a,b){this._$labelsContainer.append('<div class="geo-label" style="-webkit-transform:translateZ(0);position:absolute; left:'+a[0]+"px; top:"+a[1]+'px;">'+b+"</div>")},resize:function(){this._width=this._$elem.width(),this._height=this._$elem.height();if(!this._width||!this._height)this._width=parseInt(this._$elem.css("width"),10),this._height=parseInt(this._$elem.css("height"),10);this._trueCanvas&&(this._$canvas[0].width=this._width,this._$canvas[0].height=this._height),this._$labelsContainer.css({width:this._width,height:this._height})},_getGraphicStyle:function(b){function c(a){return a=parseInt(a,10),+a+""===a?+a:a}return b=a.extend({},this._options.style,b),b.borderRadiusValue=c(b.borderRadius),b.fill=b.fill||b.color,b.doFill=b.fill&&b.fillOpacity>0,b.stroke=b.stroke||b.color,b.strokeWidthValue=c(b.strokeWidth),b.doStroke=b.stroke&&b.strokeOpacity>0&&b.strokeWidthValue>0,b.widthValue=c(b.width),b.heightValue=c(b.height),b},_drawLines:function(a,b,c){if(!a||!a.length||a[0].length<2)return;var d,e;c=this._getGraphicStyle(c);if(c.visibility!="hidden"&&c.opacity>0){this._context.beginPath();for(d=0;d<a.length;d++){this._context.moveTo(a[d][0][0],a[d][0][1]);for(e=1;e<a[d].length;e++)this._context.lineTo(a[d][e][0],a[d][e][1])}b&&this._context.closePath(),b&&c.doFill&&(this._context.fillStyle=c.fill,this._context.globalAlpha=c.opacity*c.fillOpacity,this._context.fill()),c.doStroke&&(this._context.lineCap=this._context.lineJoin="round",this._context.lineWidth=c.strokeWidthValue,this._context.strokeStyle=c.stroke,this._context.globalAlpha=c.opacity*c.strokeOpacity,this._context.stroke())}}})})(jQuery);
|