<commit_before>/*!
 * maptalks.heatmap v0.2.2
 * LICENSE : MIT
 * (c) 2016-2017 maptalks.org
 */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("maptalks")):"function"==typeof define&&define.amd?define(["exports","maptalks"],e):e(t.maptalks=t.maptalks||{},t.maptalks)}(this,function(t,e){"use strict";function i(t,e){return e={exports:{}},t(e,e.exports),e.exports}function a(t,e){for(var i=Object.getOwnPropertyNames(e),a=0;a<i.length;a++){var r=i[a],n=Object.getOwnPropertyDescriptor(e,r);n&&n.configurable&&void 0===t[r]&&Object.defineProperty(t,r,n)}return t}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):a(t,e))}var s=i(function(t){function e(t){return this instanceof e?(this._canvas=t="string"==typeof t?document.getElementById(t):t,this._ctx=t.getContext("2d"),this._width=t.width,this._height=t.height,this._max=1,void(this._data=[])):new e(t)}t.exports=e,e.prototype={defaultRadius:25,defaultGradient:{.4:"blue",.6:"cyan",.7:"lime",.8:"yellow",1:"red"},data:function(t){return this._data=t,this},max:function(t){return this._max=t,this},add:function(t){return this._data.push(t),this},clear:function(){return this._data=[],this},radius:function(t,e){e=void 0===e?15:e;var i=this._circle=this._createCanvas(),a=i.getContext("2d"),r=this._r=t+e;return i.width=i.height=2*r,a.shadowOffsetX=a.shadowOffsetY=2*r,a.shadowBlur=e,a.shadowColor="black",a.beginPath(),a.arc(-r,-r,t,0,2*Math.PI,!0),a.closePath(),a.fill(),this},resize:function(){this._width=this._canvas.width,this._height=this._canvas.height},gradient:function t(e){var i=this._createCanvas(),a=i.getContext("2d"),t=a.createLinearGradient(0,0,0,256);i.width=1,i.height=256;for(var r in e)t.addColorStop(+r,e[r]);return a.fillStyle=t,a.fillRect(0,0,1,256),this._grad=a.getImageData(0,0,1,256).data,this},draw:function(t){this._circle||this.radius(this.defaultRadius),this._grad||this.gradient(this.defaultGradient);var e=this._ctx;e.clearRect(0,0,this._width,this._height);for(var i,a=0,r=this._data.length;a<r;a++)i=this._data[a],e.globalAlpha=Math.max(i[2]/this._max,void 0===t?.05:t),e.drawImage(this._circle,i[0]-this._r,i[1]-this._r);var n=e.getImageData(0,0,this._width,this._height);return this._colorize(n.data,this._grad),e.putImageData(n,0,0),this},_colorize:function(t,e){for(var i,a=0,r=t.length;a<r;a+=4)i=4*t[a+3],i&&(t[a]=e[i],t[a+1]=e[i+1],t[a+2]=e[i+2])},_createCanvas:function(){return"undefined"!=typeof document?document.createElement("canvas"):new this._canvas.constructor}}}),h=function(t){function i(e,a,o){r(this,i),Array.isArray(a)||(o=a,a=null);var s=n(this,t.call(this,e,o));return s._heats=a||[],s}return o(i,t),i.prototype.getData=function(){return this._heats},i.prototype.setData=function(t){return this._heats=t,this.redraw()},i.prototype.addPoint=function(t){return this._heats.push(t),this.redraw()},i.prototype.getMax=function(){return this.options.max},i.prototype.setMax=function(t){return this.options.max=t,this.redraw()},i.prototype.redraw=function(){var t=this._getRenderer();return t&&(t.clearHeatCache(),t.render()),this},i.prototype.isEmpty=function(){return!this._heats||!this._heats.length},i.prototype.clear=function(){return delete this._heats,this.redraw(),this.fire("clear"),this},i.prototype.toJSON=function(t){t||(t={});var i={type:this.getJSONType(),id:this.getId(),options:this.config()},a=this.getData();if(t.clipExtent){var r=new e.Extent(t.clipExtent),n=this._getHeatRadius();n&&(r=r._expand(n));for(var o=[],s=0,h=a.length;s<h;s++)r.contains(new e.Coordinate(a[s][0],a[s][1]))&&o.push(a[s]);i.data=o}else i.data=a;return i},i.fromJSON=function(t){return t&&"HeatLayer"===t.type?new i(t.id,t.data,t.options):null},i.prototype._getHeatRadius=function(){return this._getRenderer()?this._getRenderer()._heatRadius:null},i}(e.Layer);h.registerJSONType("HeatLayer"),h.registerRenderer("canvas",function(t){function i(){return r(this,i),n(this,t.apply(this,arguments))}return o(i,t),i.prototype.draw=function(){var t=this.getMap(),i=this.layer,a=t._get2DExtent(),r=this.prepareCanvas(),n=a;if(r){if(!r.intersects(a))return void this.completeRender();n=a.intersection(r)}var o=t._pointToContainerPoint(a.getMin());this._heater||(this._heater=s(this.canvas),this._heater.radius(i.options.radius||this._heater.defaultRadius,i.options.blur)),i.getMax()&&this._heater.max(i.getMax()),this._heatViews||(this._heatViews=[]);var h=i._heats;if(!e.Util.isArrayHasData(h))return void this.completeRender();var c,d,u,p,f,l,_,y,g,m,w,v=[],x=this._heater._r,b=void 0===i.options.max?1:i.options.max,R=e.Util.isNil(i.options.maxZoom)?t.getMaxZoom():i.options.maxZoom,C=1/Math.pow(2,Math.max(0,Math.min(R-t.getZoom(),12))),M=x/2,O=[],P=t.offsetPlatform(),E=P.x%M,j=P.y%M;for(n=n.expand(x),this._heatRadius=x,c=0,d=h.length;c<d;c++)u=h[c],this._heatViews[c]||(this._heatViews[c]=t.coordinateToPoint(new e.Coordinate(u[0],u[1]))),p=this._heatViews[c],n.contains(p)&&(p=t._pointToContainerPoint(p),_=Math.floor((p.x-o.x-E)/M)+2,y=Math.floor((p.y-o.y-j)/M)+2,f=void 0!==u.alt?u.alt:void 0!==u[2]?+u[2]:1,w=f*C,O[y]=O[y]||[],l=O[y][_],l?(l[0]=(l[0]*l[2]+(p.x-o.x)*w)/(l[2]+w),l[1]=(l[1]*l[2]+(p.y-o.y)*w)/(l[2]+w),l[2]+=w):O[y][_]=[p.x-o.x,p.y-o.y,w]);for(c=0,d=O.length;c<d;c++)if(O[c])for(g=0,m=O[c].length;g<m;g++)l=O[c][g],l&&v.push([Math.round(l[0]),Math.round(l[1]),Math.min(l[2],b)]);this._heater.data(v).draw(i.options.minOpacity),this.completeRender()},i.prototype.onZoomEnd=function(){delete this._heatViews,t.prototype.onZoomEnd.apply(this,arguments)},i.prototype.onResize=function(){this._heater._width=this.canvas.width,this._heater._height=this.canvas.height,t.prototype.onResize.apply(this,arguments)},i.prototype.onRemove=function(){this.clearHeatCache(),delete this._heater},i.prototype.clearHeatCache=function(){delete this._heatViews},i}(e.renderer.CanvasRenderer)),t.HeatLayer=h,Object.defineProperty(t,"__esModule",{value:!0})});<commit_msg>update dist<commit_after>/*!
 * maptalks.heatmap v0.2.2
 * LICENSE : MIT
 * (c) 2016-2017 maptalks.org
 */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("maptalks")):"function"==typeof define&&define.amd?define(["exports","maptalks"],e):e(t.maptalks=t.maptalks||{},t.maptalks)}(this,function(t,e){"use strict";function i(t,e){return e={exports:{}},t(e,e.exports),e.exports}function a(t,e){for(var i=Object.getOwnPropertyNames(e),a=0;a<i.length;a++){var r=i[a],n=Object.getOwnPropertyDescriptor(e,r);n&&n.configurable&&void 0===t[r]&&Object.defineProperty(t,r,n)}return t}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):a(t,e))}var s=i(function(t){function e(t){return this instanceof e?(this._canvas=t="string"==typeof t?document.getElementById(t):t,this._ctx=t.getContext("2d"),this._width=t.width,this._height=t.height,this._max=1,void(this._data=[])):new e(t)}t.exports=e,e.prototype={defaultRadius:25,defaultGradient:{.4:"blue",.6:"cyan",.7:"lime",.8:"yellow",1:"red"},data:function(t){return this._data=t,this},max:function(t){return this._max=t,this},add:function(t){return this._data.push(t),this},clear:function(){return this._data=[],this},radius:function(t,e){e=void 0===e?15:e;var i=this._circle=this._createCanvas(),a=i.getContext("2d"),r=this._r=t+e;return i.width=i.height=2*r,a.shadowOffsetX=a.shadowOffsetY=2*r,a.shadowBlur=e,a.shadowColor="black",a.beginPath(),a.arc(-r,-r,t,0,2*Math.PI,!0),a.closePath(),a.fill(),this},resize:function(){this._width=this._canvas.width,this._height=this._canvas.height},gradient:function t(e){var i=this._createCanvas(),a=i.getContext("2d"),t=a.createLinearGradient(0,0,0,256);i.width=1,i.height=256;for(var r in e)t.addColorStop(+r,e[r]);return a.fillStyle=t,a.fillRect(0,0,1,256),this._grad=a.getImageData(0,0,1,256).data,this},draw:function(t){this._circle||this.radius(this.defaultRadius),this._grad||this.gradient(this.defaultGradient);var e=this._ctx;e.clearRect(0,0,this._width,this._height);for(var i,a=0,r=this._data.length;a<r;a++)i=this._data[a],e.globalAlpha=Math.max(i[2]/this._max,void 0===t?.05:t),e.drawImage(this._circle,i[0]-this._r,i[1]-this._r);var n=e.getImageData(0,0,this._width,this._height);return this._colorize(n.data,this._grad),e.putImageData(n,0,0),this},_colorize:function(t,e){for(var i,a=0,r=t.length;a<r;a+=4)i=4*t[a+3],i&&(t[a]=e[i],t[a+1]=e[i+1],t[a+2]=e[i+2])},_createCanvas:function(){return"undefined"!=typeof document?document.createElement("canvas"):new this._canvas.constructor}}}),h={max:1,gradient:{.4:"blue",.65:"lime",1:"red"},radius:25,blur:15,minOpacity:.05},d=function(t){function i(e,a,o){r(this,i),Array.isArray(a)||(o=a,a=null);var s=n(this,t.call(this,e,o));return s._heats=a||[],s}return o(i,t),i.prototype.getData=function(){return this._heats},i.prototype.setData=function(t){return this._heats=t||[],this.redraw()},i.prototype.addPoint=function(t){return t?(t[0]&&Array.isArray(t[0])?e.Util.pushIn(this._heats,t):this._heats.push(t),this.redraw()):this},i.prototype.onConfig=function(e){t.prototype.onConfig.apply(this,arguments);for(var i in e)if(h[i])return this.redraw();return this},i.prototype.redraw=function(){var t=this._getRenderer();return t&&(t.clearHeatCache(),t.render()),this},i.prototype.isEmpty=function(){return!this._heats.length},i.prototype.clear=function(){return this._heats=[],this.redraw(),this.fire("clear"),this},i.prototype.toJSON=function(t){t||(t={});var i={type:this.getJSONType(),id:this.getId(),options:this.config()},a=this.getData();if(t.clipExtent){var r=new e.Extent(t.clipExtent),n=this._getHeatRadius();n&&(r=r._expand(n));for(var o=[],s=0,h=a.length;s<h;s++)r.contains(new e.Coordinate(a[s][0],a[s][1]))&&o.push(a[s]);i.data=o}else i.data=a;return i},i.fromJSON=function(t){return t&&"HeatLayer"===t.type?new i(t.id,t.data,t.options):null},i.prototype._getHeatRadius=function(){return this._getRenderer()?this._getRenderer()._heatRadius:null},i}(e.Layer);d.mergeOptions(h),d.registerJSONType("HeatLayer"),d.registerRenderer("canvas",function(t){function i(){return r(this,i),n(this,t.apply(this,arguments))}return o(i,t),i.prototype.draw=function(){var t=this.getMap(),i=this.layer,a=t._get2DExtent(),r=this.prepareCanvas(),n=a;if(r){if(!r.intersects(a))return void this.completeRender();n=a.intersection(r)}var o=t._pointToContainerPoint(a.getMin());this._heater||(this._heater=s(this.canvas)),this._heater.radius(i.options.radius||this._heater.defaultRadius,i.options.blur),this._heater.gradient(i.options.gradient),this._heater.max(i.options.max),this._heatViews||(this._heatViews=[]);var h=i._heats;if(!e.Util.isArrayHasData(h))return void this.completeRender();var d=[],u=this._heater._r,c=void 0===i.options.max?1:i.options.max,p=e.Util.isNil(i.options.maxZoom)?t.getMaxZoom():i.options.maxZoom,f=1/Math.pow(2,Math.max(0,Math.min(p-t.getZoom(),12))),l=u/2,_=[],y=t.offsetPlatform(),g=y.x%l,v=y.y%l,m=void 0,w=void 0,x=void 0,b=void 0,R=void 0,C=void 0,O=void 0,M=void 0,P=void 0,E=void 0,j=void 0;for(n=n.expand(u),this._heatRadius=u,m=0,w=h.length;m<w;m++)x=h[m],this._heatViews[m]||(this._heatViews[m]=t.coordinateToPoint(new e.Coordinate(x[0],x[1]))),b=this._heatViews[m],n.contains(b)&&(b=t._pointToContainerPoint(b),O=Math.floor((b.x-o.x-g)/l)+2,M=Math.floor((b.y-o.y-v)/l)+2,R=void 0!==x.alt?x.alt:void 0!==x[2]?+x[2]:1,j=R*f,_[M]=_[M]||[],C=_[M][O],C?(C[0]=(C[0]*C[2]+(b.x-o.x)*j)/(C[2]+j),C[1]=(C[1]*C[2]+(b.y-o.y)*j)/(C[2]+j),C[2]+=j):_[M][O]=[b.x-o.x,b.y-o.y,j]);for(m=0,w=_.length;m<w;m++)if(_[m])for(P=0,E=_[m].length;P<E;P++)C=_[m][P],C&&d.push([Math.round(C[0]),Math.round(C[1]),Math.min(C[2],c)]);this._heater.data(d).draw(i.options.minOpacity),this.completeRender()},i.prototype.onZoomEnd=function(){delete this._heatViews,t.prototype.onZoomEnd.apply(this,arguments)},i.prototype.onResize=function(){this._heater._width=this.canvas.width,this._heater._height=this.canvas.height,t.prototype.onResize.apply(this,arguments)},i.prototype.onRemove=function(){this.clearHeatCache(),delete this._heater},i.prototype.clearHeatCache=function(){delete this._heatViews},i}(e.renderer.CanvasRenderer)),t.HeatLayer=d,Object.defineProperty(t,"__esModule",{value:!0})});
{'fraction_non_alphanumeric': 0.25560058108418077, 'fraction_numerical': 0.01942044498814894, 'mean_word_length': 13.019292604501608, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1334143', 'n_tokens_mistral': 5466, 'n_tokens_neox': 5364, 'n_words': 267}