geojs 1.7.3 → 1.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/geo.lean.min.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(function(){try{return require("hammerjs")}catch(t){}}(),function(){try{return require("d3")}catch(t){}}(),function(){try{return require("vtk.js")}catch(t){}}()):"function"==typeof define&&define.amd?define(["hammerjs","d3","vtk.js"],e):"object"==typeof exports?exports.geo=e(function(){try{return require("hammerjs")}catch(t){}}(),function(){try{return require("d3")}catch(t){}}(),function(){try{return require("vtk.js")}catch(t){}}()):t.geo=e(t.Hammer,t.d3,t["vtk.js"])}(self,(function(t,e,n){return function(){var i={7839:function(t){t.exports={momentum:"geo_action_momentum",pan:"geo_action_pan",rotate:"geo_action_rotate",select:"geo_action_select",unzoomselect:"geo_action_unzoomselect",zoom:"geo_action_zoom",zoomrotate:"geo_action_zoom_rotate",zoomselect:"geo_action_zoomselect",annotation_line:"geo_annotation_line",annotation_polygon:"geo_annotation_polygon",annotation_rectangle:"geo_annotation_rectangle",annotation_edit_handle:"geo_annotation_edit_handle"}},7800:function(t,e,n){var i=n(5638),r=n(5699),o=n(5108),a=n(7839),s=n(6853),l=n(4634),u=n(4647).registerAnnotation,c=n(4708),d=n(2557),h=n(4343),f=n(9757),p=0,m={create:"create",done:"done",highlight:"highlight",edit:"edit"},g="annotationAction",v={fill:!0,fillColor:function(t){return t.selected?{r:0,g:1,b:1}:{r:.3,g:.3,b:.3}},fillOpacity:function(t){return t.selected?.5:.25},radius:function(t){return"edge"===t.type||"rotate"===t.type?8:10},scaled:!1,stroke:!0,strokeColor:{r:0,g:0,b:1},strokeOpacity:1,strokeWidth:function(t){return"edge"===t.type||"rotate"===t.type?2:3},rotateHandleOffset:24,rotateHandleRotation:-Math.PI/4,resizeHandleOffset:48,resizeHandleRotation:-Math.PI/4,handles:{vertex:!0,edge:!0,center:!0,rotate:!0,resize:!0}},y=function t(e,n){"use strict";if(!(this instanceof t))return new t(e,n);var r=this,u=i.extend({},{showLabel:!0},n||{}),c=u.annotationId;delete u.annotationId,void 0===c||u.layer&&u.layer.annotationById(c)?(p+=1,void 0!==c&&console.warn("Annotation id "+c+" is in use; using "+p+" instead."),c=p):c>p&&(p=c);var d=u.name||e.charAt(0).toUpperCase()+e.substr(1)+" "+c,h=u.label||null,y=u.description||void 0,x=e,b=u.layer,_=u.state||m.done;delete u.state,delete u.layer,delete u.name,delete u.label,delete u.description,this._exit=function(){},this.id=function(){return c},this.name=function(t){return void 0===t?d:(null!==t&&(""+t).trim()&&(t=(""+t).trim())!==d&&(d=t,r.modified()),r)},this.label=function(t,e){return void 0===t?null!==h||e?h:d:(t!==h&&(h=t,r.modified()),r)},this._labelPosition=function(){return l.centerFromPerimeter(r._coordinates())},this._rotateHandlePosition=function(t,e){var n,i,o,a=r.layer().map(),s=r._coordinates(),u=l.centerFromPerimeter(r._coordinates()),c=u?a.gcsToDisplay(u,null):void 0,d=0;if(u){for(t=t||0,e=e||0,n=0;n<s.length;n+=1)i=a.gcsToDisplay(s[n],null),d=Math.max(d,Math.pow(i.x-c.x,2)+Math.pow(i.y-c.y,2));return o=Math.sqrt(d)+t,i=a.displayToGcs({x:c.x+o*Math.cos(e),y:c.y-o*Math.sin(e)},null)}},this.labelRecord=function(){var t=r.options("showLabel");if(t){var e=r.state();if(!(!0===t&&e===m.create||!0!==t&&t.indexOf(e)<0)){var n=r.labelStyle(),i={text:r.label(),position:r._labelPosition()};if(i.position)return n&&(i.style=n),i}}},this.description=function(t){return void 0===t?y:(t!==y&&(y=t,r.modified()),r)},this.layer=function(t){return void 0===t?b:(b=t,r)},this.state=function(t){return void 0===t?_:(_!==t&&(_=t,r.layer()&&r.layer().geoTrigger(o.annotation.state,{annotation:r})),r)},this.actions=function(t){return t||(t=r.state()),t===m.edit?[{action:a.annotation_edit_handle,name:"annotation edit",owner:g,input:"left"},{action:a.annotation_edit_handle,name:"annotation edit",owner:g,input:"pan"}]:[]},this.processAction=function(t){},this.processEditAction=function(t){if(t&&r._editHandle&&r._editHandle.handle)switch(r._editHandle.handle.type){case"vertex":return r._processEditActionVertex(t);case"edge":return r._processEditActionEdge(t);case"center":return r._processEditActionCenter(t);case"rotate":return r._processEditActionRotate(t);case"resize":return r._processEditActionResize(t)}},this.selectEditHandle=function(t,e){e&&r._editHandle&&r._editHandle.handle&&r._editHandle.handle.selected&&(r._editHandle.handle.selected=!1),t.selected=e;var n=(r._editHandle||{}).amountRotated||0;return r._editHandle={handle:t,startCoordinates:r._coordinates().slice(),center:l.centerFromPerimeter(r._coordinates()),rotatePosition:r._rotateHandlePosition(t.style.rotateHandleOffset,t.style.rotateHandleRotation+n),startAmountRotated:n,amountRotated:n,resizePosition:r._rotateHandlePosition(t.style.resizeHandleOffset,t.style.resizeHandleRotation)},r.layer()&&r.layer().geoTrigger(o.annotation.select_edit_handle,{annotation:r,handle:r._editHandle,enable:e}),r},this.options=function(t,e){if(void 0===t)return u;if("string"==typeof t&&void 0===e)return u[t];var n;if(void 0===e?(n=void 0!==t[r._coordinateOption],u=i.extend(!0,u,t),["style","createStyle","editStyle","editHandleStyle","labelStyle","highlightStyle"].forEach((function(e){void 0!==t[e]&&i.extend(u[e],t[e])}))):(n=t===r._coordinateOption,u[t]=e),u.coordinates){var a=u.coordinates;delete u.coordinates,r._coordinates(a)}if(void 0!==u.name){var s=u.name;delete u.name,r.name(s)}if(void 0!==u.label){var l=u.label;delete u.label,r.label(l)}if(void 0!==u.description){var c=u.description;delete u.description,r.description(c)}return r.modified(),n&&r.layer()&&r.layer().geoTrigger(o.annotation.coordinates,{annotation:r}),r},this.style=function(t,e,n){return n=n||"style",void 0===t?u[n]:"string"==typeof t&&void 0===e?(u[n]||{})[t]:(void 0===u[n]&&(u[n]={}),void 0===e?u[n]=i.extend(!0,u[n],t):u[n][t]=e,r.modified(),r)},["createStyle","editStyle","editHandleStyle","labelStyle","highlightStyle"].forEach((function(t){r[t]=function(e,n){return r.style(e,n,t)}})),this.styleForState=function(t){return(t=t||r.state())===m.edit||t===m.highlight?i.extend({},u.style,u[t+"Style"]):t===m.create?i.extend({},u.style,u.editStyle,u[t+"Style"]):u[t+"Style"]||u.style||{}},this.type=function(){return x},this.features=function(){return[]},this.mouseClick=function(t){},this.mouseClickEdit=function(t){},this.mouseMove=function(t){},this._coordinates=function(t){return[]},this._coordinateOption="vertices",this.coordinates=function(t){var e=r._coordinates()||[];if(r.layer()){var n=r.layer().map();(t=null===t?n.gcs():void 0===t?n.ingcs():t)!==n.gcs()&&(e=s.transformCoordinates(n.gcs(),t,e))}return e},this.modified=function(){return r.layer()&&r.layer().modified(),r},this.draw=function(){return r.layer()&&(r.layer()._update(),r.layer().draw()),r},this._geojsonStyles=function(){return["closed","fill","fillColor","fillOpacity","lineCap","lineJoin","radius","stroke","strokeColor","strokeOffset","strokeOpacity","strokeWidth"]},this._geojsonCoordinates=function(t){return[]},this._geojsonGeometryType=function(){return""},this.geojson=function(t,e){var n,i,o,a=r._geojsonCoordinates(t),s=r._geojsonGeometryType(),u=r._geojsonStyles(),c=r.options("style")||{},d=r.labelStyle()||{};if(a&&a.length&&s){var p={type:"Feature",geometry:{type:s,coordinates:a},properties:{annotationType:x,name:r.name(),annotationId:r.id()}};for(h&&(p.properties.label=h),y&&(p.properties.description=y),!1===r.options("showLabel")&&(p.properties.showLabel=r.options("showLabel")),n=0;n<u.length;n+=1)i=u[n],void 0!==(o=l.ensureFunction(c[i])())&&(i.toLowerCase().match(/color$/)&&(o=l.convertColorToHex(o,"needed")),p.properties[i]=o);for(n=0;n<f.usedStyles.length;n+=1)i=f.usedStyles[n],void 0!==(o=l.ensureFunction(d[i])())&&(i.toLowerCase().match(/color$/)&&(o=l.convertColorToHex(o,"needed")),p.properties["label"+i.charAt(0).toUpperCase()+i.slice(1)]=o);if(e){var m=r.layer().map();t=null===t?m.gcs():void 0===t?m.ingcs():t,p.crs={type:"name",properties:{type:"proj4",name:t}}}return p}},this._addEditHandles=function(t,e,n,o){var a,s=i.extend({},v,r.editHandleStyle()),u=l.ensureFunction(s.handles)()||{},c=r._editHandle&&r._editHandle.handle&&r._editHandle.handle.selected?r._editHandle.handle:void 0;n=i.extend({},n),Object.keys(u).forEach((function(t){!1===u[t]&&(n[t]=!1)})),t[3]||(t[3]={point:[]}),a=t[3].point,e.forEach((function(t,r){!1!==n.vertex&&a.push(i.extend({},t,{type:"vertex",index:r,style:s,editHandle:!0})),!1===n.edge||r===e.length-1||t.x===e[r+1].x&&t.y===e[r+1].y||a.push(i.extend({x:(t.x+e[r+1].x)/2,y:(t.y+e[r+1].y)/2},{type:"edge",index:r,style:s,editHandle:!0})),!1===n.edge||o||r!==e.length-1||t.x===e[0].x&&t.y===e[0].y||a.push(i.extend({x:(t.x+e[0].x)/2,y:(t.y+e[0].y)/2},{type:"edge",index:r,style:s,editHandle:!0}))})),!1!==n.center&&a.push(i.extend({},l.centerFromPerimeter(r._coordinates()),{type:"center",style:s,editHandle:!0})),!1!==n.rotate&&(a.push(i.extend(r._rotateHandlePosition(s.rotateHandleOffset,s.rotateHandleRotation+(c&&"rotate"===c.type?r._editHandle.amountRotated:0)),{type:"rotate",style:s,editHandle:!0})),!r._editHandle||c&&"rotate"===c.type||(r._editHandle.amountRotated=0)),!1!==n.resize&&a.push(i.extend(r._rotateHandlePosition(s.resizeHandleOffset,s.resizeHandleRotation),{type:"resize",style:s,editHandle:!0})),c&&a.forEach((function(t){t.type===c.type&&t.index===c.index&&(t.selected=!0)}))},this._processEditActionCenter=function(t){var e=r._editHandle.startCoordinates,n=t.mouse.mapgcs.x-t.state.origin.mapgcs.x,i=t.mouse.mapgcs.y-t.state.origin.mapgcs.y,o=r._coordinates(),a=e.map((function(t){return{x:t.x+n,y:t.y+i}}));return(a[0].x!==o[0].x||a[0].y!==o[0].y)&&(r._coordinates(a),!0)},this._processEditActionRotate=function(t){var e=r._editHandle,n=e.startCoordinates,i=t.mouse.mapgcs.x-t.state.origin.mapgcs.x,o=t.mouse.mapgcs.y-t.state.origin.mapgcs.y,a=Math.atan2(e.rotatePosition.y-e.center.y,e.rotatePosition.x-e.center.x),s=Math.atan2(e.rotatePosition.y+o-e.center.y,e.rotatePosition.x+i-e.center.x)-a,l=r._coordinates(),u=n.map((function(t){var n=t.x-e.center.x,i=t.y-e.center.y;return{x:n*Math.cos(s)-i*Math.sin(s)+e.center.x,y:n*Math.sin(s)+i*Math.cos(s)+e.center.y}}));return(u[0].x!==l[0].x||u[0].y!==l[0].y)&&(r._coordinates(u),e.amountRotated=e.startAmountRotated+s,!0)},this._processEditActionResize=function(t){var e=r._editHandle,n=e.startCoordinates,i=t.mouse.mapgcs.x-t.state.origin.mapgcs.x,o=t.mouse.mapgcs.y-t.state.origin.mapgcs.y,a=r.layer().map(),s=a.gcsToDisplay(e.center,null),l=a.gcsToDisplay(e.resizePosition,null),u=a.gcsToDisplay({x:e.resizePosition.x+i,y:e.resizePosition.y+o},null),c=Math.pow(Math.pow(l.y-s.y,2)+Math.pow(l.x-s.x,2),.5)-e.handle.style.resizeHandleOffset,d=Math.pow(Math.pow(u.y-s.y,2)+Math.pow(u.x-s.x,2),.5)-e.handle.style.resizeHandleOffset,h=r._coordinates();if(d&&c){var f=d/c,p=n.map((function(t){return{x:(t.x-e.center.x)*f+e.center.x,y:(t.y-e.center.y)*f+e.center.y}}));if(p[0].x!==h[0].x||p[0].y!==h[0].y)return r._coordinates(p),!0}return!1},this._processEditActionEdge=function(t){var e=r._editHandle,n=e.handle.index,i=r._coordinates();return i.splice(n+1,0,{x:e.handle.x,y:e.handle.y}),e.handle.type="vertex",e.handle.index+=1,e.startCoordinates=i.slice(),r.modified(),!0},this._processEditActionVertex=function(t,e){var n,i,a=r._editHandle,s=a.handle.index,l=a.startCoordinates,u=r._coordinates(),c=u.length,d=u[s],h=t.mouse.mapgcs.x-t.state.origin.mapgcs.x,f=t.mouse.mapgcs.y-t.state.origin.mapgcs.y,p=r.layer(),m=p.options("adjacentPointProximity");return u[s]={x:l[s].x+h,y:l[s].y+f},p.displayDistance(u[s],null,l[s],null)<=m||(p.displayDistance(u[s],null,u[(s+1)%u.length],null)<=m?n=(s+1)%u.length:p.displayDistance(u[s],null,u[(s+u.length-1)%u.length],null)<=m&&(n=(s+u.length-1)%u.length)),i=0===n&&s===u.length-1||n===u.length-1&&0===s,!1===e&&i&&(n=void 0),void 0!==n&&u.length>(e||r.options("style").closed?3:2)&&(u[s]={x:u[n].x,y:u[n].y},t.event===o.actionup&&(e&&i&&(r.options("style").closed=!0),u.splice(s,1))),(u.length!==c||u[s].x!==d.x||u[s].y!==d.y)&&(r._coordinates(u),!0)}};function x(t,e,n,i,r){return n||(n=t.state()),n===m.create?[{action:a["annotation_"+i],name:i+" create",owner:g,input:"left",modifiers:{shift:!1,ctrl:!1}},{action:a["annotation_"+i],name:i+" create",owner:g,input:"pan"}]:e.apply(t,r)}function b(t,e,n){var i=t.layer();if(t.state()===m.create&&i&&e.state.action===a["annotation_"+n]){var r=i.options("continuousPointProximity"),s=i.options("continuousPointCollinearity"),l=i.options("continuousCloseProximity");if(r||0===r){var u=t.options("vertices"),c=!1;if(!u.length)return u.push(e.mouse.mapgcs),u.push(e.mouse.mapgcs),!0;var d=i.displayDistance(u[u.length-2],null,e.mouse.map,"display");if(d&&d>r){if(u.length>=(t._lastClickVertexCount||1)+3){var h=i.displayDistance(u[u.length-3],null,u[u.length-2],null),f=d,p=i.displayDistance(u[u.length-3],null,e.mouse.map,"display");if(h&&p)(p*p-h*h-f*f)/(2*h*f)>Math.cos(s)&&u.pop()}u[u.length-1]=e.mouse.mapgcs,u.push(e.mouse.mapgcs),c=!0}return(l||0===l)&&e.event===o.actionup&&(!0===l||i.displayDistance(u[0],null,e.mouse.map,"display")<=r)?u.length<3+("polygon"===n?1:0)?"remove":(u.pop(),t.state(m.done),"done"):c}}}var _=function t(e){"use strict";if(!(this instanceof t))return new t(e);(e=i.extend(!0,{},{style:{fill:!0,fillColor:{r:0,g:1,b:0},fillOpacity:.25,polygon:function(t){return t.polygon},stroke:!0,strokeColor:{r:0,g:0,b:0},strokeOpacity:1,strokeWidth:3,uniformPolygon:!0},highlightStyle:{fillColor:{r:0,g:1,b:1},fillOpacity:.5,strokeWidth:5},createStyle:{fillColor:{r:.3,g:.3,b:.3},fillOpacity:.25,strokeColor:{r:0,g:0,b:1}}},e||{})).corners=e.corners||e.coordinates||[],delete e.coordinates,y.call(this,"rectangle",e);var n=this,r=this.actions,s=this.processEditAction;this.actions=function(t){return t||(t=n.state()),t===m.create?[{action:a.annotation_rectangle,name:"rectangle create",owner:g,input:"left",modifiers:{shift:!1,ctrl:!1},selectionRectangle:!0}]:r.apply(n,arguments)},this.processAction=function(t){var e=n.layer();if(n.state()===m.create&&e&&t.event===o.actionselection&&t.state.action===a.annotation_rectangle){var i=e.map(),r=[i.displayToGcs({x:t.lowerLeft.x,y:t.lowerLeft.y},null),i.displayToGcs({x:t.lowerLeft.x,y:t.upperRight.y},null),i.displayToGcs({x:t.upperRight.x,y:t.upperRight.y},null),i.displayToGcs({x:t.upperRight.x,y:t.lowerLeft.y},null)];return e.displayDistance(r[0],null,r[1],null)*e.displayDistance(r[0],null,r[3],null)<.01?"remove":(n.options("corners",r),n.state(m.done),"done")}},this.features=function(){var t,e=n.options(),i=n.state();if(i===m.create)t=[],e.corners&&e.corners.length>=4&&(t=[{polygon:{polygon:e.corners,style:n.styleForState(i)}}]);else t=[{polygon:{polygon:e.corners,style:n.styleForState(i)}}],i===m.edit&&n._addEditHandles(t,e.corners);return t},this._coordinates=function(t){return t&&t.length>=4&&n.options("corners",t.slice(0,4)),n.options("corners")},this._coordinateOption="corners",this._geojsonCoordinates=function(t){var e=n.coordinates(t);if(e&&n.state()!==m.create&&!(e.length<4)){for(var i=[],r=0;r<4;r+=1)i.push([e[r].x,e[r].y]);return i.push([e[0].x,e[0].y]),[i]}},this._geojsonGeometryType=function(){return"Polygon"},this._geojsonStyles=function(){return["fill","fillColor","fillOpacity","lineCap","lineJoin","stroke","strokeColor","strokeOffset","strokeOpacity","strokeWidth"]},this._setCornersFromMouse=function(t,e){var r=n.layer().map(),o=r.gcsToDisplay({x:t[0].x,y:t[0].y},null),a=r.gcsToDisplay(e.mapgcs,null),s={x:a.x,y:o.y},l={x:o.x,y:a.y};t[2]=i.extend({},e.mapgcs),t[1]=r.displayToGcs(s,null),t[3]=r.displayToGcs(l,null)},this.mouseMove=function(t){if(n.state()===m.create){var e=n.options("corners");return e.length?(n._setCornersFromMouse(e,t),!0):void 0}},this.mouseClick=function(t){var e=n.layer();if(n.state()===m.create&&e&&(t.buttonsDown.left||t.buttonsDown.right)){var r=n.options("corners");if(!t.buttonsDown.right||r.length)return t.handled=!0,r.length?(n._setCornersFromMouse(r,t),e.displayDistance(r[0],null,r[1],null)*e.displayDistance(r[0],null,r[3],null)<.01?"remove":(n.state(m.done),"done")):t.buttonsDown.left?(r.push(i.extend({},t.mapgcs)),r.push(i.extend({},t.mapgcs)),r.push(i.extend({},t.mapgcs)),r.push(i.extend({},t.mapgcs)),!0):void 0}},this.processEditAction=function(t){var e,i,r,o,a,l=n._editHandle.startCoordinates,u={x:t.mouse.mapgcs.x-t.state.origin.mapgcs.x,y:t.mouse.mapgcs.y-t.state.origin.mapgcs.y},c=n._editHandle.handle.type,d=n._editHandle.handle.index,h=[Math.atan2(l[1].y-l[0].y,l[1].x-l[0].x),Math.atan2(l[2].y-l[1].y,l[2].x-l[1].x),Math.atan2(l[3].y-l[2].y,l[3].x-l[2].x),Math.atan2(l[0].y-l[3].y,l[0].x-l[3].x)];switch(h[0]||h[1]||h[2]||h[3]||(h[1]=Math.PI/2,h[2]=Math.PI,h[3]=-Math.PI/2),h[0]||h[2]||(h[0]=h[1]-Math.PI/2,h[2]=h[1]+Math.PI/2),h[1]||h[3]||(h[1]=h[2]-Math.PI/2,h[3]=h[2]+Math.PI/2),c){case"vertex":return e=l.map((function(t){return{x:t.x,y:t.y}})),o=h[(d+1)%4],i={x:(u.x*Math.cos(o)+u.y*Math.sin(o))*Math.cos(o),y:(u.y*Math.sin(o)+u.x*Math.cos(o))*Math.sin(o)},a=h[d],r={x:(u.x*Math.cos(a)+u.y*Math.sin(a))*Math.cos(a),y:(u.y*Math.sin(a)+u.x*Math.cos(a))*Math.sin(a)},e[d].x+=u.x,e[d].y+=u.y,e[(d+1)%4].x+=i.x,e[(d+1)%4].y+=i.y,e[(d+3)%4].x+=r.x,e[(d+3)%4].y+=r.y,n.options("corners",e),!0;case"edge":return e=l.map((function(t){return{x:t.x,y:t.y}})),o=h[(d+1)%4],u={x:(u.x*Math.cos(o)+u.y*Math.sin(o))*Math.cos(o),y:(u.y*Math.sin(o)+u.x*Math.cos(o))*Math.sin(o)},e[d].x+=u.x,e[d].y+=u.y,e[(d+1)%4].x+=u.x,e[(d+1)%4].y+=u.y,n.options("corners",e),!0}return s.apply(n,arguments)}};r(_,y);var w={};w[h.capabilities.feature]=!0,u("rectangle",_,w);var M=function t(e){"use strict";if(!(this instanceof t))return new t(e);(e=i.extend(!0,{},{style:{fill:!0,fillColor:{r:0,g:1,b:0},fillOpacity:.25,polygon:function(t){return t.polygon},stroke:!0,strokeColor:{r:0,g:0,b:0},strokeOpacity:1,strokeWidth:3,uniformPolygon:!0},highlightStyle:{fillColor:{r:0,g:1,b:1},fillOpacity:.5,strokeWidth:5},createStyle:{closed:!1,fillColor:{r:.3,g:.3,b:.3},fillOpacity:.25,line:function(t){return Array.apply(null,Array(n.options("vertices").length)).map((function(){return t}))},position:function(t,e){return n.options("vertices")[e]},stroke:!1,strokeColor:{r:0,g:0,b:1}}},e||{})).vertices=e.vertices||e.coordinates||[],delete e.coordinates,y.call(this,"polygon",e);var n=this,r=this.actions;this.features=function(){var t,e=n.options(),i=n.state(),r=n.styleForState(i);if(i===m.create)t=[],e.vertices&&e.vertices.length>=3&&(t[1]={polygon:{polygon:e.vertices,style:r}}),e.vertices&&e.vertices.length>=2&&(t[2]={line:{line:e.vertices,style:r}});else t=[{polygon:{polygon:e.vertices,style:r}}],i===m.edit&&n._addEditHandles(t,e.vertices);return t},this._coordinates=function(t){return t&&n.options("vertices",t),n.options("vertices")},this.mouseMove=function(t){if(n.state()===m.create){var e=n.options("vertices");return e.length?(e[e.length-1]=t.mapgcs,!0):void 0}},this.mouseClick=function(t){var e=n.layer();if(n.state()===m.create&&e){var i,r=!!t.buttonsDown.right;if(t.buttonsDown.left||t.buttonsDown.right){var o=n.options("vertices");if(!t.buttonsDown.right||o.length)return t.handled=!0,t.buttonsDown.left&&(o.length?o.length>=2&&e.displayDistance(o[o.length-2],null,t.map,"display")<=e.options("adjacentPointProximity")?(i=!0,n._lastClick&&t.time-n._lastClick<e.options("dblClickTime")&&(r=!0)):o.length>=2&&e.displayDistance(o[0],null,t.map,"display")<=e.options("finalPointProximity")?r=!0:o[o.length-1]=t.mapgcs:o.push(t.mapgcs),r||i||o.push(t.mapgcs),n._lastClick=t.time,n._lastClickVertexCount=o.length),r?o.length<4?"remove":(o.pop(),n.state(m.done),"done"):!i}}},this.actions=function(t){return x(n,r,t,"polygon",arguments)},this.processAction=function(t){return b(n,t,"polygon")},this._geojsonCoordinates=function(t){var e=n.coordinates(t);if(e&&!(e.length<3)&&n.state()!==m.create){for(var i=[],r=0;r<e.length;r+=1)i.push([e[r].x,e[r].y]);return i.push([e[0].x,e[0].y]),[i]}},this._geojsonGeometryType=function(){return"Polygon"},this._geojsonStyles=function(){return["fill","fillColor","fillOpacity","lineCap","lineJoin","stroke","strokeColor","strokeOffset","strokeOpacity","strokeWidth"]}};r(M,y);var A={};A[h.capabilities.feature]=!0,A[c.capabilities.basic]=[m.create],u("polygon",M,A);var T=function t(e){"use strict";if(!(this instanceof t))return new t(e);(e=i.extend(!0,{},{style:{line:function(t){return Array.apply(null,Array(n.options("vertices").length)).map((function(){return t}))},position:function(t,e){return n.options("vertices")[e]},strokeColor:{r:0,g:0,b:0},strokeOpacity:1,strokeWidth:3,closed:!1,lineCap:"butt",lineJoin:"miter"},highlightStyle:{strokeWidth:5},createStyle:{line:function(t){return Array.apply(null,Array(n.options("vertices").length)).map((function(){return t}))},position:function(t,e){return n.options("vertices")[e]},strokeColor:{r:0,g:0,b:1},strokeOpacity:1,strokeWidth:3,closed:!1,lineCap:"butt",lineJoin:"miter"}},e||{})).vertices=e.vertices||e.coordinates||[],delete e.coordinates,y.call(this,"line",e);var n=this,r=this.actions,o=this.processEditAction;this.features=function(){var t,e=n.options(),i=n.state();if(i===m.create)t=[{line:{line:e.vertices,style:n.styleForState(i)}}];else t=[{line:{line:e.vertices,style:n.styleForState(i)}}],i===m.edit&&n._addEditHandles(t,e.vertices,void 0,!n.style("closed"));return t},this._coordinates=function(t){return t&&n.options("vertices",t),n.options("vertices")},this.mouseMove=function(t){if(n.state()===m.create){var e=n.options("vertices");return e.length?(e[e.length-1]=t.mapgcs,!0):void 0}},this.mouseClick=function(t){var e=n.layer();if(n.state()===m.create&&e){var i,r=!!t.buttonsDown.right;if(t.buttonsDown.left||t.buttonsDown.right){var o=n.options("vertices");if(!t.buttonsDown.right||o.length)return t.handled=!0,t.buttonsDown.left&&(o.length?o.length>=2&&e.displayDistance(o[o.length-2],null,t.map,"display")<=e.options("adjacentPointProximity")?(i=!0,n._lastClick&&t.time-n._lastClick<e.options("dblClickTime")&&(r=!0)):o.length>=2&&e.displayDistance(o[0],null,t.map,"display")<=e.options("finalPointProximity")?r="close":o[o.length-1]=t.mapgcs:o.push(t.mapgcs),r||i||o.push(t.mapgcs),n._lastClick=t.time,n._lastClickVertexCount=o.length),r?o.length<3?"remove":(o.pop(),n.options("style").closed="close"===r,n.state(m.done),"done"):!i}}},this.actions=function(t){return x(n,r,t,"line",arguments)},this.processAction=function(t){return b(n,t,"line")},this._geojsonCoordinates=function(t){var e=n.coordinates(t);if(e&&!(e.length<2)&&n.state()!==m.create){for(var i=[],r=0;r<e.length;r+=1)i.push([e[r].x,e[r].y]);return i}},this._geojsonGeometryType=function(){return"LineString"},this._geojsonStyles=function(){return["closed","lineCap","lineJoin","strokeColor","strokeOffset","strokeOpacity","strokeWidth"]},this.processEditAction=function(t){return"vertex"===n._editHandle.handle.type?n._processEditActionVertex(t,!0):o.apply(n,arguments)},this.mouseClickEdit=function(t){var e,i=n.layer(),r=n._editHandle;if(n.state()===m.edit&&i&&t.buttonsDown.left&&r&&r.handle.selected&&"edge"===r.handle.type&&n.options("style").closed&&(t.handled=!0,n._lastClick&&t.time-n._lastClick<i.options("dblClickTime")&&(e=!0),n._lastClick=t.time,e)){var o=r.handle.index,a=n._coordinates(),s=a.slice(o+1).concat(a.slice(0,o+1));return n._coordinates(s),n.options("style").closed=!1,r.handle.index=void 0,!0}}};r(T,y);var C={};C[c.capabilities.basic]=[m.create],u("line",T,C);var E=function t(e){"use strict";if(!(this instanceof t))return new t(e);(e=i.extend(!0,{},{style:{fill:!0,fillColor:{r:0,g:1,b:0},fillOpacity:.25,radius:10,scaled:!1,stroke:!0,strokeColor:{r:0,g:0,b:0},strokeOpacity:1,strokeWidth:3},createStyle:{fillColor:{r:.3,g:.3,b:.3},fillOpacity:.25,strokeColor:{r:0,g:0,b:1}},highlightStyle:{fillColor:{r:0,g:1,b:1},fillOpacity:.5,strokeWidth:5}},e||{})).position=e.position||(e.coordinates?e.coordinates[0]:void 0),delete e.coordinates,y.call(this,"point",e);var n=this;this.features=function(){var t,e,r,o=n.options(),a=n.state();if(a===m.create)t=[];else e=n.styleForState(a),(o.style.scaled||0===o.style.scaled)&&(!0===o.style.scaled&&(o.style.scaled=n.layer().map().zoom()),e=i.extend({},e,{radius:function(){var t=o.style.radius,e=n.layer().map().zoom();return l.isFunction(t)&&(t=t.apply(n,arguments)),t*=Math.pow(2,e-o.style.scaled),t}}),r=!0),t=[{point:{x:o.position.x,y:o.position.y,style:e,scaleOnZoom:r}}],a===m.edit&&n._addEditHandles(t,[o.position],{edge:!1,center:!1,resize:!1,rotate:!1});return t},this._coordinates=function(t){return t&&t.length>=1&&n.options("position",t[0]),n.state()===m.create?[]:[n.options("position")]},this._coordinateOption="position",this.mouseClick=function(t){if(n.state()===m.create&&t.buttonsDown.left)return t.handled=!0,n.options("position",t.mapgcs),n.state(m.done),"done"},this._geojsonStyles=function(){return["fill","fillColor","fillOpacity","radius","scaled","stroke","strokeColor","strokeOpacity","strokeWidth"]},this._geojsonCoordinates=function(t){var e=n.coordinates(t);if(e&&n.state()!==m.create&&!(e.length<1)&&void 0!==e[0])return[e[0].x,e[0].y]},this._geojsonGeometryType=function(){return"Point"}};r(E,y);var S={};S[d.capabilities.feature]=!0,u("point",E,S),t.exports={state:m,actionOwner:g,annotation:y,lineAnnotation:T,pointAnnotation:E,polygonAnnotation:M,rectangleAnnotation:_,_editHandleFeatureLevel:3,defaultEditHandleStyle:v}},836:function(t,e,n){var i=n(5699),r=n(3715),o=n(7800),a=n(5108),s=n(4647),l=n(6853),u=n(5638),c=n(3345),d=n(9757),h=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this,e);var i,h,f,p,m=n(3870),g=n(6618),v=n(4634),y=this,x=this._init,b=this._exit,_=this.draw,w=this._update,M=g(),A=null,T=[],C=[],E={closed:{dataType:"boolean",keys:["closed","close"]},fill:{dataType:"boolean",keys:["fill"]},fillColor:{dataType:"color",keys:["fillColor","fill-color","marker-color","fill"]},fillOpacity:{dataType:"opacity",keys:["fillOpacity","fill-opacity"]},lineCap:{dataType:"text",keys:["lineCap","line-cap"]},lineJoin:{dataType:"text",keys:["lineJoin","line-join"]},radius:{dataType:"positive",keys:["radius"]},scaled:{dataType:"booleanOrNumber",keys:["scaled"]},stroke:{dataType:"boolean",keys:["stroke"]},strokeColor:{dataType:"color",keys:["strokeColor","stroke-color","stroke"]},strokeOffset:{dataType:"number",keys:["strokeOffset","stroke-offset"]},strokeOpacity:{dataType:"opacity",keys:["strokeOpacity","stroke-opacity"]},strokeWidth:{dataType:"positive",keys:["strokeWidth","stroke-width"]}},S={offset:"coordinate2",rotateWithMap:"boolean",rotation:"angle",scaleWithMap:"boolean",scale:"booleanOrNumber",shadowBlur:"numberOrBlank",shadowOffset:"coordinate2",strokeWidth:"numberOrBlank",visible:"boolean"};return d.usedStyles.forEach((function(t){E[t]={option:"labelStyle",dataType:S[t]||"text",keys:[t,"label"+t.charAt(0).toUpperCase()+t.slice(1),t.replace(/([A-Z])/g,"-$1").toLowerCase(),"label-"+t.replace(/([A-Z])/g,"-$1").toLowerCase()]}})),i=u.extend(!0,{},{dblClickTime:300,adjacentPointProximity:5,continuousPointProximity:5,continuousPointCollinearity:1*Math.PI/180,continuousCloseProximity:10,finalPointProximity:10,showLabels:!0,clickToEdit:!1},e),this._processAction=function(t){var e;if(t.state&&t.state.actionRecord&&t.state.actionRecord.owner===o.actionOwner&&y.currentAnnotation)if(y.mode()===y.modes.edit)e=y.currentAnnotation.processEditAction(t),y.currentAnnotation&&y.currentAnnotation._editHandle&&y.currentAnnotation._editHandle.handle&&(y.geoTrigger(a.annotation.edit_action,{annotation:y.currentAnnotation,handle:y.currentAnnotation._editHandle?y.currentAnnotation._editHandle.handle:void 0,action:t.event}),t.event===a.actionup&&y._selectEditHandle({data:y.currentAnnotation._editHandle.handle},y.currentAnnotation._editHandle.handle.selected));else e=y.currentAnnotation.processAction(t);y._updateFromEvent(e)},this._updateFromEvent=function(t){switch(t){case"remove":y.removeAnnotation(y.currentAnnotation,!1),y.mode(null);break;case"done":y.mode(null)}t&&(y.modified(),y.draw())},this._handleMouseMove=function(t){y.mode()&&y.currentAnnotation&&(y.currentAnnotation.mouseMove(t)&&(y.modified(),y.draw()))},this._selectEditHandle=function(t,e){if(t.data&&t.data.editHandle){if(u.each(C[o._editHandleFeatureLevel],(function(t,e){e.feature.modified()})),y.currentAnnotation.selectEditHandle(t.data,e),y.draw(),y.map().node().toggleClass("annotation-input",!!e),y.map().interactor().removeAction(void 0,void 0,o.actionOwner),e){var n=y.currentAnnotation.actions(o.state.edit);u.each(n,(function(t,e){y.map().interactor().addAction(e)}))}return y}},this._handleMouseOn=function(t){t.data&&t.data.annotation&&(y.mode()===y.modes.edit&&y.currentAnnotation?y._selectEditHandle(t,!0):y.mode()||y.currentAnnotation||!y.options("clickToEdit")||(t.data.annotation.state(o.state.highlight),y.modified(),y.draw()))},this._handleMouseOff=function(t){t.data&&t.data.annotation&&(y.mode()===y.modes.edit&&t.data.editHandle&&t.data.selected?y._selectEditHandle(t,!1):t.data.annotation.state()===o.state.highlight&&(t.data.annotation.state(o.state.done),y.modified(),y.draw()))},this._handleMouseClick=function(t){var e,n=!1;if(y.mode()===y.modes.edit){if(y.map().interactor().hasAction(void 0,void 0,o.actionOwner))return e=y.currentAnnotation.mouseClickEdit(t),void y._updateFromEvent(e);y.mode(null),y.draw(),u.each(C,(function(t,e){u.each(e,(function(t,e){e.feature._clearSelectedFeatures()}))})),n=!0}else if(y.mode()&&y.currentAnnotation)e=y.currentAnnotation.mouseClick(t),y._updateFromEvent(e),n=!y.mode();else if(!y.mode()&&!y.currentAnnotation&&y.options("clickToEdit")){var i=y.annotations().filter((function(t){return t.state()===o.state.highlight}));if(1!==i.length)return;y.mode(y.modes.edit,i[0]),y.draw(),n=!0}n&&y.map().interactor().retriggerMouseMove()},this.options=function(t,e){return void 0===t?i:"string"==typeof t&&void 0===e?i[t]:(void 0===e?i=u.extend(!0,i,t):i[t]=e,y.modified(),y)},this.displayDistance=function(t,e,n,i){var r=y.map();return"display"!==e&&(e=null===e?r.gcs():void 0===e?r.ingcs():e,t=r.gcsToDisplay(t,e)),"display"!==i&&(i=null===i?r.gcs():void 0===i?r.ingcs():i,n=r.gcsToDisplay(n,i)),Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))},this.addAnnotation=function(t,e,n){if(u.inArray(t,T)<0){y.geoTrigger(a.annotation.add_before,{annotation:t}),T.push(t),t.layer(y);var i=y.map();(e=null===e?i.gcs():void 0===e?i.ingcs():e)!==i.gcs()&&t._coordinates(l.transformCoordinates(e,i.gcs(),t._coordinates())),!1!==n&&(y.modified(),y.draw()),y.geoTrigger(a.annotation.add,{annotation:t})}return y},this.removeAnnotation=function(t,e){var n=u.inArray(t,T);return n>=0&&(t===y.currentAnnotation&&(y.currentAnnotation=null),t._exit(),T.splice(n,1),!1!==e&&(y.modified(),y.draw()),y.geoTrigger(a.annotation.remove,{annotation:t})),n>=0},this.removeAllAnnotations=function(t,e){for(var n,i=0,r=0;r<T.length;)n=T[r],t&&n.state()===o.state.create?r+=1:(y.removeAnnotation(n,!1),i+=1);return i&&!1!==e&&(y.modified(),y.draw()),i},this.annotations=function(){return T.slice()},this.annotationById=function(t){null!=t&&(t=+t);var e=T.filter((function(e){return e.id()===t}));if(e.length)return e[0]},this.modes={edit:"edit"},this.mode=function(t,e){if(void 0===t)return A;if(t!==A||t===y.modes.edit&&e!==y.editAnnotation){var n,i,r=y.map().node(),s=A;if(A=t,r.toggleClass("annotation-input",!(!A||A===y.modes.edit)),p||(p=c(r[0])),A?p.bind("esc",(function(){y.mode(null)})):p.unbind("esc"),y.currentAnnotation){switch(y.currentAnnotation.state()){case o.state.create:y.removeAnnotation(y.currentAnnotation);break;case o.state.edit:y.currentAnnotation.state(o.state.done),y.modified(),y.draw()}y.currentAnnotation=null}switch(A){case y.modes.edit:y.currentAnnotation=e,y.currentAnnotation.state(o.state.edit),y.modified();break;case"line":n=o.lineAnnotation;break;case"point":n=o.pointAnnotation;break;case"polygon":n=o.polygonAnnotation;break;case"rectangle":n=o.rectangleAnnotation}y.map().interactor().removeAction(void 0,void 0,o.actionOwner),n&&(y.currentAnnotation=n({state:o.state.create,layer:y}),y.addAnnotation(y.currentAnnotation,null),i=y.currentAnnotation.actions(o.state.create),u.each(i,(function(t,e){y.map().interactor().addAction(e)}))),y.geoTrigger(a.annotation.mode,{mode:A,oldMode:s}),s===y.modes.edit&&y.modified()}return y},this.geojson=function(t,e,n,i){if(void 0!==t){var r=s.createFileReader("geojsonReader",{layer:y});if(!r.canRead(t))return;return!0===e&&y.removeAllAnnotations(!0,!1),"update"===e&&u.each(y.annotations(),(function(t,e){e.options("updated",!1)})),r.read(t,(function(t){u.each(t.slice(),(function(t,e){y._geojsonFeatureToAnnotation(e,n),y.deleteFeature(e)}))})),"update"===e&&u.each(y.annotations(),(function(t,e){!1===e.options("updated")&&e.state()===o.state.done&&y.removeAnnotation(e,!1)})),y.modified(),y.draw(),T.length}t=null;var a=[];return u.each(T,(function(t,e){var r=e.geojson(n,i);r&&a.push(r)})),a.length&&(t={type:"FeatureCollection",features:a}),t},this._geojsonFeatureToAnnotation=function(t,e){var n=t.data(),i=s.listAnnotations(),r=y.map();e=null===e?r.gcs():void 0===e?r.ingcs():e,u.each(n,(function(n,c){var d,h,f,p,m=(c.properties||{}).annotationType||t.featureType,g=u.extend({},c.properties||{});if(!(u.inArray(m,i)<0)){switch(g.style=g.style||{},g.labelStyle=g.labelStyle||{},delete g.annotationType,t.featureType){case"line":if(!(d=t.line()(c,n))||d.length<2)return;d=d.slice();break;case"polygon":if(!(d=t.polygon()(c,n))||!d.outer||d.outer.length<3)return;if((d=d.outer.slice())[d.length-1][0]===d[0][0]&&d[d.length-1][1]===d[0][1]&&(d.splice(d.length-1,1),d.length<3))return;break;case"point":d=[t.position()(c,n)]}for(f=0;f<d.length;f+=1)d[f]=v.normalizeCoordinates(d[f]);(h=c.crs&&"name"===c.crs.type&&c.crs.properties&&"proj4"===c.crs.properties.type&&c.crs.properties.name?c.crs.properties.name:e)!==r.gcs()&&(d=l.transformCoordinates(h,r.gcs(),d)),g.coordinates=d,u.each(E,(function(e,i){var r;u.each(i.keys,(function(t,e){void 0===r&&(r=y.validateAttribute(g[e],i.dataType))})),void 0===r&&(r=y.validateAttribute(t.style.get(e)(c,n),i.dataType)),void 0!==r&&(g[i.option||"style"][e]=r)})),u.each(E,(function(t,e){u.each(e.keys,(function(t,e){delete g[e]}))})),void 0!==g.annotationId&&(p=y.annotationById(g.annotationId))&&delete g.annotationId,p&&p.type()===m&&p.state()===o.state.done&&!1===p.options("updated")?(delete g.state,delete g.layer,g.updated=!0,p.options(g),y.geoTrigger(a.annotation.update,{annotation:p})):(g.state=o.state.done,g.layer=y,g.updated="new",y.addAnnotation(s.createAnnotation(m,g),null))}}))},this.validateAttribute=function(t,e){var n;if(null!=t){switch(e){case"angle":if(""===t)break;if(!(n=/^\s*([-.0-9eE]+)\s*(deg|rad|grad|turn)?\s*$/.exec((""+t).toLowerCase()))||!isFinite(n[1]))return;var i="grad"===n[2]?Math.PI/200:"deg"===n[2]?Math.PI/180:"turn"===n[2]?2*Math.PI:1;t=+n[1]*i;break;case"boolean":t=!!t&&["false","no","off"].indexOf((""+t).toLowerCase())<0;break;case"booleanOrNumber":if(!t&&0!==t&&""!==t||["true","false","off","on","no","yes"].indexOf((""+t).toLowerCase())>=0)t=!!t&&["false","no","off"].indexOf((""+t).toLowerCase())<0;else{if(!v.isNonNullFinite(t))return;t=+t}break;case"coordinate2":if(""===t)break;if(t&&v.isNonNullFinite(t.x)&&v.isNonNullFinite(t.y)){t.x=+t.x,t.y=+t.y;break}try{t=JSON.parse(t)}catch(t){}if(t&&v.isNonNullFinite(t.x)&&v.isNonNullFinite(t.y)){t.x=+t.x,t.y=+t.y;break}if(Array.isArray(t)&&v.isNonNullFinite(t[0])&&v.isNonNullFinite(t[1])){t={x:+t[0],y:+t[1]};break}if(!(n=/^\s*([-.0-9eE]+)(?:\s+|\s*,)\s*([-.0-9eE]+)\s*$/.exec(""+t))||!isFinite(n[1])||!isFinite(n[2]))return;t={x:+n[1],y:+n[2]};break;case"color":if(void 0===(t=v.convertColor(t))||void 0===t.r)return;break;case"number":if(!v.isNonNullFinite(t))return;t=+t;break;case"numberOrBlank":if(""===t)break;if(!v.isNonNullFinite(t))return;t=+t;break;case"opacity":if(""===t)return;if(t=+t,isNaN(t)||t<0||t>1)return;break;case"positive":if(t=+t,!isFinite(t)||t<=0)return;break;case"text":t=""+t}return t}},this._update=function(){if(y.timestamp()>M.timestamp()){var t=y.options("showLabels")?[]:null,e=y.options("clickToEdit")||y.mode()===y.modes.edit;u.each(C,(function(t,e){u.each(e,(function(t,e){e.data=[],delete e.feature.scaleOnZoom}))})),u.each(T,(function(n,i){var r=i.features();if(t){var o=i.labelRecord();o&&t.push(o)}u.each(r,(function(t,n){void 0===C[t]&&(C[t]={}),u.each(n,(function(n,r){if(C[t][n])(o=C[t][n].feature).selectionAPI()!==!!e&&(o.selectionAPI(e),e?(o.geoOn(a.feature.mouseon,y._handleMouseOn),o.geoOn(a.feature.mouseoff,y._handleMouseOff)):(o.geoOff(a.feature.mouseon,y._handleMouseOn),o.geoOff(a.feature.mouseoff,y._handleMouseOff)));else{var o=y.createFeature(n,{gcs:y.map().gcs(),selectionAPI:e});if(!o){var s="error_feature_"+n;return void(y[s]||(console.warn("Cannot create a "+n+" feature for annotations."),y[s]=!0))}e&&(o.geoOn(a.feature.mouseon,y._handleMouseOn),o.geoOn(a.feature.mouseoff,y._handleMouseOff));var l={};u.each(["closed","fill","fillColor","fillOpacity","line","lineCap","lineJoin","polygon","position","radius","stroke","strokeColor","strokeOffset","strokeOpacity","strokeWidth","uniformPolygon"],(function(t,e){var n;void 0!==o.style()[e]&&(n=o.style.get(e)),l[e]=function(t,i,r,o){var a=t&&t.style?t.style:t&&t[2]&&t[2].style?t[2].style:r.style,s=a?a[e]:t;return v.isFunction(s)&&(s=s(t,i,r,o)),void 0===s&&n&&(s=n(t,i,r,o)),s}})),o.style(l),C[t][n]={feature:o,style:l,data:[]}}var c=r.data||r;Array.isArray(c)||(c=[c]),c.forEach((function(e){e.annotation=i,C[t][n].data.push(e),r.scaleOnZoom&&(C[t][n].feature.scaleOnZoom=!0)}))}))}))})),u.each(C,(function(t,e){u.each(e,(function(t,e){e.feature.data(e.data)}))})),y._updateLabels(t),M.modified()}return w.call(y,arguments),y},this._updateLabels=function(t){if(!t||!t.length)return y._removeLabelFeature(),y;if(!h){if(!(s.registries.features[y.rendererName()]||{}).text){var e=s.rendererForFeatures(["text"]);f=s.createLayer("feature",y.map(),{renderer:e}),y.addChild(f),f._update(),y.geoTrigger(a.layerAdd,{target:y,layer:f})}var n={};d.usedStyles.forEach((function(t){n[t]=function(e,n){return e.style&&void 0!==e.style[t]?e.style[t]:(y.options("defaultLabelStyle")||{})[t]}})),h=(f||y).createFeature("text",{style:n,gcs:y.map().gcs(),position:function(t){return t.position}})}return h.data(t),y},this._handleZoom=function(){var t,e=y.features();for(t=0;t<e.length;t+=1)e[t].scaleOnZoom&&e[t].modified()},this._removeLabelFeature=function(){return f&&(f._exit(),y.removeChild(f),y.geoTrigger(a.layerRemove,{target:y,layer:f}),f=h=null),h&&(y.removeFeature(h),h=null),y},this.draw=function(){return y._update(),_.call(y),y},this._init=function(){return x.call(y),y.map().interactor()||y.map().interactor(m({actions:[]})),y.geoOn(a.actionselection,y._processAction),y.geoOn(a.actionmove,y._processAction),y.geoOn(a.actionup,y._processAction),y.geoOn(a.mouseclick,y._handleMouseClick),y.geoOn(a.mousemove,y._handleMouseMove),y.geoOn(a.zoom,y._handleZoom),y},this._exit=function(){return p&&p.reset(),y._removeLabelFeature(),b.call(y),T=[],C=[],y},y};i(h,r),s.registerLayer("annotation",h),t.exports=h},9986:function(t,e,n){var i=n(5699),r=n(3737),o=n(4634),a=n(8054),s=n(5365),l=n(5240),u=n(8608),c=function t(e){if(!(this instanceof t))return new t(e);var i=n(5108);return e=e||{},r.call(this,e),this._view=o.mat4AsArray(),this._proj=o.mat4AsArray(),this._projection=null,this._transform=o.mat4AsArray(),this._inverse=o.mat4AsArray(),this._bounds=null,this._display=null,this._world=null,this._viewport={width:1,height:1},this._createProj=function(){var t="perspective"===this._projection?l.frustum:l.ortho,e=this._clipbounds[this._projection];t(this._proj,e.left,e.right,e.bottom,e.top,e.near,e.far)},this._update=function(){this._bounds=null,this._display=null,this._world=null,this._transform=l.multiply(o.mat4AsArray(),this._proj,this._view),l.invert(this._inverse,this._transform),this.geoTrigger(i.camera.view,{camera:this})},Object.defineProperty(this,"view",{get:function(){return this._view},set:function(t){l.copy(this._view,t),this._update()},configurable:!0}),Object.defineProperty(this,"bounds",{get:function(){return null===this._bounds&&(this._bounds=this._getBounds()),this._bounds},set:function(t){this._setBounds(t),this._update()}}),Object.defineProperty(this,"clipbounds",{get:function(){return this._clipbounds[this._projection]},set:function(t){var e=this._clipbounds[this._projection];if((t={left:void 0===t.left?e.left:t.left,right:void 0===t.right?e.right:t.right,top:void 0===t.top?e.top:t.top,bottom:void 0===t.bottom?e.bottom:t.bottom,near:void 0===t.near?e.near:t.near,far:void 0===t.far?e.far:t.far}).left===t.right)throw new Error("Left and right values must be different");if(t.top===t.bottom)throw new Error("Top and bottom values must be different");if(t.near===t.far)throw new Error("Near and far values must be different");this._clipbounds[this._projection]=t,this._createProj(),this._update()}}),Object.defineProperty(this,"display",{get:function(){if(null===this._display){var t=this._clipbounds[this._projection],e=o.mat4AsArray();l.translate(e,e,[this.viewport.width/2,this.viewport.height/2,0]),l.scale(e,e,[this.viewport.width/(t.right-t.left),this.viewport.height/(t.bottom-t.top),1]),l.translate(e,e,[-(t.left+t.right)/2,-(t.top+t.bottom)/2,0]),l.multiply(e,e,this._transform),this._display=e}return this._display}}),Object.defineProperty(this,"world",{get:function(){return null===this._world&&(this._world=l.invert(o.mat4AsArray(),this.display)),this._world}}),Object.defineProperty(this,"projection",{get:function(){return this._projection},set:function(t){if(!this.constructor.projection[t])throw new Error("Unsupported projection type: "+t);t!==this._projection&&(this._projection=t,this._createProj(),this._update(),this.geoTrigger(i.camera.projection,{camera:this,projection:t}))}}),Object.defineProperty(this,"projectionMatrix",{get:function(){return this._proj}}),Object.defineProperty(this,"transform",{get:function(){return this._transform}}),Object.defineProperty(this,"inverse",{get:function(){return this._inverse}}),Object.defineProperty(this,"viewport",{get:function(){return{width:this._viewport.width,height:this._viewport.height,left:this._viewport.left,top:this._viewport.top}},set:function(t){if(!(t.width>0&&t.height>0))throw new Error("Invalid viewport dimensions");t.width===this._viewport.width&&t.height===this._viewport.height||(this._viewport.width&&this._viewport.height&&(this._scale([this._viewport.width/t.width,this._viewport.height/t.height,1]),this._translate([(t.width-this._viewport.width)/2,(t.height-this._viewport.height)/2,0])),this._viewport={width:t.width,height:t.height,left:t.left,top:t.top},this._update(),this.geoTrigger(i.camera.viewport,{camera:this,viewport:this.viewport}))}}),this._resetView=function(){return l.identity(this._view),this},this._translate=function(t){return l.translate(this._view,this._view,t),this},this._scale=function(t){return l.scale(this._view,this._view,t),this},this._worldToClip4=function(t){return u.transformMat4(t,t,this._transform)},this._clipToWorld4=function(t){return u.transformMat4(t,t,this._inverse)},this.applyProjection=function(t){var e;return"perspective"===this._projection?(e=1/(t[3]||1),t[0]=e*t[0],t[1]=e*t[1],t[2]=e*t[2],t[3]=e):t[3]=1,t},this.unapplyProjection=function(t){var e;return"perspective"===this._projection?(e=t[3]||1,t[0]=e*t[0],t[1]=e*t[1],t[2]=e*t[2],t[3]=e):t[3]=1,t},this.worldToDisplay4=function(t){return t=[t[0],t[1],t[2]||0,t[3]||1],(t=u.transformMat4(t,t,this.display))[3]&&1!==t[3]&&(t=[t[0]/t[3],t[1]/t[3],t[2]/t[3],1]),t},this.displayToWorld4=function(t){return t=[t[0],t[1],t[2]||0,t[3]||1],(t=u.transformMat4(t,t,this.world))[3]&&1!==t[3]&&(t=[t[0]/t[3],t[1]/t[3],t[2]/t[3],1]),t},this.worldToDisplay=function(t){var e=this._clipbounds[this._projection];return{x:(t=this.worldToDisplay4([t.x,t.y,-e.near]))[0],y:t[1]}},this.displayToWorld=function(t){return{x:(t=this.displayToWorld4([t.x,t.y,-1]))[0],y:t[1]}},this._getBounds=function(){var t,e,n,i,r={};return t=this.displayToWorld({x:0,y:0}),e=this.displayToWorld({x:this._viewport.width,y:0}),n=this.displayToWorld({x:0,y:this._viewport.height}),i=this.displayToWorld({x:this._viewport.width,y:this._viewport.height}),r.left=Math.min(t.x,e.x,n.x,i.x),r.bottom=Math.min(t.y,e.y,n.y,i.y),r.right=Math.max(t.x,e.x,n.x,i.x),r.top=Math.max(t.y,e.y,n.y,i.y),r},this._setBounds=function(t){var e={width:t.right-t.left,height:t.top-t.bottom},n={x:(t.left+t.right)/2,y:(t.bottom+t.top)/2};return this._viewFromCenterSizeRotation(n,e,0),this},this._viewFromCenterSizeRotation=function(t,e,n){var i,r,a,s=o.vec3AsArray(),l=o.vec3AsArray();return this._resetView(),(r=Math.abs(e.width))/(a=Math.abs(e.height))>=(i=this._viewport.width/this._viewport.height)?(a=r/i,l[0]=2/r,l[1]=2/a):(r=a*i,l[0]=2/r,l[1]=2/a),l[2]=1,this._scale(l),n&&this._rotate(n),s[0]=-t.x,s[1]=-t.y,s[2]=0,this._translate(s),this},this.viewFromCenterSizeRotation=function(t,e,n){return this._viewFromCenterSizeRotation(t,e,n),this._update(),this},this.pan=function(t){if(t.x||t.y||t.z)return this._translate([t.x,t.y,t.z||0]),this._update(),this},this.zoom=function(t){if(1!==t)return l.scale(this._view,this._view,[t,t,t]),this._update(),this},this._rotate=function(t,e,n){if(t){n=n||[0,0,-1],e?void 0!==e.x&&(e=[e.x||0,e.y||0,e.z||0]):e=[0,0,0];var i=[-e[0],-e[1],-e[2]];return l.translate(this._view,this._view,e),l.rotate(this._view,this._view,t,n),l.translate(this._view,this._view,i),this}},this.css=function(e){var n;switch((e||"").toLowerCase()){case"display":case"":n=this.display;break;case"world":n=this.world;break;default:throw new Error("Unknown transform "+e)}return t.css(n)},this.ppMatrix=function(t,e){var n=t;function i(t){var i=n[t],r=i.toExponential(e);return i>=0&&(r=" "+r),r}return e=e||2,[[i(0),i(4),i(8),i(12)].join(" "),[i(1),i(5),i(9),i(13)].join(" "),[i(2),i(6),i(10),i(14)].join(" "),[i(3),i(7),i(11),i(15)].join(" ")].join("\n")},this.toString=function(){return this.ppMatrix(this._transform)},this.debug=function(){return["bounds",JSON.stringify(this.bounds),"view:",this.ppMatrix(this._view),"projection:",this.ppMatrix(this._proj),"transform:",this.ppMatrix(this._transform)].join("\n")},this.valueOf=function(){return this._transform},this._clipbounds=this.constructor.clipbounds,this._resetView(),this.projection=e.projection||"parallel",e.viewport&&(this.viewport=e.viewport),this._update(),this};c.projection={perspective:!0,parallel:!0},c.clipbounds={perspective:{left:-1,right:1,top:1,bottom:-1,far:2e3,near:.01},parallel:{left:-1,right:1,top:1,bottom:-1,far:-1,near:1}},c.css=function(t){return"matrix3d("+t.map((function(t){return(t=(+t).toPrecision(15)).indexOf("e")>=0?t=(+t).toString():t.indexOf(".")>=0&&(t=t.replace(/(\.|)0+$/,"")),t})).join(",")+")"},c.vec3=s,c.mat3=a,c.vec4=u,c.mat4=l,i(c,r),t.exports=c},3086:function(t,e,n){var i,r=n(5699),o=n(4647).registerRenderer,a=n(3234),s=function t(e){"use strict";var i=n(5638);if(!(this instanceof t))return new t(e);e=e||{},a.call(this,e);var r=this,o=!0,s=this._init,l=this._exit;return this.clearCanvas=function(t){o=t},this.api=function(){return t.apiname},this._init=function(){if(r.initialized())return r;s.call(r);var t=e.canvas||i(document.createElement("canvas"));r.context2d=t[0].getContext("2d"),t.addClass("canvas-canvas"),i(r.layer().node().get(0)).append(t),r.canvas(t);var n=r.layer().map().size();return r._resize(0,0,n.width,n.height),r},this._resize=function(t,e,n,i){var o=r.canvas();return parseInt(o.attr("width"),10)===n&&parseInt(o.attr("height"),10)===i||(r._setWidthHeight(n,i),o.attr("width",n),o.attr("height",i),r._render()),r},this._render=function(){return r.layer().map().scheduleAnimationFrame(r._renderFrame),r},this._renderFrame=function(){var t,e=r.layer(),n=e.map(),i=n.size(),a=e.features?e.features():[];for(t=0;t<a.length;t+=1)if(a[t]._delayRender())return void r._render();for(o&&(r.context2d.setTransform(1,0,0,1,0,0),r.context2d.clearRect(0,0,i.width,i.height)),t=0;t<a.length;t+=1)a[t].visible()&&a[t]._renderOnCanvas(r.context2d,n)},this._exit=function(){r.canvas().remove(),l()},this};s.apiname="canvas",r(s,a),o("canvas",s),s.supported=function(){if(void 0===i){var t;try{t=document.createElement("canvas"),i=!(!t.getContext||!t.getContext("2d"))}catch(t){i=!1}t=void 0}return i},s.fallback=function(){return null},t.exports=s},1225:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(1111),a=n(6618),s=n(4634),l=function t(e){"use strict";if(!(this instanceof t))return new t(e);o.call(this,e),n(3160).call(this);var i,r,l,u,c,d,h=n(5108),f=this,p=this._init,m=this._update,g=a();return this._computeGradient=function(){var t,e,n,i,r;if(r=f.style("color"),!f._grad||f._gradColors!==r){for(e in i=(n=(t=document.createElement("canvas")).getContext("2d")).createLinearGradient(0,0,0,256),t.width=1,t.height=256,r)i.addColorStop(e,s.convertColorToRGBA(r[e]));n.fillStyle=i,n.fillRect(0,0,1,256),f._grad=n.getImageData(0,0,1,256).data,f._gradColors=r}return f},this._createCircle=function(){var t,e,n,i,r,o,a;if(n=f.style("radius"),r=f.style("blurRadius"),o=f.style("gaussian"),a=f.style("scaleWithZoom")){var s=this.layer().map().zoom();n*=a=Math.pow(2,s),r*=a}if(!f._circle||f._circle.gaussian!==o||f._circle.radius!==n||f._circle.blurRadius!==r){if(e=(t=f._circle=document.createElement("canvas")).getContext("2d"),i=r+n,t.width=t.height=2*i,o){var l=e.createRadialGradient(i,i,0,i,i,i);l.addColorStop(0,"rgba(255,255,255,1)"),l.addColorStop(.1,"rgba(255,255,255,0.946)"),l.addColorStop(.2,"rgba(255,255,255,0.801)"),l.addColorStop(.3,"rgba(255,255,255,0.607)"),l.addColorStop(.4,"rgba(255,255,255,0.411)"),l.addColorStop(.5,"rgba(255,255,255,0.249)"),l.addColorStop(.6,"rgba(255,255,255,0.135)"),l.addColorStop(.7,"rgba(255,255,255,0.066)"),l.addColorStop(.8,"rgba(255,255,255,0.029)"),l.addColorStop(.9,"rgba(255,255,255,0.011)"),l.addColorStop(1,"rgba(255,255,255,0)"),e.fillStyle=l,e.fillRect(0,0,2*i,2*i)}else e.shadowOffsetX=e.shadowOffsetY=2*i,e.shadowBlur=r,e.shadowColor="black",e.beginPath(),e.arc(-i,-i,n,0,2*Math.PI,!0),e.closePath(),e.fill();t.radius=n,t.blurRadius=r,t.gaussian=o,f._circle=t}return f},this._colorize=function(t,e){var n,o,a,s=new Uint32Array(e.buffer),u=t.length;for(i&&i.length===u||(i=new ArrayBuffer(u),r=new Uint8ClampedArray(i),l=new Uint32Array(i)),n=3,a=0;n<u;n+=4,a+=1)(o=t[n])&&(l[a]=s[o]);t.set(r)},this._renderPoints=function(t,e,n,i){var r,o,a,s=f.gcsPosition(),l=f.intensity(),u=f.minIntensity(),c=f.maxIntensity()-u||1;for(r=n.length-1;r>=0;r-=1)o=e.worldToDisplay(s[r]),(a=(l(n[r],r)-u)/c)<=0||(t.globalAlpha=a<.01?.01:a>1?1:a,t.drawImage(f._circle,o.x-i,o.y-i))},this._renderBinnedData=function(t,e,n,i,r){var o,a,s,l,u,c,d,h,p=f.gcsPosition(),m=f.intensity(),g=f.minIntensity(),v=f.maxIntensity()-g||1,y=e.size(),x=[],b=Math.ceil(i/r),_=Math.ceil(y.width/r)+2*b+2,w=Math.ceil(y.height/r)+2*b+2,M=n.length;for(o=0;o<M;o+=1)a=e.worldToDisplay(p[o]),isNaN(a.x)||isNaN(a.y)||(void 0===d&&(d=(a.x%r+r)%r,h=(a.y%r+r)%r),(l=Math.floor((a.x-d)/r)+b+1)<0||l>=_||(u=Math.floor((a.y-h)/r)+b+1)<0||u>=w||(s=(m(n[o],o)-g)/v)<=0||(s>1&&(s=1),x[u]=x[u]||[],l*=4,(c=x[u])[l]?(c[l]+=s,c[l+1]+=(1-c[l+1])*s,c[l+2]+=a.x*s,c[l+3]+=a.y*s):(c[l]=c[l+1]=s,c[l+2]=a.x*s,c[l+3]=a.y*s)));for(u=x.length-1;u>=0;u-=1)if(c=x[u])for(l=c.length-4;l>=0;l-=4)c[l]&&(s=c[l+1],t.globalAlpha=s<.01?.01:s>1?1:s,t.drawImage(f._circle,c[l+2]/c[l]-i,c[l+3]/c[l]-i))},this._renderOnCanvas=function(t,e){if(g.timestamp()<f.buildTime().timestamp()){var n,i,r=Date.now(),o=f.data()||[],a=f.style("radius")+f.style("blurRadius"),s=f.binned(),l=f.layer(),h=e.size();if(f.style("scaleWithZoom")&&(a*=Math.pow(2,e.zoom())),!0===s||"auto"===s)if(s=Math.max(Math.floor(a/8),Math.max(1.5,Math.min(3,a/2.5))),"auto"===f.binned())Math.ceil((h.width+2*a)/s)*Math.ceil((h.height+2*a)/s)>=o.length&&(s=0);(s<1||isNaN(s))&&(s=!1),f._binned=s,t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,h.width,h.height),c="",a>.5&&a<8192&&(e.scheduleAnimationFrame(f._setTransform,!1),l.canvas().css({transform:""}),f._createCircle(),f._computeGradient(),s?f._renderBinnedData(t,e,o,a,s):f._renderPoints(t,e,o,a),n=l.canvas()[0],i=t.getImageData(0,0,n.width,n.height),f._colorize(i.data,f._grad),t.putImageData(i,0,0)),u={zoom:e.zoom(),gcsOrigin:e.displayToGcs({x:0,y:0},null),rotation:e.rotation(),lastScale:void 0,lastOrigin:{x:0,y:0},lastRotation:void 0},g.modified(),l.renderer().clearCanvas(!1),d=Date.now()-r}return f},this._init=function(){return p.call(f,e),f.geoOn(h.pan,f._animatePan),f},this._update=function(){return m.call(f),(f.buildTime().timestamp()<=f.dataTime().timestamp()||f.updateTime().timestamp()<f.timestamp())&&f._build(),f.updateTime().modified(),f},this._setTransform=function(){f.layer()&&f.layer().canvas()&&f.layer().canvas()[0]&&(f.layer().canvas()[0].style.transform=c)},this._animatePan=function(){if(u){var t=f.layer().map(),e=t.zoom(),n=Math.pow(2,e-u.zoom),i=t.gcsToDisplay(u.gcsOrigin,null),r=t.rotation();if(u.lastScale!==n||u.lastOrigin.x!==i.x||u.lastOrigin.y!==i.y||u.lastRotation!==r){var o=" translate("+i.x+"px,"+i.y+"px) scale("+n+") rotate("+180*(r-u.rotation)/Math.PI+"deg)";if(t.scheduleAnimationFrame(f._setTransform),c=o,u.lastScale=n,u.lastOrigin.x=i.x,u.lastOrigin.y=i.y,u.lastRotation=r,u.timeout&&(window.clearTimeout(u.timeout),u.timeout=void 0),1!==parseFloat(n.toFixed(4))||0!==parseFloat((r-u.rotation).toFixed(4))||0!==parseFloat(i.x.toFixed(1))||0!==parseFloat(i.y.toFixed(1))){var a=f.updateDelay();a=a<0&&d?d-Math.floor(1e3/60*a):d?2*d:100,u.timeout=window.setTimeout((function(){u.timeout=void 0,f.buildTime().modified(),f.layer().draw()}),f.updateDelay())}}}},f._init(e),this};i(l,o),r("canvas","heatmap",l),t.exports=l},7562:function(t,e,n){t.exports={canvasRenderer:n(3086),heatmapFeature:n(1225),isolineFeature:n(6025),lineFeature:n(7822),pixelmapFeature:n(1471),quadFeature:n(9895),textFeature:n(8124),tileLayer:n(5993),trackFeature:n(1546)}},6025:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(2367),a=function t(e){"use strict";return this instanceof t?(e=e||{},o.call(this,e),n(3160).call(this),this._init(e),this):new t(e)};i(a,o),r("canvas","isoline",a),t.exports=a},7822:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(4708),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(3160);e=e||{},o.call(this,e),i.call(this);var r=this;return this._renderOnCanvas=function(t,e){var n,i,o,a,s,l=r.data(),u=r.position(),c=r.line(),d=r.style.get("strokeWidth"),h=r.style.get("strokeColor"),f=r.style.get("strokeOpacity"),p=r.style.get("lineCap"),m=r.style.get("lineJoin"),g=r.style.get("miterLimit")(l),v=r.style.get("closed"),y={},x={};l.forEach((function(e,l){if(!((i=c(e,l)).length<2)){for(x.closed=v(e,l),x.width=d(i[0],0,e,l),x.color=h(i[0],0,e,l),x.opacity=f(i[0],0,e,l),x.linecap=p(i[0],0,e,l),x.linejoin=m(i[0],0,e,l),x.strokeStyle="rgba("+255*x.color.g+", "+255*x.color.g+", "+255*x.color.b+", "+(void 0!==x.opacity?x.opacity:1)+")",y.strokeStyle===x.strokeStyle&&y.width===x.width&&y.linecap===x.linecap&&y.linejoin===x.linejoin&&y.miterlimit===x.miterlimit||(void 0!==y.strokeStyle&&t.stroke(),t.beginPath(),t.strokeStyle=x.strokeStyle,t.lineWidth=x.width,t.lineCap=x.linecap,t.lineJoin=x.linejoin,t.miterLimit=g),s=0;s<i.length;s+=1)o=r.featureGcsToDisplay(u(i[s],s,e,l)),s?t.lineTo(o.x,o.y):(a=o,t.moveTo(o.x,o.y));x.closed&&t.lineTo(a.x,a.y),n=y,y=x,x=n}})),void 0!==y.strokeStyle&&t.stroke()},this._init(e),this};i(a,o);var s={};s[o.capabilities.basic]=!0,s[o.capabilities.multicolor]=!1,r("canvas","line",a,s),t.exports=a},3160:function(t,e,n){t.exports=function t(e){"use strict";if(!(this instanceof n(3737)))return new t(e);var i=this,r=this.draw,o={};return this._renderOnCanvas=function(){},this._delayRender=function(){return!1},this._canvasProperty=function(t,e,n){return t&&e?(o[e]!==n&&(o[e]=n,t[e]=n),i):(o={},i)},this.draw=function(){return i.ready&&(i._update(),i.renderer()._render(),r()),i},this}},1471:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(6374),a=n(5108),s=n(4634),l=function t(e){"use strict";if(!(this instanceof t))return new t(e);o.call(this,e),n(3160).call(this);var i,r=this._exit,l=this;return this.pointSearch=function(t,e){if(i&&l.m_info){var n=i.pointSearch(t,e);if(1===n.index.length&&n.extra&&n.extra[n.index[0]].basis){var r,o,a,s=n.extra[n.index[0]].basis;if(r=Math.floor(s.x*l.m_info.width),o=Math.floor(s.y*l.m_info.height),r>=0&&r<l.m_info.width&&o>=0&&o<l.m_info.height)return n={index:[a=l.m_info.indices[o*l.m_info.width+r]],found:[l.data()[a]]}}}return{index:[],found:[]}},this._preparePixelmap=function(){var t,e,n;if(s.isReadyImage(l.m_srcImage)){for(l.m_info={width:l.m_srcImage.naturalWidth,height:l.m_srcImage.naturalHeight,canvas:document.createElement("canvas")},l.m_info.canvas.width=l.m_info.width,l.m_info.canvas.height=l.m_info.height,l.m_info.context=l.m_info.canvas.getContext("2d"),l.m_info.context.drawImage(l.m_srcImage,0,0),l.m_info.imageData=l.m_info.context.getImageData(0,0,l.m_info.canvas.width,l.m_info.canvas.height),n=l.m_info.imageData.data,l.m_info.indices=new Array(n.length/4),l.m_info.area=n.length/4,l.m_info.mappedColors={},t=0;t<n.length;t+=4)e=n[t]+(n[t+1]<<8)+(n[t+2]<<16),l.m_info.indices[t/4]=e,l.m_info.mappedColors[e]||(l.m_info.mappedColors[e]={first:t/4}),l.m_info.mappedColors[e].last=t/4;return l.m_info}},this._computePixelmap=function(){var t,e,n,r,o,s,u,c,d,h,f=l.data()||[],p=l.style.get("color"),m=-1;if(!l.m_info){if(l.indexModified(void 0,"clear"),!l._preparePixelmap())return;h=!0}for(e in l.indexModified(void 0,"clear"),u=l.m_info.mappedColors,c=l.m_info.area,u)u.hasOwnProperty(e)&&(r=[255*((r=p(f[e],+e)||{}).r||0),255*(r.g||0),255*(r.b||0),void 0===r.a?255:255*r.a],u[e].update=!u[e].color||u[e].color[0]!==r[0]||u[e].color[1]!==r[1]||u[e].color[2]!==r[2]||u[e].color[3]!==r[3],u[e].update&&(u[e].color=r,c=Math.min(u[e].first,c),m=Math.max(u[e].last,m)));if(!(c>=m)){for(o=l.m_info.imageData.data,s=l.m_info.indices,t=c;t<=m;t+=1)(e=s[t])!==n&&(n=e,r=u[e].color,d=u[e].update),d&&(o[4*t]=r[0],o[4*t+1]=r[1],o[4*t+2]=r[2],o[4*t+3]=r[3]);l.m_info.context.putImageData(l.m_info.imageData,0,0,0,Math.floor(c/l.m_info.width),l.m_info.width,Math.ceil((m+1)/l.m_info.width)),i||(i=l.layer().createFeature("quad",{selectionAPI:!1,gcs:l.gcs(),visible:l.visible(void 0,!0)}),l.dependentFeatures([i]),i.style({image:l.m_info.canvas,position:l.style.get("position")}).data([{}]).draw()),h&&l.geoTrigger(a.pixelmap.prepared,{pixelmap:l})}},this._exit=function(){return i&&l.layer()&&(l.layer().deleteFeature(i),i=null,l.dependentFeatures([])),r(),l},this._init(e),this};i(l,o),r("canvas","pixelmap",l),t.exports=l},9895:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(5017),a=n(4634),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);o.call(this,e),n(3160).call(this);var i,r=n(5638),s=this,l=this._exit,u=this._init,c=this._update;return this._build=function(){s.position()&&((i=s._generateQuads()).imgQuads&&i.imgQuads.sort((function(t,e){return t.pos[2]-e.pos[2]})),s.buildTime().modified())},this._checkQuadUpdate=function(t,e){s.layer().map().scheduleAnimationFrame(s._checkIfChanged)},this._checkIfChanged=function(){if(i&&i.vidQuads&&i.vidQuads.length){var t=!1,e=!1;r.each(i.vidQuads,(function(n,i){i.video&&void 0!==i.video.HAVE_CURRENT_DATA&&(!i.video.seeking&&i.video.readyState>=i.video.HAVE_CURRENT_DATA&&(t=!0),i.video.paused&&!i.video.seeking||(e=!0))})),t&&s.renderer()&&s.renderer()._render(),e&&s.layer().map().scheduleAnimationFrame(s._checkIfChanged)}},this._renderColorQuads=function(t,e){if(i.clrQuads&&i.clrQuads.length){var n=t.globalAlpha,o=n;r.each(i.clrQuads,(function(n,i){var r=e.gcsToDisplay({x:i.pos[0],y:i.pos[1]},null),s=e.gcsToDisplay({x:i.pos[3],y:i.pos[4]},null),l=e.gcsToDisplay({x:i.pos[6],y:i.pos[7]},null),u=e.gcsToDisplay({x:i.pos[9],y:i.pos[10]},null);i.opacity!==o&&(o=i.opacity,t.globalAlpha=o),t.fillStyle=a.convertColorToHex(i.color,!0),t.beginPath(),t.moveTo(r.x,r.y),t.lineTo(s.x,s.y),t.lineTo(u.x,u.y),t.lineTo(l.x,l.y),t.closePath(),t.fill()})),o!==n&&(t.globalAlpha=n)}},this._renderImageAndVideoQuads=function(t,e){if(i.imgQuads&&i.imgQuads.length||i.vidQuads&&i.vidQuads.length){var n=t.globalAlpha,o=n;r.each([i.imgQuads,i.vidQuads],(function(n,i){i&&r.each(i,(function(n,i){var r,a,s;if(i.image)a=(r=i.image).width,s=r.height;else if(i.video&&(a=(r=i.video).videoWidth,s=r.videoHeight,r.seeking))return;if(r&&a&&s&&!(i.opacity<=0)){var l=e.gcsToDisplay({x:i.pos[0],y:i.pos[1]},null),u=e.gcsToDisplay({x:i.pos[6],y:i.pos[7]},null),c=e.gcsToDisplay({x:i.pos[9],y:i.pos[10]},null);if(t.setTransform((c.x-u.x)/a,(c.y-u.y)/a,(l.x-u.x)/s,(l.y-u.y)/s,u.x,u.y),i.opacity!==o&&(o=i.opacity,t.globalAlpha=o),i.crop){var d=Math.min(a,i.crop.x||a),h=Math.min(s,i.crop.y||s),f=Math.max(0,i.crop.left||0),p=Math.max(0,i.crop.top||0),m=Math.min(a,i.crop.right||a),g=Math.min(s,i.crop.bottom||s);a&&s&&d>0&&h>0&&m>f&&g>p&&t.drawImage(r,f,p,Math.floor((m-f)*d/a),Math.floor((g-p)*h/s),0,0,d,h)}else t.drawImage(r,0,0)}}))})),o!==n&&(t.globalAlpha=n),t.setTransform(1,0,0,1,0,0)}},this._delayRender=function(){var t=!1;return i&&i.vidQuads&&i.vidQuads.length&&r.each(i.vidQuads,(function(e,n){n.video&&void 0!==n.video.HAVE_CURRENT_DATA&&(t|=n.video.seeking&&n.delayRenderWhenSeeking)})),t},this._renderOnCanvas=function(t,e){i&&(s._renderImageAndVideoQuads(t,e),s._renderColorQuads(t,e))},this._update=function(){c.call(s),(s.buildTime().timestamp()<=s.dataTime().timestamp()||s.updateTime().timestamp()<s.timestamp())&&s._build(),s.updateTime().modified(),s.layer().map().scheduleAnimationFrame(s._checkIfChanged)},this._init=function(){u.call(s,e)},this._exit=function(){l.call(s)},s._init(e),this};i(s,o);var l={};l[o.capabilities.color]=!0,l[o.capabilities.image]=!0,l[o.capabilities.imageCrop]=!0,l[o.capabilities.imageFixedScale]=!0,l[o.capabilities.imageFull]=!1,l[o.capabilities.canvas]=!0,l[o.capabilities.video]=!0,r("canvas","quad",s,l),t.exports=s},8124:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(9757),a=n(4634),s=n(8054),l=n(5365),u=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(3160);e=e||{},o.call(this,e),i.call(this);var r=this,u="bold 16px sans-serif",c=new RegExp('^\\s*(?=(?:(?:[-a-z0-9]+\\s+){0,3}(italic|oblique))?)(?=(?:(?:[-a-z0-9]+\\s+){0,3}(small-caps))?)(?=(?:(?:[-a-z0-9]+\\s+){0,3}(bold(?:er)?|lighter|[1-9]00))?)(?=(?:(?:[-a-z0-9]+\\s+){0,3}((?:ultra-|extra-|semi-)?(?:condensed|expanded)))?)(?:(?:normal|\\1|\\2|\\3|\\4)\\s+){0,4}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))(?:/(normal|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])))?\\s+([-,\\"\\sa-z]+?)\\s*$',"i");return this.getFontFromStyles=function(t,e,n){var i=r.style.get("font")(e,n)||u;if(t){var o=c.exec(i);null===o&&(o=c.exec(u)),o[1]=r.style.get("fontStyle")(e,n)||o[1],o[2]=r.style.get("fontVariant")(e,n)||o[2],o[3]=r.style.get("fontWeight")(e,n)||o[3],o[4]=r.style.get("fontStretch")(e,n)||o[4],o[5]=r.style.get("fontSize")(e,n)||o[5]||"16px",o[6]=r.style.get("lineHeight")(e,n)||o[6],o[7]=r.style.get("fontFamily")(e,n)||o[7]||"sans-serif",i=(i=(o[1]||"")+" "+(o[2]||"")+" "+(o[3]||"")+" "+(o[4]||"")+" "+(o[5]||"")+(o[6]?"/"+o[6]:"")+" "+o[7]).trim().replace(/\s\s+/g," ")}return i},this._renderOnCanvas=function(t,e){var n,i,o,u,c,d,h,f,p,m,g,v,y,x,b=r.data(),_=r.style.get("position"),w=r.style.get("renderThreshold")(b),M=r.style.get("text"),A=e.rotation(),T=e.zoom(),C=e.size(),E=a.mat3AsArray();n=["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","lineHeight","fontFamily"].some((function(t){return null!==r.style(t)&&void 0!==r.style(t)})),r._canvasProperty(),o=r.featureGcsToDisplay(b.map(_)),b.forEach((function(e,b){u=o[b],w>0&&(u.x<-w||u.x>C.width+w||u.y<-w||u.y>C.height+w)||((c=r.style.get("visible")(e,b))||void 0===c)&&(d=a.convertColorAndOpacity(r.style.get("color")(e,b),r.style.get("textOpacity")(e,b)),f=a.convertColorAndOpacity(r.style.get("textStrokeColor")(e,b),r.style.get("textOpacity")(e,b),{r:0,g:0,b:0,a:0}),0===d.a&&0===f.a||(r._canvasProperty(t,"fillStyle",a.convertColorToRGBA(d)),i=M(e,b),r._canvasProperty(t,"font",r.getFontFromStyles(n,e,b)),r._canvasProperty(t,"textAlign",r.style.get("textAlign")(e,b)||"center"),r._canvasProperty(t,"textBaseline",r.style.get("textBaseline")(e,b)||"middle"),m=r.style.get("rotation")(e,b)||0,g=r.style.get("rotateWithMap")(e,b)&&A,v=r.style.get("textScaled")(e,b),v=a.isNonNullFinite(v)?Math.pow(2,T-v):null,y=r.style.get("offset")(e,b),x=a.mat3AsArray(),(m||g||v&&1!==v||y&&(y.x||y.y))&&(s.translate(x,x,[u.x,u.y]),g&&A&&s.rotate(x,x,A),s.translate(x,x,[y&&y.x?+y.x:0,y&&y.y?+y.y:0]),m&&s.rotate(x,x,m),v&&1!==v&&s.scale(x,x,[v,v]),s.translate(x,x,[-u.x,-u.y])),E[0]===x[0]&&E[1]===x[1]&&E[3]===x[3]&&E[4]===x[4]&&E[6]===x[6]&&E[7]===x[7]||(t.setTransform(x[0],x[1],x[3],x[4],x[6],x[7]),s.copy(E,x)),(d=a.convertColorAndOpacity(r.style.get("shadowColor")(e,b),void 0,{r:0,g:0,b:0,a:0})).a&&(y=r.style.get("shadowOffset")(e,b),h=r.style.get("shadowBlur")(e,b)),d.a&&(y&&(y.x||y.y)||h)?(r._canvasProperty(t,"shadowColor",a.convertColorToRGBA(d)),y&&(m||g)&&r.style.get("shadowRotate")(e,b)&&(x=[+y.x,+y.y,0],l.rotateZ(x,x,[0,0,0],m+(g?A:0)),y={x:x[0],y:x[1]}),r._canvasProperty(t,"shadowOffsetX",y&&y.x?+y.x:0),r._canvasProperty(t,"shadowOffsetY",y&&y.y?+y.y:0),r._canvasProperty(t,"shadowBlur",h||0)):r._canvasProperty(t,"shadowColor","rgba(0,0,0,0)"),f.a&&(p=r.style.get("textStrokeWidth")(e,b),isFinite(p)&&p>0&&(r._canvasProperty(t,"strokeStyle",a.convertColorToRGBA(f)),r._canvasProperty(t,"lineWidth",p),t.strokeText(i,u.x,u.y),r._canvasProperty(t,"shadowColor","rgba(0,0,0,0)"))),t.fillText(i,u.x,u.y)))})),r._canvasProperty(t,"globalAlpha",1),t.setTransform(1,0,0,1,0,0)},this};i(u,o);r("canvas","text",u,{}),t.exports=u},5993:function(t,e,n){var i=function(){"use strict";var t,e=this,n=this._init,i=this._exit,r=this._update,o=0,a=[];this._drawTile=function(n){if(t){var i=e._tileBounds(n),r=n.index.level||0,s=e._tileOffset(r),l=e.tileCropFromBounds(n),u={};l&&(u.crop=l),u.ul=e.fromLocal(e.fromLevel({x:i.left-s.x,y:i.top-s.y},r),0),u.ll=e.fromLocal(e.fromLevel({x:i.left-s.x,y:i.bottom-s.y},r),0),u.ur=e.fromLocal(e.fromLevel({x:i.right-s.x,y:i.top-s.y},r),0),u.lr=e.fromLocal(e.fromLevel({x:i.right-s.x,y:i.bottom-s.y},r),0),u.ul.z=u.ll.z=u.ur.z=u.lr.z=r,o+=1,u.id=o,n.quadId=u.id,u.image=n.image,a.push(u),t.data(a),t._update(),e.draw()}},this._remove=function(n){if(void 0!==n.quadId&&t){for(var i=0;i<a.length;i+=1)if(a[i].id===n.quadId){a.splice(i,1);break}t.data(a),t._update(),e.draw()}},this._update=function(n){return r.call(e,n),e._addBaseQuadToTiles(t,a),e},this._exit=function(){e.deleteFeature(t),t=null,a=[],i.apply(e,arguments)},this._init=function(){n.apply(e,arguments),(t=e.createFeature("quad",{previewColor:e._options.previewColor,previewImage:e._options.previewImage})).geoTrigger=void 0,t.gcs(e._options.gcs||e.map().gcs()),t.data(a),t._update()},this._getSubLayer=function(){},this._updateSubLayers=void 0};(0,n(4647).registerLayerAdjustment)("canvas","tile",i),t.exports=i},1546:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(6223),a=function t(e){"use strict";return this instanceof t?(e=e||{},o.call(this,e),n(3160).call(this),this._init(e),this):new t(e)};i(a,o),r("canvas","track",a),t.exports=a},8719:function(t,e,n){var i=n(5699),r=n(6837),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},r.call(this,e);var i=n(5638),o=n(4634).ensureFunction;delete e.layer,delete e.renderer;var a=n(2531).d3,s=this,l=this._init,u=i.extend({},{colorRange:[{r:.07514311,g:.468049805,b:1},{r:.468487184,g:.588057293,b:1},{r:.656658579,g:.707001303,b:1},{r:.821573924,g:.837809045,b:1},{r:.943467973,g:.943498599,b:.943398095},{r:1,g:.788626485,b:.750707739},{r:1,g:.6289553,b:.568237474},{r:1,g:.472800903,b:.404551679},{r:.916482116,g:.236630659,b:.209939162}],scale:a.scale.quantize(),geoId:function(t){return t.properties.GEO_ID},scalarId:function(t){return t.id},scalarValue:function(t){return t.value}},e);return this.featureType="choropleth",this.scalar=function(t,e){var n,i;return void 0===t?s.choropleth.get("scalar")()||[]:(n=s.choropleth.get("scalarId"),i=s.choropleth.get("scalarValue"),u.scalar=t,u.scalarAggregator=e||a.mean,u.scalar._dictionary=t.reduce((function(t,e){var r,o;return r=n(e),o=i(e),t[r]=t[r]?t[r].push(o):[o],t}),{}),s.dataTime().modified(),s)},this.choropleth=function(t,e){var n;return void 0===t?u:"string"==typeof t&&void 0===e?u[t]:(void 0===e?(n=i.extend({},u,t),u=n):u[t]=e,s.modified(),s)},this.choropleth.get=function(t){var e,n={};if(void 0===t){for(e in u)u.hasOwnProperty(e)&&(n[e]=s.choropleth.get(e));return n}return o(u[t])},this._featureToPolygons=function(t,e){var n=s.layer().createFeature("polygon",{});return"Polygon"===t.geometry.type?n.data([{type:"Polygon",coordinates:t.geometry.coordinates}]):"MultiPolygon"===t.geometry.type&&n.data(t.geometry.coordinates.map((function(t){return{type:"Polygon",coordinates:t}}))),n.polygon((function(t){return{outer:t.coordinates[0],inner:t.coordinates[1]}})).position((function(t){return{x:t[0],y:t[1]}})).style({fillColor:e}),n},this._generateScale=function(t){var e=a.extent(s.scalar(),t||void 0);return s.choropleth().scale.domain(e).range(s.choropleth().colorRange),s},this.createChoropleth=function(){var t=s.choropleth,e=s.data(),n=s.scalar(),i=t.get("scalarValue"),r=t.get("geoId");return s._generateScale(i),e.map((function(e){var i=r(e),o=n._dictionary[i],a=t().scalarAggregator(o),l=s.choropleth().scale(a);return s._featureToPolygons(e,l)}))},this._init=function(t){return l.call(s,t),u&&s.dataTime().modified(),s},this._init(e),this};i(o,r),t.exports=o},9005:function(t,e,n){var i=n(5699),r=n(9146),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638),o=n(4634),a=n(9244);e=e||{},r.call(this,e);var s=this,l=this._init;return this._createContours=function(){return a.createColoredMesh(s,!1)},this.contour=s.mesh,this._init=function(t){l.call(s,t);var e=i.extend({},{opacity:1,value:function(t,e){return o.isNonNullFinite(t)?t:s.position()(t,e).z},position:function(t){return t||{x:0,y:0}},origin:function(t){return t.length>=3?[t[0],t[1],0]:[0,0,0]}},void 0===t.style?{}:t.style);s.style(e),s.contour(i.extend({},{minColor:"black",minOpacity:0,maxColor:"black",maxOpacity:0,colorRange:[{r:.07514311,g:.468049805,b:1},{r:.468487184,g:.588057293,b:1},{r:.656658579,g:.707001303,b:1},{r:.821573924,g:.837809045,b:1},{r:.943467973,g:.943498599,b:.943398095},{r:1,g:.788626485,b:.750707739},{r:1,g:.6289553,b:.568237474},{r:1,g:.472800903,b:.404551679},{r:.916482116,g:.236630659,b:.209939162}]},t.mesh||{},t.contour||{})),(t.mesh||t.contour)&&s.dataTime().modified()},this._init(e),this};i(o,r),t.exports=o},2805:function(t,e,n){var i=n(5699),r=n(3234),o=n(4647).registerRenderer,a=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this,e),e=e||{};var n=this;return this.api=function(){return"dom"},this._init=function(t){var e=n.layer().node();return!n.canvas()&&e&&e.length&&n.canvas(e[0]),n},this._init(e),this};i(a,r),o("dom",a),t.exports=a},5108:function(t){var e={layerAdd:"geo_layerAdd",layerRemove:"geo_layerRemove",layerMove:"geo_layerMove",zoom:"geo_zoom",rotate:"geo_rotate",pan:"geo_pan",resize:"geo_resize",draw:"geo_draw",drawEnd:"geo_drawEnd",unhidden:"geo_unhidden",hidden:"geo_hidden",mousemove:"geo_mousemove",mouseclick:"geo_mouseclick",brush:"geo_brush",brushend:"geo_brushend",brushstart:"geo_brushstart",select:"geo_select",zoomselect:"geo_zoomselect",unzoomselect:"geo_unzoomselect",actiondown:"geo_actiondown",actionmove:"geo_actionmove",actionup:"geo_actionup",actionselection:"geo_actionselection",actionwheel:"geo_actionwheel",keyaction:"geo_keyaction",transitionstart:"geo_transitionstart",transitionend:"geo_transitionend",transitioncancel:"geo_transitioncancel",parallelprojection:"geo_parallelprojection",feature:{mousemove:"geo_feature_mousemove",mouseover:"geo_feature_mouseover",mouseover_order:"geo_feature_mouseover_order",mouseout:"geo_feature_mouseout",mouseon:"geo_feature_mouseon",mouseoff:"geo_feature_mouseoff",mouseclick:"geo_feature_mouseclick",mouseclick_order:"geo_feature_mouseclick_order",brushend:"geo_feature_brushend",brush:"geo_feature_brush"},pixelmap:{prepared:"geo_pixelmap_prepared"},screenshot:{ready:"geo_screenshot_ready"},camera:{}};e.camera.view="geo_camera_view",e.camera.projection="geo_camera_projection",e.camera.viewport="geo_camera_viewport",e.annotation={},e.annotation.add="geo_annotation_add",e.annotation.add_before="geo_annotation_add_before",e.annotation.update="geo_annotation_update",e.annotation.coordinates="geo_annotation_coordinates",e.annotation.select_edit_handle="geo_annotation_select_edit_handle",e.annotation.edit_action="geo_annotation_edit_action",e.annotation.remove="geo_annotation_remove",e.annotation.state="geo_annotation_state",e.annotation.mode="geo_annotation_mode",t.exports=e},6837:function(t,e,n){function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}var r=n(5638),o=n(5699),a=n(5358),s=n(6618),l=n(6853),u=n(5108),c=function t(e){"use strict";if(!(this instanceof t))return new t(e);a.call(this);var i=n(4634);e=e||{};var o,c=this,d=this._exit,h=this.geoOn,f=this.geoOff,p=void 0===e.selectionAPI?"auto":e.selectionAPI,m={},g=void 0===e.layer?null:e.layer,v=e.gcs,y=void 0===e.visible||e.visible,x=void 0===e.bin?null:e.bin,b=void 0===e.renderer||g&&e.renderer===g.renderer()?null:e.renderer,_=s(),w=s(),M=s(),A=[],T=[];return this._subfeatureStyles={},Object.defineProperty(this,"ready",{get:function(){return o}}),this._bindMouseHandlers=function(){c.selectionAPI()&&(c._unbindMouseHandlers(),c.geoOn(u.mousemove,c._handleMousemove),c.geoOn(u.mouseclick,c._handleMouseclick),c.geoOn(u.brushend,c._handleBrushend),c.geoOn(u.brush,c._handleBrush))},this._unbindMouseHandlers=function(){c.geoOff(u.mousemove,c._handleMousemove),c.geoOff(u.mouseclick,c._handleMouseclick),c.geoOff(u.brushend,c._handleBrushend),c.geoOff(u.brush,c._handleBrush)},this.pointSearch=function(t,e){return{index:[],found:[]}},this.boxSearch=function(t,e,n,i){return c.polygonSearch([t,{x:t.x,y:e.y},e,{x:e.x,y:t.y}],n,i)},this.polygonSearch=function(t,e,n){return{index:[],found:[]}},this._handleMousemove=function(e){var n,i=c.layer().map().interactor().mouse(),r=c.data(),o=c.pointSearch(i.geo),a=[],s=[],l=-1,d=-1;(T.length||o.index.length)&&(n=o.extra||{},o.index.length>1&&c.geoTrigger(u.feature.mouseover_order,{feature:c,mouse:i,previous:T,over:o,sourceEvent:e}),T.length&&(l=T[T.length-1]),a=o.index.filter((function(t){return T.indexOf(t)<0})),s=T.filter((function(t){return o.index.indexOf(t)<0})),t.eventID+=1,a.forEach((function(o,s){c.geoTrigger(u.feature.mouseover,{data:r[o],index:o,extra:n[o],mouse:i,eventID:t.eventID,top:s===a.length-1,sourceEvent:e},!0)})),t.eventID+=1,s.forEach((function(n,o){c.geoTrigger(u.feature.mouseout,{data:r[n],index:n,mouse:i,eventID:t.eventID,top:o===s.length-1,sourceEvent:e},!0)})),t.eventID+=1,o.index.forEach((function(a,s){c.geoTrigger(u.feature.mousemove,{data:r[a],index:a,extra:n[a],mouse:i,eventID:t.eventID,top:s===o.index.length-1,sourceEvent:e},!0)})),(T=o.index).length&&(d=T[T.length-1]),l!==d&&(-1!==l&&c.geoTrigger(u.feature.mouseoff,{data:r[l],index:l,mouse:i,sourceEvent:e},!0),-1!==d&&c.geoTrigger(u.feature.mouseon,{data:r[d],index:d,extra:n[d],mouse:i,sourceEvent:e},!0)))},this._clearSelectedFeatures=function(){return T=[],c},this._handleMouseclick=function(e){var n=c.layer().map().interactor().mouse(),i=c.data(),r=c.pointSearch(n.geo),o=r.extra||{};r.index.length>1&&c.geoTrigger(u.feature.mouseclick_order,{feature:c,mouse:n,over:r,sourceEvent:e}),n.buttonsDown=e.buttonsDown,t.eventID+=1,r.index.forEach((function(a,s){c.geoTrigger(u.feature.mouseclick,{data:i[a],index:a,extra:o[a],mouse:n,eventID:t.eventID,top:s===r.index.length-1,sourceEvent:e},!0)}))},this._handleBrush=function(e){var n=[e.gcs.lowerLeft,e.gcs.lowerRight,e.gcs.upperRight,e.gcs.upperLeft];if(c.layer()){var i=c.layer().map();n=l.transformCoordinates(i.gcs(),i.ingcs(),n)}var r=c.polygonSearch(n);t.eventID+=1,r.index.forEach((function(n,i){c.geoTrigger(u.feature.brush,{data:r.found[i],index:n,mouse:e.mouse,brush:e,eventID:t.eventID,top:i===r.index.length-1},!0)}))},this._handleBrushend=function(e){var n=[e.gcs.lowerLeft,e.gcs.lowerRight,e.gcs.upperRight,e.gcs.upperLeft];if(c.layer()){var i=c.layer().map();n=l.transformCoordinates(i.gcs(),i.ingcs(),n)}var r=c.polygonSearch(n);t.eventID+=1,r.index.forEach((function(n,i){c.geoTrigger(u.feature.brushend,{data:r.found[i],index:n,mouse:e.mouse,brush:e,eventID:t.eventID,top:i===r.index.length-1},!0)}))},this.style=function(t,e){return void 0===t?m:"string"==typeof t&&void 0===e?m[t]:void 0===e?(m=r.extend({},m,t),c.modified(),c):(m[t]=e,c.modified(),c)},this.style.get=function(t){var e;if(void 0===t){var n,r={};for(n in m)m.hasOwnProperty(n)&&(r[n]=c.style.get(n));return r}return e=t.toLowerCase().match(/color$/)?i.isFunction(m[t])?function(){return i.convertColor(m[t].apply(c,arguments))}:i.ensureFunction(i.convertColor(m[t])):i.ensureFunction(m[t]),e},this.updateStyleFromArray=function(t,e,n){if("string"!=typeof t)r.each(t,(function(t,e){c.updateStyleFromArray(t,e)}));else{var i;if(t.toLowerCase().match(/color$/)&&(i={r:0,g:0,b:0}),!Array.isArray(e))return c;c._subfeatureStyles[t]?e.length&&Array.isArray(e[0])?c.style(t,(function(t,n,r,o){var a=(e[o]||[])[n];return void 0!==a?a:i})):c.style(t,(function(t,n,r,o){var a=e[o];return void 0!==a?a:i})):c.style(t,(function(t,n){var r=e[n];return void 0!==r?r:i}))}return n&&c.visible()&&c.draw(),c},this.layer=function(){return g},this.renderer=function(){return b||g&&g.renderer()},this.gcs=function(t){return void 0===t?null==v&&g?g.map().ingcs():v:(v=t,c.modified(),c)},this.featureGcsToDisplay=function(t){var e=g.map();return t=e.gcsToWorld(t,c.gcs()),t=e.worldToDisplay(t),c.renderer().baseToLocal&&(t=c.renderer().baseToLocal(t)),t},this.visible=function(t,e){if(void 0===t)return!(!e&&g&&g.visible&&!g.visible())&&y;if(y!==t||e){y=t,c.modified(),g&&g.visible&&!g.visible()&&(t=!1),t?c._bindMouseHandlers():c._unbindMouseHandlers();for(var n=0;n<A.length;n+=1)A[n].visible(y,e)}return c},this.dependentFeatures=function(t){return void 0===t?A.slice():(A=t.slice(),c)},this.bin=function(t,e){if(void 0===t){if(null===x&&!e){var n=c.parent(),r=n?n.children().indexOf(c):-1;return r>=0?r:0}return x}return x=i.isNonNullFinite(t)?parseInt(t,10):null,c.modified(),c},this.dataTime=function(t){return void 0===t?_:(_=t,c.modified(),c)},this.buildTime=function(t){return void 0===t?w:(w=t,c.modified(),c)},this.updateTime=function(t){return void 0===t?M:(M=t,c.modified(),c)},this.data=function(t){return void 0===t?c.style("data")||[]:(c.style("data",t),c.dataTime().modified(),c.modified(),c)},this.selectionAPI=function(t,e){return void 0===t?!(!e&&g&&g.selectionAPI&&!g.selectionAPI())&&(e||"auto"!==p?p:!!c.geoIsOn(Object.values(u.feature))):("auto"!==t&&(t=!!t),(t!==p||e)&&(p=t,c._unbindMouseHandlers(),c._bindMouseHandlers()),c)},this.mouseOverOrderHighestIndex=function(t){t.over.index.sort();var e=t.feature.data();t.over.index.forEach((function(n,i){t.over.found[i]=e[n]}))},this._init=function(t){if(!g)throw new Error("Feature requires a valid layer");m=r.extend({},{opacity:1},void 0===t.style?{}:t.style),c._bindMouseHandlers(),o=!0},this._build=function(){},this._update=function(){},this.geoOn=function(t,e){var n="auto"===c.selectionAPI(void 0,!0),i=n&&c.selectionAPI(),r=h.apply(c,arguments);return n&&!i&&c.selectionAPI()&&c._bindMouseHandlers(),r},this.geoOff=function(t,e){var n="auto"===c.selectionAPI(void 0,!0),i=n&&c.selectionAPI(),r=f.apply(c,arguments);return n&&i&&!c.selectionAPI()&&c._unbindMouseHandlers(),r},this._exit=function(){c._unbindMouseHandlers(),T=[],m={},d(),o=!1},this._init(e),this};c.eventID=0,c.create=function(t,e){"use strict";if(!(t instanceof n(9105)))return console.warn("Invalid layer"),null;if("object"!==i(e))return console.warn("Invalid spec"),null;var r=e.type,o=t.createFeature(r,e);return o?(e.data=e.data||[],o.style(e)):(console.warn('Could not create feature type "'+r+'"'),null)},o(c,a),t.exports=c},3715:function(t,e,n){var i=n(5699),r=n(9105),o=n(5108),a=n(4647),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this,e);var n=this,i=[],s=this._init,l=this._exit,u=this._update,c=this.visible,d=this.selectionAPI,h=this.draw;return this.createFeature=function(t,e){var i=a.createFeature(t,n,n.renderer(),e);return i?n.addFeature(i):console.warn("Layer renderer ("+n.rendererName()+') does not support feature type "'+t+'"'),i},this.addFeature=function(t){return n.removeFeature(t),n.addChild(t),i.push(t),n.dataTime().modified(),n.modified(),n},this.removeFeature=function(t){var e;return(e=i.indexOf(t))>=0&&(i.splice(e,1),n.removeChild(t),n.dataTime().modified(),n.modified()),n},this.deleteFeature=function(t){return t&&(i.indexOf(t)>=0&&t._exit(),n.removeFeature(t)),n},this.features=function(t){if(void 0===t)return i.slice();var e,r=i.slice();for(e=0;e<r.length;e+=1)t.indexOf(r[e])<0&&i.indexOf(r[e])>=0&&n.deleteFeature(r[e]);for(e=0;e<t.length;e+=1)n.addFeature(t[e]);return n},this.gcsFeatures=function(t){var e,i;return void 0===t?(this.features().forEach((function(t){void 0===e?e=t.gcs():t.gcs()!==e&&(i=!0)})),i?void 0:e):(n.features().forEach((function(e){e.gcs()!==t&&e.gcs(t)})),n)},this._init=function(){return n.initialized()||(s.call(n,!0),n.geoOn(o.resize,(function(t){n.renderer()?(n.renderer()._resize(t.x,t.y,t.width,t.height),n._update({event:t}),n.renderer()._render()):n._update({event:t})})),n.geoOn(o.pan,(function(t){n._update({event:t}),n.renderer()&&n.renderer()._render()})),n.geoOn(o.rotate,(function(t){n._update({event:t}),n.renderer()&&n.renderer()._render()})),n.geoOn(o.zoom,(function(t){n._update({event:t}),n.renderer()&&n.renderer()._render()}))),n},this._update=function(t){var e;if(!i.length)return n;if(u.call(n,t),n.dataTime().timestamp()>n.updateTime().timestamp())for(e=0;e<i.length;e+=1)i[e].renderer(n.renderer());for(e=0;e<i.length;e+=1)i[e]._update();return n.updateTime().modified(),n},this._exit=function(){n.clear(),l()},this.draw=function(){return n.visible()&&(h(),n.renderer()&&n.renderer()._render()),n},this.visible=function(t){if(void 0===t)return c();if(n.visible()!==t){c(t);var e,r=i.slice();for(e=0;e<r.length;e+=1)r[e].visible(r[e].visible(void 0,!0),!0);t&&n.draw()}return n},this.selectionAPI=function(t){if(void 0===t)return d();if(n.selectionAPI()!==t){d(t);var e,r=i.slice();for(e=0;e<r.length;e+=1)r[e].selectionAPI(r[e].selectionAPI(void 0,!0),!0)}return n},this.clear=function(){for(;i.length;)n.deleteFeature(i[0]);return n},n};i(s,r),a.registerLayer("feature",s),t.exports=s},3705:function(t,e,n){var i=n(5638);t.exports=function t(e){if(!(this instanceof t))return new t(e);e=e||{},this._size=e.size||6,this._initialSize=e.initialSize||0,this._track=e.track||600,this._needed=e.needed||null,this._batch=!1;var n=this,r=1;return Object.defineProperty(this,"size",{get:function(){return n._size},set:function(t){n._size=t,n._initialSize>1&&t<n._initialSize&&(n._initialSize=t),n.next_item()}}),Object.defineProperty(this,"initialSize",{get:function(){return n._initialSize},set:function(t){n._initialSize=t,n.next_item()}}),Object.defineProperty(this,"length",{get:function(){return n._queue.length}}),Object.defineProperty(this,"processing",{get:function(){return n._processing}}),this.clear=function(){return n._queue=[],n._processing=0,n},this.add=function(t,e,r){if(t.__fetchQueue){var o=i.inArray(t,n._queue);if(o>=0)return n._queue.splice(o,1),n._addToQueue(t,r),t}var a=i.Deferred(),s=i.Deferred();return a.done((function(){i.when(e.call(t)).always(s.resolve)})).fail(s.resolve),t.__fetchQueue=a,n._addToQueue(t,r),i.when(a,s).always((function(){n._processing>0&&(n._processing-=1),n._initialSize=0,n.next_item()})).promise(t),n.next_item(),t},this._addToQueue=function(t,e){if(t.__fetchQueue._batch=n._batch,e)n._queue.push(t);else if(this._batch){for(var i=0;i<n._queue.length&&n._queue[i].__fetchQueue._batch===n._batch;i+=1);n._queue.splice(i,0,t)}else n._queue.unshift(t)},this.get=function(t){return i.inArray(t,n._queue)},this.remove=function(t){var e=i.inArray(t,n._queue);return e>=0&&(n._queue.splice(e,1),!0)},this.batch=function(t){return void 0===t?n._batch:(t?(n._batch=r,r+=1):n._batch=!1,n)},this.next_item=function(){if(!n._innextitem){if(n._innextitem=!0,n._queue.length>n._track&&n._needed)for(var t=n._queue.length-1;t>=0;t-=1)if(!n._needed(n._queue[t])){var e=n._queue.splice(t,1)[0];n._processing+=1,e.__fetchQueue.reject(),delete e.__fetchQueue}for(;n._processing<(n._initialSize||n._size)&&n._queue.length;){var i=n._queue.shift();if(i.__fetchQueue)n._processing+=1,!n._needed||n._needed(i)?i.__fetchQueue.resolve():i.__fetchQueue.reject(),delete i.__fetchQueue}n._innextitem=!1}},this.clear(),this}},407:function(t,e,n){var i=n(5699),r=n(3715),o=n(3737),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);if(o.call(this),!((e=e||{}).layer instanceof r))throw new Error("fileReader must be given a feature layer");var n=e.layer;return this.layer=function(){return n},this.canRead=function(t){return!1},this.read=function(t,e,n){var i=new Promise((function(t,n){throw e&&e(!1),new Error("The default file reader always fails")}));return this.addPromise(i),i},this._getString=function(t,e,n){var i=function(t,e){var n=new FileReader;return e&&(n.onprogress=e),n.onloadend=function(){t(n.error||n.result)},n}(e,n);i.readAsText(t)},this};i(a,o),t.exports=a},3088:function(t,e,n){function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var a=n(5699),s=n(4647).registerFileReader,l=n(407),u=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638),a=n(4634).convertColor,s=this,u=r(r({},e),{},{pointStyle:r({fill:!0,fillColor:"#ff7800",fillOpacity:.8,stroke:!0,strokeColor:"#000",strokeWidth:1,strokeOpacity:1,radius:8},e.pointStyle),lineStyle:r({strokeColor:"#ff7800",strokeWidth:4,strokeOpacity:.5,strokeOffset:0,lineCap:"butt",lineJoin:"miter",closed:!1},e.lineStyle),polygonStyle:r({fill:!0,fillColor:"#b0de5c",fillOpacity:.8,stroke:!0,strokeColor:"#999999",strokeWidth:2,strokeOpacity:1},e.polygonStyle)});l.call(this,u),this.canRead=function(t){if(t instanceof File||t instanceof Blob)return!!("application/json"===t.type||t.name&&t.name.match(/\.json$/));if("string"==typeof t){try{JSON.parse(t)}catch(t){return!1}return!0}try{if(Array.isArray(s._featureArray(t)))return!0}catch(t){}return!1},this._readObject=function(t,e,n){var r;function o(t){try{r=JSON.parse(t),e(r)}catch(n){r||i.ajax({type:"GET",url:t,dataType:"text"}).done((function(t){try{r=JSON.parse(t),e(r)}catch(t){r||e(!1)}})).fail((function(){e(!1)}))}}t instanceof File||t instanceof Blob?s._getString(t,o,n):"string"==typeof t?o(t):e(t)},this._featureArray=function(t){var e,n=[];switch(t.type){case"FeatureCollection":e=t.features;break;case"Feature":e=[t];break;case"GeometryCollection":e=t.geometries.map((function(t){return{type:"Feature",geometry:t,properties:{}}}));break;case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":e=[{type:"Feature",geometry:t,properties:{}}];break;default:throw new Error("Invalid json type")}return e.forEach((function(t){Array.prototype.push.apply(n,s._feature(t))})),n=n.filter((function(t){return t.geometry&&t.geometry.coordinates&&t.geometry.coordinates.length}))},this._feature=function(t){if("Feature"!==t.type)throw new Error("Invalid feature object");switch(t.geometry.type){case"Point":case"LineString":case"Polygon":return[t];case"MultiPoint":case"MultiLineString":case"MultiPolygon":return t.geometry.coordinates.map((function(e){return{type:"Feature",geometry:{type:t.geometry.type.replace("Multi",""),coordinates:e},properties:t.properties}}));default:throw new Error("Invalid geometry type")}},this._position=function(t){return{x:t[0],y:t[1],z:t[2]||0}},this._style=function(t,e){var n=t.toLowerCase().match(/color$/);return n&&(e=a(e)),function(i,r,o,s){var l;return void 0!==(l=void 0!==o&&o.properties?o.properties:i.properties)&&l.hasOwnProperty(t)?n?a(l[t]):l[t]:e}},this.read=function(t,e,n){var i=new Promise((function(i,a){s._readObject(t,(function(t){if(!1===t)return e&&e(t),void a(new Error("Failed to parse GeoJSON"));var n,l,c=[];try{n=s._featureArray(t)}catch(t){return void a(t)}var d=n.filter((function(t){return"Point"===t.geometry.type}));d.length&&(l=s.layer().createFeature("point"))&&(l.data(d).position((function(t){return s._position(t.geometry.coordinates)})).style([{}].concat(Object.keys(u.pointStyle)).reduce((function(t,e){return r(o({},e,d.some((function(t){return t.properties&&void 0!==t.properties[e]}))?s._style(e,u.pointStyle[e]):u.pointStyle[e]),t)}))),c.push(l));var h=n.filter((function(t){return"LineString"===t.geometry.type}));h.length&&(l=s.layer().createFeature("line"))&&(l.data(h).line((function(t){return t.geometry.coordinates})).position(s._position).style([{}].concat(Object.keys(u.lineStyle)).reduce((function(t,e){return r(o({},e,h.some((function(t){return t.properties&&void 0!==t.properties[e]}))?s._style(e,u.lineStyle[e]):u.lineStyle[e]),t)}))),c.push(l));var f=n.filter((function(t){return"Polygon"===t.geometry.type}));f.length&&(l=s.layer().createFeature("polygon"))&&(l.data(f).polygon((function(t,e){return{outer:t.geometry.coordinates[0],inner:t.geometry.coordinates.slice(1)}})).position(s._position).style([{}].concat(Object.keys(u.polygonStyle)).reduce((function(t,e){return r(o({},e,f.some((function(t){return t.properties&&void 0!==t.properties[e]}))?s._style(e,u.polygonStyle[e]):u.polygonStyle[e]),t)}))),c.push(l)),e&&e(c),i(c)}),n)}));return s.addPromise(i),i}};a(u,l),s("geojsonReader",u),s("jsonReader",u),t.exports=u},4745:function(t,e,n){var i=n(5699),r=n(6837),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},r.call(this,e);var i=n(5638),o=n(4634),a=n(4647),s=this,l=this.draw,u=this.style,c=null,d=null,h=function(t){return t.children},f=[],p=this._init,m=this._exit;return this.featureType="graph",this._init=function(t){p.call(s,t);var e=i.extend(!0,{},{nodes:{radius:5,fill:!0,fillColor:{r:1,g:0,b:0},strokeColor:{r:0,g:0,b:0}},links:{strokeColor:{r:0,g:0,b:0}},linkType:"path"},void 0===t.style?{}:t.style);return s.style(e),s.nodes((function(t){return t})),s},this._build=function(){s.children().forEach((function(t){t._build()}))},this._update=function(){s.children().forEach((function(t){t._update()}))},this._exit=function(){return s.data([]),f.forEach((function(t){t._exit(),s.removeChild(t)})),f=[],d._exit(),s.removeChild(d),m(),s},this.style=function(t,e){var n=u.call(s,t,e);return n!==s?n:(d.style(t.nodes),f.forEach((function(e){e.style(t.links)})),s)},this.style.get=u.get,this.links=function(t){return void 0===t?h:(h=o.ensureFunction(t),s)},this.nodes=function(t){return void 0===t?c:(c=t,s.modified(),s)},this.nodeFeature=function(){return d},this.linkFeatures=function(){return f},this.draw=function(){var t,e=s.layer(),n=s.data(),i=0;return t=s.style(),d.data(n),d.style(t.nodes),n.forEach((function(n){(n.children||[]).forEach((function(r){var o;i+=1,f.length<i&&(o=a.createFeature(t.linkType,e,e.renderer()).style(t.links),s.addChild(o),f.push(o)),f[i-1].data([n,r])}))})),f.splice(i,f.length-i).forEach((function(t){t._exit(),s.removeChild(t)})),l(),s},d=a.createFeature("point",this.layer(),this.layer().renderer()),s.addChild(d),e.nodes&&this.nodes(e.nodes),this._init(e),this};i(o,r),t.exports=o},1109:function(t,e,n){var i=n(5699),r=n(9146),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638),o=n(4634),a=n(9244);e=e||{},r.call(this,e);var s=this,l=this._init;return this._createGrids=function(){return a.createColoredMesh(s,!0)},this.grid=s.mesh,this._init=function(t){l.call(s,t);var e=i.extend({},{opacity:1,value:function(t,e){return o.isNonNullFinite(t)?t:s.position()(t,e).z},position:function(t){return t||{x:0,y:0}},origin:function(t){return t.length>=3?[t[0],t[1],0]:[0,0,0]}},void 0===t.style?{}:t.style);s.style(e),s.grid(i.extend({},{minColor:"black",minOpacity:0,maxColor:"black",maxOpacity:0,colorRange:[{r:.07514311,g:.468049805,b:1},{r:.468487184,g:.588057293,b:1},{r:.656658579,g:.707001303,b:1},{r:.821573924,g:.837809045,b:1},{r:.943467973,g:.943498599,b:.943398095},{r:1,g:.788626485,b:.750707739},{r:1,g:.6289553,b:.568237474},{r:1,g:.472800903,b:.404551679},{r:.916482116,g:.236630659,b:.209939162}]},t.mesh||{},t.grid||{})),(t.mesh||t.grid)&&s.dataTime().modified()},this._init(e),this};i(o,r),t.exports=o},1111:function(t,e,n){var i=n(5638),r=n(5699),o=n(6837),a=n(6853),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var n,r,s,l,u,c,d,h=this,f=this._init;return this.featureType="heatmap",n=e.position||function(t){return t},r=e.intensity||function(t){return 1},s=void 0!==e.maxIntensity?e.maxIntensity:null,l=void 0!==e.minIntensity?e.minIntensity:null,c=void 0!==e.binned?e.binned:"auto",u=e.updateDelay||0===e.updateDelay?parseInt(e.updateDelay,10):-1,this.maxIntensity=function(t){return void 0===t?s:(s=t,h.dataTime().modified(),h.modified(),h)},this.minIntensity=function(t){return void 0===t?l:(l=t,h.dataTime().modified(),h.modified(),h)},this.updateDelay=function(t){return void 0===t?u:(u=parseInt(t,10),h)},this.binned=function(t){return void 0===t?c:("true"===t?t=!0:("false"===t||"auto"!==t&&!0!==t&&!1!==t&&((t=parseInt(t,10))<=0||isNaN(t)))&&(t=!1),c=t,h.dataTime().modified(),h.modified(),h)},this.position=function(t){return void 0===t?n:(n=t,h.dataTime().modified(),h.modified(),h)},this.gcsPosition=function(){return h._update(),d},this.intensity=function(t){return void 0===t?r:(r=t,h.dataTime().modified(),h.modified(),h)},this._init=function(t){f.call(h,t);var e=i.extend({},{radius:10,blurRadius:10,gaussian:!0,color:{0:{r:0,g:0,b:0,a:0},.25:{r:0,g:0,b:1,a:.5},.5:{r:0,g:1,b:1,a:.6},.75:{r:1,g:1,b:0,a:.7},1:{r:1,g:0,b:0,a:.8}},scaleWithZoom:!1},void 0===t.style?{}:t.style);h.style(e),n&&h.dataTime().modified()},this._build=function(){var t=h.data(),e=null,n=[],i=null==s,r=null==l;return t.forEach((function(t,o){n.push(h.position()(t,o)),(i||r)&&(e=h.intensity()(t,o),null==s&&(s=e),null==l&&(l=e),i&&e>s&&(s=e),r&&e<l&&(l=e))})),r&&i&&l===s&&(l-=1),d=a.transformCoordinates(h.gcs(),h.layer().map().gcs(),n),h.buildTime().modified(),h},this._init(e),this};r(s,o),t.exports=s},4665:function(t,e,n){var i=n(5699),r=n(8418),o=function t(e){if(!(this instanceof t))return new t(e);var i=n(5638);return e.size=e.size||{x:256,y:256},this._image=null,this._cors=e.crossDomain||null===e.crossDomain?e.crossDomain:"anonymous",r.call(this,e),Object.defineProperty(this,"image",{get:function(){return this._image}}),this.fetch=function(){var t;return this._image||(this._image=new Image(this.right-this.left,this.bottom-this.top),this._cors&&this._url.indexOf(":")>=0&&this._url.indexOf("/")===this._url.indexOf(":")+1&&(this._image.crossOrigin=this._cors),t=i.Deferred(),this._image.onload=t.resolve,this._image.onerror=t.reject,this._image.src=this._url,t.done(function(){this._fetched=!0}.bind(this)).promise(this)),this},this.fadeIn=function(t){var e=this.fetch(),n=i.Deferred();return i(this._image).css("display","none"),e.done(function(){i(this._image).fadeIn(t,(function(){n.resolve()}))}.bind(this)),n.promise(this)},this};i(o,r),t.exports=o},6062:function(t,e,n){
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(function(){try{return require("hammerjs")}catch(t){}}(),function(){try{return require("d3")}catch(t){}}(),function(){try{return require("vtk.js")}catch(t){}}()):"function"==typeof define&&define.amd?define(["hammerjs","d3","vtk.js"],e):"object"==typeof exports?exports.geo=e(function(){try{return require("hammerjs")}catch(t){}}(),function(){try{return require("d3")}catch(t){}}(),function(){try{return require("vtk.js")}catch(t){}}()):t.geo=e(t.Hammer,t.d3,t["vtk.js"])}(self,(function(t,e,n){return function(){var i={7839:function(t){t.exports={momentum:"geo_action_momentum",pan:"geo_action_pan",rotate:"geo_action_rotate",select:"geo_action_select",unzoomselect:"geo_action_unzoomselect",zoom:"geo_action_zoom",zoomrotate:"geo_action_zoom_rotate",zoomselect:"geo_action_zoomselect",annotation_line:"geo_annotation_line",annotation_polygon:"geo_annotation_polygon",annotation_rectangle:"geo_annotation_rectangle",annotation_edit_handle:"geo_annotation_edit_handle"}},7800:function(t,e,n){var i=n(5638),r=n(5699),o=n(5108),a=n(7839),s=n(6853),l=n(4634),u=n(4647).registerAnnotation,c=n(4708),d=n(7098),h=n(2557),f=n(4343),p=n(9757),m=0,g={create:"create",done:"done",highlight:"highlight",edit:"edit"},v="annotationAction",y={fill:!0,fillColor:function(t){return t.selected?{r:0,g:1,b:1}:{r:.3,g:.3,b:.3}},fillOpacity:function(t){return t.selected?.5:.25},radius:function(t){return"edge"===t.type||"rotate"===t.type?8:10},scaled:!1,stroke:!0,strokeColor:{r:0,g:0,b:1},strokeOpacity:1,strokeWidth:function(t){return"edge"===t.type||"rotate"===t.type?2:3},rotateHandleOffset:24,rotateHandleRotation:-Math.PI/4,resizeHandleOffset:48,resizeHandleRotation:-Math.PI/4,handles:{vertex:!0,edge:!0,center:!0,rotate:!0,resize:!0}},x=function t(e,n){"use strict";if(!(this instanceof t))return new t(e,n);var r=this,u=i.extend({},{showLabel:!0},n||{}),c=u.annotationId;delete u.annotationId,void 0===c||u.layer&&u.layer.annotationById(c)?(m+=1,void 0!==c&&console.warn("Annotation id "+c+" is in use; using "+m+" instead."),c=m):c>m&&(m=c);var d=u.name||e.charAt(0).toUpperCase()+e.substr(1)+" "+c,h=u.label||null,f=u.description||void 0,x=e,b=u.layer,_=u.state||g.done;delete u.state,delete u.layer,delete u.name,delete u.label,delete u.description,u.constraint&&(l.isFunction(u.constraint)?this._selectionConstraint=u.constraint:this._selectionConstraint=F(u.constraint)),this._exit=function(){},this.id=function(){return c},this.name=function(t){return void 0===t?d:(null!==t&&(""+t).trim()&&(t=(""+t).trim())!==d&&(d=t,r.modified()),r)},this.label=function(t,e){return void 0===t?null!==h||e?h:d:(t!==h&&(h=t,r.modified()),r)},this._labelPosition=function(){return l.centerFromPerimeter(r._coordinates())},this._rotateHandlePosition=function(t,e){var n,i,o,a=r.layer().map(),s=r._coordinates(),u=l.centerFromPerimeter(r._coordinates()),c=u?a.gcsToDisplay(u,null):void 0,d=0;if(u){for(t=t||0,e=e||0,n=0;n<s.length;n+=1)i=a.gcsToDisplay(s[n],null),d=Math.max(d,Math.pow(i.x-c.x,2)+Math.pow(i.y-c.y,2));return o=Math.sqrt(d)+t,i=a.displayToGcs({x:c.x+o*Math.cos(e),y:c.y-o*Math.sin(e)},null)}},this.labelRecord=function(){var t=r.options("showLabel");if(t){var e=r.state();if(!(!0===t&&e===g.create||!0!==t&&t.indexOf(e)<0)){var n=r.labelStyle(),i={text:r.label(),position:r._labelPosition()};if(i.position)return n&&(i.style=n),i}}},this.description=function(t){return void 0===t?f:(t!==f&&(f=t,r.modified()),r)},this.layer=function(t){return void 0===t?b:(b=t,r)},this.state=function(t){return void 0===t?_:(_!==t&&(_=t,r.layer()&&r.layer().geoTrigger(o.annotation.state,{annotation:r})),r)},this.actions=function(t){return t||(t=r.state()),t===g.edit?[{action:a.annotation_edit_handle,name:"annotation edit",owner:v,input:"left"},{action:a.annotation_edit_handle,name:"annotation edit",owner:v,input:"pan"}]:[]},this.processAction=function(t){},this.processEditAction=function(t){if(t&&r._editHandle&&r._editHandle.handle)switch(r._editHandle.handle.type){case"vertex":return r._processEditActionVertex(t);case"edge":return r._processEditActionEdge(t);case"center":return r._processEditActionCenter(t);case"rotate":return r._processEditActionRotate(t);case"resize":return r._processEditActionResize(t)}},this.selectEditHandle=function(t,e){e&&r._editHandle&&r._editHandle.handle&&r._editHandle.handle.selected&&(r._editHandle.handle.selected=!1),t.selected=e;var n=(r._editHandle||{}).amountRotated||0;return r._editHandle={handle:t,startCoordinates:r._coordinates().slice(),center:l.centerFromPerimeter(r._coordinates()),rotatePosition:r._rotateHandlePosition(t.style.rotateHandleOffset,t.style.rotateHandleRotation+n),startAmountRotated:n,amountRotated:n,resizePosition:r._rotateHandlePosition(t.style.resizeHandleOffset,t.style.resizeHandleRotation)},r.layer()&&r.layer().geoTrigger(o.annotation.select_edit_handle,{annotation:r,handle:r._editHandle,enable:e}),r},this.options=function(t,e){if(void 0===t)return u;if("string"==typeof t&&void 0===e)return u[t];var n;if(void 0===e?(n=void 0!==t[r._coordinateOption],u=i.extend(!0,u,t),["style","createStyle","editStyle","editHandleStyle","labelStyle","highlightStyle"].forEach((function(e){void 0!==t[e]&&i.extend(u[e],t[e])}))):(n=t===r._coordinateOption,u[t]=e),u.coordinates){var a=u.coordinates;delete u.coordinates,r._coordinates(a)}if(void 0!==u.name){var s=u.name;delete u.name,r.name(s)}if(void 0!==u.label){var l=u.label;delete u.label,r.label(l)}if(void 0!==u.description){var c=u.description;delete u.description,r.description(c)}return r.modified(),n&&r.layer()&&r.layer().geoTrigger(o.annotation.coordinates,{annotation:r}),r},this.style=function(t,e,n){return n=n||"style",void 0===t?u[n]:"string"==typeof t&&void 0===e?(u[n]||{})[t]:(void 0===u[n]&&(u[n]={}),void 0===e?u[n]=i.extend(!0,u[n],t):u[n][t]=e,r.modified(),r)},["createStyle","editStyle","editHandleStyle","labelStyle","highlightStyle"].forEach((function(t){r[t]=function(e,n){return r.style(e,n,t)}})),this.styleForState=function(t){return(t=t||r.state())===g.edit||t===g.highlight?i.extend({},u.style,u[t+"Style"]):t===g.create?i.extend({},u.style,u.editStyle,u[t+"Style"]):u[t+"Style"]||u.style||{}},this.type=function(){return x},this.features=function(){return[]},this.mouseClick=function(t){},this.mouseClickEdit=function(t){},this.mouseMove=function(t){},this._coordinates=function(t){return[]},this._coordinateOption="vertices",this.coordinates=function(t){var e=r._coordinates()||[];if(r.layer()){var n=r.layer().map();(t=null===t?n.gcs():void 0===t?n.ingcs():t)!==n.gcs()&&(e=s.transformCoordinates(n.gcs(),t,e))}return e},this.modified=function(){return r.layer()&&r.layer().modified(),r},this.draw=function(){return r.layer()&&(r.layer()._update(),r.layer().draw()),r},this._geojsonStyles=function(){return["closed","fill","fillColor","fillOpacity","lineCap","lineJoin","radius","stroke","strokeColor","strokeOffset","strokeOpacity","strokeWidth"]},this._geojsonCoordinates=function(t){return[]},this._geojsonGeometryType=function(){return""},this.geojson=function(t,e){var n,i,o,a=r._geojsonCoordinates(t),s=r._geojsonGeometryType(),u=r._geojsonStyles(),c=r.options("style")||{},d=r.labelStyle()||{};if(a&&a.length&&s){var m={type:"Feature",geometry:{type:s,coordinates:a},properties:{annotationType:x,name:r.name(),annotationId:r.id()}};for(h&&(m.properties.label=h),f&&(m.properties.description=f),!1===r.options("showLabel")&&(m.properties.showLabel=r.options("showLabel")),n=0;n<u.length;n+=1)i=u[n],void 0!==(o=l.ensureFunction(c[i])())&&(i.toLowerCase().match(/color$/)&&(o=l.convertColorToHex(o,"needed")),m.properties[i]=o);for(n=0;n<p.usedStyles.length;n+=1)i=p.usedStyles[n],void 0!==(o=l.ensureFunction(d[i])())&&(i.toLowerCase().match(/color$/)&&(o=l.convertColorToHex(o,"needed")),m.properties["label"+i.charAt(0).toUpperCase()+i.slice(1)]=o);if(e){var g=r.layer().map();t=null===t?g.gcs():void 0===t?g.ingcs():t,m.crs={type:"name",properties:{type:"proj4",name:t}}}return m}},this._addEditHandles=function(t,e,n,o){var a,s=i.extend({},y,r.editHandleStyle()),u=l.ensureFunction(s.handles)()||{},c=r._editHandle&&r._editHandle.handle&&r._editHandle.handle.selected?r._editHandle.handle:void 0;n=i.extend({},n),Object.keys(u).forEach((function(t){!1===u[t]&&(n[t]=!1)})),t[3]||(t[3]={point:[]}),a=t[3].point,e.forEach((function(t,r){!1!==n.vertex&&a.push(i.extend({},t,{type:"vertex",index:r,style:s,editHandle:!0})),!1===n.edge||r===e.length-1||t.x===e[r+1].x&&t.y===e[r+1].y||a.push(i.extend({x:(t.x+e[r+1].x)/2,y:(t.y+e[r+1].y)/2},{type:"edge",index:r,style:s,editHandle:!0})),!1===n.edge||o||r!==e.length-1||t.x===e[0].x&&t.y===e[0].y||a.push(i.extend({x:(t.x+e[0].x)/2,y:(t.y+e[0].y)/2},{type:"edge",index:r,style:s,editHandle:!0}))})),!1!==n.center&&a.push(i.extend({},l.centerFromPerimeter(r._coordinates()),{type:"center",style:s,editHandle:!0})),!1!==n.rotate&&(a.push(i.extend(r._rotateHandlePosition(s.rotateHandleOffset,s.rotateHandleRotation+(c&&"rotate"===c.type?r._editHandle.amountRotated:0)),{type:"rotate",style:s,editHandle:!0})),!r._editHandle||c&&"rotate"===c.type||(r._editHandle.amountRotated=0)),!1!==n.resize&&a.push(i.extend(r._rotateHandlePosition(s.resizeHandleOffset,s.resizeHandleRotation),{type:"resize",style:s,editHandle:!0})),c&&a.forEach((function(t){t.type===c.type&&t.index===c.index&&(t.selected=!0)}))},this._processEditActionCenter=function(t){var e=r._editHandle.startCoordinates,n=t.mouse.mapgcs.x-t.state.origin.mapgcs.x,i=t.mouse.mapgcs.y-t.state.origin.mapgcs.y,o=r._coordinates(),a=e.map((function(t){return{x:t.x+n,y:t.y+i}}));return(a[0].x!==o[0].x||a[0].y!==o[0].y)&&(r._coordinates(a),!0)},this._processEditActionRotate=function(t){var e=r._editHandle,n=e.startCoordinates,i=t.mouse.mapgcs.x-t.state.origin.mapgcs.x,o=t.mouse.mapgcs.y-t.state.origin.mapgcs.y,a=Math.atan2(e.rotatePosition.y-e.center.y,e.rotatePosition.x-e.center.x),s=Math.atan2(e.rotatePosition.y+o-e.center.y,e.rotatePosition.x+i-e.center.x)-a,l=r._coordinates(),u=n.map((function(t){var n=t.x-e.center.x,i=t.y-e.center.y;return{x:n*Math.cos(s)-i*Math.sin(s)+e.center.x,y:n*Math.sin(s)+i*Math.cos(s)+e.center.y}}));return(u[0].x!==l[0].x||u[0].y!==l[0].y)&&(r._coordinates(u),e.amountRotated=e.startAmountRotated+s,!0)},this._processEditActionResize=function(t){var e=r._editHandle,n=e.startCoordinates,i=t.mouse.mapgcs.x-t.state.origin.mapgcs.x,o=t.mouse.mapgcs.y-t.state.origin.mapgcs.y,a=r.layer().map(),s=a.gcsToDisplay(e.center,null),l=a.gcsToDisplay(e.resizePosition,null),u=a.gcsToDisplay({x:e.resizePosition.x+i,y:e.resizePosition.y+o},null),c=Math.pow(Math.pow(l.y-s.y,2)+Math.pow(l.x-s.x,2),.5)-e.handle.style.resizeHandleOffset,d=Math.pow(Math.pow(u.y-s.y,2)+Math.pow(u.x-s.x,2),.5)-e.handle.style.resizeHandleOffset,h=r._coordinates();if(d&&c){var f=d/c,p=n.map((function(t){return{x:(t.x-e.center.x)*f+e.center.x,y:(t.y-e.center.y)*f+e.center.y}}));if(p[0].x!==h[0].x||p[0].y!==h[0].y)return r._coordinates(p),!0}return!1},this._processEditActionEdge=function(t){var e=r._editHandle,n=e.handle.index,i=r._coordinates();return i.splice(n+1,0,{x:e.handle.x,y:e.handle.y}),e.handle.type="vertex",e.handle.index+=1,e.startCoordinates=i.slice(),r.modified(),!0},this._processEditActionVertex=function(t,e){var n,i,a=r._editHandle,s=a.handle.index,l=a.startCoordinates,u=r._coordinates(),c=u.length,d=u[s],h=t.mouse.mapgcs.x-t.state.origin.mapgcs.x,f=t.mouse.mapgcs.y-t.state.origin.mapgcs.y,p=r.layer(),m=p.options("adjacentPointProximity");return u[s]={x:l[s].x+h,y:l[s].y+f},p.displayDistance(u[s],null,l[s],null)<=m||(p.displayDistance(u[s],null,u[(s+1)%u.length],null)<=m?n=(s+1)%u.length:p.displayDistance(u[s],null,u[(s+u.length-1)%u.length],null)<=m&&(n=(s+u.length-1)%u.length)),i=0===n&&s===u.length-1||n===u.length-1&&0===s,!1===e&&i&&(n=void 0),void 0!==n&&u.length>(e||r.options("style").closed?3:2)&&(u[s]={x:u[n].x,y:u[n].y},t.event===o.actionup&&(e&&i&&(r.options("style").closed=!0),u.splice(s,1))),(u.length!==c||u[s].x!==d.x||u[s].y!==d.y)&&(r._coordinates(u),!0)}};function b(t,e,n,i,r){return n||(n=t.state()),n===g.create?[{action:a["annotation_"+i],name:i+" create",owner:v,input:"left",modifiers:{shift:!1,ctrl:!1}},{action:a["annotation_"+i],name:i+" create",owner:v,input:"pan"}]:e.apply(t,r)}function _(t,e,n){var i=t.layer();if(t.state()===g.create&&i&&e.state.action===a["annotation_"+n]){var r=i.options("continuousPointProximity"),s=i.options("continuousPointCollinearity"),l=i.options("continuousCloseProximity");if(r||0===r){var u=t.options("vertices"),c=!1;if(!u.length)return u.push(e.mouse.mapgcs),u.push(e.mouse.mapgcs),!0;var d=i.displayDistance(u[u.length-2],null,e.mouse.map,"display");if(d&&d>r){if(u.length>=(t._lastClickVertexCount||1)+3){var h=i.displayDistance(u[u.length-3],null,u[u.length-2],null),f=d,p=i.displayDistance(u[u.length-3],null,e.mouse.map,"display");if(h&&p)(p*p-h*h-f*f)/(2*h*f)>Math.cos(s)&&u.pop()}u[u.length-1]=e.mouse.mapgcs,u.push(e.mouse.mapgcs),c=!0}return(l||0===l)&&e.event===o.actionup&&(!0===l||i.displayDistance(u[0],null,e.mouse.map,"display")<=r)?u.length<3+("polygon"===n?1:0)?"remove":(u.pop(),t.state(g.done),"done"):c}}}var w=function t(e,n){"use strict";if(!(this instanceof t))return new t(e,n);(e=i.extend(!0,{},{style:{fill:!0,fillColor:{r:0,g:1,b:0},fillOpacity:.25,polygon:function(t){return t.polygon},stroke:!0,strokeColor:{r:0,g:0,b:0},strokeOpacity:1,strokeWidth:3,uniformPolygon:!0},highlightStyle:{fillColor:{r:0,g:1,b:1},fillOpacity:.5,strokeWidth:5},createStyle:{fillColor:{r:.3,g:.3,b:.3},fillOpacity:.25,strokeColor:{r:0,g:0,b:1}}},e||{})).corners=e.corners||e.coordinates||[],delete e.coordinates,x.call(this,n||"rectangle",e);var r=this,s=this.actions,l=this.processEditAction;this.actions=function(t){return t||(t=r.state()),t===g.create?[{action:a.annotation_rectangle,name:"rectangle create",owner:v,input:"left",modifiers:{shift:!1,ctrl:!1},selectionRectangle:!0,selectionConstraint:this._selectionConstraint}]:s.apply(r,arguments)},this.processAction=function(t){var e=r.layer();if(r.state()===g.create&&e&&t.event===o.actionselection&&t.state.action===a.annotation_rectangle){var n=e.map(),i=[n.displayToGcs({x:t.lowerLeft.x,y:t.lowerLeft.y},null),n.displayToGcs({x:t.lowerLeft.x,y:t.upperRight.y},null),n.displayToGcs({x:t.upperRight.x,y:t.upperRight.y},null),n.displayToGcs({x:t.upperRight.x,y:t.lowerLeft.y},null)];return this._selectionConstraint&&t.mouse&&t.state.origin&&this._selectionConstraint(t.mouse.mapgcs,t.state.origin.mapgcs,i),e.displayDistance(i[0],null,i[1],null)*e.displayDistance(i[0],null,i[3],null)<.01?"remove":(r.options("corners",i),r.state(g.done),"done")}},this.features=function(){var t,e=r.options(),n=r.state();return t=[],e.corners&&e.corners.length>=4&&(t=[{polygon:{polygon:e.corners,style:r.styleForState(n)}}]),n===g.edit&&r._addEditHandles(t,e.corners),t},this._coordinates=function(t){return t&&t.length>=4&&r.options("corners",t.slice(0,4)),r.options("corners")},this._coordinateOption="corners",this._geojsonCoordinates=function(t){var e=r.coordinates(t);if(e&&r.state()!==g.create&&!(e.length<4)){for(var n=[],i=0;i<4;i+=1)n.push([e[i].x,e[i].y]);return n.push([e[0].x,e[0].y]),[n]}},this._geojsonGeometryType=function(){return"Polygon"},this._geojsonStyles=function(){return["fill","fillColor","fillOpacity","lineCap","lineJoin","stroke","strokeColor","strokeOffset","strokeOpacity","strokeWidth"]},this._setCornersFromMouse=function(t,e){var n=r.layer().map(),o=n.gcsToDisplay({x:t[0].x,y:t[0].y},null),a=n.gcsToDisplay(e.mapgcs,null),s={x:a.x,y:o.y},l={x:o.x,y:a.y};t[2]=i.extend({},e.mapgcs),t[1]=n.displayToGcs(s,null),t[3]=n.displayToGcs(l,null),this._selectionConstraint&&this._selectionConstraint(e.mapgcs,t[0],t)},this.mouseMove=function(t){if(r.state()===g.create){var e=r.options("corners");return e.length?(r._setCornersFromMouse(e,t),!0):void 0}},this.mouseClick=function(t){var e=r.layer();if(r.state()===g.create&&e&&(t.buttonsDown.left||t.buttonsDown.right)){var n=r.options("corners");if(!t.buttonsDown.right||n.length)return t.handled=!0,n.length?(r._setCornersFromMouse(n,t),e.displayDistance(n[0],null,n[1],null)*e.displayDistance(n[0],null,n[3],null)<.01?"remove":(r.state(g.done),"done")):t.buttonsDown.left?(n.push(i.extend({},t.mapgcs)),n.push(i.extend({},t.mapgcs)),n.push(i.extend({},t.mapgcs)),n.push(i.extend({},t.mapgcs)),!0):void 0}},this.processEditAction=function(t){var e,n,i,o,a,s=r._editHandle.startCoordinates,u={x:t.mouse.mapgcs.x-t.state.origin.mapgcs.x,y:t.mouse.mapgcs.y-t.state.origin.mapgcs.y},c=r._editHandle.handle.type,d=r._editHandle.handle.index,h=[Math.atan2(s[1].y-s[0].y,s[1].x-s[0].x),Math.atan2(s[2].y-s[1].y,s[2].x-s[1].x),Math.atan2(s[3].y-s[2].y,s[3].x-s[2].x),Math.atan2(s[0].y-s[3].y,s[0].x-s[3].x)];switch(h[0]||h[1]||h[2]||h[3]||(h[1]=Math.PI/2,h[2]=Math.PI,h[3]=-Math.PI/2),h[0]||h[2]||(h[0]=h[1]-Math.PI/2,h[2]=h[1]+Math.PI/2),h[1]||h[3]||(h[1]=h[2]-Math.PI/2,h[3]=h[2]+Math.PI/2),c){case"vertex":return e=s.map((function(t){return{x:t.x,y:t.y}})),o=h[(d+1)%4],n={x:(u.x*Math.cos(o)+u.y*Math.sin(o))*Math.cos(o),y:(u.y*Math.sin(o)+u.x*Math.cos(o))*Math.sin(o)},a=h[d],i={x:(u.x*Math.cos(a)+u.y*Math.sin(a))*Math.cos(a),y:(u.y*Math.sin(a)+u.x*Math.cos(a))*Math.sin(a)},e[d].x+=u.x,e[d].y+=u.y,e[(d+1)%4].x+=n.x,e[(d+1)%4].y+=n.y,e[(d+3)%4].x+=i.x,e[(d+3)%4].y+=i.y,this._selectionConstraint&&(e=this._selectionConstraint(t.mouse.mapgcs,t.state.origin.mapgcs,e,"vertex",h,d).corners),r.options("corners",e),!0;case"edge":return e=s.map((function(t){return{x:t.x,y:t.y}})),o=h[(d+1)%4],u={x:(u.x*Math.cos(o)+u.y*Math.sin(o))*Math.cos(o),y:(u.y*Math.sin(o)+u.x*Math.cos(o))*Math.sin(o)},e[d].x+=u.x,e[d].y+=u.y,e[(d+1)%4].x+=u.x,e[(d+1)%4].y+=u.y,this._selectionConstraint&&(e=this._selectionConstraint(t.mouse.mapgcs,t.state.origin.mapgcs,e,"edge",h,d).corners),r.options("corners",e),!0}return l.apply(r,arguments)}};r(w,x);var M={};M[f.capabilities.feature]=!0,u("rectangle",w,M);var A=function t(e,n){"use strict";if(e=i.extend({},e,{constraint:1}),!(this instanceof t))return new t(e,n);w.call(this,e,n||"square")};r(A,w);var T={};T[f.capabilities.feature]=!0,u("square",A,T);var C=function t(e,n){"use strict";if(!(this instanceof t))return new t(e,n);w.call(this,e,n||"ellipse");var r=this;this.features=function(){var t,e=r.options(),n=r.state();if(t=[],e.corners&&e.corners.length>=4){var o=r.styleForState(n),a=Math.pow(Math.pow(e.corners[0].x-e.corners[1].x,2)+Math.pow(e.corners[0].y-e.corners[1].y,2),.5),s=Math.pow(Math.pow(e.corners[0].x-e.corners[3].x,2)+Math.pow(e.corners[0].y-e.corners[3].y,2),.5),l=Math.max(a,s)/2/r.layer().map().unitsPerPixel(0),u=a?s/a:1e20,c=-Math.atan2(e.corners[1].y-e.corners[0].y,e.corners[1].x-e.corners[0].x);t=[{marker:{x:(e.corners[0].x+e.corners[1].x+e.corners[2].x+e.corners[3].x)/4,y:(e.corners[0].y+e.corners[1].y+e.corners[2].y+e.corners[3].y)/4,style:i.extend({},o,{radius:l,symbolValue:u,rotation:c,strokeOffset:0,radiusIncludesStroke:!1,scaleWithZoom:d.scaleMode.fill,rotateWithMap:!0,strokeOpacity:!1===o.stroke?0:o.strokeOpacity,fillOpacity:!1===o.fill?0:o.fillOpacity})}}]}return n===g.edit&&r._addEditHandles(t,e.corners),t}};r(C,w);var E={};E[d.capabilities.feature]=!0,u("ellipse",C,E);var S=function t(e,n){"use strict";if(e=i.extend({},e,{constraint:1}),!(this instanceof t))return new t(e,n);C.call(this,e,n||"circle")};r(S,C);var k={};k[d.capabilities.feature]=!0,u("circle",S,k);var P=function t(e){"use strict";if(!(this instanceof t))return new t(e);(e=i.extend(!0,{},{style:{fill:!0,fillColor:{r:0,g:1,b:0},fillOpacity:.25,polygon:function(t){return t.polygon},stroke:!0,strokeColor:{r:0,g:0,b:0},strokeOpacity:1,strokeWidth:3,uniformPolygon:!0},highlightStyle:{fillColor:{r:0,g:1,b:1},fillOpacity:.5,strokeWidth:5},createStyle:{closed:!1,fillColor:{r:.3,g:.3,b:.3},fillOpacity:.25,line:function(t){return Array.apply(null,Array(n.options("vertices").length)).map((function(){return t}))},position:function(t,e){return n.options("vertices")[e]},stroke:!1,strokeColor:{r:0,g:0,b:1}}},e||{})).vertices=e.vertices||e.coordinates||[],delete e.coordinates,x.call(this,"polygon",e);var n=this,r=this.actions;this.features=function(){var t,e=n.options(),i=n.state(),r=n.styleForState(i);if(i===g.create)t=[],e.vertices&&e.vertices.length>=3&&(t[1]={polygon:{polygon:e.vertices,style:r}}),e.vertices&&e.vertices.length>=2&&(t[2]={line:{line:e.vertices,style:r}});else t=[{polygon:{polygon:e.vertices,style:r}}],i===g.edit&&n._addEditHandles(t,e.vertices);return t},this._coordinates=function(t){return t&&n.options("vertices",t),n.options("vertices")},this.mouseMove=function(t){if(n.state()===g.create){var e=n.options("vertices");return e.length?(e[e.length-1]=t.mapgcs,!0):void 0}},this.mouseClick=function(t){var e=n.layer();if(n.state()===g.create&&e){var i,r=!!t.buttonsDown.right;if(t.buttonsDown.left||t.buttonsDown.right){var o=n.options("vertices");if(!t.buttonsDown.right||o.length)return t.handled=!0,t.buttonsDown.left&&(o.length?o.length>=2&&e.displayDistance(o[o.length-2],null,t.map,"display")<=e.options("adjacentPointProximity")?(i=!0,n._lastClick&&t.time-n._lastClick<e.options("dblClickTime")&&(r=!0)):o.length>=2&&e.displayDistance(o[0],null,t.map,"display")<=e.options("finalPointProximity")?r=!0:o[o.length-1]=t.mapgcs:o.push(t.mapgcs),r||i||o.push(t.mapgcs),n._lastClick=t.time,n._lastClickVertexCount=o.length),r?o.length<4?"remove":(o.pop(),n.state(g.done),"done"):!i}}},this.actions=function(t){return b(n,r,t,"polygon",arguments)},this.processAction=function(t){return _(n,t,"polygon")},this._geojsonCoordinates=function(t){var e=n.coordinates(t);if(e&&!(e.length<3)&&n.state()!==g.create){for(var i=[],r=0;r<e.length;r+=1)i.push([e[r].x,e[r].y]);return i.push([e[0].x,e[0].y]),[i]}},this._geojsonGeometryType=function(){return"Polygon"},this._geojsonStyles=function(){return["fill","fillColor","fillOpacity","lineCap","lineJoin","stroke","strokeColor","strokeOffset","strokeOpacity","strokeWidth"]}};r(P,x);var O={};O[f.capabilities.feature]=!0,O[c.capabilities.basic]=[g.create],u("polygon",P,O);var R=function t(e){"use strict";if(!(this instanceof t))return new t(e);(e=i.extend(!0,{},{style:{line:function(t){return Array.apply(null,Array(n.options("vertices").length)).map((function(){return t}))},position:function(t,e){return n.options("vertices")[e]},strokeColor:{r:0,g:0,b:0},strokeOpacity:1,strokeWidth:3,closed:!1,lineCap:"butt",lineJoin:"miter"},highlightStyle:{strokeWidth:5},createStyle:{line:function(t){return Array.apply(null,Array(n.options("vertices").length)).map((function(){return t}))},position:function(t,e){return n.options("vertices")[e]},strokeColor:{r:0,g:0,b:1},strokeOpacity:1,strokeWidth:3,closed:!1,lineCap:"butt",lineJoin:"miter"}},e||{})).vertices=e.vertices||e.coordinates||[],delete e.coordinates,x.call(this,"line",e);var n=this,r=this.actions,o=this.processEditAction;this.features=function(){var t,e=n.options(),i=n.state();if(i===g.create)t=[{line:{line:e.vertices,style:n.styleForState(i)}}];else t=[{line:{line:e.vertices,style:n.styleForState(i)}}],i===g.edit&&n._addEditHandles(t,e.vertices,void 0,!n.style("closed"));return t},this._coordinates=function(t){return t&&n.options("vertices",t),n.options("vertices")},this.mouseMove=function(t){if(n.state()===g.create){var e=n.options("vertices");return e.length?(e[e.length-1]=t.mapgcs,!0):void 0}},this.mouseClick=function(t){var e=n.layer();if(n.state()===g.create&&e){var i,r=!!t.buttonsDown.right;if(t.buttonsDown.left||t.buttonsDown.right){var o=n.options("vertices");if(!t.buttonsDown.right||o.length)return t.handled=!0,t.buttonsDown.left&&(o.length?o.length>=2&&e.displayDistance(o[o.length-2],null,t.map,"display")<=e.options("adjacentPointProximity")?(i=!0,n._lastClick&&t.time-n._lastClick<e.options("dblClickTime")&&(r=!0)):o.length>=2&&e.displayDistance(o[0],null,t.map,"display")<=e.options("finalPointProximity")?r="close":o[o.length-1]=t.mapgcs:o.push(t.mapgcs),r||i||o.push(t.mapgcs),n._lastClick=t.time,n._lastClickVertexCount=o.length),r?o.length<3?"remove":(o.pop(),n.options("style").closed="close"===r,n.state(g.done),"done"):!i}}},this.actions=function(t){return b(n,r,t,"line",arguments)},this.processAction=function(t){return _(n,t,"line")},this._geojsonCoordinates=function(t){var e=n.coordinates(t);if(e&&!(e.length<2)&&n.state()!==g.create){for(var i=[],r=0;r<e.length;r+=1)i.push([e[r].x,e[r].y]);return i}},this._geojsonGeometryType=function(){return"LineString"},this._geojsonStyles=function(){return["closed","lineCap","lineJoin","strokeColor","strokeOffset","strokeOpacity","strokeWidth"]},this.processEditAction=function(t){return"vertex"===n._editHandle.handle.type?n._processEditActionVertex(t,!0):o.apply(n,arguments)},this.mouseClickEdit=function(t){var e,i=n.layer(),r=n._editHandle;if(n.state()===g.edit&&i&&t.buttonsDown.left&&r&&r.handle.selected&&"edge"===r.handle.type&&n.options("style").closed&&(t.handled=!0,n._lastClick&&t.time-n._lastClick<i.options("dblClickTime")&&(e=!0),n._lastClick=t.time,e)){var o=r.handle.index,a=n._coordinates(),s=a.slice(o+1).concat(a.slice(0,o+1));return n._coordinates(s),n.options("style").closed=!1,r.handle.index=void 0,!0}}};r(R,x);var L={};L[c.capabilities.basic]=[g.create],u("line",R,L);var D=function t(e){"use strict";if(!(this instanceof t))return new t(e);(e=i.extend(!0,{},{style:{fill:!0,fillColor:{r:0,g:1,b:0},fillOpacity:.25,radius:10,scaled:!1,stroke:!0,strokeColor:{r:0,g:0,b:0},strokeOpacity:1,strokeWidth:3},createStyle:{fillColor:{r:.3,g:.3,b:.3},fillOpacity:.25,strokeColor:{r:0,g:0,b:1}},highlightStyle:{fillColor:{r:0,g:1,b:1},fillOpacity:.5,strokeWidth:5}},e||{})).position=e.position||(e.coordinates?e.coordinates[0]:void 0),delete e.coordinates,x.call(this,"point",e);var n=this;this.features=function(){var t,e,r,o=n.options(),a=n.state();if(a===g.create)t=[];else e=n.styleForState(a),(o.style.scaled||0===o.style.scaled)&&(!0===o.style.scaled&&(o.style.scaled=n.layer().map().zoom()),e=i.extend({},e,{radius:function(){var t=o.style.radius,e=n.layer().map().zoom();return l.isFunction(t)&&(t=t.apply(n,arguments)),t*=Math.pow(2,e-o.style.scaled),t}}),r=!0),t=[{point:{x:o.position.x,y:o.position.y,style:e,scaleOnZoom:r}}],a===g.edit&&n._addEditHandles(t,[o.position],{edge:!1,center:!1,resize:!1,rotate:!1});return t},this._coordinates=function(t){return t&&t.length>=1&&n.options("position",t[0]),n.state()===g.create?[]:[n.options("position")]},this._coordinateOption="position",this.mouseClick=function(t){if(n.state()===g.create&&t.buttonsDown.left)return t.handled=!0,n.options("position",t.mapgcs),n.state(g.done),"done"},this._geojsonStyles=function(){return["fill","fillColor","fillOpacity","radius","scaled","stroke","strokeColor","strokeOpacity","strokeWidth"]},this._geojsonCoordinates=function(t){var e=n.coordinates(t);if(e&&n.state()!==g.create&&!(e.length<1)&&void 0!==e[0])return[e[0].x,e[0].y]},this._geojsonGeometryType=function(){return"Point"}};r(D,x);var I={};function F(t){var e=Array.isArray(t)?t:[t];return function(t,n,i,r,o,a){var s,l=t;if(i||(i=[{x:n.x,y:n.y},{x:t.x,y:n.y},{x:t.x,y:t.y},{x:n.x,y:t.y}]),r){var u,c,d=(a+1)%4,h=(a+2)%4,f=(a+3)%4,p=Math.pow(Math.pow(i[a].x-i[d].x,2)+Math.pow(i[a].y-i[d].y,2),.5),m=Math.pow(Math.pow(i[a].x-i[f].x,2)+Math.pow(i[a].y-i[f].y,2),.5),g=Math.abs(p*m);e.forEach((function(t){1===t||a%2||(t=1/t);var e=Math.pow(g*t,.5),n=Math.pow(e-m,2)+Math.pow(e/t-p,2);(void 0===s||n<s)&&(s=n,u={w:e,h:e/t})}));var v=o[d],y={x:-u.w*Math.cos(v),y:-u.w*Math.sin(v)},x=o[a],b={x:-u.h*Math.cos(x),y:-u.h*Math.sin(x)};switch(r){case"vertex":i[a].x=i[h].x+y.x+b.x,i[a].y=i[h].y+y.y+b.y,i[d].x=i[h].x+y.x,i[d].y=i[h].y+y.y,i[f].x=i[h].x+b.x,i[f].y=i[h].y+b.y;break;case"edge":c={x:.5*(i[h].x+i[f].x),y:.5*(i[h].y+i[f].y)},i[h].x=c.x+b.x/2,i[h].y=c.y+b.y/2,i[a].x=c.x+y.x-b.x/2,i[a].y=c.y+y.y-b.y/2,i[d].x=c.x+y.x+b.x/2,i[d].y=c.y+y.y+b.y/2,i[f].x=c.x-b.x/2,i[f].y=c.y-b.y/2}}else{var _=Math.abs((t.x-n.x)*(t.y-n.y));e.forEach((function(e){var i=Math.pow(_*e,.5),r={x:n.x+Math.sign(t.x-n.x)*i,y:n.y+Math.sign(t.y-n.y)*i/e},o=Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2);(void 0===s||o<s)&&(s=o,l=r)})),i[0].y=i[1].y=n.y,i[0].x=i[3].x=n.x,i[1].x=i[2].x=l.x,i[2].y=i[3].y=l.y}return{corners:i,origin:n,pos:l}}}I[h.capabilities.feature]=!0,u("point",D,I),t.exports={state:g,actionOwner:v,annotation:x,lineAnnotation:R,pointAnnotation:D,polygonAnnotation:P,rectangleAnnotation:w,squareAnnotation:A,ellipseAnnotation:C,circleAnnotation:S,_editHandleFeatureLevel:3,defaultEditHandleStyle:y,constrainAspectRatio:F}},836:function(t,e,n){var i=n(5699),r=n(3715),o=n(7800),a=n(5108),s=n(4647),l=n(6853),u=n(5638),c=n(3345),d=n(9757),h=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this,e);var i,h,f,p,m=n(3870),g=n(6618),v=n(4634),y=this,x=this._init,b=this._exit,_=this.draw,w=this._update,M=g(),A=null,T=[],C=[],E={closed:{dataType:"boolean",keys:["closed","close"]},fill:{dataType:"boolean",keys:["fill"]},fillColor:{dataType:"color",keys:["fillColor","fill-color","marker-color","fill"]},fillOpacity:{dataType:"opacity",keys:["fillOpacity","fill-opacity"]},lineCap:{dataType:"text",keys:["lineCap","line-cap"]},lineJoin:{dataType:"text",keys:["lineJoin","line-join"]},radius:{dataType:"positive",keys:["radius"]},scaled:{dataType:"booleanOrNumber",keys:["scaled"]},stroke:{dataType:"boolean",keys:["stroke"]},strokeColor:{dataType:"color",keys:["strokeColor","stroke-color","stroke"]},strokeOffset:{dataType:"number",keys:["strokeOffset","stroke-offset"]},strokeOpacity:{dataType:"opacity",keys:["strokeOpacity","stroke-opacity"]},strokeWidth:{dataType:"positive",keys:["strokeWidth","stroke-width"]}},S={offset:"coordinate2",rotateWithMap:"boolean",rotation:"angle",scaleWithMap:"boolean",scale:"booleanOrNumber",shadowBlur:"numberOrBlank",shadowOffset:"coordinate2",strokeWidth:"numberOrBlank",visible:"boolean"};return d.usedStyles.forEach((function(t){E[t]={option:"labelStyle",dataType:S[t]||"text",keys:[t,"label"+t.charAt(0).toUpperCase()+t.slice(1),t.replace(/([A-Z])/g,"-$1").toLowerCase(),"label-"+t.replace(/([A-Z])/g,"-$1").toLowerCase()]}})),i=u.extend(!0,{},{dblClickTime:300,adjacentPointProximity:5,continuousPointProximity:5,continuousPointCollinearity:1*Math.PI/180,continuousCloseProximity:10,finalPointProximity:10,showLabels:!0,clickToEdit:!1},e),this._processAction=function(t){var e;if(t.state&&t.state.actionRecord&&t.state.actionRecord.owner===o.actionOwner&&y.currentAnnotation)if(y.mode()===y.modes.edit)e=y.currentAnnotation.processEditAction(t),y.currentAnnotation&&y.currentAnnotation._editHandle&&y.currentAnnotation._editHandle.handle&&(y.geoTrigger(a.annotation.edit_action,{annotation:y.currentAnnotation,handle:y.currentAnnotation._editHandle?y.currentAnnotation._editHandle.handle:void 0,action:t.event}),t.event===a.actionup&&y._selectEditHandle({data:y.currentAnnotation._editHandle.handle},y.currentAnnotation._editHandle.handle.selected));else e=y.currentAnnotation.processAction(t);y._updateFromEvent(e)},this._updateFromEvent=function(t){switch(t){case"remove":y.removeAnnotation(y.currentAnnotation,!1),y.mode(null);break;case"done":y.mode(null)}t&&(y.modified(),y.draw())},this._handleMouseMove=function(t){y.mode()&&y.currentAnnotation&&(y.currentAnnotation.mouseMove(t)&&(y.modified(),y.draw()))},this._selectEditHandle=function(t,e){if(t.data&&t.data.editHandle){if(u.each(C[o._editHandleFeatureLevel],(function(t,e){e.feature.modified()})),y.currentAnnotation.selectEditHandle(t.data,e),y.draw(),y.map().node().toggleClass("annotation-input",!!e),y.map().interactor().removeAction(void 0,void 0,o.actionOwner),e){var n=y.currentAnnotation.actions(o.state.edit);u.each(n,(function(t,e){y.map().interactor().addAction(e)}))}return y}},this._handleMouseOn=function(t){t.data&&t.data.annotation&&(y.mode()===y.modes.edit&&y.currentAnnotation?y._selectEditHandle(t,!0):y.mode()||y.currentAnnotation||!y.options("clickToEdit")||(t.data.annotation.state(o.state.highlight),y.modified(),y.draw()))},this._handleMouseOff=function(t){t.data&&t.data.annotation&&(y.mode()===y.modes.edit&&t.data.editHandle&&t.data.selected?y._selectEditHandle(t,!1):t.data.annotation.state()===o.state.highlight&&(t.data.annotation.state(o.state.done),y.modified(),y.draw()))},this._handleMouseClick=function(t){var e,n=!1;if(y.mode()===y.modes.edit){if(y.map().interactor().hasAction(void 0,void 0,o.actionOwner))return e=y.currentAnnotation.mouseClickEdit(t),void y._updateFromEvent(e);y.mode(null),y.draw(),u.each(C,(function(t,e){u.each(e,(function(t,e){e.feature._clearSelectedFeatures()}))})),n=!0}else if(y.mode()&&y.currentAnnotation)e=y.currentAnnotation.mouseClick(t),y._updateFromEvent(e),n=!y.mode();else if(!y.mode()&&!y.currentAnnotation&&y.options("clickToEdit")){var i=y.annotations().filter((function(t){return t.state()===o.state.highlight}));if(1!==i.length)return;y.mode(y.modes.edit,i[0]),y.draw(),n=!0}n&&y.map().interactor().retriggerMouseMove()},this.options=function(t,e){return void 0===t?i:"string"==typeof t&&void 0===e?i[t]:(void 0===e?i=u.extend(!0,i,t):i[t]=e,y.modified(),y)},this.displayDistance=function(t,e,n,i){var r=y.map();return"display"!==e&&(e=null===e?r.gcs():void 0===e?r.ingcs():e,t=r.gcsToDisplay(t,e)),"display"!==i&&(i=null===i?r.gcs():void 0===i?r.ingcs():i,n=r.gcsToDisplay(n,i)),Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))},this.addAnnotation=function(t,e,n){if(u.inArray(t,T)<0){y.geoTrigger(a.annotation.add_before,{annotation:t}),T.push(t),t.layer(y);var i=y.map();(e=null===e?i.gcs():void 0===e?i.ingcs():e)!==i.gcs()&&t._coordinates(l.transformCoordinates(e,i.gcs(),t._coordinates())),!1!==n&&(y.modified(),y.draw()),y.geoTrigger(a.annotation.add,{annotation:t})}return y},this.removeAnnotation=function(t,e){var n=u.inArray(t,T);return n>=0&&(t===y.currentAnnotation&&(y.currentAnnotation=null),t._exit(),T.splice(n,1),!1!==e&&(y.modified(),y.draw()),y.geoTrigger(a.annotation.remove,{annotation:t})),n>=0},this.removeAllAnnotations=function(t,e){for(var n,i=0,r=0;r<T.length;)n=T[r],t&&n.state()===o.state.create?r+=1:(y.removeAnnotation(n,!1),i+=1);return i&&!1!==e&&(y.modified(),y.draw()),i},this.annotations=function(){return T.slice()},this.annotationById=function(t){null!=t&&(t=+t);var e=T.filter((function(e){return e.id()===t}));if(e.length)return e[0]},this.modes={edit:"edit"},this.mode=function(t,e,n){if(void 0===t)return A;if(t!==A||t===y.modes.edit&&e!==y.editAnnotation){var i,r,l=y.map().node(),d=A;if(A=t,l.toggleClass("annotation-input",!(!A||A===y.modes.edit)),p||(p=c(l[0])),A?p.bind("esc",(function(){y.mode(null)})):p.unbind("esc"),y.currentAnnotation){switch(y.currentAnnotation.state()){case o.state.create:y.removeAnnotation(y.currentAnnotation);break;case o.state.edit:y.currentAnnotation.state(o.state.done),y.modified(),y.draw()}y.currentAnnotation=null}A===y.modes.edit?(y.currentAnnotation=e,y.currentAnnotation.state(o.state.edit),y.modified()):s.registries.annotations[A]&&(i=s.registries.annotations[A].func),y.map().interactor().removeAction(void 0,void 0,o.actionOwner),i&&(n=u.extend({},n||{},{state:o.state.create,layer:y}),y.currentAnnotation=i(n),y.addAnnotation(y.currentAnnotation,null),r=y.currentAnnotation.actions(o.state.create),u.each(r,(function(t,e){y.map().interactor().addAction(e)}))),y.geoTrigger(a.annotation.mode,{mode:A,oldMode:d}),d===y.modes.edit&&y.modified()}return y},this.geojson=function(t,e,n,i){if(void 0!==t){var r=s.createFileReader("geojsonReader",{layer:y});if(!r.canRead(t))return;return!0===e&&y.removeAllAnnotations(!0,!1),"update"===e&&u.each(y.annotations(),(function(t,e){e.options("updated",!1)})),r.read(t,(function(t){u.each(t.slice(),(function(t,e){y._geojsonFeatureToAnnotation(e,n),y.deleteFeature(e)}))})),"update"===e&&u.each(y.annotations(),(function(t,e){!1===e.options("updated")&&e.state()===o.state.done&&y.removeAnnotation(e,!1)})),y.modified(),y.draw(),T.length}t=null;var a=[];return u.each(T,(function(t,e){var r=e.geojson(n,i);r&&a.push(r)})),a.length&&(t={type:"FeatureCollection",features:a}),t},this._geojsonFeatureToAnnotation=function(t,e){var n=t.data(),i=s.listAnnotations(),r=y.map();e=null===e?r.gcs():void 0===e?r.ingcs():e,u.each(n,(function(n,c){var d,h,f,p,m=(c.properties||{}).annotationType||t.featureType,g=u.extend({},c.properties||{});if(!(u.inArray(m,i)<0)){switch(g.style=g.style||{},g.labelStyle=g.labelStyle||{},delete g.annotationType,t.featureType){case"line":if(!(d=t.line()(c,n))||d.length<2)return;d=d.slice();break;case"polygon":if(!(d=t.polygon()(c,n))||!d.outer||d.outer.length<3)return;if((d=d.outer.slice())[d.length-1][0]===d[0][0]&&d[d.length-1][1]===d[0][1]&&(d.splice(d.length-1,1),d.length<3))return;break;case"marker":d=c.geometry.coordinates[0].slice(0,4);break;case"point":d=[t.position()(c,n)]}for(f=0;f<d.length;f+=1)d[f]=v.normalizeCoordinates(d[f]);(h=c.crs&&"name"===c.crs.type&&c.crs.properties&&"proj4"===c.crs.properties.type&&c.crs.properties.name?c.crs.properties.name:e)!==r.gcs()&&(d=l.transformCoordinates(h,r.gcs(),d)),g.coordinates=d,u.each(E,(function(e,i){var r;u.each(i.keys,(function(t,e){void 0===r&&(r=y.validateAttribute(g[e],i.dataType))})),void 0===r&&(r=y.validateAttribute(t.style.get(e)(c,n),i.dataType)),void 0!==r&&(g[i.option||"style"][e]=r)})),u.each(E,(function(t,e){u.each(e.keys,(function(t,e){delete g[e]}))})),void 0!==g.annotationId&&(p=y.annotationById(g.annotationId))&&delete g.annotationId,p&&p.type()===m&&p.state()===o.state.done&&!1===p.options("updated")?(delete g.state,delete g.layer,g.updated=!0,p.options(g),y.geoTrigger(a.annotation.update,{annotation:p})):(g.state=o.state.done,g.layer=y,g.updated="new",y.addAnnotation(s.createAnnotation(m,g),null))}}))},this.validateAttribute=function(t,e){var n;if(null!=t){switch(e){case"angle":if(""===t)break;if(!(n=/^\s*([-.0-9eE]+)\s*(deg|rad|grad|turn)?\s*$/.exec((""+t).toLowerCase()))||!isFinite(n[1]))return;var i="grad"===n[2]?Math.PI/200:"deg"===n[2]?Math.PI/180:"turn"===n[2]?2*Math.PI:1;t=+n[1]*i;break;case"boolean":t=!!t&&["false","no","off"].indexOf((""+t).toLowerCase())<0;break;case"booleanOrNumber":if(!t&&0!==t&&""!==t||["true","false","off","on","no","yes"].indexOf((""+t).toLowerCase())>=0)t=!!t&&["false","no","off"].indexOf((""+t).toLowerCase())<0;else{if(!v.isNonNullFinite(t))return;t=+t}break;case"coordinate2":if(""===t)break;if(t&&v.isNonNullFinite(t.x)&&v.isNonNullFinite(t.y)){t.x=+t.x,t.y=+t.y;break}try{t=JSON.parse(t)}catch(t){}if(t&&v.isNonNullFinite(t.x)&&v.isNonNullFinite(t.y)){t.x=+t.x,t.y=+t.y;break}if(Array.isArray(t)&&v.isNonNullFinite(t[0])&&v.isNonNullFinite(t[1])){t={x:+t[0],y:+t[1]};break}if(!(n=/^\s*([-.0-9eE]+)(?:\s+|\s*,)\s*([-.0-9eE]+)\s*$/.exec(""+t))||!isFinite(n[1])||!isFinite(n[2]))return;t={x:+n[1],y:+n[2]};break;case"color":if(void 0===(t=v.convertColor(t))||void 0===t.r)return;break;case"number":if(!v.isNonNullFinite(t))return;t=+t;break;case"numberOrBlank":if(""===t)break;if(!v.isNonNullFinite(t))return;t=+t;break;case"opacity":if(""===t)return;if(t=+t,isNaN(t)||t<0||t>1)return;break;case"positive":if(t=+t,!isFinite(t)||t<=0)return;break;case"text":t=""+t}return t}},this._update=function(){if(y.timestamp()>M.timestamp()){var t=y.options("showLabels")?[]:null,e=y.options("clickToEdit")||y.mode()===y.modes.edit;u.each(C,(function(t,e){u.each(e,(function(t,e){e.data=[],delete e.feature.scaleOnZoom}))})),u.each(T,(function(n,i){var r=i.features();if(t){var o=i.labelRecord();o&&t.push(o)}u.each(r,(function(t,n){void 0===C[t]&&(C[t]={}),u.each(n,(function(n,r){if(C[t][n])(o=C[t][n].feature).selectionAPI()!==!!e&&(o.selectionAPI(e),e?(o.geoOn(a.feature.mouseon,y._handleMouseOn),o.geoOn(a.feature.mouseoff,y._handleMouseOff)):(o.geoOff(a.feature.mouseon,y._handleMouseOn),o.geoOff(a.feature.mouseoff,y._handleMouseOff)));else{var o=y.createFeature(n,{gcs:y.map().gcs(),selectionAPI:e});if(!o){var s="error_feature_"+n;return void(y[s]||(console.warn("Cannot create a "+n+" feature for annotations."),y[s]=!0))}e&&(o.geoOn(a.feature.mouseon,y._handleMouseOn),o.geoOn(a.feature.mouseoff,y._handleMouseOff));var l={};u.each(["closed","fill","fillColor","fillOpacity","line","lineCap","lineJoin","polygon","position","radius","radiusIncludesStroke","rotateWithMap","rotation","scaleWithZoom","stroke","strokeColor","strokeOffset","strokeOpacity","strokeWidth","symbolValue","uniformPolygon"],(function(t,e){var n;void 0!==o.style()[e]&&(n=o.style.get(e)),l[e]=function(t,i,r,o){var a=t&&t.style?t.style:t&&t[2]&&t[2].style?t[2].style:r.style,s=a?a[e]:t;return v.isFunction(s)&&(s=s(t,i,r,o)),void 0===s&&n&&(s=n(t,i,r,o)),s}})),o.style(l),C[t][n]={feature:o,style:l,data:[]}}var c=r.data||r;Array.isArray(c)||(c=[c]),c.forEach((function(e){e.annotation=i,C[t][n].data.push(e),r.scaleOnZoom&&(C[t][n].feature.scaleOnZoom=!0)}))}))}))})),u.each(C,(function(t,e){u.each(e,(function(t,e){e.feature.data(e.data)}))})),y._updateLabels(t),M.modified()}return w.call(y,arguments),y},this._updateLabels=function(t){if(!t||!t.length)return y._removeLabelFeature(),y;if(!h){if(!(s.registries.features[y.rendererName()]||{}).text){var e=s.rendererForFeatures(["text"]);f=s.createLayer("feature",y.map(),{renderer:e}),y.addChild(f),f._update(),y.geoTrigger(a.layerAdd,{target:y,layer:f})}var n={};d.usedStyles.forEach((function(t){n[t]=function(e,n){return e.style&&void 0!==e.style[t]?e.style[t]:(y.options("defaultLabelStyle")||{})[t]}})),h=(f||y).createFeature("text",{style:n,gcs:y.map().gcs(),position:function(t){return t.position}})}return h.data(t),y},this._handleZoom=function(){var t,e=y.features();for(t=0;t<e.length;t+=1)e[t].scaleOnZoom&&e[t].modified()},this._removeLabelFeature=function(){return f&&(f._exit(),y.removeChild(f),y.geoTrigger(a.layerRemove,{target:y,layer:f}),f=h=null),h&&(y.removeFeature(h),h=null),y},this.draw=function(){return y._update(),_.call(y),y},this._init=function(){return x.call(y),y.map().interactor()||y.map().interactor(m({actions:[]})),y.geoOn(a.actionselection,y._processAction),y.geoOn(a.actionmove,y._processAction),y.geoOn(a.actionup,y._processAction),y.geoOn(a.mouseclick,y._handleMouseClick),y.geoOn(a.mousemove,y._handleMouseMove),y.geoOn(a.zoom,y._handleZoom),y},this._exit=function(){return p&&p.reset(),y._removeLabelFeature(),b.call(y),T=[],C=[],y},y};i(h,r),s.registerLayer("annotation",h),t.exports=h},9986:function(t,e,n){var i=n(5699),r=n(3737),o=n(4634),a=n(8054),s=n(5365),l=n(5240),u=n(8608),c=function t(e){if(!(this instanceof t))return new t(e);var i=n(5108);return e=e||{},r.call(this,e),this._view=o.mat4AsArray(),this._proj=o.mat4AsArray(),this._projection=null,this._transform=o.mat4AsArray(),this._inverse=o.mat4AsArray(),this._bounds=null,this._display=null,this._world=null,this._viewport={width:1,height:1},this._createProj=function(){var t="perspective"===this._projection?l.frustum:l.ortho,e=this._clipbounds[this._projection];t(this._proj,e.left,e.right,e.bottom,e.top,e.near,e.far)},this._update=function(){this._bounds=null,this._display=null,this._world=null,this._transform=l.multiply(o.mat4AsArray(),this._proj,this._view),l.invert(this._inverse,this._transform),this.geoTrigger(i.camera.view,{camera:this})},Object.defineProperty(this,"view",{get:function(){return this._view},set:function(t){l.copy(this._view,t),this._update()},configurable:!0}),Object.defineProperty(this,"bounds",{get:function(){return null===this._bounds&&(this._bounds=this._getBounds()),this._bounds},set:function(t){this._setBounds(t),this._update()}}),Object.defineProperty(this,"clipbounds",{get:function(){return this._clipbounds[this._projection]},set:function(t){var e=this._clipbounds[this._projection];if((t={left:void 0===t.left?e.left:t.left,right:void 0===t.right?e.right:t.right,top:void 0===t.top?e.top:t.top,bottom:void 0===t.bottom?e.bottom:t.bottom,near:void 0===t.near?e.near:t.near,far:void 0===t.far?e.far:t.far}).left===t.right)throw new Error("Left and right values must be different");if(t.top===t.bottom)throw new Error("Top and bottom values must be different");if(t.near===t.far)throw new Error("Near and far values must be different");this._clipbounds[this._projection]=t,this._createProj(),this._update()}}),Object.defineProperty(this,"display",{get:function(){if(null===this._display){var t=this._clipbounds[this._projection],e=o.mat4AsArray();l.translate(e,e,[this.viewport.width/2,this.viewport.height/2,0]),l.scale(e,e,[this.viewport.width/(t.right-t.left),this.viewport.height/(t.bottom-t.top),1]),l.translate(e,e,[-(t.left+t.right)/2,-(t.top+t.bottom)/2,0]),l.multiply(e,e,this._transform),this._display=e}return this._display}}),Object.defineProperty(this,"world",{get:function(){return null===this._world&&(this._world=l.invert(o.mat4AsArray(),this.display)),this._world}}),Object.defineProperty(this,"projection",{get:function(){return this._projection},set:function(t){if(!this.constructor.projection[t])throw new Error("Unsupported projection type: "+t);t!==this._projection&&(this._projection=t,this._createProj(),this._update(),this.geoTrigger(i.camera.projection,{camera:this,projection:t}))}}),Object.defineProperty(this,"projectionMatrix",{get:function(){return this._proj}}),Object.defineProperty(this,"transform",{get:function(){return this._transform}}),Object.defineProperty(this,"inverse",{get:function(){return this._inverse}}),Object.defineProperty(this,"viewport",{get:function(){return{width:this._viewport.width,height:this._viewport.height,left:this._viewport.left,top:this._viewport.top}},set:function(t){if(!(t.width>0&&t.height>0))throw new Error("Invalid viewport dimensions");t.width===this._viewport.width&&t.height===this._viewport.height||(this._viewport.width&&this._viewport.height&&(this._scale([this._viewport.width/t.width,this._viewport.height/t.height,1]),this._translate([(t.width-this._viewport.width)/2,(t.height-this._viewport.height)/2,0])),this._viewport={width:t.width,height:t.height,left:t.left,top:t.top},this._update(),this.geoTrigger(i.camera.viewport,{camera:this,viewport:this.viewport}))}}),this._resetView=function(){return l.identity(this._view),this},this._translate=function(t){return l.translate(this._view,this._view,t),this},this._scale=function(t){return l.scale(this._view,this._view,t),this},this._worldToClip4=function(t){return u.transformMat4(t,t,this._transform)},this._clipToWorld4=function(t){return u.transformMat4(t,t,this._inverse)},this.applyProjection=function(t){var e;return"perspective"===this._projection?(e=1/(t[3]||1),t[0]=e*t[0],t[1]=e*t[1],t[2]=e*t[2],t[3]=e):t[3]=1,t},this.unapplyProjection=function(t){var e;return"perspective"===this._projection?(e=t[3]||1,t[0]=e*t[0],t[1]=e*t[1],t[2]=e*t[2],t[3]=e):t[3]=1,t},this.worldToDisplay4=function(t){return t=[t[0],t[1],t[2]||0,t[3]||1],(t=u.transformMat4(t,t,this.display))[3]&&1!==t[3]&&(t=[t[0]/t[3],t[1]/t[3],t[2]/t[3],1]),t},this.displayToWorld4=function(t){return t=[t[0],t[1],t[2]||0,t[3]||1],(t=u.transformMat4(t,t,this.world))[3]&&1!==t[3]&&(t=[t[0]/t[3],t[1]/t[3],t[2]/t[3],1]),t},this.worldToDisplay=function(t){var e=this._clipbounds[this._projection];return{x:(t=this.worldToDisplay4([t.x,t.y,-e.near]))[0],y:t[1]}},this.displayToWorld=function(t){return{x:(t=this.displayToWorld4([t.x,t.y,-1]))[0],y:t[1]}},this._getBounds=function(){var t,e,n,i,r={};return t=this.displayToWorld({x:0,y:0}),e=this.displayToWorld({x:this._viewport.width,y:0}),n=this.displayToWorld({x:0,y:this._viewport.height}),i=this.displayToWorld({x:this._viewport.width,y:this._viewport.height}),r.left=Math.min(t.x,e.x,n.x,i.x),r.bottom=Math.min(t.y,e.y,n.y,i.y),r.right=Math.max(t.x,e.x,n.x,i.x),r.top=Math.max(t.y,e.y,n.y,i.y),r},this._setBounds=function(t){var e={width:t.right-t.left,height:t.top-t.bottom},n={x:(t.left+t.right)/2,y:(t.bottom+t.top)/2};return this._viewFromCenterSizeRotation(n,e,0),this},this._viewFromCenterSizeRotation=function(t,e,n){var i,r,a,s=o.vec3AsArray(),l=o.vec3AsArray();return this._resetView(),(r=Math.abs(e.width))/(a=Math.abs(e.height))>=(i=this._viewport.width/this._viewport.height)?(a=r/i,l[0]=2/r,l[1]=2/a):(r=a*i,l[0]=2/r,l[1]=2/a),l[2]=1,this._scale(l),n&&this._rotate(n),s[0]=-t.x,s[1]=-t.y,s[2]=0,this._translate(s),this},this.viewFromCenterSizeRotation=function(t,e,n){return this._viewFromCenterSizeRotation(t,e,n),this._update(),this},this.pan=function(t){if(t.x||t.y||t.z)return this._translate([t.x,t.y,t.z||0]),this._update(),this},this.zoom=function(t){if(1!==t)return l.scale(this._view,this._view,[t,t,t]),this._update(),this},this._rotate=function(t,e,n){if(t){n=n||[0,0,-1],e?void 0!==e.x&&(e=[e.x||0,e.y||0,e.z||0]):e=[0,0,0];var i=[-e[0],-e[1],-e[2]];return l.translate(this._view,this._view,e),l.rotate(this._view,this._view,t,n),l.translate(this._view,this._view,i),this}},this.css=function(e){var n;switch((e||"").toLowerCase()){case"display":case"":n=this.display;break;case"world":n=this.world;break;default:throw new Error("Unknown transform "+e)}return t.css(n)},this.ppMatrix=function(t,e){var n=t;function i(t){var i=n[t],r=i.toExponential(e);return i>=0&&(r=" "+r),r}return e=e||2,[[i(0),i(4),i(8),i(12)].join(" "),[i(1),i(5),i(9),i(13)].join(" "),[i(2),i(6),i(10),i(14)].join(" "),[i(3),i(7),i(11),i(15)].join(" ")].join("\n")},this.toString=function(){return this.ppMatrix(this._transform)},this.debug=function(){return["bounds",JSON.stringify(this.bounds),"view:",this.ppMatrix(this._view),"projection:",this.ppMatrix(this._proj),"transform:",this.ppMatrix(this._transform)].join("\n")},this.valueOf=function(){return this._transform},this._clipbounds=this.constructor.clipbounds,this._resetView(),this.projection=e.projection||"parallel",e.viewport&&(this.viewport=e.viewport),this._update(),this};c.projection={perspective:!0,parallel:!0},c.clipbounds={perspective:{left:-1,right:1,top:1,bottom:-1,far:2e3,near:.01},parallel:{left:-1,right:1,top:1,bottom:-1,far:-1,near:1}},c.css=function(t){return"matrix3d("+t.map((function(t){return(t=(+t).toPrecision(15)).indexOf("e")>=0?t=(+t).toString():t.indexOf(".")>=0&&(t=t.replace(/(\.|)0+$/,"")),t})).join(",")+")"},c.vec3=s,c.mat3=a,c.vec4=u,c.mat4=l,i(c,r),t.exports=c},3086:function(t,e,n){var i,r=n(5699),o=n(4647).registerRenderer,a=n(3234),s=function t(e){"use strict";var i=n(5638);if(!(this instanceof t))return new t(e);e=e||{},a.call(this,e);var r=this,o=!0,s=this._init,l=this._exit;return this.clearCanvas=function(t){o=t},this.api=function(){return t.apiname},this._init=function(){if(r.initialized())return r;s.call(r);var t=e.canvas||i(document.createElement("canvas"));r.context2d=t[0].getContext("2d"),t.addClass("canvas-canvas"),i(r.layer().node().get(0)).append(t),r.canvas(t);var n=r.layer().map().size();return r._resize(0,0,n.width,n.height),r},this._resize=function(t,e,n,i){var o=r.canvas();return parseInt(o.attr("width"),10)===n&&parseInt(o.attr("height"),10)===i||(r._setWidthHeight(n,i),o.attr("width",n),o.attr("height",i),r._render()),r},this._render=function(){return r.layer().map().scheduleAnimationFrame(r._renderFrame),r},this._renderFrame=function(){var t,e=r.layer(),n=e.map(),i=n.size(),a=e.features?e.features():[];for(t=0;t<a.length;t+=1)if(a[t]._delayRender())return void r._render();for(o&&(r.context2d.setTransform(1,0,0,1,0,0),r.context2d.clearRect(0,0,i.width,i.height)),t=0;t<a.length;t+=1)a[t].visible()&&a[t]._renderOnCanvas(r.context2d,n)},this._exit=function(){r.canvas().remove(),l()},this};s.apiname="canvas",r(s,a),o("canvas",s),s.supported=function(){if(void 0===i){var t;try{t=document.createElement("canvas"),i=!(!t.getContext||!t.getContext("2d"))}catch(t){i=!1}t=void 0}return i},s.fallback=function(){return null},t.exports=s},1225:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(1111),a=n(6618),s=n(4634),l=function t(e){"use strict";if(!(this instanceof t))return new t(e);o.call(this,e),n(3160).call(this);var i,r,l,u,c,d,h=n(5108),f=this,p=this._init,m=this._update,g=a();return this._computeGradient=function(){var t,e,n,i,r;if(r=f.style("color"),!f._grad||f._gradColors!==r){for(e in i=(n=(t=document.createElement("canvas")).getContext("2d")).createLinearGradient(0,0,0,256),t.width=1,t.height=256,r)i.addColorStop(e,s.convertColorToRGBA(r[e]));n.fillStyle=i,n.fillRect(0,0,1,256),f._grad=n.getImageData(0,0,1,256).data,f._gradColors=r}return f},this._createCircle=function(){var t,e,n,i,r,o,a;if(n=f.style("radius"),r=f.style("blurRadius"),o=f.style("gaussian"),a=f.style("scaleWithZoom")){var s=this.layer().map().zoom();n*=a=Math.pow(2,s),r*=a}if(!f._circle||f._circle.gaussian!==o||f._circle.radius!==n||f._circle.blurRadius!==r){if(e=(t=f._circle=document.createElement("canvas")).getContext("2d"),i=r+n,t.width=t.height=2*i,o){var l=e.createRadialGradient(i,i,0,i,i,i);l.addColorStop(0,"rgba(255,255,255,1)"),l.addColorStop(.1,"rgba(255,255,255,0.946)"),l.addColorStop(.2,"rgba(255,255,255,0.801)"),l.addColorStop(.3,"rgba(255,255,255,0.607)"),l.addColorStop(.4,"rgba(255,255,255,0.411)"),l.addColorStop(.5,"rgba(255,255,255,0.249)"),l.addColorStop(.6,"rgba(255,255,255,0.135)"),l.addColorStop(.7,"rgba(255,255,255,0.066)"),l.addColorStop(.8,"rgba(255,255,255,0.029)"),l.addColorStop(.9,"rgba(255,255,255,0.011)"),l.addColorStop(1,"rgba(255,255,255,0)"),e.fillStyle=l,e.fillRect(0,0,2*i,2*i)}else e.shadowOffsetX=e.shadowOffsetY=2*i,e.shadowBlur=r,e.shadowColor="black",e.beginPath(),e.arc(-i,-i,n,0,2*Math.PI,!0),e.closePath(),e.fill();t.radius=n,t.blurRadius=r,t.gaussian=o,f._circle=t}return f},this._colorize=function(t,e){var n,o,a,s=new Uint32Array(e.buffer),u=t.length;for(i&&i.length===u||(i=new ArrayBuffer(u),r=new Uint8ClampedArray(i),l=new Uint32Array(i)),n=3,a=0;n<u;n+=4,a+=1)(o=t[n])&&(l[a]=s[o]);t.set(r)},this._renderPoints=function(t,e,n,i){var r,o,a,s=f.gcsPosition(),l=f.intensity(),u=f.minIntensity(),c=f.maxIntensity()-u||1;for(r=n.length-1;r>=0;r-=1)o=e.worldToDisplay(s[r]),(a=(l(n[r],r)-u)/c)<=0||(t.globalAlpha=a<.01?.01:a>1?1:a,t.drawImage(f._circle,o.x-i,o.y-i))},this._renderBinnedData=function(t,e,n,i,r){var o,a,s,l,u,c,d,h,p=f.gcsPosition(),m=f.intensity(),g=f.minIntensity(),v=f.maxIntensity()-g||1,y=e.size(),x=[],b=Math.ceil(i/r),_=Math.ceil(y.width/r)+2*b+2,w=Math.ceil(y.height/r)+2*b+2,M=n.length;for(o=0;o<M;o+=1)a=e.worldToDisplay(p[o]),isNaN(a.x)||isNaN(a.y)||(void 0===d&&(d=(a.x%r+r)%r,h=(a.y%r+r)%r),(l=Math.floor((a.x-d)/r)+b+1)<0||l>=_||(u=Math.floor((a.y-h)/r)+b+1)<0||u>=w||(s=(m(n[o],o)-g)/v)<=0||(s>1&&(s=1),x[u]=x[u]||[],l*=4,(c=x[u])[l]?(c[l]+=s,c[l+1]+=(1-c[l+1])*s,c[l+2]+=a.x*s,c[l+3]+=a.y*s):(c[l]=c[l+1]=s,c[l+2]=a.x*s,c[l+3]=a.y*s)));for(u=x.length-1;u>=0;u-=1)if(c=x[u])for(l=c.length-4;l>=0;l-=4)c[l]&&(s=c[l+1],t.globalAlpha=s<.01?.01:s>1?1:s,t.drawImage(f._circle,c[l+2]/c[l]-i,c[l+3]/c[l]-i))},this._renderOnCanvas=function(t,e){if(g.timestamp()<f.buildTime().timestamp()){var n,i,r=Date.now(),o=f.data()||[],a=f.style("radius")+f.style("blurRadius"),s=f.binned(),l=f.layer(),h=e.size();if(f.style("scaleWithZoom")&&(a*=Math.pow(2,e.zoom())),!0===s||"auto"===s)if(s=Math.max(Math.floor(a/8),Math.max(1.5,Math.min(3,a/2.5))),"auto"===f.binned())Math.ceil((h.width+2*a)/s)*Math.ceil((h.height+2*a)/s)>=o.length&&(s=0);(s<1||isNaN(s))&&(s=!1),f._binned=s,t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,h.width,h.height),c="",a>.5&&a<8192&&(e.scheduleAnimationFrame(f._setTransform,!1),l.canvas().css({transform:""}),f._createCircle(),f._computeGradient(),s?f._renderBinnedData(t,e,o,a,s):f._renderPoints(t,e,o,a),n=l.canvas()[0],i=t.getImageData(0,0,n.width,n.height),f._colorize(i.data,f._grad),t.putImageData(i,0,0)),u={zoom:e.zoom(),gcsOrigin:e.displayToGcs({x:0,y:0},null),rotation:e.rotation(),lastScale:void 0,lastOrigin:{x:0,y:0},lastRotation:void 0},g.modified(),l.renderer().clearCanvas(!1),d=Date.now()-r}return f},this._init=function(){return p.call(f,e),f.geoOn(h.pan,f._animatePan),f},this._update=function(){return m.call(f),(f.buildTime().timestamp()<=f.dataTime().timestamp()||f.updateTime().timestamp()<f.timestamp())&&f._build(),f.updateTime().modified(),f},this._setTransform=function(){f.layer()&&f.layer().canvas()&&f.layer().canvas()[0]&&(f.layer().canvas()[0].style.transform=c)},this._animatePan=function(){if(u){var t=f.layer().map(),e=t.zoom(),n=Math.pow(2,e-u.zoom),i=t.gcsToDisplay(u.gcsOrigin,null),r=t.rotation();if(u.lastScale!==n||u.lastOrigin.x!==i.x||u.lastOrigin.y!==i.y||u.lastRotation!==r){var o=" translate("+i.x+"px,"+i.y+"px) scale("+n+") rotate("+180*(r-u.rotation)/Math.PI+"deg)";if(t.scheduleAnimationFrame(f._setTransform),c=o,u.lastScale=n,u.lastOrigin.x=i.x,u.lastOrigin.y=i.y,u.lastRotation=r,u.timeout&&(window.clearTimeout(u.timeout),u.timeout=void 0),1!==parseFloat(n.toFixed(4))||0!==parseFloat((r-u.rotation).toFixed(4))||0!==parseFloat(i.x.toFixed(1))||0!==parseFloat(i.y.toFixed(1))){var a=f.updateDelay();a=a<0&&d?d-Math.floor(1e3/60*a):d?2*d:100,u.timeout=window.setTimeout((function(){u.timeout=void 0,f.buildTime().modified(),f.layer().draw()}),f.updateDelay())}}}},f._init(e),this};i(l,o),r("canvas","heatmap",l),t.exports=l},7562:function(t,e,n){t.exports={canvasRenderer:n(3086),heatmapFeature:n(1225),isolineFeature:n(6025),lineFeature:n(7822),pixelmapFeature:n(1471),quadFeature:n(9895),textFeature:n(8124),tileLayer:n(5993),trackFeature:n(1546)}},6025:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(2367),a=function t(e){"use strict";return this instanceof t?(e=e||{},o.call(this,e),n(3160).call(this),this._init(e),this):new t(e)};i(a,o),r("canvas","isoline",a),t.exports=a},7822:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(4708),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(3160);e=e||{},o.call(this,e),i.call(this);var r=this;return this._renderOnCanvas=function(t,e){var n,i,o,a,s,l=r.data(),u=r.position(),c=r.line(),d=r.style.get("strokeWidth"),h=r.style.get("strokeColor"),f=r.style.get("strokeOpacity"),p=r.style.get("lineCap"),m=r.style.get("lineJoin"),g=r.style.get("miterLimit")(l),v=r.style.get("closed"),y={},x={};l.forEach((function(e,l){if(!((i=c(e,l)).length<2)){for(x.closed=v(e,l),x.width=d(i[0],0,e,l),x.color=h(i[0],0,e,l),x.opacity=f(i[0],0,e,l),x.linecap=p(i[0],0,e,l),x.linejoin=m(i[0],0,e,l),x.strokeStyle="rgba("+255*x.color.g+", "+255*x.color.g+", "+255*x.color.b+", "+(void 0!==x.opacity?x.opacity:1)+")",y.strokeStyle===x.strokeStyle&&y.width===x.width&&y.linecap===x.linecap&&y.linejoin===x.linejoin&&y.miterlimit===x.miterlimit||(void 0!==y.strokeStyle&&t.stroke(),t.beginPath(),t.strokeStyle=x.strokeStyle,t.lineWidth=x.width,t.lineCap=x.linecap,t.lineJoin=x.linejoin,t.miterLimit=g),s=0;s<i.length;s+=1)o=r.featureGcsToDisplay(u(i[s],s,e,l)),s?t.lineTo(o.x,o.y):(a=o,t.moveTo(o.x,o.y));x.closed&&t.lineTo(a.x,a.y),n=y,y=x,x=n}})),void 0!==y.strokeStyle&&t.stroke()},this._init(e),this};i(a,o);var s={};s[o.capabilities.basic]=!0,s[o.capabilities.multicolor]=!1,r("canvas","line",a,s),t.exports=a},3160:function(t,e,n){t.exports=function t(e){"use strict";if(!(this instanceof n(3737)))return new t(e);var i=this,r=this.draw,o={};return this._renderOnCanvas=function(){},this._delayRender=function(){return!1},this._canvasProperty=function(t,e,n){return t&&e?(o[e]!==n&&(o[e]=n,t[e]=n),i):(o={},i)},this.draw=function(){return i.ready&&(i._update(),i.renderer()._render(),r()),i},this}},1471:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(6374),a=n(5108),s=n(4634),l=function t(e){"use strict";if(!(this instanceof t))return new t(e);o.call(this,e),n(3160).call(this);var i,r=this._exit,l=this;return this.pointSearch=function(t,e){if(i&&l.m_info){var n=i.pointSearch(t,e);if(1===n.index.length&&n.extra&&n.extra[n.index[0]].basis){var r,o,a,s=n.extra[n.index[0]].basis;if(r=Math.floor(s.x*l.m_info.width),o=Math.floor(s.y*l.m_info.height),r>=0&&r<l.m_info.width&&o>=0&&o<l.m_info.height)return n={index:[a=l.m_info.indices[o*l.m_info.width+r]],found:[l.data()[a]]}}}return{index:[],found:[]}},this._preparePixelmap=function(){var t,e,n;if(s.isReadyImage(l.m_srcImage)){for(l.m_info={width:l.m_srcImage.naturalWidth,height:l.m_srcImage.naturalHeight,canvas:document.createElement("canvas")},l.m_info.canvas.width=l.m_info.width,l.m_info.canvas.height=l.m_info.height,l.m_info.context=l.m_info.canvas.getContext("2d"),l.m_info.context.drawImage(l.m_srcImage,0,0),l.m_info.imageData=l.m_info.context.getImageData(0,0,l.m_info.canvas.width,l.m_info.canvas.height),n=l.m_info.imageData.data,l.m_info.indices=new Array(n.length/4),l.m_info.area=n.length/4,l.m_info.mappedColors={},t=0;t<n.length;t+=4)e=n[t]+(n[t+1]<<8)+(n[t+2]<<16),l.m_info.indices[t/4]=e,l.m_info.mappedColors[e]||(l.m_info.mappedColors[e]={first:t/4}),l.m_info.mappedColors[e].last=t/4;return l.m_info}},this._computePixelmap=function(){var t,e,n,r,o,s,u,c,d,h,f=l.data()||[],p=l.style.get("color"),m=-1;if(!l.m_info){if(l.indexModified(void 0,"clear"),!l._preparePixelmap())return;h=!0}for(e in l.indexModified(void 0,"clear"),u=l.m_info.mappedColors,c=l.m_info.area,u)u.hasOwnProperty(e)&&(r=[255*((r=p(f[e],+e)||{}).r||0),255*(r.g||0),255*(r.b||0),void 0===r.a?255:255*r.a],u[e].update=!u[e].color||u[e].color[0]!==r[0]||u[e].color[1]!==r[1]||u[e].color[2]!==r[2]||u[e].color[3]!==r[3],u[e].update&&(u[e].color=r,c=Math.min(u[e].first,c),m=Math.max(u[e].last,m)));if(!(c>=m)){for(o=l.m_info.imageData.data,s=l.m_info.indices,t=c;t<=m;t+=1)(e=s[t])!==n&&(n=e,r=u[e].color,d=u[e].update),d&&(o[4*t]=r[0],o[4*t+1]=r[1],o[4*t+2]=r[2],o[4*t+3]=r[3]);l.m_info.context.putImageData(l.m_info.imageData,0,0,0,Math.floor(c/l.m_info.width),l.m_info.width,Math.ceil((m+1)/l.m_info.width)),i||(i=l.layer().createFeature("quad",{selectionAPI:!1,gcs:l.gcs(),visible:l.visible(void 0,!0)}),l.dependentFeatures([i]),i.style({image:l.m_info.canvas,position:l.style.get("position")}).data([{}]).draw()),h&&l.geoTrigger(a.pixelmap.prepared,{pixelmap:l})}},this._exit=function(){return i&&l.layer()&&(l.layer().deleteFeature(i),i=null,l.dependentFeatures([])),r(),l},this._init(e),this};i(l,o),r("canvas","pixelmap",l),t.exports=l},9895:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(5017),a=n(4634),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);o.call(this,e),n(3160).call(this);var i,r=n(5638),s=this,l=this._exit,u=this._init,c=this._update;return this._build=function(){s.position()&&((i=s._generateQuads()).imgQuads&&i.imgQuads.sort((function(t,e){return t.pos[2]-e.pos[2]})),s.buildTime().modified())},this._checkQuadUpdate=function(t,e){s.layer().map().scheduleAnimationFrame(s._checkIfChanged)},this._checkIfChanged=function(){if(i&&i.vidQuads&&i.vidQuads.length){var t=!1,e=!1;r.each(i.vidQuads,(function(n,i){i.video&&void 0!==i.video.HAVE_CURRENT_DATA&&(!i.video.seeking&&i.video.readyState>=i.video.HAVE_CURRENT_DATA&&(t=!0),i.video.paused&&!i.video.seeking||(e=!0))})),t&&s.renderer()&&s.renderer()._render(),e&&s.layer().map().scheduleAnimationFrame(s._checkIfChanged)}},this._renderColorQuads=function(t,e){if(i.clrQuads&&i.clrQuads.length){var n=t.globalAlpha,o=n;r.each(i.clrQuads,(function(n,i){var r=e.gcsToDisplay({x:i.pos[0],y:i.pos[1]},null),s=e.gcsToDisplay({x:i.pos[3],y:i.pos[4]},null),l=e.gcsToDisplay({x:i.pos[6],y:i.pos[7]},null),u=e.gcsToDisplay({x:i.pos[9],y:i.pos[10]},null);i.opacity!==o&&(o=i.opacity,t.globalAlpha=o),t.fillStyle=a.convertColorToHex(i.color,!0),t.beginPath(),t.moveTo(r.x,r.y),t.lineTo(s.x,s.y),t.lineTo(u.x,u.y),t.lineTo(l.x,l.y),t.closePath(),t.fill()})),o!==n&&(t.globalAlpha=n)}},this._renderImageAndVideoQuads=function(t,e){if(i.imgQuads&&i.imgQuads.length||i.vidQuads&&i.vidQuads.length){var n=t.globalAlpha,o=n;r.each([i.imgQuads,i.vidQuads],(function(n,i){i&&r.each(i,(function(n,i){var r,a,s;if(i.image)a=(r=i.image).width,s=r.height;else if(i.video&&(a=(r=i.video).videoWidth,s=r.videoHeight,r.seeking))return;if(r&&a&&s&&!(i.opacity<=0)){var l=e.gcsToDisplay({x:i.pos[0],y:i.pos[1]},null),u=e.gcsToDisplay({x:i.pos[6],y:i.pos[7]},null),c=e.gcsToDisplay({x:i.pos[9],y:i.pos[10]},null);if(t.setTransform((c.x-u.x)/a,(c.y-u.y)/a,(l.x-u.x)/s,(l.y-u.y)/s,u.x,u.y),i.opacity!==o&&(o=i.opacity,t.globalAlpha=o),i.crop){var d=Math.min(a,i.crop.x||a),h=Math.min(s,i.crop.y||s),f=Math.max(0,i.crop.left||0),p=Math.max(0,i.crop.top||0),m=Math.min(a,i.crop.right||a),g=Math.min(s,i.crop.bottom||s);a&&s&&d>0&&h>0&&m>f&&g>p&&t.drawImage(r,f,p,Math.floor((m-f)*d/a),Math.floor((g-p)*h/s),0,0,d,h)}else t.drawImage(r,0,0)}}))})),o!==n&&(t.globalAlpha=n),t.setTransform(1,0,0,1,0,0)}},this._delayRender=function(){var t=!1;return i&&i.vidQuads&&i.vidQuads.length&&r.each(i.vidQuads,(function(e,n){n.video&&void 0!==n.video.HAVE_CURRENT_DATA&&(t|=n.video.seeking&&n.delayRenderWhenSeeking)})),t},this._renderOnCanvas=function(t,e){i&&(s._renderImageAndVideoQuads(t,e),s._renderColorQuads(t,e))},this._update=function(){c.call(s),(s.buildTime().timestamp()<=s.dataTime().timestamp()||s.updateTime().timestamp()<s.timestamp())&&s._build(),s.updateTime().modified(),s.layer().map().scheduleAnimationFrame(s._checkIfChanged)},this._init=function(){u.call(s,e)},this._exit=function(){l.call(s)},s._init(e),this};i(s,o);var l={};l[o.capabilities.color]=!0,l[o.capabilities.image]=!0,l[o.capabilities.imageCrop]=!0,l[o.capabilities.imageFixedScale]=!0,l[o.capabilities.imageFull]=!1,l[o.capabilities.canvas]=!0,l[o.capabilities.video]=!0,r("canvas","quad",s,l),t.exports=s},8124:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(9757),a=n(4634),s=n(8054),l=n(5365),u=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(3160);e=e||{},o.call(this,e),i.call(this);var r=this,u="bold 16px sans-serif",c=new RegExp('^\\s*(?=(?:(?:[-a-z0-9]+\\s+){0,3}(italic|oblique))?)(?=(?:(?:[-a-z0-9]+\\s+){0,3}(small-caps))?)(?=(?:(?:[-a-z0-9]+\\s+){0,3}(bold(?:er)?|lighter|[1-9]00))?)(?=(?:(?:[-a-z0-9]+\\s+){0,3}((?:ultra-|extra-|semi-)?(?:condensed|expanded)))?)(?:(?:normal|\\1|\\2|\\3|\\4)\\s+){0,4}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))(?:/(normal|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])))?\\s+([-,\\"\\sa-z]+?)\\s*$',"i");return this.getFontFromStyles=function(t,e,n){var i=r.style.get("font")(e,n)||u;if(t){var o=c.exec(i);null===o&&(o=c.exec(u)),o[1]=r.style.get("fontStyle")(e,n)||o[1],o[2]=r.style.get("fontVariant")(e,n)||o[2],o[3]=r.style.get("fontWeight")(e,n)||o[3],o[4]=r.style.get("fontStretch")(e,n)||o[4],o[5]=r.style.get("fontSize")(e,n)||o[5]||"16px",o[6]=r.style.get("lineHeight")(e,n)||o[6],o[7]=r.style.get("fontFamily")(e,n)||o[7]||"sans-serif",i=(i=(o[1]||"")+" "+(o[2]||"")+" "+(o[3]||"")+" "+(o[4]||"")+" "+(o[5]||"")+(o[6]?"/"+o[6]:"")+" "+o[7]).trim().replace(/\s\s+/g," ")}return i},this._renderOnCanvas=function(t,e){var n,i,o,u,c,d,h,f,p,m,g,v,y,x,b=r.data(),_=r.style.get("position"),w=r.style.get("renderThreshold")(b),M=r.style.get("text"),A=e.rotation(),T=e.zoom(),C=e.size(),E=a.mat3AsArray();n=["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","lineHeight","fontFamily"].some((function(t){return null!==r.style(t)&&void 0!==r.style(t)})),r._canvasProperty(),o=r.featureGcsToDisplay(b.map(_)),b.forEach((function(e,b){u=o[b],w>0&&(u.x<-w||u.x>C.width+w||u.y<-w||u.y>C.height+w)||((c=r.style.get("visible")(e,b))||void 0===c)&&(d=a.convertColorAndOpacity(r.style.get("color")(e,b),r.style.get("textOpacity")(e,b)),f=a.convertColorAndOpacity(r.style.get("textStrokeColor")(e,b),r.style.get("textOpacity")(e,b),{r:0,g:0,b:0,a:0}),0===d.a&&0===f.a||(r._canvasProperty(t,"fillStyle",a.convertColorToRGBA(d)),i=M(e,b),r._canvasProperty(t,"font",r.getFontFromStyles(n,e,b)),r._canvasProperty(t,"textAlign",r.style.get("textAlign")(e,b)||"center"),r._canvasProperty(t,"textBaseline",r.style.get("textBaseline")(e,b)||"middle"),m=r.style.get("rotation")(e,b)||0,g=r.style.get("rotateWithMap")(e,b)&&A,v=r.style.get("textScaled")(e,b),v=a.isNonNullFinite(v)?Math.pow(2,T-v):null,y=r.style.get("offset")(e,b),x=a.mat3AsArray(),(m||g||v&&1!==v||y&&(y.x||y.y))&&(s.translate(x,x,[u.x,u.y]),g&&A&&s.rotate(x,x,A),s.translate(x,x,[y&&y.x?+y.x:0,y&&y.y?+y.y:0]),m&&s.rotate(x,x,m),v&&1!==v&&s.scale(x,x,[v,v]),s.translate(x,x,[-u.x,-u.y])),E[0]===x[0]&&E[1]===x[1]&&E[3]===x[3]&&E[4]===x[4]&&E[6]===x[6]&&E[7]===x[7]||(t.setTransform(x[0],x[1],x[3],x[4],x[6],x[7]),s.copy(E,x)),(d=a.convertColorAndOpacity(r.style.get("shadowColor")(e,b),void 0,{r:0,g:0,b:0,a:0})).a&&(y=r.style.get("shadowOffset")(e,b),h=r.style.get("shadowBlur")(e,b)),d.a&&(y&&(y.x||y.y)||h)?(r._canvasProperty(t,"shadowColor",a.convertColorToRGBA(d)),y&&(m||g)&&r.style.get("shadowRotate")(e,b)&&(x=[+y.x,+y.y,0],l.rotateZ(x,x,[0,0,0],m+(g?A:0)),y={x:x[0],y:x[1]}),r._canvasProperty(t,"shadowOffsetX",y&&y.x?+y.x:0),r._canvasProperty(t,"shadowOffsetY",y&&y.y?+y.y:0),r._canvasProperty(t,"shadowBlur",h||0)):r._canvasProperty(t,"shadowColor","rgba(0,0,0,0)"),f.a&&(p=r.style.get("textStrokeWidth")(e,b),isFinite(p)&&p>0&&(r._canvasProperty(t,"strokeStyle",a.convertColorToRGBA(f)),r._canvasProperty(t,"lineWidth",p),t.strokeText(i,u.x,u.y),r._canvasProperty(t,"shadowColor","rgba(0,0,0,0)"))),t.fillText(i,u.x,u.y)))})),r._canvasProperty(t,"globalAlpha",1),t.setTransform(1,0,0,1,0,0)},this};i(u,o);r("canvas","text",u,{}),t.exports=u},5993:function(t,e,n){var i=function(){"use strict";var t,e=this,n=this._init,i=this._exit,r=this._update,o=0,a=[];this._drawTile=function(n){if(t){var i=e._tileBounds(n),r=n.index.level||0,s=e._tileOffset(r),l=e.tileCropFromBounds(n),u={};l&&(u.crop=l),u.ul=e.fromLocal(e.fromLevel({x:i.left-s.x,y:i.top-s.y},r),0),u.ll=e.fromLocal(e.fromLevel({x:i.left-s.x,y:i.bottom-s.y},r),0),u.ur=e.fromLocal(e.fromLevel({x:i.right-s.x,y:i.top-s.y},r),0),u.lr=e.fromLocal(e.fromLevel({x:i.right-s.x,y:i.bottom-s.y},r),0),u.ul.z=u.ll.z=u.ur.z=u.lr.z=r,o+=1,u.id=o,n.quadId=u.id,u.image=n.image,a.push(u),t.data(a),t._update(),e.draw()}},this._remove=function(n){if(void 0!==n.quadId&&t){for(var i=0;i<a.length;i+=1)if(a[i].id===n.quadId){a.splice(i,1);break}t.data(a),t._update(),e.draw()}},this._update=function(n){return r.call(e,n),e._addBaseQuadToTiles(t,a),e},this._exit=function(){e.deleteFeature(t),t=null,a=[],i.apply(e,arguments)},this._init=function(){n.apply(e,arguments),(t=e.createFeature("quad",{previewColor:e._options.previewColor,previewImage:e._options.previewImage})).geoTrigger=void 0,t.gcs(e._options.gcs||e.map().gcs()),t.data(a),t._update()},this._getSubLayer=function(){},this._updateSubLayers=void 0};(0,n(4647).registerLayerAdjustment)("canvas","tile",i),t.exports=i},1546:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(6223),a=function t(e){"use strict";return this instanceof t?(e=e||{},o.call(this,e),n(3160).call(this),this._init(e),this):new t(e)};i(a,o),r("canvas","track",a),t.exports=a},8719:function(t,e,n){var i=n(5699),r=n(6837),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},r.call(this,e);var i=n(5638),o=n(4634).ensureFunction;delete e.layer,delete e.renderer;var a=n(2531).d3,s=this,l=this._init,u=i.extend({},{colorRange:[{r:.07514311,g:.468049805,b:1},{r:.468487184,g:.588057293,b:1},{r:.656658579,g:.707001303,b:1},{r:.821573924,g:.837809045,b:1},{r:.943467973,g:.943498599,b:.943398095},{r:1,g:.788626485,b:.750707739},{r:1,g:.6289553,b:.568237474},{r:1,g:.472800903,b:.404551679},{r:.916482116,g:.236630659,b:.209939162}],scale:a.scale.quantize(),geoId:function(t){return t.properties.GEO_ID},scalarId:function(t){return t.id},scalarValue:function(t){return t.value}},e);return this.featureType="choropleth",this.scalar=function(t,e){var n,i;return void 0===t?s.choropleth.get("scalar")()||[]:(n=s.choropleth.get("scalarId"),i=s.choropleth.get("scalarValue"),u.scalar=t,u.scalarAggregator=e||a.mean,u.scalar._dictionary=t.reduce((function(t,e){var r,o;return r=n(e),o=i(e),t[r]=t[r]?t[r].push(o):[o],t}),{}),s.dataTime().modified(),s)},this.choropleth=function(t,e){var n;return void 0===t?u:"string"==typeof t&&void 0===e?u[t]:(void 0===e?(n=i.extend({},u,t),u=n):u[t]=e,s.modified(),s)},this.choropleth.get=function(t){var e,n={};if(void 0===t){for(e in u)u.hasOwnProperty(e)&&(n[e]=s.choropleth.get(e));return n}return o(u[t])},this._featureToPolygons=function(t,e){var n=s.layer().createFeature("polygon",{});return"Polygon"===t.geometry.type?n.data([{type:"Polygon",coordinates:t.geometry.coordinates}]):"MultiPolygon"===t.geometry.type&&n.data(t.geometry.coordinates.map((function(t){return{type:"Polygon",coordinates:t}}))),n.polygon((function(t){return{outer:t.coordinates[0],inner:t.coordinates[1]}})).position((function(t){return{x:t[0],y:t[1]}})).style({fillColor:e}),n},this._generateScale=function(t){var e=a.extent(s.scalar(),t||void 0);return s.choropleth().scale.domain(e).range(s.choropleth().colorRange),s},this.createChoropleth=function(){var t=s.choropleth,e=s.data(),n=s.scalar(),i=t.get("scalarValue"),r=t.get("geoId");return s._generateScale(i),e.map((function(e){var i=r(e),o=n._dictionary[i],a=t().scalarAggregator(o),l=s.choropleth().scale(a);return s._featureToPolygons(e,l)}))},this._init=function(t){return l.call(s,t),u&&s.dataTime().modified(),s},this._init(e),this};i(o,r),t.exports=o},9005:function(t,e,n){var i=n(5699),r=n(9146),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638),o=n(4634),a=n(9244);e=e||{},r.call(this,e);var s=this,l=this._init;return this._createContours=function(){return a.createColoredMesh(s,!1)},this.contour=s.mesh,this._init=function(t){l.call(s,t);var e=i.extend({},{opacity:1,value:function(t,e){return o.isNonNullFinite(t)?t:s.position()(t,e).z},position:function(t){return t||{x:0,y:0}},origin:function(t){return t.length>=3?[t[0],t[1],0]:[0,0,0]}},void 0===t.style?{}:t.style);s.style(e),s.contour(i.extend({},{minColor:"black",minOpacity:0,maxColor:"black",maxOpacity:0,colorRange:[{r:.07514311,g:.468049805,b:1},{r:.468487184,g:.588057293,b:1},{r:.656658579,g:.707001303,b:1},{r:.821573924,g:.837809045,b:1},{r:.943467973,g:.943498599,b:.943398095},{r:1,g:.788626485,b:.750707739},{r:1,g:.6289553,b:.568237474},{r:1,g:.472800903,b:.404551679},{r:.916482116,g:.236630659,b:.209939162}]},t.mesh||{},t.contour||{})),(t.mesh||t.contour)&&s.dataTime().modified()},this._init(e),this};i(o,r),t.exports=o},2805:function(t,e,n){var i=n(5699),r=n(3234),o=n(4647).registerRenderer,a=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this,e),e=e||{};var n=this;return this.api=function(){return"dom"},this._init=function(t){var e=n.layer().node();return!n.canvas()&&e&&e.length&&n.canvas(e[0]),n},this._init(e),this};i(a,r),o("dom",a),t.exports=a},5108:function(t){var e={layerAdd:"geo_layerAdd",layerRemove:"geo_layerRemove",layerMove:"geo_layerMove",zoom:"geo_zoom",rotate:"geo_rotate",pan:"geo_pan",resize:"geo_resize",draw:"geo_draw",drawEnd:"geo_drawEnd",unhidden:"geo_unhidden",hidden:"geo_hidden",mousemove:"geo_mousemove",mouseclick:"geo_mouseclick",brush:"geo_brush",brushend:"geo_brushend",brushstart:"geo_brushstart",select:"geo_select",zoomselect:"geo_zoomselect",unzoomselect:"geo_unzoomselect",actiondown:"geo_actiondown",actionmove:"geo_actionmove",actionup:"geo_actionup",actionselection:"geo_actionselection",actionwheel:"geo_actionwheel",keyaction:"geo_keyaction",transitionstart:"geo_transitionstart",transitionend:"geo_transitionend",transitioncancel:"geo_transitioncancel",parallelprojection:"geo_parallelprojection",feature:{mousemove:"geo_feature_mousemove",mouseover:"geo_feature_mouseover",mouseover_order:"geo_feature_mouseover_order",mouseout:"geo_feature_mouseout",mouseon:"geo_feature_mouseon",mouseoff:"geo_feature_mouseoff",mouseclick:"geo_feature_mouseclick",mouseclick_order:"geo_feature_mouseclick_order",brushend:"geo_feature_brushend",brush:"geo_feature_brush"},pixelmap:{prepared:"geo_pixelmap_prepared"},screenshot:{ready:"geo_screenshot_ready"},camera:{}};e.camera.view="geo_camera_view",e.camera.projection="geo_camera_projection",e.camera.viewport="geo_camera_viewport",e.annotation={},e.annotation.add="geo_annotation_add",e.annotation.add_before="geo_annotation_add_before",e.annotation.update="geo_annotation_update",e.annotation.coordinates="geo_annotation_coordinates",e.annotation.select_edit_handle="geo_annotation_select_edit_handle",e.annotation.edit_action="geo_annotation_edit_action",e.annotation.remove="geo_annotation_remove",e.annotation.state="geo_annotation_state",e.annotation.mode="geo_annotation_mode",t.exports=e},6837:function(t,e,n){function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}var r=n(5638),o=n(5699),a=n(5358),s=n(6618),l=n(6853),u=n(5108),c=function t(e){"use strict";if(!(this instanceof t))return new t(e);a.call(this);var i=n(4634);e=e||{};var o,c=this,d=this._exit,h=this.geoOn,f=this.geoOff,p=void 0===e.selectionAPI?"auto":e.selectionAPI,m={},g=void 0===e.layer?null:e.layer,v=e.gcs,y=void 0===e.visible||e.visible,x=void 0===e.bin?null:e.bin,b=void 0===e.renderer||g&&e.renderer===g.renderer()?null:e.renderer,_=s(),w=s(),M=s(),A=[],T=[];return this._subfeatureStyles={},Object.defineProperty(this,"ready",{get:function(){return o}}),this._bindMouseHandlers=function(){c.selectionAPI()&&(c._unbindMouseHandlers(),c.geoOn(u.mousemove,c._handleMousemove),c.geoOn(u.mouseclick,c._handleMouseclick),c.geoOn(u.brushend,c._handleBrushend),c.geoOn(u.brush,c._handleBrush))},this._unbindMouseHandlers=function(){c.geoOff(u.mousemove,c._handleMousemove),c.geoOff(u.mouseclick,c._handleMouseclick),c.geoOff(u.brushend,c._handleBrushend),c.geoOff(u.brush,c._handleBrush)},this.pointSearch=function(t,e){return{index:[],found:[]}},this.boxSearch=function(t,e,n,i){return c.polygonSearch([t,{x:t.x,y:e.y},e,{x:e.x,y:t.y}],n,i)},this.polygonSearch=function(t,e,n){return{index:[],found:[]}},this._handleMousemove=function(e){var n,i=c.layer().map().interactor().mouse(),r=c.data(),o=c.pointSearch(i.geo),a=[],s=[],l=-1,d=-1;(T.length||o.index.length)&&(n=o.extra||{},o.index.length>1&&c.geoTrigger(u.feature.mouseover_order,{feature:c,mouse:i,previous:T,over:o,sourceEvent:e}),T.length&&(l=T[T.length-1]),a=o.index.filter((function(t){return T.indexOf(t)<0})),s=T.filter((function(t){return o.index.indexOf(t)<0})),t.eventID+=1,a.forEach((function(o,s){c.geoTrigger(u.feature.mouseover,{data:r[o],index:o,extra:n[o],mouse:i,eventID:t.eventID,top:s===a.length-1,sourceEvent:e},!0)})),t.eventID+=1,s.forEach((function(n,o){c.geoTrigger(u.feature.mouseout,{data:r[n],index:n,mouse:i,eventID:t.eventID,top:o===s.length-1,sourceEvent:e},!0)})),t.eventID+=1,o.index.forEach((function(a,s){c.geoTrigger(u.feature.mousemove,{data:r[a],index:a,extra:n[a],mouse:i,eventID:t.eventID,top:s===o.index.length-1,sourceEvent:e},!0)})),(T=o.index).length&&(d=T[T.length-1]),l!==d&&(-1!==l&&c.geoTrigger(u.feature.mouseoff,{data:r[l],index:l,mouse:i,sourceEvent:e},!0),-1!==d&&c.geoTrigger(u.feature.mouseon,{data:r[d],index:d,extra:n[d],mouse:i,sourceEvent:e},!0)))},this._clearSelectedFeatures=function(){return T=[],c},this._handleMouseclick=function(e){var n=c.layer().map().interactor().mouse(),i=c.data(),r=c.pointSearch(n.geo),o=r.extra||{};r.index.length>1&&c.geoTrigger(u.feature.mouseclick_order,{feature:c,mouse:n,over:r,sourceEvent:e}),n.buttonsDown=e.buttonsDown,t.eventID+=1,r.index.forEach((function(a,s){c.geoTrigger(u.feature.mouseclick,{data:i[a],index:a,extra:o[a],mouse:n,eventID:t.eventID,top:s===r.index.length-1,sourceEvent:e},!0)}))},this._handleBrush=function(e){var n=[e.gcs.lowerLeft,e.gcs.lowerRight,e.gcs.upperRight,e.gcs.upperLeft];if(c.layer()){var i=c.layer().map();n=l.transformCoordinates(i.gcs(),i.ingcs(),n)}var r=c.polygonSearch(n);t.eventID+=1,r.index.forEach((function(n,i){c.geoTrigger(u.feature.brush,{data:r.found[i],index:n,mouse:e.mouse,brush:e,eventID:t.eventID,top:i===r.index.length-1},!0)}))},this._handleBrushend=function(e){var n=[e.gcs.lowerLeft,e.gcs.lowerRight,e.gcs.upperRight,e.gcs.upperLeft];if(c.layer()){var i=c.layer().map();n=l.transformCoordinates(i.gcs(),i.ingcs(),n)}var r=c.polygonSearch(n);t.eventID+=1,r.index.forEach((function(n,i){c.geoTrigger(u.feature.brushend,{data:r.found[i],index:n,mouse:e.mouse,brush:e,eventID:t.eventID,top:i===r.index.length-1},!0)}))},this.style=function(t,e){return void 0===t?m:"string"==typeof t&&void 0===e?m[t]:void 0===e?(m=r.extend({},m,t),c.modified(),c):(m[t]=e,c.modified(),c)},this.style.get=function(t){var e;if(void 0===t){var n,r={};for(n in m)m.hasOwnProperty(n)&&(r[n]=c.style.get(n));return r}return e=t.toLowerCase().match(/color$/)?i.isFunction(m[t])?function(){return i.convertColor(m[t].apply(c,arguments))}:i.ensureFunction(i.convertColor(m[t])):i.ensureFunction(m[t]),e},this.updateStyleFromArray=function(t,e,n){if("string"!=typeof t)r.each(t,(function(t,e){c.updateStyleFromArray(t,e)}));else{var i;if(t.toLowerCase().match(/color$/)&&(i={r:0,g:0,b:0}),!Array.isArray(e))return c;c._subfeatureStyles[t]?e.length&&Array.isArray(e[0])?c.style(t,(function(t,n,r,o){var a=(e[o]||[])[n];return void 0!==a?a:i})):c.style(t,(function(t,n,r,o){var a=e[o];return void 0!==a?a:i})):c.style(t,(function(t,n){var r=e[n];return void 0!==r?r:i}))}return n&&c.visible()&&c.draw(),c},this.layer=function(){return g},this.renderer=function(){return b||g&&g.renderer()},this.gcs=function(t){return void 0===t?null==v&&g?g.map().ingcs():v:(v=t,c.modified(),c)},this.featureGcsToDisplay=function(t){var e=g.map();return t=e.gcsToWorld(t,c.gcs()),t=e.worldToDisplay(t),c.renderer().baseToLocal&&(t=c.renderer().baseToLocal(t)),t},this.visible=function(t,e){if(void 0===t)return!(!e&&g&&g.visible&&!g.visible())&&y;if(y!==t||e){y=t,c.modified(),g&&g.visible&&!g.visible()&&(t=!1),t?c._bindMouseHandlers():c._unbindMouseHandlers();for(var n=0;n<A.length;n+=1)A[n].visible(y,e)}return c},this.dependentFeatures=function(t){return void 0===t?A.slice():(A=t.slice(),c)},this.bin=function(t,e){if(void 0===t){if(null===x&&!e){var n=c.parent(),r=n?n.children().indexOf(c):-1;return r>=0?r:0}return x}return x=i.isNonNullFinite(t)?parseInt(t,10):null,c.modified(),c},this.dataTime=function(t){return void 0===t?_:(_=t,c.modified(),c)},this.buildTime=function(t){return void 0===t?w:(w=t,c.modified(),c)},this.updateTime=function(t){return void 0===t?M:(M=t,c.modified(),c)},this.data=function(t){return void 0===t?c.style("data")||[]:(c.style("data",t),c.dataTime().modified(),c.modified(),c)},this.selectionAPI=function(t,e){return void 0===t?!(!e&&g&&g.selectionAPI&&!g.selectionAPI())&&(e||"auto"!==p?p:!!c.geoIsOn(Object.values(u.feature))):("auto"!==t&&(t=!!t),(t!==p||e)&&(p=t,c._unbindMouseHandlers(),c._bindMouseHandlers()),c)},this.mouseOverOrderHighestIndex=function(t){t.over.index.sort();var e=t.feature.data();t.over.index.forEach((function(n,i){t.over.found[i]=e[n]}))},this._init=function(t){if(!g)throw new Error("Feature requires a valid layer");m=r.extend({},{opacity:1},void 0===t.style?{}:t.style),c._bindMouseHandlers(),o=!0},this._build=function(){},this._update=function(){},this.geoOn=function(t,e){var n="auto"===c.selectionAPI(void 0,!0),i=n&&c.selectionAPI(),r=h.apply(c,arguments);return n&&!i&&c.selectionAPI()&&c._bindMouseHandlers(),r},this.geoOff=function(t,e){var n="auto"===c.selectionAPI(void 0,!0),i=n&&c.selectionAPI(),r=f.apply(c,arguments);return n&&i&&!c.selectionAPI()&&c._unbindMouseHandlers(),r},this._exit=function(){c._unbindMouseHandlers(),T=[],m={},d(),o=!1},this._init(e),this};c.eventID=0,c.create=function(t,e){"use strict";if(!(t instanceof n(9105)))return console.warn("Invalid layer"),null;if("object"!==i(e))return console.warn("Invalid spec"),null;var r=e.type,o=t.createFeature(r,e);return o?(e.data=e.data||[],o.style(e)):(console.warn('Could not create feature type "'+r+'"'),null)},o(c,a),t.exports=c},3715:function(t,e,n){var i=n(5699),r=n(9105),o=n(5108),a=n(4647),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this,e);var n=this,i=[],s=this._init,l=this._exit,u=this._update,c=this.visible,d=this.selectionAPI,h=this.draw;return this.createFeature=function(t,e){var i=a.createFeature(t,n,n.renderer(),e);return i?n.addFeature(i):console.warn("Layer renderer ("+n.rendererName()+') does not support feature type "'+t+'"'),i},this.addFeature=function(t){return n.removeFeature(t),n.addChild(t),i.push(t),n.dataTime().modified(),n.modified(),n},this.removeFeature=function(t){var e;return(e=i.indexOf(t))>=0&&(i.splice(e,1),n.removeChild(t),n.dataTime().modified(),n.modified()),n},this.deleteFeature=function(t){return t&&(i.indexOf(t)>=0&&t._exit(),n.removeFeature(t)),n},this.features=function(t){if(void 0===t)return i.slice();var e,r=i.slice();for(e=0;e<r.length;e+=1)t.indexOf(r[e])<0&&i.indexOf(r[e])>=0&&n.deleteFeature(r[e]);for(e=0;e<t.length;e+=1)n.addFeature(t[e]);return n},this.gcsFeatures=function(t){var e,i;return void 0===t?(this.features().forEach((function(t){void 0===e?e=t.gcs():t.gcs()!==e&&(i=!0)})),i?void 0:e):(n.features().forEach((function(e){e.gcs()!==t&&e.gcs(t)})),n)},this._init=function(){return n.initialized()||(s.call(n,!0),n.geoOn(o.resize,(function(t){n.renderer()?(n.renderer()._resize(t.x,t.y,t.width,t.height),n._update({event:t}),n.renderer()._render()):n._update({event:t})})),n.geoOn(o.pan,(function(t){n._update({event:t}),n.renderer()&&n.renderer()._render()})),n.geoOn(o.rotate,(function(t){n._update({event:t}),n.renderer()&&n.renderer()._render()})),n.geoOn(o.zoom,(function(t){n._update({event:t}),n.renderer()&&n.renderer()._render()}))),n},this._update=function(t){var e;if(!i.length)return n;if(u.call(n,t),n.dataTime().timestamp()>n.updateTime().timestamp())for(e=0;e<i.length;e+=1)i[e].renderer(n.renderer());for(e=0;e<i.length;e+=1)i[e]._update();return n.updateTime().modified(),n},this._exit=function(){n.clear(),l()},this.draw=function(){return n.visible()&&(h(),n.renderer()&&n.renderer()._render()),n},this.visible=function(t){if(void 0===t)return c();if(n.visible()!==t){c(t);var e,r=i.slice();for(e=0;e<r.length;e+=1)r[e].visible(r[e].visible(void 0,!0),!0);t&&n.draw()}return n},this.selectionAPI=function(t){if(void 0===t)return d();if(n.selectionAPI()!==t){d(t);var e,r=i.slice();for(e=0;e<r.length;e+=1)r[e].selectionAPI(r[e].selectionAPI(void 0,!0),!0)}return n},this.clear=function(){for(;i.length;)n.deleteFeature(i[0]);return n},n};i(s,r),a.registerLayer("feature",s),t.exports=s},3705:function(t,e,n){var i=n(5638);t.exports=function t(e){if(!(this instanceof t))return new t(e);e=e||{},this._size=e.size||6,this._initialSize=e.initialSize||0,this._track=e.track||600,this._needed=e.needed||null,this._batch=!1;var n=this,r=1;return Object.defineProperty(this,"size",{get:function(){return n._size},set:function(t){n._size=t,n._initialSize>1&&t<n._initialSize&&(n._initialSize=t),n.next_item()}}),Object.defineProperty(this,"initialSize",{get:function(){return n._initialSize},set:function(t){n._initialSize=t,n.next_item()}}),Object.defineProperty(this,"length",{get:function(){return n._queue.length}}),Object.defineProperty(this,"processing",{get:function(){return n._processing}}),this.clear=function(){return n._queue=[],n._processing=0,n},this.add=function(t,e,r){if(t.__fetchQueue){var o=i.inArray(t,n._queue);if(o>=0)return n._queue.splice(o,1),n._addToQueue(t,r),t}var a=i.Deferred(),s=i.Deferred();return a.done((function(){i.when(e.call(t)).always(s.resolve)})).fail(s.resolve),t.__fetchQueue=a,n._addToQueue(t,r),i.when(a,s).always((function(){n._processing>0&&(n._processing-=1),n._initialSize=0,n.next_item()})).promise(t),n.next_item(),t},this._addToQueue=function(t,e){if(t.__fetchQueue._batch=n._batch,e)n._queue.push(t);else if(this._batch){for(var i=0;i<n._queue.length&&n._queue[i].__fetchQueue._batch===n._batch;i+=1);n._queue.splice(i,0,t)}else n._queue.unshift(t)},this.get=function(t){return i.inArray(t,n._queue)},this.remove=function(t){var e=i.inArray(t,n._queue);return e>=0&&(n._queue.splice(e,1),!0)},this.batch=function(t){return void 0===t?n._batch:(t?(n._batch=r,r+=1):n._batch=!1,n)},this.next_item=function(){if(!n._innextitem){if(n._innextitem=!0,n._queue.length>n._track&&n._needed)for(var t=n._queue.length-1;t>=0;t-=1)if(!n._needed(n._queue[t])){var e=n._queue.splice(t,1)[0];n._processing+=1,e.__fetchQueue.reject(),delete e.__fetchQueue}for(;n._processing<(n._initialSize||n._size)&&n._queue.length;){var i=n._queue.shift();if(i.__fetchQueue)n._processing+=1,!n._needed||n._needed(i)?i.__fetchQueue.resolve():i.__fetchQueue.reject(),delete i.__fetchQueue}n._innextitem=!1}},this.clear(),this}},407:function(t,e,n){var i=n(5699),r=n(3715),o=n(3737),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);if(o.call(this),!((e=e||{}).layer instanceof r))throw new Error("fileReader must be given a feature layer");var n=e.layer;return this.layer=function(){return n},this.canRead=function(t){return!1},this.read=function(t,e,n){var i=new Promise((function(t,n){throw e&&e(!1),new Error("The default file reader always fails")}));return this.addPromise(i),i},this._getString=function(t,e,n){var i=function(t,e){var n=new FileReader;return e&&(n.onprogress=e),n.onloadend=function(){t(n.error||n.result)},n}(e,n);i.readAsText(t)},this};i(a,o),t.exports=a},3088:function(t,e,n){function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var a=n(5699),s=n(4647).registerFileReader,l=n(407),u=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638),a=n(4634).convertColor,s=n(7098),u=n(6853),c=this,d=r(r({},e),{},{pointStyle:r({fill:!0,fillColor:"#ff7800",fillOpacity:.8,stroke:!0,strokeColor:"#000",strokeWidth:1,strokeOpacity:1,radius:8},e.pointStyle),lineStyle:r({strokeColor:"#ff7800",strokeWidth:4,strokeOpacity:.5,strokeOffset:0,lineCap:"butt",lineJoin:"miter",closed:!1},e.lineStyle),polygonStyle:r({fill:!0,fillColor:"#b0de5c",fillOpacity:.8,stroke:!0,strokeColor:"#999999",strokeWidth:2,strokeOpacity:1},e.polygonStyle)});l.call(this,d),this.canRead=function(t){if(t instanceof File||t instanceof Blob)return!!("application/json"===t.type||t.name&&t.name.match(/\.json$/));if("string"==typeof t){try{JSON.parse(t)}catch(t){return!1}return!0}try{if(Array.isArray(c._featureArray(t)))return!0}catch(t){}return!1},this._readObject=function(t,e,n){var r;function o(t){try{r=JSON.parse(t),e(r)}catch(n){r||i.ajax({type:"GET",url:t,dataType:"text"}).done((function(t){try{r=JSON.parse(t),e(r)}catch(t){r||e(!1)}})).fail((function(){e(!1)}))}}t instanceof File||t instanceof Blob?c._getString(t,o,n):"string"==typeof t?o(t):e(t)},this._featureArray=function(t){var e,n=[];switch(t.type){case"FeatureCollection":e=t.features;break;case"Feature":e=[t];break;case"GeometryCollection":e=t.geometries.map((function(t){return{type:"Feature",geometry:t,properties:{}}}));break;case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":e=[{type:"Feature",geometry:t,properties:{}}];break;default:throw new Error("Invalid json type")}return e.forEach((function(t){Array.prototype.push.apply(n,c._feature(t))})),n=n.filter((function(t){return t.geometry&&t.geometry.coordinates&&t.geometry.coordinates.length}))},this._feature=function(t){if("Feature"!==t.type)throw new Error("Invalid feature object");switch(t.geometry.type){case"Point":case"LineString":case"Polygon":return[t];case"MultiPoint":case"MultiLineString":case"MultiPolygon":return t.geometry.coordinates.map((function(e){return{type:"Feature",geometry:{type:t.geometry.type.replace("Multi",""),coordinates:e},properties:t.properties}}));default:throw new Error("Invalid geometry type")}},this._position=function(t){return{x:t[0],y:t[1],z:t[2]||0}},this._style=function(t,e){var n=t.toLowerCase().match(/color$/);return n&&(e=a(e)),function(i,r,o,s){var l;return void 0!==(l=void 0!==o&&o.properties?o.properties:i.properties)&&l.hasOwnProperty(t)?n?a(l[t]):l[t]:e}},this.read=function(t,e,n){var i=new Promise((function(i,a){function l(t){return"Polygon"===t.geometry.type&&1===t.geometry.coordinates.length&&5===t.geometry.coordinates[0].length&&("ellipse"===(t.properties||{}).annotationType||"circle"===(t.properties||{}).annotationType)}c._readObject(t,(function(t){if(!1===t)return e&&e(t),void a(new Error("Failed to parse GeoJSON"));var n,h,f=[];try{n=c._featureArray(t)}catch(t){return void a(t)}var p=n.filter((function(t){return"Point"===t.geometry.type}));p.length&&(h=c.layer().createFeature("point"))&&(h.data(p).position((function(t){return c._position(t.geometry.coordinates)})).style([{}].concat(Object.keys(d.pointStyle)).reduce((function(t,e){return r(o({},e,p.some((function(t){return t.properties&&void 0!==t.properties[e]}))?c._style(e,d.pointStyle[e]):d.pointStyle[e]),t)}))),f.push(h));var m=n.filter((function(t){return"LineString"===t.geometry.type}));m.length&&(h=c.layer().createFeature("line"))&&(h.data(m).line((function(t){return t.geometry.coordinates})).position(c._position).style([{}].concat(Object.keys(d.lineStyle)).reduce((function(t,e){return r(o({},e,m.some((function(t){return t.properties&&void 0!==t.properties[e]}))?c._style(e,d.lineStyle[e]):d.lineStyle[e]),t)}))),f.push(h));var g=n.filter((function(t){return"Polygon"===t.geometry.type&&!l(t)}));g.length&&(h=c.layer().createFeature("polygon"))&&(h.data(g).polygon((function(t,e){return{outer:t.geometry.coordinates[0],inner:t.geometry.coordinates.slice(1)}})).position(c._position).style([{}].concat(Object.keys(d.polygonStyle)).reduce((function(t,e){return r(o({},e,g.some((function(t){return t.properties&&void 0!==t.properties[e]}))?c._style(e,d.polygonStyle[e]):d.polygonStyle[e]),t)}))),f.push(h));var v=n.filter(l);v.length&&(h=c.layer().createFeature("marker"))&&(v.forEach((function(t){var e=c.layer().map(),n=u.transformCoordinates(e.ingcs(),e.gcs(),t.geometry.coordinates[0]),i=Math.pow(Math.pow(n[0][0]-n[1][0],2)+Math.pow(n[0][1]-n[1][1],2),.5),r=Math.pow(Math.pow(n[0][0]-n[3][0],2)+Math.pow(n[0][1]-n[3][1],2),.5),o=Math.max(i,r)/2/e.unitsPerPixel(0),a=i?r/i:1e20,s=-Math.atan2(n[1][1]-n[0][1],n[1][0]-n[0][0]),l=u.transformCoordinates(e.gcs(),e.ingcs(),{x:(n[0][0]+n[1][0]+n[2][0]+n[3][0])/4,y:(n[0][1]+n[1][1]+n[2][1]+n[3][1])/4});t._props={pos:l,radius:o,aspect:a,rotation:s}})),h.data(v).position((function(t){return t._props.pos})).style([{}].concat(Object.keys(d.polygonStyle)).reduce((function(t,e){var n;return r((o(n={},e,v.some((function(t){return t.properties&&void 0!==t.properties[e]}))?c._style(e,d.polygonStyle[e]):d.polygonStyle[e]),o(n,"radius",(function(t){return t._props.radius})),o(n,"radiusIncludesStroke",!1),o(n,"symbolValue",(function(t){return t._props.aspect})),o(n,"rotation",(function(t){return t._props.rotation})),o(n,"strokeOffset",0),o(n,"rotateWithMap",!0),o(n,"scaleWithZoom",s.scaleMode.fill),n),t)}))),f.push(h)),e&&e(f),i(f)}),n)}));return c.addPromise(i),i}};a(u,l),s("geojsonReader",u),s("jsonReader",u),t.exports=u},4745:function(t,e,n){var i=n(5699),r=n(6837),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},r.call(this,e);var i=n(5638),o=n(4634),a=n(4647),s=this,l=this.draw,u=this.style,c=null,d=null,h=function(t){return t.children},f=[],p=this._init,m=this._exit;return this.featureType="graph",this._init=function(t){p.call(s,t);var e=i.extend(!0,{},{nodes:{radius:5,fill:!0,fillColor:{r:1,g:0,b:0},strokeColor:{r:0,g:0,b:0}},links:{strokeColor:{r:0,g:0,b:0}},linkType:"path"},void 0===t.style?{}:t.style);return s.style(e),s.nodes((function(t){return t})),s},this._build=function(){s.children().forEach((function(t){t._build()}))},this._update=function(){s.children().forEach((function(t){t._update()}))},this._exit=function(){return s.data([]),f.forEach((function(t){t._exit(),s.removeChild(t)})),f=[],d._exit(),s.removeChild(d),m(),s},this.style=function(t,e){var n=u.call(s,t,e);return n!==s?n:(d.style(t.nodes),f.forEach((function(e){e.style(t.links)})),s)},this.style.get=u.get,this.links=function(t){return void 0===t?h:(h=o.ensureFunction(t),s)},this.nodes=function(t){return void 0===t?c:(c=t,s.modified(),s)},this.nodeFeature=function(){return d},this.linkFeatures=function(){return f},this.draw=function(){var t,e=s.layer(),n=s.data(),i=0;return t=s.style(),d.data(n),d.style(t.nodes),n.forEach((function(n){(n.children||[]).forEach((function(r){var o;i+=1,f.length<i&&(o=a.createFeature(t.linkType,e,e.renderer()).style(t.links),s.addChild(o),f.push(o)),f[i-1].data([n,r])}))})),f.splice(i,f.length-i).forEach((function(t){t._exit(),s.removeChild(t)})),l(),s},d=a.createFeature("point",this.layer(),this.layer().renderer()),s.addChild(d),e.nodes&&this.nodes(e.nodes),this._init(e),this};i(o,r),t.exports=o},1109:function(t,e,n){var i=n(5699),r=n(9146),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638),o=n(4634),a=n(9244);e=e||{},r.call(this,e);var s=this,l=this._init;return this._createGrids=function(){return a.createColoredMesh(s,!0)},this.grid=s.mesh,this._init=function(t){l.call(s,t);var e=i.extend({},{opacity:1,value:function(t,e){return o.isNonNullFinite(t)?t:s.position()(t,e).z},position:function(t){return t||{x:0,y:0}},origin:function(t){return t.length>=3?[t[0],t[1],0]:[0,0,0]}},void 0===t.style?{}:t.style);s.style(e),s.grid(i.extend({},{minColor:"black",minOpacity:0,maxColor:"black",maxOpacity:0,colorRange:[{r:.07514311,g:.468049805,b:1},{r:.468487184,g:.588057293,b:1},{r:.656658579,g:.707001303,b:1},{r:.821573924,g:.837809045,b:1},{r:.943467973,g:.943498599,b:.943398095},{r:1,g:.788626485,b:.750707739},{r:1,g:.6289553,b:.568237474},{r:1,g:.472800903,b:.404551679},{r:.916482116,g:.236630659,b:.209939162}]},t.mesh||{},t.grid||{})),(t.mesh||t.grid)&&s.dataTime().modified()},this._init(e),this};i(o,r),t.exports=o},1111:function(t,e,n){var i=n(5638),r=n(5699),o=n(6837),a=n(6853),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var n,r,s,l,u,c,d,h=this,f=this._init;return this.featureType="heatmap",n=e.position||function(t){return t},r=e.intensity||function(t){return 1},s=void 0!==e.maxIntensity?e.maxIntensity:null,l=void 0!==e.minIntensity?e.minIntensity:null,c=void 0!==e.binned?e.binned:"auto",u=e.updateDelay||0===e.updateDelay?parseInt(e.updateDelay,10):-1,this.maxIntensity=function(t){return void 0===t?s:(s=t,h.dataTime().modified(),h.modified(),h)},this.minIntensity=function(t){return void 0===t?l:(l=t,h.dataTime().modified(),h.modified(),h)},this.updateDelay=function(t){return void 0===t?u:(u=parseInt(t,10),h)},this.binned=function(t){return void 0===t?c:("true"===t?t=!0:("false"===t||"auto"!==t&&!0!==t&&!1!==t&&((t=parseInt(t,10))<=0||isNaN(t)))&&(t=!1),c=t,h.dataTime().modified(),h.modified(),h)},this.position=function(t){return void 0===t?n:(n=t,h.dataTime().modified(),h.modified(),h)},this.gcsPosition=function(){return h._update(),d},this.intensity=function(t){return void 0===t?r:(r=t,h.dataTime().modified(),h.modified(),h)},this._init=function(t){f.call(h,t);var e=i.extend({},{radius:10,blurRadius:10,gaussian:!0,color:{0:{r:0,g:0,b:0,a:0},.25:{r:0,g:0,b:1,a:.5},.5:{r:0,g:1,b:1,a:.6},.75:{r:1,g:1,b:0,a:.7},1:{r:1,g:0,b:0,a:.8}},scaleWithZoom:!1},void 0===t.style?{}:t.style);h.style(e),n&&h.dataTime().modified()},this._build=function(){var t=h.data(),e=null,n=[],i=null==s,r=null==l;return t.forEach((function(t,o){n.push(h.position()(t,o)),(i||r)&&(e=h.intensity()(t,o),null==s&&(s=e),null==l&&(l=e),i&&e>s&&(s=e),r&&e<l&&(l=e))})),r&&i&&l===s&&(l-=1),d=a.transformCoordinates(h.gcs(),h.layer().map().gcs(),n),h.buildTime().modified(),h},this._init(e),this};r(s,o),t.exports=s},4665:function(t,e,n){var i=n(5699),r=n(8418),o=function t(e){if(!(this instanceof t))return new t(e);var i=n(5638);return e.size=e.size||{x:256,y:256},this._image=null,this._cors=e.crossDomain||null===e.crossDomain?e.crossDomain:"anonymous",r.call(this,e),Object.defineProperty(this,"image",{get:function(){return this._image}}),this.fetch=function(){var t;return this._image||(this._image=new Image(this.right-this.left,this.bottom-this.top),this._cors&&this._url.indexOf(":")>=0&&this._url.indexOf("/")===this._url.indexOf(":")+1&&(this._image.crossOrigin=this._cors),t=i.Deferred(),this._image.onload=t.resolve,this._image.onerror=t.reject,this._image.src=this._url,t.done(function(){this._fetched=!0}.bind(this)).promise(this)),this},this.fadeIn=function(t){var e=this.fetch(),n=i.Deferred();return i(this._image).css("display","none"),e.done(function(){i(this._image).fadeIn(t,(function(){n.resolve()}))}.bind(this)),n.promise(this)},this};i(o,r),t.exports=o},6062:function(t,e,n){
2
2
  /**
3
3
  * GeoJS
4
4
  * @copyright 2013-2022, Kitware, Inc.
@@ -32,7 +32,7 @@
32
32
  * @copyright 2017, Vladimir Agafonkin
33
33
  * @license ISC
34
34
  */
35
- var i=n(5638),r=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi;i.htmlPrefilter=function(t){return t.replace(r,"<$1></$2>")},n(8701),t.exports=i.extend({annotation:n(7800),annotationLayer:n(836),camera:n(9986),choroplethFeature:n(8719),contourFeature:n(9005),domRenderer:n(2805),event:n(5108),feature:n(6837),featureLayer:n(3715),fetchQueue:n(3705),fileReader:n(407),geo_action:n(7839),graphFeature:n(4745),heatmapFeature:n(1111),imageTile:n(4665),isolineFeature:n(2367),geojsonReader:n(3088),gridFeature:n(1109),layer:n(9105),lineFeature:n(4708),map:n(2804),mapInteractor:n(3870),markerFeature:n(7098),meshFeature:n(9146),object:n(3737),osmLayer:n(8622),pathFeature:n(6565),pointFeature:n(2557),polygonFeature:n(4343),quadFeature:n(5017),pixelmapFeature:n(6374),pixelmapLayer:n(809),renderer:n(3234),sceneObject:n(5358),textFeature:n(9757),tile:n(8418),tileCache:n(6244),tileLayer:n(1940),timestamp:n(6618),trackFeature:n(6223),transform:n(6853),typedef:n(3762),vectorFeature:n(2623),inherit:n(5699),version:n(2978),sha:n(5381),util:n(4634),jQuery:i,canvas:n(7562),svg:n(2878),vtkjs:n(6653),webgl:n(9205),gui:n(253)},n(4647)),window&&!window.$&&(window.$=i),window&&!window.jQuery&&(window.jQuery=i)},5699:function(t){t.exports=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},2367:function(t,e,n){var i=n(5699),r=n(9146),o=n(4647),a=n(4634),s={17:[{l0:1,h0:2,l1:0,h1:2}],18:[{l0:0,h0:1,l1:2,h1:1}],20:[{l0:2,h0:0,l1:1,h1:0}],22:[{l0:2,h0:0,l1:2,h1:1}],21:[{l0:1,h0:2,l1:1,h1:0}],19:[{l0:0,h0:1,l1:0,h1:2}],1:[{l0:2,h0:3,l1:1,h1:3}],2:[{l0:0,h0:2,l1:3,h1:2}],4:[{l0:3,h0:1,l1:0,h1:1}],8:[{l0:1,h0:0,l1:2,h1:0}],14:[{l0:3,h0:1,l1:3,h1:2}],13:[{l0:2,h0:3,l1:2,h1:0}],11:[{l0:1,h0:0,l1:1,h1:3}],7:[{l0:0,h0:2,l1:0,h1:1}],3:[{l0:0,h0:2,l1:1,h1:3}],10:[{l0:1,h0:0,l1:3,h1:2}],12:[{l0:3,h0:1,l1:2,h1:0}],5:[{l0:2,h0:3,l1:0,h1:1}],6:[{l0:0,h0:2,l1:0,h1:1},{l0:3,h0:1,l1:3,h1:2}],9:[{l0:1,h0:0,l1:1,h1:3},{l0:2,h0:3,l1:2,h1:0}]},l=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638),l=n(6853),u=n(5108),c=n(9757);e=e||{},r.call(this,e);var d,h,f,p,m,g=this,v=this.draw,y=this._exit,x=this._init,b=this.modified,_=this._update;return this.featureType="isoline",this.contour=g.mesh,this.isoline=g.mesh,this._createIsolines=function(){var t,e=g.style.get("value"),n=void 0!==g.style("used")?g.style.get("used"):function(t,n){return a.isNonNullFinite(e(t,n))},i=!1,r=[],o=g._createMesh({used:n,value:e});return(t=g._getValueList(o)).length?(t.forEach((function(t){var e=g._isolinesForValue(o,t);e.length&&(r=r.concat(e),i=i||!!t.label)})),{lines:r,mesh:o,values:t,hasLabels:i}):{}},this._getValueList=function(t){var e,n,i,r,o,s,l,u=g.isoline,c=u.get("values")(t),d=u.get("spacing")(t),h=u.get("count")(t),f=u.get("autofit")(t),p=u.get("levels")(t);if(!t.numVertices||!t.numElements)return[];if(e=a.getMinMaxValues(t.value,u.get("min")(t),u.get("max")(t),!0),t.minValue=e.min,t.maxValue=e.max,(n=t.maxValue-t.minValue)<=0)return[];if(Array.isArray(c))c=(c=c.map((function(t,e){return{value:void 0!==t.value?t.value:t,position:e,level:t.level}}))).filter((function(e){return e.value>=t.minValue&&e.value<=t.maxValue}));else if(d||f)for(d||(i=n/(2*h/3),o=Math.floor(Math.log10(i)),s=Math.max(0,-o),d=(i=(i/=r=Math.pow(10,o))>=5?5:i>=2?2:1)*r),c=[],l=Math.ceil(t.minValue/d);l<=Math.floor(t.maxValue/d);l+=1)c.push({value:l*d,position:l,fixedDigits:s});else for(c=Array(h),l=0;l<h;l+=1)c[l]={value:t.minValue+n*(l+1)/(h+1),position:l+1};return p.length&&c.forEach((function(t,e){if(void 0===t.level){t.level=0;for(var n=0,i=p[0];n<p.length&&!(t.position%i);i*=p[n+=1])t.level=n+1}if(u.get("label")(t,t.position)){var r=u.get("labelText")(t,t.position);void 0===r&&(r=void 0!==t.fixedDigits?""+parseFloat(t.value.toFixed(t.fixedDigits)):""+t.value),r&&(t.label=r)}})),c},this._addSegment=function(t,e,n){var i,r,o,a,s,l,u=[e,n],c=t.length;for(t.push(u),r=0;r<2;r+=1){for(i=c-1;i>=0;i-=1){if(a=(o=t[i])[0],s=o[o.length-1],n[0]===a[0]&&n[1]===a[1])l=u.concat(o.slice(1));else{if(e[0]!==s[0]||e[1]!==s[1])continue;l=o.concat(u.slice(1))}t.splice(c,1),t[i]=u=l,c=i,e=u[0],n=u[u.length-1];break}if(i<0)break}return t},this._chainVertex=function(t,e,n){var i=n[0],r=n[1],o=3*i,a=3*r,s=(e.value-t.value[i])/(t.value[r]-t.value[i]),l=1-s;return{x:t.pos[o]*l+t.pos[a]*s,y:t.pos[o+1]*l+t.pos[a+1]*s,z:t.pos[o+2]*l+t.pos[a+2]*s}},this._isolinesForValue=function(t,e){var n,i,r,o,a=e.value,l=Array(t.value.length),u=[];for(n=l.length-1;n>=0;n-=1)l[n]=t.value[n]<=a?0:1;var c=t.verticesPerElement,d="square"===t.shape,h=t.elements,f=h.length;for(i=0;i<f;i+=c){if(d){if(0===(r=8*l[h[i]]+4*l[h[i+1]]+2*l[h[i+2]]+l[h[i+3]])||15===r)continue}else if(16===(r=16+4*l[h[i]]+2*l[h[i+1]]+l[h[i+2]])||23===r)continue;s[r].forEach((function(t){u=g._addSegment(u,[h[i+t.l0],h[i+t.h0]],[h[i+t.l1],h[i+t.h1]])}))}return o=u.map((function(n){var i=[];return n.forEach((function(n){var r=g._chainVertex(t,e,n);i.length&&r.x===i[i.length-1].x&&r.y===i[i.length-1].y||i.push(r)})),i.closed=i[0].x===i[i.length-1].x&&i[0].y===i[i.length-1].y,i.value=e.value,i.level=e.level,i.position=e.position,i.label=e.label,i})).filter((function(t){return t.length>1})),o},this.modified=function(){var t=b();return f&&f.modified(),m&&m.modified(),t},this.labelPositions=function(){if(g.dataTime().timestamp()>=g.buildTime().timestamp()&&g._build(),h=null,!m)return g;if(!(d&&d.hasLabels&&d.lines&&d.lines.length))return m.data([]),g;var t=g.isoline,e=t.get("labelSpacing"),n=t.get("labelOffset"),i=t.get("labelViewport")(d.mesh),r=g.gcs(),o=g.layer().map(),s=o.gcs(),u=o.rotation(),c=o.size(),f=[],p=0;return d.lines.forEach((function(t,d){if(t.label){var h,m,g,v,y,x,b,_,w,M,A,T=e(t.value,t.value.position),C=n(t.value,t.value.position)||0,E=o.gcsToDisplay(t,r),S=0;if(!(T<=0||isNaN(T))&&(p=Math.max(T,p),C=C+.5-Math.floor(C+.5),h=E.map((function(e,n){if(!t.closed&&n+1===E.length)return 0;var i=Math.sqrt(a.distance2dSquared(e,E[n+1<E.length?n+1:0]));return S+=i,i})),m=Math.floor(S/T)))for(A=l.transformCoordinates(r,s,t),v=(g=S/m)*C,y=0,x=0;x<E.length;x+=1){for(;y+h[x]>=v;)b=x+1===E.length?0:x+1,w=1-(_=(v-y)/h[x]),v+=g,i>0&&((M={x:E[x].x*w+E[b].x*_,y:E[x].y*w+E[b].y*_}).x<-i||M.x>c.width+i||M.y<-i||M.y>c.height+i)||f.push({x:A[x].x*w+A[b].x*_,y:A[x].y*w+A[b].y*_,z:A[x].z*w+A[b].z*_,line:t,rotation:Math.atan2(E[x].y-E[b].y,E[x].x-E[b].x)-u});y+=h[x]}}})),m.gcs(s),m.data(f),m.style("renderThreshold",2*p),h={zoom:o.zoom(),center:o.center(),rotation:u,size:c,labelViewport:i,maxSpacing:p,labelAutoUpdate:t.get("labelAutoUpdate")(d.mesh)},g},this.lastLabelPositions=function(){return i.extend({},h)},this._updateLabelPositions=function(){var t=h;if(!t||!t.labelAutoUpdate)return g;var e=g.layer().map(),n=e.zoom(),i=e.size(),r=!!(Math.abs(n-t.zoom)>=2);if(!r&&t.labelViewport>0){var o=Math.sqrt(a.distance2dSquared(e.gcsToDisplay(e.center()),e.gcsToDisplay(t.center)))*Math.pow(2,t.zoom-n),s=t.labelViewport/2-2*t.maxSpacing-Math.max(i.width-t.size.width,i.height-t.size.height,0);r=r||o>=s}return r&&g.labelPositions().draw(),g},this._build=function(){if((d=g._createIsolines())&&d.lines&&d.lines.length){f||(f=g.layer().createFeature("line",{selectionAPI:!1,gcs:g.gcs(),visible:g.visible(void 0,!0),style:{closed:function(t){return t.closed}}}),g.dependentFeatures([f]));var t=g.style();if(f.data(d.lines).style({antialiasing:t.antialiasing,lineCap:t.lineCap,lineJoin:t.lineJoin,miterLimit:t.miterLimit,strokeWidth:t.strokeWidth,strokeStyle:t.strokeStyle,strokeColor:t.strokeColor,strokeOffset:t.strokeOffset,strokeOpacity:t.strokeOpacity}),d.hasLabels){if(!m){if(!(o.registries.features[g.layer().rendererName()]||{}).text){var e=o.rendererForFeatures(["text"]);p=o.createLayer("feature",g.layer().map(),{renderer:e}),g.layer().addChild(p),g.layer().node().append(p.node())}m=(p||g.layer()).createFeature("text",{selectionAPI:!1,gcs:g.gcs(),visible:g.visible(void 0,!0),style:{text:function(t){return t.line.label}}}).geoOn(u.pan,g._updateLabelPositions)}c.usedStyles.forEach((function(e){"visible"!==e&&m.style(e,t[e])})),g.dependentFeatures([f,m])}}else f&&f.data([]);return g.buildTime().modified(),g.labelPositions(),g},this._update=function(){return _.call(g),(g.dataTime().timestamp()>=g.buildTime().timestamp()||g.updateTime().timestamp()<=g.timestamp())&&g._build(),g.updateTime().modified(),g},this.draw=function(){var t=v();return f&&f.draw(),m&&m.draw(),t},this._exit=function(){m&&((p||g.layer())&&(p||g.layer()).deleteFeature(m),p&&g.layer()&&g.layer().removeChild(p)),f&&g.layer()&&g.layer().deleteFeature(f),m=null,p=null,f=null,g.dependentFeatures([]),y()},this._init=function(e){e=e||{},x.call(g,e);var n=i.extend({},{opacity:1,value:function(t,e){return g.position()(t,e).z},rotateWithMap:!0,rotation:t.rotationFunction(),strokeWidth:function(t,e,n,i){return n.level+.5},strokeColor:{r:0,g:0,b:0},textStrokeColor:{r:1,g:1,b:1,a:.75},textStrokeWidth:2,fontSize:"12px"},void 0===e.style?{}:e.style);g.style(n),g.isoline(i.extend({},{count:15,autofit:!0,levels:[5,5],label:function(t){return t.level>=1},labelSpacing:200,labelViewport:1e4,labelAutoUpdate:!0},e.mesh||{},e.contour||{},e.isoline||{})),(e.mesh||e.contour||e.isoline)&&g.dataTime().modified()},this};l.rotationFunction=function(t,e){var n={higher:function(t){return t.rotation},lower:function(t){return t.rotation+Math.PI},map:function(t){var e=t.rotation,n=a.wrapAngle(e,!0);return(n>Math.PI/2||n<-Math.PI/2)&&(e+=Math.PI),e},screen:function(t){var n=t.rotation,i=a.wrapAngle(n+e.rotation(),!0);return(i>Math.PI/2||i<-Math.PI/2)&&(n+=Math.PI),n}};return n[t]||n.higher},i(l,r),t.exports=l},9105:function(t,e,n){var i=n(5699),r=n(5358),o=n(6837),a=n(4647).checkRenderer,s=n(4647).rendererForFeatures,l=n(4647).rendererForAnnotations,u=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},r.call(this,e);var i,o=n(5638),u=n(6618),c=n(3234),d=n(4647).createRenderer,h=n(4647).adjustLayerForRenderer,f=n(5108),p=this,m=this._exit,g=void 0===e.id?t.newLayerId():e.id,v=void 0===e.name?"":e.name,y=void 0===e.map?null:e.map,x=null,b=void 0===e.canvas?null:e.canvas,_=e.renderer instanceof c?e.renderer:null,w=!1,M=void 0!==e.renderer?e.renderer instanceof c?e.renderer.api():e.renderer:e.annotations?l(e.annotations):s(e.features),A=void 0===e.autoshareRenderer||e.autoshareRenderer,T=u(),C=u(),E=void 0===e.sticky||e.sticky,S=void 0===e.active||e.active,k=void 0===e.opacity?1:e.opacity,P=e.attribution||null,O=void 0===e.visible||e.visible,R=void 0===e.selectionAPI||e.selectionAPI;if(M=a(M),!y)throw new Error("Layers must be initialized on a map.");function L(){return(p.parent()||p.map()).children().filter((function(e){return e instanceof t}))}if(this.rendererName=function(){return M},this.autoshareRenderer=function(){return A},this.zIndex=function(t,e){return void 0===t?i:(e||L().reverse().forEach((function(e){e!==p&&e.zIndex()===t&&e.zIndex(t+1)})),t!==i&&(i=t,x.css("z-index",i),p.geoTrigger(f.layerMove,{layer:p})),p)},this.moveUp=function(t){var e,n,i,r,o=null;for(void 0===t&&(t=1),r=1,t<0&&(r=-1,t=-t),e=L().sort((function(t,e){return r*(t.zIndex()-e.zIndex())})),n=0;n<e.length;n+=1)if(null===o)e[n]===p&&(o=n);else{if(!(n-o<=t))break;i=p.zIndex(),p.zIndex(e[n].zIndex(),!0),e[n].zIndex(i,!0)}return p},this.moveDown=function(t){return void 0===t&&(t=1),p.moveUp(-t)},this.moveToTop=function(){return p.moveUp(L().length-1)},this.moveToBottom=function(){return p.moveDown(L().length-1)},this.sticky=function(){return E},this.active=function(t){return void 0===t?S:(S!==t&&(S=t,x.toggleClass("active",S)),p)},this.node=function(){return x},this.id=function(e){return void 0===e?g:(g=null===e?t.newLayerId():e,p.modified(),p)},this.name=function(t){return void 0===t?v:(v=t,x.attr("id",v),p.modified(),p)},this.map=function(){return y},this.renderer=function(){return _},this._renderer=function(t){return void 0===t?_:(_=t,p)},this.canvas=function(){return b},this._canvas=function(t){return void 0===t?b:(b=t,p)},this.dataTime=function(){return T},this.updateTime=function(){return C},this.initialized=function(t){return void 0!==t?(w=t,p):w},this.toLocal=function(t){return t},this.fromLocal=function(t){return t},this.attribution=function(t){return void 0!==t?(P=t,p.map().updateAttribution(),p):P},this.visible=function(t){return void 0===t?O:(O!==t&&(O=t,x.toggleClass("hidden",!O),p.modified()),p)},this.selectionAPI=function(t){return void 0===t?R:(R!==t&&(R=t),p)},this._init=function(t){if(w)return p;y.node().append(x);var n=o.extend({},e);return delete n.map,_?p._canvas(_.canvas()):null===M?(p._renderer(null),p._canvas(x)):b?p._renderer(d(M,p,b,n)):(p._renderer(d(M,p,void 0,n)),p._canvas(_.canvas())),x.toggleClass("active",p.active()),w=!0,t||(p.geoOn(f.resize,(function(t){p._update({event:t})})),p.geoOn(f.pan,(function(t){p._update({event:t})})),p.geoOn(f.rotate,(function(t){p._update({event:t})})),p.geoOn(f.zoom,(function(t){p._update({event:t})}))),p},this._exit=function(){p.geoOff(),_&&_._exit(),x.off(),x.remove(),e={},p._canvas(null),p._renderer(null),m()},this._update=function(t){return p},this.width=function(){return p.map().size().width},this.height=function(){return p.map().size().height},this.opacity=function(t){return void 0!==t?(k=t,x.css("opacity",k),p):k},(x=o(document.createElement("div"))).addClass("geojs-layer"),x.attr("renderer",M),v&&x.attr("id",v),p.opacity(k),p.visible(O),void 0===e.zIndex){var D=-1;L().forEach((function(t){void 0!==t.zIndex()&&(D=Math.max(D,t.zIndex()))})),e.zIndex=D+1}return p.zIndex(e.zIndex),h("all",p),p};u.newLayerId=function(){"use strict";var t=1;return function(){var e=t;return t+=1,e}}(),u.create=function(t,e){"use strict";if((e=e||{}).type=e.type||"feature",e.renderer=void 0===e.renderer?"webgl":e.renderer,e.renderer=a(e.renderer),!e.renderer)return console.warn("Invalid renderer"),null;var n=t.createLayer(e.type,e);return n?(e.features&&e.features.forEach((function(t){t.data=t.data||e.data,t.feature=o.create(n,t)})),n):(console.warn("Unable to create a layer"),null)},i(u,r),t.exports=u},4708:function(t,e,n){var i=n(5699),r=n(6837),o=n(6618),a=n(6853),s=n(4634),l=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638);e=e||{},r.call(this,e);var l,u=this,c=this._init,d=o();return this.featureType="line",this._subfeatureStyles={lineCap:!0,lineJoin:!0,strokeColor:!0,strokeOffset:!0,strokeOpacity:!0,strokeWidth:!0},this.line=function(t){return void 0===t?u.style("line"):(u.style("line",t),u.dataTime().modified(),u.modified(),u)},this.position=function(t){return void 0===t?u.style("position"):(u.style("position",t),u.dataTime().modified(),u.modified(),u)},this._updatePointSearchInfo=function(){if(d.timestamp()>=u.dataTime().timestamp()&&d.timestamp()>=u.timestamp())return l;d.modified(),l=[];var t=u.data(),e=u.line(),n=u.style.get("strokeWidth"),i=u.position(),r=u.style.get("closed"),o=u.gcs(),s=u.layer().map().gcs();return t.forEach((function(t,u){var c,d,h,f,p,m,g,v=r(t,u),y=[];e(t,u).forEach((function(e,r){var l=i(e,r,t,u);o!==s&&(l=a.transformCoordinates(o,s,l)),void 0===m&&(m={x:l.x,y:l.y}),void 0===g&&(g={x:l.x,y:l.y}),l.x<m.x&&(m.x=l.x),l.x>g.x&&(g.x=l.x),l.y<m.y&&(m.y=l.y),l.y>g.y&&(g.y=l.y);var x=Math.ceil(n(e,r,t,u)/2)+2;(void 0===g.r||x>g.r)&&(g.r=x);var b=x*x;c&&y.push({u:l,v:c,r:h>x?h:x,r2:f>b?f:b,i:r,j:d}),c=l,d=r,h=x,f=b,!p&&v&&(p={p:l,r:x,r2:b,i:r})})),v&&p&&(c.x!==p.p.x||c.y!==p.p.y)&&y.push({u:c,v:p.p,r:h>p.r?h:p.r,r2:f>p.r2?f:p.r2,i:d,j:p.i}),y.min=m,y.max=g,l.push(y)})),l},this.pointSearch=function(t,e){var n=u.data(),i=[],r=[],o={};if(!n||!n.length||!u.layer())return{found:r,index:i,extra:o};u._updatePointSearchInfo();var c=u.layer().map();e=null===e?c.gcs():void 0===e?c.ingcs():e;var d,h,f,p,m=c.unitsPerPixel(c.zoom()),g=m*m,v=a.transformCoordinates(e,c.gcs(),t),y=u.style.get("strokeWidth"),x=u.style.get("strokeOpacity"),b=u.line();for(h=0;h<l.length;h+=1)for(p=l[h],d=null,f=0;f<p.length;f+=1)if(s.distance2dToLineSquared(v,p[f].u,p[f].v)<=p[f].r2*g&&(d||(d=b(n[h],h)),(x(d[p[f].i],p[f].i,n[h],h)>0||x(d[p[f].j],p[f].j,n[h],h)>0)&&(y(d[p[f].i],p[f].i,n[h],h)>0||y(d[p[f].j],p[f].j,n[h],h)>0))){r.push(n[h]),i.push(h),o[h]=f;break}return{found:r,index:i,extra:o}},this.polygonSearch=function(t,e,n){var i,r,o=u.data(),c=[],d=[],h={},f=u.layer().map(),p=u.style.get("strokeWidth"),m=u.style.get("strokeOpacity"),g=u.line();if(n=null===n?f.gcs():void 0===n?f.ingcs():n,t.outer||(t={outer:t,inner:[]}),!o||!o.length||t.outer.length<3)return{found:d,index:c,extra:h};(e=e||{}).partial=e.partial||!1,(t={outer:a.transformCoordinates(n,f.gcs(),t.outer),inner:(t.inner||[]).map((function(t){return a.transformCoordinates(n,f.gcs(),t)}))}).outer.forEach((function(t){i||(i={x:t.x,y:t.y},r={x:t.x,y:t.y}),t.x<i.x&&(i.x=t.x),t.x>r.x&&(r.x=t.x),t.y<i.y&&(i.y=t.y),t.y>r.y&&(r.y=t.y)})),u._updatePointSearchInfo();var v,y,x,b,_,w,M=f.unitsPerPixel(f.zoom());for(v=0;v<l.length;v+=1)if(!(!(x=l[v]).max||x.max.x<i.x-x.max.r*M||x.min.x>r.x+x.max.r*M||x.max.y<i.y-x.max.r*M||x.min.y>r.y+x.max.r*M)){var A=void 0,T=void 0,C=void 0;for(y=0;y<x.length;y+=1)if(b=x[y].u,_=x[y].v,w=x[y].r,!(b.x<i.x-w*M&&_.x<i.x-w*M||b.x>r.x+w*M&&_.x>r.x+w*M||b.y<i.y-w*M&&_.y<i.y-w*M||b.y>r.y+w*M&&_.y>r.y+w*M||(C||(C=g(o[v],v)),m(C[x[y].i],x[y].i,o[v],v)<=0&&m(C[x[y].j],x[y].j,o[v],v)<=0||p(C[x[y].i],x[y].i,o[v],v)<=0&&p(C[x[y].j],x[y].j,o[v],v)<=0))){var E=s.distanceToPolygon2d(b,t),S=s.distanceToPolygon2d(_,t);if(E>-w*M&&E<w*M||S>-w*M&&S<w&M||E*S<0){T=!0;break}if(s.crossedLineSegmentPolygon2d(b,_,t)){T=!0;break}for(var k=w*w*M*M,P=0;P<t.outer.length&&!T;P+=1)T=s.distance2dToLineSquared(t.outer[P],b,_)<k;for(var O=0;O<t.inner.length&&!T;O+=1)for(var R=0;R<t.inner[O].length&&!T;R+=1)T=s.distance2dToLineSquared(t.inner[O][R],b,_)<k;if(T)break;E>0&&(A=!0)}(!e.partial&&A&&!T||e.partial&&(A||T))&&(c.push(v),d.push(o[v]),h[v]={partial:T,segment:y<l[v].length?y:0})}return{found:d,index:c,extra:h}},this.rdpSimplifyData=function(t,e,n,i){t=t||u.data(),n=n||u.style.get("position"),i=i||u.style.get("line");var r=u.layer().map(),o=r.gcs(),l=u.gcs(),c=u.style.get("closed");return void 0===e&&(e=.5*r.unitsPerPixel(r.zoom())),t=t.map((function(t,r){var u=i(t,r),d=a.transformCoordinates(l,o,u.map((function(e,i){return n(e,i,t,r)}))),h=s.rdpLineSimplify(d,e,c(t,r),[]);for(var f in(h.length<2||2===h.length&&s.distance2dSquared(h[0],h[1])<e*e)&&(h=[]),h=a.transformCoordinates(o,l,h),t)!t.hasOwnProperty(f)||Array.isArray(t)&&f>=0&&f<t.length||(h[f]=t[f]);return h})),u.style("position",(function(t){return t})),u.style("line",(function(t){return t})),u.data(t),u},this._init=function(t){t=t||{},c.call(u,t);var e=i.extend({},{strokeWidth:1,strokeColor:{r:1,g:.8431372549,b:0},strokeStyle:"solid",strokeOpacity:1,antialiasing:2,closed:!1,line:function(t){return t},position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t},origin:function(t){return t.length>=3?t.slice(0,3):[0,0,0]}},void 0===t.style?{}:t.style);return void 0!==t.line&&(e.line=t.line),void 0!==t.position&&(e.position=t.position),u.style(e),u.dataTime().modified(),u},this._init(e),this};l.create=function(t,e){"use strict";return(e=e||{}).type="line",r.create(t,e)},l.capabilities={feature:"line",basic:"line.basic",multicolor:"line.multicolor"},i(l,r),t.exports=l},2804:function(t,e,n){var i=n(5638),r=n(5699),o=n(5358),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);if(void 0===(e=e||{}).node||null===e.node)return console.warn("map creation requires a node"),this;o.call(this,e);var r,a,s,l,u,c=n(9986),d=n(6853),h=n(4634),f=n(4647),p=n(5108),m=n(3870),g=n(6408),v=this,y=this._exit,x=i(e.node),b=e.width||x.width()||512,_=e.height||x.height()||512,w=void 0===e.gcs?"EPSG:3857":e.gcs,M=void 0===e.ingcs?"EPSG:4326":e.ingcs,A={x:0,y:0},T=void 0===e.zoom?4:e.zoom,C=e.rotation?e.rotation:0,E=null,S=null,k={min:0,max:16,origMin:0},P=null,O=null,R=!!e.discreteZoom,L="function"==typeof e.allowRotation?e.allowRotation:void 0===e.allowRotation||!!e.allowRotation,D=e.maxBounds||{},I=e.camera||c(),F=e.animationQueue||[],j=void 0===e.autoResize||e.autoResize,z=e.autoshareRenderer,N=((D.left||0)+(D.right||0))/2,B=((D.bottom||0)+(D.top||0))/2;function V(){var t;void 0!==document.hidden?t="hidden":void 0!==document.msHidden?t="msHidden":void 0!==document.webkitHidden&&(t="webkitHidden"),v.geoTrigger(document[t]?p.hidden:p.unhidden)}function G(t){var e;void 0!==document.hidden?e="visibilitychange":void 0!==document.msHidden?e="msvisibilitychange":void 0!==document.webkitHidden&&(e="webkitvisibilitychange"),document.removeEventListener(e,V),!1!==t&&document.addEventListener(e,V)}function U(t,e){var n=t.zIndex(),i=e.zIndex();if(n!==i)return n-i;var r=t.node()[0],o=e.node()[0],a=r&&r.parentNode,s=o&&o.parentNode;if(a&&s&&a===s){var l=Array.from(a.children),u=l.indexOf(r),c=l.indexOf(o);if(u>=0&&c>=0)return u-c}return a?-1:s?1:0}function q(t,e,n,i,r){t.globalAlpha=e,r&&(t.globalCompositeOperation=r);var o=n.css("transform");o&&"matrix("===o.substr(0,7)?t.setTransform.apply(t,o.substr(7,o.length-8).split(",").map(parseFloat)):t.setTransform(1,0,0,1,0,0),t.drawImage(i,0,0),t.globalCompositeOperation="source-over"}function W(){for(var t=F.splice(0,F.length),e=1;e<t.length;e+=1)try{t[e].apply(v,arguments)}catch(t){console.error(t)}}function H(t,e,n){var i=e.width/2,r=e.height/2,o=Math.sin(n),a=Math.cos(n),s={},l={},u={},c={};return s.x=t.x+-i*a- -r*o,s.y=t.y+-i*o+-r*a,l.x=t.x+i*a- -r*o,l.y=t.y+i*o+-r*a,u.x=t.x+-i*a-r*o,u.y=t.y+-i*o+r*a,c.x=t.x+i*a-r*o,c.y=t.y+i*o+r*a,{left:Math.min(s.x,l.x,u.x,c.x),right:Math.max(s.x,l.x,u.x,c.x),bottom:Math.min(s.y,l.y,u.y,c.y),top:Math.max(s.y,l.y,u.y,c.y)}}function Z(t,e){void 0===e&&(e=C),t=function(t,e){return e&&(t=H({x:(t.left+t.right)/2,y:(t.top+t.bottom)/2},{width:Math.abs(t.left-t.right),height:Math.abs(t.top-t.bottom)},e)),t}(t,e);var n=function(t){var e,n,i=t.right-t.left,r=t.top-t.bottom,o=Math.abs(i/r),a=b/_;return o>a?(e=1,n=o/a):(n=1,e=a/o),{x:e,y:n}}(t);return n.y>n.x?-Math.log2(Math.abs(t.right-t.left)*n.x/(b*r)):-Math.log2(Math.abs(t.top-t.bottom)*n.y/(_*r))}function X(){k.min=l?Math.max(k.origMin,Z(D)):k.origMin}function Q(t,e,n){if(!L)return 0;if(e||"function"!=typeof L||(t=L(t)),!n){var i=2*Math.PI;t=t%i+(t>=0?0:i),Math.min(Math.abs(t),Math.abs(t-i))<1e-5&&(t=0)}return t}function K(t,e,n,r){if(!a&&!s)return t;var o,l,u=D;if(e){u=i.extend({},D);var c,d,h=Math.abs(t.right-t.left),f=Math.abs(t.top-t.bottom),p=Math.abs(Math.sin(e)),m=Math.abs(Math.cos(e));if(t.width&&t.height)c=t.width,d=t.height;else if(Math.abs(p-m)<5e-4)if(b&&_){var g=Math.abs(b/_),v=Math.pow(1+Math.pow(g,2),.5);d=(c=Math.max(h,f)/v)*g}else c=h*m,d=f*p;else c=(m*h-p*f)/(m*m-p*p),d=(m*f-p*h)/(m*m-p*p);var y=h-Math.max(m*c,p*d),x=f-Math.max(m*d,p*c);u.left-=y,u.right+=y,u.top+=x,u.bottom-=x}return r&&(u={left:u.left-(t.right-t.left)/2,right:u.right+(t.right-t.left)/2,top:u.top-(t.bottom-t.top)/2,bottom:u.bottom+(t.bottom-t.top)/2}),a&&(t.right-t.left>u.right-u.left?o=u.left-(t.right-t.left-(u.right-u.left))/2-t.left:t.left<u.left?o=u.left-t.left:t.right>u.right&&(o=u.right-t.right),o&&(!n||n.x*o>0)&&(n&&Math.abs(o)>Math.abs(n.x*n.unit)&&(o=Math.abs(n.x*n.unit)*o/Math.abs(o)),t={left:t.left+=o,right:t.right+=o,top:t.top,bottom:t.bottom})),s&&(t.top-t.bottom>u.top-u.bottom?l=u.bottom-(t.top-t.bottom-(u.top-u.bottom))/2-t.bottom:t.top>u.top?l=u.top-t.top:t.bottom<u.bottom&&(l=u.bottom-t.bottom),l&&(!n||-n.y*l>0)&&(n&&Math.abs(l)>Math.abs(n.y*n.unit)&&(l=Math.abs(n.y*n.unit)*l/Math.abs(l)),t={top:t.top+=l,bottom:t.bottom+=l,left:t.left,right:t.right})),t}function Y(t,e){if(I.rotation=e||0,t.width&&t.height&&e){var n=(t.left+t.right)/2,i=(t.top+t.bottom)/2;I.viewFromCenterSizeRotation({x:n,y:i},t,e)}else I.bounds=t;A={x:(I.bounds.left+I.bounds.right)/2,y:(I.bounds.top+I.bounds.bottom)/2}}function J(){v.size({width:x.width(),height:x.height()})}return D.left=d.transformCoordinates(D.gcs||M,w,{x:void 0!==D.left?D.left:-180,y:B}).x,D.right=d.transformCoordinates(D.gcs||M,w,{x:void 0!==D.right?D.right:180,y:B}).x,D.top=void 0!==D.top?d.transformCoordinates(D.gcs||M,w,{x:N,y:D.top}).y:D.right,D.bottom=void 0!==D.bottom?d.transformCoordinates(D.gcs||M,w,{x:N,y:D.bottom}).y:D.left,r=e.unitsPerPixel||(D.right-D.left)/256,I.viewport={width:b,height:_,left:x.offset().left,top:x.offset().top},e.center=h.normalizeCoordinates(e.center),a=void 0!==e.clampBoundsX&&e.clampBoundsX,s=void 0===e.clampBoundsY||e.clampBoundsY,l=void 0===e.clampZoom||e.clampZoom,this.unitsPerPixel=function(t,e){return t=t||0,e?(r=Math.pow(2,t)*e,v.draw(),v):Math.pow(2,-t)*r},this.animationQueue=function(t){if(void 0===t)return F;if(t!==F){if(F.length){t.length&&t[0]!==F[0]&&window.cancelAnimationFrame(F[0]);for(var e=t.length?1:0;e<F.length;e+=1)t.push(F[e])}F=t}return v},this.autoResize=function(t){return void 0===t?j:(t!==j&&(i(window).off("resize",J),(j=t)&&i(window).on("resize",J)),v)},this.clampBoundsX=function(t){return void 0===t?a:(t!==a&&(a=!!t,v.pan({x:0,y:0})),v)},this.clampBoundsY=function(t){return void 0===t?s:(t!==s&&(s=!!t,v.pan({x:0,y:0})),v)},this.clampZoom=function(t){return void 0===t?l:(t!==l&&(l=!!t,X(),v.zoom(T)),v)},this.allowRotation=function(t){return void 0===t?L:("function"!=typeof t&&(t=!!t),t!==L&&(L=t,v.rotation(C)),v)},this.origin=function(){return i.extend({},u)},this.camera=function(){return I},this.gcs=function(t){if(void 0===t)return w;if(t!==w){var e=v.center(void 0,void 0);w=t,X();var n=v._fix_zoom(T);n!==T&&v.zoom(n),v.center(e,void 0)}return v},this.ingcs=function(t){return void 0===t?M:(M=t,v)},this.node=function(){return x},this.zoom=function(t,e,n){if(void 0===t)return T;var i,r,o=e&&(e.mapgcs||e.geo)&&e.map,a=o;if((t=v._fix_zoom(t,n))===T)return v;if(T=t,r=v.boundsFromZoomAndCenter(t,A,C,null,n,a),v.modified(),Y(r,C),i={zoomLevel:T,screenPosition:e?e.map:void 0},v.geoTrigger(p.zoom,i),o){var s=v.gcsToDisplay(e.mapgcs||e.geo,e.mapgcs?null:void 0);v.pan({x:e.map.x-s.x,y:e.map.y-s.y},n,!0)}else v.pan({x:0,y:0},n);return v},this.pan=function(t,e,n){var i={screenDelta:t};if(t.x||t.y){var r=v.unitsPerPixel(T),o=Math.sin(C),a=Math.cos(C);I.pan({x:(t.x*a- -t.y*o)*r,y:(t.x*o+-t.y*a)*r})}var s=I.bounds;if((s=K(s,C,"limited"===n?{x:t.x,y:t.y,unit:r}:void 0,!0===n))!==I.bounds){var l=v.gcsToDisplay({x:I.bounds.left,y:I.bounds.top},null);Y(s=v.boundsFromZoomAndCenter(T,{x:(s.left+s.right)/2,y:(s.top+s.bottom)/2},C,null,e,!0),C);var u=v.gcsToDisplay({x:I.bounds.left,y:I.bounds.top},null);i.screenDelta.x+=u.x-l.x,i.screenDelta.y+=u.y-l.y}return A=I.displayToWorld({x:b/2,y:_/2}),v.geoTrigger(p.pan,i),v.modified(),v},this.rotation=function(t,e,n){if(void 0===t)return C;var i=e&&e.geo&&e.map;if((t=Q(t,n))===C)return v;C=t;var r=v.boundsFromZoomAndCenter(T,A,C,null,n,!0);v.modified(),Y(r,C);var o={rotation:C,screenPosition:e?e.map:void 0};if(v.geoTrigger(p.rotate,o),i){var a=v.gcsToDisplay(e.geo);v.pan({x:e.map.x-a.x,y:e.map.y-a.y},void 0,!0)}else v.pan({x:0,y:0},void 0,!0);return X(),v.zoom(T,void 0,n),v},this.center=function(t,e,n,r){var o;return void 0===t?o=i.extend({},v.worldToGcs(A,e)):(o=v.gcsToWorld(t,e),Y(v.boundsFromZoomAndCenter(T,o,C,null,n,r),C),v.modified(),v.geoTrigger(p.pan,{screenDelta:{x:0,y:0}}),v)},this.createLayer=function(t,e){e=e||{},void 0!==v.autoshareRenderer()&&(e=Object.assign({autoshareRenderer:v.autoshareRenderer()},e));var n=f.createLayer(t,v,e);return n&&(v.addChild(n),v.children().forEach((function(t){t instanceof g&&t.moveToTop()})),n._update(),v.modified(),v.geoTrigger(p.layerAdd,{target:v,layer:n})),n},this.deleteLayer=function(t){return null!=t&&(t._exit(),v.removeChild(t),v.modified(),v.geoTrigger(p.layerRemove,{target:v,layer:t})),t},this.size=function(t){if(void 0===t)return{width:b,height:_};var e=v.center();b=t.width||b,_=t.height||_,X();var n=v._fix_zoom(T);return n!==T&&v.zoom(n),v.camera().viewport={width:b,height:_,left:x.offset().left,top:x.offset().top},v.center(e),v.geoTrigger(p.resize,{target:v,width:b,height:_}),v.modified(),v},this.rotatedSize=function(){if(!this.rotation())return{width:b,height:_};var t=H({x:0,y:0},{width:b,height:_},v.rotation());return{width:Math.abs(t.right-t.left),height:Math.abs(t.top-t.bottom)}},this.gcsToWorld=function(t,e){return Array.isArray(t)?t.map((function(t){return v.gcsToWorld(t,e)})):((e=null===e?w:void 0===e?M:e)!==w&&(t=d.transformCoordinates(e,w,t)),u.x||u.y||u.z?t=d.affineForward({origin:u},[t])[0]:"z"in t||(t={x:t.x,y:t.y,z:0}),t)},this.worldToGcs=function(t,e){return Array.isArray(t)?t.map((function(t){return v.worldToGcs(t,e)})):(u.x||u.y||u.z?t=d.affineInverse({origin:u},[t])[0]:"z"in t||(t={x:t.x,y:t.y,z:0}),(e=null===e?w:void 0===e?M:e)!==w&&(t=d.transformCoordinates(w,e,t)),t)},this.gcsToDisplay=function(t,e){return t=v.gcsToWorld(t,e),v.worldToDisplay(t)},this.worldToDisplay=function(t){return Array.isArray(t)?t.map((function(t){return I.worldToDisplay(t)})):I.worldToDisplay(t)},this.displayToGcs=function(t,e){return t=v.displayToWorld(t),v.worldToGcs(t,e)},this.displayToWorld=function(t){return Array.isArray(t)?t.map((function(t){return I.displayToWorld(t)})):I.displayToWorld(t)},this.draw=function(){var t,e=v.children();for(v.geoTrigger(p.draw,{target:v}),v._update(),t=0;t<e.length;t+=1)e[t].draw();return v.geoTrigger(p.drawEnd,{target:v}),v},this.fileReader=function(t,e){return void 0===t?E:("string"==typeof t?((e=e||{}).layer||(e.layer=v.createLayer("feature",i.extend({},e))),e.renderer=e.layer.renderer().api(),E=f.createFileReader(t,e)):E=t,v)},this._init=function(t){if(null==x)throw new Error("Map require DIV node");return x.data("data-geojs-map")&&i.isFunction(x.data("data-geojs-map").exit)&&x.data("data-geojs-map").exit(),x.addClass("geojs-map"),x.data("data-geojs-map",v),G(),v},this._update=function(t){var e,n=v.children();for(e=0;e<n.length;e+=1)n[e]._update(t);return v},this.exit=function(){G(!1);var t,e=v.children();for(t=e.length-1;t>=0;t-=1)e[t]._exit(),v.removeChild(e[t]);v.interactor()&&(v.interactor().destroy(),v.interactor(null)),F=[],v.node().data("data-geojs-map",null),v.node().off(".geo"),v.node().empty(),i(window).off("resize",J),y()},this.interactor=function(t){return void 0===t?S:(S&&S!==t&&S.destroy(),(S=t)&&(x.attr("tabindex")||x.attr("tabindex",0),S.map(v)),v)},this.zoomRange=function(t,e){return void 0===t?i.extend({},k):(void 0!==t.max&&(k.max=t.max),void 0!==t.min&&(k.min=k.origMin=t.min),X(),e||v.zoom(T),v)},this.transition=function(t,e,n){if(void 0===t)return P;if(P){var r=i.extend(!0,{},P.end);return r.center&&w!==M&&(r.center=d.transformCoordinates(w,M,r.center)),O=i.extend({},r||{},O||{},t),v}var o=v.unitsPerPixel(0);function a(t){return Math.pow(2,-(t+1))*o*_}var s={center:void 0,zoom:v.zoom(),rotation:v.rotation(),duration:1e3,ease:function(t){return t},interp:function(t,e){return function(n){var r=[];return i.each(t,(function(i){r.push(function(t,e,n){return t+(e-t)*n}(t[i],e[i],n))})),r}},done:null,zCoord:!0};function l(e){var n=P.done,i=O;if(!0===P.cancel)return v.geoTrigger(p.transitioncancel,t),n&&n({cancel:!0,source:P.cancelSource,transition:P}),P=null,void(O&&(i=O,O=null,v.transition(i,void 0,e)));if(P.start.time||(P.start.time=e,P.end.time=e+t.duration),P.time=e-P.start.time,e>=P.end.time||i){if(!i){if(P.end.center){var r=T!==v._fix_zoom(P.end.zoom);v.center(P.end.center,null,r,r)}v.zoom(P.end.zoom,P.zoomOrigin),v.rotation(Q(P.end.rotation))}return v.geoTrigger(p.transitionend,t),n&&n({next:!!i}),P=null,void(O&&(i=O,O=null,v.transition(i,void 0,e)))}var a=P.ease((e-P.start.time)/t.duration),s=P.interp(a);P.zCoord&&(s[2]=function(t){return-Math.log2(t/o/_)-1}(s[2])),v._fix_zoom(s[2],!0)===T?v.center({x:s[0],y:s[1]},null,!0,!0):(A=v.gcsToWorld({x:s[0],y:s[1]},null),v.zoom(s[2],P.zoomOrigin,!0)),v.rotation(s[3],void 0,!0),v.scheduleAnimationFrame(l)}return t.center&&(e=null===e?w:void 0===e?M:e,(t=i.extend(!0,{},t)).center=h.normalizeCoordinates(t.center),e!==w&&(t.center=d.transformCoordinates(e,w,t.center))),t=i.extend(!0,{},s,t),(P={start:{center:v.center(void 0,null),zoom:v.zoom(),rotation:v.rotation()},end:{center:t.center,zoom:v._fix_zoom(t.zoom),rotation:Q(t.rotation,void 0,!0)},ease:t.ease,zCoord:t.zCoord,done:t.done,duration:t.duration,zoomOrigin:t.zoomOrigin}).interp=t.interp([P.start.center.x,P.start.center.y,t.zCoord?a(P.start.zoom):P.start.zoom,P.start.rotation],[P.end.center?P.end.center.x:P.start.center.x,P.end.center?P.end.center.y:P.start.center.y,t.zCoord?a(P.end.zoom):P.end.zoom,P.end.rotation]),v.geoTrigger(p.transitionstart,t),p.cancelNavigation?(P=null,v.geoTrigger(p.transitionend,t),v):(p.cancelAnimation?(t.duration=0,l(0)):n?l(n):v.scheduleAnimationFrame(l),v)},this.transitionCancel=function(t){return!(!P||!0===P.cancel&&!O)&&(P.cancel=!0,P.cancelSource=t||P.cancelSource||"",O=null,!0)},this.bounds=function(t,e){var n;if(e=null===e?w:void 0===e?M:e,void 0!==t){if(e!==w){var i=d.transformCoordinates(e,w,[{x:t.left,y:t.top},{x:t.right,y:t.bottom}]);t={left:i[0].x,top:i[0].y,right:i[1].x,bottom:i[1].y}}t=K(t,C),n=v.zoomAndCenterFromBounds(t,C,null),v.zoom(n.zoom),v.center(n.center,null)}return v.boundsFromZoomAndCenter(T,A,C,e,!0)},this.maxBounds=function(t,e){if(e=null===e?w:void 0===e?M:e,void 0===t)return{left:d.transformCoordinates(w,e,{x:D.left,y:0}).x,right:d.transformCoordinates(w,e,{x:D.right,y:0}).x,bottom:d.transformCoordinates(w,e,{x:0,y:D.bottom}).y,top:d.transformCoordinates(w,e,{x:0,y:D.top}).y};var n=((t.left||0)+(t.right||0))/2,i=((t.bottom||0)+(t.top||0))/2;return void 0!==t.left&&(D.left=d.transformCoordinates(e,w,{x:t.left,y:i}).x),void 0!==t.right&&(D.right=d.transformCoordinates(e,w,{x:t.right,y:i}).x),void 0!==t.bottom&&(D.bottom=d.transformCoordinates(e,w,{x:n,y:t.bottom}).y),void 0!==t.top&&(D.top=d.transformCoordinates(e,w,{x:n,y:t.top}).y),X(),v.zoom(T),v.pan({x:0,y:0}),v},this.zoomAndCenterFromBounds=function(t,e,n){var i,r;if((n=null===n?w:void 0===n?M:n)!==w){var o=d.transformCoordinates(n,w,[{x:t.left,y:t.top},{x:t.right,y:t.bottom}]);t={left:o[0].x,top:o[0].y,right:o[1].x,bottom:o[1].y}}if(t.left>=t.right||t.bottom>=t.top)throw new Error("Invalid bounds provided");return r=v._fix_zoom(Z(t,e)),i={x:((t=K(t,e)).left+t.right)/2-u.x,y:(t.top+t.bottom)/2-u.y},n!==w&&(i=d.transformCoordinates(w,n,i)),{zoom:r,center:i}},this.boundsFromZoomAndCenter=function(t,e,n,i,r,o){var a,s,l,c,h,f;if(i=null===i?w:void 0===i?M:i,t=v._fix_zoom(t,r),f=v.unitsPerPixel(t),e=v.gcsToWorld(e,null),l=(a=b*f)/2,c=(s=_*f)/2,n?(e.x+=u.x,e.y+=u.y,(h=H(e,{width:a,height:s},n)).width=a,h.height=s,h=K(h,n,void 0,o)):h=K(h={left:e.x-l+u.x,right:e.x+l+u.x,bottom:e.y-c+u.y,top:e.y+c+u.y},0,void 0,o),i!==w){var p=d.transformCoordinates(w,i,[[h.left,h.top],[h.right,h.bottom]]);h={left:p[0][0],top:p[0][1],right:p[1][0],bottom:p[1][1]}}return h.width=a,h.height=s,h},this.discreteZoom=function(t){return void 0===t?R:(R!==(t=!!t)&&((R=t)&&v.zoom(Math.round(v.zoom())),v.interactor()&&v.interactor().options({discreteZoom:R})),v)},this.layers=this.children,this.sortedLayers=function(){return v.children().sort(U)},this.listSceneObjects=function(t){var e=[];return(t=t||v.sortedLayers()).forEach((function(t){if(e.indexOf(t)<0&&(e.push(t),t.children)){var n=t.children();n.length&&(e=e.concat(v.listSceneObjects(n)))}})),e},this.updateAttribution=function(){v.node().find(".geo-attribution").remove();var t=i("<div/>").addClass("geo-attribution").on("mousedown",(function(t){t.stopPropagation()}));return v.children().forEach((function(e){var n=e.attribution();n&&i("<span/>").addClass("geo-attribution-layer").html(n).appendTo(t)})),i("span",t).length&&t.appendTo(v.node()),v},this.screenshot=function(t,e,n,r){var o;if(!t||Array.isArray(t)||t.renderer||(e=e||t.type,n=n||t.encoderOptions,r=r||t,t=t.layers),(r=r||{}).wait){var a=i.extend({},r,{wait:!1});o=i.Deferred();var s=function(){window.requestAnimationFrame((function(){o.resolve()}))};return"idle"===r.wait?v.onIdle(s):s(),o.then((function(){return v.screenshot(t,e,n,a)}))}o=i.when(),t?Array.isArray(t)||(t=[t]):(t=v.layers(),null!==r.attribution&&void 0!==r.attribution||(r.attribution=!0)),t=(t=t.filter((function(t){return v.layers().indexOf(t)>=0&&t.opacity()>0&&(!t.visible||t.visible())}))).sort(U);var l=document.createElement("canvas");l.width=b,l.height=_;var u=l.getContext("2d");if(!1!==r.background&&null!==r.background){var c=r.background;void 0===r.background&&(u.fillStyle="white",u.fillRect(0,0,l.width,l.height),v.node().parents().get().reverse().forEach((function(t){(c=window.getComputedStyle(t).backgroundColor)&&"transparent"!==c&&(u.fillStyle=c,u.fillRect(0,0,l.width,l.height))})),c=window.getComputedStyle(v.node()[0]).backgroundColor),c&&"transparent"!==c&&(u.fillStyle=c,u.fillRect(0,0,l.width,l.height))}return t.forEach((function(t){var e=t.opacity();t.node().children("canvas").each((function(){var n=i(this);o=o.then((function(){t.renderer()&&"webgl"===t.renderer().api()&&t.renderer()._renderFrame(),q(u,e,n,n[0],t.node().css("mix-blend-mode"))}))})),!t.node().children().not("canvas").length&&t.node().children().length||t.renderer()&&"webgl"===t.renderer().api()||(o=o.then((function(){return h.htmlToImage(t.node(),1).done((function(e){q(u,1,i([]),e,t.node().css("mix-blend-mode"))}))})))})),r.attribution&&v.node().find(".geo-attribution").each((function(){var t=i(this);o=o.then((function(){return h.htmlToImage(t,1).done((function(t){q(u,1,i([]),t)}))}))})),r.html&&i(r.html).each((function(){var t=i(this);o=o.then((function(){return h.htmlToImage(t,1).done((function(e){q(u,1,i([]),e,t.css("mix-blend-mode"))}))}))})),o=o.then((function(){var t=l;if("canvas"!==e)try{l=l.toDataURL(e,n)}catch(t){console.warn("Failed to convert screenshot to output",t);var r=i.Deferred();return r.reject(),r}return v.geoTrigger(p.screenshot.ready,{canvas:t,screenshot:l}),l}))},this.scheduleAnimationFrame=function(t,e){F.length||F.push(window.requestAnimationFrame(W));var n=F.indexOf(t,1);if(n>=0){if(!e)return;if(F.splice(n,1),"remove"===e)return}return F.push(t),F[0]},this._fix_zoom=function(t,e){return t=Math.round(1e6*t)/1e6,t=Math.max(Math.min(k.max,t),k.min),R&&!e&&(t=Math.round(t))<k.min&&(t=Math.ceil(k.min)),t},this.autoshareRenderer=function(t){return void 0===t?z:(z=null===t?void 0:t,v)},this._init(e),this.node().on("dragover.geo",(function(t){var e=t.originalEvent;v.fileReader()&&(e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy")})).on("drop.geo",(function(t){var e,n,i=t.originalEvent,r=v.fileReader();function o(){v.draw()}if(r)for(i.stopPropagation(),i.preventDefault(),e=0;e<i.dataTransfer.files.length;e+=1)n=i.dataTransfer.files[e],r.canRead(n)&&r.read(n,o)})),u={x:0,y:0},this.zoomRange(e,!0),T=this._fix_zoom(T),C=Q(C),this.center(i.extend({},e.center||A),void 0),null!==e.interactor&&this.interactor(e.interactor||m({discreteZoom:R})),j&&i(window).on("resize",J),v.geoOn([p.layerAdd,p.layerRemove],v.updateAttribution),this};a.create=function(t){"use strict";var e=a(t),i=n(9105);return e&&e.zoom?(t.data=t.data||[],t.layers=t.layers||[],t.layers.forEach((function(n){n.data=n.data||t.data,n.layer=i.create(e,n)})),e):(console.warn("Could not create map."),null)},r(a,o),t.exports=a},3870:function(t,e,n){var i=n(5699),r=n(3737),o=n(4634),a=n(3345),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this);var i,s,l,u,c,d,h,f,p,m,g=n(5638),v=n(5108),y=n(7839),x=n(4634).throttle,b=n(4634).debounce,_=n(4634).actionMatch,w=n(5017),M=this,A=null,T=!1,C=!1,E=function(){};function S(t){var e=t.x,n=t.y;return Math.sqrt(e*e+n*n)}function k(){d={boundDocumentHandlers:d.boundDocumentHandlers}}function P(t,e){e=e<=0?30:e;var n=function(){var t,e,n,r;if(!i.spring.enabled)return{x:0,y:0};var o=M.map().maxBounds(void 0,null),a=M.map().gcsToDisplay({x:o.left,y:o.top},null),s=M.map().gcsToDisplay({x:o.right,y:o.bottom},null),l=i.spring.springConstant,u=M.map().node().width(),c=M.map().node().height();return t=l*Math.max(0,a.x),e=l*Math.max(0,u-s.x),n=l*Math.max(0,a.y)/2,r=l*Math.max(0,c-s.y)/2,{x:t-e,y:n-r}}(),r=S(t),o=t.x/r,a=t.y/r;return r*=Math.exp(-i.momentum.drag*e),S(n)*e+r<i.momentum.minSpeed?null:(r>0?(o*=r,a*=r):(o=0,a=0),{x:o-n.x*e,y:a-n.y*e})}return i=g.extend(!0,{},{throttle:30,discreteZoom:!1,actions:[{action:y.pan,input:"left",modifiers:{shift:!1,ctrl:!1},owner:"geo.mapInteractor",name:"button pan"},{action:y.zoom,input:"right",modifiers:{shift:!1,ctrl:!1},owner:"geo.mapInteractor",name:"button zoom"},{action:y.zoom,input:"wheel",modifiers:{shift:!1,ctrl:!1},owner:"geo.mapInteractor",name:"wheel zoom"},{action:y.rotate,input:"left",modifiers:{shift:!1,ctrl:!0},owner:"geo.mapInteractor",name:"button rotate"},{action:y.rotate,input:"wheel",modifiers:{shift:!1,ctrl:!0},owner:"geo.mapInteractor",name:"wheel rotate"},{action:y.select,input:"left",modifiers:{shift:!0,ctrl:!0},selectionRectangle:v.select,owner:"geo.mapInteractor",name:"drag select"},{action:y.zoomselect,input:"left",modifiers:{shift:!0,ctrl:!1},selectionRectangle:v.zoomselect,owner:"geo.mapInteractor",name:"drag zoom"},{action:y.unzoomselect,input:"right",modifiers:{shift:!0,ctrl:!1},selectionRectangle:v.unzoomselect,owner:"geo.mapInteractor",name:"drag unzoom"},{action:y.pan,input:"pan",owner:"geo.mapInteractor",name:"touch pan"},{action:y.zoomrotate,input:"rotate",owner:"geo.mapInteractor",name:"touch zoom and rotate"}],click:{enabled:!0,buttons:{left:!0,right:!0,middle:!0},duration:0,cancelOnMove:!0},keyboard:{actions:{"zoom.in":["plus","shift+plus","shift+ctrl+plus","=","shift+=","shift+ctrl+="],"zoom.out":["-","shift+-","shift+ctrl+-","_","shift+_","shift+ctrl+_"],"zoom.0":["1"],"zoom.3":["2"],"zoom.6":["3"],"zoom.9":["4"],"zoom.12":["5"],"zoom.15":["6"],"zoom.18":["7"],"pan.left":["left","shift+left","shift+ctrl+left"],"pan.right":["right","shift+right","shift+ctrl+right"],"pan.up":["up","shift+up","shift+ctrl+up"],"pan.down":["down","shift+down","shift+ctrl+down"],"rotate.ccw":["<","shift+<","shift+ctrl+<",".","shift+.","shift+ctrl+."],"rotate.cw":[">","shift+>","shift+ctrl+>",",","shift+,","shift+ctrl+,"],"rotate.0":["0"]},meta:{0:{shift:!1,ctrl:!1},1:{shift:!0,ctrl:!0},2:{shift:!0,ctrl:!1}},focusHighlight:!0},alwaysTouch:!1,wheelScaleX:1,wheelScaleY:1,zoomScale:1,rotateWheelScale:6*Math.PI/180,zoomrotateMinimumRotation:5*Math.PI/180,zoomrotateReverseRotation:4*Math.PI/180,zoomrotateMinimumZoom:.05,zoomrotateMinimumPan:5,touchPanDelay:50,momentum:{enabled:!0,maxSpeed:2.5,minSpeed:.01,stopTime:250,drag:.01,actions:[y.pan,y.zoom]},spring:{enabled:!1,springConstant:5e-5},zoomAnimation:{enabled:!0,duration:500,ease:function(t){return(2-t)*t}}},e||{}),e&&e.actions&&(i.actions=g.extend(!0,[],e.actions)),e&&e.momentum&&e.momentum.actions&&(i.momentum.actions=g.extend(!0,[],e.momentum.actions)),e&&e.keyboard&&void 0!==e.keyboard.actions&&(i.keyboard.actions=g.extend(!0,{},e.keyboard.actions)),s={page:{x:0,y:0},map:{x:0,y:0},geo:{x:0,y:0},mapgcs:{x:0,y:0},buttons:{left:!1,right:!1,middle:!1},modifiers:{alt:!1,ctrl:!1,shift:!1,meta:!1},time:new Date,deltaTime:1,velocity:{x:0,y:0}},d={},h={},this._handleKeys=function(t,e,n){n&&!0===n.simulated&&(e=n);var r,o,a=i.keyboard.meta||{0:{}},s=M.map(),l=s.size(),u=t,c="",d={};for(r in a)a.hasOwnProperty(r)&&(void 0!==a[r].shift&&e.shiftKey!==!!a[r].shift||void 0!==a[r].ctrl&&e.ctrlKey!==!!a[r].ctrl||void 0!==a[r].alt&&e.altKey!==!!a[r].alt||void 0!==a[r].meta&&e.metaKey!==!!a[r].meta||(o=r));if(void 0!==o){switch(e.stopPropagation(),e.preventDefault(),t.indexOf(".")>=0&&(u=t.substr(0,t.indexOf(".")),c=t.substr(t.indexOf(".")+1)),u){case"zoom":switch(c){case"in":d.zoomDelta=[.05,.25,1][o];break;case"out":d.zoomDelta=-[.05,.25,1][o];break;default:isNaN(parseFloat(c))||(d.zoom=parseFloat(c))}break;case"pan":switch(c){case"down":d.panY=-Math.max(1,[0,.05,.5][o]*l.height);break;case"left":d.panX=Math.max(1,[0,.05,.5][o]*l.width);break;case"right":d.panX=-Math.max(1,[0,.05,.5][o]*l.width);break;case"up":d.panY=Math.max(1,[0,.05,.5][o]*l.height)}break;case"rotate":switch(c){case"ccw":d.rotationDelta=[1,5,90][o]*Math.PI/180;break;case"cw":d.rotationDelta=-[1,5,90][o]*Math.PI/180;break;default:isNaN(parseFloat(c))||(d.rotation=parseFloat(c))}}s.geoTrigger(v.keyaction,{move:d,action:t,factor:o,event:e}),d.cancel||(void 0!==d.zoom?s.zoom(d.zoom):d.zoomDelta&&s.zoom(s.zoom()+d.zoomDelta),void 0!==d.rotation?s.rotation(d.rotation):d.rotationDelta&&s.rotation(s.rotation()+d.rotationDelta),(d.panX||d.panY)&&s.pan({x:d.panX||0,y:d.panY||0}))}},this.hasTouchSupport=function(){return"ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof window.DocumentTouch||(navigator.msMaxTouchPoints||navigator.maxTouchPoints)>1},this._handleTouch=function(t){var e=!1;if("mouse"===t.pointerType&&c.touchSupport&&(e=!0),"hammer.input"===t.type){if("pan"!==c.lastEventType||1===t.pointers.length)return;e=!0,c.lastEventType=null}var n=/^(.*)(start|end|move|tap)$/.exec(t.type);if(n&&3===n.length||(e=!0),e)d.boundDocumentHandlers&&c.lastEvent&&M._handleMouseUpDocument(c.lastEvent);else{t.which=n[1];var r=(new Date).valueOf();"pan"===t.which&&"pan"!==c.lastEventType&&r-c.lastTime<i.touchPanDelay||(c.lastTime=r,c.lastEventType=t.which,c.lastEvent=t,void 0===t.pageX&&void 0!==t.center&&void 0!==t.center.x&&(t.pageX=t.center.x,t.pageY=t.center.y),"start"===n[2]&&(M._handleMouseDown(t),M._setClickMaybe(!1),d.boundDocumentHandlers&&g(document).on("mousemove.geojs",M._handleMouseUpDocument)),"start"!==n[2]&&"move"!==n[2]||(d.boundDocumentHandlers?M._handleMouseMoveDocument(t):M._handleMouseMove(t)),"end"!==n[2]&&"cancel"!==n[2]||(d.boundDocumentHandlers?M._handleMouseUpDocument(t):M._handleMouseUp(t),c.lastEvent=null),"tap"!==n[2]||d.boundDocumentHandlers||(t.which=1,c.lastEventType=null,M._handleMouseDown(t),M._handleMouseUp(t),c.lastEventType=n[2]))}},this.retriggerMouseMove=function(){M.map().geoTrigger(v.mousemove,M.mouse())},this._connectEvents=function(){if(!i.map)return M;M._disconnectEvents(),f=g(i.map.node()),M._handleMouseWheel=function(){var t={};function e(e){var n,r;T||(t!==h&&(h=t={kind:"wheel",scroll:{x:0,y:0}}),e.preventDefault(),e.deltaFactor=1,1===e.originalEvent.deltaMode?e.deltaFactor=40:2===e.originalEvent.deltaMode&&(e.deltaFactor=g(window).height()),n=e.originalEvent.deltaX||0,r=e.originalEvent.deltaY||0,n=n*i.wheelScaleX*e.deltaFactor/120,r=r*i.wheelScaleY*e.deltaFactor/120,t.scroll.x+=n,t.scroll.y+=r)}function n(e){var n,r;if(t===h){if(M._getMousePosition(e),M._getMouseButton(e),M._getMouseModifiers(e),r=(_({wheel:!0},s.modifiers,i.actions)||{}).action){var o=M.map().transitionCancel("wheel."+r);switch((o|=M.cancel(y.momentum,!0))&&(s.geo=M.map().displayToGcs(s.map),s.mapgcs=M.map().displayToGcs(s.map,null)),r){case y.pan:M.map().pan({x:h.scroll.x,y:h.scroll.y},void 0,"limited");break;case y.zoom:n=-h.scroll.y,E(n,s);break;case y.rotate:M.map().rotation(M.map().rotation()+h.scroll.y*i.rotateWheelScale,s)}M.map().geoTrigger(v.actionwheel,{state:M.state(),mouse:M.mouse(),eventData:e})}h={}}}return i.throttle>0?x(i.throttle,!1,n,e):function(t){e(t),n(t)}}(),E=function(){var t,e,n,r=0,o=400;function a(o,a){var s,l=M.map();t=g.extend(!0,{},a),r+=o,void 0===n&&(e=n=l.zoom()),n+=o,l&&Math.abs(r)>=1&&i.discreteZoom&&!i.zoomAnimation.enabled&&(s=Math.round(r+l.zoom()),r=r+l.zoom()-s,l.zoom(s,t))}function s(){var o,a=M.map();a&&(i.zoomAnimation.enabled?(o=n,i.discreteZoom&&(o=Math.round(o))===e&&n!==e&&(o=e+(n>e?1:-1)),(o=Math.round(1e6*a._fix_zoom(o))/1e6)!==a.zoom()?(a.transitionCancel("debounced_zoom."+y.zoom),a.transition({zoom:o,zoomOrigin:t,duration:i.zoomAnimation.duration,ease:i.zoomAnimation.ease,done:function(t){t=t||{};var e=new RegExp("\\."+y.zoom+"$");t.next||t.cancel&&!((""+t.source).search(e)<0)||(n=void 0),i.discreteZoom&&t.cancel&&t.transition&&t.transition.end&&(""+t.source).search(e)<0&&a.zoom(t.transition.end.zoom,t.transition.end.zoomOrigin)}})):n=void 0):(o=r+a.zoom(),i.discreteZoom&&(o=Math.round(o)),a.zoom(o,t))),r=0}!0!==i.discreteZoom&&i.discreteZoom>0&&(o=i.discreteZoom);return(!0===i.discreteZoom||i.discreteZoom>0)&&!i.zoomAnimation.enabled?b(o,!1,s,a):function(t,e){(t||void 0!==n)&&(a(t,e),s())}}(),o.adjustActions(i.actions);var t={};if(["right","pan","rotate"].forEach((function(e){t[e]=i.actions.some((function(t){return t.input[e]}))})),f.on("wheel.geojs",M._handleMouseWheel),f.on("mousemove.geojs",M._handleMouseMove),f.on("mousedown.geojs",M._handleMouseDown),f.on("mouseup.geojs",M._handleMouseUp),f.on("dragstart",(function(){return!1})),t.right&&f.on("contextmenu.geojs",(function(){return!1})),i.keyboard&&i.keyboard.actions){l=a(f[0]);var e=[];for(var r in i.keyboard.actions)i.keyboard.actions.hasOwnProperty(r)&&(l.bind(i.keyboard.actions[r],function(t){return function(e,n){M._handleKeys(t,e,n)}}(r)),e=e.concat(i.keyboard.actions[r]));u=e}if(f.toggleClass("highlight-focus",!!(u&&u.length&&i.keyboard.focusHighlight)),(M.hasTouchSupport()||i.alwaysTouch)&&(t.pan||t.rotate)){var d;try{(d=n(3877))&&d.Manager||(d=void 0)}catch(t){}if(void 0!==d){var p=[],m=["hammer.input"];t.rotate&&(p.push([d.Rotate,{enable:!0}]),m=m.concat(["rotatestart","rotateend","rotatemove"])),t.pan&&(p.push([d.Pan,{direction:d.DIRECTION_ALL}]),m=m.concat(["panstart","panend","panmove"])),p.push([d.Tap,{event:"doubletap",taps:2}]),p.push([d.Tap,{event:"singletap"},void 0,["doubletap"]]),m=m.concat(["singletap"]);var w={recognizers:p,preventDefault:!0};(c={manager:new d.Manager(f[0],w),touchSupport:M.hasTouchSupport(),lastTime:0}).manager.get("doubletap").recognizeWith("singletap"),m.forEach((function(t){c.manager.on(t,M._handleTouch)}))}}return M},this._disconnectEvents=function(){return u&&(l&&l.unbind(u),u=null,l=null),c&&(c.manager.destroy(),c=null),f&&(f.off(".geojs"),f=null),M._handleMouseWheel=function(){},E=function(){},M},this.map=function(t){return void 0!==t?(i.map=t,M._connectEvents(),M):i.map},this.options=function(t){return void 0===t?g.extend({},i):(g.extend(i,t),M._connectEvents(),M)},this._getMousePosition=function(t){if(void 0!==t.pageX&&void 0!==t.pageY){var e,n,i=f.offset();e=(n=(new Date).valueOf())-s.time,s.time=n,s.deltaTime=e,s.velocity={x:(t.pageX-s.page.x)/e,y:(t.pageY-s.page.y)/e},s.page={x:t.pageX,y:t.pageY},s.map={x:t.pageX-i.left,y:t.pageY-i.top};try{s.geo=M.map().displayToGcs(s.map),s.mapgcs=M.map().displayToGcs(s.map,null)}catch(t){s.geo=s.mapgcs=null}}},this._getMouseButton=function(t){if(void 0!==t.buttons||void 0!==t.which){for(var e in s.buttons)s.buttons.hasOwnProperty(e)&&(s.buttons[e]=!1);if(void 0!==t.buttons)s.buttons.left=!!(1&t.buttons),s.buttons.right=!!(2&t.buttons),s.buttons.middle=!!(4&t.buttons);else if("mouseup"!==t.type)switch(t.which){case 1:s.buttons.left=!0;break;case 2:s.buttons.middle=!0;break;case 3:s.buttons.right=!0}!t.which||t.which>=1&&t.which<=3||(s.buttons[t.which]=!0)}},this._getMouseModifiers=function(t){s.modifiers.alt=t.altKey,s.modifiers.ctrl=t.ctrlKey,s.modifiers.meta=t.metaKey,s.modifiers.shift=t.shiftKey},this._getSelection=function(){var t=d.origin,e=M.mouse(),n=M.map(),i={},r={};return i.upperLeft={x:Math.min(t.map.x,e.map.x),y:Math.min(t.map.y,e.map.y)},i.lowerRight={x:Math.max(t.map.x,e.map.x),y:Math.max(t.map.y,e.map.y)},i.upperRight={x:i.lowerRight.x,y:i.upperLeft.y},i.lowerLeft={x:i.upperLeft.x,y:i.lowerRight.y},r.upperLeft=n.displayToGcs(i.upperLeft,null),r.lowerRight=n.displayToGcs(i.lowerRight,null),r.upperRight=n.displayToGcs(i.upperRight,null),r.lowerLeft=n.displayToGcs(i.lowerLeft,null),p.data([{ul:r.upperLeft,ur:r.upperRight,ll:r.lowerLeft,lr:r.lowerRight}]),p.draw(),{display:i,gcs:r,mouse:e,origin:g.extend({},d.origin)}},this.cancel=function(t,e){var n;return(n=t?d.action===t:!!d.action)&&(e||(h={}),k()),n},this._setClickMaybe=function(t){C=t,m&&(window.clearTimeout(m),m=null)},this._handleMouseDown=function(t){var e,n;if(!(T||c&&"tap"===c.lastEventType&&(new Date).valueOf()-c.lastTime<1e3)){M._getMousePosition(t),M._getMouseButton(t),M._getMouseModifiers(t),!i.click.enabled||s.buttons.left&&!i.click.buttons.left||s.buttons.right&&!i.click.buttons.right||s.buttons.middle&&!i.click.buttons.middle||(M._setClickMaybe({x:s.page.x,y:s.page.y,buttons:g.extend({},s.buttons)}),i.click.duration>0&&(m=window.setTimeout((function(){C=!1,m=null}),i.click.duration))),e=((n=_(s.buttons,s.modifiers,i.actions))||{}).action;var r=M.map();r.transitionCancel("_handleMouseDown"+(e?"."+e:"")),M.cancel(y.momentum),s.velocity={x:0,y:0},e&&(h={kind:"move"},d={action:e,actionRecord:n,origin:g.extend(!0,{},s),initialZoom:r.zoom(),initialRotation:r.rotation(),initialEventRotation:t.rotation,delta:{x:0,y:0}},n.selectionRectangle&&(A&&(A.clear(),r.deleteLayer(A),A=null),A=r.createLayer("feature",{features:[w.capabilities.color],autoshareRenderer:!1}),(p=A.createFeature("quad",{gcs:r.gcs()})).style({opacity:.25,color:{r:.3,g:.3,b:.3}}),r.geoTrigger(v.brushstart,M._getSelection())),r.geoTrigger(v.actiondown,{state:M.state(),mouse:M.mouse(),event:t}),i.throttle>0?g(document).on("mousemove.geojs",x(i.throttle,M._handleMouseMoveDocument)):g(document).on("mousemove.geojs",M._handleMouseMoveDocument),g(document).on("mouseup.geojs",M._handleMouseUpDocument),d.boundDocumentHandlers=!0)}},this._handleMouseMove=function(t){T||d.boundDocumentHandlers||(i.click.cancelOnMove&&C&&M._setClickMaybe(!1),M._getMousePosition(t),M._getMouseButton(t),M._getMouseModifiers(t),C||M.map().geoTrigger(v.mousemove,M.mouse()))},this._handleZoomrotate=function(t){var e=Math.log2(t.scale);if(!d.zoomrotateAllowZoom&&e&&Math.abs(e)>=Math.log2(1+i.zoomrotateMinimumZoom)&&(i.zoomrotateMinimumZoom&&(d.initialZoom-=e),d.zoomrotateAllowZoom=!0),d.zoomrotateAllowZoom&&e){var n=d.initialZoom+e;M.map().zoom(n,d.origin)}var r=(t.rotation-d.initialEventRotation)*Math.PI/180;if(!d.zoomrotateAllowRotation&&r&&Math.abs(r)>=i.zoomrotateMinimumRotation&&(i.zoomrotateMinimumRotation&&(d.initialEventRotation=t.rotation,r=0),d.zoomrotateAllowRotation=!0),d.zoomrotateAllowRotation){var a=d.initialRotation+r;(r=o.wrapAngle(a-M.map().rotation()))&&(r*(d.lastRotationDelta||0)>=0||Math.abs(r)>=i.zoomrotateReverseRotation)&&(M.map().rotation(a,d.origin),d.lastRotationDelta=r)}var s=d.origin.page;if(d.initialEventGeo){var l=f.offset();(s=M.map().gcsToDisplay(d.initialEventGeo)).x+=l.left,s.y+=l.top}var u=t.pageX-s.x,c=t.pageY-s.y,h=u*u+c*c;!d.zoomrotateAllowPan&&h&&h>=i.zoomrotateMinimumPan*i.zoomrotateMinimumPan&&(i.zoomrotateMinimumPan?(u=c=0,d.initialEventGeo=M.mouse().geo):d.initialEventGeo=d.origin.geo,d.zoomrotateAllowPan=!0),d.zoomrotateAllowPan&&(u||c)&&M.map().pan({x:u,y:c})},this._handleMouseMoveDocument=function(t){var e,n,r;if(M.map()&&!T&&"move"===h.kind){if(M._getMousePosition(t),M._getMouseButton(t),M._getMouseModifiers(t),i.click.cancelOnMove)if(void 0===C.x||void 0===C.y)M._setClickMaybe(!1);else if(!0!==i.click.cancelOnMove||s.page.x===C.x&&s.page.y===C.y){Math.sqrt(Math.pow(s.page.x-C.x,2)+Math.pow(s.page.y-C.y,2))>=i.click.cancelOnMove&&M._setClickMaybe(!1)}else M._setClickMaybe(!1);if(!C)if(d.action){if(e=s.map.x-d.origin.map.x-d.delta.x,n=s.map.y-d.origin.map.y-d.delta.y,d.delta.x+=e,d.delta.y+=n,d.action===y.pan)M.map().pan({x:e,y:n},void 0,"limited");else if(d.action===y.zoom)E(-n*i.zoomScale/120,d);else if(d.action===y.rotate){var o,a;void 0===d.origin.rotation&&(o=d.origin.map.x-M.map().size().width/2,a=d.origin.map.y-M.map().size().height/2,d.origin.rotation=M.map().rotation()-Math.atan2(a,o)),o=s.map.x-M.map().size().width/2,a=s.map.y-M.map().size().height/2,M.map().rotation(d.origin.rotation+Math.atan2(a,o))}else d.action===y.zoomrotate?M._handleZoomrotate(t):d.actionRecord.selectionRectangle&&(r=M._getSelection(),M.map().geoTrigger(v.brush,r));M.map().geoTrigger(v.actionmove,{state:M.state(),mouse:M.mouse(),event:t}),t.preventDefault()}else console.log("WARNING: Invalid state in mapInteractor.")}},this._zoomFromSelection=function(t,e,n){if((t===y.zoomselect||t===y.unzoomselect)&&e.x!==n.x&&e.y!==n.y){var i,r,o=M.map(),a=o.size(),s={x:Math.abs((n.x-e.x)/a.width),y:Math.abs((n.y-e.y)/a.height)};if(t===y.zoomselect?(r=o.displayToGcs({x:(e.x+n.x)/2,y:(e.y+n.y)/2},null),i=o.zoom()-Math.log2(Math.max(s.x,s.y))):(i=o.zoom()+Math.log2(Math.max(s.x,s.y)),r=o.center(void 0,null)),o.discreteZoom()&&(i=Math.floor(i)),o.zoom(i),t===y.zoomselect)o.center(r,null);else{var l=o.gcsToDisplay(r,null);o.pan({x:(e.x+n.x)/2-l.x,y:(e.y+n.y)/2-l.y})}}},this._handleMouseUpDocument=function(t){var e,n;if(!T&&(h={},M._setClickMaybe(!1),M._getMouseButton(t),M._getMouseModifiers(t),g(document).off(".geojs"),d.boundDocumentHandlers=!1,s.buttons.right&&t.preventDefault(),d.actionRecord&&d.actionRecord.selectionRectangle&&(M._getMousePosition(t),e=M._getSelection(),A.clear(),M.map().deleteLayer(A),A=null,p=null,M.map().geoTrigger(v.brushend,e),!0!==d.actionRecord.selectionRectangle&&M.map().geoTrigger(d.actionRecord.selectionRectangle,e),M._zoomFromSelection(d.action,e.display.lowerLeft,e.display.upperRight),M.map().geoTrigger(v.actionselection,{state:M.state(),mouse:M.mouse(),event:t,lowerLeft:e.display.lowerLeft,upperRight:e.display.upperRight})),M.map().geoTrigger(v.actionup,{state:M.state(),mouse:M.mouse(),event:t}),n=d.action,k(),i.momentum.enabled&&g.inArray(n,i.momentum.actions)>=0)){var r=(new Date).valueOf(),o=r-s.time+s.deltaTime;r-s.time<i.momentum.stopTime?(s.velocity.x*=s.deltaTime/o,s.velocity.y*=s.deltaTime/o,s.deltaTime=o):s.velocity.x=s.velocity.y=0,M.springBack(!0,n)}},this._handleMouseUp=function(t){T||(M._getMouseButton(t),C&&M._handleMouseClick(t))},this._handleMouseClick=function(t){d.actionRecord&&d.actionRecord.selectionRectangle&&(A.clear(),M.map().deleteLayer(A),A=null,p=null,d.action=d.actionRecord=null),M._getMouseButton(t),M._getMouseModifiers(t),M.cancel(y.pan),g(document).off(".geojs"),d.boundDocumentHandlers=!1;var e=M.mouse();e.buttonsDown=C.buttons,M._setClickMaybe(!1),M.map().geoTrigger(v.mouseclick,e)},this._handleMouseWheel=function(){},this.springBack=function(t,e){d.action!==y.momentum&&(t||(s.velocity={x:0,y:0}),d.origAction=e,d.action=y.momentum,d.origin=M.mouse(),d.momentum=M.mouse(),d.start=new Date,d.handler=function(){var t,e,n,r;if(d.action===y.momentum&&M.map()&&!M.map().transition())if(r=Math.min(d.momentum.deltaTime,30),n=d.start.valueOf(),d.start=new Date,t=P(d.momentum.velocity,d.start-n)){if((e=S(t))>i.momentum.maxSpeed&&(e=i.momentum.maxSpeed/e,t.x=t.x*e,t.y=t.y*e),isFinite(t.x)&&isFinite(t.y)||(t.x=0,t.y=0),d.momentum.velocity.x=t.x,d.momentum.velocity.y=t.y,d.origAction===y.zoom){var o=d.momentum.velocity.y*r;E(-o*i.zoomScale/120,d)}else M.map().pan({x:d.momentum.velocity.x*r,y:d.momentum.velocity.y*r},void 0,"limited");d.handler&&M.map().scheduleAnimationFrame(d.handler)}else k()},d.handler&&M.map().scheduleAnimationFrame(d.handler))},this.destroy=function(){M._disconnectEvents(),M.map()&&g(M.map().node()).removeClass("highlight-focus"),M.map(null)},this.mouse=function(){return g.extend(!0,{},s)},this.keyboard=function(t){return void 0===t?g.extend(!0,{},i.keyboard||{}):M.options({keyboard:t})},this.state=function(){return g.extend(!0,{},d)},this.pause=function(t){return void 0===t?T:(T=!!t,M)},this.addAction=function(t,e){t&&t.action&&t.input&&(o.addAction(i.actions,t,e),i.map&&i.actions.some((function(t){return t.input.right}))&&(f.off("contextmenu.geojs"),f.on("contextmenu.geojs",(function(){return!1}))))},this.hasAction=function(t,e,n){return o.hasAction(i.actions,t,e,n)},this.removeAction=function(t,e,n){var r=o.removeAction(i.actions,t,e,n);return i.map&&!i.actions.some((function(t){return t.input.right}))&&f.off("contextmenu.geojs"),r},this.simulateEvent=function(t,e){var n,i,r,o,a;if(!M.map())return M;if("keyboard"===t&&l){var s={shiftKey:e.shift||e.shiftKey||!1,ctrlKey:e.ctrl||e.ctrlKey||!1,altKey:e.alt||e.altKey||!1,metaKey:e.meta||e.metaKey||!1,toString:function(){return e.keys},stopPropagation:function(){},preventDefault:function(){},simulated:!0};l.trigger(s)}else i=e.page||{},e.map&&(r=f.offset(),i.x=e.map.x+r.left,i.y=e.map.y+r.top),"left"===e.button?(o=1,a=1):"right"===e.button?(o=3,a=2):"middle"===e.button&&(o=2,a=4),e.modifiers=e.modifiers||[],e.wheelDelta=e.wheelDelta||{},n=g.Event(t,{pageX:i.x,pageY:i.y,which:o,buttons:a,altKey:e.modifiers.indexOf("alt")>=0,ctrlKey:e.modifiers.indexOf("ctrl")>=0,metaKey:e.modifiers.indexOf("meta")>=0,shiftKey:e.modifiers.indexOf("shift")>=0,center:e.center,rotation:e.touch?e.rotation||0:e.rotation,scale:e.touch?e.scale||1:e.scale,pointers:e.pointers,pointerType:e.pointerType,originalEvent:{deltaX:e.wheelDelta.x,deltaY:e.wheelDelta.y,deltaMode:e.wheelMode,preventDefault:function(){},stopPropagation:function(){},stopImmediatePropagation:function(){}}}),e.touch&&c?M._handleTouch(n):f.trigger(n),t.indexOf(".geojs")>=0&&g(document).trigger(n)},this._connectEvents(),this};i(s,r),t.exports=s},7098:function(t,e,n){var i=n(5699),r=n(6837),o=n(2557),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var i=n(5638),r=n(6618),a=n(4634),s=n(8173),l=this,u=this._init,c=null,d=r(),h=0,f=0,p=0;return this.featureType="marker",this._updateRangeTree=function(){if(!(d.timestamp()>=l.dataTime().timestamp()&&d.timestamp()>=l.timestamp())){var e,n,i=l.style.get("radius"),r=l.style.get("strokeWidth"),o=l.style.get("strokeOffset"),a=l.style.get("scaleWithZoom");n=l.position(),h=0,f=0,p=0,e=l.data().map((function(e,s){var l=n(e,s),u=a(e,s),c=i(e,s),d=r(e,s),m=Math.sign(o(e,s)),g=c+d*(m+1)/2,v=c+d*(m-1)/2;switch(u=t.scaleMode[u]||(u>=1&&u<=3?u:0)){case t.scaleMode.stroke:v>h&&(h=v),d>p&&(p=d);break;case t.scaleMode.fill:case t.scaleMode.all:g>f&&(f=g);break;default:g>h&&(h=g)}return[l.x,l.y]})),c=new s(e),d.modified()}},this._approximateMaxRadius=function(t){l._updateRangeTree();var e=Math.pow(2,t);return Math.max(h+p*e,f*e)},this.pointSearch=function(e,n){var i,r,o,a,s=[],u=[],d=[],h=l.gcs(),f=l.style.get("radius"),p=l.style.get("strokeWidth"),m=l.style.get("strokeOffset"),g=l.style.get("scaleWithZoom");if(!(o=l.data())||!o.length)return{found:[],index:[]};l._updateRangeTree();var v=l.layer().map();n=null===n?v.gcs():void 0===n?v.ingcs():n;var y=v.gcsToDisplay(e,n),x=v.zoom(),b=Math.pow(2,x),_=this._approximateMaxRadius(x);return a=[v.displayToGcs({x:y.x-_,y:y.y-_},h),v.displayToGcs({x:y.x+_,y:y.y-_},h),v.displayToGcs({x:y.x-_,y:y.y+_},h),v.displayToGcs({x:y.x+_,y:y.y+_},h)],i={x:Math.min(a[0].x,a[1].x,a[2].x,a[3].x),y:Math.min(a[0].y,a[1].y,a[2].y,a[3].y)},r={x:Math.max(a[0].x,a[1].x,a[2].x,a[3].x),y:Math.max(a[0].y,a[1].y,a[2].y,a[3].y)},(s=c.range(i.x,i.y,r.x,r.y)).sort((function(t,e){return t-e})),s.forEach((function(e){var n=o[e],i=f(o[e],e),r=g(o[e],e),a=m(o[e],e),s=r?p(o[e],e):0,c=i+s*(a-1)/2;i=c+s;var x,_,w,M=l.position()(n,e);switch(r=t.scaleMode[r]||(r>=1&&r<=3?r:0)){case t.scaleMode.fill:i=c*b+s;break;case t.scaleMode.stroke:i=c+s*b;break;case t.scaleMode.all:i*=b}i&&(w=i*i,(x=(M=v.gcsToDisplay(M,h)).x-y.x)*x+(_=M.y-y.y)*_<=w&&(u.push(n),d.push(e)))})),{found:u,index:d}},this.polygonSearch=function(e,n,i){var r,o,s,u,d=l.gcs(),h=[],f=[],p={},m=l.layer().map(),g=l.data(),v=l.style.get("radius"),y=l.style.get("strokeWidth"),x=l.style.get("strokeOffset"),b=l.style.get("scaleWithZoom"),_=m.zoom(),w=Math.pow(2,_),M=this._approximateMaxRadius(_);return i=null===i?m.gcs():void 0===i?m.ingcs():i,e.outer||(e={outer:e,inner:[]}),e.outer.length<3||!g||!g.length?{found:[],index:[],extra:{}}:((n=n||{}).partial=n.partial||!1,(e={outer:m.gcsToDisplay(e.outer,i),inner:(e.inner||[]).map((function(t){return m.gcsToDisplay(t,i)}))}).outer.forEach((function(t){o||(o={x:t.x,y:t.y},s={x:t.x,y:t.y}),t.x<o.x&&(o.x=t.x),t.x>s.x&&(s.x=t.x),t.y<o.y&&(o.y=t.y),t.y>s.y&&(s.y=t.y)})),l._updateRangeTree(),u=[m.displayToGcs({x:o.x-M,y:o.y-M},d),m.displayToGcs({x:s.x+M,y:o.y-M},d),m.displayToGcs({x:s.x+M,y:s.y+M},d),m.displayToGcs({x:o.x-M,y:s.y+M},d)],o={x:Math.min(u[0].x,u[1].x,u[2].x,u[3].x),y:Math.min(u[0].y,u[1].y,u[2].y,u[3].y)},s={x:Math.max(u[0].x,u[1].x,u[2].x,u[3].x),y:Math.max(u[0].y,u[1].y,u[2].y,u[3].y)},(r=c.range(o.x,o.y,s.x,s.y)).sort((function(t,e){return t-e})),r.forEach((function(i){var r=g[i],o=l.position()(r,i),s=v(g[i],i),u=b(g[i],i),c=x(g[i],i),_=u?y(g[i],i):0,M=s+_*(c-1)/2;switch(s=M+_,u=t.scaleMode[u]||(u>=1&&u<=3?u:0)){case t.scaleMode.fill:s=M*w+_;break;case t.scaleMode.stroke:s=M+_*w;break;case t.scaleMode.all:s*=w}if(s){o=m.gcsToDisplay(o,d);var A=a.distanceToPolygon2d(o,e);(A>=s||A>=0&&"center"===n.partial||A>=-s&&n.partial&&"center"!==n.partial)&&(h.push(r),f.push(i),p[i]={partial:A<s,distance:A})}})),{found:h,index:f,extra:p})},this._init=function(e){return e=i.extend(!0,{},{style:i.extend({},{radius:6.25,strokeColor:{r:.851,g:.604,b:0},strokeOffset:-1,strokeOpacity:1,strokeWidth:1.25,fillColor:{r:1,g:.839,b:.439},fillOpacity:.8,symbol:0,symbolValue:0,rotation:0,scaleWithZoom:t.scaleMode.none,rotateWithMap:!1},e&&void 0===e.style?{}:e.style)},e),u.call(l,e),l},l};a.create=function(t,e){"use strict";return(e=e||{}).type="marker",r.create(t,e)},a.capabilities={feature:"marker"},a.primitiveShapes=o.primitiveShapes,a.symbols={circle:0,ellipse:0,flowerBase:1,flowerMax:16,triangle:16,diamond:17,starBase:17,starMax:16,square:32,rectangle:32,crossBase:33,crossMax:16,oval:48,jackBase:49,jackMax:16,drop:64,dropBase:65,dropMax:16,arrow:80,arrowBase:81,arrowMax:16,length:96},["flower","star","cross","jack","drop","arrow"].forEach((function(t){for(var e=2;e<=a.symbols[t+"Max"];e+=1)a.symbols[t+e]=a.symbols[t+"Base"]-2+e})),a.scaleMode={none:0,fill:1,stroke:2,all:3},i(a,o),t.exports=a},9146:function(t,e,n){var i=n(5699),r=n(6837),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638),o=n(4634);e=e||{},r.call(this,e);var a=this,s=this._init,l={};return this.featureType="mesh",this.mesh=function(t,e){if(void 0===t)return l;if("string"==typeof t&&void 0===e)return l[t];if(void 0===e){var n=i.extend({},{gridWidth:function(){return t.gridHeight?Math.floor(a.data().length/t.gridHeight):Math.floor(Math.sqrt(a.data().length))},gridHeight:function(){return t.gridWidth?Math.floor(a.data().length/t.gridWidth):Math.floor(Math.sqrt(a.data().length))}},l,t);l=n}else l[t]=e;return a.modified(),a},this.mesh.get=function(t){if(void 0===t){var e,n={};for(e in l)l.hasOwnProperty(e)&&(n[e]=a.mesh.get(e));return n}return o.ensureFunction(l[t])},this.position=function(t){return void 0===t?a.style("position"):(a.style("position",t),a.dataTime().modified(),a.modified(),a)},this._createMesh=function(t,e){t=t||{},e=e||{};var n,i,r,o,s,l,u,c,d,h,f,p,m,g,v,y,x=a.data(),b=a.position(),_=a.mesh.get("elements")(x),w=a.mesh.get("elementPacking")(x),M=a.mesh.get("gridWidth")(x),A=a.mesh.get("gridHeight")(x),T=a.mesh.get("wrapLongitude")(x),C=a.mesh.get("x0")(x),E=a.mesh.get("y0")(x),S=a.mesh.get("dx")(x),k=a.mesh.get("dy")(x),P=M,O={shape:"square",elements:[],elementIndex:[]};if(_){var R=_.length&&Array.isArray(_[0]);if("square"===w||"triangle"!==w&&(!R&&!(_.length%4)&&_.length%3||R&&4===_[0].length))if(O.shape="square",R)for(n=0;n<_.length;n+=1)O.elements.push(_[n][0]),O.elements.push(_[n][1]),O.elements.push(_[n][3]),O.elements.push(_[n][2]),O.elements.push(_[n][3]),O.elements.push(_[n][1]),O.elementIndex.push(n),O.elementIndex.push(n);else for(n=r=0;n<_.length-3;n+=4,r+=1)O.elements.push(_[n]),O.elements.push(_[n+1]),O.elements.push(_[n+3]),O.elements.push(_[n+2]),O.elements.push(_[n+3]),O.elements.push(_[n+1]),O.elementIndex.push(r),O.elementIndex.push(r);else if(O.shape="triangle",R)for(n=0;n<_.length;n+=1)O.elements.push(_[n][0]),O.elements.push(_[n][1]),O.elements.push(_[n][2]),O.elementIndex.push(n);else for(O.elements=_.slice(0,_.length-_.length%3),n=r=0;n<_.length-2;n+=3,r+=1)O.elementIndex.push(r);l=x.length,c=!0}else{if(Object.keys(t).length?M*A>x.length&&(A=Math.floor(x.length/M)):Object.keys(e).length&&(M-1)*(A-1)>x.length&&(A=Math.floor(x.length/(M-1))+1),T=!(void 0!==T&&!T),!(c=null==C||null==E||!S||!k)&&T&&(C<-180||C>180||C+S*(M-1)<-180||C+S*(M-1)>180)&&S>-180&&S<180&&S*(M-1)<360.0001){for(p=[],m=[],n=0;n<M;n+=1){for(v=C+n*S;v<-180;)v+=360;for(;v>180;)v-=360;n&&Math.abs(v-p[p.length-1])>180&&(v>p[p.length-1]?(p.push(v-360),p.push(p[p.length-2]+360),m.push(n),m.push(n+1)):(p.push(v+360),p.push(p[p.length-2]-360),m.push(n),m.push(n+1)),g=n),p.push(v),m.push(n)}if(M+=2,Math.abs(Math.abs(P*S)-360)<.01){for(M+=1,v=C+P*S;v<-180;)v+=360;for(;v>180;)v-=360;p.push(v),m.push(0)}}if(l=M*A,void 0!==g)for(O.index=new Array(l),n=0;n<l;n+=1)y=n-(r=Math.floor(n/M))*M,(y+=y>g?-2:0)>=P&&(y-=P),y+=r*P,O.index[n]=y;for(r=s=0;r<A-1;r+=1,s+=1)for(n=0;n<M-1;n+=1,s+=1)n!==g&&(O.elements.push(s),O.elements.push(s+1),O.elements.push(s+M),O.elements.push(s+M+1),O.elements.push(s+M),O.elements.push(s+1),O.elementIndex.push(r*(M-1)+(m?m[n]:n)),O.elementIndex.push(r*(M-1)+(m?m[n]:n)))}O.verticesPerElement="triangle"===O.shape?3:6;var L=O.verticesPerElement;if(e.used){var D=new Array(O.elementIndex[O.elementIndex.length-1]+1);for(n=0;n<D.length;n+=1)D[n]=e.used(x[n],n);for(n=0;n<O.elementIndex.length&&D[O.elementIndex[n]];n+=1);if(n<O.elementIndex.length){for(r=n;n<O.elementIndex.length;n+=1)if(D[O.elementIndex[n]]){for(O.elementIndex[r]=O.elementIndex[n],o=0;o<3;o+=1)O.elements[3*r+o]=O.elements[3*n+o];r+=1}O.elements.splice(3*r),O.elementIndex.splice(r)}}if(t.used){for(n=0;n<l&&(s=O.index?O.index[n]:n,t.used(x[s],s));n+=1);if(n!==l){u=n;var I=new Array(l);for(r=0;r<u;r+=1)I[r]=r;if(I[u]=-1,!O.index)for(O.index=new Array(x.length),r=0;r<x.length;r+=1)O.index[r]=r;for(n=u+1;n<l;n+=1)s=O.index[n],t.used(x[s],s)?(I[n]=u,O.index[u]=O.index[n],u+=1):I[n]=-1;for(O.index.splice(u),n=o=0;n<O.elements.length;n+=L){for(r=0;r<L&&!(I[O.elements[n+r]]<0);r+=1)O.elements[o+r]=I[O.elements[n+r]];r===L&&(O.elementIndex[Math.floor(o/3)]=O.elementIndex[Math.floor(n/3)],6===L&&(O.elementIndex[Math.floor(o/3)+1]=O.elementIndex[Math.floor(n/3)+1]),o+=L)}O.elements.splice(o),O.elementIndex.splice(Math.floor(o/3)),l=u}}if(e.used&&void 0===g){var F=new Array(l),j=O.index;for(O.index=[],n=0;n<O.elements.length;n+=1)void 0===F[o=O.elements[n]]&&(F[o]=O.index.length,O.index.push(j?j[o]:o)),O.elements[n]=F[o];l=O.index.length}for(h in O.pos=new Array(3*l),t)"used"!==h&&t.hasOwnProperty(h)&&(O[h]=new Array(l));for(n=i=0;n<l;n+=1,i+=3)for(h in d=x[s=O.index?O.index[n]:n],c?(f=b(d,s),O.pos[i]=f.x,O.pos[i+1]=f.y,O.pos[i+2]=f.z||0):(O.pos[i]=void 0===g?C+S*(s%M):p[n%M],O.pos[i+1]=E+k*Math.floor(s/M),O.pos[i+2]=0,f={x:O.pos[i],y:O.pos[i+1],z:O.pos[i+2]}),t)"used"!==h&&t.hasOwnProperty(h)&&(O[h][n]=t[h](d,s,f));for(h in e)if("used"!==h&&e.hasOwnProperty(h)){var z=e[h];for(O[h]=new Array(O.elementIndex.length),n=0;n<O.elementIndex.length;n+=1)d=x[s=O.elementIndex[n]],O[h][n]=z(d,s)}return O.numVertices=l,O.numElements=O.elements.length/O.verticesPerElement,O},this._init=function(t){s.call(a,t),t=t||{};var e=i.extend({},{position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t}},t.style||{});a.mesh(t.mesh||{}),a.style(e)},this};i(o,r),t.exports=o},3737:function(t,e,n){var i=n(5699),r=n(6618),o=0,a=function t(){"use strict";if(!(this instanceof t))return new t;var e=n(4634),i=this,a=++o,s={},l=[],u=0;return this.onIdle=function(t){return u?l.push(t):t(),i},Object.defineProperty(this,"idle",{get:function(){return!u},configurable:!0}),Object.defineProperty(this,"_promises",{get:function(){return u},configurable:!0}),this.addPromise=function(t){function e(){t._geojsTracked&&t._geojsTracked[a]&&(u-=1,delete t._geojsTracked[a]),u||l.splice(0,l.length).forEach((function(t){t()}))}return t._geojsTracked||(t._geojsTracked={}),t._geojsTracked[a]||(t._geojsTracked[a]=!0,u+=1),t.always?t.always(e):t.then(e,e),i},this.removePromise=function(t){return t._geojsTracked&&t._geojsTracked[a]&&(u-=1,delete t._geojsTracked[a],u||l.splice(0,l.length).forEach((function(t){t()}))),i},this.geoOn=function(t,n){return Array.isArray(t)?(t.forEach((function(t){i.geoOn(t,n)})),i):e.isFunction(n)?(s.hasOwnProperty(t)||(s[t]=[]),s[t].push(n),i):(console.warn("Handler for "+t+" is not a function",n,i),i)},this.geoOnce=function(t,e){var n=function n(r){i.geoOff(t,n),e.call(i,r)};return i.geoOn(t,n),n},this.geoIsOn=function(t,e){return Array.isArray(t)?t.some((function(t){return i.geoIsOn(t,e)})):(s[t]||[]).some((function(t){return t===e||void 0===e}))},this.geoTrigger=function(t,e){return Array.isArray(t)?(t.forEach((function(t){i.geoTrigger(t,e)})),i):((e=e||{}).event=t,s.hasOwnProperty(t)&&s[t].forEach((function(n){try{n.call(i,e)}catch(e){console.warn("Event handler for "+t+" threw an error",e)}})),i)},this.geoOff=function(t,e){if(void 0===t&&(s={},l=[],u=0,a=++o),Array.isArray(t))return t.forEach((function(t){i.geoOff(t,e)})),i;if(e){if(Array.isArray(e))return e.forEach((function(e){i.geoOff(t,e)})),i}else s[t]=[];return s.hasOwnProperty(t)&&(s[t]=s[t].filter((function(t){return t!==e}))),i},this._exit=function(){i.geoOff()},r.call(this),this.modified(),this};i(a,r),t.exports=a},8622:function(t,e,n){var i=n(5638),r=n(5699),o=n(1940),a=n(4647),s=n(5017),l=function t(e){var r=n(4665);if(!(this instanceof t))return new t(e);void 0!==(e=e||{}).mapOpacity&&void 0===e.opacity&&((e=i.extend({},e)).opacity=e.mapOpacity),e=i.extend(!0,{},this.constructor.defaults,t.tileSources[this.constructor.defaults.source]||{},t.tileSources[e.source]||{},{name:""},e),o.call(this,e);var a=this;this.mapOpacity=this.opacity,this._getTile=function(t,e){var n=e||t;return r({index:t,size:{x:a._options.tileWidth,y:a._options.tileHeight},queue:a._queue,overlap:a._options.tileOverlap,scale:a._options.tileScale,url:a._options.url.call(a,n.x,n.y,n.level||0,a._options.subdomains),crossDomain:a._options.crossDomain})},this.source=function(e){if(void 0!==e)return t.tileSources[e]&&(a.url(t.tileSources[e].url),a.subdomains(t.tileSources[e].subdomains||"abc"),a.attribution(t.tileSources[e].attribution||""),a._options.maxLevel=t.tileSources[e].maxLevel||18,a._options.minLevel=t.tileSources[e].minLevel||0),a;for(var n in t.tileSources)if(t.tileSources[n].url===a.url())return n}};l.defaults=i.extend({},o.defaults,{tileOffset:function(t){var e=256*Math.pow(2,t-1);return{x:e,y:e}},url:"",source:"stamen-toner-lite"});var u='Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',c='<a href="https://carto.com"> Carto</a> Contributors <a href="https://www.openstreetmap.org/"> OpenStreetMap</a>';l.tileSources={"dark-matter-with-labels":{url:" https://{s}.basemaps.cartocdn.com/rastertiles/dark_all/{z}/{x}/{y}.png",attribution:c,name:"Carto Dark Matter With Labels",minLevel:0,maxLevel:18},"dark-matter-without-labels":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/dark_nolabels/{z}/{x}/{y}.png",attribution:c,name:"Carto Dark Matter Without Labels",minLevel:0,maxLevel:18},"nationalmap-satellite":{url:"https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}",attribution:'Tile data from <a href="https://basemap.nationalmap.gov/">USGS</a>',name:"National Map Satellite",minLevel:0,maxLevel:16},osm:{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'Tile data &copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors',name:"OpenStreetMap",subdomains:"abc",minLevel:0,maxLevel:19},"positron-with-labels":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/light_all/{z}/{x}/{y}.png",attribution:c,name:"Carto Positron With Labels",minLevel:0,maxLevel:18},"positron-without-labels":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/light_nolabels/{z}/{x}/{y}.png",attribution:c,name:"Carto Positron Without Labels",minLevel:0,maxLevel:18},"stamen-terrain":{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png",attribution:u,name:"Stamen Terrain",subdomains:"abcd",minLevel:0,maxLevel:14},"stamen-terrain-background":{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/terrain-background/{z}/{x}/{y}.png",attribution:u,name:"Stamen Terrain Background",subdomains:"abcd",minLevel:0,maxLevel:14},"stamen-toner":{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.png",attribution:u,name:"Stamen Toner",subdomains:"abcd",minLevel:0,maxLevel:20},"stamen-toner-lite":{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.png",attribution:u,name:"Stamen Toner Lite",subdomains:"abcd",minLevel:0,maxLevel:20},"voyager-with-labels":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/voyager_labels_under/{z}/{x}/{y}.png",attribution:c,name:"Carto Voyager With Labels",minLevel:0,maxLevel:18},"voyager-without-layers":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/voyager_nolabels/{z}/{x}/{y}.png",attribution:c,name:"Carto Voyager Without Layers",minLevel:0,maxLevel:18}},r(l,o),a.registerLayer("osm",l,[s.capabilities.image]),t.exports=l},6565:function(t,e,n){var i=n(5638),r=n(5699),o=n(6837),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var n=this,r=this._init;return this.featureType="path",this.position=function(t){return void 0===t?n.style("position"):(t!==n.style("position")&&(n.style("position",t),n.dataTime().modified(),n.modified()),n)},this._init=function(t){r.call(n,t);var e=i.extend({},{strokeWidth:1,strokeColor:{r:1,g:1,b:1},position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t}},void 0===t.style?{}:t.style);return void 0!==t.position&&(e.position=t.position),n.style(e),e.position&&n.position(e.position),n.dataTime().modified(),n},this._init(e),this};r(a,o),t.exports=a},6374:function(t,e,n){var i=n(5638),r=n(5699),o=n(6837),a=n(4634),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var n,r=this,s=this._update,l=this._init;return this.featureType="pixelmap",this.position=function(t){return void 0===t?r.style("position"):(t!==r.style("position")&&(r.style("position",t),r.dataTime().modified(),r.modified()),r)},this.url=function(t){return void 0===t?r.style("url"):(t!==r.style("url")&&(r.m_srcImage=r.m_info=void 0,r.style("url",t),r.dataTime().modified(),r.modified()),r)},this.color=function(t){return void 0===t?r.style("color"):(t!==r.style("color")&&(r.style("color",t),r.dataTime().modified(),r.modified()),r)},this.indexModified=function(t,e){if(void 0===t){var i=n;return"clear"===e&&(n=void 0),i}return r.modified(),void 0===n&&(n=[t,t]),t<n[0]&&(n[0]=t),(e||t)>n[1]&&(n[1]=e||t),r},this._update=function(){return s.call(r),(r.buildTime().timestamp()<=r.dataTime().timestamp()||r.updateTime().timestamp()<r.timestamp())&&r._build(),r.updateTime().modified(),r},this.maxIndex=function(){if(r.m_info){if(void 0===r.m_info.maxIndex)for(var t in r.m_info.maxIndex=0,r.m_info.mappedColors)r.m_info.mappedColors.hasOwnProperty(t)&&(r.m_info.maxIndex=Math.max(r.m_info.maxIndex,t));return r.m_info.maxIndex}},this._computePixelmap=function(){},this._build=function(){if(r.m_srcImage)r.m_info&&r._computePixelmap();else{var t=r.style.get("url")();if(a.isReadyImage(t))r.m_srcImage=t,r._computePixelmap();else if(t){var e,n,o=i.Deferred();t instanceof Image?(r.m_srcImage=t,e=t.onload,n=t.onerror):(r.m_srcImage=new Image,t.indexOf(":")>=0&&t.indexOf("/")===t.indexOf(":")+1&&(r.m_srcImage.crossOrigin=r.style.get("crossDomain")()||"anonymous")),r.m_srcImage.onload=function(){e&&e.apply(r,arguments),r.style.get("url")()===t&&(r.m_info=void 0,r._computePixelmap()),o.resolve()},r.m_srcImage.onerror=function(){n&&n.apply(r,arguments),o.reject()},o.promise(r),r.layer().addPromise(r),t instanceof Image||(r.m_srcImage.src=t)}}return r.buildTime().modified(),r},this._init=function(t){t=t||{},l.call(r,t);var e=i.extend({},{color:function(t,e){return{r:(255&e)/255,g:(e>>8&255)/255,b:(e>>16&255)/255,a:1}},position:function(t){return t}},void 0===t.style?{}:t.style);return void 0!==t.position&&(e.position=t.position),void 0!==t.url&&(e.url=t.url),void 0!==t.color&&(e.color=t.color),r.style(e),r.dataTime().modified(),t.quadFeature&&(r.m_srcImage=!0,r._computePixelmap()),r},this};s.create=function(t,e){"use strict";return(e=e||{}).type="pixelmap",o.create(t,e)},s.capabilities={feature:"pixelmap",lookup:"pixelmap.lookup"},r(s,o),t.exports=s},809:function(t,e,n){var i=n(5638),r=n(5699),o=n(1940),a=n(4647),s=n(5017),l=n(6374),u=function t(e){var r=n(4665);if(!(this instanceof t))return new t(e);e=e||{},e=i.extend(!0,{},this.constructor.defaults,e),o.call(this,e);var a,s=this._init,l=this;return this._getTile=function(t,e){var n=e||t;return r({index:t,size:{x:l._options.tileWidth,y:l._options.tileHeight},queue:l._queue,overlap:l._options.tileOverlap,scale:l._options.tileScale,url:l._options.url.call(l,n.x,n.y,n.level||0,l._options.subdomains),crossDomain:l._options.crossDomain})},this._init=function(){s.apply(l,arguments);var t={quadFeature:l.features()[0]};e.style&&(t.style=e.style),e.color&&(t.color=e.color),a=l.createFeature("pixelmap",t),e.data&&a.data(e.data),l.style=a.style,l.data=a.data,l.indexModified=a.indexModified;var n=l.dataTime().modified;return l.dataTime().modified=function(){return a.dataTime().modified(),n()},["modified","geoOn","geoOff","geoOnce"].forEach((function(t){var e=l[t];l[t]=function(){return a[t].apply(this,arguments),e.apply(this,arguments)}})),l},l};u.defaults=i.extend({},o.defaults,{features:[s.capabilities.image,l.capabilities.lookup],tileOffset:function(t){var e=256*Math.pow(2,t-1);return{x:e,y:e}},url:""}),r(u,o),a.registerLayer("pixelmap",u,[s.capabilities.image]),t.exports=u},2557:function(t,e,n){var i=n(5699),r=n(6837),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},r.call(this,e);var i=n(5638),o=n(6618),a=n(9808),s=n(5108),l=n(4634),u=n(8173),c=this,d=this._init,h=null,f=o(),p=this.data,m=0,g=e.clustering,v=null,y=[],x=null,b=!1;return this.featureType="point",this.clustering=function(t){return void 0===t?g:(g&&!t?(v=null,g=!1,p(y)):t&&g!==t&&(g=t,c._clusterData()),c)},this._clusterData=function(){if(g){var t=!0===g?{radius:10}:g,e=c.position(),n=c.layer().map(),r=n.gcsToDisplay(n.center(void 0,null),null),o=n.displayToGcs(r,c.gcs()),s=n.displayToGcs({x:r.x+t.radius,y:r.y},c.gcs()),u=Math.pow(Math.pow(s.y-o.y,2)+Math.pow(s.x-o.x,2),.5),d=n.zoom(),h=u*Math.pow(2,d);t=i.extend({},t,{radius:h}),v=new a(t),y.forEach((function(t,n){var i=l.normalizeCoordinates(e(t,n));i.index=n,v.addPoint(i)})),x=null,c._handleZoom(n.zoom())}},this._handleZoom=function(t){var e=Math.floor(t);if(g&&e!==x){x=e;var n=v.points(e).map((function(t){return y[t.index]}));v.clusters(e).forEach((function(t){t.__cluster=!0,t.__data=[],t.obj.each((function(e){t.__data.push(y[e.index])})),n.push(t)})),b=!0,c.data(n)}},this.position=function(t){if(void 0===t)return c.style("position");var e=l.isFunction(t);return c.style("position",(function(n,i){return null!=n&&n.__cluster?n:e?t(n,i):t})),c.dataTime().modified(),c.modified(),c},this._updateRangeTree=function(){if(!(f.timestamp()>=c.dataTime().timestamp()&&f.timestamp()>=c.timestamp())){var t,e,n=c.style.get("radius"),i=c.style.get("stroke"),r=c.style.get("strokeWidth");e=c.position(),m=0,t=c.data().map((function(t,o){var a=e(t,o);return m=Math.max(m,n(t,o)+(i(t,o)?r(t,o):0)),[a.x,a.y]})),h=new u(t),f.modified()}},this.pointSearch=function(t,e){var n,i,r,o,a,s,l=[],u=[],d=[],f=c.gcs(),p=c.style.get("fill"),g=c.style.get("stroke"),v=c.style.get("strokeWidth"),y=c.style.get("radius");return(r=c.data())&&r.length?(c._updateRangeTree(),o=c.layer().map(),a=o.gcsToDisplay(t,e),s=[o.displayToGcs({x:a.x-m,y:a.y-m},f),o.displayToGcs({x:a.x+m,y:a.y-m},f),o.displayToGcs({x:a.x-m,y:a.y+m},f),o.displayToGcs({x:a.x+m,y:a.y+m},f)],n={x:Math.min(s[0].x,s[1].x,s[2].x,s[3].x),y:Math.min(s[0].y,s[1].y,s[2].y,s[3].y)},i={x:Math.max(s[0].x,s[1].x,s[2].x,s[3].x),y:Math.max(s[0].y,s[1].y,s[2].y,s[3].y)},(l=h.range(n.x,n.y,i.x,i.y)).sort((function(t,e){return t-e})),l.forEach((function(t){var e=r[t],n=g(r[t],t);if(n||p(r[t],t)){var i,s,l,h,m=c.position()(e,t);l=y(r[t],t),(l+=n?v(r[t],t):0)&&(h=l*l,(i=(m=o.gcsToDisplay(m,f)).x-a.x)*i+(s=m.y-a.y)*s<=h&&(u.push(e),d.push(t)))}})),{found:u,index:d}):{found:[],index:[]}},this.polygonSearch=function(t,e,n){var i,r,o,a,s=c.gcs(),u=[],d=[],f={},p=c.layer().map(),g=c.data(),v=c.style.get("fill"),y=c.style.get("stroke"),x=c.style.get("strokeWidth"),b=c.style.get("radius");return t.outer||(t={outer:t,inner:[]}),t.outer.length<3||!g||!g.length?{found:[],index:[],extra:{}}:((e=e||{}).partial=e.partial||!1,(t={outer:p.gcsToDisplay(t.outer,n),inner:(t.inner||[]).map((function(t){return p.gcsToDisplay(t,n)}))}).outer.forEach((function(t){r||(r={x:t.x,y:t.y},o={x:t.x,y:t.y}),t.x<r.x&&(r.x=t.x),t.x>o.x&&(o.x=t.x),t.y<r.y&&(r.y=t.y),t.y>o.y&&(o.y=t.y)})),c._updateRangeTree(),a=[p.displayToGcs({x:r.x-m,y:r.y-m},s),p.displayToGcs({x:o.x+m,y:r.y-m},s),p.displayToGcs({x:o.x+m,y:o.y+m},s),p.displayToGcs({x:r.x-m,y:o.y+m},s)],r={x:Math.min(a[0].x,a[1].x,a[2].x,a[3].x),y:Math.min(a[0].y,a[1].y,a[2].y,a[3].y)},o={x:Math.max(a[0].x,a[1].x,a[2].x,a[3].x),y:Math.max(a[0].y,a[1].y,a[2].y,a[3].y)},(i=h.range(r.x,r.y,o.x,o.y)).sort((function(t,e){return t-e})),i.forEach((function(n){var i=g[n],r=y(g[n],n);if(r||v(g[n],n)){var o=c.position()(i,n),a=b(g[n],n);if(a+=r?x(g[n],n):0){o=p.gcsToDisplay(o,s);var h=l.distanceToPolygon2d(o,t);(h>=a||h>=0&&"center"===e.partial||h>=-a&&e.partial&&"center"!==e.partial)&&(u.push(i),d.push(n),f[n]={partial:h<a,distance:h})}}})),{found:u,index:d,extra:f})},this.data=function(t){return void 0===t?p():(b||(y=t),g&&!b?c._clusterData():p(t),b=!1,c)},this._init=function(t){t=t||{},d.call(c,t);var e=i.extend(!0,{},{radius:5,stroke:!0,strokeColor:{r:.851,g:.604,b:0},strokeWidth:1.25,strokeOpacity:1,fillColor:{r:1,g:.839,b:.439},fill:!0,fillOpacity:.8,position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t},origin:function(t){return t.length>=3?t.slice(0,3):[0,0,0]}},void 0===t.style?{}:t.style);return void 0!==t.position&&(e.position=t.position),c.style(e),e.position&&c.position(e.position),c.dataTime().modified(),c.geoOn(s.zoom,(function(t){c._handleZoom(t.zoomLevel)})),c},c};o.create=function(t,e){"use strict";return(e=e||{}).type="point",r.create(t,e)},o.capabilities={feature:"point",stroke:"point.stroke"},o.primitiveShapes={auto:"auto",sprite:"sprite",triangle:"triangle",square:"square"},i(o,r),t.exports=o},4343:function(t,e,n){var i=n(5638),r=n(5699),o=n(6837),a=n(6853),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var r,s=n(4634),l=this,u=this._init,c=this._exit,d=this.data,h=this.draw,f=this.modified,p=this.style,m=[];function g(t,e,n){var i=l.gcs(),r=l.layer().map().gcs();return t=t||l.data(),e=e||l.style.get("position"),n=n||l.style.get("polygon"),t.map((function(t,o){var s=n(t,o);if(s){var u,c,d,h,f,p,m,g,v,y;for(h=s.outer||(Array.isArray(s)?s:[]),u=new Array(h.length),f=0;f<h.length;f+=1)u[f]=e.call(l,h[f],f,t,o),p=u[f].x,m=u[f].y,f?(p<d.min.x&&(d.min.x=p),m<d.min.y&&(d.min.y=m),p>d.max.x&&(d.max.x=p),m>d.max.y&&(d.max.y=m)):d={min:{x:p,y:m},max:{x:p,y:m}};for(c=(s.inner||[]).map((function(n){h=n||[];var i=new Array(h.length);for(f=0;f<h.length;f+=1)i[f]=e.call(l,h[f],f,t,o);return i})),g=a.transformCoordinates(i,r,u),v=c.map((function(t){return a.transformCoordinates(i,r,t)})),f=0;f<g.length;f+=1)p=g[f].x,m=g[f].y,f?(p<y.min.x&&(y.min.x=p),m<y.min.y&&(y.min.y=m),p>y.max.x&&(y.max.x=p),m>y.max.y&&(y.max.y=m)):y={min:{x:p,y:m},max:{x:p,y:m}};return{outer:u,inner:c,range:d,mapouter:g,mapinner:v,maprange:y}}}))}function v(t){return s.isFunction(t)?function(e){return t(e[0],e[1],e[2],e[3])}:t}return this.featureType="polygon",this._subfeatureStyles={fillColor:!0,fillOpacity:!0,lineCap:!0,lineJoin:!0,strokeColor:!0,strokeOffset:!0,strokeOpacity:!0,strokeWidth:!0},this.data=function(t){var e=d(t);return void 0!==t&&(m=g(),l._checkForStroke()),e},this.polygonCoordinates=function(){return m},this.polygon=function(t){return void 0===t?l.style("polygon"):(l.style("polygon",t),l.dataTime().modified(),l.modified(),m=g(),l)},this.position=function(t){return void 0===t?l.style("position"):(l.style("position",t),l.dataTime().modified(),l.modified(),m=g(),l)},this.pointSearch=function(t,e){var n=[],i=[],o={},u=l.data(),c=l.layer().map();e=null===e?c.gcs():void 0===e?c.ingcs():e;var d=a.transformCoordinates(e,c.gcs(),t);(m.forEach((function(t,e){s.pointInPolygon(d,t.mapouter,t.mapinner,t.maprange)&&(i.push(e),o[e]=!0,n.push(u[e]))})),r)&&r.pointSearch(t).found.forEach((function(t){t.length&&4===t[0].length&&!o[t[0][3]]&&(i.push(t[0][3]),o[t[0][3]]=!0,n.push(u[t[0][3]]))}));return{index:i,found:n}},this.polygonSearch=function(t,e,n){var i,o,u=l.data(),c=[],d=[],h={},f=t,p={},g=l.layer().map();if(n=null===n?g.gcs():void 0===n?g.ingcs():n,t.outer||(t={outer:t,inner:[]}),!u||!u.length||t.outer.length<3)return{found:d,index:c,extra:h};if((e=e||{}).partial=e.partial||!1,(t={outer:a.transformCoordinates(n,g.gcs(),t.outer),inner:(t.inner||[]).map((function(t){return a.transformCoordinates(n,g.gcs(),t)}))}).outer.forEach((function(t){i||(i={x:t.x,y:t.y},o={x:t.x,y:t.y}),t.x<i.x&&(i.x=t.x),t.x>o.x&&(o.x=t.x),t.y<i.y&&(i.y=t.y),t.y>o.y&&(o.y=t.y)})),m.forEach((function(n,r){if(!(!n.mapouter.length||n.maprange&&(n.maprange.max.x<i.x||n.maprange.min.x>o.x||n.maprange.max.y<i.y||n.maprange.min.y>o.y))){for(var a,l,f=-1;f<n.mapinner.length&&!l;f+=1)for(var m=f<0?n.mapouter:n.mapinner[f],g=0,v=m.length,y=v-1;g<v;y=g,g+=1){var x=s.distanceToPolygon2d(m[g],t);if(x*s.distanceToPolygon2d(m[y],t)<0){l=!0;break}if(s.crossedLineSegmentPolygon2d(m[g],m[y],t)){l=!0;break}x>0&&(a=!0)}a||l||!s.pointInPolygon(t.outer[0],n.mapouter,n.mapinner,n.maprange)||(l=!0),(!e.partial&&a&&!l||e.partial&&(a||l))&&(c.push(r),d.push(u[r]),h[r]={partial:l},p[r]=!0)}})),r){var v=r.polygonSearch(f,e);v.found.forEach((function(t,e){t.length&&4===t[0].length&&(p[t[0][3]]||(c.push(t[0][3]),p[t[0][3]]=!0,d.push(u[t[0][3]]),h[v.index[e]]={partial:!1}),v.extra[v.index[e]].partial&&(h[t[0][3]].partial=!0))}))}return{found:d,index:c,extra:h}},this.style=function(t,e){var n=p.apply(l,arguments);return void 0===t||"string"==typeof t&&void 0===e||l._checkForStroke(),n},this.style.get=p.get,this._getLoopData=function(t,e,n){var i,r=[];for(i=0;i<n.length;i+=1)r.push([n[i],i,t,e]);return r},this._checkForStroke=function(){if(!1!==p("stroke")){if(l.layer()){r||(r=l.layer().createFeature("line",{selectionAPI:!1,gcs:l.gcs(),visible:l.visible(void 0,!0)}),l.dependentFeatures([r]));var t,e=l.style();if(s.isFunction(e.stroke)||!e.stroke){var n=l.style.get("stroke"),i=l.style.get("strokeOpacity");t=function(t){return n(t[2],t[3])?i(t[0],t[1],t[2],t[3]):0}}else t=v(e.strokeOpacity);r.style({antialiasing:v(e.antialiasing),closed:!0,lineCap:v(e.lineCap),lineJoin:v(e.lineJoin),miterLimit:v(e.miterLimit),strokeWidth:v(e.strokeWidth),strokeStyle:v(e.strokeStyle),strokeColor:v(e.strokeColor),strokeOffset:v(e.strokeOffset),strokeOpacity:t});var o=l.data(),a=l.style("position");if(o!==r._lastData||a!==r._lastPosVal){var u,c,d,h=[],f=l.style.get("position"),m=l.style.get("polygon");for(u=0;u<o.length;u+=1)(c=m(o[u],u))&&(d=c.outer||(Array.isArray(c)?c:[])).length>=2&&(h.push(l._getLoopData(o[u],u,d)),c.inner&&c.inner.forEach((function(t){t.length>=2&&h.push(l._getLoopData(o[u],u,t))})));r.position((function(t,e,n,i){return f(t[0],t[1],t[2],t[3])})),r.data(h),r._lastData=o,r._lastPosVal=a}}}else r&&l.layer()&&(l.layer().deleteFeature(r),r=null,l.dependentFeatures([]))},this.draw=function(){var t=h();return r&&r.draw(),t},this.modified=function(){var t=f();return r&&r.modified(),t},this.rdpSimplifyData=function(t,e,n,i){var r=l.layer().map(),o=r.gcs(),u=l.gcs(),c=g(t,n,i);return void 0===e&&(e=.5*r.unitsPerPixel(r.zoom())),c=c.map((function(t){return{outer:a.transformCoordinates(u,o,t.outer),inner:t.inner.map((function(t){return a.transformCoordinates(u,o,t)}))}})),t=t.map((function(t,n){var i=c[n],r={};for(var l in t)!t.hasOwnProperty(l)||Array.isArray(t)&&l>=0&&l<t.length||(r[l]=t[l]);if(i&&i.outer.length>=3)if(r.inner=i.inner.filter((function(t){return t.length>=3})),r.outer=s.rdpLineSimplify(i.outer,e,!0,r.inner),r.outer.length>=3){var d=r.inner.slice();r.inner.map((function(t,n){d[n]=r.outer;var i=s.rdpLineSimplify(t,e,!0,d);return d[n]=i,i})).filter((function(t){return t.length>=3})),r.outer=a.transformCoordinates(o,u,r.outer),r.inner=r.inner.map((function(t){return a.transformCoordinates(o,u,t)}))}else r.outer=r.inner=[];else r.outer=[];return r})),l.style("position",(function(t){return t})),l.style("polygon",(function(t){return t})),l.data(t),l},this.mouseOverOrderClosestBorder=function(t){var e=t.feature.data(),n=t.feature.layer().map(),i=a.transformCoordinates(n.ingcs(),t.feature.gcs(),t.mouse.geo),r=t.feature.polygonCoordinates(),o={};t.over.index.forEach((function(t,e){var n,a=r[t];a.outer.forEach((function(t,e){var r=a.outer[(e+1)%a.outer.length],o=s.distance2dToLineSquared(i,t,r);(void 0===n||o<n)&&(n=o)})),a.inner.forEach((function(t){t.forEach((function(e,r){var o=t[(r+1)%t.length],a=s.distance2dToLineSquared(i,e,o);(void 0===n||a<n)&&(n=a)}))})),o[t]=n})),t.over.index.sort((function(t,e){return o[t]-o[e]})).reverse(),t.over.index.forEach((function(n,i){t.over.found[i]=e[n]}))},this._exit=function(){r&&l.layer()&&(l.layer().deleteFeature(r),r=null,l.dependentFeatures([])),c()},this._init=function(t){t=t||{},u.call(l,t);var e=i.extend({},{fill:!0,fillColor:{r:0,g:.5,b:.5},fillOpacity:1,stroke:!1,strokeWidth:1,strokeStyle:"solid",strokeColor:{r:0,g:1,b:1},strokeOpacity:1,polygon:function(t){return t},position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t},origin:function(t){for(var e=0;e<t.length;e+=1)if(t[e].vertices.length>=3)return t[e].vertices.slice(0,3);return[0,0,0]}},void 0===t.style?{}:t.style);void 0!==t.polygon&&(e.polygon=t.polygon),void 0!==t.position&&(e.position=t.position),l.style(e),l._checkForStroke()},this};s.create=function(t,e){"use strict";return(e=e||{}).type="polygon",o.create(t,e)},s.capabilities={feature:"polygon"},r(s,o),t.exports=s},5017:function(t,e,n){var i=n(5638),r=n(5699),o=n(6837),a=function t(e){"use strict";var r=n(6853),a=n(4634);if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var s,l,u=this,c=this._init,d=0,h=[],f=[];return this.featureType="quad",this._objectListStart=function(t){i.each(t,(function(t,e){e.used=!1}))},this._objectListGet=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].entry===e)return t[n].used=!0,t[n].value},this._objectListAdd=function(t,e,n){t.push({entry:e,value:n,used:!0})},this._objectListEnd=function(t){for(var e=t.length-1;e>=0;e-=1)t[e].used||t.splice(e,1)},this.pointSearch=function(t,e){var n,o,s=[],c=[],d={},h=[{},{},{},{}],f=[{},{},{},{}],p=[0,1,2,0],m=[1,2,3,1],g=u.data(),v=u.layer().map();return e=null===e?v.gcs():void 0===e?v.ingcs():e,t=r.transformCoordinates(e,v.gcs(),t),l||u._generateQuads(),i.each([l.clrQuads,l.imgQuads,l.vidQuads],(function(e,i){i.forEach((function(e,i){for(n=0;n<p.length;n+=1)h[n].x=e.pos[3*p[n]],h[n].y=e.pos[3*p[n]+1],h[n].z=e.pos[3*p[n]+2],f[n].x=e.pos[3*m[n]],f[n].y=e.pos[3*m[n]+1],f[n].z=e.pos[3*m[n]+2];(a.pointInPolygon(t,h)||a.pointInPolygon(t,f))&&(c.push(e.idx),s.push(g[e.idx]),!(o=a.pointToTriangleBasis2d(t,h[0],h[1],h[2]))||o.x+o.y>1?(o=a.pointToTriangleBasis2d(t,f[2],f[1],f[0]))&&(o.x=1-o.x):o.y=1-o.y,o&&(d[e.idx]={basis:o,_quad:e}))}))})),{index:c,found:s,extra:d}},this.position=function(t){return void 0===t?u.style("position"):(u.style("position",a.ensureFunction(t)),u.dataTime().modified(),u.modified(),u)},this._positionToQuad=function(t,e,n,o){var a=t.call(u,n,o);if(a.ll&&a.ur||a.ul&&a.lr){var s=u.gcs(),l=u.layer().map().gcs(),c={};return i.each(["ll","lr","ul","ur"],(function(t,i){void 0!==a[i]&&(c[i]={},void 0===a[i].x?c[i]=[a[i][0],a[i][1],a[i][2]]:c[i]=[a[i].x,a[i].y,a[i].z],void 0===c[i][2]&&(c[i][2]=e.call(u,n,o)),s!==l&&!1!==s&&(c[i]=r.transformCoordinates(s,l,c[i])))})),c.ll=c.ll||[c.ul[0],c.lr[1],(c.ul[2]+c.lr[2])/2],c.lr=c.lr||[c.ur[0],c.ll[1],(c.ur[2]+c.ll[2])/2],c.ur=c.ur||[c.lr[0],c.ul[1],(c.lr[2]+c.ul[2])/2],c.ul=c.ul||[c.ll[0],c.ur[1],(c.ll[2]+c.ur[2])/2],c}},this._checkQuadUpdate=function(t,e){},this._generateQuads=function(){var t,e,n=u.position(),r=u.style.get("image"),o=u.style.get("video"),c=u.style.get("delayRenderWhenSeeking"),p=u.style.get("color"),m=u.style.get("depth"),g=u.style.get("opacity"),v=u.style.get("drawOnAsyncResourceLoaded"),y=u.style.get("previewColor"),x=u.style.get("previewImage"),b=u.data(),_=[],w=[],M=[],A=[0,0,0];return u._objectListStart(h),u._objectListStart(f),i.each(b,(function(l,b){if(b._cachedQuad)return e=b._cachedQuad.diag2,(void 0===t||b._cachedQuad.diag2&&b._cachedQuad.diag2<t)&&(A=b._cachedQuad.ll,t=b._cachedQuad.diag2),b._cachedQuad.clrquad&&_.push(b._cachedQuad.clrquad),b._cachedQuad.imgquad&&(b._cachedQuad.imageEntry&&u._objectListGet(h,b._cachedQuad.imageEntry),w.push(b._cachedQuad.imgquad)),void(b._cachedQuad.vidquad&&(b._cachedQuad.videoEntry&&u._objectListGet(f,b._cachedQuad.videoEntry),M.push(b._cachedQuad.vidquad)));var T,C,E,S,k,P,O,R,L,D,I,F,j={};if(O=u._positionToQuad(n,m,b,l),D=g.call(u,b,l),void 0!==O&&D&&!(D<0)){if(e=Math.pow(O.ll[0]-O.ur[0],2)+Math.pow(O.ll[1]-O.ur[1],2)+Math.pow(O.ll[2]-O.ur[0],2)+Math.pow(O.lr[0]-O.ur[0],2)+Math.pow(O.lr[1]-O.ur[1],2)+Math.pow(O.lr[2]-O.ur[0],2),j.diag2=e,j.ll=O.ll,(void 0===t||e&&e<t)&&(A=O.ll,t=e),O=[O.ll[0],O.ll[1],O.ll[2],O.lr[0],O.lr[1],O.lr[2],O.ul[0],O.ul[1],O.ul[2],O.ur[0],O.ur[1],O.ur[2]],T={idx:l,pos:O,opacity:D,zOffset:b.zOffset},b.reference&&(T.reference=b.reference),b.crop&&(T.crop=b.crop),L=(R=r.call(u,b,l))?null:o.call(u,b,l),R){if(j.imageEntry=R,void 0===(C=u._objectListGet(h,R))&&(R instanceof Image||R instanceof HTMLCanvasElement?C=R:(C=new Image).src=R,u._objectListAdd(h,R,C)),a.isReadyImage(C)||C instanceof HTMLCanvasElement)T.image=C;else if(I=void 0,(F=x.call(u,b,l))&&a.isReadyImage(F)?T.image=F:(I=y.call(u,b,l),T.color=a.convertColor(I),T.color&&void 0!==T.color.r&&void 0!==T.color.g&&void 0!==T.color.b?(_.push(T),j.clrquad=T):I=void 0),v.call(u,b,l))P=a.isReadyImage(C,!0)?null:i.Deferred(),S=C.onload,C.onload=function(){if(void 0!==I&&(i.inArray(T,_)>=0&&_.splice(i.inArray(T,_),1),delete j.clrquad),T.image=C,u.dataTime().modified(),u.modified(),u._update(),u.layer().draw(),P&&P.resolve(),S)return S.apply(u,arguments)},k=C.onerror,C.onerror=function(){if(P&&P.reject(),k)return k.apply(u,arguments)},P&&u.layer().addPromise(P.promise());else if(void 0===I&&!T.image)return;w.push(T),j.imgquad=T}else if(L){if(j.videoEntry=L,void 0===(E=u._objectListGet(f,L))&&(L instanceof HTMLVideoElement?E=L:(E=document.createElement("video")).src=L,u._objectListAdd(f,L,E),i(E).off(".geojsvideo").on("seeking.geojsvideo canplay.geojsvideo pause.geojsvideo playing.geojsvideo",(function(t){u._checkQuadUpdate(T,t)}))),T.delayRenderWhenSeeking=c.call(u,b,l),void 0===T.delayRenderWhenSeeking&&(T.delayRenderWhenSeeking=!0),a.isReadyVideo(E))T.video=E;else if(I=y.call(u,b,l),T.color=a.convertColor(I),T.color&&void 0!==T.color.r&&void 0!==T.color.g&&void 0!==T.color.b?(_.push(T),j.clrquad=T):I=void 0,v.call(u,b,l))P=a.isReadyVideo(E,!0)?null:i.Deferred(),S=E.onloadeddata,E.onloadeddata=function(){if(void 0!==I&&(i.inArray(T,_)>=0&&_.splice(i.inArray(T,_),1),delete j.clrquad),T.video=E,u.dataTime().modified(),u.modified(),u._update(),u.layer().draw(),P&&P.resolve(),S)return S.apply(u,arguments)},k=E.onerror,E.onerror=function(){if(P&&P.reject(),k)return k.apply(u,arguments)},P&&u.layer().addPromise(P.promise());else if(void 0===I&&!T.video)return;M.push(T),j.vidquad=T}else{if(T.color=a.convertColor(p.call(u,b,l)),!T.color||void 0===T.color.r||void 0===T.color.g||void 0===T.color.b)return;_.push(T),j.clrquad=T}j.clrquad&&(d+=1,j.clrquad.quadId=d),j.imgquad&&(d+=1,j.imgquad.quadId=d),j.vidquad&&(d+=1,j.vidquad.quadId=d),!1!==s&&(b._cachedQuad=j)}})),u._objectListEnd(h),u._objectListEnd(f),l={clrQuads:_,imgQuads:w,vidQuads:M,origin:new Float32Array(A)}},this.cacheUpdate=function(t){return null==t?i.each(u.data(),(function(t,e){e._cachedQuad&&delete e._cachedQuad})):(isFinite(t)&&(t=u.data()[t]),t._cachedQuad&&delete t._cachedQuad),u.modified(),u},this.video=function(t){var e,n;return isFinite(t)&&(t=u.data()[t]),t._cachedQuad?e=(t._cachedQuad.vidquad||{}).video:(l||u._generateQuads(),(n=u.data().indexOf(t))>=0&&(e=u._objectListGet(f,u.style.get("video")(t,n)))),e instanceof HTMLVideoElement?e:null},this._init=function(t){t=t||{},c.call(u,t),s=!1!==t.cacheQuads;var e=i.extend({},{color:{r:1,g:1,b:1},opacity:1,depth:0,drawOnAsyncResourceLoaded:!0,previewColor:null,previewImage:null,image:function(t){return t.image},video:function(t){return t.video},position:function(t){return t}},void 0===t.style?{}:t.style);void 0!==t.position&&(e.position=a.ensureFunction(t.position)),u.style(e),u.dataTime().modified()},u};a.create=function(t,e){"use strict";return(e=e||{}).type="quad",o.create(t,e)},a.capabilities={color:"quad.color",image:"quad.image",imageCrop:"quad.imageCrop",imageFixedScale:"quad.imageFixedScale",imageFull:"quad.imageFull",canvas:"quad.canvas",video:"quad.video"},r(a,o),t.exports=a},4647:function(t,e,n){var i=n(5638),r={dom:{}},o={},a={},s={},l={},u={},c={},d={},h={},f={registerFileReader:function(t,e){c[t]=e},createFileReader:function(t,e){return c.hasOwnProperty(t)?c[t](e):null},registerRenderer:function(t,e){s[t]=e},createRenderer:function(t,e,n,i){if(s.hasOwnProperty(t)){var r=s[t]({layer:e,canvas:n,options:i});return r._init(),r}return null},checkRenderer:function(t,e){if(null===t)return t;if(s.hasOwnProperty(t)){var n=s[t];if(!n.supported||n.supported())return n.apiname||t;if(!n.fallback||e)return!1;var i=f.checkRenderer(n.fallback(),!0);return!1!==i&&console.warn(t+" renderer is unavailable, using "+i+" renderer instead"),i}return!1},rendererForFeatures:function(t){var e,n,i,r,o,a,s=["webgl","canvas","svg","vtkjs",null];for(n=0;n<s.length;n+=1)if(e=s[n],!1!==f.checkRenderer(e,!0)){if(!t)return e;if(l[e]){for(a=!0,r=0;r<t.length;r+=1){if(o=null,(i=t[r]).indexOf(".")>=0&&(o=i,i=i.substr(0,i.indexOf("."))),void 0===l[e][i]){a=!1;break}if(o&&u[e][i]&&!u[e][i][o]){a=!1;break}}if(a)return e}}return console.warn('There is no renderer available for the feature list "'+(t||[]).join(", ")+'".'),!1},registerFeature:function(t,e,n,i){t in l||(l[t]={},u[t]={});var r=l[t][e];return r&&console.warn("The "+t+"."+e+" feature is already registered"),l[t][e]=n,u[t][e]=i,r},createFeature:function(t,e,n,r){var o=n.api(),a={layer:e,renderer:n};if(o in l&&t in l[o]){void 0!==r&&i.extend(!0,a,r);var s=l[o][t](a);return void 0===e.gcs&&(e.gcs=function(){return e.map().gcs()}),s}return null},registerLayerAdjustment:function(t,e,n){t in d||(d[t]={});var i=d[t][e];return i&&console.warn("The "+t+"."+e+" layer adjustment is already registered"),d[t][e]=n,i},adjustLayerForRenderer:function(t,e){var n=e.rendererName();n&&d&&d[n]&&d[n][t]&&d[n][t].apply(e)},registerLayer:function(t,e,n){o[t]=e,a[t]=n},createLayer:function(t,e,n){var r={map:e},s=null;return t in o?(n.renderer||n.features||!a||(r.features=a[t]),void 0!==n&&i.extend(!0,r,n),(s=o[t](r)).layerName=t,s._init(),s):null},registerWidget:function(t,e,n){t in r||(r[t]={});var i=r[t][e];return i&&console.warn("The "+t+"."+e+" widget is already registered"),r[t][e]=n,i},createWidget:function(t,e,n){var o={layer:e};if(t in r.dom)return void 0!==n&&i.extend(!0,o,n),r.dom[t](o);throw new Error("Cannot create unknown widget "+t)},registerAnnotation:function(t,e,n){var i=h[t];return i&&console.warn("The "+t+" annotation is already registered"),h[t]={func:e,features:n||{}},i},createAnnotation:function(t,e){if(h[t])return h[t].func(e);console.warn("The "+t+" annotation is not registered")},listAnnotations:function(){return Object.keys(h)},featuresForAnnotations:function(t){var e=[];return(Array.isArray(t)?t:Object.keys(t)).forEach((function(n){h[n]&&Object.keys(h[n].features).forEach((function(r){Array.isArray(t)||!0===t[n]||!Array.isArray(h[n].features[r])?e.push(r):t[n].forEach((function(t){i.inArray(t,h[n].features[r])>=0&&e.push(r)}))}))})),e},rendererForAnnotations:function(t){return f.rendererForFeatures(f.featuresForAnnotations(t))}};f.registries={annotations:h,features:l,featureCapabilities:u,fileReaders:c,layers:o,renderers:s,widgets:r},t.exports=f},3234:function(t,e,n){var i=n(5699),r=n(3737),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this);var n=this,i=0,o=0,a=void 0===(e=e||{}).layer?null:e.layer,s=void 0===e.canvas?null:e.canvas,l=!1;return this.layer=function(){return a},this.canvas=function(t){return void 0===t?s:(s=t,n.modified(),n)},this.map=function(){return a?a.map():null},this.initialized=function(t){return void 0===t?l:(l=t,n)},this.api=function(){throw new Error("Should be implemented by derived classes")},this.width=function(){return i},this.height=function(){return o},this._setWidthHeight=function(t,e){return i=t,o=e,n},this._init=function(){return n},this._resize=function(t,e,i,r){return n._setWidthHeight(i,r),n},this._render=function(){return n},this};i(o,r),t.exports=o},5358:function(t,e,n){var i=n(5699),r=n(3737),o=function t(e){"use strict";if(!(this instanceof t))return new t;r.call(this,e);var n=this,i=null,o=[],a=this._exit,s=this.geoTrigger,l=this.addPromise,u=this.removePromise;return this.addPromise=function(t){return i&&i.addPromise(t),l(t),n},this.removePromise=function(t){return i&&i.removePromise(t),u(t),n},this.parent=function(t){return void 0===t?i:(i=t,n)},this.addChild=function(t){return Array.isArray(t)?(t.forEach(n.addChild),n):(t.parent(n),o.push(t),n)},this.removeChild=function(t){return Array.isArray(t)?(t.forEach(n.removeChild),n):(o=o.filter((function(e){return e!==t})),n)},this.children=function(){return o.slice()},this.draw=function(t){return n.children().forEach((function(e){e.draw(t)})),n},this.geoTrigger=function(t,e,r){var a;return a=(e=e||{}).geo||{},e.geo=a,a.stopPropagation?n:!r&&i&&a._triggeredBy!==i?(a._triggeredBy=n,i.geoTrigger(t,e),n):(s.call(n,t,e),a.stopPropagation||o.forEach((function(i){i.geoTrigger&&(a._triggeredBy=n,i.geoTrigger(t,e))})),n)},this._exit=function(){o=[],i=null,a()},this};i(o,r),t.exports=o},5381:function(t){t.exports="0bc7b69498f5cc8cb411e7db7a8049eda5043a68"},9851:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(4745),a=function t(e){"use strict";var n=this;return this instanceof t?(o.call(this,e),this.select=function(){var t=n.renderer(),e={},i=n.nodeFeature(),r=n.linkFeatures();return e.nodes=t.select(i._svgid()),e.links=r.map((function(e){return t.select(e._svgid())})),e},this):new t(e)};i(a,o),r("svg","graph",a),t.exports=a},2878:function(t,e,n){n(5108).svg={rescale:n(8210)},t.exports={graphFeature:n(9851),lineFeature:n(7134),object:n(2738),pathFeature:n(5903),pointFeature:n(3365),quadFeature:n(2203),renderer:n(2531),tileLayer:n(21),trackFeature:n(1489),uniqueID:n(1946),vectorFeature:n(3398)}},7134:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(4708),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(2531).d3,r=n(2738),a=n(6618),s=n(4634);e=e||{},o.call(this,e),r.call(this);var l=this,u=this._init,c=a(),d=0,h=this._update;return this._init=function(t){return u.call(l,t),l},this._build=function(){var t,e,n=l.data()||[],r=l.style(),o=l.renderer(),a=l.position();for(h.call(l),r.fill=function(){return!1},n.forEach((function(e,n){var u,c,d=l.line()(e,n),h={};function f(t){return s.isFunction(t)?function(){return t(d[0],0,e,n)}:t}for(c in r)r.hasOwnProperty(c)&&(h[c]=f(r[c]));t=i.svg.line().x((function(t){return l.featureGcsToDisplay(t).x})).y((function(t){return l.featureGcsToDisplay(t).y})).interpolate(l.style.get("closed")(e,n)&&d.length>2?"linear-closed":"linear"),u={data:[d.map((function(t,i){return a(t,i,e,n)}))],append:"path",attributes:{d:t},id:l._svgid()+n,classes:["svgLineFeature","svgSubLine-"+n],visible:l.visible,style:h},o._drawFeatures(u)})),e=n.length;e<d;e+=1)o._removeFeature(l._svgid()+e);return d=n.length,c.modified(),l.updateTime().modified(),l},this._update=function(){return h.call(l),l.timestamp()>=c.timestamp()&&l._build(),l},this._init(e),this};i(a,o);var s={};s[o.capabilities.basic]=!0,s[o.capabilities.multicolor]=!1,r("svg","line",a,s),t.exports=a},2738:function(t,e,n){t.exports=function t(e){"use strict";var i=n(3737),r=n(1946);if(!(this instanceof i))return new t(e);var o="svg-"+r(),a=this._exit,s=this,l=this.draw;return this._svgid=function(){return o},this.select=function(){return s.renderer().select(s._svgid())},this.draw=function(){return s.ready&&(s._update(),l()),s},this._exit=function(){s.renderer()._removeFeature(s._svgid()),a()},this}},5903:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(6565),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638),r=n(2531).d3,a=n(2738),s=n(6618);e=e||{},o.call(this,e),a.call(this);var l=this,u=s(),c=this._update,d={style:{}};return this._build=function(){var t,e,n=l.data()||[],o=l.style.get(),a=l.style.get("position");return c.call(l),e=function(t){var e={source:t.source,target:t.target};return r.svg.diagonal()(e)},t=[],n.forEach((function(e,i){var r,o;i<n.length-1&&(r=a(e,i),o=a(n[i+1],i+1),t.push({source:l.featureGcsToDisplay(r),target:l.featureGcsToDisplay(o)}))})),d.data=t,d.attributes={d:e},d.id=l._svgid(),d.append="path",d.classes=["svgPathFeature"],d.style=i.extend({fill:function(){return!1},fillColor:{r:0,g:0,b:0}},o),d.visible=l.visible,l.renderer()._drawFeatures(d),u.modified(),l.updateTime().modified(),l},this._update=function(){return c.call(l),l.dataTime().timestamp()>=u.timestamp()&&l._build(),l},this._init(e),this};i(a,o),r("svg","path",a),t.exports=a},3365:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(2557),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(2738),r=n(6618);e=e||{},o.call(this,e),i.call(this);var a=this,s=this._init,l=this._update,u=r(),c={};return this._init=function(t){return s.call(a,t),a},this._build=function(){var t=a.data(),e=a.style.get(),n=a.renderer(),i=a.position();return l.call(a),t||(t=[]),c.id=a._svgid(),c.data=t,c.append="circle",c.attributes={r:n._convertScale(e.radius),cx:function(t){return a.featureGcsToDisplay(i(t)).x},cy:function(t){return a.featureGcsToDisplay(i(t)).y}},c.style=e,c.classes=["svgPointFeature"],c.visible=a.visible,a.renderer()._drawFeatures(c),u.modified(),a.updateTime().modified(),a},this._update=function(){return l.call(a),a.timestamp()>=u.timestamp()&&a._build(),a},this._init(e),this};i(a,o);var s={};s[o.capabilities.stroke]=!0,r("svg","point",a,s),t.exports=a},2203:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(5017),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638),r=n(2531).d3,a=n(2738);o.call(this,e),a.call(this);var s,l=this,u=this._exit,c=this._init,d=this._update;return this._build=function(){if(this.position()){var t=l.renderer(),e=t.layer().map();s=l._generateQuads();var n=[];i.each(s.clrQuads,(function(t,e){n.push({type:"clr",quad:e,zIndex:e.pos[2]})})),i.each(s.imgQuads,(function(t,e){e.image&&n.push({type:"img",quad:e,zIndex:e.pos[2]})}));var o={id:l._svgid(),data:n,dataIndex:function(t){return t.quad.quadId},append:function(t){var e=this.namespaceURI,n="clr"===t.type?"polygon":"image";return e?document.createElementNS(e,n):document.createElement(n)},attributes:{fill:function(t){if("clr"===t.type)return r.rgb(255*t.quad.color.r,255*t.quad.color.g,255*t.quad.color.b);1!==t.quad.opacity&&r.select(this).style("opacity",t.quad.opacity)},height:function(t){return"clr"===t.type?void 0:1},points:function(n){if("clr"===n.type&&!n.points){var i,r=[];for(i=0;i<n.quad.pos.length;i+=3){var o={x:n.quad.pos[i],y:n.quad.pos[i+1],z:n.quad.pos[i+2]};o=e.gcsToDisplay(o,null),o=t.baseToLocal(o),r.push(o.x+","+o.y)}n.points=r[0]+" "+r[1]+" "+r[3]+" "+r[2]}return"clr"===n.type?n.points:void 0},preserveAspectRatio:function(t){return"clr"===t.type?void 0:"none"},reference:function(t){return t.quad.reference},stroke:!1,transform:function(n){if("img"===n.type&&n.quad.image&&!n.svgTransform){var i,r,o,a,s=[],l=-1,u=n.quad.image.width,c=n.quad.image.height;for(o=0;o<n.quad.pos.length;o+=3){var d={x:n.quad.pos[o],y:n.quad.pos[o+1],z:n.quad.pos[o+2]};d=e.gcsToDisplay(d,null),d=t.baseToLocal(d),s.push(d)}for(o=0;o<4;o+=1)(i=Math.abs(s[(o+1)%4].x*(s[(o+2)%4].y-s[(o+3)%4].y)+s[(o+2)%4].x*(s[(o+3)%4].y-s[(o+1)%4].y)+s[(o+3)%4].x*(s[(o+1)%4].y-s[(o+2)%4].y))/2)>l&&(l=i,r=o);n.svgTransform=[3===r||2===r?s[1].x-s[0].x:s[3].x-s[2].x,3===r||2===r?s[1].y-s[0].y:s[3].y-s[2].y,0===r||2===r?s[1].x-s[3].x:s[0].x-s[2].x,0===r||2===r?s[1].y-s[3].y:s[0].y-s[2].y,2===r?s[3].x+s[0].x-s[1].x:s[2].x,2===r?s[3].y+s[0].y-s[1].y:s[2].y],Math.abs(n.svgTransform[1]/u)<1e-6&&Math.abs(n.svgTransform[2]/c)<1e-6&&(a=n.svgTransform[0]/u,n.svgTransform[4]=Math.round(n.svgTransform[4]/a)*a,a=n.svgTransform[3]/c,n.svgTransform[5]=Math.round(n.svgTransform[5]/a)*a)}return"img"===n.type&&n.quad.image?"matrix("+n.svgTransform.join(" ")+")":void 0},width:function(t){return"clr"===t.type?void 0:1},x:function(t){return"clr"===t.type?void 0:0},"xlink:href":function(t){return"clr"!==t.type&&t.quad.image?t.quad.image.src:void 0},y:function(t){return"clr"===t.type?void 0:0}},style:{fillOpacity:function(t){return"clr"===t.type?t.quad.opacity:void 0}},onlyRenderNew:!this.style("previewColor")&&!this.style("previewImage"),sortByZ:!0,visible:l.visible,classes:["svgQuadFeature"]};t._drawFeatures(o),l.buildTime().modified()}},this._update=function(){return d.call(l),(l.buildTime().timestamp()<=l.dataTime().timestamp()||l.buildTime().timestamp()<l.timestamp())&&l._build(),l},this._init=function(){c.call(l,e)},this._exit=function(){u.call(l)},l._init(e),this};i(a,o);var s={};s[o.capabilities.color]=!0,s[o.capabilities.image]=!0,s[o.capabilities.imageCrop]=!1,s[o.capabilities.imageFixedScale]=!1,s[o.capabilities.imageFull]=!1,s[o.capabilities.canvas]=!1,s[o.capabilities.video]=!1,r("svg","quad",a,s),t.exports=a},8210:function(t){t.exports="geo_svg_rescale"},2531:function(t,e,n){var i=n(5699),r=n(4647).registerRenderer,o=n(3234),a=function t(e){"use strict";var i=t.d3,r=n(2738),a=n(4634),s=n(5108),l=n(8210);if(!(this instanceof t))return new t(e);o.call(this,e);var u=this._exit;r.call(this,e),e=e||{};var c=this,d=null,h={},f=null,p=null,m=1,g={dx:0,dy:0,rx:0,ry:0,rotation:0},v={},y={},x=null,b=null;function _(t){return t?x.select(".group-"+t):x.select(".group-"+c._svgid())}function w(){var t=c.layer().map(),e=t.size().width,n=t.size().height;if(!e||!n)throw new Error("Map layer has size 0");c._setWidthHeight(e,n),p=Math.pow(e*e+n*n,.5),f={upperLeft:t.displayToGcs({x:0,y:0},null),lowerRight:t.displayToGcs({x:e,y:n},null),center:t.displayToGcs({x:e/2,y:n/2},null)}}return this._convertColor=function(t,e){return t=a.ensureFunction(t),e=e||function(){return!0},function(){var n="none";return e.apply(c,arguments)&&(n=t.apply(c,arguments)).hasOwnProperty("r")&&n.hasOwnProperty("g")&&n.hasOwnProperty("b")&&(n=i.rgb(255*n.r,255*n.g,255*n.b)),n}},this._convertScale=function(t){return t=a.ensureFunction(t),function(){return t.apply(c,arguments)/m}},this._setTransform=function(){if(f||w(),d){var t,e,n,i,r,o,a=c.layer().map(),s=a.gcsToDisplay(f.upperLeft,null),l=a.gcsToDisplay(f.lowerRight,null),u=a.gcsToDisplay(f.center,null),h=_();n=Math.sqrt(Math.pow(l.y-s.y,2)+Math.pow(l.x-s.x,2))/p,i=a.rotation(),r=-c.width()/2,o=-c.height()/2,t=n*r+u.x,e=n*o+u.y,i||(t=Math.round(t),e=Math.round(e));var v="matrix("+[n,0,0,n,t,e].join()+")";i&&(v+=" rotate("+[180*i/Math.PI,-r,-o].join()+")"),h.attr("transform",v),m=n,g.dx=t,g.dy=e,g.rx=r,g.ry=o,g.rotation=i}},this.baseToLocal=function(t){if(t={x:(t.x-g.dx)/m,y:(t.y-g.dy)/m},g.rotation){var e=Math.sin(-g.rotation),n=Math.cos(-g.rotation),i=t.x+g.rx,r=t.y+g.ry;t={x:i*n-r*e-g.rx,y:i*e+r*n-g.ry}}return t},this.localToBase=function(t){if(g.rotation){var e=Math.sin(g.rotation),n=Math.cos(g.rotation),i=t.x+g.rx,r=t.y+g.ry;t={x:i*n-r*e-g.rx,y:i*e+r*n-g.ry}}return t={x:t.x*m+g.dx,y:t.y*m+g.dy}},this._init=function(t){if(!c.canvas()){var e;t.widget=t.widget||!1,(x="d3Parent"in t?i.select(t.d3Parent).append("svg"):i.select(c.layer().node().get(0)).append("svg")).attr("display","block");var n=(b=x.append("defs")).append("filter").attr("id","geo-highlight").attr("x","-100%").attr("y","-100%").attr("width","300%").attr("height","300%");n.append("feMorphology").attr("operator","dilate").attr("radius",2).attr("in","SourceAlpha").attr("result","dilateOut"),n.append("feGaussianBlur").attr("stdDeviation",5).attr("in","dilateOut").attr("result","blurOut"),n.append("feColorMatrix").attr("type","matrix").attr("values","-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0").attr("in","blurOut").attr("result","invertOut"),n.append("feBlend").attr("in","SourceGraphic").attr("in2","invertOut").attr("mode","normal"),t.widget||(e=t.canvas||x.append("g")),(n=b.append("filter").attr("id","geo-blur").attr("x","-100%").attr("y","-100%").attr("width","300%").attr("height","300%")).append("feGaussianBlur").attr("stdDeviation",20).attr("in","SourceGraphic"),d=c.layer().sticky(),x.attr("class",c._svgid()),x.attr("width",c.layer().node().width()),x.attr("height",c.layer().node().height()),t.widget?c.canvas(x):(e.attr("class","group-"+c._svgid()),c.canvas(e))}return c._setTransform(),c},this.api=function(){return t.apiname},this.scaleFactor=function(){return m},this._resize=function(t,e,n,i){return f||w(),x.attr("width",n),x.attr("height",i),c._setTransform(),c._setWidthHeight(n,i),c.layer().geoTrigger(l,{scale:m},!0),c},this._exit=function(){h={},c.canvas().remove(),x.remove(),x=void 0,b.remove(),b=void 0,v={},y={},u()},this._definitions=function(){return b},this._drawFeatures=function(t){return h[t.id]={data:t.data,index:t.dataIndex,style:t.style,visible:t.visible,attributes:t.attributes,classes:t.classes,append:t.append,onlyRenderNew:t.onlyRenderNew,sortByZ:t.sortByZ,parentId:t.parentId},c.__render(t.id,t.parentId)},this.__render=function(t,e){var n;if(void 0===t){for(n in h)h.hasOwnProperty(n)&&c.__render(n);return c}return e?c._renderFeature(t,e):(v[t]=!0,c.layer().map().scheduleAnimationFrame(c._renderFrame)),c},this._renderFrame=function(){var t;for(t in y)c.select(t).remove(),b.selectAll("."+t).remove();y={};var e=v;for(t in v={},e)e.hasOwnProperty(t)&&c._renderFeature(t)},this._renderFeature=function(t,e){if(!h[t])return c;var n,i,r=h[t].data,o=h[t].index,a=h[t].style,s=h[t].visible,l=h[t].attributes,u=h[t].classes,d=h[t].append,f=c.select(t,e).data(r,o);return n=f.enter().append(d),f.exit().remove(),function(t,e){var n;for(n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}(i=h[t].onlyRenderNew?n:f,l),i.attr("class",u.concat([t]).join(" ")),function(t,e){var n,i,r;function o(){return e.fill.apply(c,arguments)?null:"none"}function a(){return e.stroke.apply(c,arguments)?null:"none"}for(n in e)e.hasOwnProperty(n)&&(r=null,i=null,"strokeColor"===n?(i="stroke",r=c._convertColor(e[n],e.stroke)):"stroke"===n&&e[n]&&!e.hasOwnProperty("strokeColor")?(i="stroke",r=a):"strokeWidth"===n?(i="stroke-width",r=c._convertScale(e[n])):"strokeOpacity"===n?(i="stroke-opacity",r=e[n]):"fillColor"===n?(i="fill",r=c._convertColor(e[n],e.fill)):"fill"!==n||e.hasOwnProperty("fillColor")?"fillOpacity"===n?(i="fill-opacity",r=e[n]):"lineCap"===n?(i="stroke-linecap",r=e[n]):"lineJoin"===n?(i="stroke-linejoin",r=e[n]):"miterLimit"===n&&(i="stroke-miterlimit",r=e[n]):(i="fill",r=o),i&&t.style(i,r))}(i,a),s&&i.style("visibility",s()?"visible":"hidden"),n.size()&&h[t].sortByZ&&f.sort((function(t,e){return(t.zIndex||0)-(e.zIndex||0)})),c},this.select=function(t,e){return _(e).selectAll("."+t)},this._removeFeature=function(t){return y[t]=!0,c.layer().map().scheduleAnimationFrame(c._renderFrame),delete h[t],v[t]&&delete v[t],c},this.draw=function(){},this.layer().geoOn(s.pan,c._setTransform),this.layer().geoOn(s.rotate,c._setTransform),this.layer().geoOn(s.zoom,(function(){c._setTransform(),c.__render(),c.layer().geoTrigger(l,{scale:m},!0)})),this.layer().geoOn(s.resize,(function(t){c._resize(t.x,t.y,t.width,t.height)})),this._init(e),this};a.apiname="svg",i(a,o),r("svg",a),r("d3",a),a.supported=function(){delete a.d3;try{(a.d3=n(9990))&&a.d3.rgb||(a.d3=void 0)}catch(t){}return void 0!==a.d3},a.fallback=function(){return null},a.supported(),t.exports=a},21:function(t,e,n){var i=function(){"use strict";var t,e=this,n=this._init,i=this._exit,r=this._update,o=0,a=[];this._drawTile=function(n){if(t){var i=e._tileBounds(n),r=n.index.level||0,s=e._tileOffset(r),l={};l.ul=e.fromLocal(e.fromLevel({x:i.left-s.x,y:i.top-s.y},r),0),l.ll=e.fromLocal(e.fromLevel({x:i.left-s.x,y:i.bottom-s.y},r),0),l.ur=e.fromLocal(e.fromLevel({x:i.right-s.x,y:i.top-s.y},r),0),l.lr=e.fromLocal(e.fromLevel({x:i.right-s.x,y:i.bottom-s.y},r),0),l.ul.z=l.ll.z=l.ur.z=l.lr.z=r,o+=1,l.id=o,n.quadId=l.id,l.image=n.image,l.reference=n.toString(),a.push(l),t.data(a),t._update(),e.draw()}},this._remove=function(n){if(void 0!==n.quadId&&t){for(var i=0;i<a.length;i+=1)if(a[i].id===n.quadId){a.splice(i,1);break}t.data(a),t._update(),e.draw()}},this._update=function(n){return r.call(e,n),e._addBaseQuadToTiles(t,a),e},this._exit=function(){e.deleteFeature(t),t=null,a=[],i.apply(e,arguments)},this._init=function(){n.apply(e,arguments),(t=e.createFeature("quad",{previewColor:e._options.previewColor,previewImage:e._options.previewImage})).geoTrigger=void 0,t.gcs(e._options.gcs||e.map().gcs()),t.data(a),t._update()},this._getSubLayer=function(){},this._updateSubLayers=void 0};(0,n(4647).registerLayerAdjustment)("svg","tile",i),t.exports=i},1489:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(6223),a=function t(e){"use strict";return this instanceof t?(e=e||{},o.call(this,e),n(2738).call(this),this._init(e),this):new t(e)};i(a,o),r("svg","track",a),t.exports=a},1946:function(t){var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t.exports=function(){var t,n=[];for(n.length=8,t=0;t<8;t+=1)n[t]=e.charAt(Math.floor(Math.random()*e.length));return n.join("")}},3398:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(2623),a={arrow:{attrs:{class:"geo-vector-arrow geo-vector-marker",viewBox:"0 0 10 10",refX:1,refY:5,markerHeight:5,markerWidth:5,orient:"auto"},path:"M 0 0 L 10 5 L 0 10 z"},point:{attrs:{class:"geo-vector-point geo-vector-marker",viewBox:"0 0 12 12",refX:6,refY:6,markerHeight:8,markerWidth:8,orient:"auto"},path:"M 6 3 A 3 3 0 1 1 5.99999 3 Z"},bar:{attrs:{class:"geo-vector-bar geo-vector-marker",viewBox:"0 0 10 10",refX:0,refY:5,markerHeight:6,markerWidth:6,orient:"auto"},path:"M 0 0 L 2 0 L 2 10 L 0 10 z"},wedge:{attrs:{class:"geo-vector-wedge geo-vector-marker",viewBox:"0 0 10 10",refX:10,refY:5,markerHeight:5,markerWidth:5,orient:"auto"},path:"M 0 0 L 1 0 L 10 5 L 1 10 L 0 10 L 9 5 L 0 0"}},s=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(2738),r=n(6618),s=n(2531).d3;e=e||{},o.call(this,e),i.call(this);var l=this,u=this._exit,c=this._update,d=r(),h={};function f(t,e,n){return l._svgid()+"_marker_"+e+"_"+n}function p(t,e,n,i,r){var o=l.renderer()._definitions().selectAll("g.marker-group#"+l._svgid()).data(t.length?[1]:[]);o.enter().append("g").attr("id",l._svgid).attr("class","marker-group"),o.exit().remove();var u=t.reduce((function(t,e,n){var o=a[r(e,n)],s=a[i(e,n)];return o&&t.push({data:e,dataIndex:n,head:!0}),s&&t.push({data:e,dataIndex:n,head:!1}),t}),[]),c=o.selectAll("marker.geo-vector-marker").data(u);c.enter().append("marker").append("path");var d=l.renderer();c.each((function(t){var e=s.select(this),n=t.head?a[r(t.data,t.dataIndex)]:a[i(t.data,t.dataIndex)];Object.keys(n.attrs).forEach((function(t){e.attr(t,n.attrs[t])}))})).attr("id",(function(t){return f(t.data,t.dataIndex,t.head?"head":"tail")})).style("stroke",(function(t){return d._convertColor(e)(t.data,t.dataIndex)})).style("fill",(function(t){return d._convertColor(e)(t.data,t.dataIndex)})).style("opacity",(function(t){return n(t.data,t.dataIndex)})).select("path").attr("d",(function(t){return t.head?a[r(t.data,t.dataIndex)].path:a[i(t.data,t.dataIndex)].path})),c.exit().remove()}return this._build=function(){var t,e=l.data(),n=l.style.get(),i=l.renderer(),r=l.origin(),o=l.delta(),a=l.style("scale"),s=0;function u(){return a/i.scaleFactor()}return c.call(l),e||(e=[]),t=e.map((function(t,e){var n=l.featureGcsToDisplay(r(t,e)),i=o(t,e);return s=Math.max(s,i.x*i.x+i.y*i.y),{x1:n.x,y1:n.y,dx:i.x,dy:-i.y}})),s=Math.sqrt(s),a||(a=75/(s||1)),h.id=l._svgid(),h.data=e,h.append="line",h.attributes={x1:function(e,n){return t[n].x1},y1:function(e,n){return t[n].y1},x2:function(e,n){return t[n].x1+u()*t[n].dx},y2:function(e,n){return t[n].y1+u()*t[n].dy},"marker-start":function(t,e){return"url(#"+f(0,e,"tail")+")"},"marker-end":function(t,e){return"url(#"+f(0,e,"head")+")"}},h.style={stroke:function(){return!0},strokeColor:n.strokeColor,strokeWidth:n.strokeWidth,strokeOpacity:n.strokeOpacity,originStyle:n.originStyle,endStyle:n.endStyle},h.classes=["svgVectorFeature"],h.visible=l.visible,p(e,n.strokeColor,n.strokeOpacity,n.originStyle,n.endStyle),l.renderer()._drawFeatures(h),d.modified(),l.updateTime().modified(),l},this._update=function(){return c.call(l),l.timestamp()>=d.timestamp()?l._build():p(h.data,h.style.strokeColor,h.style.strokeOpacity,h.style.originStyle,h.style.endStyle),l},this._exit=function(){u.call(l),h={},p([],null,null,null,null)},this._init(e),this};s.markerConfigs=a,i(s,o),r("svg","vector",s),t.exports=s},9757:function(t,e,n){var i=n(5699),r=n(6837),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},r.call(this,e);var i=n(5638),o=this,a=this._init;return this.featureType="text",this.position=function(t){return void 0===t?o.style("position"):(t!==o.style("position")&&(o.style("position",t),o.dataTime().modified(),o.modified()),o)},this.text=function(t){return void 0===t?o.style("text"):(t!==o.style("text")&&(o.style("text",t),o.dataTime().modified(),o.modified()),o)},this._init=function(t){t=t||{},a.call(o,t);var e=i.extend({},{font:"bold 16px sans-serif",textAlign:"center",textBaseline:"middle",color:{r:0,g:0,b:0},rotation:0,rotateWithMap:!1,textScaled:!1,position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t},text:function(t){return t.text}},void 0===t.style?{}:t.style);void 0!==t.position&&(e.position=t.position),void 0!==t.text&&(e.text=t.text),o.style(e),e.position&&o.position(e.position),e.text&&o.text(e.text),o.dataTime().modified()},this._init(e),o};o.usedStyles=["visible","font","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","lineHeight","fontFamily","textAlign","textBaseline","color","textOpacity","rotation","rotateWithMap","textScaled","offset","shadowColor","shadowOffset","shadowBlur","shadowRotate","textStrokeColor","textStrokeWidth"],o.create=function(t,e){"use strict";return(e=e||{}).type="text",r.create(t,e)},o.capabilities={feature:"text"},i(o,r),t.exports=o},8418:function(t,e,n){var i=n(5638);t.exports=function t(e){if(!(this instanceof t))return new t(e);this._index=e.index,this._size=e.size,this._overlap=e.overlap||{x:0,y:0},this._wrap=e.wrap||{x:1,y:1},this._url=e.url,this._fetched=!1,this._queue=e.queue||null,Object.defineProperty(this,"index",{get:function(){return this._index}}),Object.defineProperty(this,"size",{get:function(){return this._size}}),Object.defineProperty(this,"overlap",{get:function(){return this._overlap}}),this.fetch=function(){return this._fetched||i.get(this._url).done(function(){this._fetched=!0}.bind(this)).promise(this),this},this.fetched=function(){return this._fetched},this.then=function(t,e){return this.fetched()||!this._queue||!this._queue.add||this.state&&"pending"!==this.state()?this.fetch():this._queue.add(this,this.fetch),this.done&&this.fail?this.done(t).fail(e):this.then(t,e),this},this.catch=function(t){return this.then(void 0,t),this},this.toString=function(){return[this._index.level||0,this._index.y,this._index.x,this._index.reference||0].join("_")},this.bounds=function(t,e){var n,i,r,o;return i=(n=this.size.x*(this.index.x-t.x)-this.overlap.x-e.x)+this.size.x+2*this.overlap.x,r=(o=this.size.y*(this.index.y-t.y)-this.overlap.y-e.y)+this.size.y+2*this.overlap.y,this.overlap.x&&this.index.x===t.x&&(n+=this.overlap.x),this.overlap.y&&this.index.y===t.y&&(o+=this.overlap.y),{left:n,right:i,bottom:r,top:o}},Object.defineProperty(this,"bottom",{get:function(){return this.size.y*(this.index.y+1)+this.overlap.y}}),Object.defineProperty(this,"top",{get:function(){return this.size.y*this.index.y-(this.index.y?this.overlap.y:0)}}),Object.defineProperty(this,"left",{get:function(){return this.size.x*this.index.x-(this.index.x?this.overlap.x:0)}}),Object.defineProperty(this,"right",{get:function(){return this.size.x*(this.index.x+1)+this.overlap.x}}),this.fadeIn=function(t){return i.noop(t),this}}},6244:function(t){t.exports=function t(e){return this instanceof t?(e=e||{},this._size=e.size||64,Object.defineProperty(this,"size",{get:function(){return this._size},set:function(t){for(;this._atime.length>t;)this.remove(this._atime[this._atime.length-1]);this._size=t}}),Object.defineProperty(this,"length",{get:function(){return this._atime.length}}),this._access=function(t){return this._atime.indexOf(t)},this.remove=function(t){var e="string"==typeof t?t:t.toString();return e in this._cache&&(this._atime.splice(this._access(e),1),delete this._cache[e],!0)},this.clear=function(){return this._cache={},this._atime=[],this},this.get=function(t,e){return(t="string"==typeof t?t:t.toString())in this._cache?(e||(this._atime.splice(this._access(t),1),this._atime.unshift(t)),this._cache[t]):null},this.add=function(t,e,n){this.remove(t);var i=t.toString();this._cache[i]=t,this._atime.unshift(i),n||this.purge(e)},this.purge=function(t){for(var e;this._atime.length>this.size;){e=this._atime.pop();var n=this._cache[e];t&&t(n),delete this._cache[e]}},this.clear(),this):new t(e)}},1940:function(t,e,n){var i=n(5699),r=n(3715);function o(t,e){return(t%e+e)%e}function a(t){var e,n=/\$?\{(s|S|[sS]:[^{}]+|[^-{}]-[^-{}]|([^,{}]+,)+[^,{}]+)\}/,i=t.replace(new RegExp(n,"g"),"{s}").replace(/\$?\{[xX]\}/g,"{x}").replace(/\$?\{[yY]\}/g,"{y}").replace(/\$?\{[zZ]\}/g,"{z}"),r=t.match(n);if(r)if(r[2])e=r[1].split(",");else if(":"===r[1][1])e=r[1].substr(2).split("");else if("-"===r[1][1]){e=[];for(var a=r[1].charCodeAt(0),s=r[1].charCodeAt(2),l=Math.min(a,s);l<=Math.max(a,s);l+=1)e.push(String.fromCharCode(l))}return function(t,n,r,a){return i.replace(/\{s\}/g,function(t,e,n,i){return i[o(t+e+n,i.length)]}(t,n,r,e||a)).replace(/\{x\}/g,t).replace(/\{y\}/g,n).replace(/\{z\}/g,r)}}var s=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this,e);var i=n(5638),s=n(5108),l=n(6853),u=n(6244),c=n(3705),d=n(4647).adjustLayerForRenderer,h=n(8418);if((e=i.extend(!0,{},this.constructor.defaults,e||{})).cacheSize||(e.cacheSize=e.keepLower?600:200),"string"===i.type(e.subdomains)&&(e.subdomains=e.subdomains.split("")),e.baseUrl){var f=e.baseUrl;f&&"/"!==f.charAt(f.length-1)&&(f+="/"),e.url=f+"{z}/{x}/{y}."+(e.imageFormat||"png")}e.originalUrl=e.url,"string"===i.type(e.url)&&(e.url=a(e.url));var p,m,g,v=this._init,y=this._exit,x=this.visible,b=e.queueSize||6,_=e.initialQueueSize||0,w=[],M={},A=[],T=this;this._options=i.extend(!0,{},e),this.attribution(e.attribution),this._activeTiles={},this._tileTree={},this._cache=u({size:e.cacheSize}),this._queue=e.queue||c({size:b,initialSize:_,track:e.cacheSize,needed:function(t){return this._tileLayers&&this._tileLayers.length?this._tileLayers.some((function(e){return t===e.cache.get(t.toString(),!0)})):t===T.cache.get(t.toString(),!0)}}),this._queue._tileLayers=this._queue._tileLayers||[],this._queue._tileLayers.push(T);var C={};return Object.defineProperty(this,"options",{get:function(){return i.extend({},T._options)}}),Object.defineProperty(this,"cache",{get:function(){return T._cache}}),Object.defineProperty(this,"activeTiles",{get:function(){return i.extend({},T._activeTiles)}}),Object.defineProperty(this,"queue",{get:function(){return T._queue},set:function(t){T._queue!==t&&(this._queue&&this._queue._tileLayers&&this._queue._tileLayers.indexOf(T)>=0&&this._queue._tileLayers.splice(this._queue._tileLayers.indexOf(T),1),T._queue=t,T._queue._tileLayers=T._queue._tileLayers||[],T._queue._tileLayers.push(T))}}),Object.defineProperty(this,"queueSize",{get:function(){return b},set:function(t){b=t,T._queue.size=t}}),Object.defineProperty(this,"initialQueueSize",{get:function(){return _},set:function(t){_=t||0,T._queue.initialSize=t||b}}),Object.defineProperty(this,"reference",{get:function(){return T.id()+"_"+(p||0)},set:function(t){p=t},configurable:!0}),this.tilesAtZoom=function(t){if(T._options.tilesAtZoom)return T._options.tilesAtZoom.call(T,t);var e=Math.pow(2,t);return{x:e,y:e}},this.tilesMaxBounds=function(t){return T._options.tilesMaxBounds?T._options.tilesMaxBounds.call(T,t):null},this.tileCropFromBounds=function(t){if(T._options.tilesMaxBounds){var e=t.index.level,n=T._tileBounds(t);return void 0===A[e]&&(A[e]=T.tilesMaxBounds(e)||null),A[e]&&(n.right>A[e].x||n.bottom>A[e].y)?{x:Math.max(0,Math.min(A[e].x,n.right)-n.left),y:Math.max(0,Math.min(A[e].y,n.bottom)-n.top)}:void 0}},this.isValid=function(t){return T._options.minLevel<=t.level&&t.level<=T._options.maxLevel&&(!!(T._options.wrapX||0<=t.x&&t.x<=T.tilesAtZoom(t.level).x-1)&&!!(T._options.wrapY||0<=t.y&&t.y<=T.tilesAtZoom(t.level).y-1))},this._origin=function(t){var e,n=T.toLevel(T.toLocal(T.map().origin()),t),i=T._options;return{index:e={x:Math.floor(n.x/i.tileWidth),y:Math.floor(n.y/i.tileHeight)},offset:{x:n.x-i.tileWidth*e.x,y:n.y-i.tileHeight*e.y}}},this._tileBounds=function(t){var e=T._origin(t.index.level);return t.bounds(e.index,e.offset)},this.tileAtPoint=function(t,e){var n=T._origin(e),i=T.map();t=T.displayToLevel(i.gcsToDisplay(t,null),e),isNaN(t.x)&&(t.x=0),isNaN(t.y)&&(t.y=0);var r=T._tileOffset(e);return r&&(t.x+=r.x,t.y+=r.y),{x:Math.floor(n.index.x+(n.offset.x+t.x)/T._options.tileWidth),y:Math.floor(n.index.y+(n.offset.y+t.y)/T._options.tileHeight)}},this.gcsTileBounds=function(t,e){var n=t.index?t:h({index:t,size:{x:T._options.tileWidth,y:T._options.tileHeight},url:""}),i=T._tileOffset(n.index.level),r=n.bounds({x:0,y:0},i),o=T.map(),a=o.unitsPerPixel(n.index.level),s=[{x:r.left*a,y:T._topDown()*r.top*a},{x:r.right*a,y:T._topDown()*r.bottom*a}];return(e=null===e?o.gcs():void 0===e?o.ingcs():e)!==o.gcs()&&(s=l.transformCoordinates(o.gcs(),e,s)),{left:s[0].x,top:s[0].y,right:s[1].x,bottom:s[1].y}},this._getTile=function(t,e){var n=e||t;return h({index:t,size:{x:T._options.tileWidth,y:T._options.tileHeight},queue:T._queue,url:T._options.url.call(T,n.x,n.y,n.level||0,T._options.subdomains)})},this._getTileCached=function(t,e,n){var i=T.cache.get(T._tileHash(t));return null===i&&(i=T._getTile(t,e),T.cache.add(i,T.remove,n)),i},this._tileHash=function(t){return[t.level||0,t.y,t.x,t.reference||0].join("_")},this._getTileRange=function(t,e){var n=[T.tileAtPoint({x:e.left,y:e.top},t),T.tileAtPoint({x:e.right,y:e.top},t),T.tileAtPoint({x:e.left,y:e.bottom},t),T.tileAtPoint({x:e.right,y:e.bottom},t)];return{start:{x:Math.min(n[0].x,n[1].x,n[2].x,n[3].x),y:Math.min(n[0].y,n[1].y,n[2].y,n[3].y)},end:{x:Math.max(n[0].x,n[1].x,n[2].x,n[3].x),y:Math.max(n[0].y,n[1].y,n[2].y,n[3].y)}}},this._getTiles=function(t,e,n,r){var a,s,l,u,c,d,h,f,p,m,g,v=[],y=!1,x=T._options.keepLower?T._options.minLevel:Math.min(Math.max(t,T._options.minLevel),T._options.maxLevel);for(t<x&&(t=x),g=x;g<=t&&(c=(h=T._getTileRange(g,e)).start,d=h.end,u=T.tilesAtZoom(g),T._options.wrapX||(c.x=Math.min(Math.max(c.x,0),u.x-1),d.x=Math.min(Math.max(d.x,0),u.x-1),g===x&&T._options.keepLower&&(c.x=0,d.x=u.x-1)),T._options.wrapY||(c.y=Math.min(Math.max(c.y,0),u.y-1),d.y=Math.min(Math.max(d.y,0),u.y-1),g===x&&T._options.keepLower&&(c.y=0,d.y=u.y-1)),!(T._options.gcs&&T._options.gcs!==T.map().gcs()&&g!==x&&(d.x+1-c.x)*(d.y+1-c.y)>T.map().size().width*T.map().size().height/T._options.tileWidth/T._options.tileHeight*16));g+=1)for(a=c.x;a<=d.x;a+=1)for(s=c.y;s<=d.y;s+=1)l={level:g,x:a,y:s,reference:T.reference},f={level:g,x:a,y:s,reference:T.reference},T._options.wrapX&&(f.x=o(f.x,u.x)),T._options.wrapY&&(f.y=o(f.y,u.y)),T.isValid(f)&&(r&&v.length<w.length&&(m=w[v.length],y=y||l.level!==m.level||l.x!==m.x||l.y!==m.y),v.push({index:l,source:f}));if(r){if(!y&&v.length===w.length)return;w.splice(0,w.length),i.each(v,(function(t,e){w.push(e.index)}))}if(n){p={x:(c.x+d.x)/2,y:(c.y+d.y)/2,level:t,bottomLevel:t};for(var b=Math.max(d.x-c.x,d.y-c.y)+1;b>=1;b/=2)p.bottomLevel-=1;v.sort(T._loadMetric(p)),T._queue&&T._queue.batch(!0)}for(T.cache.size<v.length&&(console.log("Increasing cache size to "+v.length),T.cache.size=v.length),a=0;a<v.length;a+=1)v[a]=T._getTileCached(v[a].index,v[a].source,!0);return T.cache.purge(T.remove),v},this.gcs=function(t){if(void 0===t)return T._options.gcs||T.map().gcs();var e=T.gcs();return null===t?delete T._options.gcs:T._options.gcs=t,T.gcs()!==e&&(T.clear(),T.gcsFeatures(T.gcs()),T.modified(),T._update()),T},this.prefetch=function(t,e){var n;return n=T._getTiles(t,e,!0),i.when.apply(i,n.map((function(t){return t.fetch()})))},this._loadMetric=function(t){return function(e,n){var i,r,o,a,s;return e=e.index||e,n=n.index||n,e.level!==n.level?t.bottomLevel&&e.level>=t.bottomLevel!=n.level>=t.bottomLevel?e.level>=t.bottomLevel?-1:1:e.level-n.level:(s=Math.pow(2,e.level-t.level),o=(t.x+.5)*s-.5,a=(t.y+.5)*s-.5,(i=e.x-o)*i+(r=e.y-a)*r-((i=n.x-o)*i+(r=n.y-a)*r))}},this.fromLevel=function(t,e){var n=Math.pow(2,-e);return{x:t.x*n,y:t.y*n}},this.toLevel=function(t,e){var n=Math.pow(2,e);return{x:t.x*n,y:t.y*n}},this.drawTile=function(t){var e=t.toString();T._activeTiles.hasOwnProperty(e)?T._moveToTop(t):T._drawTile(t),T._activeTiles[e]=t},this._drawTile=function(t){if(null!==T.renderer())throw new Error("This draw method is not valid on renderer managed layers.");var e,n=t.index.level,r=i(T._getSubLayer(n)),o=T._tileBounds(t),a=T._options.animationDuration,s=i('<div class="geo-tile-container"/>').attr("tile-reference",t.toString());s.append(t.image),s.css({left:o.left-parseInt(r.attr("offsetx")||0,10)+"px",top:o.top-parseInt(r.attr("offsety")||0,10)+"px"}),(e=T.tileCropFromBounds(t))&&s.addClass("crop").css({width:e.x+"px",height:e.y+"px"}),a>0&&t.fadeIn(a),r.append(s),t.catch((function(){console.warn("Could not load tile at "+t.toString()),T._remove(t)}))},this.remove=function(t){var e=t.toString(),n=T._activeTiles[e];return n instanceof h&&T._remove(n),delete T._activeTiles[e],n},this._remove=function(t){t.image&&(t.image.parentElement?i(t.image.parentElement).remove():console.log("No parent element to remove "+t.toString(),t),i(t.image).remove())},this._moveToTop=function(t){i.noop(t)},this._getViewBounds=function(){var t=T.map(),e=t.zoom(),n=T._options.tileRounding(e),i=Math.pow(2,e-n),r=t.size(),o=T.displayToLevel({x:0,y:0}),a=T.displayToLevel({x:r.width,y:0}),s=T.displayToLevel({x:0,y:r.height}),l=T.displayToLevel({x:r.width,y:r.height});return{level:n,scale:i,left:Math.min(o.x,a.x,s.x,l.x),right:Math.max(o.x,a.x,s.x,l.x),top:Math.min(o.y,a.y,s.y,l.y),bottom:Math.max(o.y,a.y,s.y,l.y)}},this._purge=function(t,e,n){var i,r;if(T._updating)return T;for(r in n||(n=T._getViewBounds()),T._activeTiles)i=T._activeTiles[r],T._canPurge(i,n,t,e)&&T.remove(i);return T},this.clear=function(){var t,e=[];for(t in T._activeTiles)e.push(T.remove(t));return T._tileTree={},w=[],e},this.reset=function(){return T.clear(),T._cache.clear(),T._queue.initialSize=_,T},this.toLocal=function(t,e){var n=T.map(),i=n.unitsPerPixel(void 0===e?n.zoom():e);return{x:t.x/i,y:T._topDown()*t.y/i}},this.fromLocal=function(t,e){var n=T.map(),i=n.unitsPerPixel(void 0===e?n.zoom():e);return{x:t.x*i,y:T._topDown()*t.y*i}},this._topDown=function(){return T._options.topDown?1:-1},this._getSubLayer=function(t){if(T.canvas()){var e=T.canvas().find("div[data-tile-layer="+t.toFixed()+"]").get(0);return e||(e=i('<div class=geo-tile-layer data-tile-layer="'+t.toFixed()+'"/>').get(0),T.canvas().append(e)),e}},this._updateSubLayers=function(t,e){var n=T.canvas(),r=parseInt(n.attr("lastlevel"),10),o=parseInt(n.attr("lastoffsetx")||0,10),a=parseInt(n.attr("lastoffsety")||0,10);if(r===t&&Math.abs(o-e.left)<65536&&Math.abs(a-e.top)<65536)return{x:o,y:a};var s=T.map(),l=T._tileOffset(t),u=parseInt((e.left+e.right-s.size().width)/2+l.x,10),c=parseInt((e.top+e.bottom-s.size().height)/2+l.y,10);return n.find(".geo-tile-layer").each((function(e,n){var r=i(n),o=parseInt(r.data("tileLayer"),10);r.css("transform","scale("+Math.pow(2,t-o)+")");var a=parseInt(u/Math.pow(2,t-o),10),s=parseInt(c/Math.pow(2,t-o),10),l=a-parseInt(r.attr("offsetx")||0,10),d=s-parseInt(r.attr("offsety")||0,10);r.attr({offsetx:a,offsety:s}),r.find(".geo-tile-container").each((function(t,e){i(e).css({left:parseInt(i(e).css("left"),10)-l+"px",top:parseInt(i(e).css("top"),10)-d+"px"})}))})),n.attr({lastoffsetx:u,lastoffsety:c,lastlevel:t}),{x:u,y:c}},this._update=function(t){if(t&&t.event&&(t.event.event===s.zoom||t.event.event===s.rotate))return T;if(!T.visible())return T;var e,n=T.map(),r=n.bounds(void 0,null),o=n.zoom(),a=T._options.tileRounding(o);if(T._updateSubLayers){var l=T._getViewBounds(),u=T._updateSubLayers(a,l)||{x:0,y:0},c=T._tileOffset(a);if(null===T.renderer()){var d=Math.pow(2,o-a),h=n.rotation(),f=-c.x+-(l.left+l.right)/2+u.x,p=-c.y+-(l.bottom+l.top)/2+u.y,g=f+n.size().width/2,v=p+n.size().height/2;T.canvas().css({"transform-origin":-f+"px "+-p+"px"});var y="translate("+g+"px,"+v+"px)scale("+d+")";h&&(y+="rotate("+180*h/Math.PI+"deg)"),T.canvas().css("transform",y)}T.canvas().attr({scale:Math.pow(2,o-a),dx:-c.x+-(l.left+l.right)/2,dy:-c.y+-(l.bottom+l.top)/2,offsetx:u.x,offsety:u.y,rotation:n.rotation()})}if(void 0===(e=T._getTiles(a,r,!0,!0)))return T;if(T._tileTree={},e.forEach((function(t){if(t.fetched())delete M[t.toString()],T.drawTile(t),T._setTileTree(t);else{if(t._queued)(T._queue?T._queue.get(t):-1)>=0&&T._queue.add(t);else t.then((function(){if(!m&&t===T.cache.get(t.toString())){var e=n.zoom(),i=T._options.tileRounding(e),r=T._getViewBounds();T._canPurge(t,r,i)?T.remove(t):(T.drawTile(t),T._setTileTree(t))}})),t._queued=!0;T.addPromise(t),M[t.toString()]=t}})),i.when.apply(i,e).done((function(){var t=T.map().zoom(),e=T._options.tileRounding(t);T._purge(e,!0)})),"all"!==T._options.idleAfter)for(var x in M){var b=M[x];e.indexOf(b)<0&&(T.removePromise(b),delete M[x])}return T},this._setTileTree=function(t){if(!T._options.keepLower){var e=t.index;T._tileTree[e.level]=T._tileTree[e.level]||{},T._tileTree[e.level][e.x]=T._tileTree[e.level][e.x]||{},T._tileTree[e.level][e.x][e.y]=t}},this._getTileTree=function(t){return((T._tileTree[t.level]||{})[t.x]||{})[t.y]||null},this._isCovered=function(t){var e=t.index.level,n=t.index.x,i=t.index.y,r=[];return(r=T._getTileTree({level:e-1,x:Math.floor(n/2),y:Math.floor(i/2)}))?[r]:(r=[T._getTileTree({level:e+1,x:2*n,y:2*i}),T._getTileTree({level:e+1,x:2*n+1,y:2*i}),T._getTileTree({level:e+1,x:2*n,y:2*i+1}),T._getTileTree({level:e+1,x:2*n+1,y:2*i+1})]).every((function(t){return null!==t}))?r:null},this._outOfBounds=function(t,e){var n=T._tileOffset(t.index.level),i=1;return t.index.level!==e.level&&(i=Math.pow(2,(e.level||0)-(t.index.level||0))),(t.bottom-n.y)*i<e.top||(t.left-n.x)*i>e.right||(t.top-n.y)*i>e.bottom||(t.right-n.x)*i<e.left},this._canPurge=function(t,e,n,i){if(T._options.keepLower){if((n=n||0)<t.index.level&&t.index.level!==T._options.minLevel)return!0;if(t.index.level===T._options.minLevel&&!T._options.wrapX&&!T._options.wrapY)return!1}else if((i||T._isCovered(t))&&n!==t.index.level&&(n>=T._options.minLevel||t.index.level!==T._options.minLevel)&&(n<T._options.maxLevel||t.index.level!==T._options.maxLevel))return!0;return!!e&&T._outOfBounds(t,e)},this.displayToLevel=function(t,e){var n,i=T.map(),r=i.zoom(),o=T._options.tileRounding(r),a=i.unitsPerPixel(void 0===e?o:e);if(void 0===t){var s=i.size();t={x:s.width/2,y:s.height/2}}try{n=i.displayToGcs(t,T._options.gcs||null)}catch(t){n={x:0,y:0}}return{x:n.x/a,y:T._topDown()*n.y/a}},this.url=function(t){return void 0===t?T._options.originalUrl:(t===T._options.originalUrl||(T._options.originalUrl=t,"string"===i.type(t)&&(t=a(t)),T._options.url=t,T.reset(),T.map().draw()),T)},this.subdomains=function(t){return void 0===t?T._options.subdomains:(t&&("string"===i.type(t)&&(t=t.indexOf(",")>=0?t.split(","):t.split("")),T._options.subdomains=t,T.reset(),T.map().draw()),T)},this._tileOffset=function(t){return void 0===C[t]&&(C[t]=T._options.tileOffset(t)),C[t]},this.visible=function(t){return void 0===t?x():(T.visible()!==t&&(x(t),t&&T._update()),T)},Object.defineProperty(this,"baseQuad",{get:function(){return T._options.baseQuad},set:function(t){T._options.baseQuad=t,T._update()}}),this._addBaseQuadToTiles=function(t,e){t&&(this.baseQuad!==g&&(g&&e.splice(0,1),(g=this.baseQuad)&&(e.splice(0,0,this.baseQuad),t.cacheUpdate(0)),t.data(e)),t._update())},this._init=function(){var t;if(v.apply(T,arguments),null===T.renderer())for(t=0;t<=T._options.maxLevel;t+=1)T._getSubLayer(t);return T},this._exit=function(){return T.reset(),y.apply(T,arguments),m=!0,this._queue&&this._queue._tileLayers&&this._queue._tileLayers.indexOf(T)>=0&&this._queue._tileLayers.splice(this._queue._tileLayers.indexOf(T),1),T},d("tile",this),this};s.defaults={minLevel:0,maxLevel:18,tileOverlap:{x:0,y:0},tileWidth:256,tileHeight:256,wrapX:!0,wrapY:!1,url:null,subdomains:"abc",tileOffset:function(t){return{x:0,y:0}},tilesMaxBounds:null,topDown:!1,keepLower:!0,idleAfter:"view",tileRounding:Math.round,attribution:"",animationDuration:0},i(s,r),t.exports=s},6618:function(t){var e=0;t.exports=function t(){"use strict";if(!(this instanceof t))return new t;var n=this,i=0;return this.modified=function(){return i=e+=1,n},this.timestamp=function(){return i},this.getMTime=this.timestamp,this}},6223:function(t,e,n){var i=n(5699),r=n(6837),o=n(4647),a=n(4634),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638),s=n(6853);e=e||{},r.call(this,e);var l,u,c,d,h,f=this,p={},m={startTime:void 0!==e.startTime?e.startTime:null,endTime:void 0!==e.endTime?e.endTime:null,duration:void 0!==e.duration?e.duration:null,start:0,end:0},g=this.draw,v=this._exit,y=this._init,x=this.modified,b=this.style,_=this._update;return this.featureType="track",this._linePosition=function(t){return function(e,n,i,r){var o=m.timeFunc(e,n,i,r);return"past"===t&&o>=m.start||"current"===t&&o<m.start?m.startPosition[r]:"current"===t&&o>m.end||"future"===t&&o<m.end?m.endPosition[r]:m.positionFunc(e,n,i,r)}},this._headPosition=function(t,e){return m.endPosition[e]},this._headText=function(t,e){return m.text[e]},this._updateTimeRange=function(){null!==m.endTime||null===m.endTime&&(null===m.startTime||null==m.duration)?(m.end=null!==m.endTime?m.endTime:m.timeExtents.end,null!==m.startTime&&(null===m.endTime||m.startTime<=m.endTime)?m.start=m.startTime:null!==m.duration?m.start=m.end-m.duration:m.start=m.timeExtents.start):(m.start=m.startTime,m.end=m.start+m.duration)},this.calculateTimePosition=function(t,e,n){f.dataTime().timestamp()>=f.buildTime().timestamp()&&f._build(),e=null===e?f.layer().map().gcs():void 0===e?f.gcs():e;var i=s({source:f.gcs(),target:e}),r=f.data(),o=[],a=r.map((function(e,n){var i=m.trackFunc(e,n);if(o.push(i),!i.length)return{x:0,y:0,z:0,posidx:-1};var r,a,s,l,u=0,c=i.length-1;if(1===i.length)return{posidx:u,angidx0:u,angidx1:u};if((r=m.timeFunc(i[u],u,e,n))>=t)return{posidx:u,angidx0:u,angidx1:u+1};if((a=m.timeFunc(i[c],c,e,n))<=t)return{posidx:c,angidx0:c-1,angidx1:c};for(;c-u>1;){if(s=Math.floor((c+u)/2),(l=m.timeFunc(i[s],s,e,n))===t)return{posidx:s,angidx0:s-1,angidx1:s+1};l<t?(r=l,u=s):(a=l,c=s)}var d=(t-r)/(a-r);return{posidx0:u,posidx1:c,factor0:1-d,factor1:d,angidx0:u,angidx1:c}}));return a.forEach((function(t,e){var r,a,s;t.posidx<0||(void 0===t.posidx1?r=m.positionFunc(o[e][t.posidx],t.posidx,o[e],e):(a=i.forward(m.positionFunc(o[e][t.posidx0],t.posidx0,o[e],e),!0),s=i.forward(m.positionFunc(o[e][t.posidx1],t.posidx1,o[e],e),!0),r=i.inverse({x:a.x*t.factor0+s.x*t.factor1,y:a.y*t.factor0+s.y*t.factor1,z:(a.z||0)*t.factor0+(s.z||0)*t.factor1},!0)),t.x=r.x,t.y=r.y,t.z=r.z||0,n&&(void 0===t.posidx1&&(a=i.forward(t.angidx0===t.posidx?r:m.positionFunc(o[e][t.angidx0],t.angidx0,o[e],e),!0),s=i.forward(t.angidx1===t.posidx?r:m.positionFunc(o[e][t.angidx1],t.angidx1,o[e],e),!0)),t.angle=Math.atan2(s.y-a.y,s.x-a.x)))})),a},this._build=function(){f.buildTime().modified(),l||(l={past:f.layer().createFeature("line"),future:f.layer().createFeature("line"),current:f.layer().createFeature("line")},f.dependentFeatures([l.past,l.current,l.future]));var t=f.data();m.data=t,m.timeFunc=f.style.get("time"),m.positionFunc=f.style.get("position"),m.trackFunc=f.style.get("track"),m.textFunc=f.style.get("text"),["past","current","future"].forEach((function(e){l[e].style(f.style()).style(f[e+"Style"]()).line(f.style("track")).gcs(f.gcs()).data(t).position(f._linePosition(e))}));var e,n,i={};if(t.forEach((function(t,e){var n,r=m.trackFunc(t,e);r.length&&(n=m.timeFunc(r[0],0,t,e),(void 0===i.start||n<i.start)&&(i.start=n),r.length>1&&(n=m.timeFunc(r[r.length-1],r.length-1,t,e)),(void 0===i.end||n>i.end)&&(i.end=n))})),m.timeExtents=i,f._updateTimeRange(),m.startPosition=f.calculateTimePosition(m.start,null),m.endPosition=f.calculateTimePosition(m.end,null,!0),m.text=t.map((function(t,i){var r=m.textFunc(t,i);return e|=null==r,null==r||""===r?"":(n=!0,m.startPosition[i].posidx<0&&(r=""),r)})),e&&!c){if(!(o.registries.features[f.layer().rendererName()]||{}).marker){var r=o.rendererForFeatures(["marker"]);u=o.createLayer("feature",f.layer().map(),{renderer:r}),f.layer().addChild(u),f.layer().node().append(u.node())}c=(u||f.layer()).createFeature("marker");var a=f.dependentFeatures();a.push(c),f.dependentFeatures(a)}if(n&&!h){if(!(o.registries.features[f.layer().rendererName()]||{}).text){var s=o.rendererForFeatures(["text"]);d=o.createLayer("feature",f.layer().map(),{renderer:s}),f.layer().addChild(d),f.layer().node().append(d.node())}h=(d||f.layer()).createFeature("text");var p=f.dependentFeatures();p.push(h),f.dependentFeatures(p)}if(c){c.headData=m.endPosition,c.style(f.markerStyle()).gcs(f.gcs()).data(t).position(f._headPosition);var g=c.style.get("radius");c.style("radius",(function(t,e){return m.text[e]||m.startPosition[e].posidx<0?0:g(t,e)}))}return h&&(h.headData=m.endPosition,h.style(f.textStyle()).gcs(f.gcs()).data(t).text(f._headText).position(f._headPosition)),f},this._updateTimeAndPosition=function(){l&&(f._updateTimeRange(),m.startPosition=f.calculateTimePosition(m.start,null),m.endPosition=f.calculateTimePosition(m.end,null,!0),l.past.modified(),l.current.modified(),l.future.modified(),c&&c.modified(),h&&h.modified(),f.updateTime().modified(),f.modified())},this._update=function(){return _.call(f),(f.dataTime().timestamp()>=f.buildTime().timestamp()||f.updateTime().timestamp()<=f.timestamp())&&f._build(),f.updateTime().modified(),f},this.draw=function(){var t=g();return l&&(l.past.draw(),l.current.draw(),l.future.draw()),c&&c.draw(),h&&h.draw(),t},this.modified=function(){var t=x();return l&&(l.past.modified(),l.current.modified(),l.future.modified()),c&&c.modified(),h&&h.modified(),t},this.style=function(t,e,n){return"style"===(n=n||"style")?b(t,e):void 0===t?p[n]:"string"==typeof t&&void 0===e?(p[n]||{})[t]:(void 0===p[n]&&(p[n]={}),void 0===e?p[n]=i.extend(!0,p[n],t):p[n][t]=e,f.modified(),f)},this.style.get=b.get,["markerStyle","textStyle","pastStyle","currentStyle","futureStyle"].forEach((function(t){f[t]=function(e,n){return f.style(e,n,t)}})),this.track=function(t){return void 0===t?f.style("track"):(f.style("track",t),f.dataTime().modified(),f.modified(),f)},this.position=function(t){return void 0===t?f.style("position"):(f.style("position",t),f.dataTime().modified(),f.modified(),f)},this.time=function(t){return void 0===t?f.style("time"):(f.style("time",t),f.dataTime().modified(),f.modified(),f)},this.timeRange=function(t){if(void 0===t)return{startTime:m.startTime,endTime:m.endTime,duration:m.duration,start:m.start,end:m.end,minimum:(m.timeExtents||{}).start,maximum:(m.timeExtents||{}).end};var e=!1;return void 0!==t.startTime&&t.startTime!==m.startTime&&(m.startTime=null===t.startTime?t.startTime:+t.startTime,e=!0),void 0!==t.endTime&&t.endTime!==m.endTime&&(m.endTime=null===t.endTime?t.endTime:+t.endTime,e=!0),void 0!==t.duration&&t.duration!==m.duration&&(m.duration=null===t.duration?t.duration:+t.duration,e=!0),e&&f._updateTimeAndPosition(),f},this.startTime=function(t){return void 0===t?m.startTime:(t!==m.startTime&&(m.startTime=null===t?t:+t,f._updateTimeAndPosition()),f)},this.endTime=function(t){return void 0===t?m.endTime:(t!==m.endTime&&(m.endTime=null===t?t:+t,f._updateTimeAndPosition()),f)},this.duration=function(t){return void 0===t?m.duration:(t!==m.duration&&(m.duration=null===t?t:+t,f._updateTimeAndPosition()),f)},this._mergeSearchResults=function(t,e){return t.extra=t.extra||{},e.forEach((function(e){return e.value.index.forEach((function(n,i){t.index.indexOf(n)<0&&(t.index.push(n),t.found.push(e.value.found[i]),t.where=t.where||{},e.value.extra&&e.value.extra[n]&&(t.extra[n]=e.value.extra[n]),a.isObject(t.extra[n])||(t.extra[n]={value:t.extra[n]}),t.extra[n].where=e.key)}))})),t},this.pointSearch=function(t){var e=l.current.pointSearch(t),n=l.past.pointSearch(t),i=l.future.pointSearch(t),r=c?c.pointSearch(t):{index:[]};return this._mergeSearchResults(e,[{key:"marker",value:r},{key:"past",value:n},{key:"future",value:i}])},this.polygonSearch=function(t,e){var n=l.current.polygonSearch(t,e),i=l.past.polygonSearch(t,e),r=l.future.polygonSearch(t,e),o=c?c.polygonSearch(t,e):{index:[]};return this._mergeSearchResults(n,[{key:"marker",value:o},{key:"past",value:i},{key:"future",value:r}])},this._exit=function(){l&&f.layer()&&(f.layer().deleteFeature(l.past),f.layer().deleteFeature(l.current),f.layer().deleteFeature(l.future)),l=null,(u||f.layer())&&c&&(u||f.layer()).deleteFeature(c),u&&f.layer()&&f.layer().removeChild(u),u=null,(d||f.layer())&&h&&(d||f.layer()).deleteFeature(h),d&&f.layer()&&f.layer().removeChild(d),d=null,f.dependentFeatures([]),v()},this._init=function(t){t=t||{},y.call(f,t);var e=i.extend(!0,{},{track:function(t){return t},position:function(t){return t},time:function(t,e){return void 0!==t.t?t.t:e}},void 0===t.style?{}:t.style),n=i.extend(!0,{},{rotateWithMap:!0,rotation:function(t,e){return-m.endPosition[e].angle||0}},void 0===t.markerStyle?{}:t.markerStyle),r=i.extend(!0,{},{rotateWithMap:!0,rotation:function(t,e){return void 0!==m.endPosition[e].angle?-m.endPosition[e].angle+Math.PI/2:0}},void 0===t.textStyle?{}:t.textStyle),o=i.extend(!0,{},{strokeOpacity:.25},void 0===t.pastStyle?{}:t.pastStyle),a=i.extend(!0,{},{},void 0===t.currentStyle?{}:t.currentStyle),s=i.extend(!0,{},{strokeOpacity:.25},void 0===t.futureStyle?{}:t.futureStyle);["track","position","time"].forEach((function(n){void 0!==t[n]&&(e[n]=t[n])})),f.style(e),f.markerStyle(n),f.textStyle(r),f.pastStyle(o),f.currentStyle(a),f.futureStyle(s)},this};i(s,r),t.exports=s},6853:function(t,e,n){var i=n(4252),r=n(5365),o=n(5240),a=n(4634);i=i.__esModule?i.default:i;var s=n(1103);s.keys().forEach((function(t){i.Proj.projections.add(s(t))}));var l={},u=/^(.* |)\\+axis=e(n|s)u(| .*)$/,c=/(^|\s)\+(s[1-3][1-3]|[xyz]off)=\S/,d=function t(e){"use strict";if(!(this instanceof t))return(e=e||{}).source in l||(Object.keys(l).length>=10&&(l={}),l[e.source]={}),e.target in l[e.source]||(Object.keys(l[e.source]).length>=10&&(l[e.source]={}),l[e.source][e.target]=new t(e)),l[e.source][e.target];var n,s,u,d,h,f,p,m=this,g={s11:0,s12:4,s13:8,xoff:12,s21:1,s22:5,s23:9,yoff:13,s31:2,s32:6,s33:10,zoff:14};function v(t){if(!c.exec(t))return{proj:t};var e,n,i=a.mat4AsArray(),r=[];return t.split(/(\s+)/).forEach((function(t){var e=/^\+(s[1-3][1-3]|[xyz]off)=(.*)$/.exec(t);e?i[g[e[1]]]=parseFloat(e[2]):r.push(t)})),n={proj:r.join(" "),orig:t},(e=o.invert(a.mat4AsArray(),i))?(n.matrix=i,n.inverse=e):console.warn("Affine transform is not invertable and will not be used: "+t),n}function y(){var t=v(m.source()),e=v(m.target()),r=t.proj,o=e.proj;d=t.matrix,h=t.inverse,f=e.matrix,p=e.inverse,n=new i(r,o)}this.source=function(t){return void 0===t?s||"EPSG:4326":(s=t,y(),m)},this.target=function(t){return void 0===t?u||"EPSG:3857":(u=t,y(),m)},this._forward=function(t){if(d){var e=r.transformMat4(a.vec3AsArray(),[t.x,t.y,t.z||0],h);t={x:e[0],y:e[1],z:e[2]}}var i=n.forward(t,!0);if(i.z=t.z||0,f){var o=r.transformMat4(a.vec3AsArray(),[i.x,i.y,i.z],f);i={x:o[0],y:o[1],z:o[2]}}return i},this._inverse=function(t){if(f){var e=r.transformMat4(a.vec3AsArray(),[t.x,t.y,t.z||0],p);t={x:e[0],y:e[1],z:e[2]}}var i=n.inverse(t,!0);if(i.z=t.z||0,d){var o=r.transformMat4(a.vec3AsArray(),[i.x,i.y,i.z],d);i={x:o[0],y:o[1],z:o[2]}}return i},this.forward=function(t){return Array.isArray(t)?t.map(m._forward):m._forward(t)},this.inverse=function(t){return Array.isArray(t)?t.map(m._inverse):m._inverse(t)},e=e||{};try{this.source(e.source)}catch(t){console.error("Can't use transform source: "+e.source),this.source("EPSG:4326")}try{this.target(e.target)}catch(t){console.error("Can't use transform target: "+e.target),this.target("EPSG:3857")}return this};d.defs=i.defs,d.lookup=function(t){var e,r,o=n(5638),a=o.Deferred();return i.defs.hasOwnProperty(t)?a.resolve(i.defs[t]):2!==(r=t.split(":")).length||"EPSG"!==r[0].toUpperCase()?a.reject("Invalid projection code").promise():(e=r[1],o.ajax({url:"https://epsg.io/?q="+e+"&format=json"}).done((function(e){var n=(e.results||[])[0];return n&&n.proj4?(i.defs(t,n.proj4),o.when(i.defs[t])):a.reject(e).promise()})))},d.transformCoordinates=function(t,e,n,i){"use strict";if(t===e||Array.isArray(n)&&!n.length)return n;if(Array.isArray(n)&&n.length>=3&&3===i&&!a.isObject(n[0])&&!c.test(t)&&!c.test(e))return d.transformCoordinatesFlatArray3(t,e,n);if(Array.isArray(n)&&n.length&&a.isObject(n[0])&&"x"in n[0]&&"y"in n[0]){var r=t.match(u),o=e.match(u);if(r&&o&&r[1]===o[1]&&r[3]===o[3])return"z"in n[0]?n.map((function(t){return{x:+t.x,y:-t.y,z:+t.z||0}})):n.map((function(t){return{x:+t.x,y:-t.y}}))}var s,l=d({source:t,target:e});return a.isObject(n)&&"x"in n&&"y"in n?(s=l.forward({x:+n.x,y:+n.y,z:+n.z||0},!0),"z"in n?s:{x:s.x,y:s.y}):Array.isArray(n)&&1===n.length&&a.isObject(n[0])&&"x"in n[0]&&"y"in n[0]?(s=l.forward({x:+n[0].x,y:+n[0].y,z:+n[0].z||0},!0),"z"in n[0]?[s]:[{x:s.x,y:s.y}]):d.transformCoordinatesArray(l,n,i)},d.transformCoordinatesArray=function(t,e,n){var i,r,o,s,l,u,c,d,h,f={};function p(){if(Array.isArray(e[0]))if(2===e[0].length)s=function(t){return+e[t][0]},l=function(t){return+e[t][1]},c=function(t,e,n){d[t]=[e,n]};else{if(3!==e[0].length)throw new Error("Invalid coordinates. Requires two or three components per array");s=function(t){return+e[t][0]},l=function(t){return+e[t][1]},u=function(t){return+e[t][2]},c=function(t,e,n,i){d[t]=[e,n,i]}}else if(2===e.length)o=2,s=function(t){return+e[t*o]},l=function(t){return+e[t*o+1]},c=function(t,e,n){d[t]=e,d[t+1]=n};else if(3===e.length)o=3,s=function(t){return+e[t*o]},l=function(t){return+e[t*o+1]},u=function(t){return+e[t*o+2]},c=function(t,e,n,i){d[t]=e,d[t+1]=n,d[t+2]=i};else{if(!n)throw new Error("Invalid coordinates");if(2!==n&&3!==n)throw new Error("Number of components should be two or three");o=n,s=function(t){return+e[t]},l=function(t){return+e[t+1]},2===n?c=function(t,e,n){d[t]=e,d[t+1]=n}:(u=function(t){return+e[t+2]},c=function(t,e,n,i){d[t]=e,d[t+1]=n,d[t+2]=i})}}if(u=function(){return 0},!Array.isArray(e))throw new Error("Coordinates are not valid");if((d=[]).length=e.length,r=e.length,!e.length)return d;for(Array.isArray(e[0])||a.isObject(e[0])?(o=1,Array.isArray(e[0])?p():a.isObject(e[0])&&function(){if(!(e[0]&&"x"in e[0]&&"y"in e[0]))throw new Error("Invalid coordinates");s=function(t){return+e[t].x},l=function(t){return+e[t].y},"z"in e[0]?(u=function(t){return+e[t].z},c=function(t,e,n,r){d[i]={x:e,y:n,z:r}}):c=function(t,e,n){d[t]={x:e,y:n}}}()):p(),i=0;i<r;i+=o)f.x=s(i),f.y=l(i),f.z=u(i),h=t.forward(f,!0),c(i,h.x,h.y,h.z);return d},d.transformCoordinatesFlatArray3=function(t,e,n){"use strict";var r,o=t.match(u),a=e.match(u);if(o&&a&&o[1]===a[1]&&o[3]===a[3]){for(r=n.length-3+1;r>=0;r-=3)n[r]*=-1;return n}var s,l=i.Proj(t),c=i.Proj(e),d={},h=new i(l,c);for(r=n.length-3;r>=0;r-=3)d.x=+n[r],d.y=+n[r+1],d.z=+(n[r+2]||0),s=h.forward(d,!0),n[r]=s.x,n[r+1]=s.y,n[r+2]=void 0===s.z?d.z:s.z;return n},d.affineForward=function(t,e){"use strict";var n,i=t.origin,r=t.scale||{x:1,y:1,z:1};for(n=0;n<e.length;n+=1)e[n].x=(e[n].x-i.x)*r.x,e[n].y=(e[n].y-i.y)*r.y,e[n].z=((e[n].z||0)-(i.z||0))*r.z;return e},d.affineInverse=function(t,e){"use strict";var n,i=t.origin,r=t.scale||{x:1,y:1,z:1};for(n=0;n<e.length;n+=1)e[n].x=e[n].x/r.x+i.x,e[n].y=e[n].y/r.y+i.y,e[n].z=(e[n].z||0)/r.z+(i.z||0);return e},d.sphericalDistance=function(t,e,n,r,o){if(r=r||"EPSG:4326",o=o||i.WGS84,(n=n||r)!==r){var a=d.transformCoordinates(n,r,[t,e]);t=a[0],e=a[1]}var s=t.y*Math.PI/180,l=e.y*Math.PI/180,u=(e.x-t.x)*Math.PI/180,c=Math.sin(s),h=Math.cos(s),f=Math.sin(l),p=Math.cos(l),m=Math.atan2(Math.pow(Math.pow(p*Math.sin(u),2)+Math.pow(h*f-c*p*Math.cos(u),2),.5),c*f+h*p*Math.cos(u));return o.a*m},d.vincentyDistance=function(t,e,n,r,o,a){if(r=r||"EPSG:4326",o=o||i.WGS84,a=a||100,(n=n||r)!==r){var s=d.transformCoordinates(n,r,[t,e]);t=s[0],e=s[1]}var l,u,c,h,f,p,m,g,v,y,x=o.a,b=o.b||o.a*(1-(o.f||1/o.rf)),_=o.f||(o.rf?1/o.rf:1-b/x),w=t.y*Math.PI/180,M=e.y*Math.PI/180,A=((e.x-t.x)%360+360)%360*Math.PI/180,T=Math.atan((1-_)*Math.tan(w)),C=Math.atan((1-_)*Math.tan(M)),E=Math.sin(T),S=Math.cos(T),k=Math.sin(C),P=Math.cos(C),O=A,R=A+2*Math.PI;if(w===M&&!A)return{distance:0,alpha1:0,alpha2:0};for(y=a;y>0&&Math.abs(O-R)>1e-12;y-=1)l=Math.pow(Math.pow(P*Math.sin(O),2)+Math.pow(S*k-E*P*Math.cos(O),2),.5),u=E*k+S*P*Math.cos(O),c=Math.atan2(l,u),h=S*P*Math.sin(O)/l,R=O,O=A+(1-(m=_/16*(f=1-Math.pow(h,2))*(4+_*(4-3*f))))*_*h*(c+m*l*((p=u-(f?2*E*k/f:0))+m*u*(2*Math.pow(p,2)-1)));return y?{distance:b*(1+(g=f*(x*x-b*b)/(b*b))/16384*(4096+g*(g*(320-175*g)-768)))*(c-(v=g/1024*(256+g*(g*(74-47*g)-128)))*l*(p+v/4*(u*(2*Math.pow(p,2)-1)-v/6*p*(4*l*l-3)*(4*Math.pow(p,2)-3)))),alpha1:Math.atan2(P*Math.sin(O),S*k-E*P*Math.cos(O)),alpha2:Math.atan2(S*Math.sin(O),-E*P+S*k*Math.cos(O))}:void 0},d.proj4=i,t.exports=d},3762:function(t){t.exports={}},9219:function(t,e,n){var i=n(2531).d3,r=n(9450),o=n(5699),a=n(4647).registerWidget,s=n(4634),l=n(1946);n(2352);var u=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this,e);var n=this,o=[],a=e.width||300,u=e.ticks||6,d=this._init;return this._init=function(){d();var t=n.canvas();i.select(t).attr("class","color-legend-container"),n.popup=i.select(t).append("div").attr("class","color-legend-popup"),e.categories&&n.categories(e.categories)},this._draw=function(){if(i.select(n.canvas()).selectAll("div.geojs-color-legends").remove(),o.length){i.select(n.canvas()).style("display","block");var t=i.select(n.canvas()).append("div").attr("class","geojs-color-legends"),e=a;o.forEach((function(i,r){var o=t.append("div").attr("class","geojs-color-legend");o.append("div").attr("class","geojs-title").text(i.name);var a=o.append("svg").attr({class:"svg",width:e,height:"40px",viewBox:"-20 0 "+e+" 40"});"discrete"===i.type?n._drawDiscrete(a,e-40,i):"continuous"===i.type&&n._drawContinous(a,e-40,i)}))}else i.select(n.canvas()).style("display","none")},this.categories=function(t){return void 0===t?o:(o=n._prepareCategories(t),n._draw(),n)},this.addCategories=function(t){return o=o.concat(n._prepareCategories(t)),n._draw(),n},this.removeCategories=function(t){return o=o.filter((function(e){return-1===t.indexOf(e)})),n._draw(),n},this._prepareCategories=function(t){return t.forEach((function(t){t.color=t.colors.map((function(t){return s.convertColorToHex(t,!0)}))})),t},this._drawDiscrete=function(t,e,r){if(-1===["linear","log","sqrt","pow","quantile","ordinal"].indexOf(r.scale))throw new Error("unsupported scale");var o,a,l,d,h,f,p;if("ordinal"===r.scale)l=i.scale.ordinal().domain(r.domain).range(r.colors),n._renderDiscreteColors(t,r.domain,l,e,(function(t){return t})),d=i.scale.ordinal().domain(r.domain).rangeRoundBands([0,e]),h=i.svg.axis().scale(d).tickValues((function(){var t=Math.ceil(r.domain.length/u);return r.domain.filter((function(e,n){return n%t==0}))}));else if("quantile"===r.scale){o=[0,r.colors.length],f=s.range(0,r.colors.length-1),a=i.scale.quantile().domain(r.domain).range(f),l=i.scale.quantize().domain(o).range(r.colors),n._renderDiscreteColors(t,f,l,e,(function(t){return a.invertExtent(t).join(" - ")}));var m=[a.invertExtent(0)[0]];m=m.concat(f.map((function(t){return a.invertExtent(t)[1]}))),h=v(d=i.scale.ordinal().domain(m).rangePoints([0,e]))}else if(-1!==["linear","log","sqrt","pow"].indexOf(r.scale)){o=[0,r.colors.length],a=i.scale[r.scale]().domain(r.domain).range(o).nice(),l=i.scale.quantize().domain(o).range(r.colors),f=s.range(0,r.colors.length-1);var g=Math.max.apply(null,r.domain.map((function(t){return c(t)})));n._renderDiscreteColors(t,f,l,e,(function(t){return n._popupFormatter(a.invert(t),g)+" - "+n._popupFormatter(a.invert(t+1),g)})),(p=f.slice()).push(r.colors.length),h=v(d=i.scale.ordinal().domain(p.map((function(t){return a.invert(t)}))).rangePoints([0,e]))}function v(t){return i.svg.axis().scale(t).tickFormat(i.format(".2s")).tickValues((function(){var e=Math.ceil(t.domain().length/u);return t.domain().filter((function(t,n){return n%e==0}))}))}r.endAxisLabelOnly&&h.tickValues([d.domain()[0],d.domain()[d.domain().length-1]]),n._renderAxis(t,h)},this._renderDiscreteColors=function(t,e,i,r,o){t.selectAll("rect").data(e).enter().append("rect").attr("width",r/e.length).attr("height","20px").attr("fill",(function(t){return i(t)})).attr("transform",(function(t,n){return"translate("+n*r/e.length+" ,0)"})).on("mousemove",(function(t){n._showPopup(o(t))})).on("mouseout",n._hidePopup)},this._drawContinous=function(t,e,r){var o,a,s;if(-1===["linear","log","sqrt","pow"].indexOf(r.scale))throw new Error("unsupported scale");var d=[0];for(s=1;s<r.domain.length-1;s++)d.push(e/(r.domain.length-1)*s);d.push(e),o=i.scale[r.scale]().domain(r.domain).range(d).nice(),"log"===r.scale&&r.base&&o.base(r.base),"pow"===r.scale&&r.exponent&&o.exponent(r.exponent);var h=l(),f=Math.max.apply(null,r.domain.map((function(t){return c(t)}))),p=t.append("defs").append("linearGradient").attr("id","gradient"+h);for(p.append("stop").attr("offset","0%").attr("stop-color",r.colors[0]),s=1;s<r.colors.length-1;s++)p.append("stop").attr("offset",(100/(r.colors.length-1)*s).toFixed(6)+"%").attr("stop-color",r.colors[s]);p.append("stop").attr("offset","100%").attr("stop-color",r.colors[r.colors.length-1]),t.append("rect").attr("fill","url(#gradient"+h+")").attr("width",e).attr("height","20px").on("mousemove",(function(){var t=o.invert(i.mouse(this)[0]),e=n._popupFormatter(t,f);n._showPopup(e)})).on("mouseout",n._hidePopup),a=i.svg.axis().scale(o).ticks(u,".2s"),r.endAxisLabelOnly&&a.tickValues([r.domain[0],r.domain[r.domain.length-1]]),n._renderAxis(t,a)},this._renderAxis=function(t,e){t.append("g").attr("class","axis x").attr("transform","translate(0, 20)").call((function(t){t.call(e)}))},this._popupFormatter=function(t,e){return t=parseFloat(t.toFixed(8)),e=Math.min(e,c(t)),e=Math.min(e,Math.max(3,7-Math.trunc(t).toString().length)),i.format("."+e+"f")(t)},this._showPopup=function(t){var e=i.mouse(n.canvas());n.popup.text(t);var r=n.canvas().clientWidth,o=n.popup[0][0].clientWidth;n.popup.style({left:e[0]-(e[0]+o-r>-10?o:0)+"px",top:e[1]-22+"px"}).transition().duration(200).style("opacity",1)},this._hidePopup=function(){n.popup.transition().duration(200).style("opacity",0)},this};function c(t){if(!isFinite(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;){if(!isFinite(t*e))return 0;e*=10,n++}return n}o(u,r),a("dom","colorLegend",u),t.exports=u},9450:function(t,e,n){var i=n(8123),r=n(5699),o=n(4647).registerWidget,a=function t(e){"use strict";if(!(this instanceof t))return new t(e);i.call(this,e);var n=this;return this._init=function(){return e.hasOwnProperty("parent")&&e.parent.addChild(n),n._createCanvas(),n._appendCanvasToParent(),n.canvas().addEventListener("mousedown",(function(t){t.stopPropagation()})),n.reposition(),n},this._createCanvas=function(){n.canvas(document.createElement(e.el||"div"))},this};r(a,i),o("dom","dom",a),t.exports=a},253:function(t,e,n){t.exports={colorLegendWidget:n(9219),domWidget:n(9450),legendWidget:n(4364),scaleWidget:n(3362),sliderWidget:n(7093),svgWidget:n(9731),uiLayer:n(6408),widget:n(8123)}},4364:function(t,e,n){var i=n(9731),r=n(5699),o=n(4647).registerWidget,a=function t(e){"use strict";if(!(this instanceof t))return new t(e);i.call(this,e);var r=n(2531).d3,o=n(5108),a=this,s=[],l=null,u=null,c=null;this.categories=function(t){return void 0===t?s.slice():(s=t.slice().map((function(t){return"line"===t.type&&(t.style.fill=!1,t.style.stroke=!0),t})),a.draw(),a)},this.size=function(){var t,e=1,n=r.select(a.canvas()).append("text").style("opacity",1e-6);return s.forEach((function(t){n.text(t.name),e=Math.max(e,n.node().getBBox().width)})),n.remove(),t=20*(s.length+1),{width:e+50,height:t}},this.draw=function(){function t(t){t.style("fill",(function(t){return t.style.fill||void 0===t.style.fill?t.style.fillColor:"none"})).style("fill-opacity",(function(t){return void 0===t.style.fillOpacity?1:t.style.fillOpacity})).style("stroke",(function(t){return t.style.stroke||void 0===t.style.stroke?t.style.strokeColor:"none"})).style("stroke-opacity",(function(t){return void 0===t.style.strokeOpacity?1:t.style.strokeOpacity})).style("stroke-width",(function(t){return void 0===t.style.strokeWidth?1.5:t.style.strokeWidth}))}a._init(),c.attr("height",a.size().height+24).style("display",null);var e=a._scale(),n=u.selectAll("g.geo-label").data(s,(function(t){return t.name})).enter().append("g").attr("class","geo-label").attr("transform",(function(t,n){return"translate(0,"+e.y(n)+")"}));return t(n.filter((function(t){return"point"!==t.type&&"line"!==t.type})).append("rect").attr("x",0).attr("y",-6).attr("rx",5).attr("ry",5).attr("width",40).attr("height",12)),t(n.filter((function(t){return"point"===t.type})).append("circle").attr("cx",20).attr("cy",0).attr("r",6)),t(n.filter((function(t){return"line"===t.type})).append("line").attr("x1",0).attr("y1",0).attr("x2",40).attr("y2",0)),n.append("text").attr("x","50px").attr("y",0).attr("dy","0.3em").text((function(t){return t.name})),a.reposition(),a},this._scale=function(){return{x:r.scale.linear().domain([0,1]).range([0,a.size().width]),y:r.scale.linear().domain([0,s.length-1]).range([6,a.size().height-6])}},this._init=function(){l||(a._createCanvas(),a._appendCanvasToParent());var t=a.size().width+24+4,e=a.size().height+24+4;l&&l.remove(),r.select(a.canvas()).attr("width",t).attr("height",e),l=r.select(a.canvas()).append("g"),u=l.append("g").attr("transform","translate("+[14,14]+")"),c=u.append("rect").attr("x",-12).attr("y",-12).attr("width",t-4).attr("height",e-4).attr("rx",3).attr("ry",3).style({stroke:"black","stroke-width":"1.5px",fill:"white","fill-opacity":.75,display:"none"}),u.on("mousedown",(function(){r.event.stopPropagation()})),u.on("mouseover",(function(){c.transition().duration(250).style("fill-opacity",1)})),u.on("mouseout",(function(){c.transition().duration(250).style("fill-opacity",.75)})),a.reposition()},this.geoOn(o.resize,(function(){a.draw()}))};r(a,i),o("dom","legend",a),t.exports=a},3362:function(t,e,n){var i=n(5638),r=n(5699),o=n(9731),a=n(4647).registerWidget;n(4129);var s=function t(e){"use strict";if(!(this instanceof t))return new t(e);o.call(this,e);var r=n(5108),a=n(6853),s=n(4634),l=n(2531).d3,u=this,c=this._exit,d=i.extend({},{scale:1,maxWidth:200,maxHeight:"left"===e.orientation||"right"===e.orientation?200:20,orientation:"bottom",strokeWidth:2,tickLength:10,units:"si",distance:function(t,e,n){return"+proj=longlat +axis=enu"===n?Math.sqrt(s.distance2dSquared(t,e)):a.sphericalDistance(t,e,n)}},e);this._init=function(){return u._createCanvas(),u._appendCanvasToParent(),u.reposition(),l.select(u.canvas()).attr({width:d.maxWidth,height:d.maxHeight}),u.geoOn(r.pan,u._update),u._render(),u},this._exit=function(){u.geoOff(r.pan,u._update),c()},this._vertical=function(){return"left"===d.orientation||"right"===d.orientation},this._scaleValue=function(e,n,i){var r,o,a,s=[{multiple:1,digits:1},{multiple:1.5,digits:2},{multiple:2,digits:1},{multiple:3,digits:1},{multiple:5,digits:1},{multiple:8,digits:1}],l=(i=t.unitsTable[i]||i||t.unitsTable[d.units]||d.units)[0];return i.forEach((function(t){e>=t.scale*(t.minimum||1)&&(l=t)})),o=Math.floor(Math.log(e/l.scale)/Math.log(l.basis||10)),(s=l.multiples||s).forEach((function(t){var n=l.scale*t.multiple*Math.pow(10,o);n<=e&&(r=t,a=n)})),{html:(r.multiple*Math.pow(10,o)).toFixed(Math.max(0,-o+r.digits-1))+" "+l.unit,value:a,pixels:a/e*n,power:o,multiple:r,unitRecord:l,originalValue:e,originalPixels:n}},this._render=function(){var t,e,n,r,o,a,s=l.select(u.canvas()),c=u.layer().map(),h=d.maxWidth,f=d.maxHeight,p=d.strokeWidth,m=.5*p,g=d.tickLength,v=u._vertical();if(t=(v?d.maxHeight:d.maxWidth)-p,n={x:(e={x:(e=i(s[0][0]).offset()).left+("left"===d.orientation?h-m:m),y:e.top+("top"===d.orientation?f-m:m)}).x+(v?0:t),y:e.y+(v?t:0)},(r=d.distance(c.displayToGcs(e,null),c.displayToGcs(n,null),c.gcs())*d.scale)<=0||!isFinite(r))console.warn("The distance calculated for the scale is invalid: "+r);else{switch(o=u._scaleValue(r,t),v?f=o.pixels+p:h=o.pixels+p,s.attr({width:h,height:f}),s.select("polyline").empty()&&s.append("polyline").classed("geojs-scale-widget-bar",!0).attr({fill:"none","stroke-width":p}),s.select("text").empty()&&s.append("text").classed("geojs-scale-widget-text",!0),d.orientation){case"bottom":a=[[m,g],[m,m],[h-m,m],[h-m,g]],s.select("text").attr({x:h/2,y:2*p,"text-anchor":"middle","dominant-baseline":"hanging"});break;case"top":a=[[m,f-g],[m,f-m],[h-m,f-m],[h-m,f-g]],s.select("text").attr({x:h/2,y:f-2*p,"text-anchor":"middle","dominant-baseline":"alphabetic"});break;case"left":a=[[h-g,m],[h-m,m],[h-m,f-m],[h-g,f-m]],s.select("text").attr({x:h-2*p,y:f/2,"text-anchor":"end","dominant-baseline":"middle"});break;case"right":a=[[g,m],[m,m],[m,f-m],[g,f-m]],s.select("text").attr({x:2*p,y:f/2,"text-anchor":"start","dominant-baseline":"middle"})}s.select("polyline").attr("points",a.map((function(t){return t.join(",")})).join(" ")),s.select("text").html(o.html)}},this._update=function(){u._render()},this.options=function(t,e){if(void 0===t){var n=i.extend({},d);return n.position=u.position(void 0,!0),n}return"string"==typeof t&&void 0===e?"position"===t?u.position(void 0,!0):d[t]:(void 0===e?d=i.extend(!0,d,t):d[t]=e,(t.position||"position"===t)&&u.position(t.position||e),u._render(),u)}};r(s,o),s.unitsTable={si:[{unit:"nm",scale:1e-9},{unit:"μm",scale:1e-6},{unit:"mm",scale:.001},{unit:"m",scale:1},{unit:"km",scale:1e3}],miles:[{unit:"in",scale:.0254},{unit:"in",scale:.0254,basis:12,multiples:[{multiple:1,digits:1},{multiple:1.5,digits:2},{multiple:2,digits:1},{multiple:3,digits:1},{multiple:6,digits:1},{multiple:9,digits:1}]},{unit:"ft",scale:.3048},{unit:"mi",scale:1609.344}],decmiles:[{unit:"mi",scale:1609.344}]},s.areaUnitsTable={si:[{unit:"nm²",scale:1e-18},{unit:"μm²",scale:1e-12},{unit:"mm²",scale:1e-6},{unit:"m²",scale:1},{unit:"km²",scale:1e6}],hectares:[{unit:"ha",scale:1e4}],decmiles:[{unit:"mi²",scale:2589988.110336}],miles:[{unit:"in²",scale:64516e-8},{unit:"ft²",scale:.09290304},{unit:"mi²",scale:2589988.110336}],acres:[{unit:"pl",scale:25.29285264},{unit:"rd",scale:1011.7141056},{unit:"ac",scale:4046.8564224}]},s.formatUnit=function(t,e,n,i){if(null!=t){if(!Array.isArray(e)){if(!(n=n||s.unitsTable)||!n[e||"si"])return;e=n[e||"si"]}var r;for(r=0;r<e.length-1&&!(t<e[r+1].scale);r+=1);if(t/=(e=e[r]).scale,!((i=Math.max(0,-Math.ceil(Math.log10(t))+(void 0===i||i<0?3:i)))>10)){var o=t.toFixed(i);if(i){for(;"0"===o.substr(o.length-1);)o=o.substr(0,o.length-1);"."===o.substr(o.length-1)&&(o=o.substr(0,o.length-1))}return o+" "+e.unit}}},a("dom","scale",s),t.exports=s},7093:function(t,e,n){var i=n(9731),r=n(5699),o=n(4647).registerWidget,a=function t(e){"use strict";if(!(this instanceof t))return new t(e);i.call(this,e);var r,o,a,s,l,u,c,d=n(2531).d3,h=n(5108),f=this,p=this._exit,m=e.width||20,g=e.height||160,v=e.width?.5*e.width:10;function y(t,e,n,i,r){var o=e.append("g"),a=r/1024;return o.append("g").append("g").attr("transform","translate("+n+","+i+") scale("+a+") translate(-512,-512)").append("path").attr("d",t).attr("class","geo-glyphicon"),o}c={white:"#f4f4f4",black:"#505050"},this.size=function(){return{width:m,height:g}},this._init=function(){f._createCanvas(),f._appendCanvasToParent(),f.reposition();var t=d.select(f.canvas()),e=f.layer().map();function n(n,i){var r=o.invert(d.mouse(t.node())[1]),a=e.zoomRange();r=(1-r)*(a.max-a.min)+a.min,i?e.transition({zoom:r,ease:d.ease("cubic-in-out"),duration:500,done:f._update()}):(e.zoom(r),f._update()),n.stopPropagation()}function i(){d.select(this).attr("filter",null),u.selectAll("circle,rect,path").transition().duration(100).style("fill",(function(t){return c[t.fill]||null})).style("stroke",(function(t){return c[t.stroke]||null}))}return t.attr("width",m).attr("height",g),r=d.scale.linear().domain([-4,4]).range([0,m]),o=d.scale.linear().domain([0,1]).range([1.5*m,g-1.5*m]),t=t.append("g").classed("geo-ui-slider",!0),u=t,(a=t.append("g")).append("circle").datum({fill:"white",stroke:null}).classed("geo-zoom-in",!0).attr("cx",r(0)).attr("cy",o(0)-m+2).attr("r",(m-2)/2).style({cursor:"pointer"}).on("click",(function(){var t=e.zoom();e.transition({zoom:t+1,ease:d.ease("cubic-in-out"),duration:500})})).on("mousedown",(function(){d.event.stopPropagation()})),y("M512 81.92c-237.568 0-430.080 192.614-430.080 430.080 0 237.568 192.563 430.080 430.080 430.080s430.080-192.563 430.080-430.080c0-237.517-192.563-430.080-430.080-430.080zM564.326 564.326v206.182h-104.653v-206.182h-206.234v-104.653h206.182v-206.234h104.704v206.182h206.182v104.704h-206.182z",a,r(0),o(0)-m+2,m+4).style("cursor","pointer").style("pointer-events","none").select("path").datum({fill:"black",stroke:null}),(s=t.append("g")).append("circle").datum({fill:"white",stroke:null}).classed("geo-zoom-out",!0).attr("cx",r(0)).attr("cy",o(1)+m-2).attr("r",(m-2)/2).style({cursor:"pointer"}).on("click",(function(){var t=e.zoom();e.transition({zoom:t-1,ease:d.ease("cubic-in-out"),duration:500})})).on("mousedown",(function(){d.event.stopPropagation()})),y("M512 81.92c-237.568 0-430.080 192.614-430.080 430.080 0 237.568 192.563 430.080 430.080 430.080s430.080-192.563 430.080-430.080c0-237.517-192.563-430.080-430.080-430.080zM770.56 459.674v104.704h-517.12v-104.704h517.12z",s,r(0),o(1)+m-2,m+4).style("cursor","pointer").style("pointer-events","none").select("path").datum({fill:"black",stroke:null}),t.append("rect").datum({fill:"white",stroke:"black"}).classed("geo-zoom-track",!0).attr("x",r(0)-m/6).attr("y",o(0)).attr("rx",m/10).attr("ry",m/10).attr("width",m/3).attr("height",g-3*m).style({cursor:"pointer"}).on("click",(function(){n(d.event,!0)})),l=t.append("rect").datum({fill:"black",stroke:null}).classed("geo-zoom-nub",!0).attr("x",r(-4)).attr("y",o(.5)-v/2).attr("rx",3).attr("ry",3).attr("width",m).attr("height",v).style({cursor:"pointer"}).on("mousedown",(function(){d.select(document).on("mousemove.geo.slider",(function(){n(d.event)})),d.select(document).on("mouseup.geo.slider",(function(){n(d.event),d.select(document).on(".geo.slider",null)})),d.event.stopPropagation()})),u.selectAll("*").on("mouseover",(function(){d.select(this).attr("filter","url(#geo-highlight)"),u.selectAll("rect,path,circle").transition().duration(100).style("fill",(function(t){return t.fill||null})).style("stroke",(function(t){return t.stroke||null}))})).on("mouseout",i),f.geoOn(h.zoom,f._update),i(),f._update(),f},this._exit=function(){f.geoOff(h.zoom,f._update),u.remove(),p()},this._update=function(t){var e=f.layer().map(),n=e.zoomRange(),i=e.zoom(),r=d.scale.linear();i=(t=t||{}).value||i,r.domain([n.min,n.max]).range([1,0]).clamp(!0),l.attr("y",o(r(i))-v/2)}};r(a,i),o("dom","slider",a),t.exports=a},9731:function(t,e,n){var i=n(8123),r=n(5699),o=n(4647).registerWidget,a=function t(e){"use strict";if(!(this instanceof t))return new t(e);i.call(this,e);var r=n(2531),o=this,a=this._exit,s=null;return this._init=function(){var t;return e.hasOwnProperty("parent")&&(e.parent.addChild(o),t=e.parent.canvas()),o._createCanvas(t),o.canvas().addEventListener("mousedown",(function(t){t.stopPropagation()})),o.reposition(),o},this._exit=function(){s&&s._exit(),a()},this._createCanvas=function(t){var e={layer:o.layer(),widget:!0};t&&(e.d3Parent=t),(s=r(e))._resize=function(){},o.canvas(s.canvas()[0][0])},this};r(a,i),o("dom","svg",a),t.exports=a},6408:function(t,e,n){var i=n(5699),r=n(4647).registerLayer,o=n(9105),a=function t(e){"use strict";var i=n(4647).createWidget;if(e.renderer="dom",e.sticky=!1,!(this instanceof t))return new t(e);o.call(this,e);var r=this,a=this._exit;this.createWidget=function(t,e){var n=i(t,r,e);return e&&"parent"in e||r.addChild(n),n._init(e),r.modified(),n},this.deleteWidget=function(t){return t._exit(),r.removeChild(t),r.modified(),r},this._exit=function(){r.children().forEach((function(t){r.deleteWidget(t)})),a()}};i(a,o),r("ui",a),t.exports=a},8123:function(t,e,n){var i=n(5699),r=n(5358),o=n(5638),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},r.call(this,e);var i=n(5108),a=this,s=this._exit,l=e.layer,u=null,c=void 0===e.position?{left:0,top:0}:e.position;if(!(void 0===e.parent||e.parent instanceof t))throw new Error("Parent must be of type geo.gui.widget");e.parent&&a.parent(e.parent),this._init=function(){return a.modified(),a},this._exit=function(){if(a.children().forEach((function(t){a.removeChild(t),t._exit()})),a.layer().geoOff(i.pan,a.repositionEvent),a.parentCanvas().removeChild&&a.canvas())try{a.parentCanvas().removeChild(a.canvas())}catch(t){}s()},this.layer=function(){return l||a.parent()&&a.parent().layer()},this._createCanvas=function(){throw new Error("Must be defined in derived classes")},this.canvas=function(t){return void 0===t?u:(u=t,a)},this._appendCanvasToParent=function(){a.parentCanvas().appendChild(a.canvas())},this.parentCanvas=function(){return a.parent()?a.parent().canvas():a.layer().canvas()},this.position=function(t,e){if(void 0!==t){a.layer().geoOff(i.pan,a.repositionEvent);var n={};for(var r in c)c.hasOwnProperty(r)&&(n[r]=null);return(c=t).hasOwnProperty("x")&&c.hasOwnProperty("y")&&a.layer().geoOn(i.pan,a.repositionEvent),a.reposition(o.extend(n,a.position())),a}if(c.hasOwnProperty("x")&&c.hasOwnProperty("y")&&!e){var s=a.layer().map().gcsToDisplay(c);return{left:s.x,top:s.y,right:null,bottom:null}}return c},this.reposition=function(t){if(t=t||a.position(),a.canvas()&&a.canvas().style)for(var e in a.canvas().style.position="absolute",t)t.hasOwnProperty(e)&&(/^\s*(-|\+)?(\d+(\.\d*)?|\d*\.\d+)([eE](-|\+)?\d+)?\s*$/.test(t[e])?a.canvas().style[e]=parseFloat(parseFloat(t[e]).toFixed(3))+"px":a.canvas().style[e]=t[e]);return a},this.repositionEvent=function(){return a.reposition()},this.isInViewport=function(){var t=a.position(),e=a.layer();return t.left>=0&&t.top>=0&&t.left<=e.width()&&t.top<=e.height()},c.hasOwnProperty("x")&&c.hasOwnProperty("y")&&this.layer().geoOn(i.pan,a.repositionEvent)};i(a,r),t.exports=a},9808:function(t,e,n){var i=n(5638);function r(t,e,n){this._group=t,this._zoom=e,this._points=[],this._clusters=[],this._count=0,this._parent=null,this._coord=null;var i=this;(n||[]).forEach((function(t){i._add(t)}))}function o(t){var e,o,a=n(5844);for(this._opts=i.extend({maxZoom:18,radius:5},t),this._clusters={},this._points={},e=this._opts.maxZoom;e>=0;e-=1)o=this._opts.radius*Math.pow(2,-e),this._clusters[e]=new a(o),this._points[e]=new a(o);this._topClusterLevel=new r(this,-1)}r.prototype._add=function(t){var e=1;t instanceof r?(this._clusters.push(t),e=t._count):this._points.push(t),t._parent=this,this._increment(e)},r.prototype._increment=function(t){this._coord=null,this._count+=t,this._parent&&this._parent._increment(t)},r.prototype.count=function(){return this._count},r.prototype.each=function(t){var e;for(e=0;e<this._points.length;e+=1)t.call(this,this._points[e],this._zoom);for(e=0;e<this._clusters.length;e+=1)this._clusters[e].each.call(this._clusters[e],t)},r.prototype.coords=function(){var t,e={x:0,y:0};if(this._coord)return this._coord;for(t=0;t<this._points.length;t+=1)e.x+=this._points[t].x,e.y+=this._points[t].y;for(t=0;t<this._clusters.length;t+=1)e.x+=this._clusters[t].coords().x*this._clusters[t].count(),e.y+=this._clusters[t].coords().y*this._clusters[t].count();return{x:e.x/this.count(),y:e.y/this.count()}},o.prototype.addPoint=function(t){var e,n,o,a,s,l;for(e=this._opts.maxZoom;e>=0;e-=1){if(n=this._clusters[e].getNearObject(t))return void n._add(t);if(n=this._points[e].getNearObject(t)){if(o=n._parent)for(l=o._points.length-1;l>=0;l-=1)if(o._points[l]===n){o._points.splice(l,1),o._increment(-1);break}for(o||i.noop(),a=new r(this,e,[n,t]),this._clusters[e].addObject(a,a.coords()),s=a,l=e-1;l>o._zoom;l-=1)s=new r(this,l,[s]),this._clusters[l].addObject(s,s.coords());for(o._add(s),l=e;l>=0&&this._points[l].removeObject(n,n);l-=1);return}this._points[e].addObject(t,t)}this._topClusterLevel._add(t)},o.prototype.points=function(t){return t=Math.min(Math.max(Math.floor(t),0),this._opts.maxZoom-1),this._points[Math.floor(t)].contents()},o.prototype.clusters=function(t){return t=Math.min(Math.max(Math.floor(t),0),this._opts.maxZoom-1),this._clusters[Math.floor(t)].contents()},t.exports=o},7566:function(t,e,n){var i=n(8340),r=n(9552),o={maxCount:1e3,count:0,memo:{}};function a(t,e){return o.count+=1,o.count>=o.maxCount&&(o.memo={},o.count=0),o.memo[t]=e,e}var s={convertColor:function(t){if(null==t||void 0!==t.r&&void 0!==t.g&&void 0!==t.b)return t;if(void 0!==o.memo[t])return o.memo[t];var e,n=t;if("string"==typeof t){var i=t.toLowerCase();if(r.hasOwnProperty(i))t={r:r[i][0]/255,g:r[i][1]/255,b:r[i][2]/255};else if("#"===t.charAt(0))4===t.length||5===t.length?(5===t.length&&(e=parseInt(t.slice(4),16)/15),t=4352*(3840&(t=parseInt(t.slice(1,4),16)))+272*(240&t)+17*(15&t)):7!==t.length&&9!==t.length||(9===t.length&&(e=parseInt(t.slice(7),16)/255),t=parseInt(t.slice(1,7),16));else if("transparent"===i)e=t=0;else if(i.indexOf("(")>=0)for(var l=0;l<s.cssColorConversions.length;l+=1){var u=s.cssColorConversions[l].regex.exec(i);if(u)return a(n,t=s.cssColorConversions[l].process(i,u))}}return isFinite(t)&&(t={r:((16711680&t)>>16)/255,g:((65280&t)>>8)/255,b:(255&t)/255}),void 0!==e&&t&&void 0!==t.r&&(t.a=e),a(n,t)},convertColorAndOpacity:function(t,e,n){return(t=s.convertColor(t))&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b||(t=s.convertColor(n||{r:0,g:0,b:0})),t&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b||(t={r:0,g:0,b:0}),t={r:isFinite(t.r)&&t.r>=0?t.r<=1?+t.r:1:0,g:isFinite(t.g)&&t.g>=0?t.g<=1?+t.g:1:0,b:isFinite(t.b)&&t.b>=0?t.b<=1?+t.b:1:0,a:i.isNonNullFinite(t.a)&&t.a>=0&&t.a<1?+t.a:1},i.isNonNullFinite(e)&&e<1&&(t.a=e<=0?0:t.a*e),t},convertColorToHex:function(t,e){var n,i=s.convertColor(t);return n=i.r||i.g||i.b?"#"+((1<<24)+(Math.round(255*i.r)<<16)+(Math.round(255*i.g)<<8)+Math.round(255*i.b)).toString(16).slice(1):"#000000",void 0!==i.a&&e&&(i.a<1||"needed"!==e)&&(n+=(256+Math.round(255*i.a)).toString(16).slice(1)),n},convertColorToRGBA:function(t){var e=s.convertColor(t);return e||(e={r:0,g:0,b:0}),(!i.isNonNullFinite(e.a)||e.a>1)&&(e.a=1),"rgba("+Math.round(255*e.r)+", "+Math.round(255*e.g)+", "+Math.round(255*e.b)+", "+ +(+e.a).toFixed(5)+")"},cssAngleUnitsBase:{deg:360,grad:400,rad:2*Math.PI,turn:1},cssNumberRegex:"[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:[eE][+-]?\\d+)?"};s.cssColorConversions=[{name:"rgb",regex:new RegExp("^\\s*rgba?\\(\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*,?\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*,?\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*([/,]?\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*)?\\)\\s*$"),process:function(t,e){return t={r:Math.min(1,Math.max(0,+e[1]/(e[2]?100:255))),g:Math.min(1,Math.max(0,+e[3]/(e[4]?100:255))),b:Math.min(1,Math.max(0,+e[5]/(e[6]?100:255)))},e[7]&&(t.a=Math.min(1,Math.max(0,+e[8]/(e[9]?100:1)))),t}},{name:"hsl",regex:new RegExp("^\\s*hsla?\\(\\s*("+s.cssNumberRegex+")\\s*(deg|grad|rad|turn)?\\s*,?\\s*("+s.cssNumberRegex+")\\s*%\\s*,?\\s*("+s.cssNumberRegex+")\\s*%\\s*([/,]?\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*)?\\)\\s*$"),process:function(t,e){var n=function(t,e,n){return 6*(n-=Math.floor(n))<1?t+(e-t)*n*6:6*n<3?e:6*n<4?t+(e-t)*(2/3-n)*6:t},i=+e[1]/(s.cssAngleUnitsBase[e[2]]||360),r=Math.min(1,Math.max(0,+e[3]/100)),o=Math.min(1,Math.max(0,+e[4]/100)),a=o<=.5?o*(r+1):o+r-o*r,l=2*o-a;return t={r:n(l,a,i+1/3),g:n(l,a,i),b:n(l,a,i-1/3)},e[5]&&(t.a=Math.min(1,Math.max(0,+e[6]/(e[7]?100:1)))),t}}],t.exports=s},8340:function(t,e,n){function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}var r=n(5638),o=n(4252);o=o.__esModule?o.default:o;var a,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",u='<svg xmlns="http://www.w3.org/2000/svg"><foreignObject width="100%" height="100%"></foreignObject></svg>',c={},d=200,h=15;function f(){var t;for(t=0;t<arguments.length;t+=1)if(isFinite(arguments[t]))return arguments[t]}var p={pointInPolygon:function(t,e,n,i){return e.outer&&(n=e.inner,e=e.outer),!(e.length<3)&&(!(i&&i.min&&i.max&&(t.x<i.min.x||t.y<i.min.y||t.x>i.max.x||t.y>i.max.y))&&p.distanceToPolygon2d(t,n?{outer:e,inner:n}:e,!0)>0)},pointToTriangleBasis2d:function(t,e,n,i){var r=n.x-e.x,o=i.x-e.x,a=n.y-e.y,s=i.y-e.y,l=t.x-e.x,u=t.y-e.y,c=r*s-o*a;if(c)return{x:(l*s-u*o)/c,y:(l*-a+u*r)/c}},isReadyImage:function(t,e){return!!(t instanceof Image&&t.complete&&t.src&&(t.naturalWidth&&t.naturalHeight||e))},isReadyVideo:function(t,e){return!!(t instanceof HTMLVideoElement&&t.src&&void 0!==t.HAVE_CURRENT_DATA&&(t.videoWidth&&t.videoHeight&&t.readyState>=t.HAVE_CURRENT_DATA||e&&t.error))},isFunction:function(t){return"function"==typeof t},ensureFunction:function(t){return p.isFunction(t)?t:function(){return t}},isNonNullFinite:function(t){return isFinite(t)&&null!==t&&!1!==t&&""!==t},randomString:function(t){var e,n,i;for(t=t||8,e="",n=0;n<t;n+=1)i=Math.floor(Math.random()*l.length),e+=l.substring(i,i+1);return e},normalizeCoordinates:function(t){return t=t||{},Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:{x:f(t.x,t.longitude,t.lng,t.lon,0),y:f(t.y,t.latitude,t.lat,0),z:f(t.z,t.elevation,t.elev,t.height,0)}},range:function(t,e,n){n=n||1;for(var i=[],r=t;r<=e;r+=n)i.push(r);return i},compareArrays:function(t,e){return t.length===e.length&&t.every((function(t,n){return t===e[n]}))},vec3AsArray:function(){return[0,0,0]},mat3AsArray:function(){return[1,0,0,0,1,0,0,0,1]},mat4AsArray:function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},getGeomBuffer:function(t,e,n,i,r){i=void 0===i?.2:i,r=void 0===r?.1:r;var o=t.sourceByName(e),a=o.data(),s=Math.floor((i+1)*n);if((a=o.data())instanceof Float32Array&&(a.length===n||a.length>=n&&a.length<=s))return a;var l=n;return a instanceof Float32Array&&a.length&&n&&r>0&&(l=Math.floor((r+1)*n)),a=new Float32Array(l),o.setData(a),a},adjustActions:function(t){var e,n;for(n=0;n<t.length;n+=1){if(e=t[n],"string"===r.type(e.input)){var i={};i[e.input]=!0,e.input=i}if(e.modifiers||(e.modifiers={}),"string"===r.type(e.modifiers)){var o={};o[e.modifiers]=!0,e.modifiers=o}}},addAction:function(t,e,n){n?t.push(e):t.unshift(e),p.adjustActions(t)},hasAction:function(t,e,n,i){e&&e.action&&(n=e.name,i=e.owner,e=e.action);for(var r=0;r<t.length;r+=1)if(!(e&&t[r].action!==e||n&&t[r].name!==n||i&&t[r].owner!==i))return t[r];return null},removeAction:function(t,e,n,i){var o,a=0;do{(o=p.hasAction(t,e,n,i))&&(t.splice(r.inArray(o,t),1),a+=1)}while(o);return a},actionMatch:function(t,e,n){var i;if(n.some((function(n){for(var r in n.input)if(n.input.hasOwnProperty(r)&&(!1===n.input[r]&&t[r]||n.input[r]&&!t[r]))return!1;for(var o in n.modifiers)if(n.modifiers.hasOwnProperty(o)&&(!1===n.modifiers[o]&&e[o]||n.modifiers[o]&&!e[o]))return!1;return i=n,!0})))return i},pixelCoordinateParams:function(t,e,n,i,o){var a,s,l;t&&(a=(t=r(t)).innerWidth(),s=t.innerHeight()),o=o||n,l=(i=i||e)!==e||o!==n;var u=Math.min(0,Math.floor(Math.log(Math.min((a||i)/i,(s||o)/o))/Math.log(2))),c=Math.ceil(Math.log(Math.max(e/i,n/o))/Math.log(2));return{map:{node:t,ingcs:"+proj=longlat +axis=esu",gcs:"+proj=longlat +axis=enu",maxBounds:{left:0,top:0,right:e,bottom:n},unitsPerPixel:Math.pow(2,c),center:{x:e/2,y:n/2},min:u,max:c,zoom:u,clampBoundsX:!0,clampBoundsY:!0,clampZoom:!0},layer:{maxLevel:c,wrapX:!1,wrapY:!1,tileOffset:function(){return{x:0,y:0}},attribution:"",tileWidth:i,tileHeight:o,tileRounding:Math.ceil,tilesAtZoom:l?function(t){var r=Math.pow(2,c-t);return{x:Math.ceil(e/i/r),y:Math.ceil(n/o/r)}}:void 0,tilesMaxBounds:l?function(t){var i=Math.pow(2,c-t);return{x:Math.floor(e/i),y:Math.floor(n/i)}}:void 0}}},centerFromPerimeter:function(t){var e,n,i,r,o,a;if(t&&t.length){if(1===t.length)return{x:t[0].x,y:t[0].y};for(e={x:0,y:0},o=0,n=t[t.length-1],a=0;a<t.length;a+=1)i=n,n=t[a],r=Math.sqrt(Math.pow(i.x-n.x,2)+Math.pow(i.y-n.y,2)),e.x+=(n.x+i.x)*r,e.y+=(n.y+i.y)*r,o+=2*r;return e.x/=o,e.y/=o,o?e:{x:n.x,y:n.y}}},distance2dSquared:function(t,e){var n=t.x-e.x,i=t.y-e.y;return n*n+i*i},distance2dToLineSquared:function(t,e,n){var i=n.x-e.x,r=n.y-e.y,o=i*i+r*r,a=0;return o&&(a=((t.x-e.x)*i+(t.y-e.y)*r)/o,a=Math.max(0,Math.min(1,a))),p.distance2dSquared(t,{x:e.x+a*i,y:e.y+a*r})},distanceToPolygon2d:function(t,e,n){for(var i,r,o=e.outer||e,a=!1,s=0,l=o.length,u=l-1;s<l;u=s,s+=1){var c=o[s],d=o[u];c.y>t.y!=d.y>t.y&&t.x<(d.x-c.x)*(t.y-c.y)/(d.y-c.y)+c.x&&(a=!a),r=n?1:p.distance2dToLineSquared(t,c,d),(void 0===i||r<i)&&(i=r)}return e.inner&&e.inner.forEach((function(e){var r=p.distanceToPolygon2d(t,e,n);r*r<i&&(i=r*r),r>0&&(a=!a)})),(a?1:-1)*Math.sqrt(i)},triangleTwiceSignedArea2d:function(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)},crossedLineSegmentPolygon2d:function(t,e,n){var i,r,o=n.outer||n,a=o.length;for(i=0,r=a-1;i<a;r=i,i+=1)if(p.crossedLineSegments2d(t,e,o[i],o[r]))return!0;if(n.inner)for(i=0;i<n.inner.length;i+=1)if(p.crossedLineSegmentPolygon2d(t,e,n.inner[i]))return!0;return!1},crossedLineSegments2d:function(t,e,n,i){return!(t.x>n.x&&t.x>i.x&&e.x>n.x&&e.x>i.x||t.x<n.x&&t.x<i.x&&e.x<n.x&&e.x<i.x||t.y>n.y&&t.y>i.y&&e.y>n.y&&e.y>i.y||t.y<n.y&&t.y<i.y&&e.y<n.y&&e.y<i.y)&&(!(t.x===n.x&&t.y===n.y||t.x===i.x&&t.y===i.y||e.x===n.x&&e.y===n.y||e.x===i.x&&e.y===i.y)&&!(p.triangleTwiceSignedArea2d(t,e,n)*p.triangleTwiceSignedArea2d(t,e,i)>0||p.triangleTwiceSignedArea2d(n,i,t)*p.triangleTwiceSignedArea2d(n,i,e)>0))},segmentCrossesLineList2d:function(t,e,n){return n.some((function(n){return n.some((function(i,r){return!!r&&p.crossedLineSegments2d(t,e,n[r-1],i)}))}))},rdpLineSimplify:function(t,e,n,i){if(t.length<=2||e<0)return t;var r,o,a,s=-1,l=e*e;if(n){for(r=1;r<t.length;r+=1)(o=p.distance2dSquared(t[0],t[r]))>s&&(s=o,a=r);return 4*s<=l?t.slice(a,a+1):(t=t.slice(a).concat(t.slice(0,a+1)),(t=p.rdpLineSimplify(t,e,!1,i)).splice(t.length-1),t)}for(r=1;r<t.length-1;r+=1)(o=p.distance2dToLineSquared(t[r],t[0],t[t.length-1]))>s&&(s=o,a=r);if(s<=l&&(!i||!p.segmentCrossesLineList2d(t[0],t[t.length-1],i)))return[t[0],t[t.length-1]];var u=t.slice(0,a+1),c=t.slice(a),d=p.rdpLineSimplify(u,e,!1,i?i.concat([c]):null),h=p.rdpLineSimplify(c,e,!1,i?i.concat([u]):null);return d.slice(0,d.length-1).concat(h)},getMinMaxValues:function(t,e,n,i){if(t.length&&(i||!r.isNumeric(e)||!r.isNumeric(n))){var o,a,s=t[0],l=t[0];for(a=t.length-1;a>0;a-=1)(o=t[a])<s&&(s=o),o>l&&(l=o);(!r.isNumeric(e)||i&&s>e)&&(e=s),(!r.isNumeric(n)||i&&l<n)&&(n=l)}return{min:e,max:n}},wrapAngle:function(t){return(t%=2*Math.PI)<-Math.PI?t+=2*Math.PI:t>=Math.PI&&(t-=2*Math.PI),t},escapeUnicodeHTML:function(t){return t.replace(/./g,(function(t){var e=t.charCodeAt(0);return e<127?t:"&#"+e.toString(10)+";"}))},dereferenceElements:function(t){var e=[];return r("img,image",t).each((function(){var t=r(this),n=t.is("image")?"href":"src";if(t.attr(n)){var i=new Image;("http"===t.attr(n).substr(0,4)||t[0].crossOrigin)&&(i.crossOrigin=t[0].crossOrigin||"anonymous");var o=r.Deferred();i.onload=function(){var e=document.createElement("canvas");e.width=i.naturalWidth,e.height=i.naturalHeight,e.getContext("2d").drawImage(i,0,0),t.attr(n,e.toDataURL("image/png")),"data:image"!==t.attr(n).substr(0,10)&&t.remove(),o.resolve()},i.onerror=function(){t.remove(),o.resolve()},i.src=t.attr(n),e.push(o)}})),e},dereferenceCssUrlsRegex:/url\(["']?(http[^)"']+|[^:)"']+)["']?\)/g,dereferenceCssUrls:function(t,e,n,i,o){var a=[],s=[];if(t=(t=t.replace(/\/\*[^\0]*?\*\//g,"")).replace(/\r/g,"\n").replace(/\s+\n/g,"\n").replace(/\n\s+/g,"\n").replace(/\n\n+/g,"\n"),o){var l=/(^[^?#]*)\/[^?#/]*([?#]|$)/g.exec(o);o=l&&l[1]?l[1]+"/":null}t.replace(p.dereferenceCssUrlsRegex,(function(t,e){var n=a.length,i=r.Deferred(),l=new XMLHttpRequest;return a.push(i),s.push(""),/^[^/:][^:]*(\/|$)/g.exec(e)&&o&&(e=o+e),l.open("GET",e,!0),l.responseType="arraybuffer",l.onload=function(){if(200===this.status){var t,e=new Uint8Array(this.response),r=new Array(e.length);for(t=0;t<e.length;t+=1)r[t]=String.fromCharCode(e[t]);r=r.join(""),s[n]="url(data:"+l.getResponseHeader("content-type")+";base64,"+btoa(r)+")"}i.resolve()},l.onerror=i.resolve,l.send(),t})),r.when.apply(r,a).then((function(){var r=0;t=t.replace(p.dereferenceCssUrlsRegex,(function(t,e){return s[(r+=1)-1]})),void 0===i?e.text(t):e.style[i]=t,n.resolve()}))},htmlToImageSupported:function(){if(void 0===s){var t=r.Deferred(),e=r(u);e.attr({width:"10px",height:"10px","text-rendering":"optimizeLegibility"}),r("foreignObject",e).append("<div/>");var n=new Image;return n.onload=n.onerror=function(){var e=document.createElement("canvas");e.width=10,e.height=10,e.getContext("2d").drawImage(n,0,0);try{e.toDataURL(),s=!0}catch(t){console.warn("This browser does not support converting HTML to an image via SVG foreignObject. Some functionality will be limited.",t),s=!1}t.resolve(s)},n.src="data:image/svg+xml;base64,"+btoa(p.escapeUnicodeHTML((new XMLSerializer).serializeToString(e[0]))),t}return s},htmlToImage:function(t,e){var n,i=r.Deferred(),o=[p.htmlToImageSupported()],a=r(t);for(t=r(t).clone();e&&e>0;)(a=a.parent()).is("div")&&((n=r("<div>").attr({class:a.attr("class"),id:a.attr("id")}).css({width:"100%",height:"100%",background:"none",margin:0})).append(t),t=n),e-=1;r("canvas",t).remove(),r("*",t).addBack().each((function(){for(var t=this.style,e=0;e<t.length;e+=1){var n=this.style[e];if(this.style[n].match(p.dereferenceCssUrlsRegex)){var i=r.Deferred();p.dereferenceCssUrls(this.style[n],this,i,n),o.push(i)}}})),(n=r('<div xmlns="http://www.w3.org/1999/xhtml">')).css({width:a.width()+"px",height:a.height()+"px"}),n.append(r("<head>"));var s=r("<body>");return n.append(s),s.css({width:a.width()+"px",height:a.height()+"px",background:"none",margin:0}),s.append(t),o=o.concat(p.dereferenceElements(t)),r('style,link[rel="stylesheet"]').each((function(){var t=r('<style type="text/css">'),e=r.Deferred();if(r(this).is("style")){var i=r(this).text();p.dereferenceCssUrls(i,t,e)}else{var a=r(this).attr("href");r.get(a).done((function(n){p.dereferenceCssUrls(n,t,e,void 0,a)})).fail((function(n,i,r){console.warn("Failed to dereference "+a,i,r),t.remove(),e.resolve()}))}o.push(e),r("head",n).append(t)})),r.when.apply(r,o).then((function(){var t=r(u);t.attr({width:a.width()+"px",height:a.height()+"px","text-rendering":"optimizeLegibility"}),r("foreignObject",t).append(n);var e=new Image;p.htmlToImageSupported()?(e.onload=function(){i.resolve(e)},e.onerror=function(){console.warn("Failed to render html to image"),i.reject()},e.src="data:image/svg+xml;base64,"+btoa(p.escapeUnicodeHTML((new XMLSerializer).serializeToString(t[0])))):i.resolve(e)})),i},timeReport:function(t){return r.each(c,(function(t,e){e.count?(e.stddev=Math.sqrt(Math.abs((e.sum2-e.sum*e.sum/e.count)/e.count)),e.average=e.sum/e.count):(e.stddev=0,e.average=0)})),t?c[t]:c},timeFunctionStart:function(t,e){c[t]&&!e||(c[t]={count:0,sum:0,sum2:0,max:0,recent:[]}),c[t].start=window.performance.now()},timeFunctionStop:function(t){if(c[t]&&c[t].start){var e=window.performance.now()-c[t].start;c[t].start=null,c[t].sum+=e,c[t].sum2+=e*e,c[t].count+=1,c[t].max=Math.max(c[t].max,e),c[t].recent.push(e),c[t].recent.length>d&&c[t].recent.splice(0,c[t].recent.length-d)}},timeRequestAnimationFrame:function(t,e,n,i){c.requestAnimationFrame&&!e||(c.requestAnimationFrame={count:0,sum:0,sum2:0,max:0,above_threshold:0,recent:[],recentsub:[]}),n&&(h=n),i&&(d=i),t&&a?(window.requestAnimationFrame=a,a=null):t||a||(a=window.requestAnimationFrame,window.requestAnimationFrame=function(t){return a.call(window,(function(e){var n,i=c.requestAnimationFrame;i.timestamp!==e&&(i.nowDelta=window.performance.now()-e,Math.abs(i.nowDelta)<1e3&&(i.nowDelta=0),i.timestamp=e,i.subcalls=i.subcalls||0,i.start={sum:i.sum,sum2:i.sum2,count:i.count,max:i.max,above_threshold:i.above_threshold},i.recent.push([0]),i.recentsub.push([]),i.recent.length>d&&(i.recent.splice(0,i.recent.length-d),i.recentsub.splice(0,i.recentsub.length-d))),i.subcalls+=1,t.apply(this,arguments);var r=window.performance.now()-e;r-=i.nowDelta,i.sum=i.start.sum+r,i.sum2=i.start.sum2+r*r,i.count=i.start.count+1,i.max=Math.max(i.max,r),i.above_threshold=i.start.above_threshold+(r>=h?1:0),i.recent[i.recent.length-1]=r,(n=i.recentsub[i.recent.length-1]).push({total_duration:r,duration:r-(n.length?n[n.length-1].total_duration:0),callback:t.name||t})}))})},isObject:function(t){var e=i(t);return null!=t&&("object"===e||"function"===e)},radiusEarth:o.WGS84.a};t.exports=p},5844:function(t,e,n){var i=n(5638),r={};r.Util={stamp:function(t){return t._leaflet_id=t._leaflet_id||++r.Util.lastId,t._leaflet_id},lastId:0};var o=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}};o.prototype={addObject:function(t,e){var n=this._getCoord(e.x),i=this._getCoord(e.y),o=this._grid,a=o[i]=o[i]||{},s=a[n]=a[n]||[],l=r.Util.stamp(t);e.obj=t,this._objectPoint[l]=e,s.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var n,i,o=this._getCoord(e.x),a=this._getCoord(e.y),s=this._grid,l=s[a]=s[a]||{},u=l[o]=l[o]||[];for(delete this._objectPoint[r.Util.stamp(t)],n=0,i=u.length;n<i;n++)if(u[n]===t)return u.splice(n,1),1===i&&delete l[o],!0},eachObject:function(t,e){var n,i,r,o,a,s,l=this._grid;for(n in l)for(i in a=l[n])for(r=0,o=(s=a[i]).length;r<o;r++)t.call(e,s[r])&&(r--,o--)},getNearObject:function(t){var e,n,i,o,a,s,l,u,c=this._getCoord(t.x),d=this._getCoord(t.y),h=this._objectPoint,f=this._sqCellSize,p=null;for(e=d-1;e<=d+1;e++)if(o=this._grid[e])for(n=c-1;n<=c+1;n++)if(a=o[n])for(i=0,s=a.length;i<s;i++)l=a[i],(u=this._sqDist(h[r.Util.stamp(l)],t))<f&&(f=u,p=l);return p},contents:function(){return i.map(this._objectPoint,(function(t){return t}))},_getCoord:function(t){return Math.floor(t/this._cellSize)},_sqDist:function(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}},t.exports=o},4634:function(t,e,n){t.exports=Object.assign(n(8340),n(7566),n(9215),n(895),{DistanceGrid:n(5844),ClusterGroup:n(9808),mesh:n(9244)})},9244:function(t,e,n){t.exports={createColoredMesh:function(t,e){var i,r,o,a,s,l=n(5638),u=n(4634),c=t.mesh,d=t.style.get("value"),h=void 0!==t.style("used")?t.style.get("used"):function(t,e){return u.isNonNullFinite(d(t,e))},f={used:h,opacity:t.style.get("opacity"),value:d},p=t._createMesh(e?{}:f,e?f:{});if(p.elementValues=!!e,!p.numVertices||!p.numElements)return p;var m=c.get("stepped")(p),g=c.get("opacityRange")(p),v=c.get("rangeValues")(p);if(p.stepped=!(void 0!==m&&!m),p.colorMap=[],p.minColor=l.extend({a:c.get("minOpacity")(p)||0},u.convertColor(c.get("minColor")(p))),p.maxColor=l.extend({a:c.get("maxOpacity")(p)||0},u.convertColor(c.get("maxColor")(p))),c.get("colorRange")(p).forEach((function(t,e){p.colorMap.push(l.extend({a:g&&void 0!==g[e]?g[e]:1},u.convertColor(t)))})),i=u.getMinMaxValues(p.value,c.get("min")(p),c.get("max")(p)),p.minValue=i.min,p.maxValue=i.max,v&&p.colorMap&&(v.length===p.colorMap.length+1||!m&&v.length===p.colorMap.length)||(v=null),v)for(s=1;s<v.length;s+=1)if(v[s-1]>v[s]){v=null;break}for(v&&(p.minValue=v[0],p.maxValue=v[v.length-1]),(o=p.maxValue-p.minValue)||(p.colorMap=p.colorMap.slice(0,1),o=1,v=null),p.rangeValues=v,p.factor=(p.colorMap.length-(m?0:1))/o,a=0;a<p.value.length;a+=1)if(r=p.value[a],v&&r>=p.minValue&&r<=p.maxValue){for(s=1;s<v.length;s+=1)if(r<=v[s]){p.value[a]=s-1+(r-v[s-1])/(v[s]-v[s-1]);break}}else p.value[a]=(r-p.minValue)*p.factor;return p}}},895:function(t,e,n){var i,r,o=n(5638),a=n(2254);t.exports={},t.exports.mockWebglRenderer=function(t){"use strict";var e=n(320);if(void 0===t&&(t=!0),e._mocked)throw new Error("webgl renderer already mocked");var s={},l=function(t){s[t]=(s[t]||0)+1},u=function(t){return function(){l(t)}},c=0,d=function(t){return function(){return l(t),c+=1}},h={activeTexture:u("activeTexture"),attachShader:u("attachShader"),bindAttribLocation:u("bindAttribLocation"),bindBuffer:u("bindBuffer"),bindFramebuffer:u("bindFramebuffer"),bindTexture:u("bindTexture"),blendFuncSeparate:u("blendFuncSeparate"),bufferData:u("bufferData"),bufferSubData:u("bufferSubData"),checkFramebufferStatus:function(t){if(l("checkFramebufferStatus"),t===e.GL.FRAMEBUFFER)return e.GL.FRAMEBUFFER_COMPLETE},clear:u("clear"),clearColor:u("clearColor"),clearDepth:u("clearDepth"),compileShader:u("compileShader"),createBuffer:d("createBuffer"),createFramebuffer:u("createFramebuffer"),createProgram:d("createProgram"),createShader:d("createShader"),createTexture:d("createTexture"),deleteBuffer:u("deleteBuffer"),deleteProgram:u("deleteProgram"),deleteShader:u("deleteShader"),deleteTexture:u("deleteTexture"),detachShader:u("detachShader"),depthFunc:u("depthFunc"),disable:u("disable"),disableVertexAttribArray:u("disableVertexAttribArray"),drawArrays:u("drawArrays"),enable:u("enable"),enableVertexAttribArray:u("enableVertexAttribArray"),finish:u("finish"),getError:u("getError"),getExtension:d("getExtension"),getParameter:function(t){switch(l("getParameter"),t){case e.GL.ALIASED_POINT_SIZE_RANGE:return[1,64];case e.GL.DEPTH_BITS:return 16;case e.GL.MAX_TEXTURE_SIZE:return 4096}},getProgramParameter:function(t,n){if(l("getProgramParameter"),n===e.GL.LINK_STATUS)return!0},getShaderInfoLog:function(){return l("getShaderInfoLog"),"log"},getShaderParameter:function(t,n){if(l("getShaderParameter"),n===e.GL.COMPILE_STATUS)return!0},getSupportedExtensions:function(){return l("getSupportedExtensions"),[]},getUniformLocation:d("getUniformLocation"),isEnabled:function(t){if(l("isEnabled"),t===e.GL.BLEND)return!0},linkProgram:u("linkProgram"),pixelStorei:u("pixelStorei"),shaderSource:u("shaderSource"),texImage2D:u("texImage2D"),texParameteri:u("texParameteri"),uniform1iv:u("uniform1iv"),uniform1fv:u("uniform1fv"),uniform2fv:u("uniform2fv"),uniform3fv:u("uniform3fv"),uniform4fv:u("uniform4fv"),uniformMatrix3fv:u("uniformMatrix3fv"),uniformMatrix4fv:u("uniformMatrix4fv"),useProgram:u("useProgram"),vertexAttribPointer:u("vertexAttribPointer"),vertexAttrib3fv:u("vertexAttrib3fv"),viewport:u("viewport")};i=e.renderWindow;e.renderWindow=function t(){e.renderWindow=i;var n,r=new e.renderWindow;return e.renderWindow=t,r._setup=function(){var t,i=r.renderers(),a=r.windowSize(),s=r.windowPosition();for(n=o.extend({},e.GL,h),t=0;t<i.length;t+=1)(i[t].width()>a[0]||0===i[t].width()||i[t].height()>a[1]||0===i[t].height())&&i[t].resize(s[0],s[1],a[0],a[1]);return!0},r.context=function(){return n},r},r=a.supported,a.supported=function(){return!!t},a._maxTextureSize=4096,a._maxPointSize=64,e._mocked=!0,e.mockCounts=function(){return s}},t.exports.restoreWebglRenderer=function(){var t=n(320);t._mocked&&(t.renderWindow=i,a.supported=r,delete t._mocked,delete t.mockCounts)}},9215:function(t){var e=function(t,e,n,i,r){var o,a=0;return"boolean"!=typeof e&&(r=i,i=n,n=e,e=void 0),"function"!=typeof i&&(r=i,i=function(){}),function(){var s=this,l=+new Date-a,u=arguments;function c(){a=+new Date,n.apply(s,u)}function d(){o=void 0}i.apply(s,u),r&&!o&&c(),o&&clearTimeout(o),void 0===r&&l>t?c():!0!==e&&(o=setTimeout(r?d:c,void 0===r?t-l:t))}};t.exports={throttle:e,debounce:function(t,n,i,r){return"boolean"!=typeof n&&(r=i,i=n,n=!1),e(t,!1,i,r=r||function(){},!!n)}}},2623:function(t,e,n){var i=n(5699),r=n(6837),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638);e=e||{},r.call(this,e);var o=this,a=this._init;this.featureType="vector",this.origin=function(t){return void 0===t?o.style("origin"):(o.style("origin",t),o.dataTime().modified(),o)},this.delta=function(t){return void 0===t?o.style("delta"):(o.style("delta",t),o.dataTime().modified(),o)},this._init=function(t){a.call(o,t);var e=i.extend({},{strokeColor:"black",strokeWidth:2,strokeOpacity:1,originStyle:"none",endStyle:"arrow",origin:{x:0,y:0,z:0},delta:function(t){return t},scale:null},void 0===t.style?{}:t.style);return void 0!==t.origin&&(e.origin=t.origin),o.style(e),o.dataTime().modified(),o}};i(o,r),t.exports=o},2978:function(t){t.exports="1.7.3"},6653:function(t,e,n){t.exports={pointFeature:n(9724),vtkjsRenderer:n(9508)}},7222:function(t,e,n){t.exports=function t(e){"use strict";if(!(this instanceof n(3737)))return new t(e);var i=this,r=this.draw;return this.draw=function(){return i.ready&&(i._update(),i.renderer()._render(),r()),i},this}},9724:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(2557),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var i=n(6853),r=n(7222),a=n(9508).vtkjs,s=a.Rendering.Core.vtkActor,l=a.Common.Core.vtkDataArray,u=a.Rendering.Core.vtkGlyph3DMapper,c=a.Rendering.Core.vtkMapper,d=a.Common.DataModel.vtkPointSet,h=a.Filters.Sources.vtkSphereSource;r.call(this);var f,p,m,g,v,y=this,x=this._init,b=this._exit,_=this._update;return this._createPipeline=function(){p=d.newInstance(),(m=h.newInstance()).setThetaResolution(30),m.setPhiResolution(30);var t=u.newInstance({orient:!1,colorByArrayName:"color",scalarMode:c.ScalarMode.USE_POINT_FIELD_DATA,colorMode:c.ColorMode.DIRECT_SCALARS,scaling:!0,scaleArray:"diam",scaleMode:u.ScaleModes.SCALE_BY_MAGNITUDE});t.setInputData(p,0),t.setInputConnection(m.getOutputPort(),1),(f=s.newInstance()).setMapper(t),f.getProperty().setAmbient(1),y.renderer().contextRenderer().addActor(f)},this._init=function(){x.call(y,e),y.renderer().contextRenderer().setLayer(0),y._createPipeline()},this._build=function(){var t,e,n,r,o,a,s=y.data().length,u=new Array(3*s),c=y.data(),d=y.position(),h=y.style.get("radius"),f=y.style.get("fill"),m=y.style.get("fillColor"),x=y.style.get("fillOpacity"),b=y.layer().map().unitsPerPixel(y.layer().map().zoom());for(v&&v.length===s||(v=new Float32Array(s)),g&&g.length===4*s||(g=new Uint8Array(4*s)),t=e=n=0;t<s;t+=1,e+=3,n+=4)r=d(c[t],t),u[e]=r.x,u[e+1]=r.y,u[e+2]=r.z||0,a=a||u[e+2],v[t]=h(c[t],t)*b*2,o=m(c[t],t),g[n]=255*o.r,g[n+1]=255*o.g,g[n+2]=255*o.b,g[n+3]=f(c[t],t)?255*x(c[t],t):0;if(u=i.transformCoordinates(y.gcs(),y.layer().map().gcs(),u,3),!a&&y.gcs()!==y.layer().map().gcs())for(t=e=0;t<s;t+=1,e+=3)u[e+2]=0;p.getPoints().setData(u,3),p.getPointData().addArray(l.newInstance({name:"color",values:g,numberOfComponents:4})),p.getPointData().addArray(l.newInstance({name:"diam",values:v})),y.buildTime().modified()},this._update=function(){if(_.call(y),y.dataTime().getMTime()>=y.buildTime().getMTime()||y.updateTime().getMTime()<y.getMTime())y._build();else{var t=y.data(),e=y.style.get("radius"),n=y.layer().map().unitsPerPixel(y.layer().map().zoom()),i=p.getPointData().getArray("diam"),r=i.getData().map((function(i,r){return e(t[r],r)*n*2}));i.setData(r),p.modified()}y.updateTime().modified()},this._exit=function(){y.renderer().contextRenderer().removeActor(f),b()},y._init(),this};i(a,o);var s={};s[o.capabilities.stroke]=!1,r("vtkjs","point",a,s),t.exports=a},9508:function(t,e,n){var i=n(5699),r=n(4647).registerRenderer,o=n(3234),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var i=n(5240),r=n(5108),a=t.vtkjs.Rendering.Misc.vtkGenericRenderWindow,s=this,l=this._init,u=a.newInstance({background:[0,0,0,0]});u.setContainer(s.layer().node().get(0)),u.getInteractor().unbindEvents(),u.resize();var c=u.getRenderer(),d=u.getRenderWindow();return this.contextRenderer=function(){return c},this.api=function(){return t.apiname},this._init=function(){if(s.initialized())return s;l.call(s);var t=s.layer().map(),e=t.size();return s._resize(0,0,e.width,e.height),t.camera().clipbounds={near:-t.unitsPerPixel(),far:t.unitsPerPixel()},s},this._resize=function(t,e,n,i){return s._setWidthHeight(n,i),u.resize(),s._render(),s},this._render=function(){return s.layer().map().scheduleAnimationFrame(s._renderFrame,!0),s},this._renderFrame=function(){var t,e=s.layer().features();for(t=0;t<e.length;t+=1)e[t].visible()&&e[t]._update();s._updateRendererCamera(),d.render()},this._exit=function(){},this._updateRendererCamera=function(){var t=s.layer().map().camera(),e=t.view,n=t.projectionMatrix,r=i.create();i.copy(r,e);var o=i.create();i.copy(o,n),s.contextRenderer().getActiveCamera().setViewMatrix(r),s.contextRenderer().getActiveCamera().setProjectionMatrix(o)},s.layer().geoOn(r.pan,(function(t){s._render()})),s.layer().geoOn(r.parallelprojection,(function(t){})),this};a.apiname="vtkjs",i(a,o),r("vtkjs",a),a.supported=function(){delete a.vtkjs;try{a.vtkjs=n(999)}catch(t){}return a.vtkjs&&a.vtkjs.Rendering||!window.vtk||!window.vtk.Rendering||(a.vtkjs=window.vtk),a.vtkjs&&a.vtkjs.Rendering||(a.vtkjs=void 0),void 0!==a.vtkjs},a.fallback=function(){return null},a.supported(),t.exports=a},99:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(8719),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var n=this,i=null,r=this._exit,a=this.draw,s=this._update;return this.draw=function(){if(n._update(),i)for(var t=0;t<i.length;t+=1)i[t].draw();return a(),n},this._build=function(){return n.buildTime().modified(),i=n.createChoropleth()},this._update=function(){s.call(n),(n.dataTime().timestamp()>=n.buildTime().timestamp()||n.updateTime().timestamp()<=n.timestamp())&&(n._wipePolygons(),n._build()),n.updateTime().modified()},this._wipePolygons=function(){i&&i.map((function(t){return t._exit()})),i=null},this._exit=function(){n._wipePolygons(),r()},this._init(e),this};i(a,o),r("webgl","choropleth",a),t.exports=a},8917:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(9005),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e),n(5651).call(this,e);var i=this;return this._build=function(){i.actors()[0]&&i.renderer().contextRenderer().removeActor(i.actors()[0]),i.createGLMeshColored(i._createContours()),i.renderer().contextRenderer().addActor(i.actors()[0]),i.buildTime().modified()},this._init(e),this};i(a,o),r("webgl","contour",a),t.exports=a},8939:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(1109),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e),n(5651).call(this,e);var i=this;return this._build=function(){i.actors()[0]&&i.renderer().contextRenderer().removeActor(i.actors()[0]),i.createGLMeshColored(i._createGrids()),i.renderer().contextRenderer().addActor(i.actors()[0]),i.buildTime().modified()},this._init(e),this};i(a,o),r("webgl","grid",a),t.exports=a},9205:function(t,e,n){t.exports={choroplethFeature:n(99),contourFeature:n(8917),gridFeature:n(8939),isolineFeature:n(9752),layer:n(5389),lineFeature:n(7390),lookupTable2D:n(8672),markerFeature:n(1848),meshColored:n(5651),pixelmapFeature:n(9685),pointFeature:n(5675),polygonFeature:n(2890),quadFeature:n(2182),tileLayer:n(7112),trackFeature:n(506),webglRenderer:n(2254)}},9752:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(2367),a=function t(e){"use strict";return this instanceof t?(e=e||{},o.call(this,e),n(7719).call(this),this._init(e),this):new t(e)};i(a,o),r("webgl","isoline",a),t.exports=a},5389:function(t,e,n){var i=function(){"use strict";var t=n(4647).createRenderer,e=n(5108),i=n(2254),r=n(1940),o=this,a=this._init,s=this.opacity,l=this.visible,u=this.zIndex;this.opacity=function(t){var e=s.apply(o,arguments);return void 0!==t&&o.initialized()&&o.map()._updateAutoshareRenderers(),e},this.visible=function(t){if(void 0===t)return l();var e=l(),n=l.apply(o,arguments);return e!==t&&o.initialized()&&(o.map().scheduleAnimationFrame(o._update,!0),o.renderer()._render()),n},this.zIndex=function(t,e){var n=u.apply(o,arguments);return void 0!==t&&o.initialized()&&(o.map().scheduleAnimationFrame(o._update,!0),o.renderer()._render(),o.map()._updateAutoshareRenderers()),n},this.switchRenderer=function(t,e){if(t instanceof i&&t!==o.renderer()){var n=o.renderer(),r=[],a=[];o.map().listSceneObjects([o]).forEach((function(t){t._cleanup&&(t._cleanup(),t._update&&a.push(t)),t.actors&&(r=r.concat(t.actors()))})),r.forEach((function(e){n.contextRenderer().removeActor(e),t.contextRenderer().addActor(e)})),o._renderer(t),o._canvas(t.canvas()),e&&(r.length||a.length)&&(n._render(),a.forEach((function(t){t._update()})),t._render())}return o},this._init=function(){var n=o.map();return n._updateAutoshareRenderers||(n._updateAutoshareRenderers=function(){var e,o,a,s=n.sortedLayers(),l=[];s.forEach((function(n){var s=n.autoshareRenderer(),u=n instanceof r;s&&n.renderer()&&n.renderer().api()===i.apiname?!e||n.opacity()!==o||"more"!==s&&(n.opacity()>0&&n.opacity()<1||u&&!a)?(n.node()[0].contains(n.renderer().canvas()[0])||(n.switchRenderer(t(i.apiname,n),!1),l.push(n.renderer())),e=n.renderer(),o=n.opacity(),a=u):(n.renderer()!==e&&(l.push(n.renderer()),n.switchRenderer(e,!1),l.push(n.renderer())),a&=u):e=null})),s.forEach((function(t){l.indexOf(t.renderer())>=0&&t._update&&t._update()})),s.forEach((function(t){l.indexOf(t.renderer())>=0&&(t.renderer()._renderFrame(),l=l.filter((function(e){return e!==t.renderer()})))})),l.forEach((function(t){t._exit()}))},n.geoOn(e.layerAdd,(function(){return n._updateAutoshareRenderers()})),n.geoOn(e.layerRemove,(function(){return n._updateAutoshareRenderers()}))),a.apply(o,arguments)}};(0,n(4647).registerLayerAdjustment)("webgl","all",i),t.exports=i},7390:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(4708),a=0,s=1,l=3,u={butt:0,square:1,round:2},c={passthrough:3,miter:4,bevel:5,round:6,"miter-clip":7},d={normal:0,debug:1},h=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var i=n(320),r=n(6853),h=n(4634),f=n(7719),p=n(9162),m=n(359),g=n(916);f.call(this);var v,y,x,b,_,w,M,A,T,C,E,S=this,k=this._exit,P=void 0!==e.dynamicDraw&&e.dynamicDraw,O=this._init,R=this._update;return this.featureVertices=function(){return[[0,"corner",-1,a],[0,"near",1,s],[1,"far",-1,l],[1,"corner",1,a],[1,"near",-1,s],[0,"far",1,l]]},this.verticesPerFeature=function(){return S.featureVertices().length},this._init=function(t){var e,n=i.shaderProgram(),r=((e=new i.shader(i.GL.VERTEX_SHADER)).setShaderSource(g),e),o=function(t){var e=new i.shader(i.GL.FRAGMENT_SHADER);return e.setShaderSource(t?m:p),e}(void 0!==((t||{}).style||{}).debug),a=i.vertexAttribute("pos"),s=i.vertexAttribute("prev"),l=i.vertexAttribute("next"),u=i.vertexAttribute("far"),c=i.vertexAttribute("flags"),d=i.vertexAttribute("strokeWidth"),h=i.vertexAttribute("strokeColor"),f=i.vertexAttribute("strokeOpacity"),T=new i.projectionUniform("projectionMatrix"),C=i.geometryData(),k=i.sourceDataP3fv({name:"pos"}),R=i.sourceDataAnyfv(3,i.vertexAttributeKeysIndexed.Four,{name:"prev"}),L=i.sourceDataAnyfv(3,i.vertexAttributeKeysIndexed.Five,{name:"next"}),D=i.sourceDataAnyfv(3,i.vertexAttributeKeysIndexed.Six,{name:"far"}),I=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Seven,{name:"flags"}),F=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.One,{name:"strokeWidth"}),j=i.sourceDataAnyfv(3,i.vertexAttributeKeysIndexed.Two,{name:"strokeColor"}),z=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Three,{name:"strokeOpacity"}),N=i.triangles();return E=new i.modelViewOriginUniform("modelViewMatrix"),b=new i.floatUniform("pixelWidth",1/S.renderer().width()),_=new i.floatUniform("aspect",S.renderer().width()/S.renderer().height()),w=new i.floatUniform("miterLimit",10),M=new i.floatUniform("antialiasing",0),A=new i.floatUniform("fixedFlags",0),O.call(S,t),x=i.material(),y=i.mapper({dynamicDraw:P}),n.addVertexAttribute(a,i.vertexAttributeKeys.Position),n.addVertexAttribute(d,i.vertexAttributeKeysIndexed.One),n.addVertexAttribute(h,i.vertexAttributeKeysIndexed.Two),n.addVertexAttribute(f,i.vertexAttributeKeysIndexed.Three),n.addVertexAttribute(s,i.vertexAttributeKeysIndexed.Four),n.addVertexAttribute(l,i.vertexAttributeKeysIndexed.Five),n.addVertexAttribute(u,i.vertexAttributeKeysIndexed.Six),n.addVertexAttribute(c,i.vertexAttributeKeysIndexed.Seven),n.addUniform(E),n.addUniform(T),n.addUniform(b),n.addUniform(_),n.addUniform(w),n.addUniform(M),n.addUniform(A),n.addShader(o),n.addShader(r),x.addAttribute(n),x.addAttribute(i.blend()),(v=i.actor()).setMaterial(x),v.setMapper(y),C.addSource(k),C.addSource(R),C.addSource(L),C.addSource(D),C.addSource(F),C.addSource(j),C.addSource(z),C.addSource(I),N.setIndices(new Uint16Array(1)),C.addPrimitive(N),C.computeBounds=function(){C.setBounds(0,0,0,0,0,0)},y.setGeometryData(C),S},this.actors=function(){return v?[v]:[]},this._build=function(){return function(t){var e,n,i,o,a,s,l,f,p,m,g,v,x,b,_,k,P,O,R,L,D,I,F,j,z,N,B,V,G,U,q,W,H,Z,X,Q,K,Y,J=S.data(),$=0,tt=[{strokeOffset:0,posStrokeOffset:0,negStrokeOffset:0},{strokeOffset:0,posStrokeOffset:0,negStrokeOffset:0}],et=tt[1],nt=S.line(),it=S.style.get("strokeWidth"),rt=S.style.get("strokeColor"),ot=S.style.get("strokeOpacity"),at=S.style.get("lineCap"),st=S.style.get("lineJoin"),lt=S.style.get("strokeOffset"),ut=S.style.get("miterLimit")(J),ct=S.style.get("antialiasing")(J)||0,dt=S.featureVertices(),ht=dt.length,ft=d[S.style.get("debug")(J)?"debug":"normal"]||0,pt=y.geometryData(),mt=S.style.get("closed"),gt=!0;if(K=h.isFunction(S.style("closed"))?void 0:mt()||!1,L=h.isFunction(S.style("lineCap"))?void 0:u[at()||"butt"],D=h.isFunction(S.style("lineJoin"))?void 0:c[st()||"miter"],O=h.isFunction(S.style("strokeColor"))?void 0:rt(),I=h.isFunction(S.style("strokeOffset"))?void 0:lt()||0,R=h.isFunction(S.style("strokeOpacity"))?void 0:ot(),P=h.isFunction(S.style("strokeWidth"))?void 0:it(),void 0!==ut&&w.set(Math.max(1,Math.min(100,ut))),A.set(ft),M.set(ct),t)$=T.numSegments,Y=T.closed,m=T.lineItemList,p=$*ht,gt=L!==T.lineCapVal||void 0===L||D!==T.lineJoinVal||void 0===D||I!==T.strokeOffsetVal||void 0===I;else{var vt=[],yt=S.position();for(m=new Array(J.length),Y=new Array(J.length),n=0;n<J.length;n+=1)if(g=nt(e=J[n],n),m[n]=g,!(g.length<2)){for($+=g.length-1,i=0;i<g.length;i+=1)x=yt(g[i],i,e,n),vt.push(x.x),vt.push(x.y),vt.push(x.z||0),i||(_=x);g.length>2&&(void 0===K?mt(e,n):K)?x.x!==_.x||x.y!==_.y||x.z!==_.z?($+=1,Y[n]=2):Y[n]=1:Y[n]=0}if(vt=r.transformCoordinates(S.gcs(),S.layer().map().gcs(),vt,3),(C=new Float32Array(S.style.get("origin")(vt)))[0]||C[1]||C[2])for(n=0;n<vt.length;n+=3)vt[n]-=C[0],vt[n+1]-=C[1],vt[n+2]-=C[2];E.setOrigin(C),p=$*ht,B=h.getGeomBuffer(pt,"pos",3*p),V=h.getGeomBuffer(pt,"prev",3*p),G=h.getGeomBuffer(pt,"next",3*p),U=h.getGeomBuffer(pt,"far",3*p),pt.primitive(0).numberOfIndices()!==p&&(pt.primitive(0).numberOfIndices=function(){return p}),T={numSegments:$,closed:Y,lineItemList:m,lineCapVal:L,lineJoinVal:D,strokeOffsetVal:I}}for(q=h.getGeomBuffer(pt,"flags",p),W=h.getGeomBuffer(pt,"strokeWidth",p),H=h.getGeomBuffer(pt,"strokeColor",3*p),Z=h.getGeomBuffer(pt,"strokeOpacity",p),n=b=X=Q=0;n<J.length;n+=1)if(!((g=m[n]).length<2))for(e=J[n],K=Y[n],k=b,f=g.length+(2===K?1:0),i=0;i<f;i+=1,b+=3)if(l=i,i===g.length&&(l=0,b-=3),v=g[l],i&&(et=tt[0],tt[0]=tt[1],tt[1]=et),t||(et.pos=i===l?b:k,et.prev=l?b-3:K?k+3*(g.length-3+K):b,et.next=i+1<g.length?b+3:K?i!==l?k+3:k+6-3*K:b),et.strokeWidth=void 0===P?it(v,l,e,n):P,et.strokeColor=void 0===O?rt(v,l,e,n):O,et.strokeOpacity=void 0===R?ot(v,l,e,n):R,gt&&(0!==I&&(et.strokeOffset=(void 0===I?lt(v,l,e,n):I)||0,et.strokeOffset?(et.posStrokeOffset=2047&Math.round(2048+1023*Math.min(1,Math.max(-1,et.strokeOffset))),et.negStrokeOffset=2047&Math.round(2048-1023*Math.min(1,Math.max(-1,et.strokeOffset)))):et.posStrokeOffset=et.negStrokeOffset=0),K||i&&i!==g.length-1?et.flags=void 0===D?c[st(v,l,e,n)]||c.miter:D:et.flags=void 0===L?u[at(v,l,e,n)]||u.butt:L),i)for(o=0;o<ht;o+=1,X+=1,Q+=3)a=tt[F=dt[o][0]],s=tt[1-F],t||(B[Q]=vt[a.pos],B[Q+1]=vt[a.pos+1],B[Q+2]=0,j=F?"next":"prev",z=F?"prev":"next",V[Q]=vt[a[j]],V[Q+1]=vt[a[j]+1],V[Q+2]=0,G[Q]=vt[a[z]],G[Q+1]=vt[a[z]+1],G[Q+2]=0,U[Q]=vt[s[z]],U[Q+1]=vt[s[z]+1],U[Q+2]=0),gt&&(N=F?"posStrokeOffset":"negStrokeOffset",q[X]=dt[o][3]+4*a.flags+32*s.flags+256*a[N]),W[X]=a.strokeWidth,H[Q]=a.strokeColor.r,H[Q+1]=a.strokeColor.g,H[Q+2]=a.strokeColor.b,a.strokeOpacity<=0&&s.strokeOpacity<=0||a.strokeWidth<=0&&s.strokeWidth<=0?Z[X]=-1:Z[X]=a.strokeOpacity;t?(gt&&y.updateSourceBuffer("flags"),y.updateSourceBuffer("strokeWidth"),y.updateSourceBuffer("strokeOpacity"),y.updateSourceBuffer("strokeColor")):(y.modified(),pt.boundsDirty(!0),y.boundsDirtyTimestamp().modified())}(!!(S.dataTime().timestamp()<S.buildTime().timestamp()&&T)),S.renderer().contextRenderer().hasActor(v)||S.renderer().contextRenderer().addActor(v),S.buildTime().modified(),S},this._update=function(){return R.call(S),(S.dataTime().timestamp()>=S.buildTime().timestamp()||S.updateTime().timestamp()<=S.timestamp())&&S._build(),b.set(1/S.renderer().width()),_.set(S.renderer().width()/S.renderer().height()),v.setVisible(S.visible()),v.material().setBinNumber(S.bin()),S.updateTime().modified(),S},this._exit=function(){S.renderer().contextRenderer().removeActor(v),v=null,k()},this._init(e),this};i(h,o);var f={};f[o.capabilities.basic]=!0,f[o.capabilities.multicolor]=!0,r("webgl","line",h,f),t.exports=h},8672:function(t,e,n){var i=n(5699),r=n(6618),o=n(320);var a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.texture.call(this);var n,i=r(),a=e.maxWidth||4096,s=new Uint8Array([0,0,0,0]),l=this;return this.setup=function(t){!function(t,e){if(!(e>=0&&e<=31))throw Error("[error] Texture unit "+e+" is not supported");t.m_context.activeTexture(o.GL.TEXTURE0+e)}(t,l.textureUnit()),t.m_context.deleteTexture(l.m_textureHandle),l.m_textureHandle=t.m_context.createTexture(),t.m_context.bindTexture(o.GL.TEXTURE_2D,l.m_textureHandle),t.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_MIN_FILTER,o.GL.NEAREST),t.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_MAG_FILTER,o.GL.NEAREST),t.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_WRAP_S,o.GL.CLAMP_TO_EDGE),t.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_WRAP_T,o.GL.CLAMP_TO_EDGE),t.m_context.pixelStorei(o.GL.UNPACK_ALIGNMENT,1),t.m_context.pixelStorei(o.GL.UNPACK_FLIP_Y_WEBGL,!0),t.m_context.texImage2D(o.GL.TEXTURE_2D,0,o.GL.RGBA,l.width,l.height,0,o.GL.RGBA,o.GL.UNSIGNED_BYTE,s),t.m_context.bindTexture(o.GL.TEXTURE_2D,null),i.modified()},this.colorTable=function(t){return void 0===t?n:(n=t,t.length<4&&(t=[0,0,0,0]),l.width=Math.min(a,t.length/4),l.height=Math.ceil(t.length/4/a),t instanceof Uint8Array&&t.length===l.width*l.height*4?s=t:(t.length<l.width*l.height*4&&(t=t.concat(new Array(l.width*l.height*4-t.length).fill(0))),s=new Uint8Array(t)),l.modified(),l)},this.maxWidth=function(){return a},this.colorTable(e.colorTable||[]),this};i(a,o.texture),t.exports=a},1848:function(t,e,n){var i=n(5638),r=n(5699),o=n(4647).registerFeature,a=n(7098),s=n(2254),l=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},a.call(this,e);var r=n(320),o=n(6853),l=n(4634),u=n(7719),c=n(9892),d=n(5108),h=n(5573),f=n(468),p=n(2043),m=n(7981);u.call(this);var g,v,y=this,x=this._exit,b=null,_=null,w={},M=this._init,A=this._update,T=this.updateStyleFromArray;function C(t){var e,n,i,r,u,c,d,h,f,p,m,x,w,M=y.data().length,A=y._pointPolygon(0,0,1,1),T=new Array(3*M),E={},S={},k={},P={},O={radius:1,fillColor:3,fillOpacity:1,strokeColor:3,strokeOpacity:1,strokeOffset:0,strokeWidth:1,symbol:1,symbolValue:1,rotation:1,scaleWithZoom:0,rotateWithMap:0},R=y.verticesPerFeature(),L=y.data(),D=_.geometryData();for(var I in u=y.position(),O)k[I]=y.style.get(I),l.isFunction(y.style(I))||(P[I]=k[I]()),O[I]&&(E[I]=l.getGeomBuffer(D,I,R*M*O[I]));if(!t){for(e=x=0;e<M;e+=1,x+=3)r=u(L[e],e),T[x]=r.x,T[x+1]=r.y,T[x+2]=0;if(T=o.transformCoordinates(y.gcs(),y.layer().map().gcs(),T,3),(v=new Float32Array(y.style.get("origin")(T)))[0]||v[1]||v[2])for(e=x=0;e<M;e+=1,x+=3)T[x]-=v[0],T[x+1]-=v[1],T[x+2]-=v[2];g.setOrigin(v),i=l.getGeomBuffer(D,"pos",R*M*3),y._primitiveShape!==a.primitiveShapes.sprite&&(d=l.getGeomBuffer(D,"unit",R*M*2)),(c=D.primitive(0).indices())instanceof Uint16Array&&c.length===R*M||(c=new Uint16Array(R*M),D.primitive(0).setIndices(c))}for(e=f=p=m=x=0;e<M;e+=1,x+=3){if(h=L[e],!t&&y._primitiveShape!==a.primitiveShapes.sprite)for(n=0;n<A.length;n+=1,m+=1)d[m]=A[n];for(var F in O)S[F]=void 0===P[F]?k[F](h,e):P[F];for(S.scaleWithZoom=a.scaleMode[S.scaleWithZoom]||(S.scaleWithZoom>=1&&S.scaleWithZoom<=3?S.scaleWithZoom:0),S.symbolComputed=S.scaleWithZoom+(S.rotateWithMap?4:0)+16*(Math.sign(S.strokeOffset)+1)+64*S.symbol,S.symbolValue&&S.symbol>=a.symbols.arrow&&S.symbol<a.symbols.arrow+a.symbols.arrowMax&&(S.symbolValue=(w=S.symbolValue).length?((void 0===w[0]?0:Math.floor(250*Math.abs(w[0]))+1)+252*(void 0===w[1]?0:Math.floor(250*Math.abs(w[1]))+1)+252*(void 0===w[2]?0:Math.floor(250*Math.abs(w[2]))+1)*252)*(w[3]?-1:1):void 0===w?0:Math.floor(250*Math.abs(w))+1),n=0;n<R;n+=1,f+=1,p+=3)t||(i[p]=T[x],i[p+1]=T[x+1],i[p+2]=T[x+2]),E.radius[f]=S.radius,E.fillColor[p]=S.fillColor.r,E.fillColor[p+1]=S.fillColor.g,E.fillColor[p+2]=S.fillColor.b,E.fillOpacity[f]=S.fillOpacity,E.strokeColor[p]=S.strokeColor.r,E.strokeColor[p+1]=S.strokeColor.g,E.strokeColor[p+2]=S.strokeColor.b,E.strokeOpacity[f]=S.strokeOpacity,E.strokeWidth[f]=S.strokeWidth,E.symbol[f]=S.symbolComputed,E.symbolValue[f]=S.symbolValue,E.rotation[f]=S.rotation}if(y._primitiveShapeAuto){var j=y._approximateMaxRadius(y.renderer().map().zoom());if(y._primitiveShape===a.primitiveShapes.sprite&&j>s._maxPointSize||y._primitiveShape!==a.primitiveShapes.sprite&&j<=s._maxPointSize)return y._primitiveShape=j>s._maxPointSize?a.primitiveShapes.triangle:a.primitiveShapes.sprite,y.renderer().contextRenderer().removeActor(b),b=null,y._init(!0),void C()}t?Object.keys(E).forEach((function(t){return _.updateSourceBuffer(t)})):(D.boundsDirty(!0),_.modified(),_.boundsDirtyTimestamp().modified())}return c(y,e),this.actors=function(){return b?[b]:[]},this.updateStyleFromArray=function(t,e,n){var r,o,a={fillColor:3,fillOpacity:1,radius:1,strokeColor:3,strokeOpacity:1,strokeWidth:1,symbolComputed:1,symbolValueComputed:1};if("string"==typeof t){var s={};s[t]=e,t=s}return i.each(t,(function(t,e){var n,i,s,l,u,c,d,h,f,p;if(y.visible()&&b&&a[t]&&!r&&!y.clustering())if(f=a[t],l=y.data().length,p="symbolComputed"===t?"symbol":"symbolValueComputed"===t?"symbolValue":t,s=(i=b.mapper()).getSourceBuffer(p),n=y.verticesPerFeature(),s&&l&&l*n*f===s.length){switch(a[t]){case 1:for(c=0,h=0;c<l;c+=1)for(u=e[c],d=0;d<n;d+=1,h+=1)s[h]=u;break;case 3:for(c=0,h=0;c<l;c+=1)for(u=e[c],d=0;d<n;d+=1,h+=3)s[h]=u.r,s[h+1]=u.g,s[h+2]=u.b}i.updateSourceBuffer(p),o=!0}else r=!0;else r=!0;if(t===p){var m=y.modified;r||(y.modified=function(){}),T(t,e,!1),y.modified=m}})),n&&(y.visible()&&r?y.draw():o&&y.renderer()._render()),y},this._handleZoom=function(t){y._primitiveShapeAuto&&y._primitiveShape===a.primitiveShapes.sprite&&y._approximateMaxRadius(t)>s._maxPointSize&&(y._primitiveShape=a.primitiveShapes.triangle,y.renderer().contextRenderer().removeActor(y.actors()[0]),y._init(!0),y.dataTime().modified(),y.draw())},this._init=function(t){var n,i,o=r.shaderProgram(),s=((i=new r.shader(r.GL.VERTEX_SHADER)).setShaderSource(y._primitiveShape===a.primitiveShapes.sprite?m:p),i),l=function(){var t=new r.shader(r.GL.FRAGMENT_SHADER);return t.setShaderSource(y._primitiveShape===a.primitiveShapes.sprite?f:h),t}(),u=r.material(),c=r.blend(),x=r.geometryData(),A=r.sourceDataP3fv({name:"pos"}),T={radius:1,fillColor:3,fillOpacity:1,strokeColor:3,strokeOpacity:1,strokeWidth:1,symbol:1,symbolValue:1,rotation:1},C={pixelWidth:r.GL.FLOAT,aspect:r.GL.FLOAT,zoom:r.GL.FLOAT,rotationUniform:r.GL.FLOAT},E=new r.projectionUniform("projectionMatrix");g=new r.modelViewOriginUniform("modelViewMatrix",v),y._primitiveShape===a.primitiveShapes.sprite?n=new r.points:(n=new r.triangles,T.unit=2),n.setIndices(new Uint16Array),t||M.call(y,e),_=r.mapper(),o.addVertexAttribute(r.vertexAttribute("pos"),r.vertexAttributeKeys.Position),x.addSource(A),Object.keys(T).forEach((function(t,e){o.addVertexAttribute(r.vertexAttribute(t),e+1),x.addSource(r.sourceDataAnyfv(T[t],e+1,{name:t}))})),w={},Object.keys(C).forEach((function(t){w[t]=new r.uniform(C[t],t),o.addUniform(w[t])})),o.addUniform(g),o.addUniform(E),o.addShader(l),o.addShader(s),u.addAttribute(o),u.addAttribute(c),(b=r.actor()).setMaterial(u),b.setMapper(_),x.addPrimitive(n),x.computeBounds=function(){x.setBounds(0,0,0,0,0,0)},_.setGeometryData(x),t||y.geoOn(d.zoom,(function(t){y._handleZoom(t.zoomLevel)}))},this._build=function(){return C(y.dataTime().timestamp()<y.buildTime().timestamp()),y.renderer().contextRenderer().hasActor(b)||y.renderer().contextRenderer().addActor(b),y.buildTime().modified(),y},this._update=function(){return A.call(y),(y.dataTime().timestamp()>=y.buildTime().timestamp()||y.updateTime().timestamp()<y.timestamp())&&y._build(),w.pixelWidth.set(2/y.renderer().width()),w.aspect.set(y.renderer().width()/y.renderer().height()),w.zoom.set(y.renderer().map().zoom()),w.rotationUniform.set(y.renderer().map().rotation()),b.setVisible(y.visible()),b.material().setBinNumber(y.bin()),y.updateTime().modified(),y},this._exit=function(){y.renderer().contextRenderer().removeActor(b),b=null,w={},x()},y._init(),this};r(l,a);o("webgl","marker",l,{}),t.exports=l},5651:function(t,e,n){t.exports=function(t){"use strict";t=t||{};var e=n(320),i=n(6853),r=n(4634),o=n(4351),a=n(5836);n(7719).call(this);var s,l,u=this,c=this._exit,d=null,h=null,f=null,p=null,m=null,g=null,v=null,y=null,x=void 0!==t.dynamicDraw&&t.dynamicDraw,b=this._init,_=this._update;function w(){var t=new e.shader(e.GL.VERTEX_SHADER);return t.setShaderSource(a),t}function M(){var t=new e.shader(e.GL.FRAGMENT_SHADER);return t.setShaderSource(o),t}return this.createGLMeshColored=function(t){var e,n,o,a,c,d,f,x,b,_=t.elements.length,w=[],M=h.geometryData();for(m.set([t.minColor.r,t.minColor.g,t.minColor.b,t.minColor.a]),g.set([t.maxColor.r,t.maxColor.g,t.maxColor.b,t.maxColor.a]),v.set(t.colorMap.length),y.set(t.stepped),e=-1;e<t.colorMap.length+1;e+=1)o=Math.max(0,Math.min(t.colorMap.length-1,e)),w.push(255*t.colorMap[o].r),w.push(255*t.colorMap[o].g),w.push(255*t.colorMap[o].b),w.push(255*t.colorMap[o].a);if(p.setColorTable(w),t.pos=i.transformCoordinates(u.gcs(),u.layer().map().gcs(),t.pos,3),(s=new Float32Array(u.style.get("origin")(t.pos)))[0]||s[1]||s[2])for(e=0;e<t.pos.length;e+=3)t.pos[e]-=s[0],t.pos[e+1]-=s[1],t.pos[e+2]-=s[2];for(l.setOrigin(s),d=r.getGeomBuffer(M,"pos",3*_),f=r.getGeomBuffer(M,"opacity",_),x=r.getGeomBuffer(M,"value",_),e=n=0;e<_;e+=1,n+=3)a=3*(o=t.elements[e]),d[n]=t.pos[a],d[n+1]=t.pos[a+1],d[n+2]=t.pos[a+2],c=t.elementValues?Math.floor(e/3):o,f[e]=t.opacity[c],x[e]=t.value[c];(b=M.primitive(0).indices())instanceof Uint16Array&&b.length===_||(b=new Uint16Array(_),M.primitive(0).setIndices(b)),M.boundsDirty(!0),h.modified(),h.boundsDirtyTimestamp().modified()},this._init=function(t){var n=e.blend(),i=e.shaderProgram(),r=e.material(),o=e.lookupTable(),a=e.geometryData(),s=new e.projectionUniform("projectionMatrix"),c=new e.uniform(e.GL.INT,"sampler2d"),_=w(),A=M(),T=e.vertexAttribute("pos"),C=e.vertexAttribute("value"),E=e.vertexAttribute("opacity"),S=e.sourceDataP3fv({name:"pos"}),k=e.sourceDataAnyfv(1,e.vertexAttributeKeysIndexed.One,{name:"value"}),P=e.sourceDataAnyfv(1,e.vertexAttributeKeysIndexed.Two,{name:"opacity"}),O=new e.triangles;l=new e.modelViewOriginUniform("modelViewMatrix"),b.call(u,t),h=e.mapper({dynamicDraw:x}),i.addVertexAttribute(T,e.vertexAttributeKeys.Position),i.addVertexAttribute(C,e.vertexAttributeKeysIndexed.One),i.addVertexAttribute(E,e.vertexAttributeKeysIndexed.Two),i.addUniform(l),i.addUniform(s),m=new e.uniform(e.GL.FLOAT_VEC4,"minColor"),i.addUniform(m),g=new e.uniform(e.GL.FLOAT_VEC4,"maxColor"),i.addUniform(g),v=new e.uniform(e.GL.FLOAT,"steps"),i.addUniform(v),y=new e.uniform(e.GL.BOOL,"stepped"),i.addUniform(y),i.addShader(A),i.addShader(_),i.addUniform(c),o.setTextureUnit(7),c.set(7),(f=r).addAttribute(i),f.addAttribute(n),p=o,f.addAttribute(p),(d=e.actor()).setMaterial(f),d.setMapper(h),a.addSource(S),a.addSource(k),a.addSource(P),a.addPrimitive(O),a.computeBounds=function(){a.setBounds(0,0,0,0,0,0)},h.setGeometryData(a)},this.actors=function(){return d?[d]:[]},this._update=function(){_.call(u),(u.dataTime().timestamp()>=u.buildTime().timestamp()||u.updateTime().timestamp()<=u.timestamp())&&u._build(),d.setVisible(u.visible()),d.material().setBinNumber(u.bin()),u.updateTime().modified()},this._exit=function(){u.renderer().contextRenderer().removeActor(d),c()},this}},7719:function(t,e,n){t.exports=function t(e){"use strict";if(!(this instanceof n(3737)))return new t(e);var i=this,r=this.draw;if(this.draw=function(){return i.ready&&(i._update({mayDelay:!0}),i.renderer()._render(),r()),i},this.bin){var o=this.bin;this.bin=function(t,e){if(void 0===t&&!e&&null===o(void 0,!0)){var n=i.layer&&i.layer(),r=n&&n.map&&n.map(),a=r&&r.listSceneObjects()||[],s=a.indexOf(i);if(s>=0)return s}return o.apply(i,arguments)}}return this}},9685:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(6374),a=n(8672),s=n(4634),l=function t(e){"use strict";if(!(this instanceof t))return new t(e);o.call(this,e),n(7719).call(this);var i,r,l,u=n(320),c=n(3953),d=this._exit,h=this;return this.pointSearch=function(t,e){if(i&&h.m_info)for(var n=i.pointSearch(t,e),r=n.index.length-1;r>=0;r-=1)if(n.extra[n.index[r]]._quad&&n.extra[n.index[r]]._quad.image){var o=n.extra[n.index[r]]._quad.image,a=n.extra[n.index[r]].basis,s=Math.floor(a.x*o.width),l=Math.floor(a.y*o.height),u=document.createElement("canvas");u.width=u.height=1;var c=u.getContext("2d");c.drawImage(o,s,l,1,1,0,0,1,1);var d=c.getImageData(0,0,1,1).data,f=d[0]+256*d[1]+256*d[2]*256;return n={index:[f],found:[h.data()[f]]}}return{index:[],found:[]}},this._computePixelmap=function(){var t=h.data()||[],e=h.style.get("color"),n=h.indexModified(void 0,"clear"),o=h.dataTime().timestamp()>=h.buildTime().timestamp()||void 0===n;l||((l=a()).setTextureUnit(1),o=!0);var d,f=Math.max(1,t.length),p=l.maxWidth();f>p&&f%p&&(f+=p-f%p),o||(o=(d=l.colorTable()).length!==4*f,n[0]=Math.max(0,n[0]),n[1]=Math.min(t.length,n[1]+1)),o&&(d=new Uint8Array(4*f),n=[0,t.length]);for(var m=n[0];m<n[1];m+=1){var g=t[m],v=s.convertColor(e.call(h,g,m));d[4*m]=255*v.r,d[4*m+1]=255*v.g,d[4*m+2]=255*v.b,d[4*m+3]=void 0===v.a?255:255*v.a}h.m_info={colors:d};var y=l.colorTable();if(y&&y.length===d.length){for(var x=4*n[0];x<4*n[1]&&d[x]===y[x];x+=1);if(x===4*n[1])return}l.colorTable(d),i||(i=h.layer().createFeature("quad",{selectionAPI:!1,gcs:h.gcs(),visible:h.visible(void 0,!0)}),r=!1),r||(h.dependentFeatures([i]),i.setShader("image_fragment",c),i._hookBuild=function(t){var e=new u.uniform(u.GL.INT,"lutSampler");e.set(l.textureUnit()),t.addUniform(e);var n=new u.uniform(u.GL.INT,"lutWidth");n.set(l.width),t.addUniform(n);var i=new u.uniform(u.GL.INT,"lutHeight");i.set(l.height),t.addUniform(i)},i._hookRenderImageQuads=function(t,e){e.forEach((function(t){t.image&&t.texture&&!t.texture.nearestPixel()&&t.texture.setNearestPixel(!0)})),l.bind(t,e)},!1===r&&i.style({image:h.m_srcImage,position:h.style.get("position")}).data([{}]).draw(),r=!0)},this._exit=function(){return i&&h.layer()&&(h.layer().deleteFeature(i),i=null,h.dependentFeatures([])),d(),h},e.quadFeature&&(i=e.quadFeature),this._init(e),this};i(l,o);var u={};u[o.capabilities.lookup]=!0,r("webgl","pixelmap",l,u),t.exports=l},5675:function(t,e,n){var i=n(5638),r=n(5699),o=n(4647).registerFeature,a=n(2557),s=n(2254),l=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},a.call(this,e);var r=n(320),o=n(6853),l=n(4634),u=n(7719),c=n(9892),d=n(1815),h=n(4900),f=n(9713),p=n(8410);u.call(this);var m,g,v=this,y=this._exit,x=null,b=null,_=null,w=null,M=void 0!==e.dynamicDraw&&e.dynamicDraw,A=this._init,T=this._update,C=this.updateStyleFromArray;function E(t){var e,n,i,r,u,c,d,h,f,p,y,_,w,M,A,T,C,S,k,P,O,R,L,D,I,F,j,z,N,B,V,G,U,q,W,H,Z=v.data().length,X=v._pointPolygon(0,0,1,1),Q=new Array(3*Z),K=v.verticesPerFeature(),Y=v.data(),J=0,$=b.geometryData();if(u=v.position(),p=v.style.get("radius"),w=v.style.get("stroke"),T=v.style.get("strokeWidth"),k=v.style.get("strokeOpacity"),R=v.style.get("strokeColor"),I=v.style.get("fill"),z=v.style.get("fillOpacity"),V=v.style.get("fillColor"),!t){for(e=H=0;e<Z;e+=1,H+=3)r=u(Y[e],e),Q[H]=r.x,Q[H+1]=r.y,Q[H+2]=0;if(Q=o.transformCoordinates(v.gcs(),v.layer().map().gcs(),Q,3),(g=new Float32Array(v.style.get("origin")(Q)))[0]||g[1]||g[2])for(e=H=0;e<Z;e+=1,H+=3)Q[H]-=g[0],Q[H+1]-=g[1],Q[H+2]-=g[2];m.setOrigin(g),i=l.getGeomBuffer($,"pos",K*Z*3),c=l.getGeomBuffer($,"unit",K*Z*2),(d=$.primitive(0).indices())instanceof Uint16Array&&d.length===K*Z||(d=new Uint16Array(K*Z),$.primitive(0).setIndices(d))}for(h=l.getGeomBuffer($,"radius",K*Z),y=l.getGeomBuffer($,"stroke",K*Z),M=l.getGeomBuffer($,"strokeWidth",K*Z),C=l.getGeomBuffer($,"strokeOpacity",K*Z),P=l.getGeomBuffer($,"strokeColor",K*Z*3),L=l.getGeomBuffer($,"fill",K*Z),F=l.getGeomBuffer($,"fillOpacity",K*Z),N=l.getGeomBuffer($,"fillColor",K*Z*3),e=U=q=W=H=0;e<Z;e+=1,H+=3){if(G=Y[e],!t&&v._primitiveShape!==a.primitiveShapes.sprite)for(n=0;n<X.length;n+=1,W+=1)c[W]=X[n];for(f=p(G,e),_=w(G,e)?1:0,A=T(G,e),S=k(G,e),O=R(G,e),D=I(G,e)?1:0,j=z(G,e),B=V(G,e),v._primitiveShapeAuto&&(D&&j||_&&S)&&f+(_&&S?A:0)>J&&(J=f+(_&&S?A:0)),n=0;n<K;n+=1,U+=1,q+=3)t||(i[q]=Q[H],i[q+1]=Q[H+1],i[q+2]=Q[H+2]),h[U]=f,y[U]=_,M[U]=A,C[U]=S,P[q]=O.r,P[q+1]=O.g,P[q+2]=O.b,L[U]=D,F[U]=j,N[q]=B.r,N[q+1]=B.g,N[q+2]=B.b}if(v._primitiveShapeAuto&&(v._primitiveShape===a.primitiveShapes.sprite&&J>s._maxPointSize||v._primitiveShape!==a.primitiveShapes.sprite&&J<=s._maxPointSize))return v._primitiveShape=J>s._maxPointSize?a.primitiveShapes.triangle:a.primitiveShapes.sprite,v.renderer().contextRenderer().removeActor(x),x=null,v._init(!0),void E();t?(b.updateSourceBuffer("radius"),b.updateSourceBuffer("stroke"),b.updateSourceBuffer("strokeWidth"),b.updateSourceBuffer("strokeColor"),b.updateSourceBuffer("strokeOpacity"),b.updateSourceBuffer("fill"),b.updateSourceBuffer("fillColor"),b.updateSourceBuffer("fillOpacity")):($.boundsDirty(!0),b.modified(),b.boundsDirtyTimestamp().modified())}return c(v,e),this.actors=function(){return x?[x]:[]},this.updateStyleFromArray=function(t,e,n){var r,o,a={fill:"bool",fillColor:3,fillOpacity:1,radius:1,stroke:"bool",strokeColor:3,strokeOpacity:1,strokeWidth:1};if("string"==typeof t){var s={};s[t]=e,t=s}return i.each(t,(function(t,e){var n,i,s,l,u,c,d,h,f;if(v.visible()&&x&&a[t]&&!r&&!v.clustering())if(f="bool"===a[t]?1:a[t],l=v.data().length,s=(i=x.mapper()).getSourceBuffer(t),n=v.verticesPerFeature(),s&&l&&l*n*f===s.length){switch(a[t]){case 1:for(c=0,h=0;c<l;c+=1)for(u=e[c],d=0;d<n;d+=1,h+=1)s[h]=u;break;case 3:for(c=0,h=0;c<l;c+=1)for(u=e[c],d=0;d<n;d+=1,h+=3)s[h]=u.r,s[h+1]=u.g,s[h+2]=u.b;break;case"bool":for(c=0,h=0;c<l;c+=1)for(u=e[c]?1:0,d=0;d<n;d+=1,h+=1)s[h]=u}i.updateSourceBuffer(t),o=!0}else r=!0;else r=!0;var p=v.modified;r||(v.modified=function(){}),C(t,e,!1),v.modified=p})),n&&(v.visible()&&r?v.draw():o&&v.renderer()._render()),v},this._init=function(t){var n,i,o=r.shaderProgram(),s=((i=new r.shader(r.GL.VERTEX_SHADER)).setShaderSource(v._primitiveShape===a.primitiveShapes.sprite?p:f),i),l=function(){var t=new r.shader(r.GL.FRAGMENT_SHADER);return t.setShaderSource(v._primitiveShape===a.primitiveShapes.sprite?h:d),t}(),u=r.vertexAttribute("pos"),c=r.vertexAttribute("unit"),y=r.vertexAttribute("radius"),T=r.vertexAttribute("strokeWidth"),C=r.vertexAttribute("fillColor"),E=r.vertexAttribute("fill"),S=r.vertexAttribute("strokeColor"),k=r.vertexAttribute("stroke"),P=r.vertexAttribute("fillOpacity"),O=r.vertexAttribute("strokeOpacity"),R=new r.projectionUniform("projectionMatrix"),L=r.material(),D=r.blend(),I=r.geometryData(),F=r.sourceDataP3fv({name:"pos"}),j=r.sourceDataAnyfv(2,r.vertexAttributeKeysIndexed.One,{name:"unit"}),z=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Two,{name:"radius"}),N=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Three,{name:"strokeWidth"}),B=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Four,{name:"fillColor"}),V=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Five,{name:"fill"}),G=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Six,{name:"strokeColor"}),U=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Seven,{name:"stroke"}),q=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Eight,{name:"fillOpacity"}),W=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Nine,{name:"strokeOpacity"});m=new r.modelViewOriginUniform("modelViewMatrix",g),(n=v._primitiveShape===a.primitiveShapes.sprite?new r.points:new r.triangles).setIndices(new Uint16Array),_=new r.floatUniform("pixelWidth",2/v.renderer().width()),w=new r.floatUniform("aspect",v.renderer().width()/v.renderer().height()),t||A.call(v,e),b=r.mapper({dynamicDraw:M}),o.addVertexAttribute(u,r.vertexAttributeKeys.Position),v._primitiveShape!==a.primitiveShapes.sprite&&o.addVertexAttribute(c,r.vertexAttributeKeysIndexed.One),o.addVertexAttribute(y,r.vertexAttributeKeysIndexed.Two),o.addVertexAttribute(T,r.vertexAttributeKeysIndexed.Three),o.addVertexAttribute(C,r.vertexAttributeKeysIndexed.Four),o.addVertexAttribute(E,r.vertexAttributeKeysIndexed.Five),o.addVertexAttribute(S,r.vertexAttributeKeysIndexed.Six),o.addVertexAttribute(k,r.vertexAttributeKeysIndexed.Seven),o.addVertexAttribute(P,r.vertexAttributeKeysIndexed.Eight),o.addVertexAttribute(O,r.vertexAttributeKeysIndexed.Nine),o.addUniform(_),o.addUniform(w),o.addUniform(m),o.addUniform(R),o.addShader(l),o.addShader(s),L.addAttribute(o),L.addAttribute(D),(x=r.actor()).setMaterial(L),x.setMapper(b),I.addSource(F),I.addSource(j),I.addSource(z),I.addSource(N),I.addSource(B),I.addSource(V),I.addSource(G),I.addSource(U),I.addSource(q),I.addSource(W),I.addPrimitive(n),I.computeBounds=function(){I.setBounds(0,0,0,0,0,0)},b.setGeometryData(I)},this._build=function(){return E(v.dataTime().timestamp()<v.buildTime().timestamp()),v.renderer().contextRenderer().hasActor(x)||v.renderer().contextRenderer().addActor(x),v.buildTime().modified(),v},this._update=function(){return T.call(v),(v.dataTime().timestamp()>=v.buildTime().timestamp()||v.updateTime().timestamp()<v.timestamp())&&v._build(),_.set(2/v.renderer().width()),w.set(v.renderer().width()/v.renderer().height()),x.setVisible(v.visible()),x.material().setBinNumber(v.bin()),v.updateTime().modified(),v},this._exit=function(){v.renderer().contextRenderer().removeActor(x),x=null,y()},v._init(),this};r(l,a);var u={};u[a.capabilities.stroke]=!0,o("webgl","point",l,u),t.exports=l},9892:function(t,e,n){var i=n(2557);t.exports=function(t,e){e=e||{},t._primitiveShapeAuto=!0,t._primitiveShape=i.primitiveShapes.auto,void 0!==i.primitiveShapes[e.primitiveShape]&&(t._primitiveShape=e.primitiveShape),t._primitiveShapeAuto=t._primitiveShape===i.primitiveShapes.auto,t._primitiveShapeAuto&&(t._primitiveShape=i.primitiveShapes.sprite,t._primitiveShapeAuto=!0),t._pointPolygon=function(e,n,r,o){var a;switch(t._primitiveShape){case i.primitiveShapes.triangle:a=[e,n-2*o,e-r*Math.sqrt(3),n+o,e+r*Math.sqrt(3),n+o];break;case i.primitiveShapes.square:a=[e-r,n+o,e-r,n-o,e+r,n+o,e-r,n-o,e+r,n-o,e+r,n+o];break;default:a=[e,n]}return a},t.verticesPerFeature=function(){return t._pointPolygon(0,0,1,1).length/2},t.primitiveShape=function(e,n){if(void 0===e)return n||!t._primitiveShapeAuto?t._primitiveShape:i.primitiveShapes.auto;if(void 0!==i.primitiveShapes[e]){var r=!1;e===i.primitiveShapes.auto?(r=!t._primitiveShapeAuto,t._primitiveShapeAuto=!0):(r=t._primitiveShapeAuto||t._primitiveShape!==e,t._primitiveShapeAuto=!1,t._primitiveShape=e),r&&(t.renderer().contextRenderer().removeActor(t.actors()[0]),t._init(!0),t.dataTime().modified())}return t}}},2890:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(4343),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var i=n(320),r=n(1106),a=n(6853),s=n(4634),l=n(7719),u=n(1859),c=n(5810);l.call(this);var d,h,f,p,m,g=this,v=this._exit,y=i.actor(),x=i.mapper(),b=i.material(),_=this._init,w=this._update;function M(){var t=new i.shader(i.GL.VERTEX_SHADER);return t.setShaderSource(c),t}function A(){var t=new i.shader(i.GL.FRAGMENT_SHADER);return t.setShaderSource(u),t}return this._init=function(t){var e=i.shaderProgram(),n=i.vertexAttribute("pos"),r=i.vertexAttribute("fillColor"),o=i.vertexAttribute("fillOpacity"),a=new i.projectionUniform("projectionMatrix"),s=M(),l=A(),u=i.blend(),c=i.geometryData(),d=i.sourceDataP3fv({name:"pos"}),h=i.sourceDataAnyfv(3,i.vertexAttributeKeysIndexed.Two,{name:"fillColor"}),p=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Three,{name:"fillOpacity"}),m=i.triangles();f=new i.modelViewOriginUniform("modelViewMatrix"),e.addVertexAttribute(n,i.vertexAttributeKeys.Position),e.addVertexAttribute(r,i.vertexAttributeKeysIndexed.Two),e.addVertexAttribute(o,i.vertexAttributeKeysIndexed.Three),e.addUniform(f),e.addUniform(a),e.addShader(l),e.addShader(s),b.addAttribute(e),b.addAttribute(u),y.setMaterial(b),y.setMapper(x),c.addSource(d),c.addSource(h),c.addSource(p),c.addPrimitive(m),c.computeBounds=function(){c.setBounds(0,0,0,0,0,0)},x.setGeometryData(c),_.call(g,t)},this.actors=function(){return[y]},this._build=function(){!function(t){var e,n,i,o,l,u,c,p,m,v,y,b,_,w,M,A,T,C,E,S,k,P,O,R,L,D,I,F,j=[],z=g.gcs(),N=g.layer().map().gcs(),B=0,V=x.geometryData();for(l=g.style.get("fillColor"),u=s.isFunction(g.style("fillColor"))?void 0:l(),p=g.style.get("fillOpacity"),m=s.isFunction(g.style("fillOpacity"))?void 0:p(),v=g.style.get("fill"),y=s.isFunction(g.style("fill"))?void 0:v(),b=g.style.get("uniformPolygon"),t?(j=d.items,B=d.numPts):(n=g.style.get("position"),i=g.style.get("polygon"),g.data().forEach((function(t,e){var o,s,l,u;if((o=i(t,e))&&!((s=o.outer||(Array.isArray(o)?o:[])).length<3)){for(l=new Array(3*s.length),k=E=0;k<s.length;k+=1,E+=3)u=n(s[k],k,t,e),l[E]=u.x,l[E+1]=u.y,l[E+2]=0;l={vertices:l,dimensions:3,holes:[]},F=s,o.inner&&o.inner.forEach((function(i){if(!(i.length<3))for(F=F.concat(i),l.holes.push(E/3),k=0;k<i.length;k+=1,E+=3)u=n(i[k],k,t,e),l.vertices[E]=u.x,l.vertices[E+1]=u.y,l.vertices[E+2]=0})),l.vertices=a.transformCoordinates(z,N,l.vertices,l.dimensions),(L={triangles:r(l.vertices,l.holes,l.dimensions),vertices:l.vertices,original:F,item:t,itemIndex:e}).triangles.length&&(j.push(L),B+=L.triangles.length)}})),e=s.getGeomBuffer(V,"pos",3*B),(w=V.primitive(0).indices())instanceof Uint16Array&&w.length===B||(w=new Uint16Array(B),V.primitive(0).setIndices(w)),d={items:j,numPts:B},h=new Float32Array(g.style.get("origin")(j)),f.setOrigin(h)),o=s.getGeomBuffer(V,"fillColor",3*B),c=s.getGeomBuffer(V,"fillOpacity",B),C=E=0,M=u,T=y,O=0;O<j.length;O+=1)if(R=j[O].triangles.length,S=j[O].vertices,D=j[O].item,I=j[O].itemIndex,F=j[O].original,A=m,(_=b(D,I))&&(void 0===u&&(M=l(S[0],0,D,I)),void 0===m&&(A=p(S[0],0,D,I))),void 0===y&&(T=v(D,I)),T||(A=0),_&&t&&j[O].uniform&&j[O].color&&M.r===j[O].color.r&&M.g===j[O].color.g&&M.b===j[O].color.b&&A===j[O].opacity)C+=R,E+=3*R;else{for(k=0;k<R;k+=1,C+=1,E+=3)t&&_?(o[E]=M.r,o[E+1]=M.g,o[E+2]=M.b,c[C]=A):(P=3*j[O].triangles[k],t||(e[E]=S[P]-h[0],e[E+1]=S[P+1]-h[1],e[E+2]=S[P+2]-h[2],w[C]=k),_||void 0!==u||(M=l(F[P],P,D,I)),o[E]=M.r,o[E+1]=M.g,o[E+2]=M.b,!_&&T&&void 0===m&&(A=p(F[P],P,D,I)),c[C]=A);(_||j[O].uniform)&&(j[O].uniform=_,j[O].color=M,j[O].opacity=A)}t?(x.updateSourceBuffer("fillOpacity"),x.updateSourceBuffer("fillColor")):(x.modified(),V.boundsDirty(!0),x.boundsDirtyTimestamp().modified())}(!!(g.dataTime().timestamp()<g.buildTime().timestamp()&&d)),g.renderer().contextRenderer().hasActor(y)||(g.renderer().contextRenderer().addActor(y),p=!0),g.buildTime().modified()},this._update=function(t){g.ready&&(t&&t.mayDelay&&p?m=g.layer().map().scheduleAnimationFrame(g._update):(m&&(g.layer().map().scheduleAnimationFrame(g._update,"remove"),m=null),w.call(g),(g.dataTime().timestamp()>=g.buildTime().timestamp()||g.updateTime().timestamp()<=g.timestamp())&&g._build(),y.setVisible(g.visible()),y.material().setBinNumber(g.bin()),g.updateTime().modified()))},this._exit=function(){m&&g.layer()&&(g.layer().map().scheduleAnimationFrame(g._update,"remove"),m=null),g.renderer().contextRenderer().removeActor(y),v()},this._init(e),this};i(a,o),r("webgl","polygon",a),t.exports=a},2182:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(5017),a=n(6618),s=16777216,l=function t(e){"use strict";if(!(this instanceof t))return new t(e);o.call(this,e);var i=n(5638),r=n(320),l=n(7719),u=n(7521),c=n(5804),d=n(630),h=n(1899);l.call(this);var f,p,m,g,v,y,x,b=this,_=this._exit,w=this._update,M={},A=a(),T=a();function C(t){var e=new r.mapper({dynamicDraw:!0});return e.s_modified=e.modified,e.g_timestamp=a(),e.timestamp=e.g_timestamp.timestamp,e.modified=function(){return e.s_modified(),e.g_timestamp.modified(),e},e.s_render=e.render,e.render=t,e}return this.actors=function(){var t=[];return p&&t.push(p),m&&t.push(m),t},this._build=function(){var t,e,n,i,o,a,s,l,_;b.position()&&((x=b._generateQuads()).imgQuads.length&&!p&&(b.visible(!1),t=C(b._renderImageQuads),(p=new r.actor).setMapper(t),e=new r.material,(n=new r.shaderProgram).addVertexAttribute(new r.vertexAttribute("vertexPosition"),r.vertexAttributeKeys.Position),n.addVertexAttribute(new r.vertexAttribute("textureCoord"),r.vertexAttributeKeys.TextureCoordinate),f=new r.modelViewOriginUniform("modelViewMatrix",x.origin),n.addUniform(f),n.addUniform(new r.projectionUniform("projectionMatrix")),n.addUniform(new r.floatUniform("opacity",1)),n.addUniform(new r.floatUniform("zOffset",0)),(_=new r.uniform(r.GL.INT,"sampler2d")).set(0),n.addUniform(_),l=b.renderer()._glContext(),(o=new r.uniform(l.FLOAT_VEC2,"crop")).set([1,1]),n.addUniform(o),(a=new r.uniform(l.FLOAT_VEC4,"cropsource")).set([0,0,0,0]),n.addUniform(a),n.addShader(r.getCachedShader(l.VERTEX_SHADER,l,c)),n.addShader(r.getCachedShader(l.FRAGMENT_SHADER,l,u)),b._hookBuild&&b._hookBuild(n),e.addAttribute(n),e.addAttribute(new r.blend),s=new r.geometryData,g=void 0,(i=new r.sourceDataT2fv).pushBack([0,0,1,0,0,1,1,1]),s.addSource(i),t.setGeometryData(s),p.setMaterial(e),b.renderer().contextRenderer().addActor(p),b.visible(!0)),x.clrQuads.length&&!m&&(b.visible(!1),t=C(b._renderColorQuads),(m=new r.actor).setMapper(t),e=new r.material,(n=new r.shaderProgram).addVertexAttribute(new r.vertexAttribute("vertexPosition"),r.vertexAttributeKeys.Position),y=new r.modelViewOriginUniform("modelViewMatrix",x.origin),n.addUniform(y),n.addUniform(new r.projectionUniform("projectionMatrix")),n.addUniform(new r.floatUniform("opacity",1)),n.addUniform(new r.floatUniform("zOffset",0)),l=b.renderer()._glContext(),n.addUniform(new r.uniform(l.FLOAT_VEC3,"vertexColor")),n.addShader(r.getCachedShader(l.VERTEX_SHADER,l,h)),n.addShader(r.getCachedShader(l.FRAGMENT_SHADER,l,d)),e.addAttribute(n),e.addAttribute(new r.blend),s=new r.geometryData,v=void 0,t.setGeometryData(s),m.setMaterial(e),b.renderer().contextRenderer().addActor(m),b.visible(!0)),f&&f.setOrigin(x.origin),y&&y.setOrigin(x.origin),b._updateTextures(),b.buildTime().modified())},this._updateTextures=function(){var t;i.each(x.imgQuads,(function(e,n){n.image&&(n.image._texture?n.texture=n.image._texture:((t=new r.texture).setImage(n.image),n.texture=n.image._texture=t))}))},this._renderColorQuads=function(t){if(x.clrQuads.length){var e=this;(e.timestamp()>T.timestamp()||b.dataTime().timestamp()>T.timestamp()||t.m_contextChanged||!v||12*x.clrQuads.length>v.length)&&function(t){var e=t.m_context,n=!1;x.clrQuads.length&&((!v||v.length<12*x.clrQuads.length||!M.clrQuadsPosition)&&(M.clrQuadsPosition&&e.deleteBuffer(M.clrQuadsPosition),M.clrQuadsPosition=e.createBuffer(),v=new Float32Array(12*Math.max(128,2*x.clrQuads.length)),n=!0),i.each(x.clrQuads,(function(t,e){for(var n=0;n<12;n+=1)v[12*t+n]=e.pos[n]-x.origin[n%3]})),e.bindBuffer(e.ARRAY_BUFFER,M.clrQuadsPosition),n?e.bufferData(e.ARRAY_BUFFER,v,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,v)),T.modified()}(t),e.s_render(t,!0);var n,o,a,s=t.m_context;s.bindBuffer(s.ARRAY_BUFFER,M.clrQuadsPosition),i.each(x.clrQuads,(function(e,i){i.opacity!==n&&(n=i.opacity,s.uniform1fv(t.m_material.shaderProgram().uniformLocation("opacity"),new Float32Array([n]))),(i.zOffset||0)!==o&&(o=i.zOffset||0,s.uniform1fv(t.m_material.shaderProgram().uniformLocation("zOffset"),new Float32Array([o]))),a&&a.r===i.color.r&&a.g===i.color.g&&a.b===i.color.b||(a=i.color,s.uniform3fv(t.m_material.shaderProgram().uniformLocation("vertexColor"),new Float32Array([a.r,a.g,a.b]))),s.bindBuffer(s.ARRAY_BUFFER,M.clrQuadsPosition),s.vertexAttribPointer(r.vertexAttributeKeys.Position,3,s.FLOAT,!1,12,12*e*4),s.enableVertexAttribArray(r.vertexAttributeKeys.Position),s.drawArrays(s.TRIANGLE_STRIP,0,4)})),s.bindBuffer(s.ARRAY_BUFFER,null),e.undoBindVertexData(t)}},this._renderImageQuads=function(t){if(x.imgQuads.length){var e=this;(e.timestamp()>A.timestamp()||b.dataTime().timestamp()>A.timestamp()||t.m_contextChanged||!g||12*x.imgQuads.length>g.length)&&function(t){var e=t.m_context,n=!1;x.imgQuads.length&&((!g||g.length<12*x.imgQuads.length||!M.imgQuadsPosition)&&(M.imgQuadsPosition&&e.deleteBuffer(M.imgQuadsPosition),M.imgQuadsPosition=e.createBuffer(),g=new Float32Array(12*Math.max(128,2*x.imgQuads.length)),n=!0),i.each(x.imgQuads,(function(t,e){for(var n=0;n<12;n+=1)g[12*t+n]=e.pos[n]-x.origin[n%3]})),e.bindBuffer(e.ARRAY_BUFFER,M.imgQuadsPosition),n?e.bufferData(e.ARRAY_BUFFER,g,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,g)),A.modified()}(t),e.s_render(t,!0);var n,o,a,l,u,c,d,h,f=t.m_context,p={x:1,y:1},m={x0:0,y0:0,x1:1,y1:1};b._hookRenderImageQuads&&b._hookRenderImageQuads(t,x.imgQuads),f.bindBuffer(f.ARRAY_BUFFER,M.imgQuadsPosition),i.each(x.imgQuads,(function(e,i){i.image&&(i.texture.bind(t),i.image.width*i.image.height>s&&(s=i.image.width*i.image.height,f.getError()===f.OUT_OF_MEMORY&&console.log("Insufficient GPU memory for texture")),i.opacity!==n&&(n=i.opacity,f.uniform1fv(t.m_material.shaderProgram().uniformLocation("opacity"),new Float32Array([n]))),(i.zOffset||0)!==o&&(o=i.zOffset||0,f.uniform1fv(t.m_material.shaderProgram().uniformLocation("zOffset"),new Float32Array([o]))),a=i.crop||{x:1,y:1},p&&a.x===p.x&&a.y===p.y||(p=a,f.uniform2fv(t.m_material.shaderProgram().uniformLocation("crop"),new Float32Array([p.x||1,p.y||1]))),u=i.image.width,c=i.image.height,l=i.crop||{left:0,top:0,right:u,bottom:c},m&&l.left===m.left&&l.top===m.top&&l.right===m.right&&l.bottom===m.bottom&&d===u&&h===c||(m=l,d=u,h=c,f.uniform4fv(t.m_material.shaderProgram().uniformLocation("cropsource"),new Float32Array([m.left/u,m.top/c,m.right/u,m.bottom/c]))),f.bindBuffer(f.ARRAY_BUFFER,M.imgQuadsPosition),f.vertexAttribPointer(r.vertexAttributeKeys.Position,3,f.FLOAT,!1,12,12*e*4),f.enableVertexAttribArray(r.vertexAttributeKeys.Position),f.drawArrays(f.TRIANGLE_STRIP,0,4),i.texture.undoBind(t))})),f.bindBuffer(f.ARRAY_BUFFER,null),e.undoBindVertexData(t)}},this._update=function(){w.call(b),(b.buildTime().timestamp()<=b.dataTime().timestamp()||b.updateTime().timestamp()<b.timestamp())&&b._build(),m&&(m.setVisible(b.visible()),m.material().setBinNumber(b.bin())),p&&(p.setVisible(b.visible()),p.material().setBinNumber(b.bin())),b.updateTime().modified()},this._cleanup=function(){p&&(b.renderer().contextRenderer().removeActor(p),p=null),m&&(b.renderer().contextRenderer().removeActor(m),m=null),g=void 0,v=void 0,Object.keys(M).forEach((function(t){delete M[t]})),x&&x.imgQuads&&(x.imgQuads.forEach((function(t){t.texture&&(delete t.texture,delete t.image._texture)})),b._updateTextures()),b.modified()},this.setShader=function(t,e){switch(t){case"image_vertex":c=e;break;case"image_fragment":u=e;break;case"color_vertex":h=e;break;case"color_fragment":d=e;break;default:return}return b},this._exit=function(){b._cleanup(),_.call(b)},b._init(e),this};i(l,o);var u={};u[o.capabilities.color]=!0,u[o.capabilities.image]=!0,u[o.capabilities.imageCrop]=!0,u[o.capabilities.imageFixedScale]=!1,u[o.capabilities.imageFull]=!0,u[o.capabilities.canvas]=!1,u[o.capabilities.video]=!1,r("webgl","quad",l,u),t.exports=l},7112:function(t,e,n){var i=n(4647).registerLayerAdjustment,r=n(1940),o=function(){"use strict";var t,e=n(5108),i=this,o=this._init,a=this._exit,s=this._update,l=this.visible,u=this.zIndex,c=0,d=[];this._drawTile=function(e){if(t){var n,o,a=i._tileBounds(e),s=e.index.level||0,l=i._tileOffset(s),u=i.tileCropFromBounds(e),h={},f=i.renderer().contextRenderer().m_depthBits;u&&(h.crop={x:u.x/i._options.tileWidth,y:u.y/i._options.tileHeight}),h.ul=i.fromLocal(i.fromLevel({x:a.left-l.x,y:a.top-l.y},s),0),h.ll=i.fromLocal(i.fromLevel({x:a.left-l.x,y:a.bottom-l.y},s),0),h.ur=i.fromLocal(i.fromLevel({x:a.right-l.x,y:a.top-l.y},s),0),h.lr=i.fromLocal(i.fromLevel({x:a.right-l.x,y:a.bottom-l.y},s),0),h.ul.z=h.ll.z=h.ur.z=h.lr.z=0,n=i._options.keepLower?i._options.maxLevel-s+1:1,(o=(o=i.map().listSceneObjects().filter((function(t){return t instanceof r}))).slice(o.indexOf(i)+1)).forEach((function(t){n+=t._options.keepLower?t._options.maxLevel-t._options.minLevel+1:1})),h.zOffset=n*Math.pow(2,-f)*r._zOffsetMultiple,c+=1,h.id=c,e.quadId=h.id,h.image=e.image,d.push(h),t.data(d),t._update(),i.draw()}},this._remove=function(e){if(void 0!==e.quadId&&t){for(var n=0;n<d.length;n+=1)if(d[n].id===e.quadId){d.splice(n,1);break}t.data(d),t._update(),i.draw()}},this.visible=function(e){return void 0===e?l():(i.visible()!==e&&(l(e),t&&t.visible(t.visible(void 0,!0),!0)),i)},this.zIndex=function(t,e){return void 0!==t&&i._clearQuads(),u.apply(i,arguments)},this._clearQuads=function(e){(!e||e.layer&&e.layer instanceof r)&&(i.clear(),t&&t.modified(),e&&i.draw())},this._update=function(e){return s.call(i,e),i._addBaseQuadToTiles(t,d),i},this._cleanup=function(){var t;if(i.cache&&i.cache._cache){for(var e in i.cache._cache)(t=i.cache._cache[e])._image&&t._image._texture&&delete t._image._texture;i.cache.clear()}i.clear()},this._exit=function(){var n=i.map();n.geoOff(e.layerAdd,i._clearQuads),n.geoOff(e.layerRemove,i._clearQuads),i._cleanup(),i.deleteFeature(t),t=null,d=[],a.apply(i,arguments)},this._init=function(){o.apply(i,arguments),(t=i.createFeature("quad",{previewColor:i._options.previewColor,previewImage:i._options.previewImage})).geoTrigger=void 0,t.gcs(i._options.gcs||i.map().gcs()),t.data(d),t._update();var n=i.map();n.geoOn(e.layerAdd,i._clearQuads),n.geoOn(e.layerRemove,i._clearQuads),i.geoOn(e.unhidden,(function(){i.map().scheduleAnimationFrame((function(){i._clearQuads(),i.map().draw()}))}))},this._getSubLayer=function(){},this._updateSubLayers=void 0};r._zOffsetMultiple=2,i("webgl","tile",o),t.exports=o},506:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(6223),a=function t(e){"use strict";return this instanceof t?(e=e||{},o.call(this,e),n(7719).call(this),this._init(e),this):new t(e)};i(a,o),r("webgl","track",a),t.exports=a},2254:function(t,e,n){var i,r=n(5699),o=n(4647).registerRenderer,a=n(3234),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},a.call(this,e);var i,r=n(5638),o=n(320),s=n(5240),l=n(4634),u=n(5108),c=this,d=null,h=null,f=!1,p=this._init,m=this._exit;return this.contextRenderer=function(){return d},this.api=function(){return t.apiname},this._init=function(){if(c.initialized())return c;p.call(c);var t=e.canvas||r(document.createElement("canvas"));if(t.addClass("webgl-canvas"),r(c.layer().node().get(0)).append(t),window.overrideContextAttributes){var n=t.get(0),i=n.getContext;n.getContext=function(t,e){if(e=e||{},window.overrideContextAttributes)for(var r in window.overrideContextAttributes)window.overrideContextAttributes.hasOwnProperty(r)&&(e[r]=window.overrideContextAttributes[r]);return i.call(n,t,e)}}(h=o.viewer(t.get(0),e.options)).init(),(d=h.renderWindow().activeRenderer()).setResetScene(!1),h.renderWindow().renderers().length>0&&d.setLayer(h.renderWindow().renderers().length),c.canvas(t);var a=c.layer().map().size();return c._resize(0,0,a.width,a.height),c},this._resize=function(t,e,n,i){var r=h.renderWindow();return t===r.windowPosition[0]&&e===r.windowPosition[1]&&n===c.width()&&i===c.height()||(c._setWidthHeight(n,i),c.canvas().attr("width",n),c.canvas().attr("height",i),r.positionAndResize(t,e,n,i),f=!0,c._render()),c},this._render=function(){return c.layer().map().scheduleAnimationFrame(c._renderFrame,!0),c},this._renderFrame=function(){h&&(f&&(f=!1,c._updateRendererCamera()),h.render())},this._glContext=function(){return h&&h.renderWindow()?h.renderWindow().context():o.GL},this._exit=function(){if(c.layer().map().scheduleAnimationFrame(c._renderFrame,"remove"),c.canvas().remove(),h){var t=new o.renderState;t.m_renderer=h,t.m_context=c._glContext(),h.exit(t);var e=c._glContext();e!==o.GL&&e.getExtension("WEBGL_lose_context")&&e.getExtension("WEBGL_lose_context").loseContext&&e.getExtension("WEBGL_lose_context").loseContext()}o.clearCachedShaders(o.GL),h=null,m()},this._updateRendererCamera=function(){var t=h.renderWindow(),e=c.layer().map(),n=e.camera(),r=e.rotation()||0,o=n.view,a=n.projectionMatrix;if(a[15])a=s.copy(l.mat4AsArray(),a),a=s.scale(a,a,[1,1,-.5]),a=s.translate(a,a,[0,0,n.clipbounds.far]);else{var u=n.clipbounds.near,d=n.clipbounds.far;a=s.copy(l.mat4AsArray(),a),a=s.scale(a,a,[1/u,1/u,-1/d])}var f=Math.PI/2,p=r%f,m=Math.min(Math.abs(p),Math.abs(p-f))<1e-5;t.renderers().forEach((function(t){var r=t.camera();if(!l.compareArrays(o,r.viewMatrix())||!l.compareArrays(a,r.projectionMatrix())||i!==e.zoom()){i=e.zoom(),r.setViewMatrix(o,!0),r.setProjectionMatrix(a);var s=n.viewport;a[1]||a[2]||a[3]||a[4]||a[6]||a[7]||a[8]||a[9]||a[11]||1!==a[15]||!m||s.left&&s.left%1||s.top&&s.top%1||parseFloat(i.toFixed(6))!==parseFloat(i.toFixed(0))?r.viewAlignment=function(){return null}:r.viewAlignment=function(){var t={roundx:2/s.width,roundy:2/s.height};return t.dx=s.width%2?.5*t.roundx:0,t.dy=s.height%2?.5*t.roundy:0,t}}}))},c.layer().geoOn(u.pan,(function(t){f=!0})),c.layer().geoOn(u.parallelprojection,(function(t){var e=c.contextRenderer(),n=c.layer();if(t.geo&&t.geo._triggeredBy!==n){if(!e||!e.camera())return void console.log("Parallel projection event triggered on unconnected VGL renderer.");e.camera().setEnableParallelProjection(t.parallelProjection),f=!0}})),this};s.apiname="webgl",r(s,a),o("webgl",s),o("vgl",s),s.supported=function(){if(void 0===i){var t,e;try{(e=(t=document.createElement("canvas")).getContext("webgl")||t.getContext("experimental-webgl")).getSupportedExtensions().indexOf("WEBGL_debug_renderer_info")>=0&&(s._unmaskedRenderer=e.getParameter(e.getExtension("WEBGL_debug_renderer_info").UNMASKED_RENDERER_WEBGL)),s._maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),s._maxPointSize=e.getParameter(e.ALIASED_POINT_SIZE_RANGE)[1],i=!0}catch(t){console.warn("No webGL support"),i=!1}t=void 0,e=void 0,void 0}return i},s.fallback=function(){return null},t.exports=s},9552:function(t){"use strict";t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},406:function(t,e,n){"use strict";var i=n(559),r=n.n(i),o=n(3476),a=n.n(o)()(r());a.push([t.id,'.geojs-map{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden}.geojs-map .geo-attribution{position:absolute;right:0;bottom:0;padding-right:5px;cursor:auto;font:11px/1.5 "Helvetica Neue",Arial,Helvetica,sans-serif;z-index:1001;background:rgba(255,255,255,0.7);clear:both;display:block;pointer-events:auto}.geojs-map .geo-attribution .geo-attribution-layer{padding-left:5px}.geojs-map .canvas-canvas{display:block;-webkit-transform-origin:0 0;-moz-transform-origin:0 0;-o-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}.geojs-map .webgl-canvas{display:block}.geojs-map .geojs-layer{position:absolute;width:100%;height:100%;left:0;top:0;pointer-events:none}.geojs-map .geojs-layer.active:not(.hidden) > *{pointer-events:auto}.geojs-map .geojs-layer.hidden{display:none}.geojs-map .geojs-layer.hidden[renderer="webgl"]{display:inherit}.geojs-map .geo-tile-layer{-webkit-transform-origin:0 0;-moz-transform-origin:0 0;-o-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;line-height:0;font-size:0}.geojs-map.annotation-input{cursor:crosshair}.geojs-map.highlight-focus:after{content:"";display:block;position:absolute;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;left:0;top:0;right:0;bottom:0;border:3px solid Highlight;opacity:1;-ms-filter:none;filter:none;-webkit-transition:opacity 0s;-moz-transition:opacity 0s;-o-transition:opacity 0s;-ms-transition:opacity 0s;transition:opacity 0s;visibility:hidden}.geojs-map.highlight-focus:focus:after{visibility:visible;-webkit-transition:opacity 2.5s ease-in;-moz-transition:opacity 2.5s ease-in;-o-transition:opacity 2.5s ease-in;-ms-transition:opacity 2.5s ease-in;transition:opacity 2.5s ease-in;opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0)}.geo-tile-container{position:absolute}.geo-tile-container.crop{overflow:hidden}',"",{version:3,sources:["webpack://./main.styl","webpack://./../node_modules/nib/lib/nib/vendor.styl","webpack://./../node_modules/nib/lib/nib/overflow.styl","webpack://./../node_modules/nib/lib/nib/flex.styl","webpack://./../node_modules/nib/lib/nib/border.styl"],names:[],mappings:"AAEA,WACE,iBAAS,CCwCO,wBAAG,CAAH,qBAAG,CAAH,oBAAG,CARN,gBAAG,CChBd,eAAU,CFZZ,4BACE,iBAAS,CACT,OAAM,CACN,QAAO,CACP,iBAAc,CCmfd,WAAO,CDjfP,yDAA8B,CAC9B,YAAQ,CCoeR,gCAAW,CDleX,UAAM,CGMN,aAAS,CHJT,mBAAe,CAEf,mDACE,gBAAa,CAEjB,0BGDE,aAAS,CFqBK,4BAAG,CAAH,yBAAG,CAAH,uBAAG,CAAH,wBAAG,CARN,oBAAG,CDThB,yBGJE,aAAS,CHOX,wBACE,iBAAS,CACT,UAAM,CACN,WAAO,CACP,MAAK,CACL,KAAI,CACJ,mBAAe,CAEb,gDACE,mBAAe,CACnB,+BGjBA,YAAS,CHmBT,iDGnBA,eAAS,CHsBX,2BCDgB,4BAAG,CAAH,yBAAG,CAAH,uBAAG,CAAH,wBAAG,CARN,oBAAG,CDWd,aAAY,CACZ,WAAU,CAEZ,4BC6cE,gBAAO,CDzcP,iCACE,UAAQ,CGhCV,aAAS,CHkCP,iBAAS,CCbG,6BAAG,CAAH,0BAAG,CARN,qBAAG,CDuBZ,MAAK,CACL,KAAI,CACJ,OAAM,CACN,QAAO,CIpDT,0BAAQ,CHmQV,SAAS,CAQH,eAAY,CACZ,WAAQ,CA5OE,6BAAG,CAAH,0BAAG,CAAH,wBAAG,CAAH,yBAAG,CARN,qBAAG,CDkCZ,iBAAW,CACb,uCACE,kBAAW,CC5BC,uCAAG,CAAH,oCAAG,CAAH,kCAAG,CAAH,mCAAG,CARN,+BAAG,CA2OhB,SAAS,CAWH,+DAAyE,CACzE,uBAAiC,CD/MzC,oBACE,iBAAS,CACT,yBExDE,eAAU",sourcesContent:['@import \'~nib/index.styl\'\n\n.geojs-map\n position relative\n user-select none\n overflow hidden\n\n .geo-attribution\n position absolute\n right 0\n bottom 0\n padding-right 5px\n cursor auto\n font 11px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif\n z-index 1001\n background rgba(255,255,255,0.7)\n clear both\n display block\n pointer-events auto\n\n .geo-attribution-layer\n padding-left 5px\n\n .canvas-canvas\n display block\n transform-origin 0px 0px\n .webgl-canvas\n display block\n\n .geojs-layer\n position absolute\n width 100%\n height 100%\n left 0\n top 0\n pointer-events none\n &.active:not(.hidden)\n > *\n pointer-events auto\n &.hidden\n display none\n &.hidden[renderer="webgl"]\n display inherit\n\n .geo-tile-layer\n transform-origin 0px 0px\n line-height 0\n font-size 0\n\n &.annotation-input\n cursor crosshair\n\n &.highlight-focus\n &:after\n content ""\n display block\n position absolute\n box-sizing border-box\n left 0px\n top 0px\n right 0px\n bottom 0px\n // Highlight is technically a css2 color. We may need to specify it\n // explicitly. #3B66A6 seems close\n border 3px solid Highlight\n opacity 1\n transition opacity 0s\n visibility hidden\n &:focus:after\n visibility visible\n transition opacity 2.5s ease-in\n opacity 0\n\n.geo-tile-container\n position absolute\n &.crop\n overflow hidden\n',"use('../nodes/vendor-helpers.js')\n@import 'config'\n\n/*\n * Alias \"nowrap\" as \"no-wrap\".\n */\n\nno-wrap = unquote('nowrap')\n\n/*\n * Helper to find out if a given value is a width\n */\n\nis-width(val)\n if auto == val\n return true\n else if val && 'unit' == type(val)\n // Stylus does not short circuit so we need to perform this as a distinct\n // operation to prevent errors\n return '' != unit(val)\n return false\n\n/*\n * Vendor support for the given prop / arguments, optionally specifying the\n * only prefixes to utilize, or those which should be ignored.\n */\n\nvendor(prop, args, only = null, ignore = null, vendor-property = true)\n need_normalize = !vendor-property or prop in ('transition' 'transition-property' 'border-image' 'border-image-slice')\n for prefix in vendor-prefixes\n unless (only and !(prefix in only)) or (ignore and prefix in ignore)\n if official == prefix\n if need_normalize\n {prop}: normalize(prop,('%s' % args))\n else\n {prop}: args\n else\n newprop = prop\n newprop = '-' + prefix + '-' + prop if vendor-property\n\n if need_normalize\n {newprop}: normalize(prop,('%s' % args),prefix)\n else\n {newprop}: args\n/*\n * Vendorize the given value.\n */\n\nvendor-value(arg, only = null, ignore = null)\n prop = current-property[0]\n for prefix in vendor-prefixes\n unless (only and !(prefix in only)) or (ignore and prefix in ignore) or official == prefix\n add-property(prop, '-%s-%s' % (prefix arg))\n arg\n\n/*\n * Vendor \"box-shadow\" support.\n */\n\nbox-shadow()\n vendor('box-shadow', arguments, only: webkit official)\n\n/*\n * Vendor \"user-select\" support.\n */\n\nuser-select()\n vendor('user-select', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"column-count\" support.\n */\n\ncolumn-count()\n vendor('column-count', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-gap\" support.\n */\n\ncolumn-gap()\n vendor('column-gap', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-rule\" support.\n */\n\ncolumn-rule()\n vendor('column-rule', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-rule-color\" support.\n */\n\ncolumn-rule-color()\n vendor('column-rule-color', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-rule-width\" support.\n */\n\ncolumn-rule-width()\n vendor('column-rule-width', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-rule-style\" support.\n */\n\ncolumn-rule-style()\n vendor('column-rule-style', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-width\" support.\n */\n\ncolumn-width()\n vendor('column-width', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-span\" support.\n */\n\ncolumn-span()\n vendor('column-span', arguments, only: webkit official)\n\n/*\n * Vendor \"column-fill\" support.\n */\n\ncolumn-fill()\n vendor('column-fill', arguments, only: moz)\n\n/*\n * Legacy syntax support for background-clip and background-origin\n */\n\nlegacy-bg-values(property, args)\n legacy_args = ()\n importance = unquote('')\n for subargs in args\n for arg in subargs\n if arg in (border-box padding-box content-box)\n arg = unquote('border') if arg == border-box\n arg = unquote('padding') if arg == padding-box\n arg = unquote('content') if arg == content-box\n if arg != '!important'\n push(legacy_args,arg)\n else\n importance = !important\n vendor(property, unquote(join(', ',legacy_args)) importance, only: moz webkit)\n\n/*\n * Vendor \"background-clip\" support.\n */\n\nbackground-clip()\n if arguments[0] == text\n vendor('background-clip', arguments, only: webkit)\n else\n legacy-bg-values('background-clip', arguments)\n background-clip: arguments\n\n/*\n * Vendor \"background-origin\" support.\n */\n\nbackground-origin()\n legacy-bg-values('background-origin', arguments)\n background-origin: arguments\n\n/*\n * Vendor \"background-size\" support.\n */\n\nbackground-size()\n vendor('background-size', arguments, only: webkit moz official)\n\n/*\n * Vendor \"transform\" support.\n */\n\ntransform()\n vendor('transform', arguments)\n\n/*\n * Vendor \"transform-origin\" support.\n */\ntransform-origin()\n vendor('transform-origin', arguments)\n\n/*\n * Vendor \"transform-style\" support.\n */\n\ntransform-style()\n vendor('transform-style', arguments)\n\n/*\n * Vendor \"border-image\" support.\n */\n\nborder-image()\n vendor('border-image', arguments, only: webkit moz o official)\n\n/*\n * Vendor \"transition\" support.\n */\n\ntransition()\n vendor('transition', arguments)\n\n/*\n * Vendor \"transition-property\" support.\n */\n\ntransition-property()\n vendor('transition-property', arguments)\n\n/*\n * Vendor \"transition-duration\" support.\n */\n\ntransition-duration()\n vendor('transition-duration', arguments)\n\n/*\n * Vendor \"transition-timing-function\" support.\n */\n\ntransition-timing-function()\n vendor('transition-timing-function', arguments)\n\n/*\n * Vendor \"transition-delay\" support.\n */\n\ntransition-delay()\n vendor('transition-delay', arguments)\n\n/*\n * Vendor \"backface-visibility\" support.\n */\n\nbackface-visibility()\n vendor('backface-visibility', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"perspective\" support.\n */\n\nperspective()\n if mixin\n vendor('perspective', arguments, only: webkit moz ms official)\n else\n 'perspective(%s)' % arguments\n\n/*\n * Vendor \"perspective-origin\" support.\n */\n\nperspective-origin()\n vendor('perspective-origin', arguments, only: webkit moz ms official)\n\n/*\n * Opacity with conditional IE support.\n */\n\nopacity(n, args...)\n opacity: n args\n if support-for-ie\n if n == inherit or n == initial\n -ms-filter: n args\n filter: n args\n else\n val = round(n * 100)\n if val == 100\n -ms-filter: none args\n filter: none args\n else\n -ms-filter: '\"progid:DXImageTransform.Microsoft.Alpha(Opacity=%s)\"' % val args\n filter: 'alpha(opacity=%s)' % val args\n\n/*\n * Vendor \"text-size-adjust\"\n */\n\ntext-size-adjust()\n vendor('text-size-adjust', arguments)\n\n/*\n * Alias the \"white-space\" property.\n */\n\nwhitespace()\n white-space: arguments\n\n/*\n * Vendor \"box-sizing\" support.\n */\n\nbox-sizing()\n vendor('box-sizing', arguments, only: webkit moz official)\n\n/*\n * Vendor \"box-orient\" support.\n */\n\nbox-orient()\n vendor('box-orient', arguments, only: webkit moz official)\n\n/*\n * Vendor \"box-flex-group\" support.\n */\n\nbox-flex-group()\n vendor('box-flex-group', arguments, only: webkit moz official)\n\n/*\n * Vendor \"box-ordinal-group\" support.\n */\n\nbox-ordinal-group()\n vendor('box-ordinal-group', arguments, only: webkit moz ms official)\n\n\n/*\n * Vendor \"box-align\" support.\n */\n\nbox-align()\n vendor('box-align', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"box-pack\" support.\n */\n\nbox-pack()\n vendor('box-pack', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"box-direction\" support.\n */\n\nbox-direction()\n vendor('box-direction', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"animation\" support.\n */\n\nanimation()\n vendor('animation', arguments)\n\n\n/*\n * Vendor \"animation-name\" support.\n */\n\nanimation-name()\n vendor('animation-name', arguments)\n\n/*\n * Vendor \"animation-duration\" support.\n */\n\nanimation-duration()\n vendor('animation-duration', arguments)\n\n/*\n * Vendor \"animation-delay\" support.\n */\n\nanimation-delay()\n vendor('animation-delay', arguments)\n\n/*\n * Vendor \"animation-direction\" support.\n */\n\nanimation-direction()\n vendor('animation-direction', arguments)\n\n/*\n * Vendor \"animation-iteration-count\" support.\n */\n\nanimation-iteration-count()\n vendor('animation-iteration-count', arguments)\n\n/*\n * Vendor \"animation-timing-function\" support.\n */\n\nanimation-timing-function()\n vendor('animation-timing-function', arguments)\n\n/*\n * Vendor \"animation-play-state\" support.\n */\n\nanimation-play-state()\n vendor('animation-play-state', arguments)\n\n/*\n * Vendor \"animation-fill-mode\" support.\n */\n\nanimation-fill-mode()\n vendor('animation-fill-mode', arguments)\n\n/*\n * Vendor \"hyphens\" support.\n */\n\nhyphens()\n vendor('hyphens', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"appearance\" support.\n */\n\nappearance()\n vendor('appearance', arguments, only: webkit moz official)\n\n/*\n * Vendor \"tab-size\" support.\n */\n\ntab-size()\n vendor('tab-size', arguments, only: moz o official)\n\n/*\n * Vendor \"overflow-scrolling\" support.\n */\n\noverflow-scrolling()\n vendor('overflow-scrolling', arguments, only: webkit official)\n\n/*\n * Vendor \"text-overflow\" support, , -o- for opera 9.* - 10.*\n */\n\ntext-overflow()\n vendor('text-overflow', arguments, only: official o)\n\n/*\n * Vendor \"text-size-adjust\" support.\n */\ntext-size-adjust()\n vendor('text-size-adjust', arguments, only: official webkit ms)\n\n/*\n * Vendor \"font-smoothing\" support, webkit only.\n */\nfont-smoothing()\n vendor('font-smoothing', arguments, only: webkit)\n\n\n/**\n * Vendor input-placeholder/placeholder support.\n *\n * Examples:\n * // Default syntax\n * body\n * placeholder(color #333, font-weight normal)\n *\n * // The comma is important\n * .placeholder-red\n * placeholder(color red,)\n *\n * // We can pass a function\n * green-placeholder()\n * color green\n * .placeholder-green\n * placeholder(green-placeholder)\n *\n * // We can pass a hash\n * textarea\n * placeholder((font-style italic) (font-weight bold) (padding '4px 10px'))\n */\nplaceholder()\n for v in ':-webkit-input' '-moz' ':-moz' '-ms-input'\n &:{v}-placeholder\n for pair in arguments\n if typeof(pair) == 'function'\n pair()\n else if pair is not null && pair[0] is not null\n {pair[0]}: type(pair[1]) == 'string' ? s(pair[1]) : pair[1]\ninput-placeholder = placeholder\n\n/*\n * Vendor background support (gradients).\n */\n\nbackground()\n if match('-gradient\\(', ''+arguments)\n vendor('background', arguments, vendor-property: false)\n else\n background arguments\n\nbackground-image()\n if match('-gradient\\(', ''+arguments)\n vendor('background-image', arguments, vendor-property: false)\n else\n background-image arguments\n\ncursor()\n if match('-gradient\\(', ''+arguments)\n vendor('cursor', arguments, vendor-property: false)\n else\n cursor arguments\n\nlist-style()\n if match('-gradient\\(', ''+arguments)\n vendor('list-style', arguments, vendor-property: false)\n else\n list-style arguments\n\nlist-style-image()\n if match('-gradient\\(', ''+arguments)\n vendor('list-style-image', arguments, vendor-property: false)\n else\n list-style-image arguments\n","/*\n * Overflow utility. Maps to regular overflow, and adds an ellipsis value.\n *\n * Synopsis:\n *\n * overflow: <type>\n *\n * Examples:\n *\n * overflow: auto\n * overflow: hidden\n * overflow: ellipsis\n *\n */\n\noverflow()\n if arguments[0] == ellipsis\n ellipsis()\n else\n overflow: arguments\n","/*\n * Vendor \"display: flex\" support with fallback to obsolete versions.\n */\n\nflex-version ?= box flex\n\n//\n// 1. Display values\n// - http://www.w3.org/TR/css3-flexbox/#flex-containers\n//\ndisplay(type, args...)\n if flex == type || inline-flex == type\n if box in flex-version\n if flex == type\n display: -ms-flexbox args\n display: vendor-value(box args, only: moz webkit)\n else\n display: -ms-inline-flexbox args\n display: vendor-value(inline-box args, only: moz webkit)\n if flex in flex-version\n display: vendor-value(arguments, only: webkit official) // overwrites old webkit\n else\n display: arguments\n\n/*\n * New syntax for browsers like Google Chrome.\n * Plus a translation to the old syntax, if possible.\n */\n\n\n//\n// 5. Ordering and Orientation\n// - http://www.w3.org/TR/css3-flexbox/#ordering-and-orientation\n//\n-flex-obsolete-direction(direction)\n if box in flex-version\n if row-reverse == direction || column-reverse == direction\n vendor('box-direction', reverse, ignore: ms official)\n\n if row == direction || row-reverse == direction\n vendor('box-orient', horizontal, ignore: ms official)\n else if column == direction || column-reverse == direction\n vendor('box-orient', vertical, ignore: ms official)\n\n-flex-obsolete-wrap(value)\n if box in flex-version\n // WARN: wrap-reverse does not have a box equivalent. This will render in different manners\n // on box vs. flex values.\n if 'wrap' == value || wrap-reverse == value\n vendor('box-lines', multiple, ignore: ms official)\n else if nowrap == value\n vendor('box-lines', single, ignore: ms official)\n\nflex-direction(direction)\n // obsolete\n -flex-obsolete-direction(direction)\n\n // new\n if flex in flex-version\n vendor('flex-direction', arguments, only: webkit ms official)\n\nflex-wrap(value)\n // obsolete\n -flex-obsolete-wrap(value)\n\n if flex in flex-version\n vendor('flex-wrap', arguments, only: webkit ms official)\n\nflex-flow()\n // obsolete\n -flex-obsolete-direction(arguments[0])\n -flex-obsolete-direction(arguments[1])\n -flex-obsolete-wrap(arguments[0])\n -flex-obsolete-wrap(arguments[1])\n\n // new\n if flex in flex-version\n vendor('flex-flow', arguments, only: webkit ms official)\n\n\norder()\n // obsolete\n if box in flex-version\n vendor('box-ordinal-group', arguments, ignore: ms official)\n\n // new\n if flex in flex-version\n vendor('flex-order', arguments, only: ms)\n vendor('order', arguments, only: webkit official)\n\n\n//\n// 7. Flexibility\n// - http://www.w3.org/TR/css3-flexbox/#flexibility\n//\nflex-grow(growth)\n // obsolete\n if box in flex-version\n vendor('box-flex', growth)\n\n // new\n if flex in flex-version\n vendor('flex-grow', arguments, only: webkit official)\n\nflex-basis()\n if flex in flex-version\n vendor('flex-basis', arguments, only: webkit official)\n\nflex-shrink()\n if flex in flex-version\n vendor('flex-shrink', arguments, only: webkit official)\n\nflex(growth)\n\n // obsolete\n if box in flex-version\n shrink = 1\n\n if none == growth || initial == growth\n // Well known values\n shrink = 0 if none == growth\n growth = 0\n else if is-width(growth) == true\n // Basis is defined as the first parameter\n growth = arguments[1] || 0\n shrink = arguments[2] if 3 <= length(arguments)\n else if arguments[1] && is-width(arguments[1]) == false\n // Growth is first and shrink is second\n shrink = arguments[1]\n\n // Since we can't make the distinction between growing and shrinking in the box model, take\n // the one that provides the most flexibility.\n vendor('box-flex', max(growth, shrink), ignore: ms)\n\n // new\n if flex in flex-version\n vendor('flex', arguments, only: webkit ms official)\n\n\n// converts the justification alignment\n-convert-justify(align)\n if flex-start == align\n return start\n else if flex-end == align\n return end\n else if space-around == align\n return distribute\n else if space-between == align\n return justify\n else\n return align\n\n//\n// 8. Alignment\n// - http://www.w3.org/TR/css3-flexbox/#alignment\n//\njustify-content(align)\n // obsolete\n if box in flex-version\n vendor('box-pack', -convert-justify(align), ignore: ms official)\n\n // new\n if flex in flex-version\n vendor('flex-pack', -convert-justify(align), only: ms)\n vendor('justify-content', align, only: webkit official)\n\nalign-content(align)\n // WARN: Obsolete spec does not allow for adjustment here\n if flex in flex-version\n vendor('flex-line-pack', -convert-justify(align), only: ms)\n vendor('align-content', align, only: webkit official)\n\n// converts alignment from 'flex' to normal value\n-convert-alignment(align)\n if flex-start == align\n return start\n else if flex-end == align\n return end\n else\n return align\n\nalign-items(align)\n // obsolete\n if box in flex-version\n vendor('box-align', -convert-alignment(align), ignore: ms official)\n\n // new\n if flex in flex-version\n vendor('flex-align', -convert-alignment(align), only: ms)\n vendor('align-items', arguments, only: webkit official)\n\nalign-self(align)\n // WARN: Obsolete spec does not allow for overriding alignment on individual items.\n if flex in flex-version\n vendor('align-self', align, only: webkit official)\n vendor('flex-item-align', -convert-alignment(align), only: ms)\n","/*\n * border: <color>\n * border: ...\n */\n\nborder(color, args...)\n if color is a 'color'\n border: 1px solid color args\n else\n border: arguments\n"],sourceRoot:""}]),e.Z=a},7747:function(t,e,n){"use strict";var i=n(559),r=n.n(i),o=n(3476),a=n.n(o)()(r());a.push([t.id,".color-legend-container{display:none;padding:10px;border:1.5px solid #000;border-radius:3px;transition:250ms background linear;background-color:rgba(255,255,255,0.75)}.color-legend-container:hover{background-color:#fff}.color-legend-container .geojs-color-legends .geojs-color-legend{margin-bottom:10px}.color-legend-container .geojs-color-legends .geojs-color-legend .geojs-title{text-align:center}.color-legend-container .geojs-color-legends .geojs-color-legend svg.svg{display:block}.color-legend-container .geojs-color-legends .geojs-color-legend svg.svg .axis.x path.domain,.color-legend-container .geojs-color-legends .geojs-color-legend svg.svg .axis.x line{fill:none;stroke:#000;stroke-width:.7}.color-legend-container .geojs-color-legends .geojs-color-legend svg.svg .axis.x text{font-size:12px}.color-legend-container .color-legend-popup{position:absolute;background:#fff;height:22px;font-size:14px;border:solid 1px #000;padding:0 5px;pointer-events:none;white-space:nowrap;z-index:100000;opacity:0}","",{version:3,sources:["webpack://./ui/colorLegendWidget.styl"],names:[],mappings:"AAAA,wBACE,YAAQ,CACR,YAAQ,CACR,uBAAO,CACP,iBAAc,CACd,kCAAW,CACX,uCAAiB,CAEjB,8BACE,qBAAiB,CAIjB,iEACE,kBAAc,CAEd,8EACE,iBAAW,CAEb,yEACE,aAAQ,CAGN,mLACE,SAAK,CACL,WAAO,CACP,eAAa,CACf,sFACE,cAAU,CAEpB,4CACE,iBAAS,CACT,eAAW,CACX,WAAO,CACP,cAAU,CACV,qBAAO,CACP,aAAQ,CACR,mBAAe,CACf,kBAAY,CACZ,cAAQ,CACR,SAAQ",sourcesContent:[".color-legend-container\n display none\n padding 10px\n border 1.5px solid black\n border-radius 3px\n transition 250ms background linear\n background-color rgba(255, 255, 255, 0.75)\n\n &:hover\n background-color rgba(255, 255, 255, 1)\n\n .geojs-color-legends\n\n .geojs-color-legend\n margin-bottom 10px\n\n .geojs-title\n text-align center\n\n svg.svg\n display block\n\n .axis.x\n path.domain, line\n fill none\n stroke black\n stroke-width 0.7\n text\n font-size 12px\n\n .color-legend-popup\n position absolute\n background white\n height 22px\n font-size 14px\n border solid 1px black\n padding 0 5px\n pointer-events none\n white-space nowrap\n z-index 100000\n opacity 0\n"],sourceRoot:""}]),e.Z=a},1680:function(t,e,n){"use strict";var i=n(559),r=n.n(i),o=n(3476),a=n.n(o)()(r());a.push([t.id,".geojs-scale-widget-bar{stroke:#000}.geojs-scale-widget-text{font-weight:bold;font-size:16px;font-family:serif}","",{version:3,sources:["webpack://./ui/scaleWidget.styl"],names:[],mappings:"AAAA,wBACE,WAAO,CACT,yBACE,gBAAY,CACZ,cAAU,CACV,iBAAY",sourcesContent:[".geojs-scale-widget-bar\n stroke black\n.geojs-scale-widget-text\n font-weight bold\n font-size 16px\n font-family serif\n"],sourceRoot:""}]),e.Z=a},3476:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,r,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(i)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var u=0;u<t.length;u++){var c=[].concat(t[u]);i&&a[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),r&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=r):c[4]="".concat(r)),e.push(c))}},e}},559:function(t){"use strict";t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),o="/*# ".concat(r," */"),a=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[e].concat(a).concat([o]).join("\n")}return[e].join("\n")}},1106:function(t){"use strict";function e(t,e,o){o=o||2;var a,s,l,d,h,p,m,g=e&&e.length,v=g?e[0]*o:t.length,y=n(t,0,v,o,!0),x=[];if(!y||y.next===y.prev)return x;if(g&&(y=function(t,e,r,o){var a,s,l,d=[];for(a=0,s=e.length;a<s;a++)(l=n(t,e[a]*o,a<s-1?e[a+1]*o:t.length,o,!1))===l.next&&(l.steiner=!0),d.push(f(l));for(d.sort(u),a=0;a<d.length;a++)r=i(r=c(d[a],r),r.next);return r}(t,e,y,o)),t.length>80*o){a=l=t[0],s=d=t[1];for(var b=o;b<v;b+=o)(h=t[b])<a&&(a=h),(p=t[b+1])<s&&(s=p),h>l&&(l=h),p>d&&(d=p);m=0!==(m=Math.max(l-a,d-s))?1/m:0}return r(y,x,o,a,s,m),x}function n(t,e,n,i,r){var o,a;if(r===C(t,e,n,i)>0)for(o=e;o<n;o+=i)a=M(o,t[o],t[o+1],a);else for(o=n-i;o>=e;o-=i)a=M(o,t[o],t[o+1],a);return a&&v(a,a.next)&&(A(a),a=a.next),a}function i(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!v(i,i.next)&&0!==g(i.prev,i,i.next))i=i.next;else{if(A(i),(i=e=i.prev)===i.next)break;n=!0}}while(n||i!==e);return e}function r(t,e,n,u,c,d,f){if(t){!f&&d&&function(t,e,n,i){var r=t;do{null===r.z&&(r.z=h(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,n,i,r,o,a,s,l,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,i=n,s=0,e=0;e<u&&(s++,i=i.nextZ);e++);for(l=u;s>0||l>0&&i;)0!==s&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,s--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,u*=2}while(a>1)}(r)}(t,u,c,d);for(var p,m,g=t;t.prev!==t.next;)if(p=t.prev,m=t.next,d?a(t,u,c,d):o(t))e.push(p.i/n),e.push(t.i/n),e.push(m.i/n),A(t),t=m.next,g=m.next;else if((t=m)===g){f?1===f?r(t=s(i(t),e,n),e,n,u,c,d,2):2===f&&l(t,e,n,u,c,d):r(i(t),e,n,u,c,d,1);break}}}function o(t){var e=t.prev,n=t,i=t.next;if(g(e,n,i)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(p(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&g(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function a(t,e,n,i){var r=t.prev,o=t,a=t.next;if(g(r,o,a)>=0)return!1;for(var s=r.x<o.x?r.x<a.x?r.x:a.x:o.x<a.x?o.x:a.x,l=r.y<o.y?r.y<a.y?r.y:a.y:o.y<a.y?o.y:a.y,u=r.x>o.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,c=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,d=h(s,l,e,n,i),f=h(u,c,e,n,i),m=t.prevZ,v=t.nextZ;m&&m.z>=d&&v&&v.z<=f;){if(m!==t.prev&&m!==t.next&&p(r.x,r.y,o.x,o.y,a.x,a.y,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;if(m=m.prevZ,v!==t.prev&&v!==t.next&&p(r.x,r.y,o.x,o.y,a.x,a.y,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;m&&m.z>=d;){if(m!==t.prev&&m!==t.next&&p(r.x,r.y,o.x,o.y,a.x,a.y,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.prevZ}for(;v&&v.z<=f;){if(v!==t.prev&&v!==t.next&&p(r.x,r.y,o.x,o.y,a.x,a.y,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function s(t,e,n){var r=t;do{var o=r.prev,a=r.next.next;!v(o,a)&&y(o,r,r.next,a)&&_(o,a)&&_(a,o)&&(e.push(o.i/n),e.push(r.i/n),e.push(a.i/n),A(r),A(r.next),r=t=a),r=r.next}while(r!==t);return i(r)}function l(t,e,n,o,a,s){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&m(l,u)){var c=w(l,u);return l=i(l,l.next),c=i(c,c.next),r(l,e,n,o,a,s),void r(c,e,n,o,a,s)}u=u.next}l=l.next}while(l!==t)}function u(t,e){return t.x-e.x}function c(t,e){var n=function(t,e){var n,i=e,r=t.x,o=t.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=r&&s>a){if(a=s,s===r){if(o===i.y)return i;if(o===i.next.y)return i.next}n=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!n)return null;if(r===a)return n;var l,u=n,c=n.x,h=n.y,f=1/0;i=n;do{r>=i.x&&i.x>=c&&r!==i.x&&p(o<h?r:a,o,c,h,o<h?a:r,o,i.x,i.y)&&(l=Math.abs(o-i.y)/(r-i.x),_(i,t)&&(l<f||l===f&&(i.x>n.x||i.x===n.x&&d(n,i)))&&(n=i,f=l)),i=i.next}while(i!==u);return n}(t,e);if(!n)return e;var r=w(n,t),o=i(n,n.next);return i(r,r.next),e===n?o:e}function d(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function h(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function f(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function p(t,e,n,i,r,o,a,s){return(r-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(i-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(r-a)*(i-s)>=0}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&y(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(_(t,e)&&_(e,t)&&function(t,e){var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||v(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function v(t,e){return t.x===e.x&&t.y===e.y}function y(t,e,n,i){var r=b(g(t,e,n)),o=b(g(t,e,i)),a=b(g(n,i,t)),s=b(g(n,i,e));return r!==o&&a!==s||(!(0!==r||!x(t,n,e))||(!(0!==o||!x(t,i,e))||(!(0!==a||!x(n,t,i))||!(0!==s||!x(n,e,i)))))}function x(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function b(t){return t>0?1:t<0?-1:0}function _(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function w(t,e){var n=new T(t.i,t.x,t.y),i=new T(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function M(t,e,n,i){var r=new T(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function A(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function T(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,n,i){for(var r=0,o=e,a=n-i;o<n;o+=i)r+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return r}t.exports=e,t.exports.default=e,e.deviation=function(t,e,n,i){var r=e&&e.length,o=r?e[0]*n:t.length,a=Math.abs(C(t,0,o,n));if(r)for(var s=0,l=e.length;s<l;s++){var u=e[s]*n,c=s<l-1?e[s+1]*n:t.length;a-=Math.abs(C(t,u,c,n))}var d=0;for(s=0;s<i.length;s+=3){var h=i[s]*n,f=i[s+1]*n,p=i[s+2]*n;d+=Math.abs((t[h]-t[p])*(t[f+1]-t[h+1])-(t[h]-t[f])*(t[p+1]-t[h+1]))}return 0===a&&0===d?0:Math.abs((d-a)/a)},e.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},i=0,r=0;r<t.length;r++){for(var o=0;o<t[r].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[r][o][a]);r>0&&(i+=t[r-1].length,n.holes.push(i))}return n}},320:function(t,e,n){var i=n(6502);n(40).vgl=i,t.exports=i},40:function(t,e,n){"use strict";t.exports=function(){if("object"==typeof globalThis)return globalThis;var t;try{t=this||new Function("return this")()}catch(t){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==n.g)return n.g}return t}()},8543:function(t){t.exports=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8];return t[0]=a*c-s*u,t[1]=r*u-i*c,t[2]=i*s-r*a,t[3]=s*l-o*c,t[4]=n*c-r*l,t[5]=r*o-n*s,t[6]=o*u-a*l,t[7]=i*l-n*u,t[8]=n*a-i*o,t}},4995:function(t){t.exports=function(t){var e=new Float32Array(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}},7186:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}},1871:function(t){t.exports=function(){var t=new Float32Array(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}},3854:function(t){t.exports=function(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],l=t[7],u=t[8];return e*(u*o-a*l)+n*(a*s-u*r)+i*(l*r-o*s)}},9263:function(t){t.exports=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]+t[3]*t[3]+t[4]*t[4]+t[5]*t[5]+t[6]*t[6]+t[7]*t[7]+t[8]*t[8])}},6503:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t}},3229:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}},4523:function(t){t.exports=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n+n,s=i+i,l=r+r,u=n*a,c=i*a,d=i*s,h=r*a,f=r*s,p=r*l,m=o*a,g=o*s,v=o*l;return t[0]=1-d-p,t[3]=c-v,t[6]=h+g,t[1]=c+v,t[4]=1-u-p,t[7]=f-m,t[2]=h-g,t[5]=f+m,t[8]=1-u-d,t}},6511:function(t){t.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}},8054:function(t,e,n){t.exports={adjoint:n(8543),clone:n(4995),copy:n(7186),create:n(1871),determinant:n(3854),frob:n(9263),fromMat2:n(6503),fromMat4:n(3229),fromQuat:n(4523),identity:n(6511),invert:n(8104),multiply:n(9063),normalFromMat4:n(3100),rotate:n(5637),scale:n(9281),str:n(6224),translate:n(1078),transpose:n(4879)}},8104:function(t){t.exports=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],d=c*a-s*u,h=-c*o+s*l,f=u*o-a*l,p=n*d+i*h+r*f;return p?(p=1/p,t[0]=d*p,t[1]=(-c*i+r*u)*p,t[2]=(s*i-r*a)*p,t[3]=h*p,t[4]=(c*n-r*l)*p,t[5]=(-s*n+r*o)*p,t[6]=f*p,t[7]=(-u*n+i*l)*p,t[8]=(a*n-i*o)*p,t):null}},9063:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],d=e[8],h=n[0],f=n[1],p=n[2],m=n[3],g=n[4],v=n[5],y=n[6],x=n[7],b=n[8];return t[0]=h*i+f*a+p*u,t[1]=h*r+f*s+p*c,t[2]=h*o+f*l+p*d,t[3]=m*i+g*a+v*u,t[4]=m*r+g*s+v*c,t[5]=m*o+g*l+v*d,t[6]=y*i+x*a+b*u,t[7]=y*r+x*s+b*c,t[8]=y*o+x*l+b*d,t}},3100:function(t){t.exports=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],d=e[9],h=e[10],f=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=n*s-i*a,x=n*l-r*a,b=n*u-o*a,_=i*l-r*s,w=i*u-o*s,M=r*u-o*l,A=c*m-d*p,T=c*g-h*p,C=c*v-f*p,E=d*g-h*m,S=d*v-f*m,k=h*v-f*g,P=y*k-x*S+b*E+_*C-w*T+M*A;return P?(P=1/P,t[0]=(s*k-l*S+u*E)*P,t[1]=(l*C-a*k-u*T)*P,t[2]=(a*S-s*C+u*A)*P,t[3]=(r*S-i*k-o*E)*P,t[4]=(n*k-r*C+o*T)*P,t[5]=(i*C-n*S-o*A)*P,t[6]=(m*M-g*w+v*_)*P,t[7]=(g*b-p*M-v*x)*P,t[8]=(p*w-m*b+v*y)*P,t):null}},5637:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],d=e[8],h=Math.sin(n),f=Math.cos(n);return t[0]=f*i+h*a,t[1]=f*r+h*s,t[2]=f*o+h*l,t[3]=f*a-h*i,t[4]=f*s-h*r,t[5]=f*l-h*o,t[6]=u,t[7]=c,t[8]=d,t}},9281:function(t){t.exports=function(t,e,n){var i=n[0],r=n[1];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}},6224:function(t){t.exports=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}},1078:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],d=e[8],h=n[0],f=n[1];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=h*i+f*a+u,t[7]=h*r+f*s+c,t[8]=h*o+f*l+d,t}},4879:function(t){t.exports=function(t,e){if(t===e){var n=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}},316:function(t){t.exports=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],d=e[9],h=e[10],f=e[11],p=e[12],m=e[13],g=e[14],v=e[15];return t[0]=s*(h*v-f*g)-d*(l*v-u*g)+m*(l*f-u*h),t[1]=-(i*(h*v-f*g)-d*(r*v-o*g)+m*(r*f-o*h)),t[2]=i*(l*v-u*g)-s*(r*v-o*g)+m*(r*u-o*l),t[3]=-(i*(l*f-u*h)-s*(r*f-o*h)+d*(r*u-o*l)),t[4]=-(a*(h*v-f*g)-c*(l*v-u*g)+p*(l*f-u*h)),t[5]=n*(h*v-f*g)-c*(r*v-o*g)+p*(r*f-o*h),t[6]=-(n*(l*v-u*g)-a*(r*v-o*g)+p*(r*u-o*l)),t[7]=n*(l*f-u*h)-a*(r*f-o*h)+c*(r*u-o*l),t[8]=a*(d*v-f*m)-c*(s*v-u*m)+p*(s*f-u*d),t[9]=-(n*(d*v-f*m)-c*(i*v-o*m)+p*(i*f-o*d)),t[10]=n*(s*v-u*m)-a*(i*v-o*m)+p*(i*u-o*s),t[11]=-(n*(s*f-u*d)-a*(i*f-o*d)+c*(i*u-o*s)),t[12]=-(a*(d*g-h*m)-c*(s*g-l*m)+p*(s*h-l*d)),t[13]=n*(d*g-h*m)-c*(i*g-r*m)+p*(i*h-r*d),t[14]=-(n*(s*g-l*m)-a*(i*g-r*m)+p*(i*l-r*s)),t[15]=n*(s*h-l*d)-a*(i*h-r*d)+c*(i*l-r*s),t}},6232:function(t){t.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},4408:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},703:function(t){t.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},3845:function(t){t.exports=function(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],d=t[10],h=t[11],f=t[12],p=t[13],m=t[14],g=t[15];return(e*a-n*o)*(d*g-h*m)-(e*s-i*o)*(c*g-h*p)+(e*l-r*o)*(c*m-d*p)+(n*s-i*a)*(u*g-h*f)-(n*l-r*a)*(u*m-d*f)+(i*l-r*s)*(u*p-c*f)}},9259:function(t){t.exports=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n+n,s=i+i,l=r+r,u=n*a,c=i*a,d=i*s,h=r*a,f=r*s,p=r*l,m=o*a,g=o*s,v=o*l;return t[0]=1-d-p,t[1]=c+v,t[2]=h-g,t[3]=0,t[4]=c-v,t[5]=1-u-p,t[6]=f+m,t[7]=0,t[8]=h+g,t[9]=f-m,t[10]=1-u-d,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8625:function(t){t.exports=function(t,e,n){var i,r,o,a=n[0],s=n[1],l=n[2],u=Math.sqrt(a*a+s*s+l*l);if(Math.abs(u)<1e-6)return null;return a*=u=1/u,s*=u,l*=u,i=Math.sin(e),r=Math.cos(e),o=1-r,t[0]=a*a*o+r,t[1]=s*a*o+l*i,t[2]=l*a*o-s*i,t[3]=0,t[4]=a*s*o-l*i,t[5]=s*s*o+r,t[6]=l*s*o+a*i,t[7]=0,t[8]=a*l*o+s*i,t[9]=s*l*o-a*i,t[10]=l*l*o+r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8844:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=i+i,l=r+r,u=o+o,c=i*s,d=i*l,h=i*u,f=r*l,p=r*u,m=o*u,g=a*s,v=a*l,y=a*u;return t[0]=1-(f+m),t[1]=d+y,t[2]=h-v,t[3]=0,t[4]=d-y,t[5]=1-(c+m),t[6]=p+g,t[7]=0,t[8]=h+v,t[9]=p-g,t[10]=1-(c+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}},3107:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},6645:function(t){t.exports=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}},1:function(t){t.exports=function(t,e){var n=Math.sin(e),i=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=i,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8503:function(t){t.exports=function(t,e){var n=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8990:function(t){t.exports=function(t,e){var n=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=i,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},6901:function(t){t.exports=function(t,e,n,i,r,o,a){var s=1/(n-e),l=1/(r-i),u=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(r+i)*l,t[10]=(a+o)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*u,t[15]=0,t}},1156:function(t){t.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},5240:function(t,e,n){t.exports={create:n(703),clone:n(6232),copy:n(4408),identity:n(1156),transpose:n(3039),invert:n(9573),adjoint:n(316),determinant:n(3845),multiply:n(6498),translate:n(164),scale:n(1119),rotate:n(4175),rotateX:n(3116),rotateY:n(6428),rotateZ:n(9041),fromRotation:n(8625),fromRotationTranslation:n(8844),fromScaling:n(3107),fromTranslation:n(6645),fromXRotation:n(1),fromYRotation:n(8503),fromZRotation:n(8990),fromQuat:n(9259),frustum:n(6901),perspective:n(2343),perspectiveFromFieldOfView:n(7863),ortho:n(753),lookAt:n(398),str:n(6758)}},9573:function(t){t.exports=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],d=e[9],h=e[10],f=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=n*s-i*a,x=n*l-r*a,b=n*u-o*a,_=i*l-r*s,w=i*u-o*s,M=r*u-o*l,A=c*m-d*p,T=c*g-h*p,C=c*v-f*p,E=d*g-h*m,S=d*v-f*m,k=h*v-f*g,P=y*k-x*S+b*E+_*C-w*T+M*A;if(!P)return null;return P=1/P,t[0]=(s*k-l*S+u*E)*P,t[1]=(r*S-i*k-o*E)*P,t[2]=(m*M-g*w+v*_)*P,t[3]=(h*w-d*M-f*_)*P,t[4]=(l*C-a*k-u*T)*P,t[5]=(n*k-r*C+o*T)*P,t[6]=(g*b-p*M-v*x)*P,t[7]=(c*M-h*b+f*x)*P,t[8]=(a*S-s*C+u*A)*P,t[9]=(i*C-n*S-o*A)*P,t[10]=(p*w-m*b+v*y)*P,t[11]=(d*b-c*w-f*y)*P,t[12]=(s*T-a*E-l*A)*P,t[13]=(n*E-i*T+r*A)*P,t[14]=(m*x-p*_-g*y)*P,t[15]=(c*_-d*x+h*y)*P,t}},398:function(t,e,n){var i=n(1156);t.exports=function(t,e,n,r){var o,a,s,l,u,c,d,h,f,p,m=e[0],g=e[1],v=e[2],y=r[0],x=r[1],b=r[2],_=n[0],w=n[1],M=n[2];if(Math.abs(m-_)<1e-6&&Math.abs(g-w)<1e-6&&Math.abs(v-M)<1e-6)return i(t);d=m-_,h=g-w,f=v-M,p=1/Math.sqrt(d*d+h*h+f*f),o=x*(f*=p)-b*(h*=p),a=b*(d*=p)-y*f,s=y*h-x*d,(p=Math.sqrt(o*o+a*a+s*s))?(o*=p=1/p,a*=p,s*=p):(o=0,a=0,s=0);l=h*s-f*a,u=f*o-d*s,c=d*a-h*o,(p=Math.sqrt(l*l+u*u+c*c))?(l*=p=1/p,u*=p,c*=p):(l=0,u=0,c=0);return t[0]=o,t[1]=l,t[2]=d,t[3]=0,t[4]=a,t[5]=u,t[6]=h,t[7]=0,t[8]=s,t[9]=c,t[10]=f,t[11]=0,t[12]=-(o*m+a*g+s*v),t[13]=-(l*m+u*g+c*v),t[14]=-(d*m+h*g+f*v),t[15]=1,t}},6498:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],d=e[8],h=e[9],f=e[10],p=e[11],m=e[12],g=e[13],v=e[14],y=e[15],x=n[0],b=n[1],_=n[2],w=n[3];return t[0]=x*i+b*s+_*d+w*m,t[1]=x*r+b*l+_*h+w*g,t[2]=x*o+b*u+_*f+w*v,t[3]=x*a+b*c+_*p+w*y,x=n[4],b=n[5],_=n[6],w=n[7],t[4]=x*i+b*s+_*d+w*m,t[5]=x*r+b*l+_*h+w*g,t[6]=x*o+b*u+_*f+w*v,t[7]=x*a+b*c+_*p+w*y,x=n[8],b=n[9],_=n[10],w=n[11],t[8]=x*i+b*s+_*d+w*m,t[9]=x*r+b*l+_*h+w*g,t[10]=x*o+b*u+_*f+w*v,t[11]=x*a+b*c+_*p+w*y,x=n[12],b=n[13],_=n[14],w=n[15],t[12]=x*i+b*s+_*d+w*m,t[13]=x*r+b*l+_*h+w*g,t[14]=x*o+b*u+_*f+w*v,t[15]=x*a+b*c+_*p+w*y,t}},753:function(t){t.exports=function(t,e,n,i,r,o,a){var s=1/(e-n),l=1/(i-r),u=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+n)*s,t[13]=(r+i)*l,t[14]=(a+o)*u,t[15]=1,t}},2343:function(t){t.exports=function(t,e,n,i,r){var o=1/Math.tan(e/2),a=1/(i-r);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(r+i)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*r*i*a,t[15]=0,t}},7863:function(t){t.exports=function(t,e,n,i){var r=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(a+s),u=2/(r+o);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-(a-s)*l*.5,t[9]=(r-o)*u*.5,t[10]=i/(n-i),t[11]=-1,t[12]=0,t[13]=0,t[14]=i*n/(n-i),t[15]=0,t}},4175:function(t){t.exports=function(t,e,n,i){var r,o,a,s,l,u,c,d,h,f,p,m,g,v,y,x,b,_,w,M,A,T,C,E,S=i[0],k=i[1],P=i[2],O=Math.sqrt(S*S+k*k+P*P);if(Math.abs(O)<1e-6)return null;S*=O=1/O,k*=O,P*=O,r=Math.sin(n),o=Math.cos(n),a=1-o,s=e[0],l=e[1],u=e[2],c=e[3],d=e[4],h=e[5],f=e[6],p=e[7],m=e[8],g=e[9],v=e[10],y=e[11],x=S*S*a+o,b=k*S*a+P*r,_=P*S*a-k*r,w=S*k*a-P*r,M=k*k*a+o,A=P*k*a+S*r,T=S*P*a+k*r,C=k*P*a-S*r,E=P*P*a+o,t[0]=s*x+d*b+m*_,t[1]=l*x+h*b+g*_,t[2]=u*x+f*b+v*_,t[3]=c*x+p*b+y*_,t[4]=s*w+d*M+m*A,t[5]=l*w+h*M+g*A,t[6]=u*w+f*M+v*A,t[7]=c*w+p*M+y*A,t[8]=s*T+d*C+m*E,t[9]=l*T+h*C+g*E,t[10]=u*T+f*C+v*E,t[11]=c*T+p*C+y*E,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t}},3116:function(t){t.exports=function(t,e,n){var i=Math.sin(n),r=Math.cos(n),o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],d=e[10],h=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[4]=o*r+u*i,t[5]=a*r+c*i,t[6]=s*r+d*i,t[7]=l*r+h*i,t[8]=u*r-o*i,t[9]=c*r-a*i,t[10]=d*r-s*i,t[11]=h*r-l*i,t}},6428:function(t){t.exports=function(t,e,n){var i=Math.sin(n),r=Math.cos(n),o=e[0],a=e[1],s=e[2],l=e[3],u=e[8],c=e[9],d=e[10],h=e[11];e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=o*r-u*i,t[1]=a*r-c*i,t[2]=s*r-d*i,t[3]=l*r-h*i,t[8]=o*i+u*r,t[9]=a*i+c*r,t[10]=s*i+d*r,t[11]=l*i+h*r,t}},9041:function(t){t.exports=function(t,e,n){var i=Math.sin(n),r=Math.cos(n),o=e[0],a=e[1],s=e[2],l=e[3],u=e[4],c=e[5],d=e[6],h=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=o*r+u*i,t[1]=a*r+c*i,t[2]=s*r+d*i,t[3]=l*r+h*i,t[4]=u*r-o*i,t[5]=c*r-a*i,t[6]=d*r-s*i,t[7]=h*r-l*i,t}},1119:function(t){t.exports=function(t,e,n){var i=n[0],r=n[1],o=n[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},6758:function(t){t.exports=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}},164:function(t){t.exports=function(t,e,n){var i,r,o,a,s,l,u,c,d,h,f,p,m=n[0],g=n[1],v=n[2];e===t?(t[12]=e[0]*m+e[4]*g+e[8]*v+e[12],t[13]=e[1]*m+e[5]*g+e[9]*v+e[13],t[14]=e[2]*m+e[6]*g+e[10]*v+e[14],t[15]=e[3]*m+e[7]*g+e[11]*v+e[15]):(i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],d=e[8],h=e[9],f=e[10],p=e[11],t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=d,t[9]=h,t[10]=f,t[11]=p,t[12]=i*m+s*g+d*v+e[12],t[13]=r*m+l*g+h*v+e[13],t[14]=o*m+u*g+f*v+e[14],t[15]=a*m+c*g+p*v+e[15]);return t}},3039:function(t){t.exports=function(t,e){if(t===e){var n=e[1],i=e[2],r=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=o,t[11]=e[14],t[12]=r,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},7207:function(t){t.exports=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}},3959:function(t,e,n){t.exports=function(t,e){var n=i(t[0],t[1],t[2]),a=i(e[0],e[1],e[2]);r(n,n),r(a,a);var s=o(n,a);return s>1?0:Math.acos(s)};var i=n(6534),r=n(2397),o=n(966)},9638:function(t){t.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},859:function(t){t.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},1404:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},2002:function(t){t.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},9528:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2];return t[0]=r*l-o*s,t[1]=o*a-i*l,t[2]=i*s-r*a,t}},6005:function(t,e,n){t.exports=n(6911)},6911:function(t){t.exports=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(n*n+i*i+r*r)}},133:function(t,e,n){t.exports=n(3274)},3274:function(t){t.exports=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}},966:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},2342:function(t){t.exports=1e-6},9883:function(t,e,n){t.exports=function(t,e){var n=t[0],r=t[1],o=t[2],a=e[0],s=e[1],l=e[2];return Math.abs(n-a)<=i*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=i*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(o-l)<=i*Math.max(1,Math.abs(o),Math.abs(l))};var i=n(2342)},8259:function(t){t.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},7291:function(t){t.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},7043:function(t,e,n){t.exports=function(t,e,n,r,o,a){var s,l;e||(e=3);n||(n=0);l=r?Math.min(r*e+n,t.length):t.length;for(s=n;s<l;s+=e)i[0]=t[s],i[1]=t[s+1],i[2]=t[s+2],o(i,i,a),t[s]=i[0],t[s+1]=i[1],t[s+2]=i[2];return t};var i=n(2002)()},6534:function(t){t.exports=function(t,e,n){var i=new Float32Array(3);return i[0]=t,i[1]=e,i[2]=n,i}},5365:function(t,e,n){t.exports={EPSILON:n(2342),create:n(2002),clone:n(859),angle:n(3959),fromValues:n(6534),copy:n(1404),set:n(6952),equals:n(9883),exactEquals:n(8259),add:n(7207),subtract:n(7916),sub:n(3379),multiply:n(6381),mul:n(792),divide:n(3274),div:n(133),min:n(7324),max:n(7254),floor:n(7291),ceil:n(9638),round:n(5084),scale:n(498),scaleAndAdd:n(6993),distance:n(6911),dist:n(6005),squaredDistance:n(3440),sqrDist:n(9867),length:n(172),len:n(5446),squaredLength:n(5228),sqrLen:n(609),negate:n(9500),inverse:n(8958),normalize:n(2397),dot:n(966),cross:n(9528),lerp:n(6373),random:n(2283),transformMat4:n(2964),transformMat3:n(932),transformQuat:n(4516),rotateX:n(4871),rotateY:n(7927),rotateZ:n(2998),forEach:n(7043)}},8958:function(t){t.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}},5446:function(t,e,n){t.exports=n(172)},172:function(t){t.exports=function(t){var e=t[0],n=t[1],i=t[2];return Math.sqrt(e*e+n*n+i*i)}},6373:function(t){t.exports=function(t,e,n,i){var r=e[0],o=e[1],a=e[2];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t}},7254:function(t){t.exports=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}},7324:function(t){t.exports=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}},792:function(t,e,n){t.exports=n(6381)},6381:function(t){t.exports=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}},9500:function(t){t.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}},2397:function(t){t.exports=function(t,e){var n=e[0],i=e[1],r=e[2],o=n*n+i*i+r*r;o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o);return t}},2283:function(t){t.exports=function(t,e){e=e||1;var n=2*Math.random()*Math.PI,i=2*Math.random()-1,r=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(n)*r,t[1]=Math.sin(n)*r,t[2]=i*e,t}},4871:function(t){t.exports=function(t,e,n,i){var r=n[1],o=n[2],a=e[1]-r,s=e[2]-o,l=Math.sin(i),u=Math.cos(i);return t[0]=e[0],t[1]=r+a*u-s*l,t[2]=o+a*l+s*u,t}},7927:function(t){t.exports=function(t,e,n,i){var r=n[0],o=n[2],a=e[0]-r,s=e[2]-o,l=Math.sin(i),u=Math.cos(i);return t[0]=r+s*l+a*u,t[1]=e[1],t[2]=o+s*u-a*l,t}},2998:function(t){t.exports=function(t,e,n,i){var r=n[0],o=n[1],a=e[0]-r,s=e[1]-o,l=Math.sin(i),u=Math.cos(i);return t[0]=r+a*u-s*l,t[1]=o+a*l+s*u,t[2]=e[2],t}},5084:function(t){t.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},498:function(t){t.exports=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}},6993:function(t){t.exports=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t}},6952:function(t){t.exports=function(t,e,n,i){return t[0]=e,t[1]=n,t[2]=i,t}},9867:function(t,e,n){t.exports=n(3440)},609:function(t,e,n){t.exports=n(5228)},3440:function(t){t.exports=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return n*n+i*i+r*r}},5228:function(t){t.exports=function(t){var e=t[0],n=t[1],i=t[2];return e*e+n*n+i*i}},3379:function(t,e,n){t.exports=n(7916)},7916:function(t){t.exports=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}},932:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t}},2964:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[3]*i+n[7]*r+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/a,t[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/a,t[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/a,t}},4516:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2],u=n[3],c=u*i+s*o-l*r,d=u*r+l*i-a*o,h=u*o+a*r-s*i,f=-a*i-s*r-l*o;return t[0]=c*u+f*-a+d*-l-h*-s,t[1]=d*u+f*-s+h*-a-c*-l,t[2]=h*u+f*-l+c*-s-d*-a,t}},5492:function(t){t.exports=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}},5967:function(t){t.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},4729:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},8922:function(t){t.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},3256:function(t){t.exports=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(n*n+i*i+r*r+o*o)}},409:function(t){t.exports=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}},3643:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},5166:function(t){t.exports=function(t,e,n,i){var r=new Float32Array(4);return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r}},8608:function(t,e,n){t.exports={create:n(8922),clone:n(5967),fromValues:n(5166),copy:n(4729),set:n(256),add:n(5492),subtract:n(1250),multiply:n(4683),divide:n(409),min:n(8485),max:n(6225),scale:n(7141),scaleAndAdd:n(2100),distance:n(3256),squaredDistance:n(8726),length:n(7358),squaredLength:n(3e3),negate:n(2618),inverse:n(9556),normalize:n(959),dot:n(3643),lerp:n(117),random:n(9855),transformMat4:n(161),transformQuat:n(228)}},9556:function(t){t.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},7358:function(t){t.exports=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return Math.sqrt(e*e+n*n+i*i+r*r)}},117:function(t){t.exports=function(t,e,n,i){var r=e[0],o=e[1],a=e[2],s=e[3];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t[3]=s+i*(n[3]-s),t}},6225:function(t){t.exports=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t}},8485:function(t){t.exports=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t}},4683:function(t){t.exports=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}},2618:function(t){t.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},959:function(t){t.exports=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*n+i*i+r*r+o*o;a>0&&(a=1/Math.sqrt(a),t[0]=n*a,t[1]=i*a,t[2]=r*a,t[3]=o*a);return t}},9855:function(t,e,n){var i=n(959),r=n(7141);t.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),i(t,t),r(t,t,e),t}},7141:function(t){t.exports=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}},2100:function(t){t.exports=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t}},256:function(t){t.exports=function(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}},8726:function(t){t.exports=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2],o=e[3]-t[3];return n*n+i*i+r*r+o*o}},3e3:function(t){t.exports=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return e*e+n*n+i*i+r*r}},1250:function(t){t.exports=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}},161:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3];return t[0]=n[0]*i+n[4]*r+n[8]*o+n[12]*a,t[1]=n[1]*i+n[5]*r+n[9]*o+n[13]*a,t[2]=n[2]*i+n[6]*r+n[10]*o+n[14]*a,t[3]=n[3]*i+n[7]*r+n[11]*o+n[15]*a,t}},228:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2],u=n[3],c=u*i+s*o-l*r,d=u*r+l*i-a*o,h=u*o+a*r-s*i,f=-a*i-s*r-l*o;return t[0]=c*u+f*-a+d*-l-h*-s,t[1]=d*u+f*-s+h*-a-c*-l,t[2]=h*u+f*-l+c*-s-d*-a,t[3]=e[3],t}},6502:function(t,e,n){var i,r,o=n(5240),a=n(8608),s=n(5365),l=n(5638);r=this,void 0===(i=function(){return r.vgl=function(){if(void 0===t)var t={};t.namespace=function(e){"use strict";var n,i=e.split("."),r=t;for("ogs"===i[0]&&(i=i.slice(1)),n=0;n<i.length;n+=1)void 0===r[i[n]]&&(r[i[n]]={}),r=r[i[n]];return r};var e=t.namespace("gl");window.vgl=e,e.inherit=function(t,e){"use strict";var n=inherit.func();n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t},e.inherit.func=function(){"use strict";return function(){}},window.inherit=e.inherit,Object.size=function(t){"use strict";var e,n=0;for(e in t)t.hasOwnProperty(e)&&(n+=1);return n},Math.log2||(Math.log2=function(t){return Math.log(t)/Math.log(2)}),e.version="0.3.11",e.GL={ACTIVE_ATTRIBUTES:35721,ACTIVE_TEXTURE:34016,ACTIVE_UNIFORMS:35718,ALIASED_LINE_WIDTH_RANGE:33902,ALIASED_POINT_SIZE_RANGE:33901,ALPHA:6406,ALPHA_BITS:3413,ALWAYS:519,ARRAY_BUFFER:34962,ARRAY_BUFFER_BINDING:34964,ATTACHED_SHADERS:35717,BACK:1029,BLEND:3042,BLEND_COLOR:32773,BLEND_DST_ALPHA:32970,BLEND_DST_RGB:32968,BLEND_EQUATION:32777,BLEND_EQUATION_ALPHA:34877,BLEND_EQUATION_RGB:32777,BLEND_SRC_ALPHA:32971,BLEND_SRC_RGB:32969,BLUE_BITS:3412,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,BROWSER_DEFAULT_WEBGL:37444,BUFFER_SIZE:34660,BUFFER_USAGE:34661,BYTE:5120,CCW:2305,CLAMP_TO_EDGE:33071,COLOR_ATTACHMENT0:36064,COLOR_BUFFER_BIT:16384,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,COMPILE_STATUS:35713,COMPRESSED_TEXTURE_FORMATS:34467,CONSTANT_ALPHA:32771,CONSTANT_COLOR:32769,CONTEXT_LOST_WEBGL:37442,CULL_FACE:2884,CULL_FACE_MODE:2885,CURRENT_PROGRAM:35725,CURRENT_VERTEX_ATTRIB:34342,CW:2304,DECR:7683,DECR_WRAP:34056,DELETE_STATUS:35712,DEPTH_ATTACHMENT:36096,DEPTH_BITS:3414,DEPTH_BUFFER_BIT:256,DEPTH_CLEAR_VALUE:2931,DEPTH_COMPONENT:6402,DEPTH_COMPONENT16:33189,DEPTH_FUNC:2932,DEPTH_RANGE:2928,DEPTH_STENCIL:34041,DEPTH_STENCIL_ATTACHMENT:33306,DEPTH_TEST:2929,DEPTH_WRITEMASK:2930,DITHER:3024,DONT_CARE:4352,DST_ALPHA:772,DST_COLOR:774,DYNAMIC_DRAW:35048,ELEMENT_ARRAY_BUFFER:34963,ELEMENT_ARRAY_BUFFER_BINDING:34965,EQUAL:514,FASTEST:4353,FLOAT:5126,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,FRAGMENT_SHADER:35632,FRAMEBUFFER:36160,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_BINDING:36006,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_UNSUPPORTED:36061,FRONT:1028,FRONT_AND_BACK:1032,FRONT_FACE:2886,FUNC_ADD:32774,FUNC_REVERSE_SUBTRACT:32779,FUNC_SUBTRACT:32778,GENERATE_MIPMAP_HINT:33170,GEQUAL:518,GREATER:516,GREEN_BITS:3411,HIGH_FLOAT:36338,HIGH_INT:36341,INCR:7682,INCR_WRAP:34055,INT:5124,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,INVALID_ENUM:1280,INVALID_FRAMEBUFFER_OPERATION:1286,INVALID_OPERATION:1282,INVALID_VALUE:1281,INVERT:5386,KEEP:7680,LEQUAL:515,LESS:513,LINEAR:9729,LINEAR_MIPMAP_LINEAR:9987,LINEAR_MIPMAP_NEAREST:9985,LINES:1,LINE_LOOP:2,LINE_STRIP:3,LINE_WIDTH:2849,LINK_STATUS:35714,LOW_FLOAT:36336,LOW_INT:36339,LUMINANCE:6409,LUMINANCE_ALPHA:6410,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_CUBE_MAP_TEXTURE_SIZE:34076,MAX_FRAGMENT_UNIFORM_VECTORS:36349,MAX_RENDERBUFFER_SIZE:34024,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_TEXTURE_SIZE:3379,MAX_VARYING_VECTORS:36348,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VIEWPORT_DIMS:3386,MEDIUM_FLOAT:36337,MEDIUM_INT:36340,MIRRORED_REPEAT:33648,NEAREST:9728,NEAREST_MIPMAP_LINEAR:9986,NEAREST_MIPMAP_NEAREST:9984,NEVER:512,NICEST:4354,NONE:0,NOTEQUAL:517,NO_ERROR:0,ONE:1,ONE_MINUS_CONSTANT_ALPHA:32772,ONE_MINUS_CONSTANT_COLOR:32770,ONE_MINUS_DST_ALPHA:773,ONE_MINUS_DST_COLOR:775,ONE_MINUS_SRC_ALPHA:771,ONE_MINUS_SRC_COLOR:769,OUT_OF_MEMORY:1285,PACK_ALIGNMENT:3333,POINTS:0,POLYGON_OFFSET_FACTOR:32824,POLYGON_OFFSET_FILL:32823,POLYGON_OFFSET_UNITS:10752,RED_BITS:3410,RENDERBUFFER:36161,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_BINDING:36007,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_STENCIL_SIZE:36181,RENDERBUFFER_WIDTH:36162,RENDERER:7937,REPEAT:10497,REPLACE:7681,RGB:6407,RGB565:36194,RGB5_A1:32855,RGBA:6408,RGBA4:32854,SAMPLER_2D:35678,SAMPLER_CUBE:35680,SAMPLES:32937,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_BUFFERS:32936,SAMPLE_COVERAGE:32928,SAMPLE_COVERAGE_INVERT:32939,SAMPLE_COVERAGE_VALUE:32938,SCISSOR_BOX:3088,SCISSOR_TEST:3089,SHADER_TYPE:35663,SHADING_LANGUAGE_VERSION:35724,SHORT:5122,SRC_ALPHA:770,SRC_ALPHA_SATURATE:776,SRC_COLOR:768,STATIC_DRAW:35044,STENCIL_ATTACHMENT:36128,STENCIL_BACK_FAIL:34817,STENCIL_BACK_FUNC:34816,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,STENCIL_BITS:3415,STENCIL_BUFFER_BIT:1024,STENCIL_CLEAR_VALUE:2961,STENCIL_FAIL:2964,STENCIL_FUNC:2962,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_TEST:2960,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STREAM_DRAW:35040,SUBPIXEL_BITS:3408,TEXTURE:5890,TEXTURE0:33984,TEXTURE1:33985,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE2:33986,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE3:33987,TEXTURE30:34014,TEXTURE31:34015,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE_2D:3553,TEXTURE_BINDING_2D:32873,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP:34067,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TRIANGLES:4,TRIANGLE_FAN:6,TRIANGLE_STRIP:5,UNPACK_ALIGNMENT:3317,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,UNSIGNED_BYTE:5121,UNSIGNED_INT:5125,UNSIGNED_SHORT:5123,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,VALIDATE_STATUS:35715,VENDOR:7936,VERSION:7938,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_SHADER:35633,VIEWPORT:2978,ZERO:0};var n=0;e.timestamp=function(){"use strict";if(!(this instanceof e.timestamp))return new e.timestamp;var t=0;this.modified=function(){t=n+=1},this.getMTime=function(){return t}},e.object=function(){"use strict";if(!(this instanceof e.object))return new e.object;var t=e.timestamp();return t.modified(),this.modified=function(){t.modified()},this.getMTime=function(){return t.getMTime()},this},e.event=function(){"use strict";return this instanceof e.event?(e.object.call(this),this):new e.event},inherit(e.event,e.object),e.event.keyPress="vgl.event.keyPress",e.event.mousePress="vgl.event.mousePress",e.event.mouseRelease="vgl.event.mouseRelease",e.event.contextMenu="vgl.event.contextMenu",e.event.configure="vgl.event.configure",e.event.enable="vgl.event.enable",e.event.mouseWheel="vgl.event.mouseWheel",e.event.keyRelease="vgl.event.keyRelease",e.event.middleButtonPress="vgl.event.middleButtonPress",e.event.startInteraction="vgl.event.startInteraction",e.event.enter="vgl.event.enter",e.event.rightButtonPress="vgl.event.rightButtonPress",e.event.middleButtonRelease="vgl.event.middleButtonRelease",e.event.char="vgl.event.char",e.event.disable="vgl.event.disable",e.event.endInteraction="vgl.event.endInteraction",e.event.mouseMove="vgl.event.mouseMove",e.event.mouseOut="vgl.event.mouseOut",e.event.expose="vgl.event.expose",e.event.timer="vgl.event.timer",e.event.leftButtonPress="vgl.event.leftButtonPress",e.event.leave="vgl.event.leave",e.event.rightButtonRelease="vgl.event.rightButtonRelease",e.event.leftButtonRelease="vgl.event.leftButtonRelease",e.event.click="vgl.event.click",e.event.dblClick="vgl.event.dblClick",e.boundingObject=function(){"use strict";if(!(this instanceof e.boundingObject))return new e.boundingObject;e.object.call(this);var t=[0,0,0,0,0,0],n=e.timestamp(),i=e.timestamp();return n.modified(),i.modified(),this.bounds=function(){return t},this.hasValidBounds=function(t){return t[0]!==Number.MAX_VALUE&&t[1]!==-Number.MAX_VALUE&&t[2]!==Number.MAX_VALUE&&t[3]!==-Number.MAX_VALUE&&t[4]!==Number.MAX_VALUE&&t[5]!==-Number.MAX_VALUE},this.setBounds=function(e,i,r,o,a,s){if(this.hasValidBounds([e,i,r,o,a,s]))return t[0]=e,t[1]=i,t[2]=r,t[3]=o,t[4]=a,t[5]=s,this.modified(),n.modified(),!0},this.resetBounds=function(){t[0]=Number.MAX_VALUE,t[1]=-Number.MAX_VALUE,t[2]=Number.MAX_VALUE,t[3]=-Number.MAX_VALUE,t[4]=Number.MAX_VALUE,t[5]=-Number.MAX_VALUE,this.modified()},this.computeBounds=function(){},this.computeBoundsTimestamp=function(){return n},this.boundsDirtyTimestamp=function(){return i},this.resetBounds(),this},e.boundingObject.ReferenceFrame={Relative:0,Absolute:1},inherit(e.boundingObject,e.object),e.node=function(){"use strict";if(!(this instanceof e.node))return new e.node;e.boundingObject.call(this);var t=null,n=null,i=!0,r=!1;return this.accept=function(t){t.visit(this)},this.material=function(){return n},this.setMaterial=function(t){return t!==n&&(n=t,this.modified(),!0)},this.visible=function(){return i},this.setVisible=function(t){return t!==i&&(i=t,this.modified(),!0)},this.parent=function(){return t},this.setParent=function(e){return e!==t&&(null!==t&&t.removeChild(this),t=e,this.modified(),!0)},this.overlay=function(){return r},this.setOverlay=function(t){return r!==t&&(r=t,this.modified(),!0)},this.ascend=function(t){t=t},this.traverse=function(t){t=t},this.boundsModified=function(){this.boundsDirtyTimestamp().modified(),null!==t&&t.boundsModified()},this},inherit(e.node,e.boundingObject),e.groupNode=function(){"use strict";if(!(this instanceof e.groupNode))return new e.groupNode;e.node.call(this);var t=[];return this.b_setVisible=this.setVisible,this.setVisible=function(e){var n;if(!0!==this.b_setVisible(e))return!1;for(n=0;n<t.length;n+=1)t[n].setVisible(e);return!0},this.addChild=function(n){return n instanceof e.node&&-1===t.indexOf(n)&&(n.setParent(this),t.push(n),this.boundsDirtyTimestamp().modified(),!0)},this.removeChild=function(e){if(e.parent()===this){var n=t.indexOf(e);if(n>=0)return t.splice(n,1),e.setParent(null),this.boundsDirtyTimestamp().modified(),!0}},this.removeChildren=function(){for(;t.length;)this.removeChild(t[0]);this.modified()},this.children=function(){return t},this.hasChild=function(e){var n=0,i=!1;for(n=0;n<t.length;n+=1)if(t[n]===e){i=!0;break}return i},this.accept=function(t){t.visit(this)},this.traverse=function(t){switch(t.type()){case t.UpdateVisitor:this.traverseChildrenAndUpdateBounds(t);break;case t.CullVisitor:this.traverseChildren(t)}},this.traverseChildrenAndUpdateBounds=function(e){var n;if(this.parent()&&this.boundsDirtyTimestamp().getMTime()>this.computeBoundsTimestamp().getMTime()&&this.parent().boundsDirtyTimestamp().modified(),this.computeBounds(),e.mode()===e.TraverseAllChildren)for(n=0;n<t.length;n+=1)t[n].accept(e),this.updateBounds(t[n]);this.computeBoundsTimestamp().modified()},this.traverseChildren=function(e){var n;if(e.mode()===e.TraverseAllChildren)for(n=0;n<t.length;n+=1)t[n].accept(e)},this.computeBounds=function(){var e=0;if(!(this.computeBoundsTimestamp().getMTime()>this.boundsDirtyTimestamp().getMTime()))for(e=0;e<t.length;e+=1)this.updateBounds(t[e])},this.updateBounds=function(t){if(!t.overlay()){t.computeBounds();var e,n=this.bounds(),i=t.bounds(),r=0,o=0;for(e=0;e<3;e+=1)o=2*e+1,i[r=2*e]<n[r]&&(n[r]=i[r]),i[o]>n[o]&&(n[o]=i[o]);this.setBounds(n[0],n[1],n[2],n[3],n[4],n[5])}},this},inherit(e.groupNode,e.node),e.actor=function(){"use strict";if(!(this instanceof e.actor))return new e.actor;e.node.call(this);var t=this,n=o.create(),i=e.boundingObject.ReferenceFrame.Relative,r=null;return this.matrix=function(){return n},this.setMatrix=function(e){e!==n&&(n=e,t.modified())},this.referenceFrame=function(){return i},this.setReferenceFrame=function(e){return e!==i&&(i=e,t.modified(),!0)},this.mapper=function(){return r},this.setMapper=function(e){e!==r&&(r=e,t.boundsModified())},this.accept=function(t){t=t},this.ascend=function(t){t=t},this.computeLocalToWorldMatrix=function(t,e){t=t,e=e},this.computeWorldToLocalMatrix=function(t,e){t=t,e=e},this.computeBounds=function(){if(null!=r){var e,i,o,a,l=t.computeBoundsTimestamp();(t.boundsDirtyTimestamp().getMTime()>l.getMTime()||r.boundsDirtyTimestamp().getMTime()>l.getMTime())&&(r.computeBounds(),i=[(e=r.bounds())[0],e[2],e[4]],o=[e[1],e[3],e[5]],s.transformMat4(i,i,n),s.transformMat4(o,o,n),a=[i[0]>o[0]?o[0]:i[0],i[0]>o[0]?i[0]:o[0],i[1]>o[1]?o[1]:i[1],i[1]>o[1]?i[1]:o[1],i[2]>o[2]?o[2]:i[2],i[2]>o[2]?i[2]:o[2]],t.setBounds(a[0],a[1],a[2],a[3],a[4],a[5]),l.modified())}else t.resetBounds()},t},inherit(e.actor,e.node),e.freezeObject=function(t){"use strict";var e=Object.freeze?Object.freeze(t):void 0;return void 0===e?t:e},e.defaultValue=function(t,e){"use strict";return void 0!==t?t:e},e.defaultValue.EMPTY_OBJECT=e.freezeObject({}),e.graphicsObject=function(t){"use strict";if(t=t,!(this instanceof e.graphicsObject))return new e.graphicsObject;e.object.call(this);var n=this;return this._setup=function(t){return t=t,!1},this._cleanup=function(t){return t=t,!1},this.bind=function(t){return t=t,!1},this.undoBind=function(t){return t=t,!1},this.render=function(t){return t=t,!1},this.remove=function(t){n._cleanup(t)},n},inherit(e.graphicsObject,e.object),e.geojsonReader=function(){"use strict";return this instanceof e.geojsonReader?(this.readScalars=function(t,n,i,r){var o=null,a=null,s=null,l=null,u=null;"values"===this.m_scalarFormat&&4===t.length?(a=t[3],(o=n.sourceData(e.vertexAttributeKeys.Scalar))||(o=new e.sourceDataSf,this.m_scalarRange&&o.setScalarRange(this.m_scalarRange[0],this.m_scalarRange[1]),void 0!==i&&(o.data().length=i),n.addSource(o)),void 0===i?o.pushBack(a):o.insertAt(r,a)):"rgb"===this.m_scalarFormat&&6===t.length&&((o=n.sourceData(e.vertexAttributeKeys.Color))||(o=new e.sourceDataC3fv,void 0!==i&&(o.length=3*i),n.addSource(o)),s=t[3],l=t[4],u=t[5],void 0===i?o.pushBack([s,l,u]):o.insertAt(r,[s,l,u]))},this.readPoint=function(t){var n=new e.geometryData,i=new e.points,r=new e.sourceDataP3fv,o=new Uint16Array(1),a=null,s=null,l=null,u=null;for(n.addSource(r),u=0;u<1;u+=1)o[u]=u,a=t[0],s=t[1],l=0,t.length>2&&(l=t[2]),r.pushBack([a,s,l]),this.readScalars(t,n);return i.setIndices(o),n.addPrimitive(i),n.setName("aPoint"),n},this.readMultiPoint=function(t){var n,i=new e.geometryData,r=new e.points,o=new e.sourceDataP3fv,a=new Uint16Array(t.length),s=0,l=t.length,u=null,c=null,d=null;for(o.data().length=3*l,n=0;n<t.length;n+=1)a[n]=n,u=t[n][0],c=t[n][1],d=0,t[n].length>2&&(d=t[n][2]),o.insertAt(s,[u,c,d]),this.readScalars(t[n],i,l,s),s+=1;return r.setIndices(a),i.addPrimitive(r),i.addSource(o),i.setName("manyPoints"),i},this.readLineString=function(t){var n=new e.geometryData,i=new e.lineStrip,r=new e.sourceDataP3fv,o=[],a=null,s=null,l=null,u=null;for(i.setIndicesPerPrimitive(t.length),a=0;a<t.length;a+=1)o.push(a),s=t[a][0],l=t[a][1],u=0,t[a].length>2&&(u=t[a][2]),r.pushBack([s,l,u]),this.readScalars(t[a],n);return i.setIndices(o),n.addPrimitive(i),n.addSource(r),n.setName("aLineString"),n},this.readMultiLineString=function(t){var n=new e.geometryData,i=new e.sourceDataP3fv,r=0,o=2*t.length,a=null,s=null,l=null,u=null,c=null,d=null,h=null,f=null;for(i.data().length=3*o,s=0;s<t.length;s+=1){for(d=[],h=new e.lineStrip,f=t[s].length,h.setIndicesPerPrimitive(f),a=0;a<f;a+=1)d.push(r),l=t[s][a][0],u=t[s][a][1],c=0,t[s][a].length>2&&(c=t[s][a][2]),i.insertAt(r,[l,u,c]),this.readScalars(t[s][a],n,2*o,r),r+=1;h.setIndices(d),n.addPrimitive(h)}return n.setName("aMultiLineString"),n.addSource(i),n},this.readPolygon=function(t){var n=new e.geometryData,i=new e.sourceDataP3fv,r=null,o=null,a=null,s=t[0].length,l=1,u=null,c=null,d=null;for(u=0;u<s;u+=1)r=t[0][u][0],o=t[0][u][1],a=0,t[0][u].length>2&&(a=t[0][u][2]),i.pushBack([r,o,a]),this.readScalars(t[0][u],n),u>1&&(c=new Uint16Array([0,l,u]),(d=new e.triangles).setIndices(c),n.addPrimitive(d),l=u);return n.setName("POLY"),n.addSource(i),n},this.readMultiPolygon=function(t){var n=new e.geometryData,i=new e.sourceDataP3fv,r=0,o=t.length,a=0,s=3*o,l=new e.triangles,u=[],c=null,d=null,h=null,f=null,p=null,m=null,g=null,v=null,y=null,x=!1,b=0;for(i.data().length=3*o,d=0;d<o;d+=1)for(m=t[d][0].length,g=r,v=r+1,y=[!1,!1,!1],c=0;c<m;c+=1)h=t[d][0][c][0],f=t[d][0][c][1],p=0,t[d][0][c].length>2&&(p=t[d][0][c][2]),x=!1,h>180&&(x=!0,h-=360),0===c?y[0]=x:y[1+(c-1)%2]=x,i.insertAt(a,[h,f,p]),this.readScalars(t[d][0][c],n,s,a),a+=1,c>1&&(y[0]===y[1]&&y[1]===y[2]&&(u[3*b+0]=g,u[3*b+1]=v,u[3*b+2]=r,b+=1),v=r),r+=1;return l.setIndices(u),n.addPrimitive(l),n.setName("aMultiPoly"),n.addSource(i),n},this.readGJObjectInt=function(t){if(!t.hasOwnProperty("type"))return null;t.properties&&t.properties.ScalarFormat&&"values"===t.properties.ScalarFormat&&(this.m_scalarFormat="values",t.properties.ScalarRange&&(this.m_scalarRange=t.properties.ScalarRange)),t.properties&&t.properties.ScalarFormat&&"rgb"===t.properties.ScalarFormat&&(this.m_scalarFormat="rgb");var e,n=t.type,i=null,r=null,o=null;switch(n){case"Point":e=this.readPoint(t.coordinates);break;case"MultiPoint":e=this.readMultiPoint(t.coordinates);break;case"LineString":e=this.readLineString(t.coordinates);break;case"MultiLineString":e=this.readMultiLineString(t.coordinates);break;case"Polygon":e=this.readPolygon(t.coordinates);break;case"MultiPolygon":e=this.readMultiPolygon(t.coordinates);break;case"GeometryCollection":for(r=[],o=0;o<t.geometries.length;o+=1)i=this.readGJObject(t.geometries[o]),r.push(i);e=r;break;case"Feature":e=i=this.readGJObject(t.geometry);break;case"FeatureCollection":for(r=[],o=0;o<t.features.length;o+=1)i=this.readGJObject(t.features[o]),r.push(i);e=r;break;default:console.log("Don't understand type "+n),e=null}return e},this.readGJObject=function(t){return this.readGJObjectInt(t)},this.linearizeGeoms=function(t,e){var n=null;if("[object Array]"===Object.prototype.toString.call(e))for(n=0;n<e.length;n+=1)this.linearizeGeoms(t,e[n]);else t.push(e)},this.readGeomObject=function(t){var e,n=[];return e=this.readGJObject(t),this.linearizeGeoms(n,e),n},this.getPrimitives=function(t){if(!t)return[];var e=JSON.parse(t),n=this.readGJObject(e),i=[];return this.m_scalarFormat="none",this.m_scalarRange=null,this.linearizeGeoms(i,n),{geoms:i,scalarFormat:this.m_scalarFormat,scalarRange:this.m_scalarRange}},this):new e.geojsonReader},e.data=function(){"use strict";if(!(this instanceof e.data))return new e.data;this.type=function(){}},e.data.raster=0,e.data.point=1,e.data.lineString=2,e.data.polygon=3,e.data.geometry=10,e.primitive=function(){"use strict";if(!(this instanceof e.primitive))return new e.primitive;var t=0,n=0,i=0,r=null;return this.indices=function(){return r},this.createIndices=function(t){r=new Uint16Array},this.numberOfIndices=function(){return r.length},this.sizeInBytes=function(){return r.length*Uint16Array.BYTES_PER_ELEMENT},this.primitiveType=function(){return n},this.setPrimitiveType=function(t){n=t},this.indicesPerPrimitive=function(){return t},this.setIndicesPerPrimitive=function(e){t=e},this.indicesValueType=function(){return i},this.setIndicesValueType=function(t){i=t},this.setIndices=function(t){r=new Uint16Array(t)},this},e.triangleStrip=function(){"use strict";return this instanceof e.triangleStrip?(e.primitive.call(this),this.setPrimitiveType(e.GL.TRIANGLE_STRIP),this.setIndicesValueType(e.GL.UNSIGNED_SHORT),this.setIndicesPerPrimitive(3),this):new e.triangleStrip},inherit(e.triangleStrip,e.primitive),e.triangles=function(){"use strict";return this instanceof e.triangles?(e.primitive.call(this),this.setPrimitiveType(e.GL.TRIANGLES),this.setIndicesValueType(e.GL.UNSIGNED_SHORT),this.setIndicesPerPrimitive(3),this):new e.triangles},inherit(e.triangles,e.primitive),e.lines=function(){"use strict";return this instanceof e.lines?(e.primitive.call(this),this.setPrimitiveType(e.GL.LINES),this.setIndicesValueType(e.GL.UNSIGNED_SHORT),this.setIndicesPerPrimitive(2),this):new e.lines},inherit(e.lines,e.primitive),e.lineStrip=function(){"use strict";return this instanceof e.lineStrip?(e.primitive.call(this),this.setPrimitiveType(e.GL.LINE_STRIP),this.setIndicesValueType(e.GL.UNSIGNED_SHORT),this.setIndicesPerPrimitive(2),this):new e.lineStrip},inherit(e.lineStrip,e.primitive),e.points=function(){"use strict";return this instanceof e.points?(e.primitive.call(this),this.setPrimitiveType(e.GL.POINTS),this.setIndicesValueType(e.GL.UNSIGNED_SHORT),this.setIndicesPerPrimitive(1),this):new e.points},inherit(e.points,e.primitive),e.vertexDataP3f=function(){"use strict";return this instanceof e.vertexDataP3f?(this.m_position=[],this):new e.vertexDataP3f},e.vertexDataP3N3f=function(){"use strict";return this instanceof e.vertexDataP3N3f?(this.m_position=[],this.m_normal=[],this):new e.vertexDataP3N3f},e.vertexDataP3T3f=function(){"use strict";return this instanceof e.vertexDataP3T3f?(this.m_position=[],this.m_texCoordinate=[],this):new e.vertexDataP3T3f},e.sourceData=function(t){"use strict";if(!(this instanceof e.sourceData))return new e.sourceData(t);var n={},i=[],r=(t=t||{}).name||"Source "+(new Date).toISOString(),o=function(){this.m_numberOfComponents=0,this.m_dataType=0,this.m_dataTypeSize=0,this.m_normalized=!1,this.m_stride=0,this.m_offset=0};return this.data=function(){return i},this.getData=function(){return this.data()},this.dataToFloat32Array=function(){return i instanceof Float32Array||(i=new Float32Array(i)),i},this.setData=function(t){t instanceof Array||t instanceof Float32Array?i=t instanceof Float32Array?t:t.slice(0):console.log("[error] Requires array")},this.addAttribute=function(t,e,i,r,a,s,l){if(!n.hasOwnProperty(t)){var u=new o;u.m_dataType=e,u.m_dataTypeSize=i,u.m_offset=r,u.m_stride=a,u.m_numberOfComponents=s,u.m_normalized=l,n[t]=u}},this.sizeOfArray=function(){return Object.size(i)},this.lengthOfArray=function(){return i.length},this.sizeInBytes=function(){var t,e=0,n=this.keys();for(t=0;t<n.length;t+=1)e+=this.attributeNumberOfComponents(n[t])*this.sizeOfAttributeDataType(n[t]);return e*=this.sizeOfArray()},this.hasKey=function(t){return n.hasOwnProperty(t)},this.keys=function(){return Object.keys(n)},this.numberOfAttributes=function(){return Object.size(n)},this.attributeNumberOfComponents=function(t){return n.hasOwnProperty(t)?n[t].m_numberOfComponents:0},this.normalized=function(t){return!!n.hasOwnProperty(t)&&n[t].m_normalized},this.sizeOfAttributeDataType=function(t){return n.hasOwnProperty(t)?n[t].m_dataTypeSize:0},this.attributeDataType=function(t){if(n.hasOwnProperty(t))return n[t].m_dataType},this.attributeOffset=function(t){return n.hasOwnProperty(t)?n[t].m_offset:0},this.attributeStride=function(t){return n.hasOwnProperty(t)?n[t].m_stride:0},this.pushBack=function(t){},this.insert=function(t){var e;if(!i.length&&t.length&&t instanceof Float32Array)i=t;else if(i.slice||!i.length&&t.slice||(i=Array.prototype.slice.call(i)),t.length)if(!i.length&&t.slice)i=t.slice(0);else for(e=0;e<t.length;e+=1)i[i.length]=t[e];else i[i.length]=t},this.insertAt=function(t,e){var n;if(e.length)for(n=0;n<e.length;n+=1)i[t*e.length+n]=e[n];else i[t]=e},this.name=function(){return r},this.setName=function(t){r=t},this},e.sourceDataAnyfv=function(t,n,i){"use strict";return this instanceof e.sourceDataAnyfv?(e.sourceData.call(this,i),this.addAttribute(n,e.GL.FLOAT,4,0,4*t,t,!1),this.pushBack=function(t){this.insert(t)},this):new e.sourceDataAnyfv(t,n,i)},inherit(e.sourceDataAnyfv,e.sourceData),e.sourceDataP3T3f=function(t){"use strict";return this instanceof e.sourceDataP3T3f?(e.sourceData.call(this,t),this.addAttribute(e.vertexAttributeKeys.Position,e.GL.FLOAT,4,0,24,3,!1),this.addAttribute(e.vertexAttributeKeys.TextureCoordinate,e.GL.FLOAT,4,12,24,3,!1),this.pushBack=function(t){this.insert(t.m_position),this.insert(t.m_texCoordinate)},this):new e.sourceDataP3T3f(t)},inherit(e.sourceDataP3T3f,e.sourceData),e.sourceDataP3N3f=function(t){"use strict";return this instanceof e.sourceDataP3N3f?(e.sourceData.call(this,t),this.addAttribute(e.vertexAttributeKeys.Position,e.GL.FLOAT,4,0,24,3,!1),this.addAttribute(e.vertexAttributeKeys.Normal,e.GL.FLOAT,4,12,24,3,!1),this.pushBack=function(t){this.insert(t.m_position),this.insert(t.m_normal)},this):new e.sourceDataP3N3f(t)},inherit(e.sourceDataP3N3f,e.sourceData),e.sourceDataP3fv=function(t){"use strict";return this instanceof e.sourceDataP3fv?(e.sourceData.call(this,t),this.addAttribute(e.vertexAttributeKeys.Position,e.GL.FLOAT,4,0,12,3,!1),this.pushBack=function(t){this.insert(t)},this):new e.sourceDataP3fv(t)},inherit(e.sourceDataP3fv,e.sourceData),e.sourceDataT2fv=function(t){"use strict";return this instanceof e.sourceDataT2fv?(e.sourceData.call(this,t),this.addAttribute(e.vertexAttributeKeys.TextureCoordinate,e.GL.FLOAT,4,0,8,2,!1),this.pushBack=function(t){this.insert(t)},this):new e.sourceDataT2fv(t)},inherit(e.sourceDataT2fv,e.sourceData),e.sourceDataC3fv=function(t){"use strict";return this instanceof e.sourceDataC3fv?(e.sourceData.call(this,t),this.addAttribute(e.vertexAttributeKeys.Color,e.GL.FLOAT,4,0,12,3,!1),this.pushBack=function(t){this.insert(t)},this):new e.sourceDataC3fv(t)},inherit(e.sourceDataC3fv,e.sourceData),e.sourceDataSf=function(t){"use strict";if(!(this instanceof e.sourceDataSf))return new e.sourceDataSf(t);var n=null,i=null,r=null,o=null;return e.sourceData.call(this,t),this.addAttribute(e.vertexAttributeKeys.Scalar,e.GL.FLOAT,4,0,4,1,!1),this.pushBack=function(t){(null===i||t>i)&&(i=t),(null===n||t<n)&&(n=t),this.data()[this.data().length]=t},this.insertAt=function(t,e){(null===i||e>i)&&(i=e),(null===n||e<n)&&(n=e),this.data()[t]=e},this.scalarRange=function(){return null===r||null===o?[n,i]:[r,o]},this.setScalarRange=function(t,e){r=t,o=e},this},inherit(e.sourceDataSf,e.sourceData),e.sourceDataDf=function(t){"use strict";return this instanceof e.sourceDataDf?(e.sourceData.call(this,t),this.addAttribute(e.vertexAttributeKeys.Scalar,e.GL.FLOAT,4,0,4,1,!1),this.pushBack=function(t){this.data()[this.data().length]=t},this.insertAt=function(t,e){this.data()[t]=e},this):new e.sourceDataDf(t)},inherit(e.sourceDataDf,e.sourceData),e.geometryData=function(){"use strict";if(!(this instanceof e.geometryData))return new e.geometryData;e.data.call(this);var t="",n=[],i=[],r=[0,0,0,0,0,0],o=e.timestamp(),a=e.timestamp();return this.type=function(){return e.data.geometry},this.name=function(){return t},this.setName=function(e){t=e},this.addSource=function(t,n){return void 0!==n&&t.setName(n),-1===i.indexOf(t)&&(i.push(t),t.hasKey(e.vertexAttributeKeys.Position)&&a.modified(),!0)},this.source=function(t){return t<i.length?i[t]:0},this.sourceByName=function(t){for(var e=0;e<i.length;e+=1)if(i[e].name()===t)return i[e];return 0},this.numberOfSources=function(){return i.length},this.sourceData=function(t){var e;for(e=0;e<i.length;e+=1)if(i[e].hasKey(t))return i[e];return null},this.addPrimitive=function(t){return n.push(t),!0},this.primitive=function(t){return t<n.length?n[t]:null},this.numberOfPrimitives=function(){return n.length},this.bounds=function(){return a.getMTime()>o.getMTime()&&this.computeBounds(),r},this.boundsDirty=function(t){return t&&a.modified(),a.getMTime()>o.getMTime()},this.resetBounds=function(){r[0]=0,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=0},this.setBounds=function(t,e,n,i,a,s){return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r[4]=a,r[5]=s,o.modified(),!0},this.computeBounds=function(){if(a.getMTime()>o.getMTime()){var t,n,i,s,l,u,c=e.vertexAttributeKeys.Position,d=this.sourceData(c),h=d.data(),f=d.attributeNumberOfComponents(c),p=d.attributeStride(c),m=d.attributeOffset(c),g=d.sizeOfAttributeDataType(c),v=h.length,y=null;for(p/=g,m/=g,this.resetBounds(),t=0;t<f;t+=1){for(n=2*t,i=2*t+1,s=l=v?r[i]=h[m+t]:0,u=m+p+t;u<v;u+=p)(y=h[u])>s&&(s=y),y<l&&(l=y);r[n]=l,r[i]=s}o.modified()}},this.findClosestVertex=function(t){var n,i,r,o,a,s,l,u=e.vertexAttributeKeys.Position,c=this.sourceData(u),d=c.sizeOfAttributeDataType(u),h=c.attributeNumberOfComponents(u),f=c.data(),p=c.attributeStride(u)/d,m=c.attributeOffset(u)/d,g=Number.MAX_VALUE,v=null;for(3!==h&&console.log("[warning] Find closest vertex assumes threecomponent vertex "),t.z||(t={x:t.x,y:t.y,z:0}),n=m,l=0;n<f.length;n+=p,l+=1)r=(i=[f[n],f[n+1],f[n+2]])[0]-t.x,o=i[1]-t.y,a=i[2]-t.z,(s=Math.sqrt(r*r+o*o+a*a))<g&&(g=s,v=l);return v},this.getPosition=function(t){var n=e.vertexAttributeKeys.Position,i=this.sourceData(n),r=i.sizeOfAttributeDataType(n),o=i.attributeNumberOfComponents(n),a=i.data(),s=i.attributeStride(n)/r,l=i.attributeOffset(n)/r;return 3!==o&&console.log("[warning] getPosition assumes three component data"),[a[l+t*s],a[l+t*s+1],a[l+t*s+2]]},this.getScalar=function(t){var n,i,r,o,a=e.vertexAttributeKeys.Scalar,s=this.sourceData(a);return s?(n=s.sizeOfAttributeDataType(a),i=s.data(),t*(r=s.attributeStride(a)/n)+(o=s.attributeOffset(a)/n)>=i.length&&console.log("access out of bounds in getScalar"),i[t*r+o]):null},this},inherit(e.geometryData,e.data),e.mapper=function(t){"use strict";if(!(this instanceof e.mapper))return new e.mapper(t);e.boundingObject.call(this);var n=[0,1,1],i=null,r=[],o={},a=void 0!==(t=t||{}).dynamicDraw&&t.dynamicDraw,s=e.timestamp(),l=null,u=this;function c(t){if(i){t&&(l=t.m_context);var n,u,c,d,h,f,p,m=i.numberOfSources(),g=null;for(n=0;n<m;n+=1){for(g=l.createBuffer(),l.bindBuffer(e.GL.ARRAY_BUFFER,g),(p=i.source(n).data())instanceof Float32Array||(p=new Float32Array(p)),l.bufferData(e.GL.ARRAY_BUFFER,p,a?e.GL.DYNAMIC_DRAW:e.GL.STATIC_DRAW),d=i.source(n).keys(),h=[],u=0;u<d.length;u+=1)h.push(d[u]);o[n]=h,r[n]=g}for(f=i.numberOfPrimitives(),c=0;c<f;c+=1)g=l.createBuffer(),l.bindBuffer(e.GL.ARRAY_BUFFER,g),l.bufferData(e.GL.ARRAY_BUFFER,i.primitive(c).indices(),e.GL.STATIC_DRAW),r[n]=g,n+=1;s.modified()}}function d(t){o={},r=[]}function h(t){u.deleteVertexBufferObjects(t),d(t),c(t)}return this.deleteVertexBufferObjects=function(t){var e,n=l;if(t&&(n=t.m_context),n)for(e=0;e<r.length;e+=1)n.deleteBuffer(r[e])},this._cleanup=function(t){u.deleteVertexBufferObjects(t),d(t),u.modified()},this.computeBounds=function(){if(null!=i){var t=this.computeBoundsTimestamp(),e=null;this.boundsDirtyTimestamp().getMTime()>t.getMTime()&&(e=i.bounds(),this.setBounds(e[0],e[1],e[2],e[3],e[4],e[5]),t.modified())}else this.resetBounds()},this.color=function(){return n},this.setColor=function(t,e,i){n[0]=t,n[1]=e,n[2]=i,this.modified()},this.geometryData=function(){return i},this.setGeometryData=function(t){i!==t&&(i=t,this.modified(),this.boundsDirtyTimestamp().modified())},this.updateSourceBuffer=function(t,n,o){if(o&&(l=o.m_context),!l)return!1;for(var a=-1,s=0;s<i.numberOfSources();s+=1)if(i.source(s).name()===t){a=s;break}return!(a<0||a>=r.length||(n||(n=i.source(s).dataToFloat32Array()),l.bindBuffer(e.GL.ARRAY_BUFFER,r[a]),n instanceof Float32Array?l.bufferSubData(e.GL.ARRAY_BUFFER,0,n):l.bufferSubData(e.GL.ARRAY_BUFFER,0,new Float32Array(n)),0))},this.getSourceBuffer=function(t){var e=i.sourceByName(t);return e?e.dataToFloat32Array():new Float32Array},this.render=function(t,n){(this.getMTime()>s.getMTime()||t.m_contextChanged)&&h(t),(l=t.m_context).vertexAttrib3fv(e.vertexAttributeKeys.Color,this.color());var a,u=0,c=0,d=null,f=null;for(a in o)if(o.hasOwnProperty(a)){for(l.bindBuffer(e.GL.ARRAY_BUFFER,r[u]),c=0;c<o[a].length;c+=1)t.m_material.bindVertexData(t,o[a][c]);u+=1}for(d=i.numberOfPrimitives(),c=0;c<d;c+=1,u+=1)if((f=i.primitive(c)).numberOfIndices()){switch(l.bindBuffer(e.GL.ARRAY_BUFFER,r[u]),f.primitiveType()){case e.GL.POINTS:l.drawArrays(e.GL.POINTS,0,f.numberOfIndices());break;case e.GL.LINES:l.drawArrays(e.GL.LINES,0,f.numberOfIndices());break;case e.GL.LINE_STRIP:l.drawArrays(e.GL.LINE_STRIP,0,f.numberOfIndices());break;case e.GL.TRIANGLES:l.drawArrays(e.GL.TRIANGLES,0,f.numberOfIndices());break;case e.GL.TRIANGLE_STRIP:l.drawArrays(e.GL.TRIANGLE_STRIP,0,f.numberOfIndices())}l.bindBuffer(e.GL.ARRAY_BUFFER,null)}n||this.undoBindVertexData(t)},this.undoBindVertexData=function(t){var e,n;for(e in o)if(o.hasOwnProperty(e))for(n=0;n<o[e].length;n+=1)t.m_material.undoBindVertexData(t,o[e][n])},this},inherit(e.mapper,e.boundingObject),e.groupMapper=function(){"use strict";if(!(this instanceof e.groupMapper))return new e.groupMapper;e.mapper.call(this);var t=e.timestamp(),n=[],i=[];return this.geometryData=function(t){return void 0!==t&&t<i.length?i[t]:i.length>0?i[0]:null},this.setGeometryData=function(t){1===i.length&&i[0]===t||((i=[]).push(t),this.modified())},this.geometryDataArray=function(){return i},this.setGeometryDataArray=function(t){if(t instanceof Array){if(i!==t)return i=[],i=t,this.modified(),!0}else console.log("[error] Requies array of geometry data");return!1},this.computeBounds=function(){if(null!=i){var t=this.computeBoundsTimestamp(),e=this.boundsDirtyTimestamp(),n=this.bounds(),r=null,o=null;if(e.getMTime()>t.getMTime()){for(o=0;o<i.length;o+=1)r=i[o].bounds(),n[0]>r[0]&&(n[0]=r[0]),n[1]<r[1]&&(n[1]=r[1]),n[2]>r[2]&&(n[2]=r[2]),n[3]<r[3]&&(n[3]=r[3]),n[4]>r[4]&&(n[4]=r[4]),n[5]<r[5]&&(n[5]=r[5]);this.modified(),t.modified()}}else this.resetBounds()},this.render=function(r){var o=null;if(this.getMTime()>t.getMTime()){for(o=0;o<i.length;o+=1)n.push(e.mapper()),n[o].setGeometryData(i[o]);t.modified()}for(o=0;o<n.length;o+=1)n[o].render(r)},this},inherit(e.groupMapper,e.mapper),e.materialAttributeType={Undefined:0,ShaderProgram:1,Texture:2,Blend:3,Depth:4},e.materialAttribute=function(t){"use strict";if(!(this instanceof e.materialAttribute))return new e.materialAttribute(t);e.graphicsObject.call(this);var n=this,i=t,r=!0;return this.type=function(){return i},this.enabled=function(){return r},this.bindVertexData=function(t,e){return t=t,e=e,!1},this.undoBindVertexData=function(t,e){return t=t,e=e,!1},n},inherit(e.materialAttribute,e.graphicsObject),e.blendFunction=function(t,n){"use strict";if(!(this instanceof e.blendFunction))return new e.blendFunction(t,n);var i=t,r=n;return this.apply=function(t){t.m_context.blendFuncSeparate(i,r,e.GL.ONE,e.GL.ONE_MINUS_SRC_ALPHA)},this},e.blend=function(){"use strict";if(!(this instanceof e.blend))return new e.blend;e.materialAttribute.call(this,e.materialAttributeType.Blend);var t=!1,n=e.blendFunction(e.GL.SRC_ALPHA,e.GL.ONE_MINUS_SRC_ALPHA);return this.bind=function(i){return t=i.m_context.isEnabled(e.GL.BLEND),this.enabled()?(i.m_context.enable(e.GL.BLEND),n.apply(i)):i.m_context.disable(e.GL.BLEND),!0},this.undoBind=function(n){return t?n.m_context.enable(e.GL.BLEND):n.m_context.disable(e.GL.BLEND),!0},this},inherit(e.blend,e.materialAttribute),e.material=function(){"use strict";if(!(this instanceof e.material))return new e.material;e.graphicsObject.call(this);var t=this,n=new e.shaderProgram,i=100,r={},o={};return this.binNumber=function(){return i},this.setBinNumber=function(e){i=e,t.modified()},this.exists=function(t){return t.type()===e.materialAttributeType.Texture?r.hasOwnProperty(t.textureUnit()):o.hasOwnProperty(t.type())},this.uniform=function(t){return n?n.uniform(t):null},this.attribute=function(t,n){return o.hasOwnProperty(t)?o[t]:t===e.materialAttributeType.Texture&&r.hasOwnProperty(n)?r[n]:null},this.setAttribute=function(i){return i.type()===e.materialAttributeType.Texture?r[i.textureUnit()]!==i&&(r[i.textureUnit()]=i,t.modified(),!0):o[i.type()]!==i&&(i.type()===e.materialAttributeType.ShaderProgram&&(n=i),o[i.type()]=i,t.modified(),!0)},this.addAttribute=function(i){return!t.exists(i)&&(i.type()===e.materialAttributeType.Texture?(r[i.textureUnit()]=i,t.modified(),!0):(i.type()===e.materialAttributeType.ShaderProgram&&(n=i),o[i.type()]=i,t.modified(),!0))},this.shaderProgram=function(){return n},this._setup=function(t){return!1},this._cleanup=function(e){for(var i in o)o.hasOwnProperty(i)&&o[i]._cleanup(e);for(i in r)r.hasOwnProperty(i)&&r[i]._cleanup(e);n._cleanup(e),t.modified()},this.bind=function(t){var e=null;for(e in n.bind(t),o)o.hasOwnProperty(e)&&o[e]!==n&&o[e].bind(t);for(e in r)r.hasOwnProperty(e)&&r[e].bind(t)},this.undoBind=function(t){var e=null;for(e in o)o.hasOwnProperty(e)&&o[e].undoBind(t);for(e in r)r.hasOwnProperty(e)&&r[e].undoBind(t)},this.bindVertexData=function(t,e){var n=null;for(n in o)o.hasOwnProperty(n)&&o[n].bindVertexData(t,e)},this.undoBindVertexData=function(t,e){var n=null;for(n in o)o.hasOwnProperty(n)&&o[n].undoBindVertexData(t,e)},t},e.material.RenderBin={Base:0,Default:100,Opaque:100,Transparent:1e3,Overlay:1e4},inherit(e.material,e.graphicsObject),e.renderState=function(){"use strict";this.m_context=null,this.m_modelViewMatrix=o.create(),this.m_normalMatrix=o.create(),this.m_projectionMatrix=null,this.m_material=null,this.m_mapper=null},e.renderer=function(t){"use strict";if(!(this instanceof e.renderer))return new e.renderer(t);e.graphicsObject.call(this),t=t||{};var n=this;return n.m_renderWindow=null,n.m_contextChanged=!1,n.m_sceneRoot=new e.groupNode,n.m_camera=new e.camera(t),n.m_nearClippingPlaneTolerance=null,n.m_x=0,n.m_y=0,n.m_width=0,n.m_height=0,n.m_resizable=!0,n.m_resetScene=!0,n.m_layer=0,n.m_renderPasses=null,n.m_resetClippingRange=!0,n.m_depthBits=null,n.m_camera.addChild(n.m_sceneRoot),this.width=function(){return n.m_width},this.height=function(){return n.m_height},this.layer=function(){return n.m_layer},this.setLayer=function(t){n.m_layer=t,n.modified()},this.isResizable=function(){return n.m_resizable},this.setResizable=function(t){n.m_resizable=t},this.renderWindow=function(){return n.m_renderWindow},this.setRenderWindow=function(t){n.m_renderWindow!==t&&(n.m_renderWindow&&n.m_renderWindow.removeRenderer(this),n.m_renderWindow=t,n.m_contextChanged=!0,n.modified())},this.backgroundColor=function(){return n.m_camera.clearColor()},this.setBackgroundColor=function(t,e,i,r){n.m_camera.setClearColor(t,e,i,r),n.modified()},this.sceneRoot=function(){return n.m_sceneRoot},this.camera=function(){return n.m_camera},this.render=function(){var t,i,r,a=null,s=[],l=o.create(),u=null;if((i=new e.renderState).m_renderer=n,i.m_context=n.renderWindow().context(),n.m_depthBits&&!n.m_contextChanged||(n.m_depthBits=i.m_context.getParameter(e.GL.DEPTH_BITS)),i.m_contextChanged=n.m_contextChanged,n.m_renderPasses)for(t=0;t<n.m_renderPasses.length;t+=1){if(n.m_renderPasses[t].render(i))return console.log("returning"),void n.m_renderPasses[t].remove(i);n.m_renderPasses[t].remove(i)}for(i.m_context.enable(e.GL.DEPTH_TEST),i.m_context.depthFunc(e.GL.LEQUAL),n.m_camera.clearMask()&e.GL.COLOR_BUFFER_BIT&&(u=n.m_camera.clearColor(),i.m_context.clearColor(u[0],u[1],u[2],u[3])),n.m_camera.clearMask()&e.GL.DEPTH_BUFFER_BIT&&i.m_context.clearDepth(n.m_camera.clearDepth()),i.m_context.clear(n.m_camera.clearMask()),i.m_context.viewport(n.m_x,n.m_y,n.m_width,n.m_height),(r=n.m_sceneRoot.children()).length>0&&n.m_resetScene&&(n.resetCamera(),n.m_resetScene=!1),t=0;t<r.length;t+=1)(a=r[t]).computeBounds(),a.visible()&&a.material().binNumber()>=0&&s.push([a.material().binNumber(),a]);for(s.sort((function(t,e){return t[0]-e[0]})),t=0;t<s.length;t+=1){if((a=s[t][1]).referenceFrame()===e.boundingObject.ReferenceFrame.Relative){var c=n.m_camera.viewMatrix();c instanceof Array&&(i.m_modelViewMatrix=new Array(16)),o.multiply(i.m_modelViewMatrix,c,a.matrix()),i.m_projectionMatrix=n.m_camera.projectionMatrix(),i.m_modelViewAlignment=n.m_camera.viewAlignment()}else i.m_modelViewMatrix=a.matrix(),i.m_modelViewAlignment=null,i.m_projectionMatrix=o.create(),o.ortho(i.m_projectionMatrix,0,n.m_width,0,n.m_height,-1,1);o.invert(l,i.m_modelViewMatrix),o.transpose(i.m_normalMatrix,l),i.m_material=a.material(),i.m_mapper=a.mapper(),i.m_material.bind(i),i.m_mapper.render(i),i.m_material.undoBind(i)}i.m_context.finish(),n.m_contextChanged=!1,n.m_lastRenderState=i},this.resetCamera=function(){n.m_camera.computeBounds();var t=n.m_camera.directionOfProjection(),e=n.m_camera.bounds(),i=[(e[0]+e[1])/2,(e[2]+e[3])/2,(e[4]+e[5])/2],r=[e[1]-e[0],e[3]-e[2],e[5]-e[4]],o=0,a=n.m_camera.viewAspect(),l=n.m_camera.viewAngle(),u=null,c=null;o=r[0]>r[1]?r[0]>r[2]?r[0]/2:r[2]/2:r[1]>r[2]?r[1]/2:r[2]/2,l=a>=1?2*Math.atan(Math.tan(.5*l)/a):2*Math.atan(Math.tan(.5*l)*a),u=o/Math.sin(.5*l),c=n.m_camera.viewUpDirection(),Math.abs(s.dot(c,t))>.999&&n.m_camera.setViewUpDirection(-c[2],c[0],c[1]),n.m_camera.setFocalPoint(i[0],i[1],i[2]),n.m_camera.setPosition(i[0]+u*-t[0],i[1]+u*-t[1],i[2]+u*-t[2]),n.resetCameraClippingRange(e)},this.hasValidBounds=function(t){return t[0]!==Number.MAX_VALUE&&t[1]!==-Number.MAX_VALUE&&t[2]!==Number.MAX_VALUE&&t[3]!==-Number.MAX_VALUE&&t[4]!==Number.MAX_VALUE&&t[5]!==-Number.MAX_VALUE},this.resetCameraClippingRange=function(t){if(void 0===t&&(n.m_camera.computeBounds(),t=n.m_camera.bounds()),n.hasValidBounds(t)){var e=n.m_camera.viewPlaneNormal(),i=n.m_camera.position(),r=-e[0],o=-e[1],a=-e[2],s=-(r*i[0]+o*i[1]+a*i[2]),l=vec2.create(),u=null,c=null,d=null,h=null;if(n.m_resetClippingRange){for(l[0]=r*t[0]+o*t[2]+a*t[4]+s,l[1]=1e-18,h=0;h<2;h+=1)for(d=0;d<2;d+=1)for(c=0;c<2;c+=1)u=r*t[c]+o*t[2+d]+a*t[4+h]+s,l[0]=u<l[0]?u:l[0],l[1]=u>l[1]?u:l[1];l[0]<0&&(l[0]=0),l[0]=.99*l[0]-.5*(l[1]-l[0]),l[1]=1.01*l[1]+.5*(l[1]-l[0]),l[0]=l[0]>=l[1]?.01*l[1]:l[0],n.m_nearClippingPlaneTolerance||(n.m_nearClippingPlaneTolerance=.01,n.m_depthBits&&n.m_depthBits>16&&(n.m_nearClippingPlaneTolerance=.001)),l[0]<n.m_nearClippingPlaneTolerance*l[1]&&(l[0]=n.m_nearClippingPlaneTolerance*l[1]),n.m_camera.setClippingRange(l[0],l[1])}}},this.resize=function(t,e){t&&e&&n.positionAndResize(n.m_x,n.m_y,t,e)},this.positionAndResize=function(t,e,i,r){var o;if(t<0||e<0||i<=0||r<=0)console.log("[error] Invalid position and resize values",t,e,i,r);else if(n.m_resizable&&(n.m_width=i,n.m_height=r,n.m_camera.setViewAspect(i/r),n.m_camera.setParallelExtents({width:i,height:r}),n.modified()),n.m_renderPasses)for(o=0;o<n.m_renderPasses.length;o+=1)n.m_renderPasses[o].resize(i,r),n.m_renderPasses[o].renderer().positionAndResize(t,e,i,r)},this.addActor=function(t){return t instanceof e.actor&&(n.m_sceneRoot.addChild(t),n.modified(),!0)},this.hasActor=function(t){return n.m_sceneRoot.hasChild(t)},this.addActors=function(t){var e=null;if(t instanceof Array){for(e=0;e<t.length;e+=1)n.m_sceneRoot.addChild(t[e]);n.modified()}},this.removeActor=function(t){return-1!==n.m_sceneRoot.children().indexOf(t)&&(n.m_lastRenderState&&(t.mapper()&&t.mapper()._cleanup(n.m_lastRenderState),t.material()&&t.material()._cleanup(n.m_lastRenderState)),t.modified(),n.m_sceneRoot.removeChild(t),n.modified(),!0)},this.removeActors=function(t){if(!(t instanceof Array))return!1;var e;for(e=0;e<t.length;e+=1)n.m_sceneRoot.removeChild(t[e]);return n.modified(),!0},this.removeAllActors=function(){return n.m_sceneRoot.removeChildren()},this.worldToDisplay=function(t,e,n,i,r){var s=o.create(),l=null,u=null,c=null,d=null,h=null;return o.multiply(s,n,e),h=a.create(),a.transformMat4(h,t,s),0!==h[3]&&(h[0]=h[0]/h[3],h[1]=h[1]/h[3],h[2]=h[2]/h[3],h[3]=1),l=(h[0]+1)/2*i,u=(1-h[1])/2*r,c=h[2],d=h[3],a.fromValues(l,u,c,d)},this.displayToWorld=function(t,e,n,i,r){var s=2*t[0]/i-1,l=-2*t[1]/r+1,u=t[2],c=o.create(),d=null;return o.multiply(c,n,e),o.invert(c,c),d=a.fromValues(s,l,u,1),a.transformMat4(d,d,c),0!==d[3]&&(d[0]=d[0]/d[3],d[1]=d[1]/d[3],d[2]=d[2]/d[3],d[3]=1),d},this.focusDisplayPoint=function(){var t=n.m_camera.focalPoint(),e=a.fromValues(t[0],t[1],t[2],1);return n.worldToDisplay(e,n.m_camera.viewMatrix(),n.m_camera.projectionMatrix(),n.m_width,n.m_height)},this.resetScene=function(){return n.m_resetScene},this.setResetScene=function(t){n.m_resetScene!==t&&(n.m_resetScene=t,n.modified())},this.resetClippingRange=function(){return n.m_resetClippingRange},this.setResetClippingRange=function(t){n.m_resetClippingRange!==t&&(n.m_resetClippingRange=t,n.modified())},this.addRenderPass=function(t){var e;if(n.m_renderPasses)for(e=0;e<n.m_renderPasses.length;e+=1)if(t===n.m_renderPasses[e])return;n.m_renderPasses=[],n.m_renderPasses.push(t)},this.removeRenderPass=function(t){t=t},this._cleanup=function(t){for(var e=n.m_sceneRoot.children(),i=0;i<e.length;i+=1){var r=e[i];r.material()._cleanup(t),r.mapper()._cleanup(t)}n.m_sceneRoot.removeChildren(),n.modified()},n},inherit(e.renderer,e.graphicsObject),e.renderWindow=function(t){"use strict";if(!(this instanceof e.renderWindow))return new e.renderWindow(t);e.graphicsObject.call(this);var n=this,i=0,r=0,o=400,s=400,l=t,u=null,c=[],d=null;return this.windowSize=function(){return[o,s]},this.setWindowSize=function(t,e){return(o!==t||s!==e)&&(o=t,s=e,n.modified(),!0)},this.windowPosition=function(){return[i,r]},this.setWindowPosition=function(t,e){return(i!==t||r!==e)&&(i=t,r=e,n.modified(),!0)},this.renderers=function(){return c},this.activeRenderer=function(){return u},this.addRenderer=function(t){return!1===n.hasRenderer(t)&&(c.push(t),t.setRenderWindow(n),null===u&&(u=t),0!==t.layer()&&t.camera().setClearMask(e.GL.DepthBufferBit),n.modified(),!0)},this.removeRenderer=function(t){var e=c.indexOf(t);return-1!==e&&(u===t&&(u=null),c.splice(e,1),n.modified(),!0)},this.getRenderer=function(t){return t<c.length?c[t]:(console.log("[WARNING] Out of index array"),null)},this.hasRenderer=function(t){var e;for(e=0;e<c.length;e+=1)if(t===c[e])return!0;return!1},this.resize=function(t,e){n.positionAndResize(i,r,t,e),n.modified()},this.positionAndResize=function(t,e,a,l){var u;for(i=t,r=e,o=a,s=l,u=0;u<c.length;u+=1)c[u].positionAndResize(i,r,o,s);n.modified()},this._setup=function(t){t=t,d=null;try{var e;for(d=l.getContext("webgl")||l.getContext("experimental-webgl"),e=0;e<c.length;e+=1)(c[e].width()>o||0===c[e].width()||c[e].height()>s||0===c[e].height())&&c[e].resize(i,r,o,s);return!0}catch(t){}return d||console("[ERROR] Unable to initialize WebGL. Your browser may not support it."),!1},this.context=function(){return d},this._cleanup=function(t){var i;for(i=0;i<c.length;i+=1)c[i]._cleanup(t);e.clearCachedShaders(t?t.m_context:null),n.modified()},this.render=function(){var t;for(c.sort((function(t,e){return t.layer()-e.layer()})),t=0;t<c.length;t+=1)c[t].render()},this.focusDisplayPoint=function(){return u.focusDisplayPoint()},this.displayToWorld=function(t,e,n,i){var r=(i=void 0===i?i=u:i).camera();return n||(n=i.focusDisplayPoint()),i.displayToWorld(a.fromValues(t,e,n[2],1),r.viewMatrix(),r.projectionMatrix(),o,s)},this.worldToDisplay=function(t,e,n,i){var r=(i=void 0===i?i=u:i).camera();return i.worldToDisplay(a.fromValues(t,e,n,1),r.viewMatrix(),r.projectionMatrix(),o,s)},n},inherit(e.renderWindow,e.graphicsObject),e.camera=function(t){"use strict";if(!(this instanceof e.camera))return new e.camera(t);e.groupNode.call(this),t=t||{};var n=30*Math.PI/180,i=a.fromValues(0,0,1,1),r=a.fromValues(0,0,0,1),l=s.fromValues(0,0,0),u=a.fromValues(0,1,0,0),c=a.fromValues(1,0,0,0),d=.01,h=1e4,f=1,p=a.fromValues(0,0,-1,0),m=a.fromValues(0,0,1,0),g=o.create(),v=o.create(),y=e.timestamp(),x=e.timestamp(),b=-1,_=1,w=1,M=-1,A={zoom:1,tilesize:256},T=!0,C=!0,E=!0,S=!1,k=[0,0,0,0],P=1,O=e.GL.COLOR_BUFFER_BIT|e.GL.DEPTH_BUFFER_BIT;return void 0!==t.parallelProjection&&(S=!!t.parallelProjection),this.viewAngle=function(){return n},this.setViewAngleDegrees=function(t){this.setViewAngle(Math.PI*t/180)},this.setViewAngle=function(t){E&&(n=t,this.modified())},this.position=function(){return i},this.setPosition=function(t,e,n){T&&(i=a.fromValues(t,e,n,1),this.modified())},this.focalPoint=function(){return r},this.setFocalPoint=function(t,e,n){C&&T&&(r=a.fromValues(t,e,n,1),this.modified())},this.viewUpDirection=function(){return u},this.setViewUpDirection=function(t,e,n){u=a.fromValues(t,e,n,0),this.modified()},this.centerOfRotation=function(){return l},this.setCenterOfRotation=function(t){l=t,this.modified()},this.clippingRange=function(){return[d,h]},this.setClippingRange=function(t,e){d=t,h=e,this.modified()},this.viewAspect=function(){return f},this.setViewAspect=function(t){f=t,this.modified()},this.enableScale=function(){return E},this.setEnableScale=function(t){return t!==E?(E=t,this.modified(),!0):E},this.enableRotation=function(){return C},this.setEnableRotation=function(t){return t!==C?(C=t,this.modified(),!0):C},this.enableTranslation=function(){return T},this.setEnableTranslation=function(t){return t!==T?(T=t,this.modified(),!0):T},this.isEnabledParallelProjection=function(){return S},this.enableParallelProjection=function(t){return t!==S?(S=t,this.modified(),!0):S},this.setEnableParallelProjection=function(t){return this.enableParallelProjection(t)},this.parallelProjection=function(){return{left:b,right:_,top:w,bottom:M}},this.setParallelProjection=function(t,e,n,i){b=t,_=e,w=n,M=i,this.modified()},this.parallelExtents=function(){return A},this.setParallelExtents=function(t){var e,n,i=["width","height","zoom","tilesize"],r=!1;for(e=0;e<i.length;e+=1)void 0!==t[n=i[e]]&&t[n]!==A[n]&&(A[n]=t[n],r=!0);if(r&&A.width&&A.height&&void 0!==A.zoom&&A.tilesize){var o=this.unitsPerPixel(A.zoom,A.tilesize);_=o*A.width/2,b=-_,w=o*A.height/2,M=-w,this.modified()}},this.unitsPerPixel=function(t,e){return e=e||256,360*Math.pow(2,-t)/e},this.directionOfProjection=function(){return this.computeDirectionOfProjection(),p},this.viewPlaneNormal=function(){return this.computeViewPlaneNormal(),m},this.viewMatrix=function(){return this.computeViewMatrix()},this.setViewMatrix=function(t,e){e?g=t.slice():o.copy(g,t),y.modified()},this.projectionMatrix=function(){return this.computeProjectionMatrix()},this.setProjectionMatrix=function(t){o.copy(v,t),x.modified()},this.clearMask=function(){return O},this.setClearMask=function(t){O=t,this.modified()},this.clearColor=function(){return k},this.setClearColor=function(t,e,n,i){k[0]=t,k[1]=e,k[2]=n,k[3]=i,this.modified()},this.clearDepth=function(){return P},this.setClearDepth=function(t){P=t,this.modified()},this.computeDirectionOfProjection=function(){s.subtract(p,r,i),s.normalize(p,p),this.modified()},this.computeViewPlaneNormal=function(){m[0]=-p[0],m[1]=-p[1],m[2]=-p[2]},this.zoom=function(t,e){0!==t&&T&&(t*=s.distance(r,i),e?(i[0]=i[0]+t*e[0],i[1]=i[1]+t*e[1],i[2]=i[2]+t*e[2]):(e=p,i[0]=r[0]-t*e[0],i[1]=r[1]-t*e[1],i[2]=r[2]-t*e[2]),this.modified())},this.pan=function(t,e,n){T&&(i[0]+=t,i[1]+=e,i[2]+=n,r[0]+=t,r[1]+=e,r[2]+=n,this.modified())},this.computeOrthogonalAxes=function(){this.computeDirectionOfProjection(),s.cross(c,p,u),s.normalize(c,c),this.modified()},this.rotate=function(t,e){if(C){t=.5*t*(Math.PI/180),e=.5*e*(Math.PI/180);var n=o.create(),d=new s.create;o.identity(n),d[0]=-l[0],d[1]=-l[1],d[2]=-l[2],o.translate(n,n,l),o.rotate(n,n,t,u),o.rotate(n,n,e,c),o.translate(n,n,d),a.transformMat4(i,i,n),a.transformMat4(r,r,n),a.transformMat4(u,u,n),a.normalize(u,u),this.computeOrthogonalAxes(),this.modified()}},this.computeViewMatrix=function(){return y.getMTime()<this.getMTime()&&(o.lookAt(g,i,r,u),y.modified()),g},this.viewAlignment=function(){if(!S){var t=this.projectionMatrix();if(t[1]||t[2]||t[3]||t[4]||t[6]||t[7]||t[8]||t[9]||t[12]||t[13]||t[15])return null}var e=this.unitsPerPixel(A.zoom,A.tilesize);if(!A.width||!A.height||!e)return null;if(parseFloat(A.zoom.toFixed(6))!==parseFloat(A.zoom.toFixed(0)))return null;var n={roundx:e,roundy:e,dx:0,dy:0};return A.width%2&&(n.dx=.5*e),A.height%2&&(n.dy=.5*e),n},this.computeProjectionMatrix=function(){return x.getMTime()<this.getMTime()&&(S?o.ortho(v,b,_,M,w,d,h):o.perspective(v,n,f,d,h),x.modified()),v},this.zoomToHeight=function(t,i,r){return e.zoomToHeight(t,i,r,n)},this.computeDirectionOfProjection(),this},inherit(e.camera,e.groupNode),e.zoomToHeight=function(t,e,n,i){"use strict";i=i||30*Math.PI/180;var r=360*Math.pow(2,-t);return r/=2*Math.tan(i/2)*256/n},e.heightToZoom=function(t,e,n,i){"use strict";return i=i||30*Math.PI/180,t*=2*Math.tan(i/2)*256/n,-Math.log2(t/360)},e.interactorStyle=function(){"use strict";if(!(this instanceof e.interactorStyle))return new e.interactorStyle;e.object.call(this);var t=this,n=null;return this.viewer=function(){return n},this.setViewer=function(i){i!==n&&(l(n=i).on(e.event.mousePress,t.handleMouseDown),l(n).on(e.event.mouseRelease,t.handleMouseUp),l(n).on(e.event.mouseMove,t.handleMouseMove),l(n).on(e.event.mouseOut,t.handleMouseOut),l(n).on(e.event.mouseWheel,t.handleMouseWheel),l(n).on(e.event.keyPress,t.handleKeyPress),l(n).on(e.event.mouseContextMenu,t.handleContextMenu),l(n).on(e.event.click,t.handleClick),l(n).on(e.event.dblClick,t.handleDoubleClick),this.modified())},this.handleMouseDown=function(t){return t=t,!0},this.handleMouseUp=function(t){return t=t,!0},this.handleMouseMove=function(t){return t=t,!0},this.handleMouseOut=function(t){return t=t,!0},this.handleMouseWheel=function(t){return t=t,!0},this.handleClick=function(t){return t=t,!0},this.handleDoubleClick=function(t){return t=t,!0},this.handleKeyPress=function(t){return t=t,!0},this.handleContextMenu=function(t){return t=t,!0},this.reset=function(){return!0},this},inherit(e.interactorStyle,e.object),e.trackballInteractorStyle=function(){"use strict";if(!(this instanceof e.trackballInteractorStyle))return new e.trackballInteractorStyle;e.interactorStyle.call(this);var t,n=this,i=!1,r=!1,o=!1,s={x:0,y:0},l={x:0,y:0};return this.handleMouseMove=function(e){var u,c,d,h,f,p,m,g,v,y,x,b=n.viewer().renderWindow().windowSize()[0],_=n.viewer().renderWindow().windowSize()[1],w=n.viewer().renderWindow().activeRenderer(),M=w.camera(),A=n.viewer().relMouseCoords(e);if(t=!1,s={x:0,y:0},A.x<0||A.x>b?(s.x=0,t=!0):s.x=A.x,A.y<0||A.y>_?(s.y=0,t=!0):s.y=A.y,!0!==t)return u=M.focalPoint(),d=a.fromValues(u[0],u[1],u[2],1),c=w.worldToDisplay(d,M.viewMatrix(),M.projectionMatrix(),b,_),h=a.fromValues(s.x,s.y,c[2],1),f=a.fromValues(l.x,l.y,c[2],1),p=w.displayToWorld(h,M.viewMatrix(),M.projectionMatrix(),b,_),m=w.displayToWorld(f,M.viewMatrix(),M.projectionMatrix(),b,_),g=p[0]-m[0],v=p[1]-m[1],y=p[2]-m[2],o&&(M.pan(-g,-v,-y),n.viewer().render()),i&&(M.rotate(l.x-s.x,l.y-s.y),w.resetCameraClippingRange(),n.viewer().render()),r&&((x=2*(s.y-l.y)/_)>0?M.zoom(1-Math.abs(x)):M.zoom(1+Math.abs(x)),w.resetCameraClippingRange(),n.viewer().render()),l.x=s.x,l.y=s.y,!1},this.handleMouseDown=function(t){var e;return 0===t.button&&(i=!0),1===t.button&&(o=!0),2===t.button&&(r=!0),(e=n.viewer().relMouseCoords(t)).x<0?l.x=0:l.x=e.x,e.y<0?l.y=0:l.y=e.y,!1},this.handleMouseUp=function(t){return 0===t.button&&(i=!1),1===t.button&&(o=!1),2===t.button&&(r=!1),!1},this.handleMouseWheel=function(t){var e=n.viewer().renderWindow().activeRenderer(),i=e.camera();return t.originalEvent.wheelDelta<0?i.zoom(.9):i.zoom(1.1),e.resetCameraClippingRange(),n.viewer().render(),!0},this},inherit(e.trackballInteractorStyle,e.interactorStyle),e.viewer=function(t,n){"use strict";if(!(this instanceof e.viewer))return new e.viewer(t,n);e.object.call(this);var i=this,r=t,o=!0,a=null,s=e.renderer(n),u=e.renderWindow(r);return this.canvas=function(){return r},this.renderWindow=function(){return u},this.init=function(){null!==u?u._setup():console.log("[ERROR] No render window attached")},this.exit=function(t){null!==u?u._cleanup(t):console.log("[ERROR] No render window attached")},this.interactorStyle=function(){return a},this.setInteractorStyle=function(t){t!==a&&((a=t).setViewer(this),this.modified())},this.handleMouseDown=function(t){if(!0===o){var n=l.event.fix(t||window.event);2===t.button&&n.preventDefault(),n.state="down",n.type=e.event.mousePress,l(i).trigger(n)}return!0},this.handleMouseUp=function(t){if(!0===o){var n=l.event.fix(t||window.event);n.preventDefault(),n.state="up",n.type=e.event.mouseRelease,l(i).trigger(n)}return!0},this.handleMouseMove=function(t){if(!0===o){var n=l.event.fix(t||window.event);n.preventDefault(),n.type=e.event.mouseMove,l(i).trigger(n)}return!0},this.handleMouseWheel=function(t){if(!0===o){var n=l.event.fix(t||window.event);n.preventDefault(),n.type=e.event.mouseWheel,l(i).trigger(n)}return!0},this.handleMouseOut=function(t){if(!0===o){var n=l.event.fix(t||window.event);n.preventDefault(),n.type=e.event.mouseOut,l(i).trigger(n)}return!0},this.handleKeyPress=function(t){if(!0===o){var n=l.event.fix(t||window.event);n.preventDefault(),n.type=e.event.keyPress,l(i).trigger(n)}return!0},this.handleContextMenu=function(t){if(!0===o){var n=l.event.fix(t||window.event);n.preventDefault(),n.type=e.event.contextMenu,l(i).trigger(n)}return!1},this.handleClick=function(t){if(!0===o){var n=l.event.fix(t||window.event);n.preventDefault(),n.type=e.event.click,l(i).trigger(n)}return!1},this.handleDoubleClick=function(t){if(!0===o){var n=l.event.fix(t||window.event);n.preventDefault(),n.type=e.event.dblClick,l(i).trigger(n)}return!1},this.relMouseCoords=function(t){if(void 0===t.pageX||void 0===t.pageY)throw"Missing attributes pageX and pageY on the event";var e=0,n=0,i=r;do{e+=i.offsetLeft-i.scrollLeft,n+=i.offsetTop-i.scrollTop,i=i.offsetParent}while(i);return{x:t.pageX-e,y:t.pageY-n}},this.render=function(){u.render()},this.bindEventHandlers=function(){l(r).on("mousedown",this.handleMouseDown),l(r).on("mouseup",this.handleMouseUp),l(r).on("mousemove",this.handleMouseMove),l(r).on("mousewheel",this.handleMouseWheel),l(r).on("contextmenu",this.handleContextMenu)},this.unbindEventHandlers=function(){l(r).off("mousedown",this.handleMouseDown),l(r).off("mouseup",this.handleMouseUp),l(r).off("mousemove",this.handleMouseMove),l(r).off("mousewheel",this.handleMouseWheel),l(r).off("contextmenu",this.handleContextMenu)},this._init=function(){this.bindEventHandlers(),u.addRenderer(s)},this._init(),this},inherit(e.viewer,e.object),e.shader=function(t){"use strict";if(!(this instanceof e.shader))return new e.shader(t);e.object.call(this);var n=[],i=t,r="";this._getContextEntry=function(t){var i,r,o=t.m_context;for(i=0;i<n.length;i+=1)if(n[i].context===o)return n[i];return r={context:o,compileTimestamp:e.timestamp()},n.push(r),r},this.removeContext=function(t){var e,i=t.m_context;for(e=0;e<n.length;e+=1)if(n[e].context===i)return void n.splice(e,1)},this.shaderHandle=function(t){return this._getContextEntry(t).shaderHandle},this.shaderType=function(){return i},this.shaderSource=function(){return r},this.setShaderSource=function(t){r=t,this.modified()},this.compile=function(t){var n=this._getContextEntry(t);return this.getMTime()<n.compileTimestamp.getMTime()?n.shaderHandle:(t.m_context.deleteShader(n.shaderHandle),n.shaderHandle=t.m_context.createShader(i),t.m_context.shaderSource(n.shaderHandle,r),t.m_context.compileShader(n.shaderHandle),t.m_context.getShaderParameter(n.shaderHandle,e.GL.COMPILE_STATUS)?(n.compileTimestamp.modified(),n.shaderHandle):(console.log("[ERROR] An error occurred compiling the shaders: "+t.m_context.getShaderInfoLog(n.shaderHandle)),console.log(r),t.m_context.deleteShader(n.shaderHandle),null))},this.attachShader=function(t,e){t.m_context.attachShader(e,this.shaderHandle(t))}},inherit(e.shader,e.object),function(){"use strict";var t=[],n=10;e.getCachedShader=function(i,r,o){for(var a=0;a<t.length;a+=1)if(t[a].type===i&&t[a].context===r&&t[a].source===o)return a&&t.splice(0,0,t.splice(a,1)[0]),t[0].shader;var s=new e.shader(i);return s.setShaderSource(o),t.unshift({type:i,context:r,source:o,shader:s}),t.length>=n&&t.splice(n,t.length-n),s},e.clearCachedShaders=function(e){for(var n=t.length-1;n>=0;n-=1)null!=e&&t[n].context!==e||t.splice(n,1)}}();var i=function(){"use strict";var t=".",e=document.getElementsByTagName("script");if(e.length>0){var n=e.length-1,i=e[n];n=i.src.lastIndexOf("/"),t=i.src.substring(0,n)}return function(){return t}}();return e.shaderProgram=function(){"use strict";if(!(this instanceof e.shaderProgram))return new e.shaderProgram;e.materialAttribute.call(this,e.materialAttributeType.ShaderProgram);var t=this,n=0,r=e.timestamp(),o=e.timestamp(),a=[],s=[],u={},c={},d={};return this.loadFromFile=function(n,i){var r,o=!1;return l.ajax({url:i,type:"GET",dataType:"text",async:!1,success:function(i){(r=e.shader(n)).setShaderSource(i),t.addShader(r),o=!0}}),o},this.loadShader=function(t,e){return this.loadFromFile(t,i()+"/shaders/"+e)},this.queryUniformLocation=function(t,e){return t.m_context.getUniformLocation(n,e)},this.queryAttributeLocation=function(t,e){return t.m_context.getAttribLocation(n,e)},this.addShader=function(e){if(a.indexOf(e)>-1)return!1;var n;for(n=a.length-2;n>=0;n-=1)a[n].shaderType()===e.shaderType()&&a.splice(n,1);return a.push(e),t.modified(),!0},this.addUniform=function(e){return!(s.indexOf(e)>-1||(s.push(e),t.modified(),0))},this.addVertexAttribute=function(e,n){u[n]=e,t.modified()},this.uniformLocation=function(t){return c[t]},this.attributeLocation=function(t){return d[t]},this.uniform=function(t){var e;for(e=0;e<s.length;e+=1)if(s[e].name()===t)return s[e];return null},this.updateUniforms=function(t){var e;for(e=0;e<s.length;e+=1)s[e].callGL(t,c[s[e].name()])},this.link=function(t){return t.m_context.linkProgram(n),!!t.m_context.getProgramParameter(n,e.GL.LINK_STATUS)||(console.log("[ERROR] Unable to initialize the shader program."),!1)},this.use=function(t){t.m_context.useProgram(n)},this._setup=function(t){0===n&&(n=t.m_context.createProgram())},this._cleanup=function(e){t.deleteVertexAndFragment(e),t.deleteProgram(e),t.modified()},this.deleteProgram=function(t){n&&t.m_context.deleteProgram(n),n=0},this.deleteVertexAndFragment=function(t){var e;for(e=0;e<a.length;e+=1)a[e].shaderHandle(t)&&t.m_context.detachShader(n,a[e].shaderHandle(t)),t.m_context.deleteShader(a[e].shaderHandle(t)),a[e].removeContext(t)},this.compileAndLink=function(e){var i;if(!(r.getMTime()>=this.getMTime())){for(t._setup(e),i=0;i<a.length;i+=1)a[i].compile(e),a[i].attachShader(e,n);t.bindAttributes(e),t.link(e)||(console.log("[ERROR] Failed to link Program"),t._cleanup(e)),r.modified()}},this.bind=function(e){var n=0;for(o.getMTime()<t.getMTime()?(t.compileAndLink(e),t.use(e),t.bindUniforms(e),o.modified()):t.use(e),n=0;n<s.length;n+=1)s[n].update(e,t);t.updateUniforms(e)},this.undoBind=function(t){t.m_context.useProgram(null)},this.bindVertexData=function(t,e){u.hasOwnProperty(e)&&u[e].bindVertexData(t,e)},this.undoBindVertexData=function(t,e){u.hasOwnProperty(e)&&u[e].undoBindVertexData(t,e)},this.bindUniforms=function(t){var e;for(e=0;e<s.length;e+=1)c[s[e].name()]=this.queryUniformLocation(t,s[e].name())},this.bindAttributes=function(t){var e,i;for(e in u)u.hasOwnProperty(e)&&(i=u[e].name(),t.m_context.bindAttribLocation(n,e,i),d[i]=e)},t},inherit(e.shaderProgram,e.materialAttribute),e.texture=function(){"use strict";if(!(this instanceof e.texture))return new e.texture;e.materialAttribute.call(this,e.materialAttributeType.Texture),this.m_width=0,this.m_height=0,this.m_depth=0,this.m_textureHandle=null,this.m_textureUnit=0,this.m_pixelFormat=e.GL.RGBA,this.m_pixelDataType=e.GL.UNSIGNED_BYTE,this.m_internalFormat=e.GL.RGBA,this.m_nearestPixel=!1,this.m_image=null;var t=e.timestamp(),n=this;function i(t){switch(n.m_textureUnit){case 0:t.m_context.activeTexture(e.GL.TEXTURE0);break;case 1:t.m_context.activeTexture(e.GL.TEXTURE1);break;case 2:t.m_context.activeTexture(e.GL.TEXTURE2);break;case 3:t.m_context.activeTexture(e.GL.TEXTURE3);break;case 4:t.m_context.activeTexture(e.GL.TEXTURE4);break;case 5:t.m_context.activeTexture(e.GL.TEXTURE5);break;case 6:t.m_context.activeTexture(e.GL.TEXTURE6);break;case 7:t.m_context.activeTexture(e.GL.TEXTURE7);break;case 8:t.m_context.activeTexture(e.GL.TEXTURE8);break;case 9:t.m_context.activeTexture(e.GL.TEXTURE9);break;case 10:t.m_context.activeTexture(e.GL.TEXTURE10);break;case 11:t.m_context.activeTexture(e.GL.TEXTURE11);break;case 12:t.m_context.activeTexture(e.GL.TEXTURE12);break;case 13:t.m_context.activeTexture(e.GL.TEXTURE13);break;case 14:t.m_context.activeTexture(e.GL.TEXTURE14);break;case 15:t.m_context.activeTexture(e.GL.TEXTURE15);break;default:throw"[error] Texture unit "+n.m_textureUnit+" is not supported"}}return this.setup=function(n){i(n),n.m_context.deleteTexture(this.m_textureHandle),this.m_textureHandle=n.m_context.createTexture(),n.m_context.bindTexture(e.GL.TEXTURE_2D,this.m_textureHandle),n.m_context.texParameteri(e.GL.TEXTURE_2D,e.GL.TEXTURE_MIN_FILTER,this.m_nearestPixel?e.GL.NEAREST:e.GL.LINEAR),n.m_context.texParameteri(e.GL.TEXTURE_2D,e.GL.TEXTURE_MAG_FILTER,this.m_nearestPixel?e.GL.NEAREST:e.GL.LINEAR),n.m_context.texParameteri(e.GL.TEXTURE_2D,e.GL.TEXTURE_WRAP_S,e.GL.CLAMP_TO_EDGE),n.m_context.texParameteri(e.GL.TEXTURE_2D,e.GL.TEXTURE_WRAP_T,e.GL.CLAMP_TO_EDGE),null!==this.m_image?(n.m_context.pixelStorei(e.GL.UNPACK_ALIGNMENT,1),n.m_context.pixelStorei(e.GL.UNPACK_FLIP_Y_WEBGL,!0),this.updateDimensions(),this.computeInternalFormatUsingImage(),n.m_context.texImage2D(e.GL.TEXTURE_2D,0,this.m_internalFormat,this.m_pixelFormat,this.m_pixelDataType,this.m_image)):n.m_context.texImage2D(e.GL.TEXTURE_2D,0,this.m_internalFormat,this.m_width,this.m_height,0,this.m_pixelFormat,this.m_pixelDataType,null),n.m_context.bindTexture(e.GL.TEXTURE_2D,null),t.modified()},this.bind=function(n){this.getMTime()>t.getMTime()&&this.setup(n),i(n),n.m_context.bindTexture(e.GL.TEXTURE_2D,this.m_textureHandle)},this.undoBind=function(t){t.m_context.bindTexture(e.GL.TEXTURE_2D,null)},this.image=function(){return this.m_image},this.setImage=function(t){return null!==t&&(this.m_image=t,this.updateDimensions(),this.modified(),!0)},this.nearestPixel=function(){return this.m_nearestPixel},this.setNearestPixel=function(t){return(t=!!t)!==this.m_nearestPixel&&(this.m_nearestPixel=t,this.modified(),!0)},this.textureUnit=function(){return this.m_textureUnit},this.setTextureUnit=function(t){return this.m_textureUnit!==t&&(this.m_textureUnit=t,this.modified(),!0)},this.width=function(){return this.m_width},this.setWidth=function(t){return n.m_width!==t&&(n.m_width=t,n.modified(),!0)},this.height=function(){return n.m_height},this.setHeight=function(t){return n.m_height!==t&&(n.m_height=t,n.modified(),!0)},this.depth=function(){return this.m_depth},this.setDepth=function(t){return null!==this.m_image&&(this.m_depth=t,this.modified(),!0)},this.textureHandle=function(){return this.m_textureHandle},this.internalFormat=function(){return this.m_internalFormat},this.setInternalFormat=function(t){return this.m_internalFormat!==t&&(this.m_internalFormat=t,this.modified(),!0)},this.pixelFormat=function(){return this.m_pixelFormat},this.setPixelFormat=function(t){return null!==this.m_image&&(this.m_pixelFormat=t,this.modified(),!0)},this.pixelDataType=function(){return this.m_pixelDataType},this.setPixelDataType=function(t){return null!==this.m_image&&(this.m_pixelDataType=t,this.modified(),!0)},this.computeInternalFormatUsingImage=function(){this.m_internalFormat=e.GL.RGBA,this.m_pixelFormat=e.GL.RGBA,this.m_pixelDataType=e.GL.UNSIGNED_BYTE},this.updateDimensions=function(){null!==this.m_image&&(this.m_width=this.m_image.width,this.m_height=this.m_image.height,this.m_depth=0)},this},inherit(e.texture,e.materialAttribute),e.lookupTable=function(){"use strict";if(!(this instanceof e.lookupTable))return new e.lookupTable;e.texture.call(this);var t=e.timestamp(),n=[0,0];return this.m_colorTable=[.07514311,.468049805,1,1,.247872569,.498782363,1,1,.339526309,.528909511,1,1,.409505078,.558608486,1,1,.468487184,.588057293,1,1,.520796675,.617435078,1,1,.568724526,.646924167,1,1,.613686735,.676713218,1,1,.656658579,.707001303,1,1,.698372844,.738002964,1,1,.739424025,.769954435,1,1,.780330104,.803121429,1,1,.821573924,.837809045,1,1,.863634967,.874374691,1,1,.907017747,.913245283,1,1,.936129275,.938743558,.983038586,1,.943467973,.943498599,.943398095,1,.990146732,.928791426,.917447482,1,1,.88332677,.861943246,1,1,.833985467,.803839606,1,1,.788626485,.750707739,1,1,.746206642,.701389973,1,1,.70590052,.654994046,1,1,.667019783,.610806959,1,1,.6289553,.568237474,1,1,.591130233,.526775617,1,1,.552955184,.485962266,1,1,.513776083,.445364274,1,1,.472800903,.404551679,1,1,.428977855,.363073592,1,1,.380759558,.320428137,1,.961891484,.313155629,.265499262,1,.916482116,.236630659,.209939162,1].map((function(t){return 255*t})),this.setup=function(n){0===this.textureUnit()?n.m_context.activeTexture(e.GL.TEXTURE0):1===this.textureUnit()&&n.m_context.activeTexture(e.GL.TEXTURE1),n.m_context.deleteTexture(this.m_textureHandle),this.m_textureHandle=n.m_context.createTexture(),n.m_context.bindTexture(e.GL.TEXTURE_2D,this.m_textureHandle),n.m_context.texParameteri(e.GL.TEXTURE_2D,e.GL.TEXTURE_MIN_FILTER,e.GL.LINEAR),n.m_context.texParameteri(e.GL.TEXTURE_2D,e.GL.TEXTURE_MAG_FILTER,e.GL.LINEAR),n.m_context.texParameteri(e.GL.TEXTURE_2D,e.GL.TEXTURE_WRAP_S,e.GL.CLAMP_TO_EDGE),n.m_context.texParameteri(e.GL.TEXTURE_2D,e.GL.TEXTURE_WRAP_T,e.GL.CLAMP_TO_EDGE),n.m_context.pixelStorei(e.GL.UNPACK_ALIGNMENT,1),this.m_width=this.m_colorTable.length/4,this.m_height=1,this.m_depth=0,n.m_context.texImage2D(e.GL.TEXTURE_2D,0,e.GL.RGBA,this.m_width,this.m_height,this.m_depth,e.GL.RGBA,e.GL.UNSIGNED_BYTE,new Uint8Array(this.m_colorTable)),n.m_context.bindTexture(e.GL.TEXTURE_2D,null),t.modified()},this.colorTable=function(){return this.m_colorTable},this.setColorTable=function(t){return this.m_colorTable!==t&&(this.m_colorTable=t,this.modified(),!0)},this.range=function(){return n},this.setRange=function(t){return n!==t&&(n=t,this.modified(),!0)},this.updateRange=function(t){t instanceof Array||console.log("[error] Invalid data type for range. Requires array [min,max]"),t[0]<n[0]&&(n[0]=t[0],this.modified()),t[1]>n[1]&&(n[1]=t[1],this.modified())},this},inherit(e.lookupTable,e.texture),e.uniform=function(t,n){"use strict";if(!(this instanceof e.uniform))return new e.uniform(t,n);this.getTypeNumberOfComponents=function(t){switch(t){case e.GL.FLOAT:case e.GL.INT:case e.GL.BOOL:return 1;case e.GL.FLOAT_VEC2:case e.GL.INT_VEC2:case e.GL.BOOL_VEC2:return 2;case e.GL.FLOAT_VEC3:case e.GL.INT_VEC3:case e.GL.BOOL_VEC3:return 3;case e.GL.FLOAT_VEC4:case e.GL.INT_VEC4:case e.GL.BOOL_VEC4:return 4;case e.GL.FLOAT_MAT3:return 9;case e.GL.FLOAT_MAT4:return 16;default:return 0}};var i=t,r=n,o=[];return o.length=this.getTypeNumberOfComponents(i),this.name=function(){return r},this.type=function(){return i},this.get=function(){return o},this.set=function(t){var e=0,n=o.length;if(1!==n)for(e=0;e<n;e+=1)o[e]=t[e];else o[0]=t},this.callGL=function(t,n){switch(i){case e.GL.BOOL:case e.GL.INT:t.m_context.uniform1iv(n,o);break;case e.GL.FLOAT:t.m_context.uniform1fv(n,o);break;case e.GL.BOOL_VEC2:case e.GL.INT_VEC2:t.m_context.uniform2iv(n,o);break;case e.GL.FLOAT_VEC2:t.m_context.uniform2fv(n,o);break;case e.GL.BOOL_VEC3:case e.GL.INT_VEC3:t.m_context.uniform3iv(n,o);break;case e.GL.FLOAT_VEC3:t.m_context.uniform3fv(n,o);break;case e.GL.BOOL_VEC4:case e.GL.INT_VEC4:t.m_context.uniform4iv(n,o);break;case e.GL.FLOAT_VEC4:t.m_context.uniform4fv(n,o);break;case e.GL.FLOAT_MAT3:t.m_context.uniformMatrix3fv(n,e.GL.FALSE,o);break;case e.GL.FLOAT_MAT4:t.m_context.uniformMatrix4fv(n,e.GL.FALSE,o)}},this.update=function(t,e){},this},e.modelViewUniform=function(t){"use strict";return this instanceof e.modelViewUniform?(t||(t="modelViewMatrix"),e.uniform.call(this,e.GL.FLOAT_MAT4,t),this.set(o.create()),this.update=function(t,e){this.set(t.m_modelViewMatrix)},this):new e.modelViewUniform(t)},inherit(e.modelViewUniform,e.uniform),e.modelViewOriginUniform=function(t,n){"use strict";if(!(this instanceof e.modelViewOriginUniform))return new e.modelViewOriginUniform(t,n);t||(t="modelViewMatrix");var i=[(n=n||[0,0,0])[0],n[1],n[2]||0];return e.uniform.call(this,e.GL.FLOAT_MAT4,t),this.set(o.create()),this.setOrigin=function(t){i=[(t=t||[0,0,0])[0],t[1],t[2]||0]},this.update=function(t,e){var n=t.m_modelViewMatrix;if(t.m_modelViewAlignment){var r=t.m_modelViewAlignment;(n=n.slice?n.slice():Array.prototype.slice.call(n))[12]=Math.round(n[12]/r.roundx)*r.roundx+r.dx,n[13]=Math.round(n[13]/r.roundy)*r.roundy+r.dy}n=o.translate(o.create(),n,i),this.set(n)},this},inherit(e.modelViewOriginUniform,e.uniform),e.projectionUniform=function(t){"use strict";return this instanceof e.projectionUniform?(t||(t="projectionMatrix"),e.uniform.call(this,e.GL.FLOAT_MAT4,t),this.set(o.create()),this.update=function(t,e){this.set(t.m_projectionMatrix)},this):new e.projectionUniform(t)},inherit(e.projectionUniform,e.uniform),e.floatUniform=function(t,n){"use strict";if(!(this instanceof e.floatUniform))return new e.floatUniform(t,n);t||(t="floatUniform"),n=void 0===n?1:n,e.uniform.call(this,e.GL.FLOAT,t),this.set(n)},inherit(e.floatUniform,e.uniform),e.normalMatrixUniform=function(t){"use strict";return this instanceof e.normalMatrixUniform?(t||(t="normalMatrix"),e.uniform.call(this,e.GL.FLOAT_MAT4,t),this.set(o.create()),this.update=function(t,e){this.set(t.m_normalMatrix)},this):new e.normalMatrixUniform(t)},inherit(e.normalMatrixUniform,e.uniform),e.vertexAttributeKeys={Position:0,Normal:1,TextureCoordinate:2,Color:3,Scalar:4,CountAttributeIndex:5},e.vertexAttributeKeysIndexed={Zero:0,One:1,Two:2,Three:3,Four:4,Five:5,Six:6,Seven:7,Eight:8,Nine:9},e.vertexAttribute=function(t){"use strict";if(!(this instanceof e.vertexAttribute))return new e.vertexAttribute(t);var n=t;this.name=function(){return n},this.bindVertexData=function(t,e){var i=t.m_mapper.geometryData().sourceData(e),r=t.m_material.shaderProgram();t.m_context.vertexAttribPointer(r.attributeLocation(n),i.attributeNumberOfComponents(e),i.attributeDataType(e),i.normalized(e),i.attributeStride(e),i.attributeOffset(e)),t.m_context.enableVertexAttribArray(r.attributeLocation(n))},this.undoBindVertexData=function(t,e){e=e;var i=t.m_material.shaderProgram();t.m_context.disableVertexAttribArray(i.attributeLocation(n))}},e.source=function(){"use strict";return this instanceof e.source?(e.object.call(this),this.create=function(){},this):new e.source},inherit(e.source,e.object),e.planeSource=function(){"use strict";if(!(this instanceof e.planeSource))return new e.planeSource;e.source.call(this);var t=[0,0,0],n=[1,0,0],i=[0,1,0],r=[0,0,1],o=1,a=1,s=null;this.setOrigin=function(e,n,i){t[0]=e,t[1]=n,t[2]=i},this.setPoint1=function(t,e,i){n[0]=t,n[1]=e,n[2]=i},this.setPoint2=function(t,e,n){i[0]=t,i[1]=e,i[2]=n},this.create=function(){s=new e.geometryData;var l,u,c,d,h,f=[],p=[],m=[],g=[],v=[],y=0,x=0,b=0,_=0,w=[],M=[],A=[],T=[],C=[],E=null,S=null,k=null;for(f.length=3,p.length=2,m.length=3,g.length=3,v.length=3,l=0;l<3;l+=1)m[l]=n[l]-t[l],g[l]=i[l]-t[l];for(d=(o+1)*(a+1),w.length=3*d,M.length=3*d,T.length=2*d,C.length=d,l=0;l<a+1;l+=1)for(p[1]=l/a,u=0;u<o+1;u+=1){for(p[0]=u/o,c=0;c<3;c+=1)f[c]=t[c]+p[0]*m[c]+p[1]*g[c];w[y++]=f[0],w[y++]=f[1],w[y++]=f[2],A[b++]=1,A[b++]=1,A[b++]=1,M[x++]=r[0],M[x++]=r[1],M[x++]=r[2],T[_++]=p[0],T[_++]=p[1]}for(l=0;l<a;l+=1)for(u=0;u<o;u+=1)v[0]=u+l*(o+1),v[1]=v[0]+1,v[2]=v[0]+o+2,v[3]=v[0]+o+1;for(l=0;l<d;l+=1)C[l]=l;return(E=new e.triangleStrip).setIndices(C),(S=e.sourceDataP3fv()).pushBack(w),(k=e.sourceDataC3fv()).pushBack(A),(h=e.sourceDataT2fv()).pushBack(T),s.addSource(S),s.addSource(k),s.addSource(h),s.addPrimitive(E),s}},inherit(e.planeSource,e.source),e.pointSource=function(){"use strict";if(!(this instanceof e.pointSource))return new e.pointSource;e.source.call(this);var t=this,n=[],i=[],r=[],o=[],a=null;this.getPositions=function(){return n},this.setPositions=function(e){e instanceof Array?n=e:console.log("[ERROR] Invalid data type for positions. Array is required."),t.modified()},this.getColors=function(){return i},this.setColors=function(e){e instanceof Array?i=e:console.log("[ERROR] Invalid data type for colors. Array is required."),t.modified()},this.getSize=function(){return o},this.setSize=function(t){o=t,this.modified()},this.setTextureCoordinates=function(e){e instanceof Array?r=e:console.log("[ERROR] Invalid data type for texture coordinates. Array is required."),t.modified()},this.create=function(){if(a=new e.geometryData,n.length%3==0){var t,s,l,u,c,d=n.length/3,h=0,f=[];for(f.length=d,h=0;h<d;h+=1)f[h]=h;if(c=e.sourceDataDf(),d!==o.length)for(h=0;h<d;h+=1)c.pushBack(o);else c.setData(o);return a.addSource(c),(t=new e.points).setIndices(f),(s=e.sourceDataP3fv()).pushBack(n),a.addSource(s),i.length>0&&i.length===n.length?((l=e.sourceDataC3fv()).pushBack(i),a.addSource(l)):i.length>0&&i.length!==n.length&&console.log("[ERROR] Number of colors are different than number of points"),r.length>0&&r.length===n.length?((u=e.sourceDataT2fv()).pushBack(r),a.addSource(u)):r.length>0&&r.length/2!=n.length/3&&console.log("[ERROR] Number of texture coordinates are different than number of points"),a.addPrimitive(t),a}console.log("[ERROR] Invalid length of the points array")}},inherit(e.pointSource,e.source),e.lineSource=function(t,n){"use strict";if(!(this instanceof e.lineSource))return new e.lineSource;e.source.call(this);var i=t,r=n;this.setPositions=function(t){return t instanceof Array?(i=t,this.modified(),!0):(console.log("[ERROR] Invalid data type for positions. Array is required."),!1)},this.setColors=function(t){return t instanceof Array?(r=t,this.modified(),!0):(console.log("[ERROR] Invalid data type for colors. Array is required."),!1)},this.create=function(){if(i)if(i.length%3==0){if(i.length%3==0){var t,n,o,a,s=new e.geometryData,l=i.length/3,u=[];for(u.length=l,t=0;t<l;t+=1)u[t]=t;return(n=new e.lines).setIndices(u),(o=e.sourceDataP3fv()).pushBack(i),s.addSource(o),r&&r.length>0&&r.length===i.length?((a=e.sourceDataC3fv()).pushBack(r),s.addSource(a)):r&&r.length>0&&r.length!==i.length&&console.log("[error] Number of colors are different than number of points"),s.addPrimitive(n),s}console.log("[ERROR] Invalid length of the points array")}else console.log("[error] Line source requires 3d points");else console.log("[error] Invalid positions")}},inherit(e.lineSource,e.source),e.utils=function(){"use strict";return this instanceof e.utils?(e.object.call(this),this):new e.utils},inherit(e.utils,e.object),e.utils.computePowerOfTwo=function(t,e){"use strict";for(e=e||1;e<t;)e*=2;return e},e.utils.createTextureVertexShader=function(t){"use strict";var n=["attribute vec3 vertexPosition;","attribute vec3 textureCoord;","uniform mediump float pointSize;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","varying highp vec3 iTextureCoord;","void main(void)","{","gl_PointSize = pointSize;","gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition, 1.0);"," iTextureCoord = textureCoord;","}"].join("\n");return e.getCachedShader(e.GL.VERTEX_SHADER,t,n)},e.utils.createTextureFragmentShader=function(t){"use strict";var n=["varying highp vec3 iTextureCoord;","uniform sampler2D sampler2d;","uniform mediump float opacity;","void main(void) {","gl_FragColor = vec4(texture2D(sampler2d, vec2(iTextureCoord.s, iTextureCoord.t)).xyz, opacity);","}"].join("\n");return e.getCachedShader(e.GL.FRAGMENT_SHADER,t,n)},e.utils.createRgbaTextureFragmentShader=function(t){"use strict";var n=["varying highp vec3 iTextureCoord;","uniform sampler2D sampler2d;","uniform mediump float opacity;","void main(void) {"," mediump vec4 color = vec4(texture2D(sampler2d, vec2(iTextureCoord.s, iTextureCoord.t)).xyzw);"," color.w *= opacity;"," gl_FragColor = color;","}"].join("\n");return e.getCachedShader(e.GL.FRAGMENT_SHADER,t,n)},e.utils.createVertexShader=function(t){"use strict";var n=["attribute vec3 vertexPosition;","attribute vec3 vertexColor;","uniform mediump float pointSize;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","varying mediump vec3 iVertexColor;","varying highp vec3 iTextureCoord;","void main(void)","{","gl_PointSize = pointSize;","gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition, 1.0);"," iVertexColor = vertexColor;","}"].join("\n");return e.getCachedShader(e.GL.VERTEX_SHADER,t,n)},e.utils.createPointVertexShader=function(t){"use strict";var n=["attribute vec3 vertexPosition;","attribute vec3 vertexColor;","attribute float vertexSize;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","varying mediump vec3 iVertexColor;","varying highp vec3 iTextureCoord;","void main(void)","{","gl_PointSize = vertexSize;","gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition, 1.0);"," iVertexColor = vertexColor;","}"].join("\n");return e.getCachedShader(e.GL.VERTEX_SHADER,t,n)},e.utils.createVertexShaderSolidColor=function(t){"use strict";var n=["attribute vec3 vertexPosition;","uniform mediump float pointSize;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","void main(void)","{","gl_PointSize = pointSize;","gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition, 1.0);","}"].join("\n");return e.getCachedShader(e.GL.VERTEX_SHADER,t,n)},e.utils.createVertexShaderColorMap=function(t,n,i){"use strict";n=n,i=i;var r=["attribute vec3 vertexPosition;","attribute float vertexScalar;","uniform mediump float pointSize;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float lutMin;","uniform float lutMax;","varying mediump float iVertexScalar;","void main(void)","{","gl_PointSize = pointSize;","gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition, 1.0);","iVertexScalar = (vertexScalar-lutMin)/(lutMax-lutMin);","}"].join("\n");return e.getCachedShader(e.GL.VERTEX_SHADER,t,r)},e.utils.createFragmentShader=function(t){"use strict";var n=["varying mediump vec3 iVertexColor;","uniform mediump float opacity;","void main(void) {","gl_FragColor = vec4(iVertexColor, opacity);","}"].join("\n");return e.getCachedShader(e.GL.FRAGMENT_SHADER,t,n)},e.utils.createPhongVertexShader=function(t){"use strict";var n=["attribute highp vec3 vertexPosition;","attribute mediump vec3 vertexNormal;","attribute mediump vec3 vertexColor;","uniform highp mat4 projectionMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 normalMatrix;","varying highp vec4 varPosition;","varying mediump vec3 varNormal;","varying mediump vec3 varVertexColor;","void main(void)","{","varPosition = modelViewMatrix * vec4(vertexPosition, 1.0);","gl_Position = projectionMatrix * varPosition;","varNormal = vec3(normalMatrix * vec4(vertexNormal, 0.0));","varVertexColor = vertexColor;","}"].join("\n");return e.getCachedShader(e.GL.VERTEX_SHADER,t,n)},e.utils.createPhongFragmentShader=function(t){"use strict";var n=["uniform mediump float opacity;","precision mediump float;","varying vec3 varNormal;","varying vec4 varPosition;","varying mediump vec3 varVertexColor;","const vec3 lightPos = vec3(0.0, 0.0,10000.0);","const vec3 ambientColor = vec3(0.01, 0.01, 0.01);","const vec3 specColor = vec3(0.0, 0.0, 0.0);","void main() {","vec3 normal = normalize(varNormal);","vec3 lightDir = normalize(lightPos);","vec3 reflectDir = -reflect(lightDir, normal);","vec3 viewDir = normalize(-varPosition.xyz);","float lambertian = max(dot(lightDir, normal), 0.0);","vec3 color = vec3(0.0);","if(lambertian > 0.0) {"," color = lambertian * varVertexColor;","}","gl_FragColor = vec4(color * opacity, 1.0 - opacity);","}"].join("\n");return e.getCachedShader(e.GL.FRAGMENT_SHADER,t,n)},e.utils.createFragmentShaderSolidColor=function(t,n){"use strict";var i=["uniform mediump float opacity;","void main(void) {","gl_FragColor = vec4("+n[0]+","+n[1]+","+n[2]+", opacity);","}"].join("\n");return e.getCachedShader(e.GL.FRAGMENT_SHADER,t,i)},e.utils.createFragmentShaderColorMap=function(t){"use strict";var n=["varying mediump float iVertexScalar;","uniform sampler2D sampler2d;","uniform mediump float opacity;","void main(void) {","gl_FragColor = vec4(texture2D(sampler2d, vec2(iVertexScalar, 0.0)).xyz, opacity);","}"].join("\n");return e.getCachedShader(e.GL.FRAGMENT_SHADER,t,n)},e.utils.createPointSpritesVertexShader=function(t){"use strict";var n=["attribute vec3 vertexPosition;","attribute vec3 vertexColor;","uniform mediump vec2 pointSize;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float height;","varying mediump vec3 iVertexColor;","varying highp float iVertexScalar;","void main(void)","{","mediump float realPointSize = pointSize.y;","if (pointSize.x > pointSize.y) {"," realPointSize = pointSize.x;}","gl_PointSize = realPointSize ;","iVertexScalar = vertexPosition.z;","gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition.xy, height, 1.0);"," iVertexColor = vertexColor;","}"].join("\n");return e.getCachedShader(e.GL.VERTEX_SHADER,t,n)},e.utils.createPointSpritesFragmentShader=function(t){"use strict";var n=["varying mediump vec3 iVertexColor;","varying highp float iVertexScalar;","uniform sampler2D opacityLookup;","uniform highp float lutMin;","uniform highp float lutMax;","uniform sampler2D scalarsToColors;","uniform int useScalarsToColors;","uniform int useVertexColors;","uniform mediump vec2 pointSize;","uniform mediump float vertexColorWeight;","void main(void) {","mediump vec2 realTexCoord;","if (pointSize.x > pointSize.y) {"," realTexCoord = vec2(1.0, pointSize.y/pointSize.x) * gl_PointCoord;","} else {"," realTexCoord = vec2(pointSize.x/pointSize.y, 1.0) * gl_PointCoord;","}","highp float texOpacity = texture2D(opacityLookup, realTexCoord).w;","if (useScalarsToColors == 1) {"," gl_FragColor = vec4(texture2D(scalarsToColors, vec2((iVertexScalar - lutMin)/(lutMax - lutMin), 0.0)).xyz, texOpacity);","} else if (useVertexColors == 1) {"," gl_FragColor = vec4(iVertexColor, texOpacity);","} else {"," gl_FragColor = vec4(texture2D(opacityLookup, realTexCoord).xyz, texOpacity);","}}"].join("\n");return e.getCachedShader(e.GL.FRAGMENT_SHADER,t,n)},e.utils.createTextureMaterial=function(t,n){"use strict";var i,r=new e.material,o=new e.blend,a=new e.shaderProgram,s=e.utils.createTextureVertexShader(e.GL),l=null,u=new e.vertexAttribute("vertexPosition"),c=new e.vertexAttribute("textureCoord"),d=new e.floatUniform("pointSize",5),h=new e.projectionUniform("projectionMatrix"),f=new e.uniform(e.GL.INT,"sampler2d"),p=null;return i=void 0!==n?new e.modelViewOriginUniform("modelViewMatrix",n):new e.modelViewUniform("modelViewMatrix"),f.set(0),a.addVertexAttribute(u,e.vertexAttributeKeys.Position),a.addVertexAttribute(c,e.vertexAttributeKeys.TextureCoordinate),a.addUniform(d),a.addUniform(i),a.addUniform(h),l=t?e.utils.createRgbaTextureFragmentShader(e.GL):e.utils.createTextureFragmentShader(e.GL),p=new e.floatUniform("opacity",1),a.addUniform(p),a.addShader(l),a.addShader(s),r.addAttribute(a),r.addAttribute(o),r},e.utils.createGeometryMaterial=function(){"use strict";var t=new e.material,n=new e.shaderProgram,i=5,r=1,o=e.utils.createVertexShader(e.GL),a=e.utils.createFragmentShader(e.GL),s=new e.vertexAttribute("vertexPosition"),l=new e.vertexAttribute("vertexColor"),u=new e.floatUniform("pointSize",i),c=new e.floatUniform("opacity",r),d=new e.modelViewUniform("modelViewMatrix"),h=new e.projectionUniform("projectionMatrix");return n.addVertexAttribute(s,e.vertexAttributeKeys.Position),n.addVertexAttribute(l,e.vertexAttributeKeys.Color),n.addUniform(u),n.addUniform(c),n.addUniform(d),n.addUniform(h),n.addShader(a),n.addShader(o),t.addAttribute(n),t},e.utils.createPointGeometryMaterial=function(t){"use strict";t=void 0===t?1:t;var n=new e.material,i=new e.blend,r=new e.shaderProgram,o=e.utils.createPointVertexShader(e.GL),a=e.utils.createFragmentShader(e.GL),s=new e.vertexAttribute("vertexPosition"),l=new e.vertexAttribute("vertexColor"),u=new e.vertexAttribute("vertexSize"),c=new e.floatUniform("opacity",t),d=new e.modelViewUniform("modelViewMatrix"),h=new e.projectionUniform("projectionMatrix");return r.addVertexAttribute(s,e.vertexAttributeKeys.Position),r.addVertexAttribute(l,e.vertexAttributeKeys.Color),r.addVertexAttribute(u,e.vertexAttributeKeys.Scalar),r.addUniform(c),r.addUniform(d),r.addUniform(h),r.addShader(a),r.addShader(o),n.addAttribute(r),n.addAttribute(i),n},e.utils.createPhongMaterial=function(){"use strict";var t=new e.material,n=new e.shaderProgram,i=e.utils.createPhongVertexShader(e.GL),r=e.utils.createPhongFragmentShader(e.GL),o=new e.vertexAttribute("vertexPosition"),a=new e.vertexAttribute("vertexNormal"),s=new e.vertexAttribute("vertexColor"),l=new e.floatUniform("opacity",1),u=new e.modelViewUniform("modelViewMatrix"),c=new e.normalMatrixUniform("normalMatrix"),d=new e.projectionUniform("projectionMatrix");return n.addVertexAttribute(o,e.vertexAttributeKeys.Position),n.addVertexAttribute(a,e.vertexAttributeKeys.Normal),n.addVertexAttribute(s,e.vertexAttributeKeys.Color),n.addUniform(l),n.addUniform(u),n.addUniform(d),n.addUniform(c),n.addShader(r),n.addShader(i),t.addAttribute(n),t},e.utils.createColorMaterial=function(){"use strict";var t=new e.material,n=new e.blend,i=new e.shaderProgram,r=e.utils.createVertexShader(e.GL),o=e.utils.createFragmentShader(e.GL),a=new e.vertexAttribute("vertexPosition"),s=new e.vertexAttribute("textureCoord"),l=new e.vertexAttribute("vertexColor"),u=new e.floatUniform("pointSize",5),c=new e.floatUniform("opacity",1),d=new e.modelViewUniform("modelViewMatrix"),h=new e.projectionUniform("projectionMatrix");return i.addVertexAttribute(a,e.vertexAttributeKeys.Position),i.addVertexAttribute(l,e.vertexAttributeKeys.Color),i.addVertexAttribute(s,e.vertexAttributeKeys.TextureCoordinate),i.addUniform(u),i.addUniform(c),i.addUniform(d),i.addUniform(h),i.addShader(o),i.addShader(r),t.addAttribute(i),t.addAttribute(n),t},e.utils.createColorMappedMaterial=function(t){"use strict";t||(t=new e.lookupTable);var n=t.range(),i=new e.material,r=new e.blend,o=new e.shaderProgram,a=e.utils.createVertexShaderColorMap(e.GL,n[0],n[1]),s=e.utils.createFragmentShaderColorMap(e.GL),l=new e.vertexAttribute("vertexPosition"),u=new e.vertexAttribute("vertexScalar"),c=new e.floatUniform("pointSize",5),d=new e.floatUniform("opacity",1),h=new e.floatUniform("lutMin",n[0]),f=new e.floatUniform("lutMax",n[1]),p=new e.modelViewUniform("modelViewMatrix"),m=new e.projectionUniform("projectionMatrix"),g=t;return new e.uniform(e.GL.FLOAT,"sampler2d").set(0),o.addVertexAttribute(l,e.vertexAttributeKeys.Position),o.addVertexAttribute(u,e.vertexAttributeKeys.Scalar),o.addUniform(c),o.addUniform(d),o.addUniform(h),o.addUniform(f),o.addUniform(p),o.addUniform(m),o.addShader(s),o.addShader(a),i.addAttribute(o),i.addAttribute(r),i.addAttribute(g),i},e.utils.updateColorMappedMaterial=function(t,e){"use strict";if(t)if(e){var n=t.shaderProgram().uniform("lutMin"),i=t.shaderProgram().uniform("lutMax");n.set(e.range()[0]),i.set(e.range()[1]),t.setAttribute(e)}else console.log("[warning] Invalid lookup table. Nothing to update.");else console.log("[warning] Invalid material. Nothing to update.")},e.utils.createSolidColorMaterial=function(t){"use strict";t||(t=[1,1,1]);var n=new e.material,i=new e.blend,r=new e.shaderProgram,o=e.utils.createVertexShaderSolidColor(e.GL),a=e.utils.createFragmentShaderSolidColor(e.GL,t),s=new e.vertexAttribute("vertexPosition"),l=new e.floatUniform("pointSize",5),u=new e.floatUniform("opacity",1),c=new e.modelViewUniform("modelViewMatrix"),d=new e.projectionUniform("projectionMatrix");return r.addVertexAttribute(s,e.vertexAttributeKeys.Position),r.addUniform(l),r.addUniform(u),r.addUniform(c),r.addUniform(d),r.addShader(a),r.addShader(o),n.addAttribute(r),n.addAttribute(i),n},e.utils.createPointSpritesMaterial=function(t,n){"use strict";var i=void 0===n?[0,1]:n.range(),r=new e.material,o=new e.blend,a=new e.shaderProgram,s=e.utils.createPointSpritesVertexShader(e.GL),l=e.utils.createPointSpritesFragmentShader(e.GL),u=new e.vertexAttribute("vertexPosition"),c=new e.vertexAttribute("vertexColor"),d=new e.floatUniform("height",0),h=new e.floatUniform("vertexColorWeight",0),f=new e.floatUniform("lutMin",i[0]),p=new e.floatUniform("lutMax",i[1]),m=new e.modelViewUniform("modelViewMatrix"),g=new e.projectionUniform("projectionMatrix"),v=new e.uniform(e.GL.INT,"opacityLookup"),y=new e.uniform(e.GL.INT,"scalarsToColors"),x=new e.uniform(e.GL.INT,"useScalarsToColors"),b=new e.uniform(e.GL.INT,"useVertexColors"),_=new e.uniform(e.GL.FLOAT_VEC2,"pointSize"),w=new e.texture;return v.set(0),y.set(1),x.set(0),b.set(0),_.set([1,1]),a.addVertexAttribute(u,e.vertexAttributeKeys.Position),a.addVertexAttribute(c,e.vertexAttributeKeys.Color),a.addUniform(d),a.addUniform(h),a.addUniform(m),a.addUniform(g),a.addUniform(v),a.addUniform(b),a.addUniform(x),a.addUniform(_),a.addShader(l),a.addShader(s),r.addAttribute(a),r.addAttribute(o),n&&(a.addUniform(y),x.set(1),a.addUniform(f),a.addUniform(p),n.setTextureUnit(1),r.addAttribute(n)),w.setImage(t),w.setTextureUnit(0),r.addAttribute(w),r},e.utils.createPlane=function(t,n,i,r,o,a,s,l,u){"use strict";var c=new e.mapper,d=new e.planeSource,h=e.utils.createGeometryMaterial(),f=new e.actor;return d.setOrigin(t,n,i),d.setPoint1(r,o,a),d.setPoint2(s,l,u),c.setGeometryData(d.create()),f.setMapper(c),f.setMaterial(h),f},e.utils.createTexturePlane=function(t,n,i,r,o,a,s,l,u,c){"use strict";var d=new e.mapper,h=new e.planeSource,f=e.utils.createTextureMaterial(c,[t,n,i]),p=new e.actor;return h.setPoint1(r-t,o-n,a-i),h.setPoint2(s-t,l-n,u-i),d.setGeometryData(h.create()),p.setMapper(d),p.setMaterial(f),p},e.utils.createPoints=function(t,n,i,r,o){"use strict";if(!t)return console.log("[ERROR] Cannot create points without positions"),null;o=void 0===o?1:o;var a=new e.mapper,s=new e.pointSource,l=e.utils.createPointGeometryMaterial(o),u=new e.actor;return s.setPositions(t),i&&s.setColors(i),r&&s.setTextureCoordinates(r),n?s.setSize(n):s.setSize(1),a.setGeometryData(s.create()),u.setMapper(a),u.setMaterial(l),u},e.utils.createPointSprites=function(t,n,i,r){"use strict";if(!t)return console.log("[ERROR] Point sprites requires an image"),null;if(!n)return console.log("[ERROR] Cannot create points without positions"),null;var o=new e.mapper,a=new e.pointSource,s=e.utils.createPointSpritesMaterial(t),l=new e.actor;return a.setPositions(n),i&&a.setColors(i),r&&a.setTextureCoordinates(r),o.setGeometryData(a.create()),l.setMapper(o),l.setMaterial(s),l},e.utils.createLines=function(t,n){"use strict";if(!t)return console.log("[ERROR] Cannot create points without positions"),null;var i=new e.mapper,r=new e.lineSource,o=e.utils.createGeometryMaterial(),a=new e.actor;return r.setPositions(t),n&&r.setColors(n),i.setGeometryData(r.create()),a.setMapper(i),a.setMaterial(o),a},e.utils.createColorLegend=function(t,n,i,r,o,a,s){"use strict";if(!n)return console.log("[error] Invalid lookup table"),[];function l(t,n,i){if(n)if(n.length%3==0){if(i){var r,o=null,a=e.utils.computePowerOfTwo(48),s=0,l=[],u=[],c=[],d=[],h=n[6]-n[0],f=4;for(u.length=3,c.length=3,d.length=3,r=0;r<2;r+=1)s=r*(n.length-3),u[0]=n[s]-h,u[1]=n[s+1]-2*h,u[2]=n[s+2],c[0]=n[s]+h,c[1]=u[1],c[2]=u[2],d[0]=u[0],d[1]=n[1],d[2]=u[2],(o=e.utils.createTexturePlane(u[0],u[1],u[2],c[0],c[1],c[2],d[0],d[1],d[2],!0)).setReferenceFrame(e.boundingObject.ReferenceFrame.Absolute),o.material().setBinNumber(e.material.RenderBin.Overlay),o.material().addAttribute(e.utils.create2DTexture(i[r].toFixed(2).toString(),12,null)),l.push(o);return u[0]=.5*(n[0]+n[n.length-3]-a),u[1]=n[1]+f,u[2]=n[2],c[0]=u[0]+a,c[1]=u[1],c[2]=u[2],d[0]=u[0],d[1]=u[1]+a,d[2]=u[2],(o=e.utils.createTexturePlane(u[0],u[1],u[2],c[0],c[1],c[2],d[0],d[1],d[2],!0)).setReferenceFrame(e.boundingObject.ReferenceFrame.Absolute),o.material().setBinNumber(e.material.RenderBin.Overlay),o.material().addAttribute(e.utils.create2DTexture(t,24,null)),l.push(o),l}console.log("[error] Create labels requires Valid range")}else console.log("[error] Create labels require positions array contain 3d points");else console.log("[error] Create labels requires positions (x,y,z) array")}function u(t,e,n,i,r,o,a,s,u,c,d,h,f,p,m){m=m;var g=null,v=(u-o)/h,y=[],x=[];for(g=0;g<=h;g+=1)y.push(o+v*g),y.push(a),y.push(s),y.push(o+v*g),y.push(a+p),y.push(s);return x=x.concat(l(t,y,e.range()))}var c=i[0]+r,d=i[1],h=0,f=i[0],p=i[1]+o,m=0,g=[],v=null,y=null,x=e.groupNode();return(y=(v=e.utils.createTexturePlane(i[0],i[1],i[2],c,d,h,f,p,m,!0)).material()).addAttribute(n),v.setMaterial(y),x.addChild(v),v.material().setBinNumber(e.material.RenderBin.Overlay),v.setReferenceFrame(e.boundingObject.ReferenceFrame.Absolute),g.push(v),g=g.concat(u(t,n,i[0],i[1],i[1],f,d,h,c,d,h,a,s,5,3))},e.utils.create2DTexture=function(t,n,i,r,o,a,s){"use strict";var l=document.getElementById("textRendering"),u=null,c=e.texture();return r=r||"sans-serif",o=o||"center",a=a||"bottom",void 0===s&&(s=!0),l||(l=document.createElement("canvas")),u=l.getContext("2d"),l.setAttribute("id","textRendering"),l.style.display="none",l.height=e.utils.computePowerOfTwo(8*n),l.width=l.height,u.fillStyle="rgba(0, 0, 0, 0)",u.fillRect(0,0,u.canvas.width,u.canvas.height),u.fillStyle="rgba(200, 85, 10, 1.0)",u.textAlign=o,u.textBaseline=a,u.font=4*n+"px "+r,s&&(u.font="bold "+u.font),u.fillText(t,l.width/2,l.height/2,l.width),c.setImage(l),c.updateDimensions(),c},e.picker=function(){"use strict";if(!(this instanceof e.picker))return new e.picker;e.object.call(this);var t=[];return this.getActors=function(){return t},this.pick=function(e,n,i){if(void 0===e)return 0;if(void 0===n)return 0;if(void 0===i)return 0;t=[];var r,o,s,l,u,c,d,h,f,p,m,g=i.camera(),v=i.width(),y=i.height(),x=g.focalPoint(),b=a.fromValues(x[0],x[1],x[2],1),_=i.worldToDisplay(b,g.viewMatrix(),g.projectionMatrix(),v,y),w=a.fromValues(e,n,_[2],1),M=i.displayToWorld(w,g.viewMatrix(),g.projectionMatrix(),v,y),A=g.position(),T=[];for(s=0;s<3;s+=1)T[s]=M[s]-A[s];for(r=i.sceneRoot().children(),o=0,s=0;s<r.length;s+=1)if(!0===(m=r[s]).visible()){if(l=m.bounds(),T[0]>=0?(u=(l[0]-A[0])/T[0],c=(l[1]-A[0])/T[0]):(u=(l[1]-A[0])/T[0],c=(l[0]-A[0])/T[0]),T[1]>=0?(d=(l[2]-A[1])/T[1],h=(l[3]-A[1])/T[1]):(d=(l[3]-A[1])/T[1],h=(l[2]-A[1])/T[1]),u>h||d>c)continue;if(d>u&&(u=d),h<c&&(c=h),T[2]>=0?(f=(l[4]-A[2])/T[2],p=(l[5]-A[2])/T[2]):(f=(l[5]-A[2])/T[2],p=(l[4]-A[2])/T[2]),u>p||f>c)continue;f>u&&(u=f),p<c&&(c=p),t[o]=m,o+=1}return o},this},inherit(e.picker,e.object),e.shapefileReader=function(){"use strict";if(!(this instanceof e.shapefileReader))return new e.shapefileReader;var t=this,n=0,i=1,r=5,o=3;return this.int8=function(t,e){return t.charCodeAt(e)},this.bint32=function(t,e){return((255&t.charCodeAt(e))<<24)+((255&t.charCodeAt(e+1))<<16)+((255&t.charCodeAt(e+2))<<8)+(255&t.charCodeAt(e+3))},this.lint32=function(t,e){return((255&t.charCodeAt(e+3))<<24)+((255&t.charCodeAt(e+2))<<16)+((255&t.charCodeAt(e+1))<<8)+(255&t.charCodeAt(e))},this.bint16=function(t,e){return((255&t.charCodeAt(e))<<8)+(255&t.charCodeAt(e+1))},this.lint16=function(t,e){return((255&t.charCodeAt(e+1))<<8)+(255&t.charCodeAt(e))},this.ldbl64=function(t,e){var n=255&t.charCodeAt(e),i=255&t.charCodeAt(e+1),r=255&t.charCodeAt(e+2),o=255&t.charCodeAt(e+3),a=255&t.charCodeAt(e+4),s=255&t.charCodeAt(e+5),l=255&t.charCodeAt(e+6),u=255&t.charCodeAt(e+7),c=((127&u)<<4)+((240&l)>>4)-1023;return(1-2*(u>>7))*(1+((15&l)*Math.pow(2,48)+s*Math.pow(2,40)+a*Math.pow(2,32)+o*Math.pow(2,24)+r*Math.pow(2,16)+i*Math.pow(2,8)+n)*Math.pow(2,-52))*Math.pow(2,c)},this.lfloat32=function(t,e){var n=255&t.charCodeAt(e),i=255&t.charCodeAt(e+1),r=255&t.charCodeAt(e+2),o=255&t.charCodeAt(e+3),a=((127&o)<<1)+((254&r)>>7)-127;return(1-2*(o>>7))*(1+((127&r)*Math.pow(2,16)+i*Math.pow(2,8)+n)*Math.pow(2,-23))*Math.pow(2,a)},this.str=function(t,e,n){for(var i=[],r=e;r<e+n;){var o=t[r];if(0===o.charCodeAt(0))break;i.push(o),r+=1}return i.join("")},this.readHeader=function(t){return{code:this.bint32(t,0),length:this.bint32(t,24),version:this.lint32(t,28),shapetype:this.lint32(t,32)}},this.loadShx=function(e){for(var n=[],i=function(i){return n.push(2*t.bint32(e,i)),i+8},r=100;r<e.length;)r=i(r);return n},this.Shapefile=function(t){var e=t.path;l.ajax({url:e+".shx",mimeType:"text/plain; charset=x-user-defined",success:function(n){var i=this.loadShx(n);l.ajax({url:e+".shp",mimeType:"text/plain; charset=x-user-defined",success:function(n){l.ajax({url:e+".dbf",mimeType:"text/plain; charset=x-user-defined",success:function(e){var r=this.loadShp(n,e,i,t);t.success(r)}})}})}})},this.localShapefile=function(e){var n=e.shx,i=e.shp,r=e.dbf,o=new FileReader;o.onloadend=function(){var n=t.loadShx(o.result),a=new FileReader;a.onloadend=function(){var i=a.result,o=new FileReader;o.onloadend=function(){var r=o.result,a=t.loadShp(i,r,n,e);e.success(a)},o.readAsBinaryString(r)},a.readAsBinaryString(i)},o.readAsBinaryString(n)},this.loadDBF=function(e){var n=function(n){return{name:t.str(e,n,10),type:t.str(e,n+11,1),length:t.int8(e,n+16)}};if(4===t.int8(e,0))throw"Level 7 dBASE not supported";for(var i=t.lint32(e,4),r=t.lint16(e,8),o=t.lint16(e,10),a=32,s=32,l=[];s<r-1;)l.push(n(s)),s+=a;for(var u=[],c=r;c<r+i*o;)if("*"===t.str(e,c,1))c+=o;else{c+=1;for(var d={},h=0;h<l.length;h+=1){var f,p=l[h];"C"===p.type?f=t.str(e,c,p.length).trim():"N"===p.type&&(f=parseFloat(t.str(e,c,p.length))),c+=p.length,d[p.name]=f}u.push(d)}return u},this.loadShp=function(e,a,s,l){l=l;var u,c=[],d=function(n,i,r){for(var o=[],a=r-1;a>=i;a-=1){var s=t.ldbl64(e,n+16*a),l=t.ldbl64(e,n+16*a+8);o.push([s,l])}return o},h=function(a){var s,l,u,h,f,p,m,g,v,y=a+8,x=t.lint32(e,y);if(x===n)console.log("NULL Shape");else if(x===i){var b=t.ldbl64(e,y+4),_=t.ldbl64(e,y+12);c.push({type:"Point",attr:{},geom:[[b,_]]})}else if(x===r){for(s=t.lint32(e,y+36),l=t.lint32(e,y+40),u=a+52,h=a+52+4*s,v=[],f=0;f<s;f+=1)p=t.lint32(e,u+4*f),m=f+1<s?t.lint32(e,u+4*(f+1)):l,g=d(h,p,m),v.push(g);c.push({type:"Polygon",attr:{},geom:[v]})}else{if(x!==o)throw"Not Implemented: "+x;for(s=t.lint32(e,y+36),l=t.lint32(e,y+40),u=a+52,h=a+52+4*s,v=[],f=0;f<s;f+=1)p=t.lint32(e,u+4*f),m=f+1<s?t.lint32(e,u+4*(f+1)):l,g=d(h,p,m),v.push(g);c.push({type:"Polyline",attr:{},geom:[v]})}},f=this.loadDBF(a);for(u=0;u<s.length;u+=1)h(s[u]);var p=[];for(u=0;u<c.length;u+=1){var m=c[u];m.attr=f[u],p.push(m)}return p},this},e.vtkReader=function(){"use strict";if(!(this instanceof e.vtkReader))return new e.vtkReader;var t=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"],n=[],i={},r=0,a=null,s=null,l=-1,u="",c=0,d=0,h=null,f=0;if(0===n.length)for(f=0;f<t.length;f+=1)n[t[f]]=f;return this.ntos=function(t){var e;return 1===(e=t.toString(16)).length&&(e="0"+e),e="%"+e,unescape(e)},this.readReverseBase64=function(){var t;if(!u)return l;for(;;){if(c>=u.length)return l;if(t=u.charAt(c),c+=1,n[t])return n[t];if("A"===t)return 0}return l},this.decode64=function(t){var e="",n=new Array(4),i=!1;for(u=t,c=0;!i&&(n[0]=this.readReverseBase64())!==l&&(n[1]=this.readReverseBase64())!==l;)n[2]=this.readReverseBase64(),n[3]=this.readReverseBase64(),e+=this.ntos(n[0]<<2&255|n[1]>>4),n[2]!==l?(e+=this.ntos(n[1]<<4&255|n[2]>>2),n[3]!==l?e+=this.ntos(n[2]<<6&255|n[3]):i=!0):i=!0;return e},this.readNumber=function(t){return t[d++]+(t[d++]<<8)+(t[d++]<<16)+(t[d++]<<24)},this.readF3Array=function(t,e){var n,i=4*t*3,r=new Int8Array(i);for(n=0;n<i;n+=1)r[n]=e[d],d+=1;return new Float32Array(r.buffer)},this.readColorArray=function(t,e,n){var i,r=0,o=new Array(3*t);for(i=0;i<t;i+=1)o[r++]=e[d++]/255,o[r++]=e[d++]/255,o[r++]=e[d++]/255,d++;n.insert(o)},this.parseObject=function(t){var n,i,r,a,s,l,u,c,p,m,g=new e.geometryData,v=e.mapper(),y=[],x=null,b=null,_=null,w=null;for(b=atob(t.data),f=0;f<b.length;f+=1)y[f]=255&b.charCodeAt(f);if(d=0,n=this.readNumber(y),x=String.fromCharCode(y[d]),d+=1,g.setName(x),"L"===x)_=this.parseLineData(g,y),w=e.utils.createGeometryMaterial();else if("M"===x)_=this.parseMeshData(g,y),w=e.utils.createPhongMaterial();else if("P"===x)_=this.parsePointData(g,y),w=e.utils.createGeometryMaterial();else{if("C"===x){for(r=this.parseColorMapData(g,y,n),l=[],f=0;f<r.colors.length;f+=1)l.push(r.colors[f][1]),l.push(r.colors[f][2]),l.push(r.colors[f][3]),l.push(255*r.colors[f][0]);return(s=new e.lookupTable).setColorTable(l),u=h.renderWindow().windowSize(),c=r.size[0]*u[0],p=r.size[1]*u[1],(m=[r.position[0]*u[0],(1-r.position[1])*u[1],0])[1]=m[1]-p,p=30,e.utils.createColorLegend(r.title,s,m,c,p,3,0)}console.log("Ignoring unrecognized encoded data type "+x)}return v.setGeometryData(g),t.hasTransparency&&(a=w.shaderProgram().uniform("opacity"),console.log("opacity ",t.opacity),a.set(t.opacity),w.setBinNumber(1e3)),(i=e.actor()).setMapper(v),i.setMaterial(w),i.setMatrix(o.transpose(o.create(),_)),[i]},this.parseLineData=function(t,n){var i,r,a,s,l,u,c,h,f=null,p=null,m=null,g=o.create(),v=null,y=0;for(r=this.readNumber(n),v=new Array(3*r),f=new e.sourceDataP3fv,a=this.readF3Array(r,n),h=0;h<r;h+=1)v[y++]=a[3*h],v[y++]=a[3*h+1],v[y++]=a[3*h+2];for(f.insert(v),t.addSource(f),p=new e.sourceDataC3fv,this.readColorArray(r,n,p),t.addSource(p),m=new e.lines,t.addPrimitive(m),i=this.readNumber(n),s=new Int8Array(2*i),h=0;h<2*i;h+=1)s[h]=n[d],d+=1;for(l=new Uint16Array(s.buffer),m.setIndices(l),m.setPrimitiveType(e.GL.LINES),u=64,s=new Int8Array(u),h=0;h<u;h+=1)s[h]=n[d],d+=1;return c=new Float32Array(s.buffer),o.copy(g,c),g},this.parseMeshData=function(t,n){var i,r,a,s,l,u,c,h,f=null,p=null,m=null,g=o.create(),v=null,y=null,x=0;for(r=this.readNumber(n),y=new Array(6*r),f=new e.sourceDataP3N3f,a=this.readF3Array(r,n),m=this.readF3Array(r,n),h=0;h<r;h+=1)y[x++]=a[3*h],y[x++]=a[3*h+1],y[x++]=a[3*h+2],y[x++]=m[3*h],y[x++]=m[3*h+1],y[x++]=m[3*h+2];for(f.insert(y),t.addSource(f),p=new e.sourceDataC3fv,this.readColorArray(r,n,p),t.addSource(p),s=[],v=new e.triangles,i=this.readNumber(n),s=new Int8Array(2*i),h=0;h<2*i;h+=1)s[h]=n[d],d+=1;for(l=new Uint16Array(s.buffer),v.setIndices(l),t.addPrimitive(v),u=64,s=new Int8Array(u),h=0;h<u;h+=1)s[h]=n[d],d+=1;return c=new Float32Array(s.buffer),o.copy(g,c),g},this.parsePointData=function(t,n){var i,r,a,s,l,u,c=o.create(),h=null,p=null,m=null,g=null,v=0;for(i=this.readNumber(n),g=new Array(3*i),h=new e.sourceDataP3fv,r=this.readF3Array(i,n),a=new Uint16Array(i),f=0;f<i;f+=1)a[f]=f,g[v++]=r[3*f],g[v++]=r[3*f+1],g[v++]=r[3*f+2];for(h.insert(g),t.addSource(h),p=new e.sourceDataC3fv,this.readColorArray(i,n,p),t.addSource(p),(m=new e.points).setIndices(a),t.addPrimitive(m),l=64,s=new Int8Array(l),f=0;f<l;f+=1)s[f]=n[d],d+=1;return u=new Float32Array(s.buffer),o.copy(c,u),c},this.parseColorMapData=function(t,e,n){var i,r,o,a,s,l={};for(l.numOfColors=n,r=8,i=new Int8Array(r),a=0;a<r;a+=1)i[a]=e[d],d+=1;for(l.position=new Float32Array(i.buffer),r=8,i=new Int8Array(r),a=0;a<r;a+=1)i[a]=e[d],d+=1;for(l.size=new Float32Array(i.buffer),l.colors=[],s=0;s<l.numOfColors;s+=1){for(i=new Int8Array(4),a=0;a<4;a+=1)i[a]=e[d],d+=1;o=[new Float32Array(i.buffer)[0],e[d++],e[d++],e[d++]],l.colors[s]=o}for(l.orientation=e[d++],l.numOfLabels=e[d++],l.title="";d<e.length;)l.title+=String.fromCharCode(e[d++]);return l},this.parseSceneMetadata=function(t,e){var n,i,r,o=a.Renderers[e],l=t.camera();i=(o.size[0]-o.origin[0])*s.width,r=(o.size[1]-o.origin[1])*s.height,t.resize(i,r),l.setCenterOfRotation([o.LookAt[1],o.LookAt[2],o.LookAt[3]]),l.setViewAngleDegrees(o.LookAt[0]),l.setPosition(o.LookAt[7],o.LookAt[8],o.LookAt[9]),l.setFocalPoint(o.LookAt[1],o.LookAt[2],o.LookAt[3]),l.setViewUpDirection(o.LookAt[4],o.LookAt[5],o.LookAt[6]),0===e?(n=o.Background1,t.setBackgroundColor(n[0],n[1],n[2],1)):t.setResizable(!1),t.setLayer(e)},this.initScene=function(){var t,e;if(null===a)return h;for(e=a.Renderers.length-1;e>=0;e-=1)t=this.getRenderer(e),this.parseSceneMetadata(t,e);return h},this.createViewer=function(t){var n;return null===h&&(s=t,(h=e.viewer(t)).init(),h.renderWindow().removeRenderer(h.renderWindow().activeRenderer()),h.renderWindow().addRenderer(new e.depthPeelRenderer),i[0]=h.renderWindow().activeRenderer(),h.renderWindow().resize(t.width,t.height),n=e.pvwInteractorStyle(),h.setInteractorStyle(n)),h},this.deleteViewer=function(){i={},h=null},this.updateCanvas=function(t){return s=t,h.renderWindow().resize(t.width,t.height),h},this.numObjects=function(){return r},this.getRenderer=function(t){var n;return null==(n=i[t])&&((n=new e.renderer).setResetScene(!1),n.setResetClippingRange(!1),h.renderWindow().addRenderer(n),0!==t&&n.camera().setClearMask(e.GL.DepthBufferBit),i[t]=n),n},this.setVtkScene=function(t){a=t},this},e.DataBuffers=function(t){"use strict";if(!(this instanceof e.DataBuffers))return new e.DataBuffers(t);var n,i={};n=t||0===t?t:256;var r=0,o=function(t,e,n,i){if(!t)throw"No destination";n||(n=0),i||(i=e.length);for(var r=0;r<i;r+=1)t[n+r]=e[r]},a=function(t){var e=n;for(2*e<t&&(e=t);e<t;)e*=2;for(var r in n=e,i)if(i.hasOwnProperty(r)){var a=new Float32Array(e*i[r].len),s=i[r].array;o(a,s),i[r].array=a,i[r].dirty=!0}};this.create=function(t,e){if(!e||e<0)throw"Length of buffer must be a positive integer";var r=new Float32Array(n*e);return i[t]={array:r,len:e,dirty:!1},i[t].array},this.alloc=function(t){r+t>=n&&a(r+t);var e=r;return r+=t,e},this.get=function(t){return i[t].array},this.write=function(t,e,r,a){if(r+a>n)throw"Write would exceed buffer size";o(i[t].array,e,r*i[t].len,a*i[t].len),i[t].dirty=!0},this.repeat=function(t,e,r,a){if(r+a>n)throw"Repeat would exceed buffer size";for(var s=0;s<a;s+=1)o(i[t].array,e,(r+s)*i[t].len,i[t].len);i[t].dirty=!0},this.count=function(){return r},this.data=function(t){return i[t].array}},e}()}.apply(e,[]))||(t.exports=i)},5638:function(t,e){var n;
35
+ var i=n(5638),r=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi;i.htmlPrefilter=function(t){return t.replace(r,"<$1></$2>")},n(8701),t.exports=i.extend({annotation:n(7800),annotationLayer:n(836),camera:n(9986),choroplethFeature:n(8719),contourFeature:n(9005),domRenderer:n(2805),event:n(5108),feature:n(6837),featureLayer:n(3715),fetchQueue:n(3705),fileReader:n(407),geo_action:n(7839),graphFeature:n(4745),heatmapFeature:n(1111),imageTile:n(4665),isolineFeature:n(2367),geojsonReader:n(3088),gridFeature:n(1109),layer:n(9105),lineFeature:n(4708),map:n(2804),mapInteractor:n(3870),markerFeature:n(7098),meshFeature:n(9146),object:n(3737),osmLayer:n(8622),pathFeature:n(6565),pointFeature:n(2557),polygonFeature:n(4343),quadFeature:n(5017),pixelmapFeature:n(6374),pixelmapLayer:n(809),renderer:n(3234),sceneObject:n(5358),textFeature:n(9757),tile:n(8418),tileCache:n(6244),tileLayer:n(1940),timestamp:n(6618),trackFeature:n(6223),transform:n(6853),typedef:n(3762),vectorFeature:n(2623),inherit:n(5699),version:n(2978),sha:n(5381),util:n(4634),jQuery:i,canvas:n(7562),svg:n(2878),vtkjs:n(6653),webgl:n(9205),gui:n(253)},n(4647)),window&&!window.$&&(window.$=i),window&&!window.jQuery&&(window.jQuery=i)},5699:function(t){t.exports=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},2367:function(t,e,n){var i=n(5699),r=n(9146),o=n(4647),a=n(4634),s={17:[{l0:1,h0:2,l1:0,h1:2}],18:[{l0:0,h0:1,l1:2,h1:1}],20:[{l0:2,h0:0,l1:1,h1:0}],22:[{l0:2,h0:0,l1:2,h1:1}],21:[{l0:1,h0:2,l1:1,h1:0}],19:[{l0:0,h0:1,l1:0,h1:2}],1:[{l0:2,h0:3,l1:1,h1:3}],2:[{l0:0,h0:2,l1:3,h1:2}],4:[{l0:3,h0:1,l1:0,h1:1}],8:[{l0:1,h0:0,l1:2,h1:0}],14:[{l0:3,h0:1,l1:3,h1:2}],13:[{l0:2,h0:3,l1:2,h1:0}],11:[{l0:1,h0:0,l1:1,h1:3}],7:[{l0:0,h0:2,l1:0,h1:1}],3:[{l0:0,h0:2,l1:1,h1:3}],10:[{l0:1,h0:0,l1:3,h1:2}],12:[{l0:3,h0:1,l1:2,h1:0}],5:[{l0:2,h0:3,l1:0,h1:1}],6:[{l0:0,h0:2,l1:0,h1:1},{l0:3,h0:1,l1:3,h1:2}],9:[{l0:1,h0:0,l1:1,h1:3},{l0:2,h0:3,l1:2,h1:0}]},l=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638),l=n(6853),u=n(5108),c=n(9757);e=e||{},r.call(this,e);var d,h,f,p,m,g=this,v=this.draw,y=this._exit,x=this._init,b=this.modified,_=this._update;return this.featureType="isoline",this.contour=g.mesh,this.isoline=g.mesh,this._createIsolines=function(){var t,e=g.style.get("value"),n=void 0!==g.style("used")?g.style.get("used"):function(t,n){return a.isNonNullFinite(e(t,n))},i=!1,r=[],o=g._createMesh({used:n,value:e});return(t=g._getValueList(o)).length?(t.forEach((function(t){var e=g._isolinesForValue(o,t);e.length&&(r=r.concat(e),i=i||!!t.label)})),{lines:r,mesh:o,values:t,hasLabels:i}):{}},this._getValueList=function(t){var e,n,i,r,o,s,l,u=g.isoline,c=u.get("values")(t),d=u.get("spacing")(t),h=u.get("count")(t),f=u.get("autofit")(t),p=u.get("levels")(t);if(!t.numVertices||!t.numElements)return[];if(e=a.getMinMaxValues(t.value,u.get("min")(t),u.get("max")(t),!0),t.minValue=e.min,t.maxValue=e.max,(n=t.maxValue-t.minValue)<=0)return[];if(Array.isArray(c))c=(c=c.map((function(t,e){return{value:void 0!==t.value?t.value:t,position:e,level:t.level}}))).filter((function(e){return e.value>=t.minValue&&e.value<=t.maxValue}));else if(d||f)for(d||(i=n/(2*h/3),o=Math.floor(Math.log10(i)),s=Math.max(0,-o),d=(i=(i/=r=Math.pow(10,o))>=5?5:i>=2?2:1)*r),c=[],l=Math.ceil(t.minValue/d);l<=Math.floor(t.maxValue/d);l+=1)c.push({value:l*d,position:l,fixedDigits:s});else for(c=Array(h),l=0;l<h;l+=1)c[l]={value:t.minValue+n*(l+1)/(h+1),position:l+1};return p.length&&c.forEach((function(t,e){if(void 0===t.level){t.level=0;for(var n=0,i=p[0];n<p.length&&!(t.position%i);i*=p[n+=1])t.level=n+1}if(u.get("label")(t,t.position)){var r=u.get("labelText")(t,t.position);void 0===r&&(r=void 0!==t.fixedDigits?""+parseFloat(t.value.toFixed(t.fixedDigits)):""+t.value),r&&(t.label=r)}})),c},this._addSegment=function(t,e,n){var i,r,o,a,s,l,u=[e,n],c=t.length;for(t.push(u),r=0;r<2;r+=1){for(i=c-1;i>=0;i-=1){if(a=(o=t[i])[0],s=o[o.length-1],n[0]===a[0]&&n[1]===a[1])l=u.concat(o.slice(1));else{if(e[0]!==s[0]||e[1]!==s[1])continue;l=o.concat(u.slice(1))}t.splice(c,1),t[i]=u=l,c=i,e=u[0],n=u[u.length-1];break}if(i<0)break}return t},this._chainVertex=function(t,e,n){var i=n[0],r=n[1],o=3*i,a=3*r,s=(e.value-t.value[i])/(t.value[r]-t.value[i]),l=1-s;return{x:t.pos[o]*l+t.pos[a]*s,y:t.pos[o+1]*l+t.pos[a+1]*s,z:t.pos[o+2]*l+t.pos[a+2]*s}},this._isolinesForValue=function(t,e){var n,i,r,o,a=e.value,l=Array(t.value.length),u=[];for(n=l.length-1;n>=0;n-=1)l[n]=t.value[n]<=a?0:1;var c=t.verticesPerElement,d="square"===t.shape,h=t.elements,f=h.length;for(i=0;i<f;i+=c){if(d){if(0===(r=8*l[h[i]]+4*l[h[i+1]]+2*l[h[i+2]]+l[h[i+3]])||15===r)continue}else if(16===(r=16+4*l[h[i]]+2*l[h[i+1]]+l[h[i+2]])||23===r)continue;s[r].forEach((function(t){u=g._addSegment(u,[h[i+t.l0],h[i+t.h0]],[h[i+t.l1],h[i+t.h1]])}))}return o=u.map((function(n){var i=[];return n.forEach((function(n){var r=g._chainVertex(t,e,n);i.length&&r.x===i[i.length-1].x&&r.y===i[i.length-1].y||i.push(r)})),i.closed=i[0].x===i[i.length-1].x&&i[0].y===i[i.length-1].y,i.value=e.value,i.level=e.level,i.position=e.position,i.label=e.label,i})).filter((function(t){return t.length>1})),o},this.modified=function(){var t=b();return f&&f.modified(),m&&m.modified(),t},this.labelPositions=function(){if(g.dataTime().timestamp()>=g.buildTime().timestamp()&&g._build(),h=null,!m)return g;if(!(d&&d.hasLabels&&d.lines&&d.lines.length))return m.data([]),g;var t=g.isoline,e=t.get("labelSpacing"),n=t.get("labelOffset"),i=t.get("labelViewport")(d.mesh),r=g.gcs(),o=g.layer().map(),s=o.gcs(),u=o.rotation(),c=o.size(),f=[],p=0;return d.lines.forEach((function(t,d){if(t.label){var h,m,g,v,y,x,b,_,w,M,A,T=e(t.value,t.value.position),C=n(t.value,t.value.position)||0,E=o.gcsToDisplay(t,r),S=0;if(!(T<=0||isNaN(T))&&(p=Math.max(T,p),C=C+.5-Math.floor(C+.5),h=E.map((function(e,n){if(!t.closed&&n+1===E.length)return 0;var i=Math.sqrt(a.distance2dSquared(e,E[n+1<E.length?n+1:0]));return S+=i,i})),m=Math.floor(S/T)))for(A=l.transformCoordinates(r,s,t),v=(g=S/m)*C,y=0,x=0;x<E.length;x+=1){for(;y+h[x]>=v;)b=x+1===E.length?0:x+1,w=1-(_=(v-y)/h[x]),v+=g,i>0&&((M={x:E[x].x*w+E[b].x*_,y:E[x].y*w+E[b].y*_}).x<-i||M.x>c.width+i||M.y<-i||M.y>c.height+i)||f.push({x:A[x].x*w+A[b].x*_,y:A[x].y*w+A[b].y*_,z:A[x].z*w+A[b].z*_,line:t,rotation:Math.atan2(E[x].y-E[b].y,E[x].x-E[b].x)-u});y+=h[x]}}})),m.gcs(s),m.data(f),m.style("renderThreshold",2*p),h={zoom:o.zoom(),center:o.center(),rotation:u,size:c,labelViewport:i,maxSpacing:p,labelAutoUpdate:t.get("labelAutoUpdate")(d.mesh)},g},this.lastLabelPositions=function(){return i.extend({},h)},this._updateLabelPositions=function(){var t=h;if(!t||!t.labelAutoUpdate)return g;var e=g.layer().map(),n=e.zoom(),i=e.size(),r=!!(Math.abs(n-t.zoom)>=2);if(!r&&t.labelViewport>0){var o=Math.sqrt(a.distance2dSquared(e.gcsToDisplay(e.center()),e.gcsToDisplay(t.center)))*Math.pow(2,t.zoom-n),s=t.labelViewport/2-2*t.maxSpacing-Math.max(i.width-t.size.width,i.height-t.size.height,0);r=r||o>=s}return r&&g.labelPositions().draw(),g},this._build=function(){if((d=g._createIsolines())&&d.lines&&d.lines.length){f||(f=g.layer().createFeature("line",{selectionAPI:!1,gcs:g.gcs(),visible:g.visible(void 0,!0),style:{closed:function(t){return t.closed}}}),g.dependentFeatures([f]));var t=g.style();if(f.data(d.lines).style({antialiasing:t.antialiasing,lineCap:t.lineCap,lineJoin:t.lineJoin,miterLimit:t.miterLimit,strokeWidth:t.strokeWidth,strokeStyle:t.strokeStyle,strokeColor:t.strokeColor,strokeOffset:t.strokeOffset,strokeOpacity:t.strokeOpacity}),d.hasLabels){if(!m){if(!(o.registries.features[g.layer().rendererName()]||{}).text){var e=o.rendererForFeatures(["text"]);p=o.createLayer("feature",g.layer().map(),{renderer:e}),g.layer().addChild(p),g.layer().node().append(p.node())}m=(p||g.layer()).createFeature("text",{selectionAPI:!1,gcs:g.gcs(),visible:g.visible(void 0,!0),style:{text:function(t){return t.line.label}}}).geoOn(u.pan,g._updateLabelPositions)}c.usedStyles.forEach((function(e){"visible"!==e&&m.style(e,t[e])})),g.dependentFeatures([f,m])}}else f&&f.data([]);return g.buildTime().modified(),g.labelPositions(),g},this._update=function(){return _.call(g),(g.dataTime().timestamp()>=g.buildTime().timestamp()||g.updateTime().timestamp()<=g.timestamp())&&g._build(),g.updateTime().modified(),g},this.draw=function(){var t=v();return f&&f.draw(),m&&m.draw(),t},this._exit=function(){m&&((p||g.layer())&&(p||g.layer()).deleteFeature(m),p&&g.layer()&&g.layer().removeChild(p)),f&&g.layer()&&g.layer().deleteFeature(f),m=null,p=null,f=null,g.dependentFeatures([]),y()},this._init=function(e){e=e||{},x.call(g,e);var n=i.extend({},{opacity:1,value:function(t,e){return g.position()(t,e).z},rotateWithMap:!0,rotation:t.rotationFunction(),strokeWidth:function(t,e,n,i){return n.level+.5},strokeColor:{r:0,g:0,b:0},textStrokeColor:{r:1,g:1,b:1,a:.75},textStrokeWidth:2,fontSize:"12px"},void 0===e.style?{}:e.style);g.style(n),g.isoline(i.extend({},{count:15,autofit:!0,levels:[5,5],label:function(t){return t.level>=1},labelSpacing:200,labelViewport:1e4,labelAutoUpdate:!0},e.mesh||{},e.contour||{},e.isoline||{})),(e.mesh||e.contour||e.isoline)&&g.dataTime().modified()},this};l.rotationFunction=function(t,e){var n={higher:function(t){return t.rotation},lower:function(t){return t.rotation+Math.PI},map:function(t){var e=t.rotation,n=a.wrapAngle(e,!0);return(n>Math.PI/2||n<-Math.PI/2)&&(e+=Math.PI),e},screen:function(t){var n=t.rotation,i=a.wrapAngle(n+e.rotation(),!0);return(i>Math.PI/2||i<-Math.PI/2)&&(n+=Math.PI),n}};return n[t]||n.higher},i(l,r),t.exports=l},9105:function(t,e,n){var i=n(5699),r=n(5358),o=n(6837),a=n(4647).checkRenderer,s=n(4647).rendererForFeatures,l=n(4647).rendererForAnnotations,u=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},r.call(this,e);var i,o=n(5638),u=n(6618),c=n(3234),d=n(4647).createRenderer,h=n(4647).adjustLayerForRenderer,f=n(5108),p=this,m=this._exit,g=void 0===e.id?t.newLayerId():e.id,v=void 0===e.name?"":e.name,y=void 0===e.map?null:e.map,x=null,b=void 0===e.canvas?null:e.canvas,_=e.renderer instanceof c?e.renderer:null,w=!1,M=void 0!==e.renderer?e.renderer instanceof c?e.renderer.api():e.renderer:e.annotations?l(e.annotations):s(e.features),A=void 0===e.autoshareRenderer||e.autoshareRenderer,T=u(),C=u(),E=void 0===e.sticky||e.sticky,S=void 0===e.active||e.active,k=void 0===e.opacity?1:e.opacity,P=e.attribution||null,O=void 0===e.visible||e.visible,R=void 0===e.selectionAPI||e.selectionAPI;if(M=a(M),!y)throw new Error("Layers must be initialized on a map.");function L(){return(p.parent()||p.map()).children().filter((function(e){return e instanceof t}))}if(this.rendererName=function(){return M},this.autoshareRenderer=function(){return A},this.zIndex=function(t,e){return void 0===t?i:(e||L().reverse().forEach((function(e){e!==p&&e.zIndex()===t&&e.zIndex(t+1)})),t!==i&&(i=t,x.css("z-index",i),p.geoTrigger(f.layerMove,{layer:p})),p)},this.moveUp=function(t){var e,n,i,r,o=null;for(void 0===t&&(t=1),r=1,t<0&&(r=-1,t=-t),e=L().sort((function(t,e){return r*(t.zIndex()-e.zIndex())})),n=0;n<e.length;n+=1)if(null===o)e[n]===p&&(o=n);else{if(!(n-o<=t))break;i=p.zIndex(),p.zIndex(e[n].zIndex(),!0),e[n].zIndex(i,!0)}return p},this.moveDown=function(t){return void 0===t&&(t=1),p.moveUp(-t)},this.moveToTop=function(){return p.moveUp(L().length-1)},this.moveToBottom=function(){return p.moveDown(L().length-1)},this.sticky=function(){return E},this.active=function(t){return void 0===t?S:(S!==t&&(S=t,x.toggleClass("active",S)),p)},this.node=function(){return x},this.id=function(e){return void 0===e?g:(g=null===e?t.newLayerId():e,p.modified(),p)},this.name=function(t){return void 0===t?v:(v=t,x.attr("id",v),p.modified(),p)},this.map=function(){return y},this.renderer=function(){return _},this._renderer=function(t){return void 0===t?_:(_=t,p)},this.canvas=function(){return b},this._canvas=function(t){return void 0===t?b:(b=t,p)},this.dataTime=function(){return T},this.updateTime=function(){return C},this.initialized=function(t){return void 0!==t?(w=t,p):w},this.toLocal=function(t){return t},this.fromLocal=function(t){return t},this.attribution=function(t){return void 0!==t?(P=t,p.map().updateAttribution(),p):P},this.visible=function(t){return void 0===t?O:(O!==t&&(O=t,x.toggleClass("hidden",!O),p.modified()),p)},this.selectionAPI=function(t){return void 0===t?R:(R!==t&&(R=t),p)},this._init=function(t){if(w)return p;y.node().append(x);var n=o.extend({},e);return delete n.map,_?p._canvas(_.canvas()):null===M?(p._renderer(null),p._canvas(x)):b?p._renderer(d(M,p,b,n)):(p._renderer(d(M,p,void 0,n)),p._canvas(_.canvas())),x.toggleClass("active",p.active()),w=!0,t||(p.geoOn(f.resize,(function(t){p._update({event:t})})),p.geoOn(f.pan,(function(t){p._update({event:t})})),p.geoOn(f.rotate,(function(t){p._update({event:t})})),p.geoOn(f.zoom,(function(t){p._update({event:t})}))),p},this._exit=function(){p.geoOff(),_&&_._exit(),x.off(),x.remove(),e={},p._canvas(null),p._renderer(null),m()},this._update=function(t){return p},this.width=function(){return p.map().size().width},this.height=function(){return p.map().size().height},this.opacity=function(t){return void 0!==t?(k=t,x.css("opacity",k),p):k},(x=o(document.createElement("div"))).addClass("geojs-layer"),x.attr("renderer",M),v&&x.attr("id",v),p.opacity(k),p.visible(O),void 0===e.zIndex){var D=-1;L().forEach((function(t){void 0!==t.zIndex()&&(D=Math.max(D,t.zIndex()))})),e.zIndex=D+1}return p.zIndex(e.zIndex),h("all",p),p};u.newLayerId=function(){"use strict";var t=1;return function(){var e=t;return t+=1,e}}(),u.create=function(t,e){"use strict";if((e=e||{}).type=e.type||"feature",e.renderer=void 0===e.renderer?"webgl":e.renderer,e.renderer=a(e.renderer),!e.renderer)return console.warn("Invalid renderer"),null;var n=t.createLayer(e.type,e);return n?(e.features&&e.features.forEach((function(t){t.data=t.data||e.data,t.feature=o.create(n,t)})),n):(console.warn("Unable to create a layer"),null)},i(u,r),t.exports=u},4708:function(t,e,n){var i=n(5699),r=n(6837),o=n(6618),a=n(6853),s=n(4634),l=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638);e=e||{},r.call(this,e);var l,u=this,c=this._init,d=o();return this.featureType="line",this._subfeatureStyles={lineCap:!0,lineJoin:!0,strokeColor:!0,strokeOffset:!0,strokeOpacity:!0,strokeWidth:!0},this.line=function(t){return void 0===t?u.style("line"):(u.style("line",t),u.dataTime().modified(),u.modified(),u)},this.position=function(t){return void 0===t?u.style("position"):(u.style("position",t),u.dataTime().modified(),u.modified(),u)},this._updatePointSearchInfo=function(){if(d.timestamp()>=u.dataTime().timestamp()&&d.timestamp()>=u.timestamp())return l;d.modified(),l=[];var t=u.data(),e=u.line(),n=u.style.get("strokeWidth"),i=u.position(),r=u.style.get("closed"),o=u.gcs(),s=u.layer().map().gcs();return t.forEach((function(t,u){var c,d,h,f,p,m,g,v=r(t,u),y=[];e(t,u).forEach((function(e,r){var l=i(e,r,t,u);o!==s&&(l=a.transformCoordinates(o,s,l)),void 0===m&&(m={x:l.x,y:l.y}),void 0===g&&(g={x:l.x,y:l.y}),l.x<m.x&&(m.x=l.x),l.x>g.x&&(g.x=l.x),l.y<m.y&&(m.y=l.y),l.y>g.y&&(g.y=l.y);var x=Math.ceil(n(e,r,t,u)/2)+2;(void 0===g.r||x>g.r)&&(g.r=x);var b=x*x;c&&y.push({u:l,v:c,r:h>x?h:x,r2:f>b?f:b,i:r,j:d}),c=l,d=r,h=x,f=b,!p&&v&&(p={p:l,r:x,r2:b,i:r})})),v&&p&&(c.x!==p.p.x||c.y!==p.p.y)&&y.push({u:c,v:p.p,r:h>p.r?h:p.r,r2:f>p.r2?f:p.r2,i:d,j:p.i}),y.min=m,y.max=g,l.push(y)})),l},this.pointSearch=function(t,e){var n=u.data(),i=[],r=[],o={};if(!n||!n.length||!u.layer())return{found:r,index:i,extra:o};u._updatePointSearchInfo();var c=u.layer().map();e=null===e?c.gcs():void 0===e?c.ingcs():e;var d,h,f,p,m=c.unitsPerPixel(c.zoom()),g=m*m,v=a.transformCoordinates(e,c.gcs(),t),y=u.style.get("strokeWidth"),x=u.style.get("strokeOpacity"),b=u.line();for(h=0;h<l.length;h+=1)for(p=l[h],d=null,f=0;f<p.length;f+=1)if(s.distance2dToLineSquared(v,p[f].u,p[f].v)<=p[f].r2*g&&(d||(d=b(n[h],h)),(x(d[p[f].i],p[f].i,n[h],h)>0||x(d[p[f].j],p[f].j,n[h],h)>0)&&(y(d[p[f].i],p[f].i,n[h],h)>0||y(d[p[f].j],p[f].j,n[h],h)>0))){r.push(n[h]),i.push(h),o[h]=f;break}return{found:r,index:i,extra:o}},this.polygonSearch=function(t,e,n){var i,r,o=u.data(),c=[],d=[],h={},f=u.layer().map(),p=u.style.get("strokeWidth"),m=u.style.get("strokeOpacity"),g=u.line();if(n=null===n?f.gcs():void 0===n?f.ingcs():n,t.outer||(t={outer:t,inner:[]}),!o||!o.length||t.outer.length<3)return{found:d,index:c,extra:h};(e=e||{}).partial=e.partial||!1,(t={outer:a.transformCoordinates(n,f.gcs(),t.outer),inner:(t.inner||[]).map((function(t){return a.transformCoordinates(n,f.gcs(),t)}))}).outer.forEach((function(t){i||(i={x:t.x,y:t.y},r={x:t.x,y:t.y}),t.x<i.x&&(i.x=t.x),t.x>r.x&&(r.x=t.x),t.y<i.y&&(i.y=t.y),t.y>r.y&&(r.y=t.y)})),u._updatePointSearchInfo();var v,y,x,b,_,w,M=f.unitsPerPixel(f.zoom());for(v=0;v<l.length;v+=1)if(!(!(x=l[v]).max||x.max.x<i.x-x.max.r*M||x.min.x>r.x+x.max.r*M||x.max.y<i.y-x.max.r*M||x.min.y>r.y+x.max.r*M)){var A=void 0,T=void 0,C=void 0;for(y=0;y<x.length;y+=1)if(b=x[y].u,_=x[y].v,w=x[y].r,!(b.x<i.x-w*M&&_.x<i.x-w*M||b.x>r.x+w*M&&_.x>r.x+w*M||b.y<i.y-w*M&&_.y<i.y-w*M||b.y>r.y+w*M&&_.y>r.y+w*M||(C||(C=g(o[v],v)),m(C[x[y].i],x[y].i,o[v],v)<=0&&m(C[x[y].j],x[y].j,o[v],v)<=0||p(C[x[y].i],x[y].i,o[v],v)<=0&&p(C[x[y].j],x[y].j,o[v],v)<=0))){var E=s.distanceToPolygon2d(b,t),S=s.distanceToPolygon2d(_,t);if(E>-w*M&&E<w*M||S>-w*M&&S<w&M||E*S<0){T=!0;break}if(s.crossedLineSegmentPolygon2d(b,_,t)){T=!0;break}for(var k=w*w*M*M,P=0;P<t.outer.length&&!T;P+=1)T=s.distance2dToLineSquared(t.outer[P],b,_)<k;for(var O=0;O<t.inner.length&&!T;O+=1)for(var R=0;R<t.inner[O].length&&!T;R+=1)T=s.distance2dToLineSquared(t.inner[O][R],b,_)<k;if(T)break;E>0&&(A=!0)}(!e.partial&&A&&!T||e.partial&&(A||T))&&(c.push(v),d.push(o[v]),h[v]={partial:T,segment:y<l[v].length?y:0})}return{found:d,index:c,extra:h}},this.rdpSimplifyData=function(t,e,n,i){t=t||u.data(),n=n||u.style.get("position"),i=i||u.style.get("line");var r=u.layer().map(),o=r.gcs(),l=u.gcs(),c=u.style.get("closed");return void 0===e&&(e=.5*r.unitsPerPixel(r.zoom())),t=t.map((function(t,r){var u=i(t,r),d=a.transformCoordinates(l,o,u.map((function(e,i){return n(e,i,t,r)}))),h=s.rdpLineSimplify(d,e,c(t,r),[]);for(var f in(h.length<2||2===h.length&&s.distance2dSquared(h[0],h[1])<e*e)&&(h=[]),h=a.transformCoordinates(o,l,h),t)!t.hasOwnProperty(f)||Array.isArray(t)&&f>=0&&f<t.length||(h[f]=t[f]);return h})),u.style("position",(function(t){return t})),u.style("line",(function(t){return t})),u.data(t),u},this._init=function(t){t=t||{},c.call(u,t);var e=i.extend({},{strokeWidth:1,strokeColor:{r:1,g:.8431372549,b:0},strokeStyle:"solid",strokeOpacity:1,antialiasing:2,closed:!1,line:function(t){return t},position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t},origin:function(t){return t.length>=3?t.slice(0,3):[0,0,0]}},void 0===t.style?{}:t.style);return void 0!==t.line&&(e.line=t.line),void 0!==t.position&&(e.position=t.position),u.style(e),u.dataTime().modified(),u},this._init(e),this};l.create=function(t,e){"use strict";return(e=e||{}).type="line",r.create(t,e)},l.capabilities={feature:"line",basic:"line.basic",multicolor:"line.multicolor"},i(l,r),t.exports=l},2804:function(t,e,n){var i=n(5638),r=n(5699),o=n(5358),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);if(void 0===(e=e||{}).node||null===e.node)return console.warn("map creation requires a node"),this;o.call(this,e);var r,a,s,l,u,c=n(9986),d=n(6853),h=n(4634),f=n(4647),p=n(5108),m=n(3870),g=n(6408),v=this,y=this._exit,x=i(e.node),b=e.width||x.width()||512,_=e.height||x.height()||512,w=void 0===e.gcs?"EPSG:3857":e.gcs,M=void 0===e.ingcs?"EPSG:4326":e.ingcs,A={x:0,y:0},T=void 0===e.zoom?4:e.zoom,C=e.rotation?e.rotation:0,E=null,S=null,k={min:0,max:16,origMin:0},P=null,O=null,R=!!e.discreteZoom,L="function"==typeof e.allowRotation?e.allowRotation:void 0===e.allowRotation||!!e.allowRotation,D=e.maxBounds||{},I=e.camera||c(),F=e.animationQueue||[],j=void 0===e.autoResize||e.autoResize,N=e.autoshareRenderer,z=((D.left||0)+(D.right||0))/2,B=((D.bottom||0)+(D.top||0))/2;function V(){var t;void 0!==document.hidden?t="hidden":void 0!==document.msHidden?t="msHidden":void 0!==document.webkitHidden&&(t="webkitHidden"),v.geoTrigger(document[t]?p.hidden:p.unhidden)}function G(t){var e;void 0!==document.hidden?e="visibilitychange":void 0!==document.msHidden?e="msvisibilitychange":void 0!==document.webkitHidden&&(e="webkitvisibilitychange"),document.removeEventListener(e,V),!1!==t&&document.addEventListener(e,V)}function U(t,e){var n=t.zIndex(),i=e.zIndex();if(n!==i)return n-i;var r=t.node()[0],o=e.node()[0],a=r&&r.parentNode,s=o&&o.parentNode;if(a&&s&&a===s){var l=Array.from(a.children),u=l.indexOf(r),c=l.indexOf(o);if(u>=0&&c>=0)return u-c}return a?-1:s?1:0}function q(t,e,n,i,r){t.globalAlpha=e,r&&(t.globalCompositeOperation=r);var o=n.css("transform");o&&"matrix("===o.substr(0,7)?t.setTransform.apply(t,o.substr(7,o.length-8).split(",").map(parseFloat)):t.setTransform(1,0,0,1,0,0),t.drawImage(i,0,0),t.globalCompositeOperation="source-over"}function W(){for(var t=F.splice(0,F.length),e=1;e<t.length;e+=1)try{t[e].apply(v,arguments)}catch(t){console.error(t)}}function H(t,e,n){var i=e.width/2,r=e.height/2,o=Math.sin(n),a=Math.cos(n),s={},l={},u={},c={};return s.x=t.x+-i*a- -r*o,s.y=t.y+-i*o+-r*a,l.x=t.x+i*a- -r*o,l.y=t.y+i*o+-r*a,u.x=t.x+-i*a-r*o,u.y=t.y+-i*o+r*a,c.x=t.x+i*a-r*o,c.y=t.y+i*o+r*a,{left:Math.min(s.x,l.x,u.x,c.x),right:Math.max(s.x,l.x,u.x,c.x),bottom:Math.min(s.y,l.y,u.y,c.y),top:Math.max(s.y,l.y,u.y,c.y)}}function Z(t,e){void 0===e&&(e=C),t=function(t,e){return e&&(t=H({x:(t.left+t.right)/2,y:(t.top+t.bottom)/2},{width:Math.abs(t.left-t.right),height:Math.abs(t.top-t.bottom)},e)),t}(t,e);var n=function(t){var e,n,i=t.right-t.left,r=t.top-t.bottom,o=Math.abs(i/r),a=b/_;return o>a?(e=1,n=o/a):(n=1,e=a/o),{x:e,y:n}}(t);return n.y>n.x?-Math.log2(Math.abs(t.right-t.left)*n.x/(b*r)):-Math.log2(Math.abs(t.top-t.bottom)*n.y/(_*r))}function X(){k.min=l?Math.max(k.origMin,Z(D)):k.origMin}function Q(t,e,n){if(!L)return 0;if(e||"function"!=typeof L||(t=L(t)),!n){var i=2*Math.PI;t=t%i+(t>=0?0:i),Math.min(Math.abs(t),Math.abs(t-i))<1e-5&&(t=0)}return t}function K(t,e,n,r){if(!a&&!s)return t;var o,l,u=D;if(e){u=i.extend({},D);var c,d,h=Math.abs(t.right-t.left),f=Math.abs(t.top-t.bottom),p=Math.abs(Math.sin(e)),m=Math.abs(Math.cos(e));if(t.width&&t.height)c=t.width,d=t.height;else if(Math.abs(p-m)<5e-4)if(b&&_){var g=Math.abs(b/_),v=Math.pow(1+Math.pow(g,2),.5);d=(c=Math.max(h,f)/v)*g}else c=h*m,d=f*p;else c=(m*h-p*f)/(m*m-p*p),d=(m*f-p*h)/(m*m-p*p);var y=h-Math.max(m*c,p*d),x=f-Math.max(m*d,p*c);u.left-=y,u.right+=y,u.top+=x,u.bottom-=x}return r&&(u={left:u.left-(t.right-t.left)/2,right:u.right+(t.right-t.left)/2,top:u.top-(t.bottom-t.top)/2,bottom:u.bottom+(t.bottom-t.top)/2}),a&&(t.right-t.left>u.right-u.left?o=u.left-(t.right-t.left-(u.right-u.left))/2-t.left:t.left<u.left?o=u.left-t.left:t.right>u.right&&(o=u.right-t.right),o&&(!n||n.x*o>0)&&(n&&Math.abs(o)>Math.abs(n.x*n.unit)&&(o=Math.abs(n.x*n.unit)*o/Math.abs(o)),t={left:t.left+=o,right:t.right+=o,top:t.top,bottom:t.bottom})),s&&(t.top-t.bottom>u.top-u.bottom?l=u.bottom-(t.top-t.bottom-(u.top-u.bottom))/2-t.bottom:t.top>u.top?l=u.top-t.top:t.bottom<u.bottom&&(l=u.bottom-t.bottom),l&&(!n||-n.y*l>0)&&(n&&Math.abs(l)>Math.abs(n.y*n.unit)&&(l=Math.abs(n.y*n.unit)*l/Math.abs(l)),t={top:t.top+=l,bottom:t.bottom+=l,left:t.left,right:t.right})),t}function Y(t,e){if(I.rotation=e||0,t.width&&t.height&&e){var n=(t.left+t.right)/2,i=(t.top+t.bottom)/2;I.viewFromCenterSizeRotation({x:n,y:i},t,e)}else I.bounds=t;A={x:(I.bounds.left+I.bounds.right)/2,y:(I.bounds.top+I.bounds.bottom)/2}}function J(){v.size({width:x.width(),height:x.height()})}return D.left=d.transformCoordinates(D.gcs||M,w,{x:void 0!==D.left?D.left:-180,y:B}).x,D.right=d.transformCoordinates(D.gcs||M,w,{x:void 0!==D.right?D.right:180,y:B}).x,D.top=void 0!==D.top?d.transformCoordinates(D.gcs||M,w,{x:z,y:D.top}).y:D.right,D.bottom=void 0!==D.bottom?d.transformCoordinates(D.gcs||M,w,{x:z,y:D.bottom}).y:D.left,r=e.unitsPerPixel||(D.right-D.left)/256,I.viewport={width:b,height:_,left:x.offset().left,top:x.offset().top},e.center=h.normalizeCoordinates(e.center),a=void 0!==e.clampBoundsX&&e.clampBoundsX,s=void 0===e.clampBoundsY||e.clampBoundsY,l=void 0===e.clampZoom||e.clampZoom,this.unitsPerPixel=function(t,e){return t=t||0,e?(r=Math.pow(2,t)*e,v.draw(),v):Math.pow(2,-t)*r},this.animationQueue=function(t){if(void 0===t)return F;if(t!==F){if(F.length){t.length&&t[0]!==F[0]&&window.cancelAnimationFrame(F[0]);for(var e=t.length?1:0;e<F.length;e+=1)t.push(F[e])}F=t}return v},this.autoResize=function(t){return void 0===t?j:(t!==j&&(i(window).off("resize",J),(j=t)&&i(window).on("resize",J)),v)},this.clampBoundsX=function(t){return void 0===t?a:(t!==a&&(a=!!t,v.pan({x:0,y:0})),v)},this.clampBoundsY=function(t){return void 0===t?s:(t!==s&&(s=!!t,v.pan({x:0,y:0})),v)},this.clampZoom=function(t){return void 0===t?l:(t!==l&&(l=!!t,X(),v.zoom(T)),v)},this.allowRotation=function(t){return void 0===t?L:("function"!=typeof t&&(t=!!t),t!==L&&(L=t,v.rotation(C)),v)},this.origin=function(){return i.extend({},u)},this.camera=function(){return I},this.gcs=function(t){if(void 0===t)return w;if(t!==w){var e=v.center(void 0,void 0);w=t,X();var n=v._fix_zoom(T);n!==T&&v.zoom(n),v.center(e,void 0)}return v},this.ingcs=function(t){return void 0===t?M:(M=t,v)},this.node=function(){return x},this.zoom=function(t,e,n){if(void 0===t)return T;var i,r,o=e&&(e.mapgcs||e.geo)&&e.map,a=o;if((t=v._fix_zoom(t,n))===T)return v;if(T=t,r=v.boundsFromZoomAndCenter(t,A,C,null,n,a),v.modified(),Y(r,C),i={zoomLevel:T,screenPosition:e?e.map:void 0},v.geoTrigger(p.zoom,i),o){var s=v.gcsToDisplay(e.mapgcs||e.geo,e.mapgcs?null:void 0);v.pan({x:e.map.x-s.x,y:e.map.y-s.y},n,!0)}else v.pan({x:0,y:0},n);return v},this.pan=function(t,e,n){var i={screenDelta:t};if(t.x||t.y){var r=v.unitsPerPixel(T),o=Math.sin(C),a=Math.cos(C);I.pan({x:(t.x*a- -t.y*o)*r,y:(t.x*o+-t.y*a)*r})}var s=I.bounds;if((s=K(s,C,"limited"===n?{x:t.x,y:t.y,unit:r}:void 0,!0===n))!==I.bounds){var l=v.gcsToDisplay({x:I.bounds.left,y:I.bounds.top},null);Y(s=v.boundsFromZoomAndCenter(T,{x:(s.left+s.right)/2,y:(s.top+s.bottom)/2},C,null,e,!0),C);var u=v.gcsToDisplay({x:I.bounds.left,y:I.bounds.top},null);i.screenDelta.x+=u.x-l.x,i.screenDelta.y+=u.y-l.y}return A=I.displayToWorld({x:b/2,y:_/2}),v.geoTrigger(p.pan,i),v.modified(),v},this.rotation=function(t,e,n){if(void 0===t)return C;var i=e&&e.geo&&e.map;if((t=Q(t,n))===C)return v;C=t;var r=v.boundsFromZoomAndCenter(T,A,C,null,n,!0);v.modified(),Y(r,C);var o={rotation:C,screenPosition:e?e.map:void 0};if(v.geoTrigger(p.rotate,o),i){var a=v.gcsToDisplay(e.geo);v.pan({x:e.map.x-a.x,y:e.map.y-a.y},void 0,!0)}else v.pan({x:0,y:0},void 0,!0);return X(),v.zoom(T,void 0,n),v},this.center=function(t,e,n,r){var o;return void 0===t?o=i.extend({},v.worldToGcs(A,e)):(o=v.gcsToWorld(t,e),Y(v.boundsFromZoomAndCenter(T,o,C,null,n,r),C),v.modified(),v.geoTrigger(p.pan,{screenDelta:{x:0,y:0}}),v)},this.createLayer=function(t,e){e=e||{},void 0!==v.autoshareRenderer()&&(e=Object.assign({autoshareRenderer:v.autoshareRenderer()},e));var n=f.createLayer(t,v,e);return n&&(v.addChild(n),v.children().forEach((function(t){t instanceof g&&t.moveToTop()})),n._update(),v.modified(),v.geoTrigger(p.layerAdd,{target:v,layer:n})),n},this.deleteLayer=function(t){return null!=t&&(t._exit(),v.removeChild(t),v.modified(),v.geoTrigger(p.layerRemove,{target:v,layer:t})),t},this.size=function(t){if(void 0===t)return{width:b,height:_};var e=v.center();b=t.width||b,_=t.height||_,X();var n=v._fix_zoom(T);return n!==T&&v.zoom(n),v.camera().viewport={width:b,height:_,left:x.offset().left,top:x.offset().top},v.center(e),v.geoTrigger(p.resize,{target:v,width:b,height:_}),v.modified(),v},this.rotatedSize=function(){if(!this.rotation())return{width:b,height:_};var t=H({x:0,y:0},{width:b,height:_},v.rotation());return{width:Math.abs(t.right-t.left),height:Math.abs(t.top-t.bottom)}},this.gcsToWorld=function(t,e){return Array.isArray(t)?t.map((function(t){return v.gcsToWorld(t,e)})):((e=null===e?w:void 0===e?M:e)!==w&&(t=d.transformCoordinates(e,w,t)),u.x||u.y||u.z?t=d.affineForward({origin:u},[t])[0]:"z"in t||(t={x:t.x,y:t.y,z:0}),t)},this.worldToGcs=function(t,e){return Array.isArray(t)?t.map((function(t){return v.worldToGcs(t,e)})):(u.x||u.y||u.z?t=d.affineInverse({origin:u},[t])[0]:"z"in t||(t={x:t.x,y:t.y,z:0}),(e=null===e?w:void 0===e?M:e)!==w&&(t=d.transformCoordinates(w,e,t)),t)},this.gcsToDisplay=function(t,e){return t=v.gcsToWorld(t,e),v.worldToDisplay(t)},this.worldToDisplay=function(t){return Array.isArray(t)?t.map((function(t){return I.worldToDisplay(t)})):I.worldToDisplay(t)},this.displayToGcs=function(t,e){return t=v.displayToWorld(t),v.worldToGcs(t,e)},this.displayToWorld=function(t){return Array.isArray(t)?t.map((function(t){return I.displayToWorld(t)})):I.displayToWorld(t)},this.draw=function(){var t,e=v.children();for(v.geoTrigger(p.draw,{target:v}),v._update(),t=0;t<e.length;t+=1)e[t].draw();return v.geoTrigger(p.drawEnd,{target:v}),v},this.fileReader=function(t,e){return void 0===t?E:("string"==typeof t?((e=e||{}).layer||(e.layer=v.createLayer("feature",i.extend({},e))),e.renderer=e.layer.renderer().api(),E=f.createFileReader(t,e)):E=t,v)},this._init=function(t){if(null==x)throw new Error("Map require DIV node");return x.data("data-geojs-map")&&i.isFunction(x.data("data-geojs-map").exit)&&x.data("data-geojs-map").exit(),x.addClass("geojs-map"),x.data("data-geojs-map",v),G(),v},this._update=function(t){var e,n=v.children();for(e=0;e<n.length;e+=1)n[e]._update(t);return v},this.exit=function(){G(!1);var t,e=v.children();for(t=e.length-1;t>=0;t-=1)e[t]._exit(),v.removeChild(e[t]);v.interactor()&&(v.interactor().destroy(),v.interactor(null)),F=[],v.node().data("data-geojs-map",null),v.node().off(".geo"),v.node().empty(),i(window).off("resize",J),y()},this.interactor=function(t){return void 0===t?S:(S&&S!==t&&S.destroy(),(S=t)&&(x.attr("tabindex")||x.attr("tabindex",0),S.map(v)),v)},this.zoomRange=function(t,e){return void 0===t?i.extend({},k):(void 0!==t.max&&(k.max=t.max),void 0!==t.min&&(k.min=k.origMin=t.min),X(),e||v.zoom(T),v)},this.transition=function(t,e,n){if(void 0===t)return P;if(P){var r=i.extend(!0,{},P.end);return r.center&&w!==M&&(r.center=d.transformCoordinates(w,M,r.center)),O=i.extend({},r||{},O||{},t),v}var o=v.unitsPerPixel(0);function a(t){return Math.pow(2,-(t+1))*o*_}var s={center:void 0,zoom:v.zoom(),rotation:v.rotation(),duration:1e3,ease:function(t){return t},interp:function(t,e){return function(n){var r=[];return i.each(t,(function(i){r.push(function(t,e,n){return t+(e-t)*n}(t[i],e[i],n))})),r}},done:null,zCoord:!0};function l(e){var n=P.done,i=O;if(!0===P.cancel)return v.geoTrigger(p.transitioncancel,t),n&&n({cancel:!0,source:P.cancelSource,transition:P}),P=null,void(O&&(i=O,O=null,v.transition(i,void 0,e)));if(P.start.time||(P.start.time=e,P.end.time=e+t.duration),P.time=e-P.start.time,e>=P.end.time||i){if(!i){if(P.end.center){var r=T!==v._fix_zoom(P.end.zoom);v.center(P.end.center,null,r,r)}v.zoom(P.end.zoom,P.zoomOrigin),v.rotation(Q(P.end.rotation))}return v.geoTrigger(p.transitionend,t),n&&n({next:!!i}),P=null,void(O&&(i=O,O=null,v.transition(i,void 0,e)))}var a=P.ease((e-P.start.time)/t.duration),s=P.interp(a);P.zCoord&&(s[2]=function(t){return-Math.log2(t/o/_)-1}(s[2])),v._fix_zoom(s[2],!0)===T?v.center({x:s[0],y:s[1]},null,!0,!0):(A=v.gcsToWorld({x:s[0],y:s[1]},null),v.zoom(s[2],P.zoomOrigin,!0)),v.rotation(s[3],void 0,!0),v.scheduleAnimationFrame(l)}return t.center&&(e=null===e?w:void 0===e?M:e,(t=i.extend(!0,{},t)).center=h.normalizeCoordinates(t.center),e!==w&&(t.center=d.transformCoordinates(e,w,t.center))),t=i.extend(!0,{},s,t),(P={start:{center:v.center(void 0,null),zoom:v.zoom(),rotation:v.rotation()},end:{center:t.center,zoom:v._fix_zoom(t.zoom),rotation:Q(t.rotation,void 0,!0)},ease:t.ease,zCoord:t.zCoord,done:t.done,duration:t.duration,zoomOrigin:t.zoomOrigin}).interp=t.interp([P.start.center.x,P.start.center.y,t.zCoord?a(P.start.zoom):P.start.zoom,P.start.rotation],[P.end.center?P.end.center.x:P.start.center.x,P.end.center?P.end.center.y:P.start.center.y,t.zCoord?a(P.end.zoom):P.end.zoom,P.end.rotation]),v.geoTrigger(p.transitionstart,t),p.cancelNavigation?(P=null,v.geoTrigger(p.transitionend,t),v):(p.cancelAnimation?(t.duration=0,l(0)):n?l(n):v.scheduleAnimationFrame(l),v)},this.transitionCancel=function(t){return!(!P||!0===P.cancel&&!O)&&(P.cancel=!0,P.cancelSource=t||P.cancelSource||"",O=null,!0)},this.bounds=function(t,e){var n;if(e=null===e?w:void 0===e?M:e,void 0!==t){if(e!==w){var i=d.transformCoordinates(e,w,[{x:t.left,y:t.top},{x:t.right,y:t.bottom}]);t={left:i[0].x,top:i[0].y,right:i[1].x,bottom:i[1].y}}t=K(t,C),n=v.zoomAndCenterFromBounds(t,C,null),v.zoom(n.zoom),v.center(n.center,null)}return v.boundsFromZoomAndCenter(T,A,C,e,!0)},this.maxBounds=function(t,e){if(e=null===e?w:void 0===e?M:e,void 0===t)return{left:d.transformCoordinates(w,e,{x:D.left,y:0}).x,right:d.transformCoordinates(w,e,{x:D.right,y:0}).x,bottom:d.transformCoordinates(w,e,{x:0,y:D.bottom}).y,top:d.transformCoordinates(w,e,{x:0,y:D.top}).y};var n=((t.left||0)+(t.right||0))/2,i=((t.bottom||0)+(t.top||0))/2;return void 0!==t.left&&(D.left=d.transformCoordinates(e,w,{x:t.left,y:i}).x),void 0!==t.right&&(D.right=d.transformCoordinates(e,w,{x:t.right,y:i}).x),void 0!==t.bottom&&(D.bottom=d.transformCoordinates(e,w,{x:n,y:t.bottom}).y),void 0!==t.top&&(D.top=d.transformCoordinates(e,w,{x:n,y:t.top}).y),X(),v.zoom(T),v.pan({x:0,y:0}),v},this.zoomAndCenterFromBounds=function(t,e,n){var i,r;if((n=null===n?w:void 0===n?M:n)!==w){var o=d.transformCoordinates(n,w,[{x:t.left,y:t.top},{x:t.right,y:t.bottom}]);t={left:o[0].x,top:o[0].y,right:o[1].x,bottom:o[1].y}}if(t.left>=t.right||t.bottom>=t.top)throw new Error("Invalid bounds provided");return r=v._fix_zoom(Z(t,e)),i={x:((t=K(t,e)).left+t.right)/2-u.x,y:(t.top+t.bottom)/2-u.y},n!==w&&(i=d.transformCoordinates(w,n,i)),{zoom:r,center:i}},this.boundsFromZoomAndCenter=function(t,e,n,i,r,o){var a,s,l,c,h,f;if(i=null===i?w:void 0===i?M:i,t=v._fix_zoom(t,r),f=v.unitsPerPixel(t),e=v.gcsToWorld(e,null),l=(a=b*f)/2,c=(s=_*f)/2,n?(e.x+=u.x,e.y+=u.y,(h=H(e,{width:a,height:s},n)).width=a,h.height=s,h=K(h,n,void 0,o)):h=K(h={left:e.x-l+u.x,right:e.x+l+u.x,bottom:e.y-c+u.y,top:e.y+c+u.y},0,void 0,o),i!==w){var p=d.transformCoordinates(w,i,[[h.left,h.top],[h.right,h.bottom]]);h={left:p[0][0],top:p[0][1],right:p[1][0],bottom:p[1][1]}}return h.width=a,h.height=s,h},this.discreteZoom=function(t){return void 0===t?R:(R!==(t=!!t)&&((R=t)&&v.zoom(Math.round(v.zoom())),v.interactor()&&v.interactor().options({discreteZoom:R})),v)},this.layers=this.children,this.sortedLayers=function(){return v.children().sort(U)},this.listSceneObjects=function(t){var e=[];return(t=t||v.sortedLayers()).forEach((function(t){if(e.indexOf(t)<0&&(e.push(t),t.children)){var n=t.children();n.length&&(e=e.concat(v.listSceneObjects(n)))}})),e},this.updateAttribution=function(){v.node().find(".geo-attribution").remove();var t=i("<div/>").addClass("geo-attribution").on("mousedown",(function(t){t.stopPropagation()}));return v.children().forEach((function(e){var n=e.attribution();n&&i("<span/>").addClass("geo-attribution-layer").html(n).appendTo(t)})),i("span",t).length&&t.appendTo(v.node()),v},this.screenshot=function(t,e,n,r){var o;if(!t||Array.isArray(t)||t.renderer||(e=e||t.type,n=n||t.encoderOptions,r=r||t,t=t.layers),(r=r||{}).wait){var a=i.extend({},r,{wait:!1});o=i.Deferred();var s=function(){window.requestAnimationFrame((function(){o.resolve()}))};return"idle"===r.wait?v.onIdle(s):s(),o.then((function(){return v.screenshot(t,e,n,a)}))}o=i.when(),t?Array.isArray(t)||(t=[t]):(t=v.layers(),null!==r.attribution&&void 0!==r.attribution||(r.attribution=!0)),t=(t=t.filter((function(t){return v.layers().indexOf(t)>=0&&t.opacity()>0&&(!t.visible||t.visible())}))).sort(U);var l=document.createElement("canvas");l.width=b,l.height=_;var u=l.getContext("2d");if(!1!==r.background&&null!==r.background){var c=r.background;void 0===r.background&&(u.fillStyle="white",u.fillRect(0,0,l.width,l.height),v.node().parents().get().reverse().forEach((function(t){(c=window.getComputedStyle(t).backgroundColor)&&"transparent"!==c&&(u.fillStyle=c,u.fillRect(0,0,l.width,l.height))})),c=window.getComputedStyle(v.node()[0]).backgroundColor),c&&"transparent"!==c&&(u.fillStyle=c,u.fillRect(0,0,l.width,l.height))}return t.forEach((function(t){var e=t.opacity();t.node().children("canvas").each((function(){var n=i(this);o=o.then((function(){t.renderer()&&"webgl"===t.renderer().api()&&t.renderer()._renderFrame(),q(u,e,n,n[0],t.node().css("mix-blend-mode"))}))})),!t.node().children().not("canvas").length&&t.node().children().length||t.renderer()&&"webgl"===t.renderer().api()||(o=o.then((function(){return h.htmlToImage(t.node(),1).done((function(e){q(u,1,i([]),e,t.node().css("mix-blend-mode"))}))})))})),r.attribution&&v.node().find(".geo-attribution").each((function(){var t=i(this);o=o.then((function(){return h.htmlToImage(t,1).done((function(t){q(u,1,i([]),t)}))}))})),r.html&&i(r.html).each((function(){var t=i(this);o=o.then((function(){return h.htmlToImage(t,1).done((function(e){q(u,1,i([]),e,t.css("mix-blend-mode"))}))}))})),o=o.then((function(){var t=l;if("canvas"!==e)try{l=l.toDataURL(e,n)}catch(t){console.warn("Failed to convert screenshot to output",t);var r=i.Deferred();return r.reject(),r}return v.geoTrigger(p.screenshot.ready,{canvas:t,screenshot:l}),l}))},this.scheduleAnimationFrame=function(t,e){F.length||F.push(window.requestAnimationFrame(W));var n=F.indexOf(t,1);if(n>=0){if(!e)return;if(F.splice(n,1),"remove"===e)return}return F.push(t),F[0]},this._fix_zoom=function(t,e){return t=Math.round(1e6*t)/1e6,t=Math.max(Math.min(k.max,t),k.min),R&&!e&&(t=Math.round(t))<k.min&&(t=Math.ceil(k.min)),t},this.autoshareRenderer=function(t){return void 0===t?N:(N=null===t?void 0:t,v)},this._init(e),this.node().on("dragover.geo",(function(t){var e=t.originalEvent;v.fileReader()&&(e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy")})).on("drop.geo",(function(t){var e,n,i=t.originalEvent,r=v.fileReader();function o(){v.draw()}if(r)for(i.stopPropagation(),i.preventDefault(),e=0;e<i.dataTransfer.files.length;e+=1)n=i.dataTransfer.files[e],r.canRead(n)&&r.read(n,o)})),u={x:0,y:0},this.zoomRange(e,!0),T=this._fix_zoom(T),C=Q(C),this.center(i.extend({},e.center||A),void 0),null!==e.interactor&&this.interactor(e.interactor||m({discreteZoom:R})),j&&i(window).on("resize",J),v.geoOn([p.layerAdd,p.layerRemove],v.updateAttribution),this};a.create=function(t){"use strict";var e=a(t),i=n(9105);return e&&e.zoom?(t.data=t.data||[],t.layers=t.layers||[],t.layers.forEach((function(n){n.data=n.data||t.data,n.layer=i.create(e,n)})),e):(console.warn("Could not create map."),null)},r(a,o),t.exports=a},3870:function(t,e,n){var i=n(5699),r=n(3737),o=n(4634),a=n(3345),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this);var i,s,l,u,c,d,h,f,p,m,g=n(5638),v=n(5108),y=n(7839),x=n(4634).throttle,b=n(4634).debounce,_=n(4634).actionMatch,w=n(5017),M=this,A=null,T=!1,C=!1,E=function(){};function S(t){var e=t.x,n=t.y;return Math.sqrt(e*e+n*n)}function k(){d={boundDocumentHandlers:d.boundDocumentHandlers}}function P(t,e){e=e<=0?30:e;var n=function(){var t,e,n,r;if(!i.spring.enabled)return{x:0,y:0};var o=M.map().maxBounds(void 0,null),a=M.map().gcsToDisplay({x:o.left,y:o.top},null),s=M.map().gcsToDisplay({x:o.right,y:o.bottom},null),l=i.spring.springConstant,u=M.map().node().width(),c=M.map().node().height();return t=l*Math.max(0,a.x),e=l*Math.max(0,u-s.x),n=l*Math.max(0,a.y)/2,r=l*Math.max(0,c-s.y)/2,{x:t-e,y:n-r}}(),r=S(t),o=t.x/r,a=t.y/r;return r*=Math.exp(-i.momentum.drag*e),S(n)*e+r<i.momentum.minSpeed?null:(r>0?(o*=r,a*=r):(o=0,a=0),{x:o-n.x*e,y:a-n.y*e})}return i=g.extend(!0,{},{throttle:30,discreteZoom:!1,actions:[{action:y.pan,input:"left",modifiers:{shift:!1,ctrl:!1},owner:"geo.mapInteractor",name:"button pan"},{action:y.zoom,input:"right",modifiers:{shift:!1,ctrl:!1},owner:"geo.mapInteractor",name:"button zoom"},{action:y.zoom,input:"wheel",modifiers:{shift:!1,ctrl:!1},owner:"geo.mapInteractor",name:"wheel zoom"},{action:y.rotate,input:"left",modifiers:{shift:!1,ctrl:!0},owner:"geo.mapInteractor",name:"button rotate"},{action:y.rotate,input:"wheel",modifiers:{shift:!1,ctrl:!0},owner:"geo.mapInteractor",name:"wheel rotate"},{action:y.select,input:"left",modifiers:{shift:!0,ctrl:!0},selectionRectangle:v.select,owner:"geo.mapInteractor",name:"drag select"},{action:y.zoomselect,input:"left",modifiers:{shift:!0,ctrl:!1},selectionRectangle:v.zoomselect,owner:"geo.mapInteractor",name:"drag zoom"},{action:y.unzoomselect,input:"right",modifiers:{shift:!0,ctrl:!1},selectionRectangle:v.unzoomselect,owner:"geo.mapInteractor",name:"drag unzoom"},{action:y.pan,input:"pan",owner:"geo.mapInteractor",name:"touch pan"},{action:y.zoomrotate,input:"rotate",owner:"geo.mapInteractor",name:"touch zoom and rotate"}],click:{enabled:!0,buttons:{left:!0,right:!0,middle:!0},duration:0,cancelOnMove:!0},keyboard:{actions:{"zoom.in":["plus","shift+plus","shift+ctrl+plus","=","shift+=","shift+ctrl+="],"zoom.out":["-","shift+-","shift+ctrl+-","_","shift+_","shift+ctrl+_"],"zoom.0":["1"],"zoom.3":["2"],"zoom.6":["3"],"zoom.9":["4"],"zoom.12":["5"],"zoom.15":["6"],"zoom.18":["7"],"pan.left":["left","shift+left","shift+ctrl+left"],"pan.right":["right","shift+right","shift+ctrl+right"],"pan.up":["up","shift+up","shift+ctrl+up"],"pan.down":["down","shift+down","shift+ctrl+down"],"rotate.ccw":["<","shift+<","shift+ctrl+<",".","shift+.","shift+ctrl+."],"rotate.cw":[">","shift+>","shift+ctrl+>",",","shift+,","shift+ctrl+,"],"rotate.0":["0"]},meta:{0:{shift:!1,ctrl:!1},1:{shift:!0,ctrl:!0},2:{shift:!0,ctrl:!1}},focusHighlight:!0},alwaysTouch:!1,wheelScaleX:1,wheelScaleY:1,zoomScale:1,rotateWheelScale:6*Math.PI/180,zoomrotateMinimumRotation:5*Math.PI/180,zoomrotateReverseRotation:4*Math.PI/180,zoomrotateMinimumZoom:.05,zoomrotateMinimumPan:5,touchPanDelay:50,momentum:{enabled:!0,maxSpeed:2.5,minSpeed:.01,stopTime:250,drag:.01,actions:[y.pan,y.zoom]},spring:{enabled:!1,springConstant:5e-5},zoomAnimation:{enabled:!0,duration:500,ease:function(t){return(2-t)*t}}},e||{}),e&&e.actions&&(i.actions=g.extend(!0,[],e.actions)),e&&e.momentum&&e.momentum.actions&&(i.momentum.actions=g.extend(!0,[],e.momentum.actions)),e&&e.keyboard&&void 0!==e.keyboard.actions&&(i.keyboard.actions=g.extend(!0,{},e.keyboard.actions)),s={page:{x:0,y:0},map:{x:0,y:0},geo:{x:0,y:0},mapgcs:{x:0,y:0},buttons:{left:!1,right:!1,middle:!1},modifiers:{alt:!1,ctrl:!1,shift:!1,meta:!1},time:new Date,deltaTime:1,velocity:{x:0,y:0}},d={},h={},this._handleKeys=function(t,e,n){n&&!0===n.simulated&&(e=n);var r,o,a=i.keyboard.meta||{0:{}},s=M.map(),l=s.size(),u=t,c="",d={};for(r in a)a.hasOwnProperty(r)&&(void 0!==a[r].shift&&e.shiftKey!==!!a[r].shift||void 0!==a[r].ctrl&&e.ctrlKey!==!!a[r].ctrl||void 0!==a[r].alt&&e.altKey!==!!a[r].alt||void 0!==a[r].meta&&e.metaKey!==!!a[r].meta||(o=r));if(void 0!==o){switch(e.stopPropagation(),e.preventDefault(),t.indexOf(".")>=0&&(u=t.substr(0,t.indexOf(".")),c=t.substr(t.indexOf(".")+1)),u){case"zoom":switch(c){case"in":d.zoomDelta=[.05,.25,1][o];break;case"out":d.zoomDelta=-[.05,.25,1][o];break;default:isNaN(parseFloat(c))||(d.zoom=parseFloat(c))}break;case"pan":switch(c){case"down":d.panY=-Math.max(1,[0,.05,.5][o]*l.height);break;case"left":d.panX=Math.max(1,[0,.05,.5][o]*l.width);break;case"right":d.panX=-Math.max(1,[0,.05,.5][o]*l.width);break;case"up":d.panY=Math.max(1,[0,.05,.5][o]*l.height)}break;case"rotate":switch(c){case"ccw":d.rotationDelta=[1,5,90][o]*Math.PI/180;break;case"cw":d.rotationDelta=-[1,5,90][o]*Math.PI/180;break;default:isNaN(parseFloat(c))||(d.rotation=parseFloat(c))}}s.geoTrigger(v.keyaction,{move:d,action:t,factor:o,event:e}),d.cancel||(void 0!==d.zoom?s.zoom(d.zoom):d.zoomDelta&&s.zoom(s.zoom()+d.zoomDelta),void 0!==d.rotation?s.rotation(d.rotation):d.rotationDelta&&s.rotation(s.rotation()+d.rotationDelta),(d.panX||d.panY)&&s.pan({x:d.panX||0,y:d.panY||0}))}},this.hasTouchSupport=function(){return"ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof window.DocumentTouch||(navigator.msMaxTouchPoints||navigator.maxTouchPoints)>1},this._handleTouch=function(t){var e=!1;if("mouse"===t.pointerType&&c.touchSupport&&(e=!0),"hammer.input"===t.type){if("pan"!==c.lastEventType||1===t.pointers.length)return;e=!0,c.lastEventType=null}var n=/^(.*)(start|end|move|tap)$/.exec(t.type);if(n&&3===n.length||(e=!0),e)d.boundDocumentHandlers&&c.lastEvent&&M._handleMouseUpDocument(c.lastEvent);else{t.which=n[1];var r=(new Date).valueOf();"pan"===t.which&&"pan"!==c.lastEventType&&r-c.lastTime<i.touchPanDelay||(c.lastTime=r,c.lastEventType=t.which,c.lastEvent=t,void 0===t.pageX&&void 0!==t.center&&void 0!==t.center.x&&(t.pageX=t.center.x,t.pageY=t.center.y),"start"===n[2]&&(M._handleMouseDown(t),M._setClickMaybe(!1),d.boundDocumentHandlers&&g(document).on("mousemove.geojs",M._handleMouseUpDocument)),"start"!==n[2]&&"move"!==n[2]||(d.boundDocumentHandlers?M._handleMouseMoveDocument(t):M._handleMouseMove(t)),"end"!==n[2]&&"cancel"!==n[2]||(d.boundDocumentHandlers?M._handleMouseUpDocument(t):M._handleMouseUp(t),c.lastEvent=null),"tap"!==n[2]||d.boundDocumentHandlers||(t.which=1,c.lastEventType=null,M._handleMouseDown(t),M._handleMouseUp(t),c.lastEventType=n[2]))}},this.retriggerMouseMove=function(){M.map().geoTrigger(v.mousemove,M.mouse())},this._connectEvents=function(){if(!i.map)return M;M._disconnectEvents(),f=g(i.map.node()),M._handleMouseWheel=function(){var t={};function e(e){var n,r;T||(t!==h&&(h=t={kind:"wheel",scroll:{x:0,y:0}}),e.preventDefault(),e.deltaFactor=1,1===e.originalEvent.deltaMode?e.deltaFactor=40:2===e.originalEvent.deltaMode&&(e.deltaFactor=g(window).height()),n=e.originalEvent.deltaX||0,r=e.originalEvent.deltaY||0,n=n*i.wheelScaleX*e.deltaFactor/120,r=r*i.wheelScaleY*e.deltaFactor/120,t.scroll.x+=n,t.scroll.y+=r)}function n(e){var n,r;if(t===h){if(M._getMousePosition(e),M._getMouseButton(e),M._getMouseModifiers(e),r=(_({wheel:!0},s.modifiers,i.actions)||{}).action){var o=M.map().transitionCancel("wheel."+r);switch((o|=M.cancel(y.momentum,!0))&&(s.geo=M.map().displayToGcs(s.map),s.mapgcs=M.map().displayToGcs(s.map,null)),r){case y.pan:M.map().pan({x:h.scroll.x,y:h.scroll.y},void 0,"limited");break;case y.zoom:n=-h.scroll.y,E(n,s);break;case y.rotate:M.map().rotation(M.map().rotation()+h.scroll.y*i.rotateWheelScale,s)}M.map().geoTrigger(v.actionwheel,{state:M.state(),mouse:M.mouse(),eventData:e})}h={}}}return i.throttle>0?x(i.throttle,!1,n,e):function(t){e(t),n(t)}}(),E=function(){var t,e,n,r=0,o=400;function a(o,a){var s,l=M.map();t=g.extend(!0,{},a),r+=o,void 0===n&&(e=n=l.zoom()),n+=o,l&&Math.abs(r)>=1&&i.discreteZoom&&!i.zoomAnimation.enabled&&(s=Math.round(r+l.zoom()),r=r+l.zoom()-s,l.zoom(s,t))}function s(){var o,a=M.map();a&&(i.zoomAnimation.enabled?(o=n,i.discreteZoom&&(o=Math.round(o))===e&&n!==e&&(o=e+(n>e?1:-1)),(o=Math.round(1e6*a._fix_zoom(o))/1e6)!==a.zoom()?(a.transitionCancel("debounced_zoom."+y.zoom),a.transition({zoom:o,zoomOrigin:t,duration:i.zoomAnimation.duration,ease:i.zoomAnimation.ease,done:function(t){t=t||{};var e=new RegExp("\\."+y.zoom+"$");t.next||t.cancel&&!((""+t.source).search(e)<0)||(n=void 0),i.discreteZoom&&t.cancel&&t.transition&&t.transition.end&&(""+t.source).search(e)<0&&a.zoom(t.transition.end.zoom,t.transition.end.zoomOrigin)}})):n=void 0):(o=r+a.zoom(),i.discreteZoom&&(o=Math.round(o)),a.zoom(o,t))),r=0}!0!==i.discreteZoom&&i.discreteZoom>0&&(o=i.discreteZoom);return(!0===i.discreteZoom||i.discreteZoom>0)&&!i.zoomAnimation.enabled?b(o,!1,s,a):function(t,e){(t||void 0!==n)&&(a(t,e),s())}}(),o.adjustActions(i.actions);var t={};if(["right","pan","rotate"].forEach((function(e){t[e]=i.actions.some((function(t){return t.input[e]}))})),f.on("wheel.geojs",M._handleMouseWheel),f.on("mousemove.geojs",M._handleMouseMove),f.on("mousedown.geojs",M._handleMouseDown),f.on("mouseup.geojs",M._handleMouseUp),f.on("dragstart",(function(){return!1})),t.right&&f.on("contextmenu.geojs",(function(){return!1})),i.keyboard&&i.keyboard.actions){l=a(f[0]);var e=[];for(var r in i.keyboard.actions)i.keyboard.actions.hasOwnProperty(r)&&(l.bind(i.keyboard.actions[r],function(t){return function(e,n){M._handleKeys(t,e,n)}}(r)),e=e.concat(i.keyboard.actions[r]));u=e}if(f.toggleClass("highlight-focus",!!(u&&u.length&&i.keyboard.focusHighlight)),(M.hasTouchSupport()||i.alwaysTouch)&&(t.pan||t.rotate)){var d;try{(d=n(3877))&&d.Manager||(d=void 0)}catch(t){}if(void 0!==d){var p=[],m=["hammer.input"];t.rotate&&(p.push([d.Rotate,{enable:!0}]),m=m.concat(["rotatestart","rotateend","rotatemove"])),t.pan&&(p.push([d.Pan,{direction:d.DIRECTION_ALL}]),m=m.concat(["panstart","panend","panmove"])),p.push([d.Tap,{event:"doubletap",taps:2}]),p.push([d.Tap,{event:"singletap"},void 0,["doubletap"]]),m=m.concat(["singletap"]);var w={recognizers:p,preventDefault:!0};(c={manager:new d.Manager(f[0],w),touchSupport:M.hasTouchSupport(),lastTime:0}).manager.get("doubletap").recognizeWith("singletap"),m.forEach((function(t){c.manager.on(t,M._handleTouch)}))}}return M},this._disconnectEvents=function(){return u&&(l&&l.unbind(u),u=null,l=null),c&&(c.manager.destroy(),c=null),f&&(f.off(".geojs"),f=null),M._handleMouseWheel=function(){},E=function(){},M},this.map=function(t){return void 0!==t?(i.map=t,M._connectEvents(),M):i.map},this.options=function(t){return void 0===t?g.extend({},i):(g.extend(i,t),M._connectEvents(),M)},this._getMousePosition=function(t){if(void 0!==t.pageX&&void 0!==t.pageY){var e,n,i=f.offset();e=(n=(new Date).valueOf())-s.time,s.time=n,s.deltaTime=e,s.velocity={x:(t.pageX-s.page.x)/e,y:(t.pageY-s.page.y)/e},s.page={x:t.pageX,y:t.pageY},s.map={x:t.pageX-i.left,y:t.pageY-i.top};try{s.geo=M.map().displayToGcs(s.map),s.mapgcs=M.map().displayToGcs(s.map,null)}catch(t){s.geo=s.mapgcs=null}}},this._getMouseButton=function(t){if(void 0!==t.buttons||void 0!==t.which){for(var e in s.buttons)s.buttons.hasOwnProperty(e)&&(s.buttons[e]=!1);if(void 0!==t.buttons)s.buttons.left=!!(1&t.buttons),s.buttons.right=!!(2&t.buttons),s.buttons.middle=!!(4&t.buttons);else if("mouseup"!==t.type)switch(t.which){case 1:s.buttons.left=!0;break;case 2:s.buttons.middle=!0;break;case 3:s.buttons.right=!0}!t.which||t.which>=1&&t.which<=3||(s.buttons[t.which]=!0)}},this._getMouseModifiers=function(t){s.modifiers.alt=t.altKey,s.modifiers.ctrl=t.ctrlKey,s.modifiers.meta=t.metaKey,s.modifiers.shift=t.shiftKey},this._getSelection=function(){var t=d.origin,e=M.mouse(),n=M.map(),i={},r={},a=e.map;if(d.actionRecord&&o.isFunction(d.actionRecord.selectionConstraint)){var s=d.actionRecord.selectionConstraint(e.mapgcs,t.mapgcs);a=s?n.gcsToDisplay(s.pos,null):a}else if(e.modifiers.shift){var l=Math.pow(Math.abs((a.x-t.map.x)*(a.y-t.map.y)),.5);a={x:t.map.x+Math.sign(a.x-t.map.x)*l,y:t.map.y+Math.sign(a.y-t.map.y)*l}}return i.upperLeft={x:Math.min(t.map.x,a.x),y:Math.min(t.map.y,a.y)},i.lowerRight={x:Math.max(t.map.x,a.x),y:Math.max(t.map.y,a.y)},i.upperRight={x:i.lowerRight.x,y:i.upperLeft.y},i.lowerLeft={x:i.upperLeft.x,y:i.lowerRight.y},r.upperLeft=n.displayToGcs(i.upperLeft,null),r.lowerRight=n.displayToGcs(i.lowerRight,null),r.upperRight=n.displayToGcs(i.upperRight,null),r.lowerLeft=n.displayToGcs(i.lowerLeft,null),p.data([{ul:r.upperLeft,ur:r.upperRight,ll:r.lowerLeft,lr:r.lowerRight}]),p.draw(),{display:i,gcs:r,mouse:e,origin:g.extend({},d.origin)}},this.cancel=function(t,e){var n;return(n=t?d.action===t:!!d.action)&&(e||(h={}),k()),n},this._setClickMaybe=function(t){C=t,m&&(window.clearTimeout(m),m=null)},this._handleMouseDown=function(t){var e,n;if(!(T||c&&"tap"===c.lastEventType&&(new Date).valueOf()-c.lastTime<1e3)){M._getMousePosition(t),M._getMouseButton(t),M._getMouseModifiers(t),!i.click.enabled||s.buttons.left&&!i.click.buttons.left||s.buttons.right&&!i.click.buttons.right||s.buttons.middle&&!i.click.buttons.middle||(M._setClickMaybe({x:s.page.x,y:s.page.y,buttons:g.extend({},s.buttons)}),i.click.duration>0&&(m=window.setTimeout((function(){C=!1,m=null}),i.click.duration))),e=((n=_(s.buttons,s.modifiers,i.actions))||{}).action;var r=M.map();r.transitionCancel("_handleMouseDown"+(e?"."+e:"")),M.cancel(y.momentum),s.velocity={x:0,y:0},e&&(h={kind:"move"},d={action:e,actionRecord:n,origin:g.extend(!0,{},s),initialZoom:r.zoom(),initialRotation:r.rotation(),initialEventRotation:t.rotation,delta:{x:0,y:0}},n.selectionRectangle&&(A&&(A.clear(),r.deleteLayer(A),A=null),A=r.createLayer("feature",{features:[w.capabilities.color],autoshareRenderer:!1}),(p=A.createFeature("quad",{gcs:r.gcs()})).style({opacity:.25,color:{r:.3,g:.3,b:.3}}),r.geoTrigger(v.brushstart,M._getSelection())),r.geoTrigger(v.actiondown,{state:M.state(),mouse:M.mouse(),event:t}),i.throttle>0?g(document).on("mousemove.geojs",x(i.throttle,M._handleMouseMoveDocument)):g(document).on("mousemove.geojs",M._handleMouseMoveDocument),g(document).on("mouseup.geojs",M._handleMouseUpDocument),d.boundDocumentHandlers=!0)}},this._handleMouseMove=function(t){T||d.boundDocumentHandlers||(i.click.cancelOnMove&&C&&M._setClickMaybe(!1),M._getMousePosition(t),M._getMouseButton(t),M._getMouseModifiers(t),C||M.map().geoTrigger(v.mousemove,M.mouse()))},this._handleZoomrotate=function(t){var e=Math.log2(t.scale);if(!d.zoomrotateAllowZoom&&e&&Math.abs(e)>=Math.log2(1+i.zoomrotateMinimumZoom)&&(i.zoomrotateMinimumZoom&&(d.initialZoom-=e),d.zoomrotateAllowZoom=!0),d.zoomrotateAllowZoom&&e){var n=d.initialZoom+e;M.map().zoom(n,d.origin)}var r=(t.rotation-d.initialEventRotation)*Math.PI/180;if(!d.zoomrotateAllowRotation&&r&&Math.abs(r)>=i.zoomrotateMinimumRotation&&(i.zoomrotateMinimumRotation&&(d.initialEventRotation=t.rotation,r=0),d.zoomrotateAllowRotation=!0),d.zoomrotateAllowRotation){var a=d.initialRotation+r;(r=o.wrapAngle(a-M.map().rotation()))&&(r*(d.lastRotationDelta||0)>=0||Math.abs(r)>=i.zoomrotateReverseRotation)&&(M.map().rotation(a,d.origin),d.lastRotationDelta=r)}var s=d.origin.page;if(d.initialEventGeo){var l=f.offset();(s=M.map().gcsToDisplay(d.initialEventGeo)).x+=l.left,s.y+=l.top}var u=t.pageX-s.x,c=t.pageY-s.y,h=u*u+c*c;!d.zoomrotateAllowPan&&h&&h>=i.zoomrotateMinimumPan*i.zoomrotateMinimumPan&&(i.zoomrotateMinimumPan?(u=c=0,d.initialEventGeo=M.mouse().geo):d.initialEventGeo=d.origin.geo,d.zoomrotateAllowPan=!0),d.zoomrotateAllowPan&&(u||c)&&M.map().pan({x:u,y:c})},this._handleMouseMoveDocument=function(t){var e,n,r;if(M.map()&&!T&&"move"===h.kind){if(M._getMousePosition(t),M._getMouseButton(t),M._getMouseModifiers(t),i.click.cancelOnMove)if(void 0===C.x||void 0===C.y)M._setClickMaybe(!1);else if(!0!==i.click.cancelOnMove||s.page.x===C.x&&s.page.y===C.y){Math.sqrt(Math.pow(s.page.x-C.x,2)+Math.pow(s.page.y-C.y,2))>=i.click.cancelOnMove&&M._setClickMaybe(!1)}else M._setClickMaybe(!1);if(!C)if(d.action){if(e=s.map.x-d.origin.map.x-d.delta.x,n=s.map.y-d.origin.map.y-d.delta.y,d.delta.x+=e,d.delta.y+=n,d.action===y.pan)M.map().pan({x:e,y:n},void 0,"limited");else if(d.action===y.zoom)E(-n*i.zoomScale/120,d);else if(d.action===y.rotate){var o,a;void 0===d.origin.rotation&&(o=d.origin.map.x-M.map().size().width/2,a=d.origin.map.y-M.map().size().height/2,d.origin.rotation=M.map().rotation()-Math.atan2(a,o)),o=s.map.x-M.map().size().width/2,a=s.map.y-M.map().size().height/2,M.map().rotation(d.origin.rotation+Math.atan2(a,o))}else d.action===y.zoomrotate?M._handleZoomrotate(t):d.actionRecord.selectionRectangle&&(r=M._getSelection(),M.map().geoTrigger(v.brush,r));M.map().geoTrigger(v.actionmove,{state:M.state(),mouse:M.mouse(),event:t}),t.preventDefault()}else console.log("WARNING: Invalid state in mapInteractor.")}},this._zoomFromSelection=function(t,e,n){if((t===y.zoomselect||t===y.unzoomselect)&&e.x!==n.x&&e.y!==n.y){var i,r,o=M.map(),a=o.size(),s={x:Math.abs((n.x-e.x)/a.width),y:Math.abs((n.y-e.y)/a.height)};if(t===y.zoomselect?(r=o.displayToGcs({x:(e.x+n.x)/2,y:(e.y+n.y)/2},null),i=o.zoom()-Math.log2(Math.max(s.x,s.y))):(i=o.zoom()+Math.log2(Math.max(s.x,s.y)),r=o.center(void 0,null)),o.discreteZoom()&&(i=Math.floor(i)),o.zoom(i),t===y.zoomselect)o.center(r,null);else{var l=o.gcsToDisplay(r,null);o.pan({x:(e.x+n.x)/2-l.x,y:(e.y+n.y)/2-l.y})}}},this._handleMouseUpDocument=function(t){var e,n;if(!T&&(h={},M._setClickMaybe(!1),M._getMouseButton(t),M._getMouseModifiers(t),g(document).off(".geojs"),d.boundDocumentHandlers=!1,s.buttons.right&&t.preventDefault(),d.actionRecord&&d.actionRecord.selectionRectangle&&(M._getMousePosition(t),e=M._getSelection(),A.clear(),M.map().deleteLayer(A),A=null,p=null,M.map().geoTrigger(v.brushend,e),!0!==d.actionRecord.selectionRectangle&&M.map().geoTrigger(d.actionRecord.selectionRectangle,e),M._zoomFromSelection(d.action,e.display.lowerLeft,e.display.upperRight),M.map().geoTrigger(v.actionselection,{state:M.state(),mouse:M.mouse(),event:t,lowerLeft:e.display.lowerLeft,upperRight:e.display.upperRight})),M.map().geoTrigger(v.actionup,{state:M.state(),mouse:M.mouse(),event:t}),n=d.action,k(),i.momentum.enabled&&g.inArray(n,i.momentum.actions)>=0)){var r=(new Date).valueOf(),o=r-s.time+s.deltaTime;r-s.time<i.momentum.stopTime?(s.velocity.x*=s.deltaTime/o,s.velocity.y*=s.deltaTime/o,s.deltaTime=o):s.velocity.x=s.velocity.y=0,M.springBack(!0,n)}},this._handleMouseUp=function(t){T||(M._getMouseButton(t),C&&M._handleMouseClick(t))},this._handleMouseClick=function(t){d.actionRecord&&d.actionRecord.selectionRectangle&&(A.clear(),M.map().deleteLayer(A),A=null,p=null,d.action=d.actionRecord=null),M._getMouseButton(t),M._getMouseModifiers(t),M.cancel(y.pan),g(document).off(".geojs"),d.boundDocumentHandlers=!1;var e=M.mouse();e.buttonsDown=C.buttons,M._setClickMaybe(!1),M.map().geoTrigger(v.mouseclick,e)},this._handleMouseWheel=function(){},this.springBack=function(t,e){d.action!==y.momentum&&(t||(s.velocity={x:0,y:0}),d.origAction=e,d.action=y.momentum,d.origin=M.mouse(),d.momentum=M.mouse(),d.start=new Date,d.handler=function(){var t,e,n,r;if(d.action===y.momentum&&M.map()&&!M.map().transition())if(r=Math.min(d.momentum.deltaTime,30),n=d.start.valueOf(),d.start=new Date,t=P(d.momentum.velocity,d.start-n)){if((e=S(t))>i.momentum.maxSpeed&&(e=i.momentum.maxSpeed/e,t.x=t.x*e,t.y=t.y*e),isFinite(t.x)&&isFinite(t.y)||(t.x=0,t.y=0),d.momentum.velocity.x=t.x,d.momentum.velocity.y=t.y,d.origAction===y.zoom){var o=d.momentum.velocity.y*r;E(-o*i.zoomScale/120,d)}else M.map().pan({x:d.momentum.velocity.x*r,y:d.momentum.velocity.y*r},void 0,"limited");d.handler&&M.map().scheduleAnimationFrame(d.handler)}else k()},d.handler&&M.map().scheduleAnimationFrame(d.handler))},this.destroy=function(){M._disconnectEvents(),M.map()&&g(M.map().node()).removeClass("highlight-focus"),M.map(null)},this.mouse=function(){return g.extend(!0,{},s)},this.keyboard=function(t){return void 0===t?g.extend(!0,{},i.keyboard||{}):M.options({keyboard:t})},this.state=function(){return g.extend(!0,{},d)},this.pause=function(t){return void 0===t?T:(T=!!t,M)},this.addAction=function(t,e){t&&t.action&&t.input&&(o.addAction(i.actions,t,e),i.map&&i.actions.some((function(t){return t.input.right}))&&(f.off("contextmenu.geojs"),f.on("contextmenu.geojs",(function(){return!1}))))},this.hasAction=function(t,e,n){return o.hasAction(i.actions,t,e,n)},this.removeAction=function(t,e,n){var r=o.removeAction(i.actions,t,e,n);return i.map&&!i.actions.some((function(t){return t.input.right}))&&f.off("contextmenu.geojs"),r},this.simulateEvent=function(t,e){var n,i,r,o,a;if(!M.map())return M;if("keyboard"===t&&l){var s={shiftKey:e.shift||e.shiftKey||!1,ctrlKey:e.ctrl||e.ctrlKey||!1,altKey:e.alt||e.altKey||!1,metaKey:e.meta||e.metaKey||!1,toString:function(){return e.keys},stopPropagation:function(){},preventDefault:function(){},simulated:!0};l.trigger(s)}else i=e.page||{},e.map&&(r=f.offset(),i.x=e.map.x+r.left,i.y=e.map.y+r.top),"left"===e.button?(o=1,a=1):"right"===e.button?(o=3,a=2):"middle"===e.button&&(o=2,a=4),e.modifiers=e.modifiers||[],e.wheelDelta=e.wheelDelta||{},n=g.Event(t,{pageX:i.x,pageY:i.y,which:o,buttons:a,altKey:e.modifiers.indexOf("alt")>=0,ctrlKey:e.modifiers.indexOf("ctrl")>=0,metaKey:e.modifiers.indexOf("meta")>=0,shiftKey:e.modifiers.indexOf("shift")>=0,center:e.center,rotation:e.touch?e.rotation||0:e.rotation,scale:e.touch?e.scale||1:e.scale,pointers:e.pointers,pointerType:e.pointerType,originalEvent:{deltaX:e.wheelDelta.x,deltaY:e.wheelDelta.y,deltaMode:e.wheelMode,preventDefault:function(){},stopPropagation:function(){},stopImmediatePropagation:function(){}}}),e.touch&&c?M._handleTouch(n):f.trigger(n),t.indexOf(".geojs")>=0&&g(document).trigger(n)},this._connectEvents(),this};i(s,r),t.exports=s},7098:function(t,e,n){var i=n(5699),r=n(6837),o=n(2557),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var i=n(5638),r=n(6618),a=n(4634),s=n(8173),l=this,u=this._init,c=null,d=r(),h=0,f=0,p=0;return this.featureType="marker",this._updateRangeTree=function(){if(!(d.timestamp()>=l.dataTime().timestamp()&&d.timestamp()>=l.timestamp())){var e,n,i=l.style.get("radius"),r=l.style.get("strokeWidth"),o=l.style.get("radiusIncludesStroke"),a=l.style.get("strokeOffset"),u=l.style.get("scaleWithZoom");n=l.position(),h=0,f=0,p=0,e=l.data().map((function(e,s){var l=n(e,s),c=u(e,s),d=i(e,s),m=r(e,s),g=Math.sign(a(e,s)),v=o(e,s),y=(v=void 0===v||v)?d+m*(g+1)/2:d+m,x=v?d+m*(g-1)/2:d;switch(c=t.scaleMode[c]||(c>=1&&c<=3?c:0)){case t.scaleMode.stroke:x>h&&(h=x),m>p&&(p=m);break;case t.scaleMode.fill:case t.scaleMode.all:y>f&&(f=y);break;default:y>h&&(h=y)}return[l.x,l.y]})),c=new s(e),d.modified()}},this._approximateMaxRadius=function(t){l._updateRangeTree();var e=Math.pow(2,t);return Math.max(h+p*e,f*e)},this.pointSearch=function(e,n){var i,r,o,a,s=[],u=[],d=[],h=l.gcs(),f=l.style.get("radius"),p=l.style.get("strokeWidth"),m=l.style.get("radiusIncludesStroke"),g=l.style.get("strokeOffset"),v=l.style.get("scaleWithZoom");if(!(o=l.data())||!o.length)return{found:[],index:[]};l._updateRangeTree();var y=l.layer().map();n=null===n?y.gcs():void 0===n?y.ingcs():n;var x=y.gcsToDisplay(e,n),b=y.zoom(),_=Math.pow(2,b),w=this._approximateMaxRadius(b);return a=[y.displayToGcs({x:x.x-w,y:x.y-w},h),y.displayToGcs({x:x.x+w,y:x.y-w},h),y.displayToGcs({x:x.x-w,y:x.y+w},h),y.displayToGcs({x:x.x+w,y:x.y+w},h)],i={x:Math.min(a[0].x,a[1].x,a[2].x,a[3].x),y:Math.min(a[0].y,a[1].y,a[2].y,a[3].y)},r={x:Math.max(a[0].x,a[1].x,a[2].x,a[3].x),y:Math.max(a[0].y,a[1].y,a[2].y,a[3].y)},(s=c.range(i.x,i.y,r.x,r.y)).sort((function(t,e){return t-e})),s.forEach((function(e){var n=o[e],i=f(o[e],e),r=v(o[e],e),a=g(o[e],e),s=r?p(o[e],e):0,c=m(n,e),b=(c=void 0===c||c)?i+s*(a-1)/2:i;i=b+s;var w,M,A,T=l.position()(n,e);switch(r=t.scaleMode[r]||(r>=1&&r<=3?r:0)){case t.scaleMode.fill:i=b*_+s;break;case t.scaleMode.stroke:i=b+s*_;break;case t.scaleMode.all:i*=_}i&&(A=i*i,(w=(T=y.gcsToDisplay(T,h)).x-x.x)*w+(M=T.y-x.y)*M<=A&&(u.push(n),d.push(e)))})),{found:u,index:d}},this.polygonSearch=function(e,n,i){var r,o,s,u,d=l.gcs(),h=[],f=[],p={},m=l.layer().map(),g=l.data(),v=l.style.get("radius"),y=l.style.get("strokeWidth"),x=l.style.get("radiusIncludesStroke"),b=l.style.get("strokeOffset"),_=l.style.get("scaleWithZoom"),w=m.zoom(),M=Math.pow(2,w),A=this._approximateMaxRadius(w);return i=null===i?m.gcs():void 0===i?m.ingcs():i,e.outer||(e={outer:e,inner:[]}),e.outer.length<3||!g||!g.length?{found:[],index:[],extra:{}}:((n=n||{}).partial=n.partial||!1,(e={outer:m.gcsToDisplay(e.outer,i),inner:(e.inner||[]).map((function(t){return m.gcsToDisplay(t,i)}))}).outer.forEach((function(t){o||(o={x:t.x,y:t.y},s={x:t.x,y:t.y}),t.x<o.x&&(o.x=t.x),t.x>s.x&&(s.x=t.x),t.y<o.y&&(o.y=t.y),t.y>s.y&&(s.y=t.y)})),l._updateRangeTree(),u=[m.displayToGcs({x:o.x-A,y:o.y-A},d),m.displayToGcs({x:s.x+A,y:o.y-A},d),m.displayToGcs({x:s.x+A,y:s.y+A},d),m.displayToGcs({x:o.x-A,y:s.y+A},d)],o={x:Math.min(u[0].x,u[1].x,u[2].x,u[3].x),y:Math.min(u[0].y,u[1].y,u[2].y,u[3].y)},s={x:Math.max(u[0].x,u[1].x,u[2].x,u[3].x),y:Math.max(u[0].y,u[1].y,u[2].y,u[3].y)},(r=c.range(o.x,o.y,s.x,s.y)).sort((function(t,e){return t-e})),r.forEach((function(i){var r=g[i],o=l.position()(r,i),s=v(g[i],i),u=_(g[i],i),c=b(g[i],i),w=u?y(g[i],i):0,A=x(r,i),T=(A=void 0===A||A)?s+w*(c-1)/2:s;switch(s=T+w,u=t.scaleMode[u]||(u>=1&&u<=3?u:0)){case t.scaleMode.fill:s=T*M+w;break;case t.scaleMode.stroke:s=T+w*M;break;case t.scaleMode.all:s*=M}if(s){o=m.gcsToDisplay(o,d);var C=a.distanceToPolygon2d(o,e);(C>=s||C>=0&&"center"===n.partial||C>=-s&&n.partial&&"center"!==n.partial)&&(h.push(r),f.push(i),p[i]={partial:C<s,distance:C})}})),{found:h,index:f,extra:p})},this._init=function(e){return e=i.extend(!0,{},{style:i.extend({},{radius:6.25,radiusIncludesStroke:!0,strokeColor:{r:.851,g:.604,b:0},strokeOffset:-1,strokeOpacity:1,strokeWidth:1.25,fillColor:{r:1,g:.839,b:.439},fillOpacity:.8,symbol:0,symbolValue:0,rotation:0,scaleWithZoom:t.scaleMode.none,rotateWithMap:!1},e&&void 0===e.style?{}:e.style)},e),u.call(l,e),l},l};a.create=function(t,e){"use strict";return(e=e||{}).type="marker",r.create(t,e)},a.capabilities={feature:"marker"},a.primitiveShapes=o.primitiveShapes,a.symbols={circle:0,ellipse:0,flowerBase:1,flowerMax:16,triangle:16,diamond:17,starBase:17,starMax:16,square:32,rectangle:32,crossBase:33,crossMax:16,oval:48,jackBase:49,jackMax:16,drop:64,dropBase:65,dropMax:16,arrow:80,arrowBase:81,arrowMax:16,length:96},["flower","star","cross","jack","drop","arrow"].forEach((function(t){for(var e=2;e<=a.symbols[t+"Max"];e+=1)a.symbols[t+e]=a.symbols[t+"Base"]-2+e})),a.scaleMode={none:0,fill:1,stroke:2,all:3},i(a,o),t.exports=a},9146:function(t,e,n){var i=n(5699),r=n(6837),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638),o=n(4634);e=e||{},r.call(this,e);var a=this,s=this._init,l={};return this.featureType="mesh",this.mesh=function(t,e){if(void 0===t)return l;if("string"==typeof t&&void 0===e)return l[t];if(void 0===e){var n=i.extend({},{gridWidth:function(){return t.gridHeight?Math.floor(a.data().length/t.gridHeight):Math.floor(Math.sqrt(a.data().length))},gridHeight:function(){return t.gridWidth?Math.floor(a.data().length/t.gridWidth):Math.floor(Math.sqrt(a.data().length))}},l,t);l=n}else l[t]=e;return a.modified(),a},this.mesh.get=function(t){if(void 0===t){var e,n={};for(e in l)l.hasOwnProperty(e)&&(n[e]=a.mesh.get(e));return n}return o.ensureFunction(l[t])},this.position=function(t){return void 0===t?a.style("position"):(a.style("position",t),a.dataTime().modified(),a.modified(),a)},this._createMesh=function(t,e){t=t||{},e=e||{};var n,i,r,o,s,l,u,c,d,h,f,p,m,g,v,y,x=a.data(),b=a.position(),_=a.mesh.get("elements")(x),w=a.mesh.get("elementPacking")(x),M=a.mesh.get("gridWidth")(x),A=a.mesh.get("gridHeight")(x),T=a.mesh.get("wrapLongitude")(x),C=a.mesh.get("x0")(x),E=a.mesh.get("y0")(x),S=a.mesh.get("dx")(x),k=a.mesh.get("dy")(x),P=M,O={shape:"square",elements:[],elementIndex:[]};if(_){var R=_.length&&Array.isArray(_[0]);if("square"===w||"triangle"!==w&&(!R&&!(_.length%4)&&_.length%3||R&&4===_[0].length))if(O.shape="square",R)for(n=0;n<_.length;n+=1)O.elements.push(_[n][0]),O.elements.push(_[n][1]),O.elements.push(_[n][3]),O.elements.push(_[n][2]),O.elements.push(_[n][3]),O.elements.push(_[n][1]),O.elementIndex.push(n),O.elementIndex.push(n);else for(n=r=0;n<_.length-3;n+=4,r+=1)O.elements.push(_[n]),O.elements.push(_[n+1]),O.elements.push(_[n+3]),O.elements.push(_[n+2]),O.elements.push(_[n+3]),O.elements.push(_[n+1]),O.elementIndex.push(r),O.elementIndex.push(r);else if(O.shape="triangle",R)for(n=0;n<_.length;n+=1)O.elements.push(_[n][0]),O.elements.push(_[n][1]),O.elements.push(_[n][2]),O.elementIndex.push(n);else for(O.elements=_.slice(0,_.length-_.length%3),n=r=0;n<_.length-2;n+=3,r+=1)O.elementIndex.push(r);l=x.length,c=!0}else{if(Object.keys(t).length?M*A>x.length&&(A=Math.floor(x.length/M)):Object.keys(e).length&&(M-1)*(A-1)>x.length&&(A=Math.floor(x.length/(M-1))+1),T=!(void 0!==T&&!T),!(c=null==C||null==E||!S||!k)&&T&&(C<-180||C>180||C+S*(M-1)<-180||C+S*(M-1)>180)&&S>-180&&S<180&&S*(M-1)<360.0001){for(p=[],m=[],n=0;n<M;n+=1){for(v=C+n*S;v<-180;)v+=360;for(;v>180;)v-=360;n&&Math.abs(v-p[p.length-1])>180&&(v>p[p.length-1]?(p.push(v-360),p.push(p[p.length-2]+360),m.push(n),m.push(n+1)):(p.push(v+360),p.push(p[p.length-2]-360),m.push(n),m.push(n+1)),g=n),p.push(v),m.push(n)}if(M+=2,Math.abs(Math.abs(P*S)-360)<.01){for(M+=1,v=C+P*S;v<-180;)v+=360;for(;v>180;)v-=360;p.push(v),m.push(0)}}if(l=M*A,void 0!==g)for(O.index=new Array(l),n=0;n<l;n+=1)y=n-(r=Math.floor(n/M))*M,(y+=y>g?-2:0)>=P&&(y-=P),y+=r*P,O.index[n]=y;for(r=s=0;r<A-1;r+=1,s+=1)for(n=0;n<M-1;n+=1,s+=1)n!==g&&(O.elements.push(s),O.elements.push(s+1),O.elements.push(s+M),O.elements.push(s+M+1),O.elements.push(s+M),O.elements.push(s+1),O.elementIndex.push(r*(M-1)+(m?m[n]:n)),O.elementIndex.push(r*(M-1)+(m?m[n]:n)))}O.verticesPerElement="triangle"===O.shape?3:6;var L=O.verticesPerElement;if(e.used){var D=new Array(O.elementIndex[O.elementIndex.length-1]+1);for(n=0;n<D.length;n+=1)D[n]=e.used(x[n],n);for(n=0;n<O.elementIndex.length&&D[O.elementIndex[n]];n+=1);if(n<O.elementIndex.length){for(r=n;n<O.elementIndex.length;n+=1)if(D[O.elementIndex[n]]){for(O.elementIndex[r]=O.elementIndex[n],o=0;o<3;o+=1)O.elements[3*r+o]=O.elements[3*n+o];r+=1}O.elements.splice(3*r),O.elementIndex.splice(r)}}if(t.used){for(n=0;n<l&&(s=O.index?O.index[n]:n,t.used(x[s],s));n+=1);if(n!==l){u=n;var I=new Array(l);for(r=0;r<u;r+=1)I[r]=r;if(I[u]=-1,!O.index)for(O.index=new Array(x.length),r=0;r<x.length;r+=1)O.index[r]=r;for(n=u+1;n<l;n+=1)s=O.index[n],t.used(x[s],s)?(I[n]=u,O.index[u]=O.index[n],u+=1):I[n]=-1;for(O.index.splice(u),n=o=0;n<O.elements.length;n+=L){for(r=0;r<L&&!(I[O.elements[n+r]]<0);r+=1)O.elements[o+r]=I[O.elements[n+r]];r===L&&(O.elementIndex[Math.floor(o/3)]=O.elementIndex[Math.floor(n/3)],6===L&&(O.elementIndex[Math.floor(o/3)+1]=O.elementIndex[Math.floor(n/3)+1]),o+=L)}O.elements.splice(o),O.elementIndex.splice(Math.floor(o/3)),l=u}}if(e.used&&void 0===g){var F=new Array(l),j=O.index;for(O.index=[],n=0;n<O.elements.length;n+=1)void 0===F[o=O.elements[n]]&&(F[o]=O.index.length,O.index.push(j?j[o]:o)),O.elements[n]=F[o];l=O.index.length}for(h in O.pos=new Array(3*l),t)"used"!==h&&t.hasOwnProperty(h)&&(O[h]=new Array(l));for(n=i=0;n<l;n+=1,i+=3)for(h in d=x[s=O.index?O.index[n]:n],c?(f=b(d,s),O.pos[i]=f.x,O.pos[i+1]=f.y,O.pos[i+2]=f.z||0):(O.pos[i]=void 0===g?C+S*(s%M):p[n%M],O.pos[i+1]=E+k*Math.floor(s/M),O.pos[i+2]=0,f={x:O.pos[i],y:O.pos[i+1],z:O.pos[i+2]}),t)"used"!==h&&t.hasOwnProperty(h)&&(O[h][n]=t[h](d,s,f));for(h in e)if("used"!==h&&e.hasOwnProperty(h)){var N=e[h];for(O[h]=new Array(O.elementIndex.length),n=0;n<O.elementIndex.length;n+=1)d=x[s=O.elementIndex[n]],O[h][n]=N(d,s)}return O.numVertices=l,O.numElements=O.elements.length/O.verticesPerElement,O},this._init=function(t){s.call(a,t),t=t||{};var e=i.extend({},{position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t}},t.style||{});a.mesh(t.mesh||{}),a.style(e)},this};i(o,r),t.exports=o},3737:function(t,e,n){var i=n(5699),r=n(6618),o=0,a=function t(){"use strict";if(!(this instanceof t))return new t;var e=n(4634),i=this,a=++o,s={},l=[],u=0;return this.onIdle=function(t){return u?l.push(t):t(),i},Object.defineProperty(this,"idle",{get:function(){return!u},configurable:!0}),Object.defineProperty(this,"_promises",{get:function(){return u},configurable:!0}),this.addPromise=function(t){function e(){t._geojsTracked&&t._geojsTracked[a]&&(u-=1,delete t._geojsTracked[a]),u||l.splice(0,l.length).forEach((function(t){t()}))}return t._geojsTracked||(t._geojsTracked={}),t._geojsTracked[a]||(t._geojsTracked[a]=!0,u+=1),t.always?t.always(e):t.then(e,e),i},this.removePromise=function(t){return t._geojsTracked&&t._geojsTracked[a]&&(u-=1,delete t._geojsTracked[a],u||l.splice(0,l.length).forEach((function(t){t()}))),i},this.geoOn=function(t,n){return Array.isArray(t)?(t.forEach((function(t){i.geoOn(t,n)})),i):e.isFunction(n)?(s.hasOwnProperty(t)||(s[t]=[]),s[t].push(n),i):(console.warn("Handler for "+t+" is not a function",n,i),i)},this.geoOnce=function(t,e){var n=function n(r){i.geoOff(t,n),e.call(i,r)};return i.geoOn(t,n),n},this.geoIsOn=function(t,e){return Array.isArray(t)?t.some((function(t){return i.geoIsOn(t,e)})):(s[t]||[]).some((function(t){return t===e||void 0===e}))},this.geoTrigger=function(t,e){return Array.isArray(t)?(t.forEach((function(t){i.geoTrigger(t,e)})),i):((e=e||{}).event=t,s.hasOwnProperty(t)&&s[t].forEach((function(n){try{n.call(i,e)}catch(e){console.warn("Event handler for "+t+" threw an error",e)}})),i)},this.geoOff=function(t,e){if(void 0===t&&(s={},l=[],u=0,a=++o),Array.isArray(t))return t.forEach((function(t){i.geoOff(t,e)})),i;if(e){if(Array.isArray(e))return e.forEach((function(e){i.geoOff(t,e)})),i}else s[t]=[];return s.hasOwnProperty(t)&&(s[t]=s[t].filter((function(t){return t!==e}))),i},this._exit=function(){i.geoOff()},r.call(this),this.modified(),this};i(a,r),t.exports=a},8622:function(t,e,n){var i=n(5638),r=n(5699),o=n(1940),a=n(4647),s=n(5017),l=function t(e){var r=n(4665);if(!(this instanceof t))return new t(e);void 0!==(e=e||{}).mapOpacity&&void 0===e.opacity&&((e=i.extend({},e)).opacity=e.mapOpacity),e=i.extend(!0,{},this.constructor.defaults,t.tileSources[this.constructor.defaults.source]||{},t.tileSources[e.source]||{},{name:""},e),o.call(this,e);var a=this;this.mapOpacity=this.opacity,this._getTile=function(t,e){var n=e||t;return r({index:t,size:{x:a._options.tileWidth,y:a._options.tileHeight},queue:a._queue,overlap:a._options.tileOverlap,scale:a._options.tileScale,url:a._options.url.call(a,n.x,n.y,n.level||0,a._options.subdomains),crossDomain:a._options.crossDomain})},this.source=function(e){if(void 0!==e)return t.tileSources[e]&&(a.url(t.tileSources[e].url),a.subdomains(t.tileSources[e].subdomains||"abc"),a.attribution(t.tileSources[e].attribution||""),a._options.maxLevel=t.tileSources[e].maxLevel||18,a._options.minLevel=t.tileSources[e].minLevel||0),a;for(var n in t.tileSources)if(t.tileSources[n].url===a.url())return n}};l.defaults=i.extend({},o.defaults,{tileOffset:function(t){var e=256*Math.pow(2,t-1);return{x:e,y:e}},url:"",source:"stamen-toner-lite"});var u='Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',c='<a href="https://carto.com"> Carto</a> Contributors <a href="https://www.openstreetmap.org/"> OpenStreetMap</a>';l.tileSources={"dark-matter-with-labels":{url:" https://{s}.basemaps.cartocdn.com/rastertiles/dark_all/{z}/{x}/{y}.png",attribution:c,name:"Carto Dark Matter With Labels",minLevel:0,maxLevel:18},"dark-matter-without-labels":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/dark_nolabels/{z}/{x}/{y}.png",attribution:c,name:"Carto Dark Matter Without Labels",minLevel:0,maxLevel:18},"nationalmap-satellite":{url:"https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}",attribution:'Tile data from <a href="https://basemap.nationalmap.gov/">USGS</a>',name:"National Map Satellite",minLevel:0,maxLevel:16},osm:{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'Tile data &copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors',name:"OpenStreetMap",subdomains:"abc",minLevel:0,maxLevel:19},"positron-with-labels":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/light_all/{z}/{x}/{y}.png",attribution:c,name:"Carto Positron With Labels",minLevel:0,maxLevel:18},"positron-without-labels":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/light_nolabels/{z}/{x}/{y}.png",attribution:c,name:"Carto Positron Without Labels",minLevel:0,maxLevel:18},"stamen-terrain":{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png",attribution:u,name:"Stamen Terrain",subdomains:"abcd",minLevel:0,maxLevel:14},"stamen-terrain-background":{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/terrain-background/{z}/{x}/{y}.png",attribution:u,name:"Stamen Terrain Background",subdomains:"abcd",minLevel:0,maxLevel:14},"stamen-toner":{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.png",attribution:u,name:"Stamen Toner",subdomains:"abcd",minLevel:0,maxLevel:20},"stamen-toner-lite":{url:"https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.png",attribution:u,name:"Stamen Toner Lite",subdomains:"abcd",minLevel:0,maxLevel:20},"voyager-with-labels":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/voyager_labels_under/{z}/{x}/{y}.png",attribution:c,name:"Carto Voyager With Labels",minLevel:0,maxLevel:18},"voyager-without-layers":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/voyager_nolabels/{z}/{x}/{y}.png",attribution:c,name:"Carto Voyager Without Layers",minLevel:0,maxLevel:18}},r(l,o),a.registerLayer("osm",l,[s.capabilities.image]),t.exports=l},6565:function(t,e,n){var i=n(5638),r=n(5699),o=n(6837),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var n=this,r=this._init;return this.featureType="path",this.position=function(t){return void 0===t?n.style("position"):(t!==n.style("position")&&(n.style("position",t),n.dataTime().modified(),n.modified()),n)},this._init=function(t){r.call(n,t);var e=i.extend({},{strokeWidth:1,strokeColor:{r:1,g:1,b:1},position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t}},void 0===t.style?{}:t.style);return void 0!==t.position&&(e.position=t.position),n.style(e),e.position&&n.position(e.position),n.dataTime().modified(),n},this._init(e),this};r(a,o),t.exports=a},6374:function(t,e,n){var i=n(5638),r=n(5699),o=n(6837),a=n(4634),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var n,r=this,s=this._update,l=this._init;return this.featureType="pixelmap",this.position=function(t){return void 0===t?r.style("position"):(t!==r.style("position")&&(r.style("position",t),r.dataTime().modified(),r.modified()),r)},this.url=function(t){return void 0===t?r.style("url"):(t!==r.style("url")&&(r.m_srcImage=r.m_info=void 0,r.style("url",t),r.dataTime().modified(),r.modified()),r)},this.color=function(t){return void 0===t?r.style("color"):(t!==r.style("color")&&(r.style("color",t),r.dataTime().modified(),r.modified()),r)},this.indexModified=function(t,e){if(void 0===t){var i=n;return"clear"===e&&(n=void 0),i}return r.modified(),void 0===n&&(n=[t,t]),t<n[0]&&(n[0]=t),(e||t)>n[1]&&(n[1]=e||t),r},this._update=function(){return s.call(r),(r.buildTime().timestamp()<=r.dataTime().timestamp()||r.updateTime().timestamp()<r.timestamp())&&r._build(),r.updateTime().modified(),r},this.maxIndex=function(){if(r.m_info){if(void 0===r.m_info.maxIndex)for(var t in r.m_info.maxIndex=0,r.m_info.mappedColors)r.m_info.mappedColors.hasOwnProperty(t)&&(r.m_info.maxIndex=Math.max(r.m_info.maxIndex,t));return r.m_info.maxIndex}},this._computePixelmap=function(){},this._build=function(){if(r.m_srcImage)r.m_info&&r._computePixelmap();else{var t=r.style.get("url")();if(a.isReadyImage(t))r.m_srcImage=t,r._computePixelmap();else if(t){var e,n,o=i.Deferred();t instanceof Image?(r.m_srcImage=t,e=t.onload,n=t.onerror):(r.m_srcImage=new Image,t.indexOf(":")>=0&&t.indexOf("/")===t.indexOf(":")+1&&(r.m_srcImage.crossOrigin=r.style.get("crossDomain")()||"anonymous")),r.m_srcImage.onload=function(){e&&e.apply(r,arguments),r.style.get("url")()===t&&(r.m_info=void 0,r._computePixelmap()),o.resolve()},r.m_srcImage.onerror=function(){n&&n.apply(r,arguments),o.reject()},o.promise(r),r.layer().addPromise(r),t instanceof Image||(r.m_srcImage.src=t)}}return r.buildTime().modified(),r},this._init=function(t){t=t||{},l.call(r,t);var e=i.extend({},{color:function(t,e){return{r:(255&e)/255,g:(e>>8&255)/255,b:(e>>16&255)/255,a:1}},position:function(t){return t}},void 0===t.style?{}:t.style);return void 0!==t.position&&(e.position=t.position),void 0!==t.url&&(e.url=t.url),void 0!==t.color&&(e.color=t.color),r.style(e),r.dataTime().modified(),t.quadFeature&&(r.m_srcImage=!0,r._computePixelmap()),r},this};s.create=function(t,e){"use strict";return(e=e||{}).type="pixelmap",o.create(t,e)},s.capabilities={feature:"pixelmap",lookup:"pixelmap.lookup"},r(s,o),t.exports=s},809:function(t,e,n){var i=n(5638),r=n(5699),o=n(1940),a=n(4647),s=n(5017),l=n(6374),u=function t(e){var r,a=n(4665);if(!(this instanceof t))return new t(e);(e=e||{}).data&&(r=e.data,delete e.data),e=i.extend(!0,{},this.constructor.defaults,e),o.call(this,e);var s,l=this._init,u=this;return this._getTile=function(t,e){var n=e||t;return a({index:t,size:{x:u._options.tileWidth,y:u._options.tileHeight},queue:u._queue,overlap:u._options.tileOverlap,scale:u._options.tileScale,url:u._options.url.call(u,n.x,n.y,n.level||0,u._options.subdomains),crossDomain:u._options.crossDomain})},this._init=function(){l.apply(u,arguments);var t={quadFeature:u.features()[0]};e.style&&(t.style=e.style),e.color&&(t.color=e.color),s=u.createFeature("pixelmap",t),r&&s.data(r),u.style=s.style,u.data=s.data,u.indexModified=s.indexModified;var n=u.dataTime().modified;return u.dataTime().modified=function(){return s.dataTime().modified(),n()},["modified","geoOn","geoOff","geoOnce"].forEach((function(t){var e=u[t];u[t]=function(){return s[t].apply(this,arguments),e.apply(this,arguments)}})),u},u};u.defaults=i.extend({},o.defaults,{features:[s.capabilities.image,l.capabilities.lookup],tileOffset:function(t){var e=256*Math.pow(2,t-1);return{x:e,y:e}},url:""}),r(u,o),a.registerLayer("pixelmap",u,[s.capabilities.image]),t.exports=u},2557:function(t,e,n){var i=n(5699),r=n(6837),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},r.call(this,e);var i=n(5638),o=n(6618),a=n(9808),s=n(5108),l=n(4634),u=n(8173),c=this,d=this._init,h=null,f=o(),p=this.data,m=0,g=e.clustering,v=null,y=[],x=null,b=!1;return this.featureType="point",this.clustering=function(t){return void 0===t?g:(g&&!t?(v=null,g=!1,p(y)):t&&g!==t&&(g=t,c._clusterData()),c)},this._clusterData=function(){if(g){var t=!0===g?{radius:10}:g,e=c.position(),n=c.layer().map(),r=n.gcsToDisplay(n.center(void 0,null),null),o=n.displayToGcs(r,c.gcs()),s=n.displayToGcs({x:r.x+t.radius,y:r.y},c.gcs()),u=Math.pow(Math.pow(s.y-o.y,2)+Math.pow(s.x-o.x,2),.5),d=n.zoom(),h=u*Math.pow(2,d);t=i.extend({},t,{radius:h}),v=new a(t),y.forEach((function(t,n){var i=l.normalizeCoordinates(e(t,n));i.index=n,v.addPoint(i)})),x=null,c._handleZoom(n.zoom())}},this._handleZoom=function(t){var e=Math.floor(t);if(g&&e!==x){x=e;var n=v.points(e).map((function(t){return y[t.index]}));v.clusters(e).forEach((function(t){t.__cluster=!0,t.__data=[],t.obj.each((function(e){t.__data.push(y[e.index])})),n.push(t)})),b=!0,c.data(n)}},this.position=function(t){if(void 0===t)return c.style("position");var e=l.isFunction(t);return c.style("position",(function(n,i){return null!=n&&n.__cluster?n:e?t(n,i):t})),c.dataTime().modified(),c.modified(),c},this._updateRangeTree=function(){if(!(f.timestamp()>=c.dataTime().timestamp()&&f.timestamp()>=c.timestamp())){var t,e,n=c.style.get("radius"),i=c.style.get("stroke"),r=c.style.get("strokeWidth");e=c.position(),m=0,t=c.data().map((function(t,o){var a=e(t,o);return m=Math.max(m,n(t,o)+(i(t,o)?r(t,o):0)),[a.x,a.y]})),h=new u(t),f.modified()}},this.pointSearch=function(t,e){var n,i,r,o,a,s,l=[],u=[],d=[],f=c.gcs(),p=c.style.get("fill"),g=c.style.get("stroke"),v=c.style.get("strokeWidth"),y=c.style.get("radius");return(r=c.data())&&r.length?(c._updateRangeTree(),o=c.layer().map(),a=o.gcsToDisplay(t,e),s=[o.displayToGcs({x:a.x-m,y:a.y-m},f),o.displayToGcs({x:a.x+m,y:a.y-m},f),o.displayToGcs({x:a.x-m,y:a.y+m},f),o.displayToGcs({x:a.x+m,y:a.y+m},f)],n={x:Math.min(s[0].x,s[1].x,s[2].x,s[3].x),y:Math.min(s[0].y,s[1].y,s[2].y,s[3].y)},i={x:Math.max(s[0].x,s[1].x,s[2].x,s[3].x),y:Math.max(s[0].y,s[1].y,s[2].y,s[3].y)},(l=h.range(n.x,n.y,i.x,i.y)).sort((function(t,e){return t-e})),l.forEach((function(t){var e=r[t],n=g(r[t],t);if(n||p(r[t],t)){var i,s,l,h,m=c.position()(e,t);l=y(r[t],t),(l+=n?v(r[t],t):0)&&(h=l*l,(i=(m=o.gcsToDisplay(m,f)).x-a.x)*i+(s=m.y-a.y)*s<=h&&(u.push(e),d.push(t)))}})),{found:u,index:d}):{found:[],index:[]}},this.polygonSearch=function(t,e,n){var i,r,o,a,s=c.gcs(),u=[],d=[],f={},p=c.layer().map(),g=c.data(),v=c.style.get("fill"),y=c.style.get("stroke"),x=c.style.get("strokeWidth"),b=c.style.get("radius");return t.outer||(t={outer:t,inner:[]}),t.outer.length<3||!g||!g.length?{found:[],index:[],extra:{}}:((e=e||{}).partial=e.partial||!1,(t={outer:p.gcsToDisplay(t.outer,n),inner:(t.inner||[]).map((function(t){return p.gcsToDisplay(t,n)}))}).outer.forEach((function(t){r||(r={x:t.x,y:t.y},o={x:t.x,y:t.y}),t.x<r.x&&(r.x=t.x),t.x>o.x&&(o.x=t.x),t.y<r.y&&(r.y=t.y),t.y>o.y&&(o.y=t.y)})),c._updateRangeTree(),a=[p.displayToGcs({x:r.x-m,y:r.y-m},s),p.displayToGcs({x:o.x+m,y:r.y-m},s),p.displayToGcs({x:o.x+m,y:o.y+m},s),p.displayToGcs({x:r.x-m,y:o.y+m},s)],r={x:Math.min(a[0].x,a[1].x,a[2].x,a[3].x),y:Math.min(a[0].y,a[1].y,a[2].y,a[3].y)},o={x:Math.max(a[0].x,a[1].x,a[2].x,a[3].x),y:Math.max(a[0].y,a[1].y,a[2].y,a[3].y)},(i=h.range(r.x,r.y,o.x,o.y)).sort((function(t,e){return t-e})),i.forEach((function(n){var i=g[n],r=y(g[n],n);if(r||v(g[n],n)){var o=c.position()(i,n),a=b(g[n],n);if(a+=r?x(g[n],n):0){o=p.gcsToDisplay(o,s);var h=l.distanceToPolygon2d(o,t);(h>=a||h>=0&&"center"===e.partial||h>=-a&&e.partial&&"center"!==e.partial)&&(u.push(i),d.push(n),f[n]={partial:h<a,distance:h})}}})),{found:u,index:d,extra:f})},this.data=function(t){return void 0===t?p():(b||(y=t),g&&!b?c._clusterData():p(t),b=!1,c)},this._init=function(t){t=t||{},d.call(c,t);var e=i.extend(!0,{},{radius:5,stroke:!0,strokeColor:{r:.851,g:.604,b:0},strokeWidth:1.25,strokeOpacity:1,fillColor:{r:1,g:.839,b:.439},fill:!0,fillOpacity:.8,position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t},origin:function(t){return t.length>=3?t.slice(0,3):[0,0,0]}},void 0===t.style?{}:t.style);return void 0!==t.position&&(e.position=t.position),c.style(e),e.position&&c.position(e.position),c.dataTime().modified(),c.geoOn(s.zoom,(function(t){c._handleZoom(t.zoomLevel)})),c},c};o.create=function(t,e){"use strict";return(e=e||{}).type="point",r.create(t,e)},o.capabilities={feature:"point",stroke:"point.stroke"},o.primitiveShapes={auto:"auto",sprite:"sprite",triangle:"triangle",square:"square"},i(o,r),t.exports=o},4343:function(t,e,n){var i=n(5638),r=n(5699),o=n(6837),a=n(6853),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var r,s=n(4634),l=this,u=this._init,c=this._exit,d=this.data,h=this.draw,f=this.modified,p=this.style,m=[];function g(t,e,n){var i=l.gcs(),r=l.layer().map().gcs();return t=t||l.data(),e=e||l.style.get("position"),n=n||l.style.get("polygon"),t.map((function(t,o){var s=n(t,o);if(s){var u,c,d,h,f,p,m,g,v,y;for(h=s.outer||(Array.isArray(s)?s:[]),u=new Array(h.length),f=0;f<h.length;f+=1)u[f]=e.call(l,h[f],f,t,o),p=u[f].x,m=u[f].y,f?(p<d.min.x&&(d.min.x=p),m<d.min.y&&(d.min.y=m),p>d.max.x&&(d.max.x=p),m>d.max.y&&(d.max.y=m)):d={min:{x:p,y:m},max:{x:p,y:m}};for(c=(s.inner||[]).map((function(n){h=n||[];var i=new Array(h.length);for(f=0;f<h.length;f+=1)i[f]=e.call(l,h[f],f,t,o);return i})),g=a.transformCoordinates(i,r,u),v=c.map((function(t){return a.transformCoordinates(i,r,t)})),f=0;f<g.length;f+=1)p=g[f].x,m=g[f].y,f?(p<y.min.x&&(y.min.x=p),m<y.min.y&&(y.min.y=m),p>y.max.x&&(y.max.x=p),m>y.max.y&&(y.max.y=m)):y={min:{x:p,y:m},max:{x:p,y:m}};return{outer:u,inner:c,range:d,mapouter:g,mapinner:v,maprange:y}}}))}function v(t){return s.isFunction(t)?function(e){return t(e[0],e[1],e[2],e[3])}:t}return this.featureType="polygon",this._subfeatureStyles={fillColor:!0,fillOpacity:!0,lineCap:!0,lineJoin:!0,strokeColor:!0,strokeOffset:!0,strokeOpacity:!0,strokeWidth:!0},this.data=function(t){var e=d(t);return void 0!==t&&(m=g(),l._checkForStroke()),e},this.polygonCoordinates=function(){return m},this.polygon=function(t){return void 0===t?l.style("polygon"):(l.style("polygon",t),l.dataTime().modified(),l.modified(),m=g(),l)},this.position=function(t){return void 0===t?l.style("position"):(l.style("position",t),l.dataTime().modified(),l.modified(),m=g(),l)},this.pointSearch=function(t,e){var n=[],i=[],o={},u=l.data(),c=l.layer().map();e=null===e?c.gcs():void 0===e?c.ingcs():e;var d=a.transformCoordinates(e,c.gcs(),t);(m.forEach((function(t,e){s.pointInPolygon(d,t.mapouter,t.mapinner,t.maprange)&&(i.push(e),o[e]=!0,n.push(u[e]))})),r)&&r.pointSearch(t).found.forEach((function(t){t.length&&4===t[0].length&&!o[t[0][3]]&&(i.push(t[0][3]),o[t[0][3]]=!0,n.push(u[t[0][3]]))}));return{index:i,found:n}},this.polygonSearch=function(t,e,n){var i,o,u=l.data(),c=[],d=[],h={},f=t,p={},g=l.layer().map();if(n=null===n?g.gcs():void 0===n?g.ingcs():n,t.outer||(t={outer:t,inner:[]}),!u||!u.length||t.outer.length<3)return{found:d,index:c,extra:h};if((e=e||{}).partial=e.partial||!1,(t={outer:a.transformCoordinates(n,g.gcs(),t.outer),inner:(t.inner||[]).map((function(t){return a.transformCoordinates(n,g.gcs(),t)}))}).outer.forEach((function(t){i||(i={x:t.x,y:t.y},o={x:t.x,y:t.y}),t.x<i.x&&(i.x=t.x),t.x>o.x&&(o.x=t.x),t.y<i.y&&(i.y=t.y),t.y>o.y&&(o.y=t.y)})),m.forEach((function(n,r){if(!(!n.mapouter.length||n.maprange&&(n.maprange.max.x<i.x||n.maprange.min.x>o.x||n.maprange.max.y<i.y||n.maprange.min.y>o.y))){for(var a,l,f=-1;f<n.mapinner.length&&!l;f+=1)for(var m=f<0?n.mapouter:n.mapinner[f],g=0,v=m.length,y=v-1;g<v;y=g,g+=1){var x=s.distanceToPolygon2d(m[g],t);if(x*s.distanceToPolygon2d(m[y],t)<0){l=!0;break}if(s.crossedLineSegmentPolygon2d(m[g],m[y],t)){l=!0;break}x>0&&(a=!0)}a||l||!s.pointInPolygon(t.outer[0],n.mapouter,n.mapinner,n.maprange)||(l=!0),(!e.partial&&a&&!l||e.partial&&(a||l))&&(c.push(r),d.push(u[r]),h[r]={partial:l},p[r]=!0)}})),r){var v=r.polygonSearch(f,e);v.found.forEach((function(t,e){t.length&&4===t[0].length&&(p[t[0][3]]||(c.push(t[0][3]),p[t[0][3]]=!0,d.push(u[t[0][3]]),h[v.index[e]]={partial:!1}),v.extra[v.index[e]].partial&&(h[t[0][3]].partial=!0))}))}return{found:d,index:c,extra:h}},this.style=function(t,e){var n=p.apply(l,arguments);return void 0===t||"string"==typeof t&&void 0===e||l._checkForStroke(),n},this.style.get=p.get,this._getLoopData=function(t,e,n){var i,r=[];for(i=0;i<n.length;i+=1)r.push([n[i],i,t,e]);return r},this._checkForStroke=function(){if(!1!==p("stroke")){if(l.layer()){r||(r=l.layer().createFeature("line",{selectionAPI:!1,gcs:l.gcs(),visible:l.visible(void 0,!0)}),l.dependentFeatures([r]));var t,e=l.style();if(s.isFunction(e.stroke)||!e.stroke){var n=l.style.get("stroke"),i=l.style.get("strokeOpacity");t=function(t){return n(t[2],t[3])?i(t[0],t[1],t[2],t[3]):0}}else t=v(e.strokeOpacity);r.style({antialiasing:v(e.antialiasing),closed:!0,lineCap:v(e.lineCap),lineJoin:v(e.lineJoin),miterLimit:v(e.miterLimit),strokeWidth:v(e.strokeWidth),strokeStyle:v(e.strokeStyle),strokeColor:v(e.strokeColor),strokeOffset:v(e.strokeOffset),strokeOpacity:t});var o=l.data(),a=l.style("position");if(o!==r._lastData||a!==r._lastPosVal){var u,c,d,h=[],f=l.style.get("position"),m=l.style.get("polygon");for(u=0;u<o.length;u+=1)(c=m(o[u],u))&&(d=c.outer||(Array.isArray(c)?c:[])).length>=2&&(h.push(l._getLoopData(o[u],u,d)),c.inner&&c.inner.forEach((function(t){t.length>=2&&h.push(l._getLoopData(o[u],u,t))})));r.position((function(t,e,n,i){return f(t[0],t[1],t[2],t[3])})),r.data(h),r._lastData=o,r._lastPosVal=a}}}else r&&l.layer()&&(l.layer().deleteFeature(r),r=null,l.dependentFeatures([]))},this.draw=function(){var t=h();return r&&r.draw(),t},this.modified=function(){var t=f();return r&&r.modified(),t},this.rdpSimplifyData=function(t,e,n,i){var r=l.layer().map(),o=r.gcs(),u=l.gcs(),c=g(t,n,i);return void 0===e&&(e=.5*r.unitsPerPixel(r.zoom())),c=c.map((function(t){return{outer:a.transformCoordinates(u,o,t.outer),inner:t.inner.map((function(t){return a.transformCoordinates(u,o,t)}))}})),t=t.map((function(t,n){var i=c[n],r={};for(var l in t)!t.hasOwnProperty(l)||Array.isArray(t)&&l>=0&&l<t.length||(r[l]=t[l]);if(i&&i.outer.length>=3)if(r.inner=i.inner.filter((function(t){return t.length>=3})),r.outer=s.rdpLineSimplify(i.outer,e,!0,r.inner),r.outer.length>=3){var d=r.inner.slice();r.inner.map((function(t,n){d[n]=r.outer;var i=s.rdpLineSimplify(t,e,!0,d);return d[n]=i,i})).filter((function(t){return t.length>=3})),r.outer=a.transformCoordinates(o,u,r.outer),r.inner=r.inner.map((function(t){return a.transformCoordinates(o,u,t)}))}else r.outer=r.inner=[];else r.outer=[];return r})),l.style("position",(function(t){return t})),l.style("polygon",(function(t){return t})),l.data(t),l},this.mouseOverOrderClosestBorder=function(t){var e=t.feature.data(),n=t.feature.layer().map(),i=a.transformCoordinates(n.ingcs(),t.feature.gcs(),t.mouse.geo),r=t.feature.polygonCoordinates(),o={};t.over.index.forEach((function(t,e){var n,a=r[t];a.outer.forEach((function(t,e){var r=a.outer[(e+1)%a.outer.length],o=s.distance2dToLineSquared(i,t,r);(void 0===n||o<n)&&(n=o)})),a.inner.forEach((function(t){t.forEach((function(e,r){var o=t[(r+1)%t.length],a=s.distance2dToLineSquared(i,e,o);(void 0===n||a<n)&&(n=a)}))})),o[t]=n})),t.over.index.sort((function(t,e){return o[t]-o[e]})).reverse(),t.over.index.forEach((function(n,i){t.over.found[i]=e[n]}))},this._exit=function(){r&&l.layer()&&(l.layer().deleteFeature(r),r=null,l.dependentFeatures([])),c()},this._init=function(t){t=t||{},u.call(l,t);var e=i.extend({},{fill:!0,fillColor:{r:0,g:.5,b:.5},fillOpacity:1,stroke:!1,strokeWidth:1,strokeStyle:"solid",strokeColor:{r:0,g:1,b:1},strokeOpacity:1,polygon:function(t){return t},position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t},origin:function(t){for(var e=0;e<t.length;e+=1)if(t[e].vertices.length>=3)return t[e].vertices.slice(0,3);return[0,0,0]}},void 0===t.style?{}:t.style);void 0!==t.polygon&&(e.polygon=t.polygon),void 0!==t.position&&(e.position=t.position),l.style(e),l._checkForStroke()},this};s.create=function(t,e){"use strict";return(e=e||{}).type="polygon",o.create(t,e)},s.capabilities={feature:"polygon"},r(s,o),t.exports=s},5017:function(t,e,n){var i=n(5638),r=n(5699),o=n(6837),a=function t(e){"use strict";var r=n(6853),a=n(4634);if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var s,l,u=this,c=this._init,d=0,h=[],f=[];return this.featureType="quad",this._objectListStart=function(t){i.each(t,(function(t,e){e.used=!1}))},this._objectListGet=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].entry===e)return t[n].used=!0,t[n].value},this._objectListAdd=function(t,e,n){t.push({entry:e,value:n,used:!0})},this._objectListEnd=function(t){for(var e=t.length-1;e>=0;e-=1)t[e].used||t.splice(e,1)},this.pointSearch=function(t,e){var n,o,s=[],c=[],d={},h=[{},{},{},{}],f=[{},{},{},{}],p=[0,1,2,0],m=[1,2,3,1],g=u.data(),v=u.layer().map();return e=null===e?v.gcs():void 0===e?v.ingcs():e,t=r.transformCoordinates(e,v.gcs(),t),l||u._generateQuads(),i.each([l.clrQuads,l.imgQuads,l.vidQuads],(function(e,i){i.forEach((function(e,i){for(n=0;n<p.length;n+=1)h[n].x=e.pos[3*p[n]],h[n].y=e.pos[3*p[n]+1],h[n].z=e.pos[3*p[n]+2],f[n].x=e.pos[3*m[n]],f[n].y=e.pos[3*m[n]+1],f[n].z=e.pos[3*m[n]+2];(a.pointInPolygon(t,h)||a.pointInPolygon(t,f))&&(c.push(e.idx),s.push(g[e.idx]),!(o=a.pointToTriangleBasis2d(t,h[0],h[1],h[2]))||o.x+o.y>1?(o=a.pointToTriangleBasis2d(t,f[2],f[1],f[0]))&&(o.x=1-o.x):o.y=1-o.y,o&&(d[e.idx]={basis:o,_quad:e}))}))})),{index:c,found:s,extra:d}},this.position=function(t){return void 0===t?u.style("position"):(u.style("position",a.ensureFunction(t)),u.dataTime().modified(),u.modified(),u)},this._positionToQuad=function(t,e,n,o){var a=t.call(u,n,o);if(a.ll&&a.ur||a.ul&&a.lr){var s=u.gcs(),l=u.layer().map().gcs(),c={};return i.each(["ll","lr","ul","ur"],(function(t,i){void 0!==a[i]&&(c[i]={},void 0===a[i].x?c[i]=[a[i][0],a[i][1],a[i][2]]:c[i]=[a[i].x,a[i].y,a[i].z],void 0===c[i][2]&&(c[i][2]=e.call(u,n,o)),s!==l&&!1!==s&&(c[i]=r.transformCoordinates(s,l,c[i])))})),c.ll=c.ll||[c.ul[0],c.lr[1],(c.ul[2]+c.lr[2])/2],c.lr=c.lr||[c.ur[0],c.ll[1],(c.ur[2]+c.ll[2])/2],c.ur=c.ur||[c.lr[0],c.ul[1],(c.lr[2]+c.ul[2])/2],c.ul=c.ul||[c.ll[0],c.ur[1],(c.ll[2]+c.ur[2])/2],c}},this._checkQuadUpdate=function(t,e){},this._generateQuads=function(){var t,e,n=u.position(),r=u.style.get("image"),o=u.style.get("video"),c=u.style.get("delayRenderWhenSeeking"),p=u.style.get("color"),m=u.style.get("depth"),g=u.style.get("opacity"),v=u.style.get("drawOnAsyncResourceLoaded"),y=u.style.get("previewColor"),x=u.style.get("previewImage"),b=u.data(),_=[],w=[],M=[],A=[0,0,0];return u._objectListStart(h),u._objectListStart(f),i.each(b,(function(l,b){if(b._cachedQuad)return e=b._cachedQuad.diag2,(void 0===t||b._cachedQuad.diag2&&b._cachedQuad.diag2<t)&&(A=b._cachedQuad.ll,t=b._cachedQuad.diag2),b._cachedQuad.clrquad&&_.push(b._cachedQuad.clrquad),b._cachedQuad.imgquad&&(b._cachedQuad.imageEntry&&u._objectListGet(h,b._cachedQuad.imageEntry),w.push(b._cachedQuad.imgquad)),void(b._cachedQuad.vidquad&&(b._cachedQuad.videoEntry&&u._objectListGet(f,b._cachedQuad.videoEntry),M.push(b._cachedQuad.vidquad)));var T,C,E,S,k,P,O,R,L,D,I,F,j={};if(O=u._positionToQuad(n,m,b,l),D=g.call(u,b,l),void 0!==O&&D&&!(D<0)){if(e=Math.pow(O.ll[0]-O.ur[0],2)+Math.pow(O.ll[1]-O.ur[1],2)+Math.pow(O.ll[2]-O.ur[0],2)+Math.pow(O.lr[0]-O.ur[0],2)+Math.pow(O.lr[1]-O.ur[1],2)+Math.pow(O.lr[2]-O.ur[0],2),j.diag2=e,j.ll=O.ll,(void 0===t||e&&e<t)&&(A=O.ll,t=e),O=[O.ll[0],O.ll[1],O.ll[2],O.lr[0],O.lr[1],O.lr[2],O.ul[0],O.ul[1],O.ul[2],O.ur[0],O.ur[1],O.ur[2]],T={idx:l,pos:O,opacity:D,zOffset:b.zOffset},b.reference&&(T.reference=b.reference),b.crop&&(T.crop=b.crop),L=(R=r.call(u,b,l))?null:o.call(u,b,l),R){if(j.imageEntry=R,void 0===(C=u._objectListGet(h,R))&&(R instanceof Image||R instanceof HTMLCanvasElement?C=R:(C=new Image).src=R,u._objectListAdd(h,R,C)),a.isReadyImage(C)||C instanceof HTMLCanvasElement)T.image=C;else if(I=void 0,(F=x.call(u,b,l))&&a.isReadyImage(F)?T.image=F:(I=y.call(u,b,l),T.color=a.convertColor(I),T.color&&void 0!==T.color.r&&void 0!==T.color.g&&void 0!==T.color.b?(_.push(T),j.clrquad=T):I=void 0),v.call(u,b,l))P=a.isReadyImage(C,!0)?null:i.Deferred(),S=C.onload,C.onload=function(){if(void 0!==I&&(i.inArray(T,_)>=0&&_.splice(i.inArray(T,_),1),delete j.clrquad),T.image=C,u.dataTime().modified(),u.modified(),u._update(),u.layer().draw(),P&&P.resolve(),S)return S.apply(u,arguments)},k=C.onerror,C.onerror=function(){if(P&&P.reject(),k)return k.apply(u,arguments)},P&&u.layer().addPromise(P.promise());else if(void 0===I&&!T.image)return;w.push(T),j.imgquad=T}else if(L){if(j.videoEntry=L,void 0===(E=u._objectListGet(f,L))&&(L instanceof HTMLVideoElement?E=L:(E=document.createElement("video")).src=L,u._objectListAdd(f,L,E),i(E).off(".geojsvideo").on("seeking.geojsvideo canplay.geojsvideo pause.geojsvideo playing.geojsvideo",(function(t){u._checkQuadUpdate(T,t)}))),T.delayRenderWhenSeeking=c.call(u,b,l),void 0===T.delayRenderWhenSeeking&&(T.delayRenderWhenSeeking=!0),a.isReadyVideo(E))T.video=E;else if(I=y.call(u,b,l),T.color=a.convertColor(I),T.color&&void 0!==T.color.r&&void 0!==T.color.g&&void 0!==T.color.b?(_.push(T),j.clrquad=T):I=void 0,v.call(u,b,l))P=a.isReadyVideo(E,!0)?null:i.Deferred(),S=E.onloadeddata,E.onloadeddata=function(){if(void 0!==I&&(i.inArray(T,_)>=0&&_.splice(i.inArray(T,_),1),delete j.clrquad),T.video=E,u.dataTime().modified(),u.modified(),u._update(),u.layer().draw(),P&&P.resolve(),S)return S.apply(u,arguments)},k=E.onerror,E.onerror=function(){if(P&&P.reject(),k)return k.apply(u,arguments)},P&&u.layer().addPromise(P.promise());else if(void 0===I&&!T.video)return;M.push(T),j.vidquad=T}else{if(T.color=a.convertColor(p.call(u,b,l)),!T.color||void 0===T.color.r||void 0===T.color.g||void 0===T.color.b)return;_.push(T),j.clrquad=T}j.clrquad&&(d+=1,j.clrquad.quadId=d),j.imgquad&&(d+=1,j.imgquad.quadId=d),j.vidquad&&(d+=1,j.vidquad.quadId=d),!1!==s&&(b._cachedQuad=j)}})),u._objectListEnd(h),u._objectListEnd(f),l={clrQuads:_,imgQuads:w,vidQuads:M,origin:new Float32Array(A)}},this.cacheUpdate=function(t){return null==t?i.each(u.data(),(function(t,e){e._cachedQuad&&delete e._cachedQuad})):(isFinite(t)&&(t=u.data()[t]),t._cachedQuad&&delete t._cachedQuad),u.modified(),u},this.video=function(t){var e,n;return isFinite(t)&&(t=u.data()[t]),t._cachedQuad?e=(t._cachedQuad.vidquad||{}).video:(l||u._generateQuads(),(n=u.data().indexOf(t))>=0&&(e=u._objectListGet(f,u.style.get("video")(t,n)))),e instanceof HTMLVideoElement?e:null},this._init=function(t){t=t||{},c.call(u,t),s=!1!==t.cacheQuads;var e=i.extend({},{color:{r:1,g:1,b:1},opacity:1,depth:0,drawOnAsyncResourceLoaded:!0,previewColor:null,previewImage:null,image:function(t){return t.image},video:function(t){return t.video},position:function(t){return t}},void 0===t.style?{}:t.style);void 0!==t.position&&(e.position=a.ensureFunction(t.position)),u.style(e),u.dataTime().modified()},u};a.create=function(t,e){"use strict";return(e=e||{}).type="quad",o.create(t,e)},a.capabilities={color:"quad.color",image:"quad.image",imageCrop:"quad.imageCrop",imageFixedScale:"quad.imageFixedScale",imageFull:"quad.imageFull",canvas:"quad.canvas",video:"quad.video"},r(a,o),t.exports=a},4647:function(t,e,n){var i=n(5638),r={dom:{}},o={},a={},s={},l={},u={},c={},d={},h={},f={registerFileReader:function(t,e){c[t]=e},createFileReader:function(t,e){return c.hasOwnProperty(t)?c[t](e):null},registerRenderer:function(t,e){s[t]=e},createRenderer:function(t,e,n,i){if(s.hasOwnProperty(t)){var r=s[t]({layer:e,canvas:n,options:i});return r._init(),r}return null},checkRenderer:function(t,e){if(null===t)return t;if(s.hasOwnProperty(t)){var n=s[t];if(!n.supported||n.supported())return n.apiname||t;if(!n.fallback||e)return!1;var i=f.checkRenderer(n.fallback(),!0);return!1!==i&&console.warn(t+" renderer is unavailable, using "+i+" renderer instead"),i}return!1},rendererForFeatures:function(t){var e,n,i,r,o,a,s=["webgl","canvas","svg","vtkjs",null];for(n=0;n<s.length;n+=1)if(e=s[n],!1!==f.checkRenderer(e,!0)){if(!t)return e;if(l[e]){for(a=!0,r=0;r<t.length;r+=1){if(o=null,(i=t[r]).indexOf(".")>=0&&(o=i,i=i.substr(0,i.indexOf("."))),void 0===l[e][i]){a=!1;break}if(o&&u[e][i]&&!u[e][i][o]){a=!1;break}}if(a)return e}}return console.warn('There is no renderer available for the feature list "'+(t||[]).join(", ")+'".'),!1},registerFeature:function(t,e,n,i){t in l||(l[t]={},u[t]={});var r=l[t][e];return r&&console.warn("The "+t+"."+e+" feature is already registered"),l[t][e]=n,u[t][e]=i,r},createFeature:function(t,e,n,r){var o=n.api(),a={layer:e,renderer:n};if(o in l&&t in l[o]){void 0!==r&&i.extend(!0,a,r);var s=l[o][t](a);return void 0===e.gcs&&(e.gcs=function(){return e.map().gcs()}),s}return null},registerLayerAdjustment:function(t,e,n){t in d||(d[t]={});var i=d[t][e];return i&&console.warn("The "+t+"."+e+" layer adjustment is already registered"),d[t][e]=n,i},adjustLayerForRenderer:function(t,e){var n=e.rendererName();n&&d&&d[n]&&d[n][t]&&d[n][t].apply(e)},registerLayer:function(t,e,n){o[t]=e,a[t]=n},createLayer:function(t,e,n){var r={map:e},s=null;if(t in o){if(n.renderer||n.features||!a||(r.features=a[t]),void 0!==n){var l=n.data;delete n.data,i.extend(!0,r,n),l&&(r.data=l)}return(s=o[t](r)).layerName=t,s._init(),s}return null},registerWidget:function(t,e,n){t in r||(r[t]={});var i=r[t][e];return i&&console.warn("The "+t+"."+e+" widget is already registered"),r[t][e]=n,i},createWidget:function(t,e,n){var o={layer:e};if(t in r.dom)return void 0!==n&&i.extend(!0,o,n),r.dom[t](o);throw new Error("Cannot create unknown widget "+t)},registerAnnotation:function(t,e,n){var i=h[t];return i&&console.warn("The "+t+" annotation is already registered"),h[t]={func:e,features:n||{}},i},createAnnotation:function(t,e){if(h[t])return h[t].func(e);console.warn("The "+t+" annotation is not registered")},listAnnotations:function(){return Object.keys(h)},featuresForAnnotations:function(t){var e=[];return(Array.isArray(t)?t:Object.keys(t)).forEach((function(n){h[n]&&Object.keys(h[n].features).forEach((function(r){Array.isArray(t)||!0===t[n]||!Array.isArray(h[n].features[r])?e.push(r):t[n].forEach((function(t){i.inArray(t,h[n].features[r])>=0&&e.push(r)}))}))})),e},rendererForAnnotations:function(t){return f.rendererForFeatures(f.featuresForAnnotations(t))}};f.registries={annotations:h,features:l,featureCapabilities:u,fileReaders:c,layers:o,renderers:s,widgets:r},t.exports=f},3234:function(t,e,n){var i=n(5699),r=n(3737),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this);var n=this,i=0,o=0,a=void 0===(e=e||{}).layer?null:e.layer,s=void 0===e.canvas?null:e.canvas,l=!1;return this.layer=function(){return a},this.canvas=function(t){return void 0===t?s:(s=t,n.modified(),n)},this.map=function(){return a?a.map():null},this.initialized=function(t){return void 0===t?l:(l=t,n)},this.api=function(){throw new Error("Should be implemented by derived classes")},this.width=function(){return i},this.height=function(){return o},this._setWidthHeight=function(t,e){return i=t,o=e,n},this._init=function(){return n},this._resize=function(t,e,i,r){return n._setWidthHeight(i,r),n},this._render=function(){return n},this};i(o,r),t.exports=o},5358:function(t,e,n){var i=n(5699),r=n(3737),o=function t(e){"use strict";if(!(this instanceof t))return new t;r.call(this,e);var n=this,i=null,o=[],a=this._exit,s=this.geoTrigger,l=this.addPromise,u=this.removePromise;return this.addPromise=function(t){return i&&i.addPromise(t),l(t),n},this.removePromise=function(t){return i&&i.removePromise(t),u(t),n},this.parent=function(t){return void 0===t?i:(i=t,n)},this.addChild=function(t){return Array.isArray(t)?(t.forEach(n.addChild),n):(t.parent(n),o.push(t),n)},this.removeChild=function(t){return Array.isArray(t)?(t.forEach(n.removeChild),n):(o=o.filter((function(e){return e!==t})),n)},this.children=function(){return o.slice()},this.draw=function(t){return n.children().forEach((function(e){e.draw(t)})),n},this.geoTrigger=function(t,e,r){var a;return a=(e=e||{}).geo||{},e.geo=a,a.stopPropagation?n:!r&&i&&a._triggeredBy!==i?(a._triggeredBy=n,i.geoTrigger(t,e),n):(s.call(n,t,e),a.stopPropagation||o.forEach((function(i){i.geoTrigger&&(a._triggeredBy=n,i.geoTrigger(t,e))})),n)},this._exit=function(){o=[],i=null,a()},this};i(o,r),t.exports=o},5381:function(t){t.exports="0232ecc9dd2b5096d1f715cf71b0fc1ffc8cf8cf"},9851:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(4745),a=function t(e){"use strict";var n=this;return this instanceof t?(o.call(this,e),this.select=function(){var t=n.renderer(),e={},i=n.nodeFeature(),r=n.linkFeatures();return e.nodes=t.select(i._svgid()),e.links=r.map((function(e){return t.select(e._svgid())})),e},this):new t(e)};i(a,o),r("svg","graph",a),t.exports=a},2878:function(t,e,n){n(5108).svg={rescale:n(8210)},t.exports={graphFeature:n(9851),lineFeature:n(7134),object:n(2738),pathFeature:n(5903),pointFeature:n(3365),quadFeature:n(2203),renderer:n(2531),tileLayer:n(21),trackFeature:n(1489),uniqueID:n(1946),vectorFeature:n(3398)}},7134:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(4708),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(2531).d3,r=n(2738),a=n(6618),s=n(4634);e=e||{},o.call(this,e),r.call(this);var l=this,u=this._init,c=a(),d=0,h=this._update;return this._init=function(t){return u.call(l,t),l},this._build=function(){var t,e,n=l.data()||[],r=l.style(),o=l.renderer(),a=l.position();for(h.call(l),r.fill=function(){return!1},n.forEach((function(e,n){var u,c,d=l.line()(e,n),h={};function f(t){return s.isFunction(t)?function(){return t(d[0],0,e,n)}:t}for(c in r)r.hasOwnProperty(c)&&(h[c]=f(r[c]));t=i.svg.line().x((function(t){return l.featureGcsToDisplay(t).x})).y((function(t){return l.featureGcsToDisplay(t).y})).interpolate(l.style.get("closed")(e,n)&&d.length>2?"linear-closed":"linear"),u={data:[d.map((function(t,i){return a(t,i,e,n)}))],append:"path",attributes:{d:t},id:l._svgid()+n,classes:["svgLineFeature","svgSubLine-"+n],visible:l.visible,style:h},o._drawFeatures(u)})),e=n.length;e<d;e+=1)o._removeFeature(l._svgid()+e);return d=n.length,c.modified(),l.updateTime().modified(),l},this._update=function(){return h.call(l),l.timestamp()>=c.timestamp()&&l._build(),l},this._init(e),this};i(a,o);var s={};s[o.capabilities.basic]=!0,s[o.capabilities.multicolor]=!1,r("svg","line",a,s),t.exports=a},2738:function(t,e,n){t.exports=function t(e){"use strict";var i=n(3737),r=n(1946);if(!(this instanceof i))return new t(e);var o="svg-"+r(),a=this._exit,s=this,l=this.draw;return this._svgid=function(){return o},this.select=function(){return s.renderer().select(s._svgid())},this.draw=function(){return s.ready&&(s._update(),l()),s},this._exit=function(){s.renderer()._removeFeature(s._svgid()),a()},this}},5903:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(6565),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638),r=n(2531).d3,a=n(2738),s=n(6618);e=e||{},o.call(this,e),a.call(this);var l=this,u=s(),c=this._update,d={style:{}};return this._build=function(){var t,e,n=l.data()||[],o=l.style.get(),a=l.style.get("position");return c.call(l),e=function(t){var e={source:t.source,target:t.target};return r.svg.diagonal()(e)},t=[],n.forEach((function(e,i){var r,o;i<n.length-1&&(r=a(e,i),o=a(n[i+1],i+1),t.push({source:l.featureGcsToDisplay(r),target:l.featureGcsToDisplay(o)}))})),d.data=t,d.attributes={d:e},d.id=l._svgid(),d.append="path",d.classes=["svgPathFeature"],d.style=i.extend({fill:function(){return!1},fillColor:{r:0,g:0,b:0}},o),d.visible=l.visible,l.renderer()._drawFeatures(d),u.modified(),l.updateTime().modified(),l},this._update=function(){return c.call(l),l.dataTime().timestamp()>=u.timestamp()&&l._build(),l},this._init(e),this};i(a,o),r("svg","path",a),t.exports=a},3365:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(2557),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(2738),r=n(6618);e=e||{},o.call(this,e),i.call(this);var a=this,s=this._init,l=this._update,u=r(),c={};return this._init=function(t){return s.call(a,t),a},this._build=function(){var t=a.data(),e=a.style.get(),n=a.renderer(),i=a.position();return l.call(a),t||(t=[]),c.id=a._svgid(),c.data=t,c.append="circle",c.attributes={r:n._convertScale(e.radius),cx:function(t){return a.featureGcsToDisplay(i(t)).x},cy:function(t){return a.featureGcsToDisplay(i(t)).y}},c.style=e,c.classes=["svgPointFeature"],c.visible=a.visible,a.renderer()._drawFeatures(c),u.modified(),a.updateTime().modified(),a},this._update=function(){return l.call(a),a.timestamp()>=u.timestamp()&&a._build(),a},this._init(e),this};i(a,o);var s={};s[o.capabilities.stroke]=!0,r("svg","point",a,s),t.exports=a},2203:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(5017),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638),r=n(2531).d3,a=n(2738);o.call(this,e),a.call(this);var s,l=this,u=this._exit,c=this._init,d=this._update;return this._build=function(){if(this.position()){var t=l.renderer(),e=t.layer().map();s=l._generateQuads();var n=[];i.each(s.clrQuads,(function(t,e){n.push({type:"clr",quad:e,zIndex:e.pos[2]})})),i.each(s.imgQuads,(function(t,e){e.image&&n.push({type:"img",quad:e,zIndex:e.pos[2]})}));var o={id:l._svgid(),data:n,dataIndex:function(t){return t.quad.quadId},append:function(t){var e=this.namespaceURI,n="clr"===t.type?"polygon":"image";return e?document.createElementNS(e,n):document.createElement(n)},attributes:{fill:function(t){if("clr"===t.type)return r.rgb(255*t.quad.color.r,255*t.quad.color.g,255*t.quad.color.b);1!==t.quad.opacity&&r.select(this).style("opacity",t.quad.opacity)},height:function(t){return"clr"===t.type?void 0:1},points:function(n){if("clr"===n.type&&!n.points){var i,r=[];for(i=0;i<n.quad.pos.length;i+=3){var o={x:n.quad.pos[i],y:n.quad.pos[i+1],z:n.quad.pos[i+2]};o=e.gcsToDisplay(o,null),o=t.baseToLocal(o),r.push(o.x+","+o.y)}n.points=r[0]+" "+r[1]+" "+r[3]+" "+r[2]}return"clr"===n.type?n.points:void 0},preserveAspectRatio:function(t){return"clr"===t.type?void 0:"none"},reference:function(t){return t.quad.reference},stroke:!1,transform:function(n){if("img"===n.type&&n.quad.image&&!n.svgTransform){var i,r,o,a,s=[],l=-1,u=n.quad.image.width,c=n.quad.image.height;for(o=0;o<n.quad.pos.length;o+=3){var d={x:n.quad.pos[o],y:n.quad.pos[o+1],z:n.quad.pos[o+2]};d=e.gcsToDisplay(d,null),d=t.baseToLocal(d),s.push(d)}for(o=0;o<4;o+=1)(i=Math.abs(s[(o+1)%4].x*(s[(o+2)%4].y-s[(o+3)%4].y)+s[(o+2)%4].x*(s[(o+3)%4].y-s[(o+1)%4].y)+s[(o+3)%4].x*(s[(o+1)%4].y-s[(o+2)%4].y))/2)>l&&(l=i,r=o);n.svgTransform=[3===r||2===r?s[1].x-s[0].x:s[3].x-s[2].x,3===r||2===r?s[1].y-s[0].y:s[3].y-s[2].y,0===r||2===r?s[1].x-s[3].x:s[0].x-s[2].x,0===r||2===r?s[1].y-s[3].y:s[0].y-s[2].y,2===r?s[3].x+s[0].x-s[1].x:s[2].x,2===r?s[3].y+s[0].y-s[1].y:s[2].y],Math.abs(n.svgTransform[1]/u)<1e-6&&Math.abs(n.svgTransform[2]/c)<1e-6&&(a=n.svgTransform[0]/u,n.svgTransform[4]=Math.round(n.svgTransform[4]/a)*a,a=n.svgTransform[3]/c,n.svgTransform[5]=Math.round(n.svgTransform[5]/a)*a)}return"img"===n.type&&n.quad.image?"matrix("+n.svgTransform.join(" ")+")":void 0},width:function(t){return"clr"===t.type?void 0:1},x:function(t){return"clr"===t.type?void 0:0},"xlink:href":function(t){return"clr"!==t.type&&t.quad.image?t.quad.image.src:void 0},y:function(t){return"clr"===t.type?void 0:0}},style:{fillOpacity:function(t){return"clr"===t.type?t.quad.opacity:void 0}},onlyRenderNew:!this.style("previewColor")&&!this.style("previewImage"),sortByZ:!0,visible:l.visible,classes:["svgQuadFeature"]};t._drawFeatures(o),l.buildTime().modified()}},this._update=function(){return d.call(l),(l.buildTime().timestamp()<=l.dataTime().timestamp()||l.buildTime().timestamp()<l.timestamp())&&l._build(),l},this._init=function(){c.call(l,e)},this._exit=function(){u.call(l)},l._init(e),this};i(a,o);var s={};s[o.capabilities.color]=!0,s[o.capabilities.image]=!0,s[o.capabilities.imageCrop]=!1,s[o.capabilities.imageFixedScale]=!1,s[o.capabilities.imageFull]=!1,s[o.capabilities.canvas]=!1,s[o.capabilities.video]=!1,r("svg","quad",a,s),t.exports=a},8210:function(t){t.exports="geo_svg_rescale"},2531:function(t,e,n){var i=n(5699),r=n(4647).registerRenderer,o=n(3234),a=function t(e){"use strict";var i=t.d3,r=n(2738),a=n(4634),s=n(5108),l=n(8210);if(!(this instanceof t))return new t(e);o.call(this,e);var u=this._exit;r.call(this,e),e=e||{};var c=this,d=null,h={},f=null,p=null,m=1,g={dx:0,dy:0,rx:0,ry:0,rotation:0},v={},y={},x=null,b=null;function _(t){return t?x.select(".group-"+t):x.select(".group-"+c._svgid())}function w(){var t=c.layer().map(),e=t.size().width,n=t.size().height;if(!e||!n)throw new Error("Map layer has size 0");c._setWidthHeight(e,n),p=Math.pow(e*e+n*n,.5),f={upperLeft:t.displayToGcs({x:0,y:0},null),lowerRight:t.displayToGcs({x:e,y:n},null),center:t.displayToGcs({x:e/2,y:n/2},null)}}return this._convertColor=function(t,e){return t=a.ensureFunction(t),e=e||function(){return!0},function(){var n="none";return e.apply(c,arguments)&&(n=t.apply(c,arguments)).hasOwnProperty("r")&&n.hasOwnProperty("g")&&n.hasOwnProperty("b")&&(n=i.rgb(255*n.r,255*n.g,255*n.b)),n}},this._convertScale=function(t){return t=a.ensureFunction(t),function(){return t.apply(c,arguments)/m}},this._setTransform=function(){if(f||w(),d){var t,e,n,i,r,o,a=c.layer().map(),s=a.gcsToDisplay(f.upperLeft,null),l=a.gcsToDisplay(f.lowerRight,null),u=a.gcsToDisplay(f.center,null),h=_();n=Math.sqrt(Math.pow(l.y-s.y,2)+Math.pow(l.x-s.x,2))/p,i=a.rotation(),r=-c.width()/2,o=-c.height()/2,t=n*r+u.x,e=n*o+u.y,i||(t=Math.round(t),e=Math.round(e));var v="matrix("+[n,0,0,n,t,e].join()+")";i&&(v+=" rotate("+[180*i/Math.PI,-r,-o].join()+")"),h.attr("transform",v),m=n,g.dx=t,g.dy=e,g.rx=r,g.ry=o,g.rotation=i}},this.baseToLocal=function(t){if(t={x:(t.x-g.dx)/m,y:(t.y-g.dy)/m},g.rotation){var e=Math.sin(-g.rotation),n=Math.cos(-g.rotation),i=t.x+g.rx,r=t.y+g.ry;t={x:i*n-r*e-g.rx,y:i*e+r*n-g.ry}}return t},this.localToBase=function(t){if(g.rotation){var e=Math.sin(g.rotation),n=Math.cos(g.rotation),i=t.x+g.rx,r=t.y+g.ry;t={x:i*n-r*e-g.rx,y:i*e+r*n-g.ry}}return t={x:t.x*m+g.dx,y:t.y*m+g.dy}},this._init=function(t){if(!c.canvas()){var e;t.widget=t.widget||!1,(x="d3Parent"in t?i.select(t.d3Parent).append("svg"):i.select(c.layer().node().get(0)).append("svg")).attr("display","block");var n=(b=x.append("defs")).append("filter").attr("id","geo-highlight").attr("x","-100%").attr("y","-100%").attr("width","300%").attr("height","300%");n.append("feMorphology").attr("operator","dilate").attr("radius",2).attr("in","SourceAlpha").attr("result","dilateOut"),n.append("feGaussianBlur").attr("stdDeviation",5).attr("in","dilateOut").attr("result","blurOut"),n.append("feColorMatrix").attr("type","matrix").attr("values","-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0").attr("in","blurOut").attr("result","invertOut"),n.append("feBlend").attr("in","SourceGraphic").attr("in2","invertOut").attr("mode","normal"),t.widget||(e=t.canvas||x.append("g")),(n=b.append("filter").attr("id","geo-blur").attr("x","-100%").attr("y","-100%").attr("width","300%").attr("height","300%")).append("feGaussianBlur").attr("stdDeviation",20).attr("in","SourceGraphic"),d=c.layer().sticky(),x.attr("class",c._svgid()),x.attr("width",c.layer().node().width()),x.attr("height",c.layer().node().height()),t.widget?c.canvas(x):(e.attr("class","group-"+c._svgid()),c.canvas(e))}return c._setTransform(),c},this.api=function(){return t.apiname},this.scaleFactor=function(){return m},this._resize=function(t,e,n,i){return f||w(),x.attr("width",n),x.attr("height",i),c._setTransform(),c._setWidthHeight(n,i),c.layer().geoTrigger(l,{scale:m},!0),c},this._exit=function(){h={},c.canvas().remove(),x.remove(),x=void 0,b.remove(),b=void 0,v={},y={},u()},this._definitions=function(){return b},this._drawFeatures=function(t){return h[t.id]={data:t.data,index:t.dataIndex,style:t.style,visible:t.visible,attributes:t.attributes,classes:t.classes,append:t.append,onlyRenderNew:t.onlyRenderNew,sortByZ:t.sortByZ,parentId:t.parentId},c.__render(t.id,t.parentId)},this.__render=function(t,e){var n;if(void 0===t){for(n in h)h.hasOwnProperty(n)&&c.__render(n);return c}return e?c._renderFeature(t,e):(v[t]=!0,c.layer().map().scheduleAnimationFrame(c._renderFrame)),c},this._renderFrame=function(){var t;for(t in y)c.select(t).remove(),b.selectAll("."+t).remove();y={};var e=v;for(t in v={},e)e.hasOwnProperty(t)&&c._renderFeature(t)},this._renderFeature=function(t,e){if(!h[t])return c;var n,i,r=h[t].data,o=h[t].index,a=h[t].style,s=h[t].visible,l=h[t].attributes,u=h[t].classes,d=h[t].append,f=c.select(t,e).data(r,o);return n=f.enter().append(d),f.exit().remove(),function(t,e){var n;for(n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}(i=h[t].onlyRenderNew?n:f,l),i.attr("class",u.concat([t]).join(" ")),function(t,e){var n,i,r;function o(){return e.fill.apply(c,arguments)?null:"none"}function a(){return e.stroke.apply(c,arguments)?null:"none"}for(n in e)e.hasOwnProperty(n)&&(r=null,i=null,"strokeColor"===n?(i="stroke",r=c._convertColor(e[n],e.stroke)):"stroke"===n&&e[n]&&!e.hasOwnProperty("strokeColor")?(i="stroke",r=a):"strokeWidth"===n?(i="stroke-width",r=c._convertScale(e[n])):"strokeOpacity"===n?(i="stroke-opacity",r=e[n]):"fillColor"===n?(i="fill",r=c._convertColor(e[n],e.fill)):"fill"!==n||e.hasOwnProperty("fillColor")?"fillOpacity"===n?(i="fill-opacity",r=e[n]):"lineCap"===n?(i="stroke-linecap",r=e[n]):"lineJoin"===n?(i="stroke-linejoin",r=e[n]):"miterLimit"===n&&(i="stroke-miterlimit",r=e[n]):(i="fill",r=o),i&&t.style(i,r))}(i,a),s&&i.style("visibility",s()?"visible":"hidden"),n.size()&&h[t].sortByZ&&f.sort((function(t,e){return(t.zIndex||0)-(e.zIndex||0)})),c},this.select=function(t,e){return _(e).selectAll("."+t)},this._removeFeature=function(t){return y[t]=!0,c.layer().map().scheduleAnimationFrame(c._renderFrame),delete h[t],v[t]&&delete v[t],c},this.draw=function(){},this.layer().geoOn(s.pan,c._setTransform),this.layer().geoOn(s.rotate,c._setTransform),this.layer().geoOn(s.zoom,(function(){c._setTransform(),c.__render(),c.layer().geoTrigger(l,{scale:m},!0)})),this.layer().geoOn(s.resize,(function(t){c._resize(t.x,t.y,t.width,t.height)})),this._init(e),this};a.apiname="svg",i(a,o),r("svg",a),r("d3",a),a.supported=function(){delete a.d3;try{(a.d3=n(9990))&&a.d3.rgb||(a.d3=void 0)}catch(t){}return void 0!==a.d3},a.fallback=function(){return null},a.supported(),t.exports=a},21:function(t,e,n){var i=function(){"use strict";var t,e=this,n=this._init,i=this._exit,r=this._update,o=0,a=[];this._drawTile=function(n){if(t){var i=e._tileBounds(n),r=n.index.level||0,s=e._tileOffset(r),l={};l.ul=e.fromLocal(e.fromLevel({x:i.left-s.x,y:i.top-s.y},r),0),l.ll=e.fromLocal(e.fromLevel({x:i.left-s.x,y:i.bottom-s.y},r),0),l.ur=e.fromLocal(e.fromLevel({x:i.right-s.x,y:i.top-s.y},r),0),l.lr=e.fromLocal(e.fromLevel({x:i.right-s.x,y:i.bottom-s.y},r),0),l.ul.z=l.ll.z=l.ur.z=l.lr.z=r,o+=1,l.id=o,n.quadId=l.id,l.image=n.image,l.reference=n.toString(),a.push(l),t.data(a),t._update(),e.draw()}},this._remove=function(n){if(void 0!==n.quadId&&t){for(var i=0;i<a.length;i+=1)if(a[i].id===n.quadId){a.splice(i,1);break}t.data(a),t._update(),e.draw()}},this._update=function(n){return r.call(e,n),e._addBaseQuadToTiles(t,a),e},this._exit=function(){e.deleteFeature(t),t=null,a=[],i.apply(e,arguments)},this._init=function(){n.apply(e,arguments),(t=e.createFeature("quad",{previewColor:e._options.previewColor,previewImage:e._options.previewImage})).geoTrigger=void 0,t.gcs(e._options.gcs||e.map().gcs()),t.data(a),t._update()},this._getSubLayer=function(){},this._updateSubLayers=void 0};(0,n(4647).registerLayerAdjustment)("svg","tile",i),t.exports=i},1489:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(6223),a=function t(e){"use strict";return this instanceof t?(e=e||{},o.call(this,e),n(2738).call(this),this._init(e),this):new t(e)};i(a,o),r("svg","track",a),t.exports=a},1946:function(t){var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t.exports=function(){var t,n=[];for(n.length=8,t=0;t<8;t+=1)n[t]=e.charAt(Math.floor(Math.random()*e.length));return n.join("")}},3398:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(2623),a={arrow:{attrs:{class:"geo-vector-arrow geo-vector-marker",viewBox:"0 0 10 10",refX:1,refY:5,markerHeight:5,markerWidth:5,orient:"auto"},path:"M 0 0 L 10 5 L 0 10 z"},point:{attrs:{class:"geo-vector-point geo-vector-marker",viewBox:"0 0 12 12",refX:6,refY:6,markerHeight:8,markerWidth:8,orient:"auto"},path:"M 6 3 A 3 3 0 1 1 5.99999 3 Z"},bar:{attrs:{class:"geo-vector-bar geo-vector-marker",viewBox:"0 0 10 10",refX:0,refY:5,markerHeight:6,markerWidth:6,orient:"auto"},path:"M 0 0 L 2 0 L 2 10 L 0 10 z"},wedge:{attrs:{class:"geo-vector-wedge geo-vector-marker",viewBox:"0 0 10 10",refX:10,refY:5,markerHeight:5,markerWidth:5,orient:"auto"},path:"M 0 0 L 1 0 L 10 5 L 1 10 L 0 10 L 9 5 L 0 0"}},s=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(2738),r=n(6618),s=n(2531).d3;e=e||{},o.call(this,e),i.call(this);var l=this,u=this._exit,c=this._update,d=r(),h={};function f(t,e,n){return l._svgid()+"_marker_"+e+"_"+n}function p(t,e,n,i,r){var o=l.renderer()._definitions().selectAll("g.marker-group#"+l._svgid()).data(t.length?[1]:[]);o.enter().append("g").attr("id",l._svgid).attr("class","marker-group"),o.exit().remove();var u=t.reduce((function(t,e,n){var o=a[r(e,n)],s=a[i(e,n)];return o&&t.push({data:e,dataIndex:n,head:!0}),s&&t.push({data:e,dataIndex:n,head:!1}),t}),[]),c=o.selectAll("marker.geo-vector-marker").data(u);c.enter().append("marker").append("path");var d=l.renderer();c.each((function(t){var e=s.select(this),n=t.head?a[r(t.data,t.dataIndex)]:a[i(t.data,t.dataIndex)];Object.keys(n.attrs).forEach((function(t){e.attr(t,n.attrs[t])}))})).attr("id",(function(t){return f(t.data,t.dataIndex,t.head?"head":"tail")})).style("stroke",(function(t){return d._convertColor(e)(t.data,t.dataIndex)})).style("fill",(function(t){return d._convertColor(e)(t.data,t.dataIndex)})).style("opacity",(function(t){return n(t.data,t.dataIndex)})).select("path").attr("d",(function(t){return t.head?a[r(t.data,t.dataIndex)].path:a[i(t.data,t.dataIndex)].path})),c.exit().remove()}return this._build=function(){var t,e=l.data(),n=l.style.get(),i=l.renderer(),r=l.origin(),o=l.delta(),a=l.style("scale"),s=0;function u(){return a/i.scaleFactor()}return c.call(l),e||(e=[]),t=e.map((function(t,e){var n=l.featureGcsToDisplay(r(t,e)),i=o(t,e);return s=Math.max(s,i.x*i.x+i.y*i.y),{x1:n.x,y1:n.y,dx:i.x,dy:-i.y}})),s=Math.sqrt(s),a||(a=75/(s||1)),h.id=l._svgid(),h.data=e,h.append="line",h.attributes={x1:function(e,n){return t[n].x1},y1:function(e,n){return t[n].y1},x2:function(e,n){return t[n].x1+u()*t[n].dx},y2:function(e,n){return t[n].y1+u()*t[n].dy},"marker-start":function(t,e){return"url(#"+f(0,e,"tail")+")"},"marker-end":function(t,e){return"url(#"+f(0,e,"head")+")"}},h.style={stroke:function(){return!0},strokeColor:n.strokeColor,strokeWidth:n.strokeWidth,strokeOpacity:n.strokeOpacity,originStyle:n.originStyle,endStyle:n.endStyle},h.classes=["svgVectorFeature"],h.visible=l.visible,p(e,n.strokeColor,n.strokeOpacity,n.originStyle,n.endStyle),l.renderer()._drawFeatures(h),d.modified(),l.updateTime().modified(),l},this._update=function(){return c.call(l),l.timestamp()>=d.timestamp()?l._build():p(h.data,h.style.strokeColor,h.style.strokeOpacity,h.style.originStyle,h.style.endStyle),l},this._exit=function(){u.call(l),h={},p([],null,null,null,null)},this._init(e),this};s.markerConfigs=a,i(s,o),r("svg","vector",s),t.exports=s},9757:function(t,e,n){var i=n(5699),r=n(6837),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},r.call(this,e);var i=n(5638),o=this,a=this._init;return this.featureType="text",this.position=function(t){return void 0===t?o.style("position"):(t!==o.style("position")&&(o.style("position",t),o.dataTime().modified(),o.modified()),o)},this.text=function(t){return void 0===t?o.style("text"):(t!==o.style("text")&&(o.style("text",t),o.dataTime().modified(),o.modified()),o)},this._init=function(t){t=t||{},a.call(o,t);var e=i.extend({},{font:"bold 16px sans-serif",textAlign:"center",textBaseline:"middle",color:{r:0,g:0,b:0},rotation:0,rotateWithMap:!1,textScaled:!1,position:function(t){return Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:t},text:function(t){return t.text}},void 0===t.style?{}:t.style);void 0!==t.position&&(e.position=t.position),void 0!==t.text&&(e.text=t.text),o.style(e),e.position&&o.position(e.position),e.text&&o.text(e.text),o.dataTime().modified()},this._init(e),o};o.usedStyles=["visible","font","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","lineHeight","fontFamily","textAlign","textBaseline","color","textOpacity","rotation","rotateWithMap","textScaled","offset","shadowColor","shadowOffset","shadowBlur","shadowRotate","textStrokeColor","textStrokeWidth"],o.create=function(t,e){"use strict";return(e=e||{}).type="text",r.create(t,e)},o.capabilities={feature:"text"},i(o,r),t.exports=o},8418:function(t,e,n){var i=n(5638);t.exports=function t(e){if(!(this instanceof t))return new t(e);this._index=e.index,this._size=e.size,this._overlap=e.overlap||{x:0,y:0},this._wrap=e.wrap||{x:1,y:1},this._url=e.url,this._fetched=!1,this._queue=e.queue||null,Object.defineProperty(this,"index",{get:function(){return this._index}}),Object.defineProperty(this,"size",{get:function(){return this._size}}),Object.defineProperty(this,"overlap",{get:function(){return this._overlap}}),this.fetch=function(){return this._fetched||i.get(this._url).done(function(){this._fetched=!0}.bind(this)).promise(this),this},this.fetched=function(){return this._fetched},this.then=function(t,e){return this.fetched()||!this._queue||!this._queue.add||this.state&&"pending"!==this.state()?this.fetch():this._queue.add(this,this.fetch),this.done&&this.fail?this.done(t).fail(e):this.then(t,e),this},this.catch=function(t){return this.then(void 0,t),this},this.toString=function(){return[this._index.level||0,this._index.y,this._index.x,this._index.reference||0].join("_")},this.bounds=function(t,e){var n,i,r,o;return i=(n=this.size.x*(this.index.x-t.x)-this.overlap.x-e.x)+this.size.x+2*this.overlap.x,r=(o=this.size.y*(this.index.y-t.y)-this.overlap.y-e.y)+this.size.y+2*this.overlap.y,this.overlap.x&&this.index.x===t.x&&(n+=this.overlap.x),this.overlap.y&&this.index.y===t.y&&(o+=this.overlap.y),{left:n,right:i,bottom:r,top:o}},Object.defineProperty(this,"bottom",{get:function(){return this.size.y*(this.index.y+1)+this.overlap.y}}),Object.defineProperty(this,"top",{get:function(){return this.size.y*this.index.y-(this.index.y?this.overlap.y:0)}}),Object.defineProperty(this,"left",{get:function(){return this.size.x*this.index.x-(this.index.x?this.overlap.x:0)}}),Object.defineProperty(this,"right",{get:function(){return this.size.x*(this.index.x+1)+this.overlap.x}}),this.fadeIn=function(t){return i.noop(t),this}}},6244:function(t){t.exports=function t(e){return this instanceof t?(e=e||{},this._size=e.size||64,Object.defineProperty(this,"size",{get:function(){return this._size},set:function(t){for(;this._atime.length>t;)this.remove(this._atime[this._atime.length-1]);this._size=t}}),Object.defineProperty(this,"length",{get:function(){return this._atime.length}}),this._access=function(t){return this._atime.indexOf(t)},this.remove=function(t){var e="string"==typeof t?t:t.toString();return e in this._cache&&(this._atime.splice(this._access(e),1),delete this._cache[e],!0)},this.clear=function(){return this._cache={},this._atime=[],this},this.get=function(t,e){return(t="string"==typeof t?t:t.toString())in this._cache?(e||(this._atime.splice(this._access(t),1),this._atime.unshift(t)),this._cache[t]):null},this.add=function(t,e,n){this.remove(t);var i=t.toString();this._cache[i]=t,this._atime.unshift(i),n||this.purge(e)},this.purge=function(t){for(var e;this._atime.length>this.size;){e=this._atime.pop();var n=this._cache[e];t&&t(n),delete this._cache[e]}},this.clear(),this):new t(e)}},1940:function(t,e,n){var i=n(5699),r=n(3715);function o(t,e){return(t%e+e)%e}function a(t){var e,n=/\$?\{(s|S|[sS]:[^{}]+|[^-{}]-[^-{}]|([^,{}]+,)+[^,{}]+)\}/,i=t.replace(new RegExp(n,"g"),"{s}").replace(/\$?\{[xX]\}/g,"{x}").replace(/\$?\{[yY]\}/g,"{y}").replace(/\$?\{[zZ]\}/g,"{z}"),r=t.match(n);if(r)if(r[2])e=r[1].split(",");else if(":"===r[1][1])e=r[1].substr(2).split("");else if("-"===r[1][1]){e=[];for(var a=r[1].charCodeAt(0),s=r[1].charCodeAt(2),l=Math.min(a,s);l<=Math.max(a,s);l+=1)e.push(String.fromCharCode(l))}return function(t,n,r,a){return i.replace(/\{s\}/g,function(t,e,n,i){return i[o(t+e+n,i.length)]}(t,n,r,e||a)).replace(/\{x\}/g,t).replace(/\{y\}/g,n).replace(/\{z\}/g,r)}}var s=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this,e);var i=n(5638),s=n(5108),l=n(6853),u=n(6244),c=n(3705),d=n(4647).adjustLayerForRenderer,h=n(8418);if((e=i.extend(!0,{},this.constructor.defaults,e||{})).cacheSize||(e.cacheSize=e.keepLower?600:200),"string"===i.type(e.subdomains)&&(e.subdomains=e.subdomains.split("")),e.baseUrl){var f=e.baseUrl;f&&"/"!==f.charAt(f.length-1)&&(f+="/"),e.url=f+"{z}/{x}/{y}."+(e.imageFormat||"png")}e.originalUrl=e.url,"string"===i.type(e.url)&&(e.url=a(e.url));var p,m,g,v=this._init,y=this._exit,x=this.visible,b=e.queueSize||6,_=e.initialQueueSize||0,w=[],M={},A=[],T=this;this._options=i.extend(!0,{},e),this.attribution(e.attribution),this._activeTiles={},this._tileTree={},this._cache=u({size:e.cacheSize}),this._queue=e.queue||c({size:b,initialSize:_,track:e.cacheSize,needed:function(t){return this._tileLayers&&this._tileLayers.length?this._tileLayers.some((function(e){return t===e.cache.get(t.toString(),!0)})):t===T.cache.get(t.toString(),!0)}}),this._queue._tileLayers=this._queue._tileLayers||[],this._queue._tileLayers.push(T);var C={};return Object.defineProperty(this,"options",{get:function(){return i.extend({},T._options)}}),Object.defineProperty(this,"cache",{get:function(){return T._cache}}),Object.defineProperty(this,"activeTiles",{get:function(){return i.extend({},T._activeTiles)}}),Object.defineProperty(this,"queue",{get:function(){return T._queue},set:function(t){T._queue!==t&&(this._queue&&this._queue._tileLayers&&this._queue._tileLayers.indexOf(T)>=0&&this._queue._tileLayers.splice(this._queue._tileLayers.indexOf(T),1),T._queue=t,T._queue._tileLayers=T._queue._tileLayers||[],T._queue._tileLayers.push(T))}}),Object.defineProperty(this,"queueSize",{get:function(){return b},set:function(t){b=t,T._queue.size=t}}),Object.defineProperty(this,"initialQueueSize",{get:function(){return _},set:function(t){_=t||0,T._queue.initialSize=t||b}}),Object.defineProperty(this,"reference",{get:function(){return T.id()+"_"+(p||0)},set:function(t){p=t},configurable:!0}),this.tilesAtZoom=function(t){if(T._options.tilesAtZoom)return T._options.tilesAtZoom.call(T,t);var e=Math.pow(2,t);return{x:e,y:e}},this.tilesMaxBounds=function(t){return T._options.tilesMaxBounds?T._options.tilesMaxBounds.call(T,t):null},this.tileCropFromBounds=function(t){if(T._options.tilesMaxBounds){var e=t.index.level,n=T._tileBounds(t);return void 0===A[e]&&(A[e]=T.tilesMaxBounds(e)||null),A[e]&&(n.right>A[e].x||n.bottom>A[e].y)?{x:Math.max(0,Math.min(A[e].x,n.right)-n.left),y:Math.max(0,Math.min(A[e].y,n.bottom)-n.top)}:void 0}},this.isValid=function(t){return T._options.minLevel<=t.level&&t.level<=T._options.maxLevel&&(!!(T._options.wrapX||0<=t.x&&t.x<=T.tilesAtZoom(t.level).x-1)&&!!(T._options.wrapY||0<=t.y&&t.y<=T.tilesAtZoom(t.level).y-1))},this._origin=function(t){var e,n=T.toLevel(T.toLocal(T.map().origin()),t),i=T._options;return{index:e={x:Math.floor(n.x/i.tileWidth),y:Math.floor(n.y/i.tileHeight)},offset:{x:n.x-i.tileWidth*e.x,y:n.y-i.tileHeight*e.y}}},this._tileBounds=function(t){var e=T._origin(t.index.level);return t.bounds(e.index,e.offset)},this.tileAtPoint=function(t,e){var n=T._origin(e),i=T.map();t=T.displayToLevel(i.gcsToDisplay(t,null),e),isNaN(t.x)&&(t.x=0),isNaN(t.y)&&(t.y=0);var r=T._tileOffset(e);return r&&(t.x+=r.x,t.y+=r.y),{x:Math.floor(n.index.x+(n.offset.x+t.x)/T._options.tileWidth),y:Math.floor(n.index.y+(n.offset.y+t.y)/T._options.tileHeight)}},this.gcsTileBounds=function(t,e){var n=t.index?t:h({index:t,size:{x:T._options.tileWidth,y:T._options.tileHeight},url:""}),i=T._tileOffset(n.index.level),r=n.bounds({x:0,y:0},i),o=T.map(),a=o.unitsPerPixel(n.index.level),s=[{x:r.left*a,y:T._topDown()*r.top*a},{x:r.right*a,y:T._topDown()*r.bottom*a}];return(e=null===e?o.gcs():void 0===e?o.ingcs():e)!==o.gcs()&&(s=l.transformCoordinates(o.gcs(),e,s)),{left:s[0].x,top:s[0].y,right:s[1].x,bottom:s[1].y}},this._getTile=function(t,e){var n=e||t;return h({index:t,size:{x:T._options.tileWidth,y:T._options.tileHeight},queue:T._queue,url:T._options.url.call(T,n.x,n.y,n.level||0,T._options.subdomains)})},this._getTileCached=function(t,e,n){var i=T.cache.get(T._tileHash(t));return null===i&&(i=T._getTile(t,e),T.cache.add(i,T.remove,n)),i},this._tileHash=function(t){return[t.level||0,t.y,t.x,t.reference||0].join("_")},this._getTileRange=function(t,e){var n=[T.tileAtPoint({x:e.left,y:e.top},t),T.tileAtPoint({x:e.right,y:e.top},t),T.tileAtPoint({x:e.left,y:e.bottom},t),T.tileAtPoint({x:e.right,y:e.bottom},t)];return{start:{x:Math.min(n[0].x,n[1].x,n[2].x,n[3].x),y:Math.min(n[0].y,n[1].y,n[2].y,n[3].y)},end:{x:Math.max(n[0].x,n[1].x,n[2].x,n[3].x),y:Math.max(n[0].y,n[1].y,n[2].y,n[3].y)}}},this._getTiles=function(t,e,n,r){var a,s,l,u,c,d,h,f,p,m,g,v=[],y=!1,x=T._options.keepLower?T._options.minLevel:Math.min(Math.max(t,T._options.minLevel),T._options.maxLevel);for(t<x&&(t=x),g=x;g<=t&&(c=(h=T._getTileRange(g,e)).start,d=h.end,u=T.tilesAtZoom(g),T._options.wrapX||(c.x=Math.min(Math.max(c.x,0),u.x-1),d.x=Math.min(Math.max(d.x,0),u.x-1),g===x&&T._options.keepLower&&(c.x=0,d.x=u.x-1)),T._options.wrapY||(c.y=Math.min(Math.max(c.y,0),u.y-1),d.y=Math.min(Math.max(d.y,0),u.y-1),g===x&&T._options.keepLower&&(c.y=0,d.y=u.y-1)),!(T._options.gcs&&T._options.gcs!==T.map().gcs()&&g!==x&&(d.x+1-c.x)*(d.y+1-c.y)>T.map().size().width*T.map().size().height/T._options.tileWidth/T._options.tileHeight*16));g+=1)for(a=c.x;a<=d.x;a+=1)for(s=c.y;s<=d.y;s+=1)l={level:g,x:a,y:s,reference:T.reference},f={level:g,x:a,y:s,reference:T.reference},T._options.wrapX&&(f.x=o(f.x,u.x)),T._options.wrapY&&(f.y=o(f.y,u.y)),T.isValid(f)&&(r&&v.length<w.length&&(m=w[v.length],y=y||l.level!==m.level||l.x!==m.x||l.y!==m.y),v.push({index:l,source:f}));if(r){if(!y&&v.length===w.length)return;w.splice(0,w.length),i.each(v,(function(t,e){w.push(e.index)}))}if(n){p={x:(c.x+d.x)/2,y:(c.y+d.y)/2,level:t,bottomLevel:t};for(var b=Math.max(d.x-c.x,d.y-c.y)+1;b>=1;b/=2)p.bottomLevel-=1;v.sort(T._loadMetric(p)),T._queue&&T._queue.batch(!0)}for(T.cache.size<v.length&&(console.log("Increasing cache size to "+v.length),T.cache.size=v.length),a=0;a<v.length;a+=1)v[a]=T._getTileCached(v[a].index,v[a].source,!0);return T.cache.purge(T.remove),v},this.gcs=function(t){if(void 0===t)return T._options.gcs||T.map().gcs();var e=T.gcs();return null===t?delete T._options.gcs:T._options.gcs=t,T.gcs()!==e&&(T.clear(),T.gcsFeatures(T.gcs()),T.modified(),T._update()),T},this.prefetch=function(t,e){var n;return n=T._getTiles(t,e,!0),i.when.apply(i,n.map((function(t){return t.fetch()})))},this._loadMetric=function(t){return function(e,n){var i,r,o,a,s;return e=e.index||e,n=n.index||n,e.level!==n.level?t.bottomLevel&&e.level>=t.bottomLevel!=n.level>=t.bottomLevel?e.level>=t.bottomLevel?-1:1:e.level-n.level:(s=Math.pow(2,e.level-t.level),o=(t.x+.5)*s-.5,a=(t.y+.5)*s-.5,(i=e.x-o)*i+(r=e.y-a)*r-((i=n.x-o)*i+(r=n.y-a)*r))}},this.fromLevel=function(t,e){var n=Math.pow(2,-e);return{x:t.x*n,y:t.y*n}},this.toLevel=function(t,e){var n=Math.pow(2,e);return{x:t.x*n,y:t.y*n}},this.drawTile=function(t){var e=t.toString();T._activeTiles.hasOwnProperty(e)?T._moveToTop(t):T._drawTile(t),T._activeTiles[e]=t},this._drawTile=function(t){if(null!==T.renderer())throw new Error("This draw method is not valid on renderer managed layers.");var e,n=t.index.level,r=i(T._getSubLayer(n)),o=T._tileBounds(t),a=T._options.animationDuration,s=i('<div class="geo-tile-container"/>').attr("tile-reference",t.toString());s.append(t.image),s.css({left:o.left-parseInt(r.attr("offsetx")||0,10)+"px",top:o.top-parseInt(r.attr("offsety")||0,10)+"px"}),(e=T.tileCropFromBounds(t))&&s.addClass("crop").css({width:e.x+"px",height:e.y+"px"}),a>0&&t.fadeIn(a),r.append(s),t.catch((function(){console.warn("Could not load tile at "+t.toString()),T._remove(t)}))},this.remove=function(t){var e=t.toString(),n=T._activeTiles[e];return n instanceof h&&T._remove(n),delete T._activeTiles[e],n},this._remove=function(t){t.image&&(t.image.parentElement?i(t.image.parentElement).remove():console.log("No parent element to remove "+t.toString(),t),i(t.image).remove())},this._moveToTop=function(t){i.noop(t)},this._getViewBounds=function(){var t=T.map(),e=t.zoom(),n=T._options.tileRounding(e),i=Math.pow(2,e-n),r=t.size(),o=T.displayToLevel({x:0,y:0}),a=T.displayToLevel({x:r.width,y:0}),s=T.displayToLevel({x:0,y:r.height}),l=T.displayToLevel({x:r.width,y:r.height});return{level:n,scale:i,left:Math.min(o.x,a.x,s.x,l.x),right:Math.max(o.x,a.x,s.x,l.x),top:Math.min(o.y,a.y,s.y,l.y),bottom:Math.max(o.y,a.y,s.y,l.y)}},this._purge=function(t,e,n){var i,r;if(T._updating)return T;for(r in n||(n=T._getViewBounds()),T._activeTiles)i=T._activeTiles[r],T._canPurge(i,n,t,e)&&T.remove(i);return T},this.clear=function(){var t,e=[];for(t in T._activeTiles)e.push(T.remove(t));return T._tileTree={},w=[],e},this.reset=function(){return T.clear(),T._cache.clear(),T._queue.initialSize=_,T},this.toLocal=function(t,e){var n=T.map(),i=n.unitsPerPixel(void 0===e?n.zoom():e);return{x:t.x/i,y:T._topDown()*t.y/i}},this.fromLocal=function(t,e){var n=T.map(),i=n.unitsPerPixel(void 0===e?n.zoom():e);return{x:t.x*i,y:T._topDown()*t.y*i}},this._topDown=function(){return T._options.topDown?1:-1},this._getSubLayer=function(t){if(T.canvas()){var e=T.canvas().find("div[data-tile-layer="+t.toFixed()+"]").get(0);return e||(e=i('<div class=geo-tile-layer data-tile-layer="'+t.toFixed()+'"/>').get(0),T.canvas().append(e)),e}},this._updateSubLayers=function(t,e){var n=T.canvas(),r=parseInt(n.attr("lastlevel"),10),o=parseInt(n.attr("lastoffsetx")||0,10),a=parseInt(n.attr("lastoffsety")||0,10);if(r===t&&Math.abs(o-e.left)<65536&&Math.abs(a-e.top)<65536)return{x:o,y:a};var s=T.map(),l=T._tileOffset(t),u=parseInt((e.left+e.right-s.size().width)/2+l.x,10),c=parseInt((e.top+e.bottom-s.size().height)/2+l.y,10);return n.find(".geo-tile-layer").each((function(e,n){var r=i(n),o=parseInt(r.data("tileLayer"),10);r.css("transform","scale("+Math.pow(2,t-o)+")");var a=parseInt(u/Math.pow(2,t-o),10),s=parseInt(c/Math.pow(2,t-o),10),l=a-parseInt(r.attr("offsetx")||0,10),d=s-parseInt(r.attr("offsety")||0,10);r.attr({offsetx:a,offsety:s}),r.find(".geo-tile-container").each((function(t,e){i(e).css({left:parseInt(i(e).css("left"),10)-l+"px",top:parseInt(i(e).css("top"),10)-d+"px"})}))})),n.attr({lastoffsetx:u,lastoffsety:c,lastlevel:t}),{x:u,y:c}},this._update=function(t){if(t&&t.event&&(t.event.event===s.zoom||t.event.event===s.rotate))return T;if(!T.visible())return T;var e,n=T.map(),r=n.bounds(void 0,null),o=n.zoom(),a=T._options.tileRounding(o);if(T._updateSubLayers){var l=T._getViewBounds(),u=T._updateSubLayers(a,l)||{x:0,y:0},c=T._tileOffset(a);if(null===T.renderer()){var d=Math.pow(2,o-a),h=n.rotation(),f=-c.x+-(l.left+l.right)/2+u.x,p=-c.y+-(l.bottom+l.top)/2+u.y,g=f+n.size().width/2,v=p+n.size().height/2;T.canvas().css({"transform-origin":-f+"px "+-p+"px"});var y="translate("+g+"px,"+v+"px)scale("+d+")";h&&(y+="rotate("+180*h/Math.PI+"deg)"),T.canvas().css("transform",y)}T.canvas().attr({scale:Math.pow(2,o-a),dx:-c.x+-(l.left+l.right)/2,dy:-c.y+-(l.bottom+l.top)/2,offsetx:u.x,offsety:u.y,rotation:n.rotation()})}if(void 0===(e=T._getTiles(a,r,!0,!0)))return T;if(T._tileTree={},e.forEach((function(t){if(t.fetched())delete M[t.toString()],T.drawTile(t),T._setTileTree(t);else{if(t._queued)(T._queue?T._queue.get(t):-1)>=0&&T._queue.add(t);else t.then((function(){if(!m&&t===T.cache.get(t.toString())){var e=n.zoom(),i=T._options.tileRounding(e),r=T._getViewBounds();T._canPurge(t,r,i)?T.remove(t):(T.drawTile(t),T._setTileTree(t))}})),t._queued=!0;T.addPromise(t),M[t.toString()]=t}})),i.when.apply(i,e).done((function(){var t=T.map().zoom(),e=T._options.tileRounding(t);T._purge(e,!0)})),"all"!==T._options.idleAfter)for(var x in M){var b=M[x];e.indexOf(b)<0&&(T.removePromise(b),delete M[x])}return T},this._setTileTree=function(t){if(!T._options.keepLower){var e=t.index;T._tileTree[e.level]=T._tileTree[e.level]||{},T._tileTree[e.level][e.x]=T._tileTree[e.level][e.x]||{},T._tileTree[e.level][e.x][e.y]=t}},this._getTileTree=function(t){return((T._tileTree[t.level]||{})[t.x]||{})[t.y]||null},this._isCovered=function(t){var e=t.index.level,n=t.index.x,i=t.index.y,r=[];return(r=T._getTileTree({level:e-1,x:Math.floor(n/2),y:Math.floor(i/2)}))?[r]:(r=[T._getTileTree({level:e+1,x:2*n,y:2*i}),T._getTileTree({level:e+1,x:2*n+1,y:2*i}),T._getTileTree({level:e+1,x:2*n,y:2*i+1}),T._getTileTree({level:e+1,x:2*n+1,y:2*i+1})]).every((function(t){return null!==t}))?r:null},this._outOfBounds=function(t,e){var n=T._tileOffset(t.index.level),i=1;return t.index.level!==e.level&&(i=Math.pow(2,(e.level||0)-(t.index.level||0))),(t.bottom-n.y)*i<e.top||(t.left-n.x)*i>e.right||(t.top-n.y)*i>e.bottom||(t.right-n.x)*i<e.left},this._canPurge=function(t,e,n,i){if(T._options.keepLower){if((n=n||0)<t.index.level&&t.index.level!==T._options.minLevel)return!0;if(t.index.level===T._options.minLevel&&!T._options.wrapX&&!T._options.wrapY)return!1}else if((i||T._isCovered(t))&&n!==t.index.level&&(n>=T._options.minLevel||t.index.level!==T._options.minLevel)&&(n<T._options.maxLevel||t.index.level!==T._options.maxLevel))return!0;return!!e&&T._outOfBounds(t,e)},this.displayToLevel=function(t,e){var n,i=T.map(),r=i.zoom(),o=T._options.tileRounding(r),a=i.unitsPerPixel(void 0===e?o:e);if(void 0===t){var s=i.size();t={x:s.width/2,y:s.height/2}}try{n=i.displayToGcs(t,T._options.gcs||null)}catch(t){n={x:0,y:0}}return{x:n.x/a,y:T._topDown()*n.y/a}},this.url=function(t){return void 0===t?T._options.originalUrl:(t===T._options.originalUrl||(T._options.originalUrl=t,"string"===i.type(t)&&(t=a(t)),T._options.url=t,T.reset(),T.map().draw()),T)},this.subdomains=function(t){return void 0===t?T._options.subdomains:(t&&("string"===i.type(t)&&(t=t.indexOf(",")>=0?t.split(","):t.split("")),T._options.subdomains=t,T.reset(),T.map().draw()),T)},this._tileOffset=function(t){return void 0===C[t]&&(C[t]=T._options.tileOffset(t)),C[t]},this.visible=function(t){return void 0===t?x():(T.visible()!==t&&(x(t),t&&T._update()),T)},Object.defineProperty(this,"baseQuad",{get:function(){return T._options.baseQuad},set:function(t){T._options.baseQuad=t,T._update()}}),this._addBaseQuadToTiles=function(t,e){t&&(this.baseQuad!==g&&(g&&e.splice(0,1),(g=this.baseQuad)&&(e.splice(0,0,this.baseQuad),t.cacheUpdate(0)),t.data(e)),t._update())},this._init=function(){var t;if(v.apply(T,arguments),null===T.renderer())for(t=0;t<=T._options.maxLevel;t+=1)T._getSubLayer(t);return T},this._exit=function(){return T.reset(),y.apply(T,arguments),m=!0,this._queue&&this._queue._tileLayers&&this._queue._tileLayers.indexOf(T)>=0&&this._queue._tileLayers.splice(this._queue._tileLayers.indexOf(T),1),T},d("tile",this),this};s.defaults={minLevel:0,maxLevel:18,tileOverlap:{x:0,y:0},tileWidth:256,tileHeight:256,wrapX:!0,wrapY:!1,url:null,subdomains:"abc",tileOffset:function(t){return{x:0,y:0}},tilesMaxBounds:null,topDown:!1,keepLower:!0,idleAfter:"view",tileRounding:Math.round,attribution:"",animationDuration:0},i(s,r),t.exports=s},6618:function(t){var e=0;t.exports=function t(){"use strict";if(!(this instanceof t))return new t;var n=this,i=0;return this.modified=function(){return i=e+=1,n},this.timestamp=function(){return i},this.getMTime=this.timestamp,this}},6223:function(t,e,n){var i=n(5699),r=n(6837),o=n(4647),a=n(4634),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638),s=n(6853);e=e||{},r.call(this,e);var l,u,c,d,h,f=this,p={},m={startTime:void 0!==e.startTime?e.startTime:null,endTime:void 0!==e.endTime?e.endTime:null,duration:void 0!==e.duration?e.duration:null,start:0,end:0},g=this.draw,v=this._exit,y=this._init,x=this.modified,b=this.style,_=this._update;return this.featureType="track",this._linePosition=function(t){return function(e,n,i,r){var o=m.timeFunc(e,n,i,r);return"past"===t&&o>=m.start||"current"===t&&o<m.start?m.startPosition[r]:"current"===t&&o>m.end||"future"===t&&o<m.end?m.endPosition[r]:m.positionFunc(e,n,i,r)}},this._headPosition=function(t,e){return m.endPosition[e]},this._headText=function(t,e){return m.text[e]},this._updateTimeRange=function(){null!==m.endTime||null===m.endTime&&(null===m.startTime||null==m.duration)?(m.end=null!==m.endTime?m.endTime:m.timeExtents.end,null!==m.startTime&&(null===m.endTime||m.startTime<=m.endTime)?m.start=m.startTime:null!==m.duration?m.start=m.end-m.duration:m.start=m.timeExtents.start):(m.start=m.startTime,m.end=m.start+m.duration)},this.calculateTimePosition=function(t,e,n){f.dataTime().timestamp()>=f.buildTime().timestamp()&&f._build(),e=null===e?f.layer().map().gcs():void 0===e?f.gcs():e;var i=s({source:f.gcs(),target:e}),r=f.data(),o=[],a=r.map((function(e,n){var i=m.trackFunc(e,n);if(o.push(i),!i.length)return{x:0,y:0,z:0,posidx:-1};var r,a,s,l,u=0,c=i.length-1;if(1===i.length)return{posidx:u,angidx0:u,angidx1:u};if((r=m.timeFunc(i[u],u,e,n))>=t)return{posidx:u,angidx0:u,angidx1:u+1};if((a=m.timeFunc(i[c],c,e,n))<=t)return{posidx:c,angidx0:c-1,angidx1:c};for(;c-u>1;){if(s=Math.floor((c+u)/2),(l=m.timeFunc(i[s],s,e,n))===t)return{posidx:s,angidx0:s-1,angidx1:s+1};l<t?(r=l,u=s):(a=l,c=s)}var d=(t-r)/(a-r);return{posidx0:u,posidx1:c,factor0:1-d,factor1:d,angidx0:u,angidx1:c}}));return a.forEach((function(t,e){var r,a,s;t.posidx<0||(void 0===t.posidx1?r=m.positionFunc(o[e][t.posidx],t.posidx,o[e],e):(a=i.forward(m.positionFunc(o[e][t.posidx0],t.posidx0,o[e],e),!0),s=i.forward(m.positionFunc(o[e][t.posidx1],t.posidx1,o[e],e),!0),r=i.inverse({x:a.x*t.factor0+s.x*t.factor1,y:a.y*t.factor0+s.y*t.factor1,z:(a.z||0)*t.factor0+(s.z||0)*t.factor1},!0)),t.x=r.x,t.y=r.y,t.z=r.z||0,n&&(void 0===t.posidx1&&(a=i.forward(t.angidx0===t.posidx?r:m.positionFunc(o[e][t.angidx0],t.angidx0,o[e],e),!0),s=i.forward(t.angidx1===t.posidx?r:m.positionFunc(o[e][t.angidx1],t.angidx1,o[e],e),!0)),t.angle=Math.atan2(s.y-a.y,s.x-a.x)))})),a},this._build=function(){f.buildTime().modified(),l||(l={past:f.layer().createFeature("line"),future:f.layer().createFeature("line"),current:f.layer().createFeature("line")},f.dependentFeatures([l.past,l.current,l.future]));var t=f.data();m.data=t,m.timeFunc=f.style.get("time"),m.positionFunc=f.style.get("position"),m.trackFunc=f.style.get("track"),m.textFunc=f.style.get("text"),["past","current","future"].forEach((function(e){l[e].style(f.style()).style(f[e+"Style"]()).line(f.style("track")).gcs(f.gcs()).data(t).position(f._linePosition(e))}));var e,n,i={};if(t.forEach((function(t,e){var n,r=m.trackFunc(t,e);r.length&&(n=m.timeFunc(r[0],0,t,e),(void 0===i.start||n<i.start)&&(i.start=n),r.length>1&&(n=m.timeFunc(r[r.length-1],r.length-1,t,e)),(void 0===i.end||n>i.end)&&(i.end=n))})),m.timeExtents=i,f._updateTimeRange(),m.startPosition=f.calculateTimePosition(m.start,null),m.endPosition=f.calculateTimePosition(m.end,null,!0),m.text=t.map((function(t,i){var r=m.textFunc(t,i);return e|=null==r,null==r||""===r?"":(n=!0,m.startPosition[i].posidx<0&&(r=""),r)})),e&&!c){if(!(o.registries.features[f.layer().rendererName()]||{}).marker){var r=o.rendererForFeatures(["marker"]);u=o.createLayer("feature",f.layer().map(),{renderer:r}),f.layer().addChild(u),f.layer().node().append(u.node())}c=(u||f.layer()).createFeature("marker");var a=f.dependentFeatures();a.push(c),f.dependentFeatures(a)}if(n&&!h){if(!(o.registries.features[f.layer().rendererName()]||{}).text){var s=o.rendererForFeatures(["text"]);d=o.createLayer("feature",f.layer().map(),{renderer:s}),f.layer().addChild(d),f.layer().node().append(d.node())}h=(d||f.layer()).createFeature("text");var p=f.dependentFeatures();p.push(h),f.dependentFeatures(p)}if(c){c.headData=m.endPosition,c.style(f.markerStyle()).gcs(f.gcs()).data(t).position(f._headPosition);var g=c.style.get("radius");c.style("radius",(function(t,e){return m.text[e]||m.startPosition[e].posidx<0?0:g(t,e)}))}return h&&(h.headData=m.endPosition,h.style(f.textStyle()).gcs(f.gcs()).data(t).text(f._headText).position(f._headPosition)),f},this._updateTimeAndPosition=function(){l&&(f._updateTimeRange(),m.startPosition=f.calculateTimePosition(m.start,null),m.endPosition=f.calculateTimePosition(m.end,null,!0),l.past.modified(),l.current.modified(),l.future.modified(),c&&c.modified(),h&&h.modified(),f.updateTime().modified(),f.modified())},this._update=function(){return _.call(f),(f.dataTime().timestamp()>=f.buildTime().timestamp()||f.updateTime().timestamp()<=f.timestamp())&&f._build(),f.updateTime().modified(),f},this.draw=function(){var t=g();return l&&(l.past.draw(),l.current.draw(),l.future.draw()),c&&c.draw(),h&&h.draw(),t},this.modified=function(){var t=x();return l&&(l.past.modified(),l.current.modified(),l.future.modified()),c&&c.modified(),h&&h.modified(),t},this.style=function(t,e,n){return"style"===(n=n||"style")?b(t,e):void 0===t?p[n]:"string"==typeof t&&void 0===e?(p[n]||{})[t]:(void 0===p[n]&&(p[n]={}),void 0===e?p[n]=i.extend(!0,p[n],t):p[n][t]=e,f.modified(),f)},this.style.get=b.get,["markerStyle","textStyle","pastStyle","currentStyle","futureStyle"].forEach((function(t){f[t]=function(e,n){return f.style(e,n,t)}})),this.track=function(t){return void 0===t?f.style("track"):(f.style("track",t),f.dataTime().modified(),f.modified(),f)},this.position=function(t){return void 0===t?f.style("position"):(f.style("position",t),f.dataTime().modified(),f.modified(),f)},this.time=function(t){return void 0===t?f.style("time"):(f.style("time",t),f.dataTime().modified(),f.modified(),f)},this.timeRange=function(t){if(void 0===t)return{startTime:m.startTime,endTime:m.endTime,duration:m.duration,start:m.start,end:m.end,minimum:(m.timeExtents||{}).start,maximum:(m.timeExtents||{}).end};var e=!1;return void 0!==t.startTime&&t.startTime!==m.startTime&&(m.startTime=null===t.startTime?t.startTime:+t.startTime,e=!0),void 0!==t.endTime&&t.endTime!==m.endTime&&(m.endTime=null===t.endTime?t.endTime:+t.endTime,e=!0),void 0!==t.duration&&t.duration!==m.duration&&(m.duration=null===t.duration?t.duration:+t.duration,e=!0),e&&f._updateTimeAndPosition(),f},this.startTime=function(t){return void 0===t?m.startTime:(t!==m.startTime&&(m.startTime=null===t?t:+t,f._updateTimeAndPosition()),f)},this.endTime=function(t){return void 0===t?m.endTime:(t!==m.endTime&&(m.endTime=null===t?t:+t,f._updateTimeAndPosition()),f)},this.duration=function(t){return void 0===t?m.duration:(t!==m.duration&&(m.duration=null===t?t:+t,f._updateTimeAndPosition()),f)},this._mergeSearchResults=function(t,e){return t.extra=t.extra||{},e.forEach((function(e){return e.value.index.forEach((function(n,i){t.index.indexOf(n)<0&&(t.index.push(n),t.found.push(e.value.found[i]),t.where=t.where||{},e.value.extra&&e.value.extra[n]&&(t.extra[n]=e.value.extra[n]),a.isObject(t.extra[n])||(t.extra[n]={value:t.extra[n]}),t.extra[n].where=e.key)}))})),t},this.pointSearch=function(t){var e=l.current.pointSearch(t),n=l.past.pointSearch(t),i=l.future.pointSearch(t),r=c?c.pointSearch(t):{index:[]};return this._mergeSearchResults(e,[{key:"marker",value:r},{key:"past",value:n},{key:"future",value:i}])},this.polygonSearch=function(t,e){var n=l.current.polygonSearch(t,e),i=l.past.polygonSearch(t,e),r=l.future.polygonSearch(t,e),o=c?c.polygonSearch(t,e):{index:[]};return this._mergeSearchResults(n,[{key:"marker",value:o},{key:"past",value:i},{key:"future",value:r}])},this._exit=function(){l&&f.layer()&&(f.layer().deleteFeature(l.past),f.layer().deleteFeature(l.current),f.layer().deleteFeature(l.future)),l=null,(u||f.layer())&&c&&(u||f.layer()).deleteFeature(c),u&&f.layer()&&f.layer().removeChild(u),u=null,(d||f.layer())&&h&&(d||f.layer()).deleteFeature(h),d&&f.layer()&&f.layer().removeChild(d),d=null,f.dependentFeatures([]),v()},this._init=function(t){t=t||{},y.call(f,t);var e=i.extend(!0,{},{track:function(t){return t},position:function(t){return t},time:function(t,e){return void 0!==t.t?t.t:e}},void 0===t.style?{}:t.style),n=i.extend(!0,{},{rotateWithMap:!0,rotation:function(t,e){return-m.endPosition[e].angle||0}},void 0===t.markerStyle?{}:t.markerStyle),r=i.extend(!0,{},{rotateWithMap:!0,rotation:function(t,e){return void 0!==m.endPosition[e].angle?-m.endPosition[e].angle+Math.PI/2:0}},void 0===t.textStyle?{}:t.textStyle),o=i.extend(!0,{},{strokeOpacity:.25},void 0===t.pastStyle?{}:t.pastStyle),a=i.extend(!0,{},{},void 0===t.currentStyle?{}:t.currentStyle),s=i.extend(!0,{},{strokeOpacity:.25},void 0===t.futureStyle?{}:t.futureStyle);["track","position","time"].forEach((function(n){void 0!==t[n]&&(e[n]=t[n])})),f.style(e),f.markerStyle(n),f.textStyle(r),f.pastStyle(o),f.currentStyle(a),f.futureStyle(s)},this};i(s,r),t.exports=s},6853:function(t,e,n){var i=n(4252),r=n(5365),o=n(5240),a=n(4634);i=i.__esModule?i.default:i;var s=n(1103);s.keys().forEach((function(t){i.Proj.projections.add(s(t))}));var l={},u=/^(.* |)\\+axis=e(n|s)u(| .*)$/,c=/(^|\s)\+(s[1-3][1-3]|[xyz]off)=\S/,d=function t(e){"use strict";if(!(this instanceof t))return(e=e||{}).source in l||(Object.keys(l).length>=10&&(l={}),l[e.source]={}),e.target in l[e.source]||(Object.keys(l[e.source]).length>=10&&(l[e.source]={}),l[e.source][e.target]=new t(e)),l[e.source][e.target];var n,s,u,d,h,f,p,m=this,g={s11:0,s12:4,s13:8,xoff:12,s21:1,s22:5,s23:9,yoff:13,s31:2,s32:6,s33:10,zoff:14};function v(t){if(!c.exec(t))return{proj:t};var e,n,i=a.mat4AsArray(),r=[];return t.split(/(\s+)/).forEach((function(t){var e=/^\+(s[1-3][1-3]|[xyz]off)=(.*)$/.exec(t);e?i[g[e[1]]]=parseFloat(e[2]):r.push(t)})),n={proj:r.join(" "),orig:t},(e=o.invert(a.mat4AsArray(),i))?(n.matrix=i,n.inverse=e):console.warn("Affine transform is not invertable and will not be used: "+t),n}function y(){var t=v(m.source()),e=v(m.target()),r=t.proj,o=e.proj;d=t.matrix,h=t.inverse,f=e.matrix,p=e.inverse,n=new i(r,o)}this.source=function(t){return void 0===t?s||"EPSG:4326":(s=t,y(),m)},this.target=function(t){return void 0===t?u||"EPSG:3857":(u=t,y(),m)},this._forward=function(t){if(d){var e=r.transformMat4(a.vec3AsArray(),[t.x,t.y,t.z||0],h);t={x:e[0],y:e[1],z:e[2]}}var i=n.forward(t,!0);if(i.z=t.z||0,f){var o=r.transformMat4(a.vec3AsArray(),[i.x,i.y,i.z],f);i={x:o[0],y:o[1],z:o[2]}}return i},this._inverse=function(t){if(f){var e=r.transformMat4(a.vec3AsArray(),[t.x,t.y,t.z||0],p);t={x:e[0],y:e[1],z:e[2]}}var i=n.inverse(t,!0);if(i.z=t.z||0,d){var o=r.transformMat4(a.vec3AsArray(),[i.x,i.y,i.z],d);i={x:o[0],y:o[1],z:o[2]}}return i},this.forward=function(t){return Array.isArray(t)?t.map(m._forward):m._forward(t)},this.inverse=function(t){return Array.isArray(t)?t.map(m._inverse):m._inverse(t)},e=e||{};try{this.source(e.source)}catch(t){console.error("Can't use transform source: "+e.source),this.source("EPSG:4326")}try{this.target(e.target)}catch(t){console.error("Can't use transform target: "+e.target),this.target("EPSG:3857")}return this};d.defs=i.defs,d.lookup=function(t){var e,r,o=n(5638),a=o.Deferred();return i.defs.hasOwnProperty(t)?a.resolve(i.defs[t]):2!==(r=t.split(":")).length||"EPSG"!==r[0].toUpperCase()?a.reject("Invalid projection code").promise():(e=r[1],o.ajax({url:"https://epsg.io/?q="+e+"&format=json"}).done((function(e){var n=(e.results||[])[0];return n&&n.proj4?(i.defs(t,n.proj4),o.when(i.defs[t])):a.reject(e).promise()})))},d.transformCoordinates=function(t,e,n,i){"use strict";if(t===e||Array.isArray(n)&&!n.length)return n;if(Array.isArray(n)&&n.length>=3&&3===i&&!a.isObject(n[0])&&!c.test(t)&&!c.test(e))return d.transformCoordinatesFlatArray3(t,e,n);if(Array.isArray(n)&&n.length&&a.isObject(n[0])&&"x"in n[0]&&"y"in n[0]){var r=t.match(u),o=e.match(u);if(r&&o&&r[1]===o[1]&&r[3]===o[3])return"z"in n[0]?n.map((function(t){return{x:+t.x,y:-t.y,z:+t.z||0}})):n.map((function(t){return{x:+t.x,y:-t.y}}))}var s,l=d({source:t,target:e});return a.isObject(n)&&"x"in n&&"y"in n?(s=l.forward({x:+n.x,y:+n.y,z:+n.z||0},!0),"z"in n?s:{x:s.x,y:s.y}):Array.isArray(n)&&1===n.length&&a.isObject(n[0])&&"x"in n[0]&&"y"in n[0]?(s=l.forward({x:+n[0].x,y:+n[0].y,z:+n[0].z||0},!0),"z"in n[0]?[s]:[{x:s.x,y:s.y}]):d.transformCoordinatesArray(l,n,i)},d.transformCoordinatesArray=function(t,e,n){var i,r,o,s,l,u,c,d,h,f={};function p(){if(Array.isArray(e[0]))if(2===e[0].length)s=function(t){return+e[t][0]},l=function(t){return+e[t][1]},c=function(t,e,n){d[t]=[e,n]};else{if(3!==e[0].length)throw new Error("Invalid coordinates. Requires two or three components per array");s=function(t){return+e[t][0]},l=function(t){return+e[t][1]},u=function(t){return+e[t][2]},c=function(t,e,n,i){d[t]=[e,n,i]}}else if(2===e.length)o=2,s=function(t){return+e[t*o]},l=function(t){return+e[t*o+1]},c=function(t,e,n){d[t]=e,d[t+1]=n};else if(3===e.length)o=3,s=function(t){return+e[t*o]},l=function(t){return+e[t*o+1]},u=function(t){return+e[t*o+2]},c=function(t,e,n,i){d[t]=e,d[t+1]=n,d[t+2]=i};else{if(!n)throw new Error("Invalid coordinates");if(2!==n&&3!==n)throw new Error("Number of components should be two or three");o=n,s=function(t){return+e[t]},l=function(t){return+e[t+1]},2===n?c=function(t,e,n){d[t]=e,d[t+1]=n}:(u=function(t){return+e[t+2]},c=function(t,e,n,i){d[t]=e,d[t+1]=n,d[t+2]=i})}}if(u=function(){return 0},!Array.isArray(e))throw new Error("Coordinates are not valid");if((d=[]).length=e.length,r=e.length,!e.length)return d;for(Array.isArray(e[0])||a.isObject(e[0])?(o=1,Array.isArray(e[0])?p():a.isObject(e[0])&&function(){if(!(e[0]&&"x"in e[0]&&"y"in e[0]))throw new Error("Invalid coordinates");s=function(t){return+e[t].x},l=function(t){return+e[t].y},"z"in e[0]?(u=function(t){return+e[t].z},c=function(t,e,n,r){d[i]={x:e,y:n,z:r}}):c=function(t,e,n){d[t]={x:e,y:n}}}()):p(),i=0;i<r;i+=o)f.x=s(i),f.y=l(i),f.z=u(i),h=t.forward(f,!0),c(i,h.x,h.y,h.z);return d},d.transformCoordinatesFlatArray3=function(t,e,n){"use strict";var r,o=t.match(u),a=e.match(u);if(o&&a&&o[1]===a[1]&&o[3]===a[3]){for(r=n.length-3+1;r>=0;r-=3)n[r]*=-1;return n}var s,l=i.Proj(t),c=i.Proj(e),d={},h=new i(l,c);for(r=n.length-3;r>=0;r-=3)d.x=+n[r],d.y=+n[r+1],d.z=+(n[r+2]||0),s=h.forward(d,!0),n[r]=s.x,n[r+1]=s.y,n[r+2]=void 0===s.z?d.z:s.z;return n},d.affineForward=function(t,e){"use strict";var n,i=t.origin,r=t.scale||{x:1,y:1,z:1};for(n=0;n<e.length;n+=1)e[n].x=(e[n].x-i.x)*r.x,e[n].y=(e[n].y-i.y)*r.y,e[n].z=((e[n].z||0)-(i.z||0))*r.z;return e},d.affineInverse=function(t,e){"use strict";var n,i=t.origin,r=t.scale||{x:1,y:1,z:1};for(n=0;n<e.length;n+=1)e[n].x=e[n].x/r.x+i.x,e[n].y=e[n].y/r.y+i.y,e[n].z=(e[n].z||0)/r.z+(i.z||0);return e},d.sphericalDistance=function(t,e,n,r,o){if(r=r||"EPSG:4326",o=o||i.WGS84,(n=n||r)!==r){var a=d.transformCoordinates(n,r,[t,e]);t=a[0],e=a[1]}var s=t.y*Math.PI/180,l=e.y*Math.PI/180,u=(e.x-t.x)*Math.PI/180,c=Math.sin(s),h=Math.cos(s),f=Math.sin(l),p=Math.cos(l),m=Math.atan2(Math.pow(Math.pow(p*Math.sin(u),2)+Math.pow(h*f-c*p*Math.cos(u),2),.5),c*f+h*p*Math.cos(u));return o.a*m},d.vincentyDistance=function(t,e,n,r,o,a){if(r=r||"EPSG:4326",o=o||i.WGS84,a=a||100,(n=n||r)!==r){var s=d.transformCoordinates(n,r,[t,e]);t=s[0],e=s[1]}var l,u,c,h,f,p,m,g,v,y,x=o.a,b=o.b||o.a*(1-(o.f||1/o.rf)),_=o.f||(o.rf?1/o.rf:1-b/x),w=t.y*Math.PI/180,M=e.y*Math.PI/180,A=((e.x-t.x)%360+360)%360*Math.PI/180,T=Math.atan((1-_)*Math.tan(w)),C=Math.atan((1-_)*Math.tan(M)),E=Math.sin(T),S=Math.cos(T),k=Math.sin(C),P=Math.cos(C),O=A,R=A+2*Math.PI;if(w===M&&!A)return{distance:0,alpha1:0,alpha2:0};for(y=a;y>0&&Math.abs(O-R)>1e-12;y-=1)l=Math.pow(Math.pow(P*Math.sin(O),2)+Math.pow(S*k-E*P*Math.cos(O),2),.5),u=E*k+S*P*Math.cos(O),c=Math.atan2(l,u),h=S*P*Math.sin(O)/l,R=O,O=A+(1-(m=_/16*(f=1-Math.pow(h,2))*(4+_*(4-3*f))))*_*h*(c+m*l*((p=u-(f?2*E*k/f:0))+m*u*(2*Math.pow(p,2)-1)));return y?{distance:b*(1+(g=f*(x*x-b*b)/(b*b))/16384*(4096+g*(g*(320-175*g)-768)))*(c-(v=g/1024*(256+g*(g*(74-47*g)-128)))*l*(p+v/4*(u*(2*Math.pow(p,2)-1)-v/6*p*(4*l*l-3)*(4*Math.pow(p,2)-3)))),alpha1:Math.atan2(P*Math.sin(O),S*k-E*P*Math.cos(O)),alpha2:Math.atan2(S*Math.sin(O),-E*P+S*k*Math.cos(O))}:void 0},d.proj4=i,t.exports=d},3762:function(t){t.exports={}},9219:function(t,e,n){var i=n(2531).d3,r=n(9450),o=n(5699),a=n(4647).registerWidget,s=n(4634),l=n(1946);n(2352);var u=function t(e){"use strict";if(!(this instanceof t))return new t(e);r.call(this,e);var n=this,o=[],a=e.width||300,u=e.ticks||6,d=this._init;return this._init=function(){d();var t=n.canvas();i.select(t).attr("class","color-legend-container"),n.popup=i.select(t).append("div").attr("class","color-legend-popup"),e.categories&&n.categories(e.categories)},this._draw=function(){if(i.select(n.canvas()).selectAll("div.geojs-color-legends").remove(),o.length){i.select(n.canvas()).style("display","block");var t=i.select(n.canvas()).append("div").attr("class","geojs-color-legends"),e=a;o.forEach((function(i,r){var o=t.append("div").attr("class","geojs-color-legend");o.append("div").attr("class","geojs-title").text(i.name);var a=o.append("svg").attr({class:"svg",width:e,height:"40px",viewBox:"-20 0 "+e+" 40"});"discrete"===i.type?n._drawDiscrete(a,e-40,i):"continuous"===i.type&&n._drawContinous(a,e-40,i)}))}else i.select(n.canvas()).style("display","none")},this.categories=function(t){return void 0===t?o:(o=n._prepareCategories(t),n._draw(),n)},this.addCategories=function(t){return o=o.concat(n._prepareCategories(t)),n._draw(),n},this.removeCategories=function(t){return o=o.filter((function(e){return-1===t.indexOf(e)})),n._draw(),n},this._prepareCategories=function(t){return t.forEach((function(t){t.color=t.colors.map((function(t){return s.convertColorToHex(t,!0)}))})),t},this._drawDiscrete=function(t,e,r){if(-1===["linear","log","sqrt","pow","quantile","ordinal"].indexOf(r.scale))throw new Error("unsupported scale");var o,a,l,d,h,f,p;if("ordinal"===r.scale)l=i.scale.ordinal().domain(r.domain).range(r.colors),n._renderDiscreteColors(t,r.domain,l,e,(function(t){return t})),d=i.scale.ordinal().domain(r.domain).rangeRoundBands([0,e]),h=i.svg.axis().scale(d).tickValues((function(){var t=Math.ceil(r.domain.length/u);return r.domain.filter((function(e,n){return n%t==0}))}));else if("quantile"===r.scale){o=[0,r.colors.length],f=s.range(0,r.colors.length-1),a=i.scale.quantile().domain(r.domain).range(f),l=i.scale.quantize().domain(o).range(r.colors),n._renderDiscreteColors(t,f,l,e,(function(t){return a.invertExtent(t).join(" - ")}));var m=[a.invertExtent(0)[0]];m=m.concat(f.map((function(t){return a.invertExtent(t)[1]}))),h=v(d=i.scale.ordinal().domain(m).rangePoints([0,e]))}else if(-1!==["linear","log","sqrt","pow"].indexOf(r.scale)){o=[0,r.colors.length],a=i.scale[r.scale]().domain(r.domain).range(o).nice(),l=i.scale.quantize().domain(o).range(r.colors),f=s.range(0,r.colors.length-1);var g=Math.max.apply(null,r.domain.map((function(t){return c(t)})));n._renderDiscreteColors(t,f,l,e,(function(t){return n._popupFormatter(a.invert(t),g)+" - "+n._popupFormatter(a.invert(t+1),g)})),(p=f.slice()).push(r.colors.length),h=v(d=i.scale.ordinal().domain(p.map((function(t){return a.invert(t)}))).rangePoints([0,e]))}function v(t){return i.svg.axis().scale(t).tickFormat(i.format(".2s")).tickValues((function(){var e=Math.ceil(t.domain().length/u);return t.domain().filter((function(t,n){return n%e==0}))}))}r.endAxisLabelOnly&&h.tickValues([d.domain()[0],d.domain()[d.domain().length-1]]),n._renderAxis(t,h)},this._renderDiscreteColors=function(t,e,i,r,o){t.selectAll("rect").data(e).enter().append("rect").attr("width",r/e.length).attr("height","20px").attr("fill",(function(t){return i(t)})).attr("transform",(function(t,n){return"translate("+n*r/e.length+" ,0)"})).on("mousemove",(function(t){n._showPopup(o(t))})).on("mouseout",n._hidePopup)},this._drawContinous=function(t,e,r){var o,a,s;if(-1===["linear","log","sqrt","pow"].indexOf(r.scale))throw new Error("unsupported scale");var d=[0];for(s=1;s<r.domain.length-1;s++)d.push(e/(r.domain.length-1)*s);d.push(e),o=i.scale[r.scale]().domain(r.domain).range(d).nice(),"log"===r.scale&&r.base&&o.base(r.base),"pow"===r.scale&&r.exponent&&o.exponent(r.exponent);var h=l(),f=Math.max.apply(null,r.domain.map((function(t){return c(t)}))),p=t.append("defs").append("linearGradient").attr("id","gradient"+h);for(p.append("stop").attr("offset","0%").attr("stop-color",r.colors[0]),s=1;s<r.colors.length-1;s++)p.append("stop").attr("offset",(100/(r.colors.length-1)*s).toFixed(6)+"%").attr("stop-color",r.colors[s]);p.append("stop").attr("offset","100%").attr("stop-color",r.colors[r.colors.length-1]),t.append("rect").attr("fill","url(#gradient"+h+")").attr("width",e).attr("height","20px").on("mousemove",(function(){var t=o.invert(i.mouse(this)[0]),e=n._popupFormatter(t,f);n._showPopup(e)})).on("mouseout",n._hidePopup),a=i.svg.axis().scale(o).ticks(u,".2s"),r.endAxisLabelOnly&&a.tickValues([r.domain[0],r.domain[r.domain.length-1]]),n._renderAxis(t,a)},this._renderAxis=function(t,e){t.append("g").attr("class","axis x").attr("transform","translate(0, 20)").call((function(t){t.call(e)}))},this._popupFormatter=function(t,e){return t=parseFloat(t.toFixed(8)),e=Math.min(e,c(t)),e=Math.min(e,Math.max(3,7-Math.trunc(t).toString().length)),i.format("."+e+"f")(t)},this._showPopup=function(t){var e=i.mouse(n.canvas());n.popup.text(t);var r=n.canvas().clientWidth,o=n.popup[0][0].clientWidth;n.popup.style({left:e[0]-(e[0]+o-r>-10?o:0)+"px",top:e[1]-22+"px"}).transition().duration(200).style("opacity",1)},this._hidePopup=function(){n.popup.transition().duration(200).style("opacity",0)},this};function c(t){if(!isFinite(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;){if(!isFinite(t*e))return 0;e*=10,n++}return n}o(u,r),a("dom","colorLegend",u),t.exports=u},9450:function(t,e,n){var i=n(8123),r=n(5699),o=n(4647).registerWidget,a=function t(e){"use strict";if(!(this instanceof t))return new t(e);i.call(this,e);var n=this;return this._init=function(){return e.hasOwnProperty("parent")&&e.parent.addChild(n),n._createCanvas(),n._appendCanvasToParent(),n.canvas().addEventListener("mousedown",(function(t){t.stopPropagation()})),n.reposition(),n},this._createCanvas=function(){n.canvas(document.createElement(e.el||"div"))},this};r(a,i),o("dom","dom",a),t.exports=a},253:function(t,e,n){t.exports={colorLegendWidget:n(9219),domWidget:n(9450),legendWidget:n(4364),scaleWidget:n(3362),sliderWidget:n(7093),svgWidget:n(9731),uiLayer:n(6408),widget:n(8123)}},4364:function(t,e,n){var i=n(9731),r=n(5699),o=n(4647).registerWidget,a=function t(e){"use strict";if(!(this instanceof t))return new t(e);i.call(this,e);var r=n(2531).d3,o=n(5108),a=this,s=[],l=null,u=null,c=null;this.categories=function(t){return void 0===t?s.slice():(s=t.slice().map((function(t){return"line"===t.type&&(t.style.fill=!1,t.style.stroke=!0),t})),a.draw(),a)},this.size=function(){var t,e=1,n=r.select(a.canvas()).append("text").style("opacity",1e-6);return s.forEach((function(t){n.text(t.name),e=Math.max(e,n.node().getBBox().width)})),n.remove(),t=20*(s.length+1),{width:e+50,height:t}},this.draw=function(){function t(t){t.style("fill",(function(t){return t.style.fill||void 0===t.style.fill?t.style.fillColor:"none"})).style("fill-opacity",(function(t){return void 0===t.style.fillOpacity?1:t.style.fillOpacity})).style("stroke",(function(t){return t.style.stroke||void 0===t.style.stroke?t.style.strokeColor:"none"})).style("stroke-opacity",(function(t){return void 0===t.style.strokeOpacity?1:t.style.strokeOpacity})).style("stroke-width",(function(t){return void 0===t.style.strokeWidth?1.5:t.style.strokeWidth}))}a._init(),c.attr("height",a.size().height+24).style("display",null);var e=a._scale(),n=u.selectAll("g.geo-label").data(s,(function(t){return t.name})).enter().append("g").attr("class","geo-label").attr("transform",(function(t,n){return"translate(0,"+e.y(n)+")"}));return t(n.filter((function(t){return"point"!==t.type&&"line"!==t.type})).append("rect").attr("x",0).attr("y",-6).attr("rx",5).attr("ry",5).attr("width",40).attr("height",12)),t(n.filter((function(t){return"point"===t.type})).append("circle").attr("cx",20).attr("cy",0).attr("r",6)),t(n.filter((function(t){return"line"===t.type})).append("line").attr("x1",0).attr("y1",0).attr("x2",40).attr("y2",0)),n.append("text").attr("x","50px").attr("y",0).attr("dy","0.3em").text((function(t){return t.name})),a.reposition(),a},this._scale=function(){return{x:r.scale.linear().domain([0,1]).range([0,a.size().width]),y:r.scale.linear().domain([0,s.length-1]).range([6,a.size().height-6])}},this._init=function(){l||(a._createCanvas(),a._appendCanvasToParent());var t=a.size().width+24+4,e=a.size().height+24+4;l&&l.remove(),r.select(a.canvas()).attr("width",t).attr("height",e),l=r.select(a.canvas()).append("g"),u=l.append("g").attr("transform","translate("+[14,14]+")"),c=u.append("rect").attr("x",-12).attr("y",-12).attr("width",t-4).attr("height",e-4).attr("rx",3).attr("ry",3).style({stroke:"black","stroke-width":"1.5px",fill:"white","fill-opacity":.75,display:"none"}),u.on("mousedown",(function(){r.event.stopPropagation()})),u.on("mouseover",(function(){c.transition().duration(250).style("fill-opacity",1)})),u.on("mouseout",(function(){c.transition().duration(250).style("fill-opacity",.75)})),a.reposition()},this.geoOn(o.resize,(function(){a.draw()}))};r(a,i),o("dom","legend",a),t.exports=a},3362:function(t,e,n){var i=n(5638),r=n(5699),o=n(9731),a=n(4647).registerWidget;n(4129);var s=function t(e){"use strict";if(!(this instanceof t))return new t(e);o.call(this,e);var r=n(5108),a=n(6853),s=n(4634),l=n(2531).d3,u=this,c=this._exit,d=i.extend({},{scale:1,maxWidth:200,maxHeight:"left"===e.orientation||"right"===e.orientation?200:20,orientation:"bottom",strokeWidth:2,tickLength:10,units:"si",distance:function(t,e,n){return"+proj=longlat +axis=enu"===n?Math.sqrt(s.distance2dSquared(t,e)):a.sphericalDistance(t,e,n)}},e);this._init=function(){return u._createCanvas(),u._appendCanvasToParent(),u.reposition(),l.select(u.canvas()).attr({width:d.maxWidth,height:d.maxHeight}),u.geoOn(r.pan,u._update),u._render(),u},this._exit=function(){u.geoOff(r.pan,u._update),c()},this._vertical=function(){return"left"===d.orientation||"right"===d.orientation},this._scaleValue=function(e,n,i){var r,o,a,s=[{multiple:1,digits:1},{multiple:1.5,digits:2},{multiple:2,digits:1},{multiple:3,digits:1},{multiple:5,digits:1},{multiple:8,digits:1}],l=(i=t.unitsTable[i]||i||t.unitsTable[d.units]||d.units)[0];return i.forEach((function(t){e>=t.scale*(t.minimum||1)&&(l=t)})),o=Math.floor(Math.log(e/l.scale)/Math.log(l.basis||10)),(s=l.multiples||s).forEach((function(t){var n=l.scale*t.multiple*Math.pow(10,o);n<=e&&(r=t,a=n)})),{html:(r.multiple*Math.pow(10,o)).toFixed(Math.max(0,-o+r.digits-1))+" "+l.unit,value:a,pixels:a/e*n,power:o,multiple:r,unitRecord:l,originalValue:e,originalPixels:n}},this._render=function(){var t,e,n,r,o,a,s=l.select(u.canvas()),c=u.layer().map(),h=d.maxWidth,f=d.maxHeight,p=d.strokeWidth,m=.5*p,g=d.tickLength,v=u._vertical();if(t=(v?d.maxHeight:d.maxWidth)-p,n={x:(e={x:(e=i(s[0][0]).offset()).left+("left"===d.orientation?h-m:m),y:e.top+("top"===d.orientation?f-m:m)}).x+(v?0:t),y:e.y+(v?t:0)},(r=d.distance(c.displayToGcs(e,null),c.displayToGcs(n,null),c.gcs())*d.scale)<=0||!isFinite(r))console.warn("The distance calculated for the scale is invalid: "+r);else{switch(o=u._scaleValue(r,t),v?f=o.pixels+p:h=o.pixels+p,s.attr({width:h,height:f}),s.select("polyline").empty()&&s.append("polyline").classed("geojs-scale-widget-bar",!0).attr({fill:"none","stroke-width":p}),s.select("text").empty()&&s.append("text").classed("geojs-scale-widget-text",!0),d.orientation){case"bottom":a=[[m,g],[m,m],[h-m,m],[h-m,g]],s.select("text").attr({x:h/2,y:2*p,"text-anchor":"middle","dominant-baseline":"hanging"});break;case"top":a=[[m,f-g],[m,f-m],[h-m,f-m],[h-m,f-g]],s.select("text").attr({x:h/2,y:f-2*p,"text-anchor":"middle","dominant-baseline":"alphabetic"});break;case"left":a=[[h-g,m],[h-m,m],[h-m,f-m],[h-g,f-m]],s.select("text").attr({x:h-2*p,y:f/2,"text-anchor":"end","dominant-baseline":"middle"});break;case"right":a=[[g,m],[m,m],[m,f-m],[g,f-m]],s.select("text").attr({x:2*p,y:f/2,"text-anchor":"start","dominant-baseline":"middle"})}s.select("polyline").attr("points",a.map((function(t){return t.join(",")})).join(" ")),s.select("text").html(o.html)}},this._update=function(){u._render()},this.options=function(t,e){if(void 0===t){var n=i.extend({},d);return n.position=u.position(void 0,!0),n}return"string"==typeof t&&void 0===e?"position"===t?u.position(void 0,!0):d[t]:(void 0===e?d=i.extend(!0,d,t):d[t]=e,(t.position||"position"===t)&&u.position(t.position||e),u._render(),u)}};r(s,o),s.unitsTable={si:[{unit:"nm",scale:1e-9},{unit:"μm",scale:1e-6},{unit:"mm",scale:.001},{unit:"m",scale:1},{unit:"km",scale:1e3}],miles:[{unit:"in",scale:.0254},{unit:"in",scale:.0254,basis:12,multiples:[{multiple:1,digits:1},{multiple:1.5,digits:2},{multiple:2,digits:1},{multiple:3,digits:1},{multiple:6,digits:1},{multiple:9,digits:1}]},{unit:"ft",scale:.3048},{unit:"mi",scale:1609.344}],decmiles:[{unit:"mi",scale:1609.344}]},s.areaUnitsTable={si:[{unit:"nm²",scale:1e-18},{unit:"μm²",scale:1e-12},{unit:"mm²",scale:1e-6},{unit:"m²",scale:1},{unit:"km²",scale:1e6}],hectares:[{unit:"ha",scale:1e4}],decmiles:[{unit:"mi²",scale:2589988.110336}],miles:[{unit:"in²",scale:64516e-8},{unit:"ft²",scale:.09290304},{unit:"mi²",scale:2589988.110336}],acres:[{unit:"pl",scale:25.29285264},{unit:"rd",scale:1011.7141056},{unit:"ac",scale:4046.8564224}]},s.formatUnit=function(t,e,n,i){if(null!=t){if(!Array.isArray(e)){if(!(n=n||s.unitsTable)||!n[e||"si"])return;e=n[e||"si"]}var r;for(r=0;r<e.length-1&&!(t<e[r+1].scale);r+=1);if(t/=(e=e[r]).scale,!((i=Math.max(0,-Math.ceil(Math.log10(t))+(void 0===i||i<0?3:i)))>10)){var o=t.toFixed(i);if(i){for(;"0"===o.substr(o.length-1);)o=o.substr(0,o.length-1);"."===o.substr(o.length-1)&&(o=o.substr(0,o.length-1))}return o+" "+e.unit}}},a("dom","scale",s),t.exports=s},7093:function(t,e,n){var i=n(9731),r=n(5699),o=n(4647).registerWidget,a=function t(e){"use strict";if(!(this instanceof t))return new t(e);i.call(this,e);var r,o,a,s,l,u,c,d=n(2531).d3,h=n(5108),f=this,p=this._exit,m=e.width||20,g=e.height||160,v=e.width?.5*e.width:10;function y(t,e,n,i,r){var o=e.append("g"),a=r/1024;return o.append("g").append("g").attr("transform","translate("+n+","+i+") scale("+a+") translate(-512,-512)").append("path").attr("d",t).attr("class","geo-glyphicon"),o}c={white:"#f4f4f4",black:"#505050"},this.size=function(){return{width:m,height:g}},this._init=function(){f._createCanvas(),f._appendCanvasToParent(),f.reposition();var t=d.select(f.canvas()),e=f.layer().map();function n(n,i){var r=o.invert(d.mouse(t.node())[1]),a=e.zoomRange();r=(1-r)*(a.max-a.min)+a.min,i?e.transition({zoom:r,ease:d.ease("cubic-in-out"),duration:500,done:f._update()}):(e.zoom(r),f._update()),n.stopPropagation()}function i(){d.select(this).attr("filter",null),u.selectAll("circle,rect,path").transition().duration(100).style("fill",(function(t){return c[t.fill]||null})).style("stroke",(function(t){return c[t.stroke]||null}))}return t.attr("width",m).attr("height",g),r=d.scale.linear().domain([-4,4]).range([0,m]),o=d.scale.linear().domain([0,1]).range([1.5*m,g-1.5*m]),t=t.append("g").classed("geo-ui-slider",!0),u=t,(a=t.append("g")).append("circle").datum({fill:"white",stroke:null}).classed("geo-zoom-in",!0).attr("cx",r(0)).attr("cy",o(0)-m+2).attr("r",(m-2)/2).style({cursor:"pointer"}).on("click",(function(){var t=e.zoom();e.transition({zoom:t+1,ease:d.ease("cubic-in-out"),duration:500})})).on("mousedown",(function(){d.event.stopPropagation()})),y("M512 81.92c-237.568 0-430.080 192.614-430.080 430.080 0 237.568 192.563 430.080 430.080 430.080s430.080-192.563 430.080-430.080c0-237.517-192.563-430.080-430.080-430.080zM564.326 564.326v206.182h-104.653v-206.182h-206.234v-104.653h206.182v-206.234h104.704v206.182h206.182v104.704h-206.182z",a,r(0),o(0)-m+2,m+4).style("cursor","pointer").style("pointer-events","none").select("path").datum({fill:"black",stroke:null}),(s=t.append("g")).append("circle").datum({fill:"white",stroke:null}).classed("geo-zoom-out",!0).attr("cx",r(0)).attr("cy",o(1)+m-2).attr("r",(m-2)/2).style({cursor:"pointer"}).on("click",(function(){var t=e.zoom();e.transition({zoom:t-1,ease:d.ease("cubic-in-out"),duration:500})})).on("mousedown",(function(){d.event.stopPropagation()})),y("M512 81.92c-237.568 0-430.080 192.614-430.080 430.080 0 237.568 192.563 430.080 430.080 430.080s430.080-192.563 430.080-430.080c0-237.517-192.563-430.080-430.080-430.080zM770.56 459.674v104.704h-517.12v-104.704h517.12z",s,r(0),o(1)+m-2,m+4).style("cursor","pointer").style("pointer-events","none").select("path").datum({fill:"black",stroke:null}),t.append("rect").datum({fill:"white",stroke:"black"}).classed("geo-zoom-track",!0).attr("x",r(0)-m/6).attr("y",o(0)).attr("rx",m/10).attr("ry",m/10).attr("width",m/3).attr("height",g-3*m).style({cursor:"pointer"}).on("click",(function(){n(d.event,!0)})),l=t.append("rect").datum({fill:"black",stroke:null}).classed("geo-zoom-nub",!0).attr("x",r(-4)).attr("y",o(.5)-v/2).attr("rx",3).attr("ry",3).attr("width",m).attr("height",v).style({cursor:"pointer"}).on("mousedown",(function(){d.select(document).on("mousemove.geo.slider",(function(){n(d.event)})),d.select(document).on("mouseup.geo.slider",(function(){n(d.event),d.select(document).on(".geo.slider",null)})),d.event.stopPropagation()})),u.selectAll("*").on("mouseover",(function(){d.select(this).attr("filter","url(#geo-highlight)"),u.selectAll("rect,path,circle").transition().duration(100).style("fill",(function(t){return t.fill||null})).style("stroke",(function(t){return t.stroke||null}))})).on("mouseout",i),f.geoOn(h.zoom,f._update),i(),f._update(),f},this._exit=function(){f.geoOff(h.zoom,f._update),u.remove(),p()},this._update=function(t){var e=f.layer().map(),n=e.zoomRange(),i=e.zoom(),r=d.scale.linear();i=(t=t||{}).value||i,r.domain([n.min,n.max]).range([1,0]).clamp(!0),l.attr("y",o(r(i))-v/2)}};r(a,i),o("dom","slider",a),t.exports=a},9731:function(t,e,n){var i=n(8123),r=n(5699),o=n(4647).registerWidget,a=function t(e){"use strict";if(!(this instanceof t))return new t(e);i.call(this,e);var r=n(2531),o=this,a=this._exit,s=null;return this._init=function(){var t;return e.hasOwnProperty("parent")&&(e.parent.addChild(o),t=e.parent.canvas()),o._createCanvas(t),o.canvas().addEventListener("mousedown",(function(t){t.stopPropagation()})),o.reposition(),o},this._exit=function(){s&&s._exit(),a()},this._createCanvas=function(t){var e={layer:o.layer(),widget:!0};t&&(e.d3Parent=t),(s=r(e))._resize=function(){},o.canvas(s.canvas()[0][0])},this};r(a,i),o("dom","svg",a),t.exports=a},6408:function(t,e,n){var i=n(5699),r=n(4647).registerLayer,o=n(9105),a=function t(e){"use strict";var i=n(4647).createWidget;if(e.renderer="dom",e.sticky=!1,!(this instanceof t))return new t(e);o.call(this,e);var r=this,a=this._exit;this.createWidget=function(t,e){var n=i(t,r,e);return e&&"parent"in e||r.addChild(n),n._init(e),r.modified(),n},this.deleteWidget=function(t){return t._exit(),r.removeChild(t),r.modified(),r},this._exit=function(){r.children().forEach((function(t){r.deleteWidget(t)})),a()}};i(a,o),r("ui",a),t.exports=a},8123:function(t,e,n){var i=n(5699),r=n(5358),o=n(5638),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},r.call(this,e);var i=n(5108),a=this,s=this._exit,l=e.layer,u=null,c=void 0===e.position?{left:0,top:0}:e.position;if(!(void 0===e.parent||e.parent instanceof t))throw new Error("Parent must be of type geo.gui.widget");e.parent&&a.parent(e.parent),this._init=function(){return a.modified(),a},this._exit=function(){if(a.children().forEach((function(t){a.removeChild(t),t._exit()})),a.layer().geoOff(i.pan,a.repositionEvent),a.parentCanvas().removeChild&&a.canvas())try{a.parentCanvas().removeChild(a.canvas())}catch(t){}s()},this.layer=function(){return l||a.parent()&&a.parent().layer()},this._createCanvas=function(){throw new Error("Must be defined in derived classes")},this.canvas=function(t){return void 0===t?u:(u=t,a)},this._appendCanvasToParent=function(){a.parentCanvas().appendChild(a.canvas())},this.parentCanvas=function(){return a.parent()?a.parent().canvas():a.layer().canvas()},this.position=function(t,e){if(void 0!==t){a.layer().geoOff(i.pan,a.repositionEvent);var n={};for(var r in c)c.hasOwnProperty(r)&&(n[r]=null);return(c=t).hasOwnProperty("x")&&c.hasOwnProperty("y")&&a.layer().geoOn(i.pan,a.repositionEvent),a.reposition(o.extend(n,a.position())),a}if(c.hasOwnProperty("x")&&c.hasOwnProperty("y")&&!e){var s=a.layer().map().gcsToDisplay(c);return{left:s.x,top:s.y,right:null,bottom:null}}return c},this.reposition=function(t){if(t=t||a.position(),a.canvas()&&a.canvas().style)for(var e in a.canvas().style.position="absolute",t)t.hasOwnProperty(e)&&(/^\s*(-|\+)?(\d+(\.\d*)?|\d*\.\d+)([eE](-|\+)?\d+)?\s*$/.test(t[e])?a.canvas().style[e]=parseFloat(parseFloat(t[e]).toFixed(3))+"px":a.canvas().style[e]=t[e]);return a},this.repositionEvent=function(){return a.reposition()},this.isInViewport=function(){var t=a.position(),e=a.layer();return t.left>=0&&t.top>=0&&t.left<=e.width()&&t.top<=e.height()},c.hasOwnProperty("x")&&c.hasOwnProperty("y")&&this.layer().geoOn(i.pan,a.repositionEvent)};i(a,r),t.exports=a},9808:function(t,e,n){var i=n(5638);function r(t,e,n){this._group=t,this._zoom=e,this._points=[],this._clusters=[],this._count=0,this._parent=null,this._coord=null;var i=this;(n||[]).forEach((function(t){i._add(t)}))}function o(t){var e,o,a=n(5844);for(this._opts=i.extend({maxZoom:18,radius:5},t),this._clusters={},this._points={},e=this._opts.maxZoom;e>=0;e-=1)o=this._opts.radius*Math.pow(2,-e),this._clusters[e]=new a(o),this._points[e]=new a(o);this._topClusterLevel=new r(this,-1)}r.prototype._add=function(t){var e=1;t instanceof r?(this._clusters.push(t),e=t._count):this._points.push(t),t._parent=this,this._increment(e)},r.prototype._increment=function(t){this._coord=null,this._count+=t,this._parent&&this._parent._increment(t)},r.prototype.count=function(){return this._count},r.prototype.each=function(t){var e;for(e=0;e<this._points.length;e+=1)t.call(this,this._points[e],this._zoom);for(e=0;e<this._clusters.length;e+=1)this._clusters[e].each.call(this._clusters[e],t)},r.prototype.coords=function(){var t,e={x:0,y:0};if(this._coord)return this._coord;for(t=0;t<this._points.length;t+=1)e.x+=this._points[t].x,e.y+=this._points[t].y;for(t=0;t<this._clusters.length;t+=1)e.x+=this._clusters[t].coords().x*this._clusters[t].count(),e.y+=this._clusters[t].coords().y*this._clusters[t].count();return{x:e.x/this.count(),y:e.y/this.count()}},o.prototype.addPoint=function(t){var e,n,o,a,s,l;for(e=this._opts.maxZoom;e>=0;e-=1){if(n=this._clusters[e].getNearObject(t))return void n._add(t);if(n=this._points[e].getNearObject(t)){if(o=n._parent)for(l=o._points.length-1;l>=0;l-=1)if(o._points[l]===n){o._points.splice(l,1),o._increment(-1);break}for(o||i.noop(),a=new r(this,e,[n,t]),this._clusters[e].addObject(a,a.coords()),s=a,l=e-1;l>o._zoom;l-=1)s=new r(this,l,[s]),this._clusters[l].addObject(s,s.coords());for(o._add(s),l=e;l>=0&&this._points[l].removeObject(n,n);l-=1);return}this._points[e].addObject(t,t)}this._topClusterLevel._add(t)},o.prototype.points=function(t){return t=Math.min(Math.max(Math.floor(t),0),this._opts.maxZoom-1),this._points[Math.floor(t)].contents()},o.prototype.clusters=function(t){return t=Math.min(Math.max(Math.floor(t),0),this._opts.maxZoom-1),this._clusters[Math.floor(t)].contents()},t.exports=o},7566:function(t,e,n){var i=n(8340),r=n(9552),o={maxCount:1e3,count:0,memo:{}};function a(t,e){return o.count+=1,o.count>=o.maxCount&&(o.memo={},o.count=0),o.memo[t]=e,e}var s={convertColor:function(t){if(null==t||void 0!==t.r&&void 0!==t.g&&void 0!==t.b)return t;if(void 0!==o.memo[t])return o.memo[t];var e,n=t;if("string"==typeof t){var i=t.toLowerCase();if(r.hasOwnProperty(i))t={r:r[i][0]/255,g:r[i][1]/255,b:r[i][2]/255};else if("#"===t.charAt(0))4===t.length||5===t.length?(5===t.length&&(e=parseInt(t.slice(4),16)/15),t=4352*(3840&(t=parseInt(t.slice(1,4),16)))+272*(240&t)+17*(15&t)):7!==t.length&&9!==t.length||(9===t.length&&(e=parseInt(t.slice(7),16)/255),t=parseInt(t.slice(1,7),16));else if("transparent"===i)e=t=0;else if(i.indexOf("(")>=0)for(var l=0;l<s.cssColorConversions.length;l+=1){var u=s.cssColorConversions[l].regex.exec(i);if(u)return a(n,t=s.cssColorConversions[l].process(i,u))}}return isFinite(t)&&(t={r:((16711680&t)>>16)/255,g:((65280&t)>>8)/255,b:(255&t)/255}),void 0!==e&&t&&void 0!==t.r&&(t.a=e),a(n,t)},convertColorAndOpacity:function(t,e,n){return(t=s.convertColor(t))&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b||(t=s.convertColor(n||{r:0,g:0,b:0})),t&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b||(t={r:0,g:0,b:0}),t={r:isFinite(t.r)&&t.r>=0?t.r<=1?+t.r:1:0,g:isFinite(t.g)&&t.g>=0?t.g<=1?+t.g:1:0,b:isFinite(t.b)&&t.b>=0?t.b<=1?+t.b:1:0,a:i.isNonNullFinite(t.a)&&t.a>=0&&t.a<1?+t.a:1},i.isNonNullFinite(e)&&e<1&&(t.a=e<=0?0:t.a*e),t},convertColorToHex:function(t,e){var n,i=s.convertColor(t);return n=i.r||i.g||i.b?"#"+((1<<24)+(Math.round(255*i.r)<<16)+(Math.round(255*i.g)<<8)+Math.round(255*i.b)).toString(16).slice(1):"#000000",void 0!==i.a&&e&&(i.a<1||"needed"!==e)&&(n+=(256+Math.round(255*i.a)).toString(16).slice(1)),n},convertColorToRGBA:function(t){var e=s.convertColor(t);return e||(e={r:0,g:0,b:0}),(!i.isNonNullFinite(e.a)||e.a>1)&&(e.a=1),"rgba("+Math.round(255*e.r)+", "+Math.round(255*e.g)+", "+Math.round(255*e.b)+", "+ +(+e.a).toFixed(5)+")"},cssAngleUnitsBase:{deg:360,grad:400,rad:2*Math.PI,turn:1},cssNumberRegex:"[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:[eE][+-]?\\d+)?"};s.cssColorConversions=[{name:"rgb",regex:new RegExp("^\\s*rgba?\\(\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*,?\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*,?\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*([/,]?\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*)?\\)\\s*$"),process:function(t,e){return t={r:Math.min(1,Math.max(0,+e[1]/(e[2]?100:255))),g:Math.min(1,Math.max(0,+e[3]/(e[4]?100:255))),b:Math.min(1,Math.max(0,+e[5]/(e[6]?100:255)))},e[7]&&(t.a=Math.min(1,Math.max(0,+e[8]/(e[9]?100:1)))),t}},{name:"hsl",regex:new RegExp("^\\s*hsla?\\(\\s*("+s.cssNumberRegex+")\\s*(deg|grad|rad|turn)?\\s*,?\\s*("+s.cssNumberRegex+")\\s*%\\s*,?\\s*("+s.cssNumberRegex+")\\s*%\\s*([/,]?\\s*("+s.cssNumberRegex+")\\s*(%?)\\s*)?\\)\\s*$"),process:function(t,e){var n=function(t,e,n){return 6*(n-=Math.floor(n))<1?t+(e-t)*n*6:6*n<3?e:6*n<4?t+(e-t)*(2/3-n)*6:t},i=+e[1]/(s.cssAngleUnitsBase[e[2]]||360),r=Math.min(1,Math.max(0,+e[3]/100)),o=Math.min(1,Math.max(0,+e[4]/100)),a=o<=.5?o*(r+1):o+r-o*r,l=2*o-a;return t={r:n(l,a,i+1/3),g:n(l,a,i),b:n(l,a,i-1/3)},e[5]&&(t.a=Math.min(1,Math.max(0,+e[6]/(e[7]?100:1)))),t}}],t.exports=s},8340:function(t,e,n){function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}var r=n(5638),o=n(4252);o=o.__esModule?o.default:o;var a,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",u='<svg xmlns="http://www.w3.org/2000/svg"><foreignObject width="100%" height="100%"></foreignObject></svg>',c={},d=200,h=15;function f(){var t;for(t=0;t<arguments.length;t+=1)if(isFinite(arguments[t]))return arguments[t]}var p={pointInPolygon:function(t,e,n,i){return e.outer&&(n=e.inner,e=e.outer),!(e.length<3)&&(!(i&&i.min&&i.max&&(t.x<i.min.x||t.y<i.min.y||t.x>i.max.x||t.y>i.max.y))&&p.distanceToPolygon2d(t,n?{outer:e,inner:n}:e,!0)>0)},pointToTriangleBasis2d:function(t,e,n,i){var r=n.x-e.x,o=i.x-e.x,a=n.y-e.y,s=i.y-e.y,l=t.x-e.x,u=t.y-e.y,c=r*s-o*a;if(c)return{x:(l*s-u*o)/c,y:(l*-a+u*r)/c}},isReadyImage:function(t,e){return!!(t instanceof Image&&t.complete&&t.src&&(t.naturalWidth&&t.naturalHeight||e))},isReadyVideo:function(t,e){return!!(t instanceof HTMLVideoElement&&t.src&&void 0!==t.HAVE_CURRENT_DATA&&(t.videoWidth&&t.videoHeight&&t.readyState>=t.HAVE_CURRENT_DATA||e&&t.error))},isFunction:function(t){return"function"==typeof t},ensureFunction:function(t){return p.isFunction(t)?t:function(){return t}},isNonNullFinite:function(t){return isFinite(t)&&null!==t&&!1!==t&&""!==t},randomString:function(t){var e,n,i;for(t=t||8,e="",n=0;n<t;n+=1)i=Math.floor(Math.random()*l.length),e+=l.substring(i,i+1);return e},normalizeCoordinates:function(t){return t=t||{},Array.isArray(t)?{x:t[0],y:t[1],z:t[2]||0}:{x:f(t.x,t.longitude,t.lng,t.lon,0),y:f(t.y,t.latitude,t.lat,0),z:f(t.z,t.elevation,t.elev,t.height,0)}},range:function(t,e,n){n=n||1;for(var i=[],r=t;r<=e;r+=n)i.push(r);return i},compareArrays:function(t,e){return t.length===e.length&&t.every((function(t,n){return t===e[n]}))},vec3AsArray:function(){return[0,0,0]},mat3AsArray:function(){return[1,0,0,0,1,0,0,0,1]},mat4AsArray:function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},getGeomBuffer:function(t,e,n,i,r){i=void 0===i?.2:i,r=void 0===r?.1:r;var o=t.sourceByName(e),a=o.data(),s=Math.floor((i+1)*n);if((a=o.data())instanceof Float32Array&&(a.length===n||a.length>=n&&a.length<=s))return a;var l=n;return a instanceof Float32Array&&a.length&&n&&r>0&&(l=Math.floor((r+1)*n)),a=new Float32Array(l),o.setData(a),a},adjustActions:function(t){var e,n;for(n=0;n<t.length;n+=1){if(e=t[n],"string"===r.type(e.input)){var i={};i[e.input]=!0,e.input=i}if(e.modifiers||(e.modifiers={}),"string"===r.type(e.modifiers)){var o={};o[e.modifiers]=!0,e.modifiers=o}}},addAction:function(t,e,n){n?t.push(e):t.unshift(e),p.adjustActions(t)},hasAction:function(t,e,n,i){e&&e.action&&(n=e.name,i=e.owner,e=e.action);for(var r=0;r<t.length;r+=1)if(!(e&&t[r].action!==e||n&&t[r].name!==n||i&&t[r].owner!==i))return t[r];return null},removeAction:function(t,e,n,i){var o,a=0;do{(o=p.hasAction(t,e,n,i))&&(t.splice(r.inArray(o,t),1),a+=1)}while(o);return a},actionMatch:function(t,e,n){var i;if(n.some((function(n){for(var r in n.input)if(n.input.hasOwnProperty(r)&&(!1===n.input[r]&&t[r]||n.input[r]&&!t[r]))return!1;for(var o in n.modifiers)if(n.modifiers.hasOwnProperty(o)&&(!1===n.modifiers[o]&&e[o]||n.modifiers[o]&&!e[o]))return!1;return i=n,!0})))return i},pixelCoordinateParams:function(t,e,n,i,o){var a,s,l;t&&(a=(t=r(t)).innerWidth(),s=t.innerHeight()),o=o||n,l=(i=i||e)!==e||o!==n;var u=Math.min(0,Math.floor(Math.log(Math.min((a||i)/i,(s||o)/o))/Math.log(2))),c=Math.ceil(Math.log(Math.max(e/i,n/o))/Math.log(2));return{map:{node:t,ingcs:"+proj=longlat +axis=esu",gcs:"+proj=longlat +axis=enu",maxBounds:{left:0,top:0,right:e,bottom:n},unitsPerPixel:Math.pow(2,c),center:{x:e/2,y:n/2},min:u,max:c,zoom:u,clampBoundsX:!0,clampBoundsY:!0,clampZoom:!0},layer:{maxLevel:c,wrapX:!1,wrapY:!1,tileOffset:function(){return{x:0,y:0}},attribution:"",tileWidth:i,tileHeight:o,tileRounding:Math.ceil,tilesAtZoom:l?function(t){var r=Math.pow(2,c-t);return{x:Math.ceil(e/i/r),y:Math.ceil(n/o/r)}}:void 0,tilesMaxBounds:l?function(t){var i=Math.pow(2,c-t);return{x:Math.floor(e/i),y:Math.floor(n/i)}}:void 0}}},centerFromPerimeter:function(t){var e,n,i,r,o,a;if(t&&t.length){if(1===t.length)return{x:t[0].x,y:t[0].y};for(e={x:0,y:0},o=0,n=t[t.length-1],a=0;a<t.length;a+=1)i=n,n=t[a],r=Math.sqrt(Math.pow(i.x-n.x,2)+Math.pow(i.y-n.y,2)),e.x+=(n.x+i.x)*r,e.y+=(n.y+i.y)*r,o+=2*r;return e.x/=o,e.y/=o,o?e:{x:n.x,y:n.y}}},distance2dSquared:function(t,e){var n=t.x-e.x,i=t.y-e.y;return n*n+i*i},distance2dToLineSquared:function(t,e,n){var i=n.x-e.x,r=n.y-e.y,o=i*i+r*r,a=0;return o&&(a=((t.x-e.x)*i+(t.y-e.y)*r)/o,a=Math.max(0,Math.min(1,a))),p.distance2dSquared(t,{x:e.x+a*i,y:e.y+a*r})},distanceToPolygon2d:function(t,e,n){for(var i,r,o=e.outer||e,a=!1,s=0,l=o.length,u=l-1;s<l;u=s,s+=1){var c=o[s],d=o[u];c.y>t.y!=d.y>t.y&&t.x<(d.x-c.x)*(t.y-c.y)/(d.y-c.y)+c.x&&(a=!a),r=n?1:p.distance2dToLineSquared(t,c,d),(void 0===i||r<i)&&(i=r)}return e.inner&&e.inner.forEach((function(e){var r=p.distanceToPolygon2d(t,e,n);r*r<i&&(i=r*r),r>0&&(a=!a)})),(a?1:-1)*Math.sqrt(i)},triangleTwiceSignedArea2d:function(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)},crossedLineSegmentPolygon2d:function(t,e,n){var i,r,o=n.outer||n,a=o.length;for(i=0,r=a-1;i<a;r=i,i+=1)if(p.crossedLineSegments2d(t,e,o[i],o[r]))return!0;if(n.inner)for(i=0;i<n.inner.length;i+=1)if(p.crossedLineSegmentPolygon2d(t,e,n.inner[i]))return!0;return!1},crossedLineSegments2d:function(t,e,n,i){return!(t.x>n.x&&t.x>i.x&&e.x>n.x&&e.x>i.x||t.x<n.x&&t.x<i.x&&e.x<n.x&&e.x<i.x||t.y>n.y&&t.y>i.y&&e.y>n.y&&e.y>i.y||t.y<n.y&&t.y<i.y&&e.y<n.y&&e.y<i.y)&&(!(t.x===n.x&&t.y===n.y||t.x===i.x&&t.y===i.y||e.x===n.x&&e.y===n.y||e.x===i.x&&e.y===i.y)&&!(p.triangleTwiceSignedArea2d(t,e,n)*p.triangleTwiceSignedArea2d(t,e,i)>0||p.triangleTwiceSignedArea2d(n,i,t)*p.triangleTwiceSignedArea2d(n,i,e)>0))},segmentCrossesLineList2d:function(t,e,n){return n.some((function(n){return n.some((function(i,r){return!!r&&p.crossedLineSegments2d(t,e,n[r-1],i)}))}))},rdpLineSimplify:function(t,e,n,i){if(t.length<=2||e<0)return t;var r,o,a,s=-1,l=e*e;if(n){for(r=1;r<t.length;r+=1)(o=p.distance2dSquared(t[0],t[r]))>s&&(s=o,a=r);return 4*s<=l?t.slice(a,a+1):(t=t.slice(a).concat(t.slice(0,a+1)),(t=p.rdpLineSimplify(t,e,!1,i)).splice(t.length-1),t)}for(r=1;r<t.length-1;r+=1)(o=p.distance2dToLineSquared(t[r],t[0],t[t.length-1]))>s&&(s=o,a=r);if(s<=l&&(!i||!p.segmentCrossesLineList2d(t[0],t[t.length-1],i)))return[t[0],t[t.length-1]];var u=t.slice(0,a+1),c=t.slice(a),d=p.rdpLineSimplify(u,e,!1,i?i.concat([c]):null),h=p.rdpLineSimplify(c,e,!1,i?i.concat([u]):null);return d.slice(0,d.length-1).concat(h)},getMinMaxValues:function(t,e,n,i){if(t.length&&(i||!r.isNumeric(e)||!r.isNumeric(n))){var o,a,s=t[0],l=t[0];for(a=t.length-1;a>0;a-=1)(o=t[a])<s&&(s=o),o>l&&(l=o);(!r.isNumeric(e)||i&&s>e)&&(e=s),(!r.isNumeric(n)||i&&l<n)&&(n=l)}return{min:e,max:n}},wrapAngle:function(t){return(t%=2*Math.PI)<-Math.PI?t+=2*Math.PI:t>=Math.PI&&(t-=2*Math.PI),t},escapeUnicodeHTML:function(t){return t.replace(/./g,(function(t){var e=t.charCodeAt(0);return e<127?t:"&#"+e.toString(10)+";"}))},dereferenceElements:function(t){var e=[];return r("img,image",t).each((function(){var t=r(this),n=t.is("image")?"href":"src";if(t.attr(n)){var i=new Image;("http"===t.attr(n).substr(0,4)||t[0].crossOrigin)&&(i.crossOrigin=t[0].crossOrigin||"anonymous");var o=r.Deferred();i.onload=function(){var e=document.createElement("canvas");e.width=i.naturalWidth,e.height=i.naturalHeight,e.getContext("2d").drawImage(i,0,0),t.attr(n,e.toDataURL("image/png")),"data:image"!==t.attr(n).substr(0,10)&&t.remove(),o.resolve()},i.onerror=function(){t.remove(),o.resolve()},i.src=t.attr(n),e.push(o)}})),e},dereferenceCssUrlsRegex:/url\(["']?(http[^)"']+|[^:)"']+)["']?\)/g,dereferenceCssUrls:function(t,e,n,i,o){var a=[],s=[];if(t=(t=t.replace(/\/\*[^\0]*?\*\//g,"")).replace(/\r/g,"\n").replace(/\s+\n/g,"\n").replace(/\n\s+/g,"\n").replace(/\n\n+/g,"\n"),o){var l=/(^[^?#]*)\/[^?#/]*([?#]|$)/g.exec(o);o=l&&l[1]?l[1]+"/":null}t.replace(p.dereferenceCssUrlsRegex,(function(t,e){var n=a.length,i=r.Deferred(),l=new XMLHttpRequest;return a.push(i),s.push(""),/^[^/:][^:]*(\/|$)/g.exec(e)&&o&&(e=o+e),l.open("GET",e,!0),l.responseType="arraybuffer",l.onload=function(){if(200===this.status){var t,e=new Uint8Array(this.response),r=new Array(e.length);for(t=0;t<e.length;t+=1)r[t]=String.fromCharCode(e[t]);r=r.join(""),s[n]="url(data:"+l.getResponseHeader("content-type")+";base64,"+btoa(r)+")"}i.resolve()},l.onerror=i.resolve,l.send(),t})),r.when.apply(r,a).then((function(){var r=0;t=t.replace(p.dereferenceCssUrlsRegex,(function(t,e){return s[(r+=1)-1]})),void 0===i?e.text(t):e.style[i]=t,n.resolve()}))},htmlToImageSupported:function(){if(void 0===s){var t=r.Deferred(),e=r(u);e.attr({width:"10px",height:"10px","text-rendering":"optimizeLegibility"}),r("foreignObject",e).append("<div/>");var n=new Image;return n.onload=n.onerror=function(){var e=document.createElement("canvas");e.width=10,e.height=10,e.getContext("2d").drawImage(n,0,0);try{e.toDataURL(),s=!0}catch(t){console.warn("This browser does not support converting HTML to an image via SVG foreignObject. Some functionality will be limited.",t),s=!1}t.resolve(s)},n.src="data:image/svg+xml;base64,"+btoa(p.escapeUnicodeHTML((new XMLSerializer).serializeToString(e[0]))),t}return s},htmlToImage:function(t,e){var n,i=r.Deferred(),o=[p.htmlToImageSupported()],a=r(t);for(t=r(t).clone();e&&e>0;)(a=a.parent()).is("div")&&((n=r("<div>").attr({class:a.attr("class"),id:a.attr("id")}).css({width:"100%",height:"100%",background:"none",margin:0})).append(t),t=n),e-=1;r("canvas",t).remove(),r("*",t).addBack().each((function(){for(var t=this.style,e=0;e<t.length;e+=1){var n=this.style[e];if(this.style[n].match(p.dereferenceCssUrlsRegex)){var i=r.Deferred();p.dereferenceCssUrls(this.style[n],this,i,n),o.push(i)}}})),(n=r('<div xmlns="http://www.w3.org/1999/xhtml">')).css({width:a.width()+"px",height:a.height()+"px"}),n.append(r("<head>"));var s=r("<body>");return n.append(s),s.css({width:a.width()+"px",height:a.height()+"px",background:"none",margin:0}),s.append(t),o=o.concat(p.dereferenceElements(t)),r('style,link[rel="stylesheet"]').each((function(){var t=r('<style type="text/css">'),e=r.Deferred();if(r(this).is("style")){var i=r(this).text();p.dereferenceCssUrls(i,t,e)}else{var a=r(this).attr("href");r.get(a).done((function(n){p.dereferenceCssUrls(n,t,e,void 0,a)})).fail((function(n,i,r){console.warn("Failed to dereference "+a,i,r),t.remove(),e.resolve()}))}o.push(e),r("head",n).append(t)})),r.when.apply(r,o).then((function(){var t=r(u);t.attr({width:a.width()+"px",height:a.height()+"px","text-rendering":"optimizeLegibility"}),r("foreignObject",t).append(n);var e=new Image;p.htmlToImageSupported()?(e.onload=function(){i.resolve(e)},e.onerror=function(){console.warn("Failed to render html to image"),i.reject()},e.src="data:image/svg+xml;base64,"+btoa(p.escapeUnicodeHTML((new XMLSerializer).serializeToString(t[0])))):i.resolve(e)})),i},timeReport:function(t){return r.each(c,(function(t,e){e.count?(e.stddev=Math.sqrt(Math.abs((e.sum2-e.sum*e.sum/e.count)/e.count)),e.average=e.sum/e.count):(e.stddev=0,e.average=0)})),t?c[t]:c},timeFunctionStart:function(t,e){c[t]&&!e||(c[t]={count:0,sum:0,sum2:0,max:0,recent:[]}),c[t].start=window.performance.now()},timeFunctionStop:function(t){if(c[t]&&c[t].start){var e=window.performance.now()-c[t].start;c[t].start=null,c[t].sum+=e,c[t].sum2+=e*e,c[t].count+=1,c[t].max=Math.max(c[t].max,e),c[t].recent.push(e),c[t].recent.length>d&&c[t].recent.splice(0,c[t].recent.length-d)}},timeRequestAnimationFrame:function(t,e,n,i){c.requestAnimationFrame&&!e||(c.requestAnimationFrame={count:0,sum:0,sum2:0,max:0,above_threshold:0,recent:[],recentsub:[]}),n&&(h=n),i&&(d=i),t&&a?(window.requestAnimationFrame=a,a=null):t||a||(a=window.requestAnimationFrame,window.requestAnimationFrame=function(t){return a.call(window,(function(e){var n,i=c.requestAnimationFrame;i.timestamp!==e&&(i.nowDelta=window.performance.now()-e,Math.abs(i.nowDelta)<1e3&&(i.nowDelta=0),i.timestamp=e,i.subcalls=i.subcalls||0,i.start={sum:i.sum,sum2:i.sum2,count:i.count,max:i.max,above_threshold:i.above_threshold},i.recent.push([0]),i.recentsub.push([]),i.recent.length>d&&(i.recent.splice(0,i.recent.length-d),i.recentsub.splice(0,i.recentsub.length-d))),i.subcalls+=1,t.apply(this,arguments);var r=window.performance.now()-e;r-=i.nowDelta,i.sum=i.start.sum+r,i.sum2=i.start.sum2+r*r,i.count=i.start.count+1,i.max=Math.max(i.max,r),i.above_threshold=i.start.above_threshold+(r>=h?1:0),i.recent[i.recent.length-1]=r,(n=i.recentsub[i.recent.length-1]).push({total_duration:r,duration:r-(n.length?n[n.length-1].total_duration:0),callback:t.name||t})}))})},isObject:function(t){var e=i(t);return null!=t&&("object"===e||"function"===e)},radiusEarth:o.WGS84.a};t.exports=p},5844:function(t,e,n){var i=n(5638),r={};r.Util={stamp:function(t){return t._leaflet_id=t._leaflet_id||++r.Util.lastId,t._leaflet_id},lastId:0};var o=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}};o.prototype={addObject:function(t,e){var n=this._getCoord(e.x),i=this._getCoord(e.y),o=this._grid,a=o[i]=o[i]||{},s=a[n]=a[n]||[],l=r.Util.stamp(t);e.obj=t,this._objectPoint[l]=e,s.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var n,i,o=this._getCoord(e.x),a=this._getCoord(e.y),s=this._grid,l=s[a]=s[a]||{},u=l[o]=l[o]||[];for(delete this._objectPoint[r.Util.stamp(t)],n=0,i=u.length;n<i;n++)if(u[n]===t)return u.splice(n,1),1===i&&delete l[o],!0},eachObject:function(t,e){var n,i,r,o,a,s,l=this._grid;for(n in l)for(i in a=l[n])for(r=0,o=(s=a[i]).length;r<o;r++)t.call(e,s[r])&&(r--,o--)},getNearObject:function(t){var e,n,i,o,a,s,l,u,c=this._getCoord(t.x),d=this._getCoord(t.y),h=this._objectPoint,f=this._sqCellSize,p=null;for(e=d-1;e<=d+1;e++)if(o=this._grid[e])for(n=c-1;n<=c+1;n++)if(a=o[n])for(i=0,s=a.length;i<s;i++)l=a[i],(u=this._sqDist(h[r.Util.stamp(l)],t))<f&&(f=u,p=l);return p},contents:function(){return i.map(this._objectPoint,(function(t){return t}))},_getCoord:function(t){return Math.floor(t/this._cellSize)},_sqDist:function(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}},t.exports=o},4634:function(t,e,n){t.exports=Object.assign(n(8340),n(7566),n(9215),n(895),{DistanceGrid:n(5844),ClusterGroup:n(9808),mesh:n(9244)})},9244:function(t,e,n){t.exports={createColoredMesh:function(t,e){var i,r,o,a,s,l=n(5638),u=n(4634),c=t.mesh,d=t.style.get("value"),h=void 0!==t.style("used")?t.style.get("used"):function(t,e){return u.isNonNullFinite(d(t,e))},f={used:h,opacity:t.style.get("opacity"),value:d},p=t._createMesh(e?{}:f,e?f:{});if(p.elementValues=!!e,!p.numVertices||!p.numElements)return p;var m=c.get("stepped")(p),g=c.get("opacityRange")(p),v=c.get("rangeValues")(p);if(p.stepped=!(void 0!==m&&!m),p.colorMap=[],p.minColor=l.extend({a:c.get("minOpacity")(p)||0},u.convertColor(c.get("minColor")(p))),p.maxColor=l.extend({a:c.get("maxOpacity")(p)||0},u.convertColor(c.get("maxColor")(p))),c.get("colorRange")(p).forEach((function(t,e){p.colorMap.push(l.extend({a:g&&void 0!==g[e]?g[e]:1},u.convertColor(t)))})),i=u.getMinMaxValues(p.value,c.get("min")(p),c.get("max")(p)),p.minValue=i.min,p.maxValue=i.max,v&&p.colorMap&&(v.length===p.colorMap.length+1||!m&&v.length===p.colorMap.length)||(v=null),v)for(s=1;s<v.length;s+=1)if(v[s-1]>v[s]){v=null;break}for(v&&(p.minValue=v[0],p.maxValue=v[v.length-1]),(o=p.maxValue-p.minValue)||(p.colorMap=p.colorMap.slice(0,1),o=1,v=null),p.rangeValues=v,p.factor=(p.colorMap.length-(m?0:1))/o,a=0;a<p.value.length;a+=1)if(r=p.value[a],v&&r>=p.minValue&&r<=p.maxValue){for(s=1;s<v.length;s+=1)if(r<=v[s]){p.value[a]=s-1+(r-v[s-1])/(v[s]-v[s-1]);break}}else p.value[a]=(r-p.minValue)*p.factor;return p}}},895:function(t,e,n){var i,r,o=n(5638),a=n(2254);t.exports={},t.exports.mockWebglRenderer=function(t){"use strict";var e=n(320);if(void 0===t&&(t=!0),e._mocked)throw new Error("webgl renderer already mocked");var s={},l=function(t){s[t]=(s[t]||0)+1},u=function(t){return function(){l(t)}},c=0,d=function(t){return function(){return l(t),c+=1}},h={activeTexture:u("activeTexture"),attachShader:u("attachShader"),bindAttribLocation:u("bindAttribLocation"),bindBuffer:u("bindBuffer"),bindFramebuffer:u("bindFramebuffer"),bindTexture:u("bindTexture"),blendFuncSeparate:u("blendFuncSeparate"),bufferData:u("bufferData"),bufferSubData:u("bufferSubData"),checkFramebufferStatus:function(t){if(l("checkFramebufferStatus"),t===e.GL.FRAMEBUFFER)return e.GL.FRAMEBUFFER_COMPLETE},clear:u("clear"),clearColor:u("clearColor"),clearDepth:u("clearDepth"),compileShader:u("compileShader"),createBuffer:d("createBuffer"),createFramebuffer:u("createFramebuffer"),createProgram:d("createProgram"),createShader:d("createShader"),createTexture:d("createTexture"),deleteBuffer:u("deleteBuffer"),deleteProgram:u("deleteProgram"),deleteShader:u("deleteShader"),deleteTexture:u("deleteTexture"),detachShader:u("detachShader"),depthFunc:u("depthFunc"),disable:u("disable"),disableVertexAttribArray:u("disableVertexAttribArray"),drawArrays:u("drawArrays"),enable:u("enable"),enableVertexAttribArray:u("enableVertexAttribArray"),finish:u("finish"),getError:u("getError"),getExtension:d("getExtension"),getParameter:function(t){switch(l("getParameter"),t){case e.GL.ALIASED_POINT_SIZE_RANGE:return[1,64];case e.GL.DEPTH_BITS:return 16;case e.GL.MAX_TEXTURE_SIZE:return 4096}},getProgramParameter:function(t,n){if(l("getProgramParameter"),n===e.GL.LINK_STATUS)return!0},getShaderInfoLog:function(){return l("getShaderInfoLog"),"log"},getShaderParameter:function(t,n){if(l("getShaderParameter"),n===e.GL.COMPILE_STATUS)return!0},getSupportedExtensions:function(){return l("getSupportedExtensions"),[]},getUniformLocation:d("getUniformLocation"),isEnabled:function(t){if(l("isEnabled"),t===e.GL.BLEND)return!0},linkProgram:u("linkProgram"),pixelStorei:u("pixelStorei"),shaderSource:u("shaderSource"),texImage2D:u("texImage2D"),texParameteri:u("texParameteri"),uniform1iv:u("uniform1iv"),uniform1fv:u("uniform1fv"),uniform2fv:u("uniform2fv"),uniform3fv:u("uniform3fv"),uniform4fv:u("uniform4fv"),uniformMatrix3fv:u("uniformMatrix3fv"),uniformMatrix4fv:u("uniformMatrix4fv"),useProgram:u("useProgram"),vertexAttribPointer:u("vertexAttribPointer"),vertexAttrib3fv:u("vertexAttrib3fv"),viewport:u("viewport")};i=e.renderWindow;e.renderWindow=function t(){e.renderWindow=i;var n,r=new e.renderWindow;return e.renderWindow=t,r._setup=function(){var t,i=r.renderers(),a=r.windowSize(),s=r.windowPosition();for(n=o.extend({},e.GL,h),t=0;t<i.length;t+=1)(i[t].width()>a[0]||0===i[t].width()||i[t].height()>a[1]||0===i[t].height())&&i[t].resize(s[0],s[1],a[0],a[1]);return!0},r.context=function(){return n},r},r=a.supported,a.supported=function(){return!!t},a._maxTextureSize=4096,a._maxPointSize=64,e._mocked=!0,e.mockCounts=function(){return s}},t.exports.restoreWebglRenderer=function(){var t=n(320);t._mocked&&(t.renderWindow=i,a.supported=r,delete t._mocked,delete t.mockCounts)}},9215:function(t){var e=function(t,e,n,i,r){var o,a=0;return"boolean"!=typeof e&&(r=i,i=n,n=e,e=void 0),"function"!=typeof i&&(r=i,i=function(){}),function(){var s=this,l=+new Date-a,u=arguments;function c(){a=+new Date,n.apply(s,u)}function d(){o=void 0}i.apply(s,u),r&&!o&&c(),o&&clearTimeout(o),void 0===r&&l>t?c():!0!==e&&(o=setTimeout(r?d:c,void 0===r?t-l:t))}};t.exports={throttle:e,debounce:function(t,n,i,r){return"boolean"!=typeof n&&(r=i,i=n,n=!1),e(t,!1,i,r=r||function(){},!!n)}}},2623:function(t,e,n){var i=n(5699),r=n(6837),o=function t(e){"use strict";if(!(this instanceof t))return new t(e);var i=n(5638);e=e||{},r.call(this,e);var o=this,a=this._init;this.featureType="vector",this.origin=function(t){return void 0===t?o.style("origin"):(o.style("origin",t),o.dataTime().modified(),o)},this.delta=function(t){return void 0===t?o.style("delta"):(o.style("delta",t),o.dataTime().modified(),o)},this._init=function(t){a.call(o,t);var e=i.extend({},{strokeColor:"black",strokeWidth:2,strokeOpacity:1,originStyle:"none",endStyle:"arrow",origin:{x:0,y:0,z:0},delta:function(t){return t},scale:null},void 0===t.style?{}:t.style);return void 0!==t.origin&&(e.origin=t.origin),o.style(e),o.dataTime().modified(),o}};i(o,r),t.exports=o},2978:function(t){t.exports="1.8.2"},6653:function(t,e,n){t.exports={pointFeature:n(9724),vtkjsRenderer:n(9508)}},7222:function(t,e,n){t.exports=function t(e){"use strict";if(!(this instanceof n(3737)))return new t(e);var i=this,r=this.draw;return this.draw=function(){return i.ready&&(i._update(),i.renderer()._render(),r()),i},this}},9724:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(2557),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var i=n(6853),r=n(7222),a=n(9508).vtkjs,s=a.Rendering.Core.vtkActor,l=a.Common.Core.vtkDataArray,u=a.Rendering.Core.vtkGlyph3DMapper,c=a.Rendering.Core.vtkMapper,d=a.Common.DataModel.vtkPointSet,h=a.Filters.Sources.vtkSphereSource;r.call(this);var f,p,m,g,v,y=this,x=this._init,b=this._exit,_=this._update;return this._createPipeline=function(){p=d.newInstance(),(m=h.newInstance()).setThetaResolution(30),m.setPhiResolution(30);var t=u.newInstance({orient:!1,colorByArrayName:"color",scalarMode:c.ScalarMode.USE_POINT_FIELD_DATA,colorMode:c.ColorMode.DIRECT_SCALARS,scaling:!0,scaleArray:"diam",scaleMode:u.ScaleModes.SCALE_BY_MAGNITUDE});t.setInputData(p,0),t.setInputConnection(m.getOutputPort(),1),(f=s.newInstance()).setMapper(t),f.getProperty().setAmbient(1),y.renderer().contextRenderer().addActor(f)},this._init=function(){x.call(y,e),y.renderer().contextRenderer().setLayer(0),y._createPipeline()},this._build=function(){var t,e,n,r,o,a,s=y.data().length,u=new Array(3*s),c=y.data(),d=y.position(),h=y.style.get("radius"),f=y.style.get("fill"),m=y.style.get("fillColor"),x=y.style.get("fillOpacity"),b=y.layer().map().unitsPerPixel(y.layer().map().zoom());for(v&&v.length===s||(v=new Float32Array(s)),g&&g.length===4*s||(g=new Uint8Array(4*s)),t=e=n=0;t<s;t+=1,e+=3,n+=4)r=d(c[t],t),u[e]=r.x,u[e+1]=r.y,u[e+2]=r.z||0,a=a||u[e+2],v[t]=h(c[t],t)*b*2,o=m(c[t],t),g[n]=255*o.r,g[n+1]=255*o.g,g[n+2]=255*o.b,g[n+3]=f(c[t],t)?255*x(c[t],t):0;if(u=i.transformCoordinates(y.gcs(),y.layer().map().gcs(),u,3),!a&&y.gcs()!==y.layer().map().gcs())for(t=e=0;t<s;t+=1,e+=3)u[e+2]=0;p.getPoints().setData(u,3),p.getPointData().addArray(l.newInstance({name:"color",values:g,numberOfComponents:4})),p.getPointData().addArray(l.newInstance({name:"diam",values:v})),y.buildTime().modified()},this._update=function(){if(_.call(y),y.dataTime().getMTime()>=y.buildTime().getMTime()||y.updateTime().getMTime()<y.getMTime())y._build();else{var t=y.data(),e=y.style.get("radius"),n=y.layer().map().unitsPerPixel(y.layer().map().zoom()),i=p.getPointData().getArray("diam"),r=i.getData().map((function(i,r){return e(t[r],r)*n*2}));i.setData(r),p.modified()}y.updateTime().modified()},this._exit=function(){y.renderer().contextRenderer().removeActor(f),b()},y._init(),this};i(a,o);var s={};s[o.capabilities.stroke]=!1,r("vtkjs","point",a,s),t.exports=a},9508:function(t,e,n){var i=n(5699),r=n(4647).registerRenderer,o=n(3234),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var i=n(5240),r=n(5108),a=t.vtkjs.Rendering.Misc.vtkGenericRenderWindow,s=this,l=this._init,u=a.newInstance({background:[0,0,0,0]});u.setContainer(s.layer().node().get(0)),u.getInteractor().unbindEvents(),u.resize();var c=u.getRenderer(),d=u.getRenderWindow();return this.contextRenderer=function(){return c},this.api=function(){return t.apiname},this._init=function(){if(s.initialized())return s;l.call(s);var t=s.layer().map(),e=t.size();return s._resize(0,0,e.width,e.height),t.camera().clipbounds={near:-t.unitsPerPixel(),far:t.unitsPerPixel()},s},this._resize=function(t,e,n,i){return s._setWidthHeight(n,i),u.resize(),s._render(),s},this._render=function(){return s.layer().map().scheduleAnimationFrame(s._renderFrame,!0),s},this._renderFrame=function(){var t,e=s.layer().features();for(t=0;t<e.length;t+=1)e[t].visible()&&e[t]._update();s._updateRendererCamera(),d.render()},this._exit=function(){},this._updateRendererCamera=function(){var t=s.layer().map().camera(),e=t.view,n=t.projectionMatrix,r=i.create();i.copy(r,e);var o=i.create();i.copy(o,n),s.contextRenderer().getActiveCamera().setViewMatrix(r),s.contextRenderer().getActiveCamera().setProjectionMatrix(o)},s.layer().geoOn(r.pan,(function(t){s._render()})),s.layer().geoOn(r.parallelprojection,(function(t){})),this};a.apiname="vtkjs",i(a,o),r("vtkjs",a),a.supported=function(){delete a.vtkjs;try{a.vtkjs=n(999)}catch(t){}return a.vtkjs&&a.vtkjs.Rendering||!window.vtk||!window.vtk.Rendering||(a.vtkjs=window.vtk),a.vtkjs&&a.vtkjs.Rendering||(a.vtkjs=void 0),void 0!==a.vtkjs},a.fallback=function(){return null},a.supported(),t.exports=a},99:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(8719),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var n=this,i=null,r=this._exit,a=this.draw,s=this._update;return this.draw=function(){if(n._update(),i)for(var t=0;t<i.length;t+=1)i[t].draw();return a(),n},this._build=function(){return n.buildTime().modified(),i=n.createChoropleth()},this._update=function(){s.call(n),(n.dataTime().timestamp()>=n.buildTime().timestamp()||n.updateTime().timestamp()<=n.timestamp())&&(n._wipePolygons(),n._build()),n.updateTime().modified()},this._wipePolygons=function(){i&&i.map((function(t){return t._exit()})),i=null},this._exit=function(){n._wipePolygons(),r()},this._init(e),this};i(a,o),r("webgl","choropleth",a),t.exports=a},8917:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(9005),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e),n(5651).call(this,e);var i=this;return this._build=function(){i.actors()[0]&&i.renderer().contextRenderer().removeActor(i.actors()[0]),i.createGLMeshColored(i._createContours()),i.renderer().contextRenderer().addActor(i.actors()[0]),i.buildTime().modified()},this._init(e),this};i(a,o),r("webgl","contour",a),t.exports=a},8939:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(1109),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e),n(5651).call(this,e);var i=this;return this._build=function(){i.actors()[0]&&i.renderer().contextRenderer().removeActor(i.actors()[0]),i.createGLMeshColored(i._createGrids()),i.renderer().contextRenderer().addActor(i.actors()[0]),i.buildTime().modified()},this._init(e),this};i(a,o),r("webgl","grid",a),t.exports=a},9205:function(t,e,n){t.exports={choroplethFeature:n(99),contourFeature:n(8917),gridFeature:n(8939),isolineFeature:n(9752),layer:n(5389),lineFeature:n(7390),lookupTable2D:n(8672),markerFeature:n(1848),meshColored:n(5651),pixelmapFeature:n(9685),pointFeature:n(5675),polygonFeature:n(2890),quadFeature:n(2182),tileLayer:n(7112),trackFeature:n(506),webglRenderer:n(2254)}},9752:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(2367),a=function t(e){"use strict";return this instanceof t?(e=e||{},o.call(this,e),n(7719).call(this),this._init(e),this):new t(e)};i(a,o),r("webgl","isoline",a),t.exports=a},5389:function(t,e,n){var i=function(){"use strict";var t=n(4647).createRenderer,e=n(5108),i=n(2254),r=n(1940),o=this,a=this._init,s=this.opacity,l=this.visible,u=this.zIndex;this.opacity=function(t){var e=s.apply(o,arguments);return void 0!==t&&o.initialized()&&o.map()._updateAutoshareRenderers(),e},this.visible=function(t){if(void 0===t)return l();var e=l(),n=l.apply(o,arguments);return e!==t&&o.initialized()&&(o.map().scheduleAnimationFrame(o._update,!0),o.renderer()._render()),n},this.zIndex=function(t,e){var n=u.apply(o,arguments);return void 0!==t&&o.initialized()&&(o.map().scheduleAnimationFrame(o._update,!0),o.renderer()._render(),o.map()._updateAutoshareRenderers()),n},this.switchRenderer=function(t,e){if(t instanceof i&&t!==o.renderer()){var n=o.renderer(),r=[],a=[];o.map().listSceneObjects([o]).forEach((function(t){t._cleanup&&(t._cleanup(),t._update&&a.push(t)),t.actors&&(r=r.concat(t.actors()))})),r.forEach((function(e){n.contextRenderer().removeActor(e),t.contextRenderer().addActor(e)})),o._renderer(t),o._canvas(t.canvas()),e&&(r.length||a.length)&&(n._render(),a.forEach((function(t){t._update()})),t._render())}return o},this._init=function(){var n=o.map();return n._updateAutoshareRenderers||(n._updateAutoshareRenderers=function(){var e,o,a,s=n.sortedLayers(),l=[];s.forEach((function(n){var s=n.autoshareRenderer(),u=n instanceof r;s&&n.renderer()&&n.renderer().api()===i.apiname?!e||n.opacity()!==o||"more"!==s&&(n.opacity()>0&&n.opacity()<1||u&&!a)?(n.node()[0].contains(n.renderer().canvas()[0])||(n.switchRenderer(t(i.apiname,n),!1),l.push(n.renderer())),e=n.renderer(),o=n.opacity(),a=u):(n.renderer()!==e&&(l.push(n.renderer()),n.switchRenderer(e,!1),l.push(n.renderer())),a&=u):e=null})),s.forEach((function(t){l.indexOf(t.renderer())>=0&&t._update&&t._update()})),s.forEach((function(t){l.indexOf(t.renderer())>=0&&(t.renderer()._renderFrame(),l=l.filter((function(e){return e!==t.renderer()})))})),l.forEach((function(t){t._exit()}))},n.geoOn(e.layerAdd,(function(){return n._updateAutoshareRenderers()})),n.geoOn(e.layerRemove,(function(){return n._updateAutoshareRenderers()}))),a.apply(o,arguments)}};(0,n(4647).registerLayerAdjustment)("webgl","all",i),t.exports=i},7390:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(4708),a=0,s=1,l=3,u={butt:0,square:1,round:2},c={passthrough:3,miter:4,bevel:5,round:6,"miter-clip":7},d={normal:0,debug:1},h=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var i=n(320),r=n(6853),h=n(4634),f=n(7719),p=n(9162),m=n(359),g=n(916);f.call(this);var v,y,x,b,_,w,M,A,T,C,E,S=this,k=this._exit,P=void 0!==e.dynamicDraw&&e.dynamicDraw,O=this._init,R=this._update;return this.featureVertices=function(){return[[0,"corner",-1,a],[0,"near",1,s],[1,"far",-1,l],[1,"corner",1,a],[1,"near",-1,s],[0,"far",1,l]]},this.verticesPerFeature=function(){return S.featureVertices().length},this._init=function(t){var e,n=i.shaderProgram(),r=((e=new i.shader(i.GL.VERTEX_SHADER)).setShaderSource(g),e),o=function(t){var e=new i.shader(i.GL.FRAGMENT_SHADER);return e.setShaderSource(t?m:p),e}(void 0!==((t||{}).style||{}).debug),a=i.vertexAttribute("pos"),s=i.vertexAttribute("prev"),l=i.vertexAttribute("next"),u=i.vertexAttribute("far"),c=i.vertexAttribute("flags"),d=i.vertexAttribute("strokeWidth"),h=i.vertexAttribute("strokeColor"),f=i.vertexAttribute("strokeOpacity"),T=new i.projectionUniform("projectionMatrix"),C=i.geometryData(),k=i.sourceDataP3fv({name:"pos"}),R=i.sourceDataAnyfv(3,i.vertexAttributeKeysIndexed.Four,{name:"prev"}),L=i.sourceDataAnyfv(3,i.vertexAttributeKeysIndexed.Five,{name:"next"}),D=i.sourceDataAnyfv(3,i.vertexAttributeKeysIndexed.Six,{name:"far"}),I=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Seven,{name:"flags"}),F=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.One,{name:"strokeWidth"}),j=i.sourceDataAnyfv(3,i.vertexAttributeKeysIndexed.Two,{name:"strokeColor"}),N=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Three,{name:"strokeOpacity"}),z=i.triangles();return E=new i.modelViewOriginUniform("modelViewMatrix"),b=new i.floatUniform("pixelWidth",1/S.renderer().width()),_=new i.floatUniform("aspect",S.renderer().width()/S.renderer().height()),w=new i.floatUniform("miterLimit",10),M=new i.floatUniform("antialiasing",0),A=new i.floatUniform("fixedFlags",0),O.call(S,t),x=i.material(),y=i.mapper({dynamicDraw:P}),n.addVertexAttribute(a,i.vertexAttributeKeys.Position),n.addVertexAttribute(d,i.vertexAttributeKeysIndexed.One),n.addVertexAttribute(h,i.vertexAttributeKeysIndexed.Two),n.addVertexAttribute(f,i.vertexAttributeKeysIndexed.Three),n.addVertexAttribute(s,i.vertexAttributeKeysIndexed.Four),n.addVertexAttribute(l,i.vertexAttributeKeysIndexed.Five),n.addVertexAttribute(u,i.vertexAttributeKeysIndexed.Six),n.addVertexAttribute(c,i.vertexAttributeKeysIndexed.Seven),n.addUniform(E),n.addUniform(T),n.addUniform(b),n.addUniform(_),n.addUniform(w),n.addUniform(M),n.addUniform(A),n.addShader(o),n.addShader(r),x.addAttribute(n),x.addAttribute(i.blend()),(v=i.actor()).setMaterial(x),v.setMapper(y),C.addSource(k),C.addSource(R),C.addSource(L),C.addSource(D),C.addSource(F),C.addSource(j),C.addSource(N),C.addSource(I),z.setIndices(new Uint16Array(1)),C.addPrimitive(z),C.computeBounds=function(){C.setBounds(0,0,0,0,0,0)},y.setGeometryData(C),S},this.actors=function(){return v?[v]:[]},this._build=function(){return function(t){var e,n,i,o,a,s,l,f,p,m,g,v,x,b,_,k,P,O,R,L,D,I,F,j,N,z,B,V,G,U,q,W,H,Z,X,Q,K,Y,J=S.data(),$=0,tt=[{strokeOffset:0,posStrokeOffset:0,negStrokeOffset:0},{strokeOffset:0,posStrokeOffset:0,negStrokeOffset:0}],et=tt[1],nt=S.line(),it=S.style.get("strokeWidth"),rt=S.style.get("strokeColor"),ot=S.style.get("strokeOpacity"),at=S.style.get("lineCap"),st=S.style.get("lineJoin"),lt=S.style.get("strokeOffset"),ut=S.style.get("miterLimit")(J),ct=S.style.get("antialiasing")(J)||0,dt=S.featureVertices(),ht=dt.length,ft=d[S.style.get("debug")(J)?"debug":"normal"]||0,pt=y.geometryData(),mt=S.style.get("closed"),gt=!0;if(K=h.isFunction(S.style("closed"))?void 0:mt()||!1,L=h.isFunction(S.style("lineCap"))?void 0:u[at()||"butt"],D=h.isFunction(S.style("lineJoin"))?void 0:c[st()||"miter"],O=h.isFunction(S.style("strokeColor"))?void 0:rt(),I=h.isFunction(S.style("strokeOffset"))?void 0:lt()||0,R=h.isFunction(S.style("strokeOpacity"))?void 0:ot(),P=h.isFunction(S.style("strokeWidth"))?void 0:it(),void 0!==ut&&w.set(Math.max(1,Math.min(100,ut))),A.set(ft),M.set(ct),t)$=T.numSegments,Y=T.closed,m=T.lineItemList,p=$*ht,gt=L!==T.lineCapVal||void 0===L||D!==T.lineJoinVal||void 0===D||I!==T.strokeOffsetVal||void 0===I;else{var vt=[],yt=S.position();for(m=new Array(J.length),Y=new Array(J.length),n=0;n<J.length;n+=1)if(g=nt(e=J[n],n),m[n]=g,!(g.length<2)){for($+=g.length-1,i=0;i<g.length;i+=1)x=yt(g[i],i,e,n),vt.push(x.x),vt.push(x.y),vt.push(x.z||0),i||(_=x);g.length>2&&(void 0===K?mt(e,n):K)?x.x!==_.x||x.y!==_.y||x.z!==_.z?($+=1,Y[n]=2):Y[n]=1:Y[n]=0}if(vt=r.transformCoordinates(S.gcs(),S.layer().map().gcs(),vt,3),(C=new Float32Array(S.style.get("origin")(vt)))[0]||C[1]||C[2])for(n=0;n<vt.length;n+=3)vt[n]-=C[0],vt[n+1]-=C[1],vt[n+2]-=C[2];E.setOrigin(C),p=$*ht,B=h.getGeomBuffer(pt,"pos",3*p),V=h.getGeomBuffer(pt,"prev",3*p),G=h.getGeomBuffer(pt,"next",3*p),U=h.getGeomBuffer(pt,"far",3*p),pt.primitive(0).numberOfIndices()!==p&&(pt.primitive(0).numberOfIndices=function(){return p}),T={numSegments:$,closed:Y,lineItemList:m,lineCapVal:L,lineJoinVal:D,strokeOffsetVal:I}}for(q=h.getGeomBuffer(pt,"flags",p),W=h.getGeomBuffer(pt,"strokeWidth",p),H=h.getGeomBuffer(pt,"strokeColor",3*p),Z=h.getGeomBuffer(pt,"strokeOpacity",p),n=b=X=Q=0;n<J.length;n+=1)if(!((g=m[n]).length<2))for(e=J[n],K=Y[n],k=b,f=g.length+(2===K?1:0),i=0;i<f;i+=1,b+=3)if(l=i,i===g.length&&(l=0,b-=3),v=g[l],i&&(et=tt[0],tt[0]=tt[1],tt[1]=et),t||(et.pos=i===l?b:k,et.prev=l?b-3:K?k+3*(g.length-3+K):b,et.next=i+1<g.length?b+3:K?i!==l?k+3:k+6-3*K:b),et.strokeWidth=void 0===P?it(v,l,e,n):P,et.strokeColor=void 0===O?rt(v,l,e,n):O,et.strokeOpacity=void 0===R?ot(v,l,e,n):R,gt&&(0!==I&&(et.strokeOffset=(void 0===I?lt(v,l,e,n):I)||0,et.strokeOffset?(et.posStrokeOffset=2047&Math.round(2048+1023*Math.min(1,Math.max(-1,et.strokeOffset))),et.negStrokeOffset=2047&Math.round(2048-1023*Math.min(1,Math.max(-1,et.strokeOffset)))):et.posStrokeOffset=et.negStrokeOffset=0),K||i&&i!==g.length-1?et.flags=void 0===D?c[st(v,l,e,n)]||c.miter:D:et.flags=void 0===L?u[at(v,l,e,n)]||u.butt:L),i)for(o=0;o<ht;o+=1,X+=1,Q+=3)a=tt[F=dt[o][0]],s=tt[1-F],t||(B[Q]=vt[a.pos],B[Q+1]=vt[a.pos+1],B[Q+2]=0,j=F?"next":"prev",N=F?"prev":"next",V[Q]=vt[a[j]],V[Q+1]=vt[a[j]+1],V[Q+2]=0,G[Q]=vt[a[N]],G[Q+1]=vt[a[N]+1],G[Q+2]=0,U[Q]=vt[s[N]],U[Q+1]=vt[s[N]+1],U[Q+2]=0),gt&&(z=F?"posStrokeOffset":"negStrokeOffset",q[X]=dt[o][3]+4*a.flags+32*s.flags+256*a[z]),W[X]=a.strokeWidth,H[Q]=a.strokeColor.r,H[Q+1]=a.strokeColor.g,H[Q+2]=a.strokeColor.b,a.strokeOpacity<=0&&s.strokeOpacity<=0||a.strokeWidth<=0&&s.strokeWidth<=0?Z[X]=-1:Z[X]=a.strokeOpacity;t?(gt&&y.updateSourceBuffer("flags"),y.updateSourceBuffer("strokeWidth"),y.updateSourceBuffer("strokeOpacity"),y.updateSourceBuffer("strokeColor")):(y.modified(),pt.boundsDirty(!0),y.boundsDirtyTimestamp().modified())}(!!(S.dataTime().timestamp()<S.buildTime().timestamp()&&T)),S.renderer().contextRenderer().hasActor(v)||S.renderer().contextRenderer().addActor(v),S.buildTime().modified(),S},this._update=function(){return R.call(S),(S.dataTime().timestamp()>=S.buildTime().timestamp()||S.updateTime().timestamp()<=S.timestamp())&&S._build(),b.set(1/S.renderer().width()),_.set(S.renderer().width()/S.renderer().height()),v.setVisible(S.visible()),v.material().setBinNumber(S.bin()),S.updateTime().modified(),S},this._exit=function(){S.renderer().contextRenderer().removeActor(v),v=null,k()},this._init(e),this};i(h,o);var f={};f[o.capabilities.basic]=!0,f[o.capabilities.multicolor]=!0,r("webgl","line",h,f),t.exports=h},8672:function(t,e,n){var i=n(5699),r=n(6618),o=n(320);var a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.texture.call(this);var n,i=r(),a=e.maxWidth||4096,s=new Uint8Array([0,0,0,0]),l=this;return this.setup=function(t){!function(t,e){if(!(e>=0&&e<=31))throw Error("[error] Texture unit "+e+" is not supported");t.m_context.activeTexture(o.GL.TEXTURE0+e)}(t,l.textureUnit()),t.m_context.deleteTexture(l.m_textureHandle),l.m_textureHandle=t.m_context.createTexture(),t.m_context.bindTexture(o.GL.TEXTURE_2D,l.m_textureHandle),t.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_MIN_FILTER,o.GL.NEAREST),t.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_MAG_FILTER,o.GL.NEAREST),t.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_WRAP_S,o.GL.CLAMP_TO_EDGE),t.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_WRAP_T,o.GL.CLAMP_TO_EDGE),t.m_context.pixelStorei(o.GL.UNPACK_ALIGNMENT,1),t.m_context.pixelStorei(o.GL.UNPACK_FLIP_Y_WEBGL,!0),t.m_context.texImage2D(o.GL.TEXTURE_2D,0,o.GL.RGBA,l.width,l.height,0,o.GL.RGBA,o.GL.UNSIGNED_BYTE,s),t.m_context.bindTexture(o.GL.TEXTURE_2D,null),i.modified()},this.colorTable=function(t){return void 0===t?n:(n=t,t.length<4&&(t=[0,0,0,0]),l.width=Math.min(a,t.length/4),l.height=Math.ceil(t.length/4/a),t instanceof Uint8Array&&t.length===l.width*l.height*4?s=t:(t.length<l.width*l.height*4&&(t=t.concat(new Array(l.width*l.height*4-t.length).fill(0))),s=new Uint8Array(t)),l.modified(),l)},this.maxWidth=function(){return a},this.colorTable(e.colorTable||[]),this};i(a,o.texture),t.exports=a},1848:function(t,e,n){var i=n(5638),r=n(5699),o=n(4647).registerFeature,a=n(7098),s=n(2254),l=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},a.call(this,e);var r=n(320),o=n(6853),l=n(4634),u=n(7719),c=n(9892),d=n(5108),h=n(5573),f=n(468),p=n(2043),m=n(7981);u.call(this);var g,v,y=this,x=this._exit,b=null,_=null,w={},M=this._init,A=this._update,T=this.updateStyleFromArray;function C(t){var e,n,i,r,u,c,d,h,f,p,m,x,w,M=y.data().length,A=y._pointPolygon(0,0,1,1),T=new Array(3*M),E={},S={},k={},P={},O={radius:1,fillColor:3,fillOpacity:1,strokeColor:3,strokeOpacity:1,strokeOffset:0,strokeWidth:1,symbol:1,symbolValue:1,rotation:1,scaleWithZoom:0,rotateWithMap:0,radiusIncludesStroke:0},R=y.verticesPerFeature(),L=y.data(),D=_.geometryData();for(var I in u=y.position(),O)k[I]=y.style.get(I),l.isFunction(y.style(I))||(P[I]=k[I]()),O[I]&&(E[I]=l.getGeomBuffer(D,I,R*M*O[I]));if(!t){for(e=x=0;e<M;e+=1,x+=3)r=u(L[e],e),T[x]=r.x,T[x+1]=r.y,T[x+2]=0;if(T=o.transformCoordinates(y.gcs(),y.layer().map().gcs(),T,3),(v=new Float32Array(y.style.get("origin")(T)))[0]||v[1]||v[2])for(e=x=0;e<M;e+=1,x+=3)T[x]-=v[0],T[x+1]-=v[1],T[x+2]-=v[2];g.setOrigin(v),i=l.getGeomBuffer(D,"pos",R*M*3),y._primitiveShape!==a.primitiveShapes.sprite&&(d=l.getGeomBuffer(D,"unit",R*M*2)),(c=D.primitive(0).indices())instanceof Uint16Array&&c.length===R*M||(c=new Uint16Array(R*M),D.primitive(0).setIndices(c))}for(e=f=p=m=x=0;e<M;e+=1,x+=3){if(h=L[e],!t&&y._primitiveShape!==a.primitiveShapes.sprite)for(n=0;n<A.length;n+=1,m+=1)d[m]=A[n];for(var F in O)S[F]=void 0===P[F]?k[F](h,e):P[F];for(S.scaleWithZoom=a.scaleMode[S.scaleWithZoom]||(S.scaleWithZoom>=1&&S.scaleWithZoom<=3?S.scaleWithZoom:0),S.symbolComputed=S.scaleWithZoom+(S.rotateWithMap?4:0)+16*(Math.sign(void 0!==S.radiusIncludesStroke&&S.radiusIncludesStroke?S.strokeOffset:1)+1)+64*S.symbol,S.symbolValue&&S.symbol>=a.symbols.arrow&&S.symbol<a.symbols.arrow+a.symbols.arrowMax&&(S.symbolValue=(w=S.symbolValue).length?((void 0===w[0]?0:Math.floor(250*Math.abs(w[0]))+1)+252*(void 0===w[1]?0:Math.floor(250*Math.abs(w[1]))+1)+252*(void 0===w[2]?0:Math.floor(250*Math.abs(w[2]))+1)*252)*(w[3]?-1:1):void 0===w?0:Math.floor(250*Math.abs(w))+1),n=0;n<R;n+=1,f+=1,p+=3)t||(i[p]=T[x],i[p+1]=T[x+1],i[p+2]=T[x+2]),E.radius[f]=S.radius,E.fillColor[p]=S.fillColor.r,E.fillColor[p+1]=S.fillColor.g,E.fillColor[p+2]=S.fillColor.b,E.fillOpacity[f]=S.fillOpacity,E.strokeColor[p]=S.strokeColor.r,E.strokeColor[p+1]=S.strokeColor.g,E.strokeColor[p+2]=S.strokeColor.b,E.strokeOpacity[f]=S.strokeOpacity,E.strokeWidth[f]=S.strokeWidth,E.symbol[f]=S.symbolComputed,E.symbolValue[f]=S.symbolValue,E.rotation[f]=S.rotation}if(y._primitiveShapeAuto){var j=y._approximateMaxRadius(y.renderer().map().zoom());if(y._primitiveShape===a.primitiveShapes.sprite&&j>s._maxPointSize||y._primitiveShape!==a.primitiveShapes.sprite&&j<=s._maxPointSize)return y._primitiveShape=j>s._maxPointSize?a.primitiveShapes.triangle:a.primitiveShapes.sprite,y.renderer().contextRenderer().removeActor(b),b=null,y._init(!0),void C()}t?Object.keys(E).forEach((function(t){return _.updateSourceBuffer(t)})):(D.boundsDirty(!0),_.modified(),_.boundsDirtyTimestamp().modified())}return c(y,e),this.actors=function(){return b?[b]:[]},this.updateStyleFromArray=function(t,e,n){var r,o,a={fillColor:3,fillOpacity:1,radius:1,strokeColor:3,strokeOpacity:1,strokeWidth:1,symbolComputed:1,symbolValueComputed:1};if("string"==typeof t){var s={};s[t]=e,t=s}return i.each(t,(function(t,e){var n,i,s,l,u,c,d,h,f,p;if(y.visible()&&b&&a[t]&&!r&&!y.clustering())if(f=a[t],l=y.data().length,p="symbolComputed"===t?"symbol":"symbolValueComputed"===t?"symbolValue":t,s=(i=b.mapper()).getSourceBuffer(p),n=y.verticesPerFeature(),s&&l&&l*n*f===s.length){switch(a[t]){case 1:for(c=0,h=0;c<l;c+=1)for(u=e[c],d=0;d<n;d+=1,h+=1)s[h]=u;break;case 3:for(c=0,h=0;c<l;c+=1)for(u=e[c],d=0;d<n;d+=1,h+=3)s[h]=u.r,s[h+1]=u.g,s[h+2]=u.b}i.updateSourceBuffer(p),o=!0}else r=!0;else r=!0;if(t===p){var m=y.modified;r||(y.modified=function(){}),T(t,e,!1),y.modified=m}})),n&&(y.visible()&&r?y.draw():o&&y.renderer()._render()),y},this._handleZoom=function(t){y._primitiveShapeAuto&&y._primitiveShape===a.primitiveShapes.sprite&&y._approximateMaxRadius(t)>s._maxPointSize&&(y._primitiveShape=a.primitiveShapes.triangle,y.renderer().contextRenderer().removeActor(y.actors()[0]),y._init(!0),y.dataTime().modified(),y.draw())},this._init=function(t){var n,i,o=r.shaderProgram(),s=((i=new r.shader(r.GL.VERTEX_SHADER)).setShaderSource(y._primitiveShape===a.primitiveShapes.sprite?m:p),i),l=function(){var t=new r.shader(r.GL.FRAGMENT_SHADER);return t.setShaderSource(y._primitiveShape===a.primitiveShapes.sprite?f:h),t}(),u=r.material(),c=r.blend(),x=r.geometryData(),A=r.sourceDataP3fv({name:"pos"}),T={radius:1,fillColor:3,fillOpacity:1,strokeColor:3,strokeOpacity:1,strokeWidth:1,symbol:1,symbolValue:1,rotation:1},C={pixelWidth:r.GL.FLOAT,aspect:r.GL.FLOAT,zoom:r.GL.FLOAT,rotationUniform:r.GL.FLOAT},E=new r.projectionUniform("projectionMatrix");g=new r.modelViewOriginUniform("modelViewMatrix",v),y._primitiveShape===a.primitiveShapes.sprite?n=new r.points:(n=new r.triangles,T.unit=2),n.setIndices(new Uint16Array),t||M.call(y,e),_=r.mapper(),o.addVertexAttribute(r.vertexAttribute("pos"),r.vertexAttributeKeys.Position),x.addSource(A),Object.keys(T).forEach((function(t,e){o.addVertexAttribute(r.vertexAttribute(t),e+1),x.addSource(r.sourceDataAnyfv(T[t],e+1,{name:t}))})),w={},Object.keys(C).forEach((function(t){w[t]=new r.uniform(C[t],t),o.addUniform(w[t])})),o.addUniform(g),o.addUniform(E),o.addShader(l),o.addShader(s),u.addAttribute(o),u.addAttribute(c),(b=r.actor()).setMaterial(u),b.setMapper(_),x.addPrimitive(n),x.computeBounds=function(){x.setBounds(0,0,0,0,0,0)},_.setGeometryData(x),t||y.geoOn(d.zoom,(function(t){y._handleZoom(t.zoomLevel)}))},this._build=function(){return C(y.dataTime().timestamp()<y.buildTime().timestamp()),y.renderer().contextRenderer().hasActor(b)||y.renderer().contextRenderer().addActor(b),y.buildTime().modified(),y},this._update=function(){return A.call(y),(y.dataTime().timestamp()>=y.buildTime().timestamp()||y.updateTime().timestamp()<y.timestamp())&&y._build(),w.pixelWidth.set(2/y.renderer().width()),w.aspect.set(y.renderer().width()/y.renderer().height()),w.zoom.set(y.renderer().map().zoom()),w.rotationUniform.set(y.renderer().map().rotation()),b.setVisible(y.visible()),b.material().setBinNumber(y.bin()),y.updateTime().modified(),y},this._exit=function(){y.renderer().contextRenderer().removeActor(b),b=null,w={},x()},y._init(),this};r(l,a);o("webgl","marker",l,{}),t.exports=l},5651:function(t,e,n){t.exports=function(t){"use strict";t=t||{};var e=n(320),i=n(6853),r=n(4634),o=n(4351),a=n(5836);n(7719).call(this);var s,l,u=this,c=this._exit,d=null,h=null,f=null,p=null,m=null,g=null,v=null,y=null,x=void 0!==t.dynamicDraw&&t.dynamicDraw,b=this._init,_=this._update;function w(){var t=new e.shader(e.GL.VERTEX_SHADER);return t.setShaderSource(a),t}function M(){var t=new e.shader(e.GL.FRAGMENT_SHADER);return t.setShaderSource(o),t}return this.createGLMeshColored=function(t){var e,n,o,a,c,d,f,x,b,_=t.elements.length,w=[],M=h.geometryData();for(m.set([t.minColor.r,t.minColor.g,t.minColor.b,t.minColor.a]),g.set([t.maxColor.r,t.maxColor.g,t.maxColor.b,t.maxColor.a]),v.set(t.colorMap.length),y.set(t.stepped),e=-1;e<t.colorMap.length+1;e+=1)o=Math.max(0,Math.min(t.colorMap.length-1,e)),w.push(255*t.colorMap[o].r),w.push(255*t.colorMap[o].g),w.push(255*t.colorMap[o].b),w.push(255*t.colorMap[o].a);if(p.setColorTable(w),t.pos=i.transformCoordinates(u.gcs(),u.layer().map().gcs(),t.pos,3),(s=new Float32Array(u.style.get("origin")(t.pos)))[0]||s[1]||s[2])for(e=0;e<t.pos.length;e+=3)t.pos[e]-=s[0],t.pos[e+1]-=s[1],t.pos[e+2]-=s[2];for(l.setOrigin(s),d=r.getGeomBuffer(M,"pos",3*_),f=r.getGeomBuffer(M,"opacity",_),x=r.getGeomBuffer(M,"value",_),e=n=0;e<_;e+=1,n+=3)a=3*(o=t.elements[e]),d[n]=t.pos[a],d[n+1]=t.pos[a+1],d[n+2]=t.pos[a+2],c=t.elementValues?Math.floor(e/3):o,f[e]=t.opacity[c],x[e]=t.value[c];(b=M.primitive(0).indices())instanceof Uint16Array&&b.length===_||(b=new Uint16Array(_),M.primitive(0).setIndices(b)),M.boundsDirty(!0),h.modified(),h.boundsDirtyTimestamp().modified()},this._init=function(t){var n=e.blend(),i=e.shaderProgram(),r=e.material(),o=e.lookupTable(),a=e.geometryData(),s=new e.projectionUniform("projectionMatrix"),c=new e.uniform(e.GL.INT,"sampler2d"),_=w(),A=M(),T=e.vertexAttribute("pos"),C=e.vertexAttribute("value"),E=e.vertexAttribute("opacity"),S=e.sourceDataP3fv({name:"pos"}),k=e.sourceDataAnyfv(1,e.vertexAttributeKeysIndexed.One,{name:"value"}),P=e.sourceDataAnyfv(1,e.vertexAttributeKeysIndexed.Two,{name:"opacity"}),O=new e.triangles;l=new e.modelViewOriginUniform("modelViewMatrix"),b.call(u,t),h=e.mapper({dynamicDraw:x}),i.addVertexAttribute(T,e.vertexAttributeKeys.Position),i.addVertexAttribute(C,e.vertexAttributeKeysIndexed.One),i.addVertexAttribute(E,e.vertexAttributeKeysIndexed.Two),i.addUniform(l),i.addUniform(s),m=new e.uniform(e.GL.FLOAT_VEC4,"minColor"),i.addUniform(m),g=new e.uniform(e.GL.FLOAT_VEC4,"maxColor"),i.addUniform(g),v=new e.uniform(e.GL.FLOAT,"steps"),i.addUniform(v),y=new e.uniform(e.GL.BOOL,"stepped"),i.addUniform(y),i.addShader(A),i.addShader(_),i.addUniform(c),o.setTextureUnit(7),c.set(7),(f=r).addAttribute(i),f.addAttribute(n),p=o,f.addAttribute(p),(d=e.actor()).setMaterial(f),d.setMapper(h),a.addSource(S),a.addSource(k),a.addSource(P),a.addPrimitive(O),a.computeBounds=function(){a.setBounds(0,0,0,0,0,0)},h.setGeometryData(a)},this.actors=function(){return d?[d]:[]},this._update=function(){_.call(u),(u.dataTime().timestamp()>=u.buildTime().timestamp()||u.updateTime().timestamp()<=u.timestamp())&&u._build(),d.setVisible(u.visible()),d.material().setBinNumber(u.bin()),u.updateTime().modified()},this._exit=function(){u.renderer().contextRenderer().removeActor(d),c()},this}},7719:function(t,e,n){t.exports=function t(e){"use strict";if(!(this instanceof n(3737)))return new t(e);var i=this,r=this.draw;if(this.draw=function(){return i.ready&&(i._update({mayDelay:!0}),i.renderer()._render(),r()),i},this.bin){var o=this.bin;this.bin=function(t,e){if(void 0===t&&!e&&null===o(void 0,!0)){var n=i.layer&&i.layer(),r=n&&n.map&&n.map(),a=r&&r.listSceneObjects()||[],s=a.indexOf(i);if(s>=0)return s}return o.apply(i,arguments)}}return this}},9685:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(6374),a=n(8672),s=n(4634),l=function t(e){"use strict";if(!(this instanceof t))return new t(e);o.call(this,e),n(7719).call(this);var i,r,l,u=n(320),c=n(3953),d=this._exit,h=this;return this.pointSearch=function(t,e){if(i&&h.m_info)for(var n=i.pointSearch(t,e),r=n.index.length-1;r>=0;r-=1)if(n.extra[n.index[r]]._quad&&n.extra[n.index[r]]._quad.image){var o=n.extra[n.index[r]]._quad.image,a=n.extra[n.index[r]].basis,s=Math.floor(a.x*o.width),l=Math.floor(a.y*o.height),u=document.createElement("canvas");u.width=u.height=1;var c=u.getContext("2d");c.drawImage(o,s,l,1,1,0,0,1,1);var d=c.getImageData(0,0,1,1).data,f=d[0]+256*d[1]+256*d[2]*256;return n={index:[f],found:[h.data()[f]]}}return{index:[],found:[]}},this._computePixelmap=function(){var t=h.data()||[],e=h.style.get("color"),n=h.indexModified(void 0,"clear"),o=h.dataTime().timestamp()>=h.buildTime().timestamp()||void 0===n;l||((l=a()).setTextureUnit(1),o=!0);var d,f=Math.max(1,t.length),p=l.maxWidth();f>p&&f%p&&(f+=p-f%p),o||(o=(d=l.colorTable()).length!==4*f,n[0]=Math.max(0,n[0]),n[1]=Math.min(t.length,n[1]+1)),o&&(d=new Uint8Array(4*f),n=[0,t.length]);for(var m=n[0];m<n[1];m+=1){var g=t[m],v=s.convertColor(e.call(h,g,m));d[4*m]=255*v.r,d[4*m+1]=255*v.g,d[4*m+2]=255*v.b,d[4*m+3]=void 0===v.a?255:255*v.a}h.m_info={colors:d};var y=l.colorTable();if(y&&y.length===d.length){for(var x=4*n[0];x<4*n[1]&&d[x]===y[x];x+=1);if(x===4*n[1])return}l.colorTable(d),i||(i=h.layer().createFeature("quad",{selectionAPI:!1,gcs:h.gcs(),visible:h.visible(void 0,!0)}),r=!1),r||(h.dependentFeatures([i]),i.setShader("image_fragment",c),i._hookBuild=function(t){var e=new u.uniform(u.GL.INT,"lutSampler");e.set(l.textureUnit()),t.addUniform(e);var n=new u.uniform(u.GL.INT,"lutWidth");n.set(l.width),t.addUniform(n);var i=new u.uniform(u.GL.INT,"lutHeight");i.set(l.height),t.addUniform(i)},i._hookRenderImageQuads=function(t,e){e.forEach((function(t){t.image&&t.texture&&!t.texture.nearestPixel()&&t.texture.setNearestPixel(!0)})),l.bind(t,e)},!1===r&&i.style({image:h.m_srcImage,position:h.style.get("position")}).data([{}]).draw(),r=!0)},this._exit=function(){return i&&h.layer()&&(h.layer().deleteFeature(i),i=null,h.dependentFeatures([])),d(),h},e.quadFeature&&(i=e.quadFeature),this._init(e),this};i(l,o);var u={};u[o.capabilities.lookup]=!0,r("webgl","pixelmap",l,u),t.exports=l},5675:function(t,e,n){var i=n(5638),r=n(5699),o=n(4647).registerFeature,a=n(2557),s=n(2254),l=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},a.call(this,e);var r=n(320),o=n(6853),l=n(4634),u=n(7719),c=n(9892),d=n(1815),h=n(4900),f=n(9713),p=n(8410);u.call(this);var m,g,v=this,y=this._exit,x=null,b=null,_=null,w=null,M=void 0!==e.dynamicDraw&&e.dynamicDraw,A=this._init,T=this._update,C=this.updateStyleFromArray;function E(t){var e,n,i,r,u,c,d,h,f,p,y,_,w,M,A,T,C,S,k,P,O,R,L,D,I,F,j,N,z,B,V,G,U,q,W,H,Z=v.data().length,X=v._pointPolygon(0,0,1,1),Q=new Array(3*Z),K=v.verticesPerFeature(),Y=v.data(),J=0,$=b.geometryData();if(u=v.position(),p=v.style.get("radius"),w=v.style.get("stroke"),T=v.style.get("strokeWidth"),k=v.style.get("strokeOpacity"),R=v.style.get("strokeColor"),I=v.style.get("fill"),N=v.style.get("fillOpacity"),V=v.style.get("fillColor"),!t){for(e=H=0;e<Z;e+=1,H+=3)r=u(Y[e],e),Q[H]=r.x,Q[H+1]=r.y,Q[H+2]=0;if(Q=o.transformCoordinates(v.gcs(),v.layer().map().gcs(),Q,3),(g=new Float32Array(v.style.get("origin")(Q)))[0]||g[1]||g[2])for(e=H=0;e<Z;e+=1,H+=3)Q[H]-=g[0],Q[H+1]-=g[1],Q[H+2]-=g[2];m.setOrigin(g),i=l.getGeomBuffer($,"pos",K*Z*3),c=l.getGeomBuffer($,"unit",K*Z*2),(d=$.primitive(0).indices())instanceof Uint16Array&&d.length===K*Z||(d=new Uint16Array(K*Z),$.primitive(0).setIndices(d))}for(h=l.getGeomBuffer($,"radius",K*Z),y=l.getGeomBuffer($,"stroke",K*Z),M=l.getGeomBuffer($,"strokeWidth",K*Z),C=l.getGeomBuffer($,"strokeOpacity",K*Z),P=l.getGeomBuffer($,"strokeColor",K*Z*3),L=l.getGeomBuffer($,"fill",K*Z),F=l.getGeomBuffer($,"fillOpacity",K*Z),z=l.getGeomBuffer($,"fillColor",K*Z*3),e=U=q=W=H=0;e<Z;e+=1,H+=3){if(G=Y[e],!t&&v._primitiveShape!==a.primitiveShapes.sprite)for(n=0;n<X.length;n+=1,W+=1)c[W]=X[n];for(f=p(G,e),_=w(G,e)?1:0,A=T(G,e),S=k(G,e),O=R(G,e),D=I(G,e)?1:0,j=N(G,e),B=V(G,e),v._primitiveShapeAuto&&(D&&j||_&&S)&&f+(_&&S?A:0)>J&&(J=f+(_&&S?A:0)),n=0;n<K;n+=1,U+=1,q+=3)t||(i[q]=Q[H],i[q+1]=Q[H+1],i[q+2]=Q[H+2]),h[U]=f,y[U]=_,M[U]=A,C[U]=S,P[q]=O.r,P[q+1]=O.g,P[q+2]=O.b,L[U]=D,F[U]=j,z[q]=B.r,z[q+1]=B.g,z[q+2]=B.b}if(v._primitiveShapeAuto&&(v._primitiveShape===a.primitiveShapes.sprite&&J>s._maxPointSize||v._primitiveShape!==a.primitiveShapes.sprite&&J<=s._maxPointSize))return v._primitiveShape=J>s._maxPointSize?a.primitiveShapes.triangle:a.primitiveShapes.sprite,v.renderer().contextRenderer().removeActor(x),x=null,v._init(!0),void E();t?(b.updateSourceBuffer("radius"),b.updateSourceBuffer("stroke"),b.updateSourceBuffer("strokeWidth"),b.updateSourceBuffer("strokeColor"),b.updateSourceBuffer("strokeOpacity"),b.updateSourceBuffer("fill"),b.updateSourceBuffer("fillColor"),b.updateSourceBuffer("fillOpacity")):($.boundsDirty(!0),b.modified(),b.boundsDirtyTimestamp().modified())}return c(v,e),this.actors=function(){return x?[x]:[]},this.updateStyleFromArray=function(t,e,n){var r,o,a={fill:"bool",fillColor:3,fillOpacity:1,radius:1,stroke:"bool",strokeColor:3,strokeOpacity:1,strokeWidth:1};if("string"==typeof t){var s={};s[t]=e,t=s}return i.each(t,(function(t,e){var n,i,s,l,u,c,d,h,f;if(v.visible()&&x&&a[t]&&!r&&!v.clustering())if(f="bool"===a[t]?1:a[t],l=v.data().length,s=(i=x.mapper()).getSourceBuffer(t),n=v.verticesPerFeature(),s&&l&&l*n*f===s.length){switch(a[t]){case 1:for(c=0,h=0;c<l;c+=1)for(u=e[c],d=0;d<n;d+=1,h+=1)s[h]=u;break;case 3:for(c=0,h=0;c<l;c+=1)for(u=e[c],d=0;d<n;d+=1,h+=3)s[h]=u.r,s[h+1]=u.g,s[h+2]=u.b;break;case"bool":for(c=0,h=0;c<l;c+=1)for(u=e[c]?1:0,d=0;d<n;d+=1,h+=1)s[h]=u}i.updateSourceBuffer(t),o=!0}else r=!0;else r=!0;var p=v.modified;r||(v.modified=function(){}),C(t,e,!1),v.modified=p})),n&&(v.visible()&&r?v.draw():o&&v.renderer()._render()),v},this._init=function(t){var n,i,o=r.shaderProgram(),s=((i=new r.shader(r.GL.VERTEX_SHADER)).setShaderSource(v._primitiveShape===a.primitiveShapes.sprite?p:f),i),l=function(){var t=new r.shader(r.GL.FRAGMENT_SHADER);return t.setShaderSource(v._primitiveShape===a.primitiveShapes.sprite?h:d),t}(),u=r.vertexAttribute("pos"),c=r.vertexAttribute("unit"),y=r.vertexAttribute("radius"),T=r.vertexAttribute("strokeWidth"),C=r.vertexAttribute("fillColor"),E=r.vertexAttribute("fill"),S=r.vertexAttribute("strokeColor"),k=r.vertexAttribute("stroke"),P=r.vertexAttribute("fillOpacity"),O=r.vertexAttribute("strokeOpacity"),R=new r.projectionUniform("projectionMatrix"),L=r.material(),D=r.blend(),I=r.geometryData(),F=r.sourceDataP3fv({name:"pos"}),j=r.sourceDataAnyfv(2,r.vertexAttributeKeysIndexed.One,{name:"unit"}),N=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Two,{name:"radius"}),z=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Three,{name:"strokeWidth"}),B=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Four,{name:"fillColor"}),V=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Five,{name:"fill"}),G=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Six,{name:"strokeColor"}),U=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Seven,{name:"stroke"}),q=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Eight,{name:"fillOpacity"}),W=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Nine,{name:"strokeOpacity"});m=new r.modelViewOriginUniform("modelViewMatrix",g),(n=v._primitiveShape===a.primitiveShapes.sprite?new r.points:new r.triangles).setIndices(new Uint16Array),_=new r.floatUniform("pixelWidth",2/v.renderer().width()),w=new r.floatUniform("aspect",v.renderer().width()/v.renderer().height()),t||A.call(v,e),b=r.mapper({dynamicDraw:M}),o.addVertexAttribute(u,r.vertexAttributeKeys.Position),v._primitiveShape!==a.primitiveShapes.sprite&&o.addVertexAttribute(c,r.vertexAttributeKeysIndexed.One),o.addVertexAttribute(y,r.vertexAttributeKeysIndexed.Two),o.addVertexAttribute(T,r.vertexAttributeKeysIndexed.Three),o.addVertexAttribute(C,r.vertexAttributeKeysIndexed.Four),o.addVertexAttribute(E,r.vertexAttributeKeysIndexed.Five),o.addVertexAttribute(S,r.vertexAttributeKeysIndexed.Six),o.addVertexAttribute(k,r.vertexAttributeKeysIndexed.Seven),o.addVertexAttribute(P,r.vertexAttributeKeysIndexed.Eight),o.addVertexAttribute(O,r.vertexAttributeKeysIndexed.Nine),o.addUniform(_),o.addUniform(w),o.addUniform(m),o.addUniform(R),o.addShader(l),o.addShader(s),L.addAttribute(o),L.addAttribute(D),(x=r.actor()).setMaterial(L),x.setMapper(b),I.addSource(F),I.addSource(j),I.addSource(N),I.addSource(z),I.addSource(B),I.addSource(V),I.addSource(G),I.addSource(U),I.addSource(q),I.addSource(W),I.addPrimitive(n),I.computeBounds=function(){I.setBounds(0,0,0,0,0,0)},b.setGeometryData(I)},this._build=function(){return E(v.dataTime().timestamp()<v.buildTime().timestamp()),v.renderer().contextRenderer().hasActor(x)||v.renderer().contextRenderer().addActor(x),v.buildTime().modified(),v},this._update=function(){return T.call(v),(v.dataTime().timestamp()>=v.buildTime().timestamp()||v.updateTime().timestamp()<v.timestamp())&&v._build(),_.set(2/v.renderer().width()),w.set(v.renderer().width()/v.renderer().height()),x.setVisible(v.visible()),x.material().setBinNumber(v.bin()),v.updateTime().modified(),v},this._exit=function(){v.renderer().contextRenderer().removeActor(x),x=null,y()},v._init(),this};r(l,a);var u={};u[a.capabilities.stroke]=!0,o("webgl","point",l,u),t.exports=l},9892:function(t,e,n){var i=n(2557);t.exports=function(t,e){e=e||{},t._primitiveShapeAuto=!0,t._primitiveShape=i.primitiveShapes.auto,void 0!==i.primitiveShapes[e.primitiveShape]&&(t._primitiveShape=e.primitiveShape),t._primitiveShapeAuto=t._primitiveShape===i.primitiveShapes.auto,t._primitiveShapeAuto&&(t._primitiveShape=i.primitiveShapes.sprite,t._primitiveShapeAuto=!0),t._pointPolygon=function(e,n,r,o){var a;switch(t._primitiveShape){case i.primitiveShapes.triangle:a=[e,n-2*o,e-r*Math.sqrt(3),n+o,e+r*Math.sqrt(3),n+o];break;case i.primitiveShapes.square:a=[e-r,n+o,e-r,n-o,e+r,n+o,e-r,n-o,e+r,n-o,e+r,n+o];break;default:a=[e,n]}return a},t.verticesPerFeature=function(){return t._pointPolygon(0,0,1,1).length/2},t.primitiveShape=function(e,n){if(void 0===e)return n||!t._primitiveShapeAuto?t._primitiveShape:i.primitiveShapes.auto;if(void 0!==i.primitiveShapes[e]){var r=!1;e===i.primitiveShapes.auto?(r=!t._primitiveShapeAuto,t._primitiveShapeAuto=!0):(r=t._primitiveShapeAuto||t._primitiveShape!==e,t._primitiveShapeAuto=!1,t._primitiveShape=e),r&&(t.renderer().contextRenderer().removeActor(t.actors()[0]),t._init(!0),t.dataTime().modified())}return t}}},2890:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(4343),a=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},o.call(this,e);var i=n(320),r=n(1106),a=n(6853),s=n(4634),l=n(7719),u=n(1859),c=n(5810);l.call(this);var d,h,f,p,m,g=this,v=this._exit,y=i.actor(),x=i.mapper(),b=i.material(),_=this._init,w=this._update;function M(){var t=new i.shader(i.GL.VERTEX_SHADER);return t.setShaderSource(c),t}function A(){var t=new i.shader(i.GL.FRAGMENT_SHADER);return t.setShaderSource(u),t}return this._init=function(t){var e=i.shaderProgram(),n=i.vertexAttribute("pos"),r=i.vertexAttribute("fillColor"),o=i.vertexAttribute("fillOpacity"),a=new i.projectionUniform("projectionMatrix"),s=M(),l=A(),u=i.blend(),c=i.geometryData(),d=i.sourceDataP3fv({name:"pos"}),h=i.sourceDataAnyfv(3,i.vertexAttributeKeysIndexed.Two,{name:"fillColor"}),p=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Three,{name:"fillOpacity"}),m=i.triangles();f=new i.modelViewOriginUniform("modelViewMatrix"),e.addVertexAttribute(n,i.vertexAttributeKeys.Position),e.addVertexAttribute(r,i.vertexAttributeKeysIndexed.Two),e.addVertexAttribute(o,i.vertexAttributeKeysIndexed.Three),e.addUniform(f),e.addUniform(a),e.addShader(l),e.addShader(s),b.addAttribute(e),b.addAttribute(u),y.setMaterial(b),y.setMapper(x),c.addSource(d),c.addSource(h),c.addSource(p),c.addPrimitive(m),c.computeBounds=function(){c.setBounds(0,0,0,0,0,0)},x.setGeometryData(c),_.call(g,t)},this.actors=function(){return[y]},this._build=function(){!function(t){var e,n,i,o,l,u,c,p,m,v,y,b,_,w,M,A,T,C,E,S,k,P,O,R,L,D,I,F,j=[],N=g.gcs(),z=g.layer().map().gcs(),B=0,V=x.geometryData();for(l=g.style.get("fillColor"),u=s.isFunction(g.style("fillColor"))?void 0:l(),p=g.style.get("fillOpacity"),m=s.isFunction(g.style("fillOpacity"))?void 0:p(),v=g.style.get("fill"),y=s.isFunction(g.style("fill"))?void 0:v(),b=g.style.get("uniformPolygon"),t?(j=d.items,B=d.numPts):(n=g.style.get("position"),i=g.style.get("polygon"),g.data().forEach((function(t,e){var o,s,l,u;if((o=i(t,e))&&!((s=o.outer||(Array.isArray(o)?o:[])).length<3)){for(l=new Array(3*s.length),k=E=0;k<s.length;k+=1,E+=3)u=n(s[k],k,t,e),l[E]=u.x,l[E+1]=u.y,l[E+2]=0;l={vertices:l,dimensions:3,holes:[]},F=s,o.inner&&o.inner.forEach((function(i){if(!(i.length<3))for(F=F.concat(i),l.holes.push(E/3),k=0;k<i.length;k+=1,E+=3)u=n(i[k],k,t,e),l.vertices[E]=u.x,l.vertices[E+1]=u.y,l.vertices[E+2]=0})),l.vertices=a.transformCoordinates(N,z,l.vertices,l.dimensions),(L={triangles:r(l.vertices,l.holes,l.dimensions),vertices:l.vertices,original:F,item:t,itemIndex:e}).triangles.length&&(j.push(L),B+=L.triangles.length)}})),e=s.getGeomBuffer(V,"pos",3*B),(w=V.primitive(0).indices())instanceof Uint16Array&&w.length===B||(w=new Uint16Array(B),V.primitive(0).setIndices(w)),d={items:j,numPts:B},h=new Float32Array(g.style.get("origin")(j)),f.setOrigin(h)),o=s.getGeomBuffer(V,"fillColor",3*B),c=s.getGeomBuffer(V,"fillOpacity",B),C=E=0,M=u,T=y,O=0;O<j.length;O+=1)if(R=j[O].triangles.length,S=j[O].vertices,D=j[O].item,I=j[O].itemIndex,F=j[O].original,A=m,(_=b(D,I))&&(void 0===u&&(M=l(S[0],0,D,I)),void 0===m&&(A=p(S[0],0,D,I))),void 0===y&&(T=v(D,I)),T||(A=0),_&&t&&j[O].uniform&&j[O].color&&M.r===j[O].color.r&&M.g===j[O].color.g&&M.b===j[O].color.b&&A===j[O].opacity)C+=R,E+=3*R;else{for(k=0;k<R;k+=1,C+=1,E+=3)t&&_?(o[E]=M.r,o[E+1]=M.g,o[E+2]=M.b,c[C]=A):(P=3*j[O].triangles[k],t||(e[E]=S[P]-h[0],e[E+1]=S[P+1]-h[1],e[E+2]=S[P+2]-h[2],w[C]=k),_||void 0!==u||(M=l(F[P],P,D,I)),o[E]=M.r,o[E+1]=M.g,o[E+2]=M.b,!_&&T&&void 0===m&&(A=p(F[P],P,D,I)),c[C]=A);(_||j[O].uniform)&&(j[O].uniform=_,j[O].color=M,j[O].opacity=A)}t?(x.updateSourceBuffer("fillOpacity"),x.updateSourceBuffer("fillColor")):(x.modified(),V.boundsDirty(!0),x.boundsDirtyTimestamp().modified())}(!!(g.dataTime().timestamp()<g.buildTime().timestamp()&&d)),g.renderer().contextRenderer().hasActor(y)||(g.renderer().contextRenderer().addActor(y),p=!0),g.buildTime().modified()},this._update=function(t){g.ready&&(t&&t.mayDelay&&p?m=g.layer().map().scheduleAnimationFrame(g._update):(m&&(g.layer().map().scheduleAnimationFrame(g._update,"remove"),m=null),w.call(g),(g.dataTime().timestamp()>=g.buildTime().timestamp()||g.updateTime().timestamp()<=g.timestamp())&&g._build(),y.setVisible(g.visible()),y.material().setBinNumber(g.bin()),g.updateTime().modified()))},this._exit=function(){m&&g.layer()&&(g.layer().map().scheduleAnimationFrame(g._update,"remove"),m=null),g.renderer().contextRenderer().removeActor(y),v()},this._init(e),this};i(a,o),r("webgl","polygon",a),t.exports=a},2182:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(5017),a=n(6618),s=16777216,l=function t(e){"use strict";if(!(this instanceof t))return new t(e);o.call(this,e);var i=n(5638),r=n(320),l=n(7719),u=n(7521),c=n(5804),d=n(630),h=n(1899);l.call(this);var f,p,m,g,v,y,x,b=this,_=this._exit,w=this._update,M={},A=a(),T=a();function C(t){var e=new r.mapper({dynamicDraw:!0});return e.s_modified=e.modified,e.g_timestamp=a(),e.timestamp=e.g_timestamp.timestamp,e.modified=function(){return e.s_modified(),e.g_timestamp.modified(),e},e.s_render=e.render,e.render=t,e}return this.actors=function(){var t=[];return p&&t.push(p),m&&t.push(m),t},this._build=function(){var t,e,n,i,o,a,s,l,_;b.position()&&((x=b._generateQuads()).imgQuads.length&&!p&&(b.visible(!1),t=C(b._renderImageQuads),(p=new r.actor).setMapper(t),e=new r.material,(n=new r.shaderProgram).addVertexAttribute(new r.vertexAttribute("vertexPosition"),r.vertexAttributeKeys.Position),n.addVertexAttribute(new r.vertexAttribute("textureCoord"),r.vertexAttributeKeys.TextureCoordinate),f=new r.modelViewOriginUniform("modelViewMatrix",x.origin),n.addUniform(f),n.addUniform(new r.projectionUniform("projectionMatrix")),n.addUniform(new r.floatUniform("opacity",1)),n.addUniform(new r.floatUniform("zOffset",0)),(_=new r.uniform(r.GL.INT,"sampler2d")).set(0),n.addUniform(_),l=b.renderer()._glContext(),(o=new r.uniform(l.FLOAT_VEC2,"crop")).set([1,1]),n.addUniform(o),(a=new r.uniform(l.FLOAT_VEC4,"cropsource")).set([0,0,0,0]),n.addUniform(a),n.addShader(r.getCachedShader(l.VERTEX_SHADER,l,c)),n.addShader(r.getCachedShader(l.FRAGMENT_SHADER,l,u)),b._hookBuild&&b._hookBuild(n),e.addAttribute(n),e.addAttribute(new r.blend),s=new r.geometryData,g=void 0,(i=new r.sourceDataT2fv).pushBack([0,0,1,0,0,1,1,1]),s.addSource(i),t.setGeometryData(s),p.setMaterial(e),b.renderer().contextRenderer().addActor(p),b.visible(!0)),x.clrQuads.length&&!m&&(b.visible(!1),t=C(b._renderColorQuads),(m=new r.actor).setMapper(t),e=new r.material,(n=new r.shaderProgram).addVertexAttribute(new r.vertexAttribute("vertexPosition"),r.vertexAttributeKeys.Position),y=new r.modelViewOriginUniform("modelViewMatrix",x.origin),n.addUniform(y),n.addUniform(new r.projectionUniform("projectionMatrix")),n.addUniform(new r.floatUniform("opacity",1)),n.addUniform(new r.floatUniform("zOffset",0)),l=b.renderer()._glContext(),n.addUniform(new r.uniform(l.FLOAT_VEC3,"vertexColor")),n.addShader(r.getCachedShader(l.VERTEX_SHADER,l,h)),n.addShader(r.getCachedShader(l.FRAGMENT_SHADER,l,d)),e.addAttribute(n),e.addAttribute(new r.blend),s=new r.geometryData,v=void 0,t.setGeometryData(s),m.setMaterial(e),b.renderer().contextRenderer().addActor(m),b.visible(!0)),f&&f.setOrigin(x.origin),y&&y.setOrigin(x.origin),b._updateTextures(),b.buildTime().modified())},this._updateTextures=function(){var t;i.each(x.imgQuads,(function(e,n){n.image&&(n.image._texture?n.texture=n.image._texture:((t=new r.texture).setImage(n.image),n.texture=n.image._texture=t))}))},this._renderColorQuads=function(t){if(x.clrQuads.length){var e=this;(e.timestamp()>T.timestamp()||b.dataTime().timestamp()>T.timestamp()||t.m_contextChanged||!v||12*x.clrQuads.length>v.length)&&function(t){var e=t.m_context,n=!1;x.clrQuads.length&&((!v||v.length<12*x.clrQuads.length||!M.clrQuadsPosition)&&(M.clrQuadsPosition&&e.deleteBuffer(M.clrQuadsPosition),M.clrQuadsPosition=e.createBuffer(),v=new Float32Array(12*Math.max(128,2*x.clrQuads.length)),n=!0),i.each(x.clrQuads,(function(t,e){for(var n=0;n<12;n+=1)v[12*t+n]=e.pos[n]-x.origin[n%3]})),e.bindBuffer(e.ARRAY_BUFFER,M.clrQuadsPosition),n?e.bufferData(e.ARRAY_BUFFER,v,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,v)),T.modified()}(t),e.s_render(t,!0);var n,o,a,s=t.m_context;s.bindBuffer(s.ARRAY_BUFFER,M.clrQuadsPosition),i.each(x.clrQuads,(function(e,i){i.opacity!==n&&(n=i.opacity,s.uniform1fv(t.m_material.shaderProgram().uniformLocation("opacity"),new Float32Array([n]))),(i.zOffset||0)!==o&&(o=i.zOffset||0,s.uniform1fv(t.m_material.shaderProgram().uniformLocation("zOffset"),new Float32Array([o]))),a&&a.r===i.color.r&&a.g===i.color.g&&a.b===i.color.b||(a=i.color,s.uniform3fv(t.m_material.shaderProgram().uniformLocation("vertexColor"),new Float32Array([a.r,a.g,a.b]))),s.bindBuffer(s.ARRAY_BUFFER,M.clrQuadsPosition),s.vertexAttribPointer(r.vertexAttributeKeys.Position,3,s.FLOAT,!1,12,12*e*4),s.enableVertexAttribArray(r.vertexAttributeKeys.Position),s.drawArrays(s.TRIANGLE_STRIP,0,4)})),s.bindBuffer(s.ARRAY_BUFFER,null),e.undoBindVertexData(t)}},this._renderImageQuads=function(t){if(x.imgQuads.length){var e=this;(e.timestamp()>A.timestamp()||b.dataTime().timestamp()>A.timestamp()||t.m_contextChanged||!g||12*x.imgQuads.length>g.length)&&function(t){var e=t.m_context,n=!1;x.imgQuads.length&&((!g||g.length<12*x.imgQuads.length||!M.imgQuadsPosition)&&(M.imgQuadsPosition&&e.deleteBuffer(M.imgQuadsPosition),M.imgQuadsPosition=e.createBuffer(),g=new Float32Array(12*Math.max(128,2*x.imgQuads.length)),n=!0),i.each(x.imgQuads,(function(t,e){for(var n=0;n<12;n+=1)g[12*t+n]=e.pos[n]-x.origin[n%3]})),e.bindBuffer(e.ARRAY_BUFFER,M.imgQuadsPosition),n?e.bufferData(e.ARRAY_BUFFER,g,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,g)),A.modified()}(t),e.s_render(t,!0);var n,o,a,l,u,c,d,h,f=t.m_context,p={x:1,y:1},m={x0:0,y0:0,x1:1,y1:1};b._hookRenderImageQuads&&b._hookRenderImageQuads(t,x.imgQuads),f.bindBuffer(f.ARRAY_BUFFER,M.imgQuadsPosition),i.each(x.imgQuads,(function(e,i){i.image&&(i.texture.bind(t),i.image.width*i.image.height>s&&(s=i.image.width*i.image.height,f.getError()===f.OUT_OF_MEMORY&&console.log("Insufficient GPU memory for texture")),i.opacity!==n&&(n=i.opacity,f.uniform1fv(t.m_material.shaderProgram().uniformLocation("opacity"),new Float32Array([n]))),(i.zOffset||0)!==o&&(o=i.zOffset||0,f.uniform1fv(t.m_material.shaderProgram().uniformLocation("zOffset"),new Float32Array([o]))),a=i.crop||{x:1,y:1},p&&a.x===p.x&&a.y===p.y||(p=a,f.uniform2fv(t.m_material.shaderProgram().uniformLocation("crop"),new Float32Array([p.x||1,p.y||1]))),u=i.image.width,c=i.image.height,l=i.crop||{left:0,top:0,right:u,bottom:c},m&&l.left===m.left&&l.top===m.top&&l.right===m.right&&l.bottom===m.bottom&&d===u&&h===c||(m=l,d=u,h=c,f.uniform4fv(t.m_material.shaderProgram().uniformLocation("cropsource"),new Float32Array([m.left/u,m.top/c,m.right/u,m.bottom/c]))),f.bindBuffer(f.ARRAY_BUFFER,M.imgQuadsPosition),f.vertexAttribPointer(r.vertexAttributeKeys.Position,3,f.FLOAT,!1,12,12*e*4),f.enableVertexAttribArray(r.vertexAttributeKeys.Position),f.drawArrays(f.TRIANGLE_STRIP,0,4),i.texture.undoBind(t))})),f.bindBuffer(f.ARRAY_BUFFER,null),e.undoBindVertexData(t)}},this._update=function(){w.call(b),(b.buildTime().timestamp()<=b.dataTime().timestamp()||b.updateTime().timestamp()<b.timestamp())&&b._build(),m&&(m.setVisible(b.visible()),m.material().setBinNumber(b.bin())),p&&(p.setVisible(b.visible()),p.material().setBinNumber(b.bin())),b.updateTime().modified()},this._cleanup=function(){p&&(b.renderer().contextRenderer().removeActor(p),p=null),m&&(b.renderer().contextRenderer().removeActor(m),m=null),g=void 0,v=void 0,Object.keys(M).forEach((function(t){delete M[t]})),x&&x.imgQuads&&(x.imgQuads.forEach((function(t){t.texture&&(delete t.texture,delete t.image._texture)})),b._updateTextures()),b.modified()},this.setShader=function(t,e){switch(t){case"image_vertex":c=e;break;case"image_fragment":u=e;break;case"color_vertex":h=e;break;case"color_fragment":d=e;break;default:return}return b},this._exit=function(){b._cleanup(),_.call(b)},b._init(e),this};i(l,o);var u={};u[o.capabilities.color]=!0,u[o.capabilities.image]=!0,u[o.capabilities.imageCrop]=!0,u[o.capabilities.imageFixedScale]=!1,u[o.capabilities.imageFull]=!0,u[o.capabilities.canvas]=!1,u[o.capabilities.video]=!1,r("webgl","quad",l,u),t.exports=l},7112:function(t,e,n){var i=n(4647).registerLayerAdjustment,r=n(1940),o=function(){"use strict";var t,e=n(5108),i=this,o=this._init,a=this._exit,s=this._update,l=this.visible,u=this.zIndex,c=0,d=[];this._drawTile=function(e){if(t){var n,o,a=i._tileBounds(e),s=e.index.level||0,l=i._tileOffset(s),u=i.tileCropFromBounds(e),h={},f=i.renderer().contextRenderer().m_depthBits;u&&(h.crop={x:u.x/i._options.tileWidth,y:u.y/i._options.tileHeight}),h.ul=i.fromLocal(i.fromLevel({x:a.left-l.x,y:a.top-l.y},s),0),h.ll=i.fromLocal(i.fromLevel({x:a.left-l.x,y:a.bottom-l.y},s),0),h.ur=i.fromLocal(i.fromLevel({x:a.right-l.x,y:a.top-l.y},s),0),h.lr=i.fromLocal(i.fromLevel({x:a.right-l.x,y:a.bottom-l.y},s),0),h.ul.z=h.ll.z=h.ur.z=h.lr.z=0,n=i._options.keepLower?i._options.maxLevel-s+1:1,(o=(o=i.map().listSceneObjects().filter((function(t){return t instanceof r}))).slice(o.indexOf(i)+1)).forEach((function(t){n+=t._options.keepLower?t._options.maxLevel-t._options.minLevel+1:1})),h.zOffset=n*Math.pow(2,-f)*r._zOffsetMultiple,c+=1,h.id=c,e.quadId=h.id,h.image=e.image,d.push(h),t.data(d),t._update(),i.draw()}},this._remove=function(e){if(void 0!==e.quadId&&t){for(var n=0;n<d.length;n+=1)if(d[n].id===e.quadId){d.splice(n,1);break}t.data(d),t._update(),i.draw()}},this.visible=function(e){return void 0===e?l():(i.visible()!==e&&(l(e),t&&t.visible(t.visible(void 0,!0),!0)),i)},this.zIndex=function(t,e){return void 0!==t&&i._clearQuads(),u.apply(i,arguments)},this._clearQuads=function(n){(!n||n.layer&&n.layer instanceof r&&n.layer.autoshareRenderer()&&(n.event!==e.layerAdd&&n.event!==e.layerRemove||!i.map().layers().every((function(t){return t===n.layer||n.layer.zIndex()>t.zIndex()}))))&&(i.clear(),t&&t.modified(),n&&i.draw())},this._update=function(e){return s.call(i,e),i._addBaseQuadToTiles(t,d),i},this._cleanup=function(){var t;if(i.cache&&i.cache._cache){for(var e in i.cache._cache)(t=i.cache._cache[e])._image&&t._image._texture&&delete t._image._texture;i.cache.clear()}i.clear()},this._exit=function(){var n=i.map();n.geoOff(e.layerAdd,i._clearQuads),n.geoOff(e.layerRemove,i._clearQuads),i._cleanup(),i.deleteFeature(t),t=null,d=[],a.apply(i,arguments)},this._init=function(){o.apply(i,arguments),(t=i.createFeature("quad",{previewColor:i._options.previewColor,previewImage:i._options.previewImage})).geoTrigger=void 0,t.gcs(i._options.gcs||i.map().gcs()),t.data(d),t._update();var n=i.map();n.geoOn(e.layerAdd,i._clearQuads),n.geoOn(e.layerRemove,i._clearQuads),i.geoOn(e.unhidden,(function(){i.map().scheduleAnimationFrame((function(){i._clearQuads(),i.map().draw()}))}))},this._getSubLayer=function(){},this._updateSubLayers=void 0};r._zOffsetMultiple=2,i("webgl","tile",o),t.exports=o},506:function(t,e,n){var i=n(5699),r=n(4647).registerFeature,o=n(6223),a=function t(e){"use strict";return this instanceof t?(e=e||{},o.call(this,e),n(7719).call(this),this._init(e),this):new t(e)};i(a,o),r("webgl","track",a),t.exports=a},2254:function(t,e,n){var i,r=n(5699),o=n(4647).registerRenderer,a=n(3234),s=function t(e){"use strict";if(!(this instanceof t))return new t(e);e=e||{},a.call(this,e);var i,r=n(5638),o=n(320),s=n(5240),l=n(4634),u=n(5108),c=this,d=null,h=null,f=!1,p=this._init,m=this._exit;return this.contextRenderer=function(){return d},this.api=function(){return t.apiname},this._init=function(){if(c.initialized())return c;p.call(c);var t=e.canvas||r(document.createElement("canvas"));if(t.addClass("webgl-canvas"),r(c.layer().node().get(0)).append(t),window.overrideContextAttributes){var n=t.get(0),i=n.getContext;n.getContext=function(t,e){if(e=e||{},window.overrideContextAttributes)for(var r in window.overrideContextAttributes)window.overrideContextAttributes.hasOwnProperty(r)&&(e[r]=window.overrideContextAttributes[r]);return i.call(n,t,e)}}(h=o.viewer(t.get(0),e.options)).init(),(d=h.renderWindow().activeRenderer()).setResetScene(!1),h.renderWindow().renderers().length>0&&d.setLayer(h.renderWindow().renderers().length),c.canvas(t);var a=c.layer().map().size();return c._resize(0,0,a.width,a.height),c},this._resize=function(t,e,n,i){var r=h.renderWindow();return t===r.windowPosition[0]&&e===r.windowPosition[1]&&n===c.width()&&i===c.height()||(c._setWidthHeight(n,i),c.canvas().attr("width",n),c.canvas().attr("height",i),r.positionAndResize(t,e,n,i),f=!0,c._render()),c},this._render=function(){return c.layer().map().scheduleAnimationFrame(c._renderFrame,!0),c},this._renderFrame=function(){h&&(f&&(f=!1,c._updateRendererCamera()),h.render())},this._glContext=function(){return h&&h.renderWindow()?h.renderWindow().context():o.GL},this._exit=function(){if(c.layer().map().scheduleAnimationFrame(c._renderFrame,"remove"),c.canvas().remove(),h){var t=new o.renderState;t.m_renderer=h,t.m_context=c._glContext(),h.exit(t);var e=c._glContext();e!==o.GL&&e.getExtension("WEBGL_lose_context")&&e.getExtension("WEBGL_lose_context").loseContext&&e.getExtension("WEBGL_lose_context").loseContext()}o.clearCachedShaders(o.GL),h=null,m()},this._updateRendererCamera=function(){var t=h.renderWindow(),e=c.layer().map(),n=e.camera(),r=e.rotation()||0,o=n.view,a=n.projectionMatrix;if(a[15])a=s.copy(l.mat4AsArray(),a),a=s.scale(a,a,[1,1,-.5]),a=s.translate(a,a,[0,0,n.clipbounds.far]);else{var u=n.clipbounds.near,d=n.clipbounds.far;a=s.copy(l.mat4AsArray(),a),a=s.scale(a,a,[1/u,1/u,-1/d])}var f=Math.PI/2,p=r%f,m=Math.min(Math.abs(p),Math.abs(p-f))<1e-5;t.renderers().forEach((function(t){var r=t.camera();if(!l.compareArrays(o,r.viewMatrix())||!l.compareArrays(a,r.projectionMatrix())||i!==e.zoom()){i=e.zoom(),r.setViewMatrix(o,!0),r.setProjectionMatrix(a);var s=n.viewport;a[1]||a[2]||a[3]||a[4]||a[6]||a[7]||a[8]||a[9]||a[11]||1!==a[15]||!m||s.left&&s.left%1||s.top&&s.top%1||parseFloat(i.toFixed(6))!==parseFloat(i.toFixed(0))?r.viewAlignment=function(){return null}:r.viewAlignment=function(){var t={roundx:2/s.width,roundy:2/s.height};return t.dx=s.width%2?.5*t.roundx:0,t.dy=s.height%2?.5*t.roundy:0,t}}}))},c.layer().geoOn(u.pan,(function(t){f=!0})),c.layer().geoOn(u.parallelprojection,(function(t){var e=c.contextRenderer(),n=c.layer();if(t.geo&&t.geo._triggeredBy!==n){if(!e||!e.camera())return void console.log("Parallel projection event triggered on unconnected VGL renderer.");e.camera().setEnableParallelProjection(t.parallelProjection),f=!0}})),this};s.apiname="webgl",r(s,a),o("webgl",s),o("vgl",s),s.supported=function(){if(void 0===i){var t,e;try{(e=(t=document.createElement("canvas")).getContext("webgl")||t.getContext("experimental-webgl")).getSupportedExtensions().indexOf("WEBGL_debug_renderer_info")>=0&&(s._unmaskedRenderer=e.getParameter(e.getExtension("WEBGL_debug_renderer_info").UNMASKED_RENDERER_WEBGL)),s._maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),s._maxPointSize=e.getParameter(e.ALIASED_POINT_SIZE_RANGE)[1],i=!0}catch(t){console.warn("No webGL support"),i=!1}t=void 0,e=void 0,void 0}return i},s.fallback=function(){return null},t.exports=s},9552:function(t){"use strict";t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},406:function(t,e,n){"use strict";var i=n(559),r=n.n(i),o=n(3476),a=n.n(o)()(r());a.push([t.id,'.geojs-map{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden}.geojs-map .geo-attribution{position:absolute;right:0;bottom:0;padding-right:5px;cursor:auto;font:11px/1.5 "Helvetica Neue",Arial,Helvetica,sans-serif;z-index:1001;background:rgba(255,255,255,0.7);clear:both;display:block;pointer-events:auto}.geojs-map .geo-attribution .geo-attribution-layer{padding-left:5px}.geojs-map .canvas-canvas{display:block;-webkit-transform-origin:0 0;-moz-transform-origin:0 0;-o-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}.geojs-map .webgl-canvas{display:block}.geojs-map .geojs-layer{position:absolute;width:100%;height:100%;left:0;top:0;pointer-events:none}.geojs-map .geojs-layer.active:not(.hidden) > *{pointer-events:auto}.geojs-map .geojs-layer.hidden{display:none}.geojs-map .geojs-layer.hidden[renderer="webgl"]{display:inherit}.geojs-map .geo-tile-layer{-webkit-transform-origin:0 0;-moz-transform-origin:0 0;-o-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;line-height:0;font-size:0}.geojs-map.annotation-input{cursor:crosshair}.geojs-map.highlight-focus:after{content:"";display:block;position:absolute;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;left:0;top:0;right:0;bottom:0;border:3px solid Highlight;opacity:1;-ms-filter:none;filter:none;-webkit-transition:opacity 0s;-moz-transition:opacity 0s;-o-transition:opacity 0s;-ms-transition:opacity 0s;transition:opacity 0s;visibility:hidden}.geojs-map.highlight-focus:focus:after{visibility:visible;-webkit-transition:opacity 2.5s ease-in;-moz-transition:opacity 2.5s ease-in;-o-transition:opacity 2.5s ease-in;-ms-transition:opacity 2.5s ease-in;transition:opacity 2.5s ease-in;opacity:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0)}.geo-tile-container{position:absolute}.geo-tile-container.crop{overflow:hidden}',"",{version:3,sources:["webpack://./main.styl","webpack://./../node_modules/nib/lib/nib/vendor.styl","webpack://./../node_modules/nib/lib/nib/overflow.styl","webpack://./../node_modules/nib/lib/nib/flex.styl","webpack://./../node_modules/nib/lib/nib/border.styl"],names:[],mappings:"AAEA,WACE,iBAAS,CCwCO,wBAAG,CAAH,qBAAG,CAAH,oBAAG,CARN,gBAAG,CChBd,eAAU,CFZZ,4BACE,iBAAS,CACT,OAAM,CACN,QAAO,CACP,iBAAc,CCmfd,WAAO,CDjfP,yDAA8B,CAC9B,YAAQ,CCoeR,gCAAW,CDleX,UAAM,CGMN,aAAS,CHJT,mBAAe,CAEf,mDACE,gBAAa,CAEjB,0BGDE,aAAS,CFqBK,4BAAG,CAAH,yBAAG,CAAH,uBAAG,CAAH,wBAAG,CARN,oBAAG,CDThB,yBGJE,aAAS,CHOX,wBACE,iBAAS,CACT,UAAM,CACN,WAAO,CACP,MAAK,CACL,KAAI,CACJ,mBAAe,CAEb,gDACE,mBAAe,CACnB,+BGjBA,YAAS,CHmBT,iDGnBA,eAAS,CHsBX,2BCDgB,4BAAG,CAAH,yBAAG,CAAH,uBAAG,CAAH,wBAAG,CARN,oBAAG,CDWd,aAAY,CACZ,WAAU,CAEZ,4BC6cE,gBAAO,CDzcP,iCACE,UAAQ,CGhCV,aAAS,CHkCP,iBAAS,CCbG,6BAAG,CAAH,0BAAG,CARN,qBAAG,CDuBZ,MAAK,CACL,KAAI,CACJ,OAAM,CACN,QAAO,CIpDT,0BAAQ,CHmQV,SAAS,CAQH,eAAY,CACZ,WAAQ,CA5OE,6BAAG,CAAH,0BAAG,CAAH,wBAAG,CAAH,yBAAG,CARN,qBAAG,CDkCZ,iBAAW,CACb,uCACE,kBAAW,CC5BC,uCAAG,CAAH,oCAAG,CAAH,kCAAG,CAAH,mCAAG,CARN,+BAAG,CA2OhB,SAAS,CAWH,+DAAyE,CACzE,uBAAiC,CD/MzC,oBACE,iBAAS,CACT,yBExDE,eAAU",sourcesContent:['@import \'~nib/index.styl\'\n\n.geojs-map\n position relative\n user-select none\n overflow hidden\n\n .geo-attribution\n position absolute\n right 0\n bottom 0\n padding-right 5px\n cursor auto\n font 11px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif\n z-index 1001\n background rgba(255,255,255,0.7)\n clear both\n display block\n pointer-events auto\n\n .geo-attribution-layer\n padding-left 5px\n\n .canvas-canvas\n display block\n transform-origin 0px 0px\n .webgl-canvas\n display block\n\n .geojs-layer\n position absolute\n width 100%\n height 100%\n left 0\n top 0\n pointer-events none\n &.active:not(.hidden)\n > *\n pointer-events auto\n &.hidden\n display none\n &.hidden[renderer="webgl"]\n display inherit\n\n .geo-tile-layer\n transform-origin 0px 0px\n line-height 0\n font-size 0\n\n &.annotation-input\n cursor crosshair\n\n &.highlight-focus\n &:after\n content ""\n display block\n position absolute\n box-sizing border-box\n left 0px\n top 0px\n right 0px\n bottom 0px\n // Highlight is technically a css2 color. We may need to specify it\n // explicitly. #3B66A6 seems close\n border 3px solid Highlight\n opacity 1\n transition opacity 0s\n visibility hidden\n &:focus:after\n visibility visible\n transition opacity 2.5s ease-in\n opacity 0\n\n.geo-tile-container\n position absolute\n &.crop\n overflow hidden\n',"use('../nodes/vendor-helpers.js')\n@import 'config'\n\n/*\n * Alias \"nowrap\" as \"no-wrap\".\n */\n\nno-wrap = unquote('nowrap')\n\n/*\n * Helper to find out if a given value is a width\n */\n\nis-width(val)\n if auto == val\n return true\n else if val && 'unit' == type(val)\n // Stylus does not short circuit so we need to perform this as a distinct\n // operation to prevent errors\n return '' != unit(val)\n return false\n\n/*\n * Vendor support for the given prop / arguments, optionally specifying the\n * only prefixes to utilize, or those which should be ignored.\n */\n\nvendor(prop, args, only = null, ignore = null, vendor-property = true)\n need_normalize = !vendor-property or prop in ('transition' 'transition-property' 'border-image' 'border-image-slice')\n for prefix in vendor-prefixes\n unless (only and !(prefix in only)) or (ignore and prefix in ignore)\n if official == prefix\n if need_normalize\n {prop}: normalize(prop,('%s' % args))\n else\n {prop}: args\n else\n newprop = prop\n newprop = '-' + prefix + '-' + prop if vendor-property\n\n if need_normalize\n {newprop}: normalize(prop,('%s' % args),prefix)\n else\n {newprop}: args\n/*\n * Vendorize the given value.\n */\n\nvendor-value(arg, only = null, ignore = null)\n prop = current-property[0]\n for prefix in vendor-prefixes\n unless (only and !(prefix in only)) or (ignore and prefix in ignore) or official == prefix\n add-property(prop, '-%s-%s' % (prefix arg))\n arg\n\n/*\n * Vendor \"box-shadow\" support.\n */\n\nbox-shadow()\n vendor('box-shadow', arguments, only: webkit official)\n\n/*\n * Vendor \"user-select\" support.\n */\n\nuser-select()\n vendor('user-select', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"column-count\" support.\n */\n\ncolumn-count()\n vendor('column-count', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-gap\" support.\n */\n\ncolumn-gap()\n vendor('column-gap', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-rule\" support.\n */\n\ncolumn-rule()\n vendor('column-rule', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-rule-color\" support.\n */\n\ncolumn-rule-color()\n vendor('column-rule-color', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-rule-width\" support.\n */\n\ncolumn-rule-width()\n vendor('column-rule-width', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-rule-style\" support.\n */\n\ncolumn-rule-style()\n vendor('column-rule-style', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-width\" support.\n */\n\ncolumn-width()\n vendor('column-width', arguments, only: webkit moz official)\n\n/*\n * Vendor \"column-span\" support.\n */\n\ncolumn-span()\n vendor('column-span', arguments, only: webkit official)\n\n/*\n * Vendor \"column-fill\" support.\n */\n\ncolumn-fill()\n vendor('column-fill', arguments, only: moz)\n\n/*\n * Legacy syntax support for background-clip and background-origin\n */\n\nlegacy-bg-values(property, args)\n legacy_args = ()\n importance = unquote('')\n for subargs in args\n for arg in subargs\n if arg in (border-box padding-box content-box)\n arg = unquote('border') if arg == border-box\n arg = unquote('padding') if arg == padding-box\n arg = unquote('content') if arg == content-box\n if arg != '!important'\n push(legacy_args,arg)\n else\n importance = !important\n vendor(property, unquote(join(', ',legacy_args)) importance, only: moz webkit)\n\n/*\n * Vendor \"background-clip\" support.\n */\n\nbackground-clip()\n if arguments[0] == text\n vendor('background-clip', arguments, only: webkit)\n else\n legacy-bg-values('background-clip', arguments)\n background-clip: arguments\n\n/*\n * Vendor \"background-origin\" support.\n */\n\nbackground-origin()\n legacy-bg-values('background-origin', arguments)\n background-origin: arguments\n\n/*\n * Vendor \"background-size\" support.\n */\n\nbackground-size()\n vendor('background-size', arguments, only: webkit moz official)\n\n/*\n * Vendor \"transform\" support.\n */\n\ntransform()\n vendor('transform', arguments)\n\n/*\n * Vendor \"transform-origin\" support.\n */\ntransform-origin()\n vendor('transform-origin', arguments)\n\n/*\n * Vendor \"transform-style\" support.\n */\n\ntransform-style()\n vendor('transform-style', arguments)\n\n/*\n * Vendor \"border-image\" support.\n */\n\nborder-image()\n vendor('border-image', arguments, only: webkit moz o official)\n\n/*\n * Vendor \"transition\" support.\n */\n\ntransition()\n vendor('transition', arguments)\n\n/*\n * Vendor \"transition-property\" support.\n */\n\ntransition-property()\n vendor('transition-property', arguments)\n\n/*\n * Vendor \"transition-duration\" support.\n */\n\ntransition-duration()\n vendor('transition-duration', arguments)\n\n/*\n * Vendor \"transition-timing-function\" support.\n */\n\ntransition-timing-function()\n vendor('transition-timing-function', arguments)\n\n/*\n * Vendor \"transition-delay\" support.\n */\n\ntransition-delay()\n vendor('transition-delay', arguments)\n\n/*\n * Vendor \"backface-visibility\" support.\n */\n\nbackface-visibility()\n vendor('backface-visibility', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"perspective\" support.\n */\n\nperspective()\n if mixin\n vendor('perspective', arguments, only: webkit moz ms official)\n else\n 'perspective(%s)' % arguments\n\n/*\n * Vendor \"perspective-origin\" support.\n */\n\nperspective-origin()\n vendor('perspective-origin', arguments, only: webkit moz ms official)\n\n/*\n * Opacity with conditional IE support.\n */\n\nopacity(n, args...)\n opacity: n args\n if support-for-ie\n if n == inherit or n == initial\n -ms-filter: n args\n filter: n args\n else\n val = round(n * 100)\n if val == 100\n -ms-filter: none args\n filter: none args\n else\n -ms-filter: '\"progid:DXImageTransform.Microsoft.Alpha(Opacity=%s)\"' % val args\n filter: 'alpha(opacity=%s)' % val args\n\n/*\n * Vendor \"text-size-adjust\"\n */\n\ntext-size-adjust()\n vendor('text-size-adjust', arguments)\n\n/*\n * Alias the \"white-space\" property.\n */\n\nwhitespace()\n white-space: arguments\n\n/*\n * Vendor \"box-sizing\" support.\n */\n\nbox-sizing()\n vendor('box-sizing', arguments, only: webkit moz official)\n\n/*\n * Vendor \"box-orient\" support.\n */\n\nbox-orient()\n vendor('box-orient', arguments, only: webkit moz official)\n\n/*\n * Vendor \"box-flex-group\" support.\n */\n\nbox-flex-group()\n vendor('box-flex-group', arguments, only: webkit moz official)\n\n/*\n * Vendor \"box-ordinal-group\" support.\n */\n\nbox-ordinal-group()\n vendor('box-ordinal-group', arguments, only: webkit moz ms official)\n\n\n/*\n * Vendor \"box-align\" support.\n */\n\nbox-align()\n vendor('box-align', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"box-pack\" support.\n */\n\nbox-pack()\n vendor('box-pack', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"box-direction\" support.\n */\n\nbox-direction()\n vendor('box-direction', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"animation\" support.\n */\n\nanimation()\n vendor('animation', arguments)\n\n\n/*\n * Vendor \"animation-name\" support.\n */\n\nanimation-name()\n vendor('animation-name', arguments)\n\n/*\n * Vendor \"animation-duration\" support.\n */\n\nanimation-duration()\n vendor('animation-duration', arguments)\n\n/*\n * Vendor \"animation-delay\" support.\n */\n\nanimation-delay()\n vendor('animation-delay', arguments)\n\n/*\n * Vendor \"animation-direction\" support.\n */\n\nanimation-direction()\n vendor('animation-direction', arguments)\n\n/*\n * Vendor \"animation-iteration-count\" support.\n */\n\nanimation-iteration-count()\n vendor('animation-iteration-count', arguments)\n\n/*\n * Vendor \"animation-timing-function\" support.\n */\n\nanimation-timing-function()\n vendor('animation-timing-function', arguments)\n\n/*\n * Vendor \"animation-play-state\" support.\n */\n\nanimation-play-state()\n vendor('animation-play-state', arguments)\n\n/*\n * Vendor \"animation-fill-mode\" support.\n */\n\nanimation-fill-mode()\n vendor('animation-fill-mode', arguments)\n\n/*\n * Vendor \"hyphens\" support.\n */\n\nhyphens()\n vendor('hyphens', arguments, only: webkit moz ms official)\n\n/*\n * Vendor \"appearance\" support.\n */\n\nappearance()\n vendor('appearance', arguments, only: webkit moz official)\n\n/*\n * Vendor \"tab-size\" support.\n */\n\ntab-size()\n vendor('tab-size', arguments, only: moz o official)\n\n/*\n * Vendor \"overflow-scrolling\" support.\n */\n\noverflow-scrolling()\n vendor('overflow-scrolling', arguments, only: webkit official)\n\n/*\n * Vendor \"text-overflow\" support, , -o- for opera 9.* - 10.*\n */\n\ntext-overflow()\n vendor('text-overflow', arguments, only: official o)\n\n/*\n * Vendor \"text-size-adjust\" support.\n */\ntext-size-adjust()\n vendor('text-size-adjust', arguments, only: official webkit ms)\n\n/*\n * Vendor \"font-smoothing\" support, webkit only.\n */\nfont-smoothing()\n vendor('font-smoothing', arguments, only: webkit)\n\n\n/**\n * Vendor input-placeholder/placeholder support.\n *\n * Examples:\n * // Default syntax\n * body\n * placeholder(color #333, font-weight normal)\n *\n * // The comma is important\n * .placeholder-red\n * placeholder(color red,)\n *\n * // We can pass a function\n * green-placeholder()\n * color green\n * .placeholder-green\n * placeholder(green-placeholder)\n *\n * // We can pass a hash\n * textarea\n * placeholder((font-style italic) (font-weight bold) (padding '4px 10px'))\n */\nplaceholder()\n for v in ':-webkit-input' '-moz' ':-moz' '-ms-input'\n &:{v}-placeholder\n for pair in arguments\n if typeof(pair) == 'function'\n pair()\n else if pair is not null && pair[0] is not null\n {pair[0]}: type(pair[1]) == 'string' ? s(pair[1]) : pair[1]\ninput-placeholder = placeholder\n\n/*\n * Vendor background support (gradients).\n */\n\nbackground()\n if match('-gradient\\(', ''+arguments)\n vendor('background', arguments, vendor-property: false)\n else\n background arguments\n\nbackground-image()\n if match('-gradient\\(', ''+arguments)\n vendor('background-image', arguments, vendor-property: false)\n else\n background-image arguments\n\ncursor()\n if match('-gradient\\(', ''+arguments)\n vendor('cursor', arguments, vendor-property: false)\n else\n cursor arguments\n\nlist-style()\n if match('-gradient\\(', ''+arguments)\n vendor('list-style', arguments, vendor-property: false)\n else\n list-style arguments\n\nlist-style-image()\n if match('-gradient\\(', ''+arguments)\n vendor('list-style-image', arguments, vendor-property: false)\n else\n list-style-image arguments\n","/*\n * Overflow utility. Maps to regular overflow, and adds an ellipsis value.\n *\n * Synopsis:\n *\n * overflow: <type>\n *\n * Examples:\n *\n * overflow: auto\n * overflow: hidden\n * overflow: ellipsis\n *\n */\n\noverflow()\n if arguments[0] == ellipsis\n ellipsis()\n else\n overflow: arguments\n","/*\n * Vendor \"display: flex\" support with fallback to obsolete versions.\n */\n\nflex-version ?= box flex\n\n//\n// 1. Display values\n// - http://www.w3.org/TR/css3-flexbox/#flex-containers\n//\ndisplay(type, args...)\n if flex == type || inline-flex == type\n if box in flex-version\n if flex == type\n display: -ms-flexbox args\n display: vendor-value(box args, only: moz webkit)\n else\n display: -ms-inline-flexbox args\n display: vendor-value(inline-box args, only: moz webkit)\n if flex in flex-version\n display: vendor-value(arguments, only: webkit official) // overwrites old webkit\n else\n display: arguments\n\n/*\n * New syntax for browsers like Google Chrome.\n * Plus a translation to the old syntax, if possible.\n */\n\n\n//\n// 5. Ordering and Orientation\n// - http://www.w3.org/TR/css3-flexbox/#ordering-and-orientation\n//\n-flex-obsolete-direction(direction)\n if box in flex-version\n if row-reverse == direction || column-reverse == direction\n vendor('box-direction', reverse, ignore: ms official)\n\n if row == direction || row-reverse == direction\n vendor('box-orient', horizontal, ignore: ms official)\n else if column == direction || column-reverse == direction\n vendor('box-orient', vertical, ignore: ms official)\n\n-flex-obsolete-wrap(value)\n if box in flex-version\n // WARN: wrap-reverse does not have a box equivalent. This will render in different manners\n // on box vs. flex values.\n if 'wrap' == value || wrap-reverse == value\n vendor('box-lines', multiple, ignore: ms official)\n else if nowrap == value\n vendor('box-lines', single, ignore: ms official)\n\nflex-direction(direction)\n // obsolete\n -flex-obsolete-direction(direction)\n\n // new\n if flex in flex-version\n vendor('flex-direction', arguments, only: webkit ms official)\n\nflex-wrap(value)\n // obsolete\n -flex-obsolete-wrap(value)\n\n if flex in flex-version\n vendor('flex-wrap', arguments, only: webkit ms official)\n\nflex-flow()\n // obsolete\n -flex-obsolete-direction(arguments[0])\n -flex-obsolete-direction(arguments[1])\n -flex-obsolete-wrap(arguments[0])\n -flex-obsolete-wrap(arguments[1])\n\n // new\n if flex in flex-version\n vendor('flex-flow', arguments, only: webkit ms official)\n\n\norder()\n // obsolete\n if box in flex-version\n vendor('box-ordinal-group', arguments, ignore: ms official)\n\n // new\n if flex in flex-version\n vendor('flex-order', arguments, only: ms)\n vendor('order', arguments, only: webkit official)\n\n\n//\n// 7. Flexibility\n// - http://www.w3.org/TR/css3-flexbox/#flexibility\n//\nflex-grow(growth)\n // obsolete\n if box in flex-version\n vendor('box-flex', growth)\n\n // new\n if flex in flex-version\n vendor('flex-grow', arguments, only: webkit official)\n\nflex-basis()\n if flex in flex-version\n vendor('flex-basis', arguments, only: webkit official)\n\nflex-shrink()\n if flex in flex-version\n vendor('flex-shrink', arguments, only: webkit official)\n\nflex(growth)\n\n // obsolete\n if box in flex-version\n shrink = 1\n\n if none == growth || initial == growth\n // Well known values\n shrink = 0 if none == growth\n growth = 0\n else if is-width(growth) == true\n // Basis is defined as the first parameter\n growth = arguments[1] || 0\n shrink = arguments[2] if 3 <= length(arguments)\n else if arguments[1] && is-width(arguments[1]) == false\n // Growth is first and shrink is second\n shrink = arguments[1]\n\n // Since we can't make the distinction between growing and shrinking in the box model, take\n // the one that provides the most flexibility.\n vendor('box-flex', max(growth, shrink), ignore: ms)\n\n // new\n if flex in flex-version\n vendor('flex', arguments, only: webkit ms official)\n\n\n// converts the justification alignment\n-convert-justify(align)\n if flex-start == align\n return start\n else if flex-end == align\n return end\n else if space-around == align\n return distribute\n else if space-between == align\n return justify\n else\n return align\n\n//\n// 8. Alignment\n// - http://www.w3.org/TR/css3-flexbox/#alignment\n//\njustify-content(align)\n // obsolete\n if box in flex-version\n vendor('box-pack', -convert-justify(align), ignore: ms official)\n\n // new\n if flex in flex-version\n vendor('flex-pack', -convert-justify(align), only: ms)\n vendor('justify-content', align, only: webkit official)\n\nalign-content(align)\n // WARN: Obsolete spec does not allow for adjustment here\n if flex in flex-version\n vendor('flex-line-pack', -convert-justify(align), only: ms)\n vendor('align-content', align, only: webkit official)\n\n// converts alignment from 'flex' to normal value\n-convert-alignment(align)\n if flex-start == align\n return start\n else if flex-end == align\n return end\n else\n return align\n\nalign-items(align)\n // obsolete\n if box in flex-version\n vendor('box-align', -convert-alignment(align), ignore: ms official)\n\n // new\n if flex in flex-version\n vendor('flex-align', -convert-alignment(align), only: ms)\n vendor('align-items', arguments, only: webkit official)\n\nalign-self(align)\n // WARN: Obsolete spec does not allow for overriding alignment on individual items.\n if flex in flex-version\n vendor('align-self', align, only: webkit official)\n vendor('flex-item-align', -convert-alignment(align), only: ms)\n","/*\n * border: <color>\n * border: ...\n */\n\nborder(color, args...)\n if color is a 'color'\n border: 1px solid color args\n else\n border: arguments\n"],sourceRoot:""}]),e.Z=a},7747:function(t,e,n){"use strict";var i=n(559),r=n.n(i),o=n(3476),a=n.n(o)()(r());a.push([t.id,".color-legend-container{display:none;padding:10px;border:1.5px solid #000;border-radius:3px;transition:250ms background linear;background-color:rgba(255,255,255,0.75)}.color-legend-container:hover{background-color:#fff}.color-legend-container .geojs-color-legends .geojs-color-legend{margin-bottom:10px}.color-legend-container .geojs-color-legends .geojs-color-legend .geojs-title{text-align:center}.color-legend-container .geojs-color-legends .geojs-color-legend svg.svg{display:block}.color-legend-container .geojs-color-legends .geojs-color-legend svg.svg .axis.x path.domain,.color-legend-container .geojs-color-legends .geojs-color-legend svg.svg .axis.x line{fill:none;stroke:#000;stroke-width:.7}.color-legend-container .geojs-color-legends .geojs-color-legend svg.svg .axis.x text{font-size:12px}.color-legend-container .color-legend-popup{position:absolute;background:#fff;height:22px;font-size:14px;border:solid 1px #000;padding:0 5px;pointer-events:none;white-space:nowrap;z-index:100000;opacity:0}","",{version:3,sources:["webpack://./ui/colorLegendWidget.styl"],names:[],mappings:"AAAA,wBACE,YAAQ,CACR,YAAQ,CACR,uBAAO,CACP,iBAAc,CACd,kCAAW,CACX,uCAAiB,CAEjB,8BACE,qBAAiB,CAIjB,iEACE,kBAAc,CAEd,8EACE,iBAAW,CAEb,yEACE,aAAQ,CAGN,mLACE,SAAK,CACL,WAAO,CACP,eAAa,CACf,sFACE,cAAU,CAEpB,4CACE,iBAAS,CACT,eAAW,CACX,WAAO,CACP,cAAU,CACV,qBAAO,CACP,aAAQ,CACR,mBAAe,CACf,kBAAY,CACZ,cAAQ,CACR,SAAQ",sourcesContent:[".color-legend-container\n display none\n padding 10px\n border 1.5px solid black\n border-radius 3px\n transition 250ms background linear\n background-color rgba(255, 255, 255, 0.75)\n\n &:hover\n background-color rgba(255, 255, 255, 1)\n\n .geojs-color-legends\n\n .geojs-color-legend\n margin-bottom 10px\n\n .geojs-title\n text-align center\n\n svg.svg\n display block\n\n .axis.x\n path.domain, line\n fill none\n stroke black\n stroke-width 0.7\n text\n font-size 12px\n\n .color-legend-popup\n position absolute\n background white\n height 22px\n font-size 14px\n border solid 1px black\n padding 0 5px\n pointer-events none\n white-space nowrap\n z-index 100000\n opacity 0\n"],sourceRoot:""}]),e.Z=a},1680:function(t,e,n){"use strict";var i=n(559),r=n.n(i),o=n(3476),a=n.n(o)()(r());a.push([t.id,".geojs-scale-widget-bar{stroke:#000}.geojs-scale-widget-text{font-weight:bold;font-size:16px;font-family:serif}","",{version:3,sources:["webpack://./ui/scaleWidget.styl"],names:[],mappings:"AAAA,wBACE,WAAO,CACT,yBACE,gBAAY,CACZ,cAAU,CACV,iBAAY",sourcesContent:[".geojs-scale-widget-bar\n stroke black\n.geojs-scale-widget-text\n font-weight bold\n font-size 16px\n font-family serif\n"],sourceRoot:""}]),e.Z=a},3476:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,r,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(i)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var u=0;u<t.length;u++){var c=[].concat(t[u]);i&&a[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),r&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=r):c[4]="".concat(r)),e.push(c))}},e}},559:function(t){"use strict";t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),o="/*# ".concat(r," */"),a=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[e].concat(a).concat([o]).join("\n")}return[e].join("\n")}},1106:function(t){"use strict";function e(t,e,o){o=o||2;var a,s,l,d,h,p,m,g=e&&e.length,v=g?e[0]*o:t.length,y=n(t,0,v,o,!0),x=[];if(!y||y.next===y.prev)return x;if(g&&(y=function(t,e,r,o){var a,s,l,d=[];for(a=0,s=e.length;a<s;a++)(l=n(t,e[a]*o,a<s-1?e[a+1]*o:t.length,o,!1))===l.next&&(l.steiner=!0),d.push(f(l));for(d.sort(u),a=0;a<d.length;a++)r=i(r=c(d[a],r),r.next);return r}(t,e,y,o)),t.length>80*o){a=l=t[0],s=d=t[1];for(var b=o;b<v;b+=o)(h=t[b])<a&&(a=h),(p=t[b+1])<s&&(s=p),h>l&&(l=h),p>d&&(d=p);m=0!==(m=Math.max(l-a,d-s))?1/m:0}return r(y,x,o,a,s,m),x}function n(t,e,n,i,r){var o,a;if(r===C(t,e,n,i)>0)for(o=e;o<n;o+=i)a=M(o,t[o],t[o+1],a);else for(o=n-i;o>=e;o-=i)a=M(o,t[o],t[o+1],a);return a&&v(a,a.next)&&(A(a),a=a.next),a}function i(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!v(i,i.next)&&0!==g(i.prev,i,i.next))i=i.next;else{if(A(i),(i=e=i.prev)===i.next)break;n=!0}}while(n||i!==e);return e}function r(t,e,n,u,c,d,f){if(t){!f&&d&&function(t,e,n,i){var r=t;do{null===r.z&&(r.z=h(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,n,i,r,o,a,s,l,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,i=n,s=0,e=0;e<u&&(s++,i=i.nextZ);e++);for(l=u;s>0||l>0&&i;)0!==s&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,s--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,u*=2}while(a>1)}(r)}(t,u,c,d);for(var p,m,g=t;t.prev!==t.next;)if(p=t.prev,m=t.next,d?a(t,u,c,d):o(t))e.push(p.i/n),e.push(t.i/n),e.push(m.i/n),A(t),t=m.next,g=m.next;else if((t=m)===g){f?1===f?r(t=s(i(t),e,n),e,n,u,c,d,2):2===f&&l(t,e,n,u,c,d):r(i(t),e,n,u,c,d,1);break}}}function o(t){var e=t.prev,n=t,i=t.next;if(g(e,n,i)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(p(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&g(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function a(t,e,n,i){var r=t.prev,o=t,a=t.next;if(g(r,o,a)>=0)return!1;for(var s=r.x<o.x?r.x<a.x?r.x:a.x:o.x<a.x?o.x:a.x,l=r.y<o.y?r.y<a.y?r.y:a.y:o.y<a.y?o.y:a.y,u=r.x>o.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,c=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,d=h(s,l,e,n,i),f=h(u,c,e,n,i),m=t.prevZ,v=t.nextZ;m&&m.z>=d&&v&&v.z<=f;){if(m!==t.prev&&m!==t.next&&p(r.x,r.y,o.x,o.y,a.x,a.y,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;if(m=m.prevZ,v!==t.prev&&v!==t.next&&p(r.x,r.y,o.x,o.y,a.x,a.y,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;m&&m.z>=d;){if(m!==t.prev&&m!==t.next&&p(r.x,r.y,o.x,o.y,a.x,a.y,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.prevZ}for(;v&&v.z<=f;){if(v!==t.prev&&v!==t.next&&p(r.x,r.y,o.x,o.y,a.x,a.y,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function s(t,e,n){var r=t;do{var o=r.prev,a=r.next.next;!v(o,a)&&y(o,r,r.next,a)&&_(o,a)&&_(a,o)&&(e.push(o.i/n),e.push(r.i/n),e.push(a.i/n),A(r),A(r.next),r=t=a),r=r.next}while(r!==t);return i(r)}function l(t,e,n,o,a,s){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&m(l,u)){var c=w(l,u);return l=i(l,l.next),c=i(c,c.next),r(l,e,n,o,a,s),void r(c,e,n,o,a,s)}u=u.next}l=l.next}while(l!==t)}function u(t,e){return t.x-e.x}function c(t,e){var n=function(t,e){var n,i=e,r=t.x,o=t.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=r&&s>a){if(a=s,s===r){if(o===i.y)return i;if(o===i.next.y)return i.next}n=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!n)return null;if(r===a)return n;var l,u=n,c=n.x,h=n.y,f=1/0;i=n;do{r>=i.x&&i.x>=c&&r!==i.x&&p(o<h?r:a,o,c,h,o<h?a:r,o,i.x,i.y)&&(l=Math.abs(o-i.y)/(r-i.x),_(i,t)&&(l<f||l===f&&(i.x>n.x||i.x===n.x&&d(n,i)))&&(n=i,f=l)),i=i.next}while(i!==u);return n}(t,e);if(!n)return e;var r=w(n,t),o=i(n,n.next);return i(r,r.next),e===n?o:e}function d(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function h(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function f(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function p(t,e,n,i,r,o,a,s){return(r-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(i-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(r-a)*(i-s)>=0}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&y(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(_(t,e)&&_(e,t)&&function(t,e){var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||v(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function v(t,e){return t.x===e.x&&t.y===e.y}function y(t,e,n,i){var r=b(g(t,e,n)),o=b(g(t,e,i)),a=b(g(n,i,t)),s=b(g(n,i,e));return r!==o&&a!==s||(!(0!==r||!x(t,n,e))||(!(0!==o||!x(t,i,e))||(!(0!==a||!x(n,t,i))||!(0!==s||!x(n,e,i)))))}function x(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function b(t){return t>0?1:t<0?-1:0}function _(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function w(t,e){var n=new T(t.i,t.x,t.y),i=new T(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function M(t,e,n,i){var r=new T(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function A(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function T(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,n,i){for(var r=0,o=e,a=n-i;o<n;o+=i)r+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return r}t.exports=e,t.exports.default=e,e.deviation=function(t,e,n,i){var r=e&&e.length,o=r?e[0]*n:t.length,a=Math.abs(C(t,0,o,n));if(r)for(var s=0,l=e.length;s<l;s++){var u=e[s]*n,c=s<l-1?e[s+1]*n:t.length;a-=Math.abs(C(t,u,c,n))}var d=0;for(s=0;s<i.length;s+=3){var h=i[s]*n,f=i[s+1]*n,p=i[s+2]*n;d+=Math.abs((t[h]-t[p])*(t[f+1]-t[h+1])-(t[h]-t[f])*(t[p+1]-t[h+1]))}return 0===a&&0===d?0:Math.abs((d-a)/a)},e.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},i=0,r=0;r<t.length;r++){for(var o=0;o<t[r].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[r][o][a]);r>0&&(i+=t[r-1].length,n.holes.push(i))}return n}},320:function(t,e,n){var i=n(6502);n(40).vgl=i,t.exports=i},40:function(t,e,n){"use strict";t.exports=function(){if("object"==typeof globalThis)return globalThis;var t;try{t=this||new Function("return this")()}catch(t){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==n.g)return n.g}return t}()},8543:function(t){t.exports=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8];return t[0]=a*c-s*u,t[1]=r*u-i*c,t[2]=i*s-r*a,t[3]=s*l-o*c,t[4]=n*c-r*l,t[5]=r*o-n*s,t[6]=o*u-a*l,t[7]=i*l-n*u,t[8]=n*a-i*o,t}},4995:function(t){t.exports=function(t){var e=new Float32Array(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}},7186:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}},1871:function(t){t.exports=function(){var t=new Float32Array(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}},3854:function(t){t.exports=function(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],l=t[7],u=t[8];return e*(u*o-a*l)+n*(a*s-u*r)+i*(l*r-o*s)}},9263:function(t){t.exports=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]+t[3]*t[3]+t[4]*t[4]+t[5]*t[5]+t[6]*t[6]+t[7]*t[7]+t[8]*t[8])}},6503:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t}},3229:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}},4523:function(t){t.exports=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n+n,s=i+i,l=r+r,u=n*a,c=i*a,d=i*s,h=r*a,f=r*s,p=r*l,m=o*a,g=o*s,v=o*l;return t[0]=1-d-p,t[3]=c-v,t[6]=h+g,t[1]=c+v,t[4]=1-u-p,t[7]=f-m,t[2]=h-g,t[5]=f+m,t[8]=1-u-d,t}},6511:function(t){t.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}},8054:function(t,e,n){t.exports={adjoint:n(8543),clone:n(4995),copy:n(7186),create:n(1871),determinant:n(3854),frob:n(9263),fromMat2:n(6503),fromMat4:n(3229),fromQuat:n(4523),identity:n(6511),invert:n(8104),multiply:n(9063),normalFromMat4:n(3100),rotate:n(5637),scale:n(9281),str:n(6224),translate:n(1078),transpose:n(4879)}},8104:function(t){t.exports=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],d=c*a-s*u,h=-c*o+s*l,f=u*o-a*l,p=n*d+i*h+r*f;return p?(p=1/p,t[0]=d*p,t[1]=(-c*i+r*u)*p,t[2]=(s*i-r*a)*p,t[3]=h*p,t[4]=(c*n-r*l)*p,t[5]=(-s*n+r*o)*p,t[6]=f*p,t[7]=(-u*n+i*l)*p,t[8]=(a*n-i*o)*p,t):null}},9063:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],d=e[8],h=n[0],f=n[1],p=n[2],m=n[3],g=n[4],v=n[5],y=n[6],x=n[7],b=n[8];return t[0]=h*i+f*a+p*u,t[1]=h*r+f*s+p*c,t[2]=h*o+f*l+p*d,t[3]=m*i+g*a+v*u,t[4]=m*r+g*s+v*c,t[5]=m*o+g*l+v*d,t[6]=y*i+x*a+b*u,t[7]=y*r+x*s+b*c,t[8]=y*o+x*l+b*d,t}},3100:function(t){t.exports=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],d=e[9],h=e[10],f=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=n*s-i*a,x=n*l-r*a,b=n*u-o*a,_=i*l-r*s,w=i*u-o*s,M=r*u-o*l,A=c*m-d*p,T=c*g-h*p,C=c*v-f*p,E=d*g-h*m,S=d*v-f*m,k=h*v-f*g,P=y*k-x*S+b*E+_*C-w*T+M*A;return P?(P=1/P,t[0]=(s*k-l*S+u*E)*P,t[1]=(l*C-a*k-u*T)*P,t[2]=(a*S-s*C+u*A)*P,t[3]=(r*S-i*k-o*E)*P,t[4]=(n*k-r*C+o*T)*P,t[5]=(i*C-n*S-o*A)*P,t[6]=(m*M-g*w+v*_)*P,t[7]=(g*b-p*M-v*x)*P,t[8]=(p*w-m*b+v*y)*P,t):null}},5637:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],d=e[8],h=Math.sin(n),f=Math.cos(n);return t[0]=f*i+h*a,t[1]=f*r+h*s,t[2]=f*o+h*l,t[3]=f*a-h*i,t[4]=f*s-h*r,t[5]=f*l-h*o,t[6]=u,t[7]=c,t[8]=d,t}},9281:function(t){t.exports=function(t,e,n){var i=n[0],r=n[1];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}},6224:function(t){t.exports=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}},1078:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],d=e[8],h=n[0],f=n[1];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=h*i+f*a+u,t[7]=h*r+f*s+c,t[8]=h*o+f*l+d,t}},4879:function(t){t.exports=function(t,e){if(t===e){var n=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}},316:function(t){t.exports=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],d=e[9],h=e[10],f=e[11],p=e[12],m=e[13],g=e[14],v=e[15];return t[0]=s*(h*v-f*g)-d*(l*v-u*g)+m*(l*f-u*h),t[1]=-(i*(h*v-f*g)-d*(r*v-o*g)+m*(r*f-o*h)),t[2]=i*(l*v-u*g)-s*(r*v-o*g)+m*(r*u-o*l),t[3]=-(i*(l*f-u*h)-s*(r*f-o*h)+d*(r*u-o*l)),t[4]=-(a*(h*v-f*g)-c*(l*v-u*g)+p*(l*f-u*h)),t[5]=n*(h*v-f*g)-c*(r*v-o*g)+p*(r*f-o*h),t[6]=-(n*(l*v-u*g)-a*(r*v-o*g)+p*(r*u-o*l)),t[7]=n*(l*f-u*h)-a*(r*f-o*h)+c*(r*u-o*l),t[8]=a*(d*v-f*m)-c*(s*v-u*m)+p*(s*f-u*d),t[9]=-(n*(d*v-f*m)-c*(i*v-o*m)+p*(i*f-o*d)),t[10]=n*(s*v-u*m)-a*(i*v-o*m)+p*(i*u-o*s),t[11]=-(n*(s*f-u*d)-a*(i*f-o*d)+c*(i*u-o*s)),t[12]=-(a*(d*g-h*m)-c*(s*g-l*m)+p*(s*h-l*d)),t[13]=n*(d*g-h*m)-c*(i*g-r*m)+p*(i*h-r*d),t[14]=-(n*(s*g-l*m)-a*(i*g-r*m)+p*(i*l-r*s)),t[15]=n*(s*h-l*d)-a*(i*h-r*d)+c*(i*l-r*s),t}},6232:function(t){t.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},4408:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},703:function(t){t.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},3845:function(t){t.exports=function(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],d=t[10],h=t[11],f=t[12],p=t[13],m=t[14],g=t[15];return(e*a-n*o)*(d*g-h*m)-(e*s-i*o)*(c*g-h*p)+(e*l-r*o)*(c*m-d*p)+(n*s-i*a)*(u*g-h*f)-(n*l-r*a)*(u*m-d*f)+(i*l-r*s)*(u*p-c*f)}},9259:function(t){t.exports=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n+n,s=i+i,l=r+r,u=n*a,c=i*a,d=i*s,h=r*a,f=r*s,p=r*l,m=o*a,g=o*s,v=o*l;return t[0]=1-d-p,t[1]=c+v,t[2]=h-g,t[3]=0,t[4]=c-v,t[5]=1-u-p,t[6]=f+m,t[7]=0,t[8]=h+g,t[9]=f-m,t[10]=1-u-d,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8625:function(t){t.exports=function(t,e,n){var i,r,o,a=n[0],s=n[1],l=n[2],u=Math.sqrt(a*a+s*s+l*l);if(Math.abs(u)<1e-6)return null;return a*=u=1/u,s*=u,l*=u,i=Math.sin(e),r=Math.cos(e),o=1-r,t[0]=a*a*o+r,t[1]=s*a*o+l*i,t[2]=l*a*o-s*i,t[3]=0,t[4]=a*s*o-l*i,t[5]=s*s*o+r,t[6]=l*s*o+a*i,t[7]=0,t[8]=a*l*o+s*i,t[9]=s*l*o-a*i,t[10]=l*l*o+r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8844:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=i+i,l=r+r,u=o+o,c=i*s,d=i*l,h=i*u,f=r*l,p=r*u,m=o*u,g=a*s,v=a*l,y=a*u;return t[0]=1-(f+m),t[1]=d+y,t[2]=h-v,t[3]=0,t[4]=d-y,t[5]=1-(c+m),t[6]=p+g,t[7]=0,t[8]=h+v,t[9]=p-g,t[10]=1-(c+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}},3107:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},6645:function(t){t.exports=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}},1:function(t){t.exports=function(t,e){var n=Math.sin(e),i=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=i,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8503:function(t){t.exports=function(t,e){var n=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8990:function(t){t.exports=function(t,e){var n=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=i,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},6901:function(t){t.exports=function(t,e,n,i,r,o,a){var s=1/(n-e),l=1/(r-i),u=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(r+i)*l,t[10]=(a+o)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*u,t[15]=0,t}},1156:function(t){t.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},5240:function(t,e,n){t.exports={create:n(703),clone:n(6232),copy:n(4408),identity:n(1156),transpose:n(3039),invert:n(9573),adjoint:n(316),determinant:n(3845),multiply:n(6498),translate:n(164),scale:n(1119),rotate:n(4175),rotateX:n(3116),rotateY:n(6428),rotateZ:n(9041),fromRotation:n(8625),fromRotationTranslation:n(8844),fromScaling:n(3107),fromTranslation:n(6645),fromXRotation:n(1),fromYRotation:n(8503),fromZRotation:n(8990),fromQuat:n(9259),frustum:n(6901),perspective:n(2343),perspectiveFromFieldOfView:n(7863),ortho:n(753),lookAt:n(398),str:n(6758)}},9573:function(t){t.exports=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],d=e[9],h=e[10],f=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=n*s-i*a,x=n*l-r*a,b=n*u-o*a,_=i*l-r*s,w=i*u-o*s,M=r*u-o*l,A=c*m-d*p,T=c*g-h*p,C=c*v-f*p,E=d*g-h*m,S=d*v-f*m,k=h*v-f*g,P=y*k-x*S+b*E+_*C-w*T+M*A;if(!P)return null;return P=1/P,t[0]=(s*k-l*S+u*E)*P,t[1]=(r*S-i*k-o*E)*P,t[2]=(m*M-g*w+v*_)*P,t[3]=(h*w-d*M-f*_)*P,t[4]=(l*C-a*k-u*T)*P,t[5]=(n*k-r*C+o*T)*P,t[6]=(g*b-p*M-v*x)*P,t[7]=(c*M-h*b+f*x)*P,t[8]=(a*S-s*C+u*A)*P,t[9]=(i*C-n*S-o*A)*P,t[10]=(p*w-m*b+v*y)*P,t[11]=(d*b-c*w-f*y)*P,t[12]=(s*T-a*E-l*A)*P,t[13]=(n*E-i*T+r*A)*P,t[14]=(m*x-p*_-g*y)*P,t[15]=(c*_-d*x+h*y)*P,t}},398:function(t,e,n){var i=n(1156);t.exports=function(t,e,n,r){var o,a,s,l,u,c,d,h,f,p,m=e[0],g=e[1],v=e[2],y=r[0],x=r[1],b=r[2],_=n[0],w=n[1],M=n[2];if(Math.abs(m-_)<1e-6&&Math.abs(g-w)<1e-6&&Math.abs(v-M)<1e-6)return i(t);d=m-_,h=g-w,f=v-M,p=1/Math.sqrt(d*d+h*h+f*f),o=x*(f*=p)-b*(h*=p),a=b*(d*=p)-y*f,s=y*h-x*d,(p=Math.sqrt(o*o+a*a+s*s))?(o*=p=1/p,a*=p,s*=p):(o=0,a=0,s=0);l=h*s-f*a,u=f*o-d*s,c=d*a-h*o,(p=Math.sqrt(l*l+u*u+c*c))?(l*=p=1/p,u*=p,c*=p):(l=0,u=0,c=0);return t[0]=o,t[1]=l,t[2]=d,t[3]=0,t[4]=a,t[5]=u,t[6]=h,t[7]=0,t[8]=s,t[9]=c,t[10]=f,t[11]=0,t[12]=-(o*m+a*g+s*v),t[13]=-(l*m+u*g+c*v),t[14]=-(d*m+h*g+f*v),t[15]=1,t}},6498:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],d=e[8],h=e[9],f=e[10],p=e[11],m=e[12],g=e[13],v=e[14],y=e[15],x=n[0],b=n[1],_=n[2],w=n[3];return t[0]=x*i+b*s+_*d+w*m,t[1]=x*r+b*l+_*h+w*g,t[2]=x*o+b*u+_*f+w*v,t[3]=x*a+b*c+_*p+w*y,x=n[4],b=n[5],_=n[6],w=n[7],t[4]=x*i+b*s+_*d+w*m,t[5]=x*r+b*l+_*h+w*g,t[6]=x*o+b*u+_*f+w*v,t[7]=x*a+b*c+_*p+w*y,x=n[8],b=n[9],_=n[10],w=n[11],t[8]=x*i+b*s+_*d+w*m,t[9]=x*r+b*l+_*h+w*g,t[10]=x*o+b*u+_*f+w*v,t[11]=x*a+b*c+_*p+w*y,x=n[12],b=n[13],_=n[14],w=n[15],t[12]=x*i+b*s+_*d+w*m,t[13]=x*r+b*l+_*h+w*g,t[14]=x*o+b*u+_*f+w*v,t[15]=x*a+b*c+_*p+w*y,t}},753:function(t){t.exports=function(t,e,n,i,r,o,a){var s=1/(e-n),l=1/(i-r),u=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+n)*s,t[13]=(r+i)*l,t[14]=(a+o)*u,t[15]=1,t}},2343:function(t){t.exports=function(t,e,n,i,r){var o=1/Math.tan(e/2),a=1/(i-r);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(r+i)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*r*i*a,t[15]=0,t}},7863:function(t){t.exports=function(t,e,n,i){var r=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(a+s),u=2/(r+o);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-(a-s)*l*.5,t[9]=(r-o)*u*.5,t[10]=i/(n-i),t[11]=-1,t[12]=0,t[13]=0,t[14]=i*n/(n-i),t[15]=0,t}},4175:function(t){t.exports=function(t,e,n,i){var r,o,a,s,l,u,c,d,h,f,p,m,g,v,y,x,b,_,w,M,A,T,C,E,S=i[0],k=i[1],P=i[2],O=Math.sqrt(S*S+k*k+P*P);if(Math.abs(O)<1e-6)return null;S*=O=1/O,k*=O,P*=O,r=Math.sin(n),o=Math.cos(n),a=1-o,s=e[0],l=e[1],u=e[2],c=e[3],d=e[4],h=e[5],f=e[6],p=e[7],m=e[8],g=e[9],v=e[10],y=e[11],x=S*S*a+o,b=k*S*a+P*r,_=P*S*a-k*r,w=S*k*a-P*r,M=k*k*a+o,A=P*k*a+S*r,T=S*P*a+k*r,C=k*P*a-S*r,E=P*P*a+o,t[0]=s*x+d*b+m*_,t[1]=l*x+h*b+g*_,t[2]=u*x+f*b+v*_,t[3]=c*x+p*b+y*_,t[4]=s*w+d*M+m*A,t[5]=l*w+h*M+g*A,t[6]=u*w+f*M+v*A,t[7]=c*w+p*M+y*A,t[8]=s*T+d*C+m*E,t[9]=l*T+h*C+g*E,t[10]=u*T+f*C+v*E,t[11]=c*T+p*C+y*E,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t}},3116:function(t){t.exports=function(t,e,n){var i=Math.sin(n),r=Math.cos(n),o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],d=e[10],h=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[4]=o*r+u*i,t[5]=a*r+c*i,t[6]=s*r+d*i,t[7]=l*r+h*i,t[8]=u*r-o*i,t[9]=c*r-a*i,t[10]=d*r-s*i,t[11]=h*r-l*i,t}},6428:function(t){t.exports=function(t,e,n){var i=Math.sin(n),r=Math.cos(n),o=e[0],a=e[1],s=e[2],l=e[3],u=e[8],c=e[9],d=e[10],h=e[11];e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=o*r-u*i,t[1]=a*r-c*i,t[2]=s*r-d*i,t[3]=l*r-h*i,t[8]=o*i+u*r,t[9]=a*i+c*r,t[10]=s*i+d*r,t[11]=l*i+h*r,t}},9041:function(t){t.exports=function(t,e,n){var i=Math.sin(n),r=Math.cos(n),o=e[0],a=e[1],s=e[2],l=e[3],u=e[4],c=e[5],d=e[6],h=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=o*r+u*i,t[1]=a*r+c*i,t[2]=s*r+d*i,t[3]=l*r+h*i,t[4]=u*r-o*i,t[5]=c*r-a*i,t[6]=d*r-s*i,t[7]=h*r-l*i,t}},1119:function(t){t.exports=function(t,e,n){var i=n[0],r=n[1],o=n[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},6758:function(t){t.exports=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}},164:function(t){t.exports=function(t,e,n){var i,r,o,a,s,l,u,c,d,h,f,p,m=n[0],g=n[1],v=n[2];e===t?(t[12]=e[0]*m+e[4]*g+e[8]*v+e[12],t[13]=e[1]*m+e[5]*g+e[9]*v+e[13],t[14]=e[2]*m+e[6]*g+e[10]*v+e[14],t[15]=e[3]*m+e[7]*g+e[11]*v+e[15]):(i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],d=e[8],h=e[9],f=e[10],p=e[11],t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=d,t[9]=h,t[10]=f,t[11]=p,t[12]=i*m+s*g+d*v+e[12],t[13]=r*m+l*g+h*v+e[13],t[14]=o*m+u*g+f*v+e[14],t[15]=a*m+c*g+p*v+e[15]);return t}},3039:function(t){t.exports=function(t,e){if(t===e){var n=e[1],i=e[2],r=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=o,t[11]=e[14],t[12]=r,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},7207:function(t){t.exports=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}},3959:function(t,e,n){t.exports=function(t,e){var n=i(t[0],t[1],t[2]),a=i(e[0],e[1],e[2]);r(n,n),r(a,a);var s=o(n,a);return s>1?0:Math.acos(s)};var i=n(6534),r=n(2397),o=n(966)},9638:function(t){t.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},859:function(t){t.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},1404:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},2002:function(t){t.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},9528:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2];return t[0]=r*l-o*s,t[1]=o*a-i*l,t[2]=i*s-r*a,t}},6005:function(t,e,n){t.exports=n(6911)},6911:function(t){t.exports=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(n*n+i*i+r*r)}},133:function(t,e,n){t.exports=n(3274)},3274:function(t){t.exports=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}},966:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},2342:function(t){t.exports=1e-6},9883:function(t,e,n){t.exports=function(t,e){var n=t[0],r=t[1],o=t[2],a=e[0],s=e[1],l=e[2];return Math.abs(n-a)<=i*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=i*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(o-l)<=i*Math.max(1,Math.abs(o),Math.abs(l))};var i=n(2342)},8259:function(t){t.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},7291:function(t){t.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},7043:function(t,e,n){t.exports=function(t,e,n,r,o,a){var s,l;e||(e=3);n||(n=0);l=r?Math.min(r*e+n,t.length):t.length;for(s=n;s<l;s+=e)i[0]=t[s],i[1]=t[s+1],i[2]=t[s+2],o(i,i,a),t[s]=i[0],t[s+1]=i[1],t[s+2]=i[2];return t};var i=n(2002)()},6534:function(t){t.exports=function(t,e,n){var i=new Float32Array(3);return i[0]=t,i[1]=e,i[2]=n,i}},5365:function(t,e,n){t.exports={EPSILON:n(2342),create:n(2002),clone:n(859),angle:n(3959),fromValues:n(6534),copy:n(1404),set:n(6952),equals:n(9883),exactEquals:n(8259),add:n(7207),subtract:n(7916),sub:n(3379),multiply:n(6381),mul:n(792),divide:n(3274),div:n(133),min:n(7324),max:n(7254),floor:n(7291),ceil:n(9638),round:n(5084),scale:n(498),scaleAndAdd:n(6993),distance:n(6911),dist:n(6005),squaredDistance:n(3440),sqrDist:n(9867),length:n(172),len:n(5446),squaredLength:n(5228),sqrLen:n(609),negate:n(9500),inverse:n(8958),normalize:n(2397),dot:n(966),cross:n(9528),lerp:n(6373),random:n(2283),transformMat4:n(2964),transformMat3:n(932),transformQuat:n(4516),rotateX:n(4871),rotateY:n(7927),rotateZ:n(2998),forEach:n(7043)}},8958:function(t){t.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}},5446:function(t,e,n){t.exports=n(172)},172:function(t){t.exports=function(t){var e=t[0],n=t[1],i=t[2];return Math.sqrt(e*e+n*n+i*i)}},6373:function(t){t.exports=function(t,e,n,i){var r=e[0],o=e[1],a=e[2];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t}},7254:function(t){t.exports=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}},7324:function(t){t.exports=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}},792:function(t,e,n){t.exports=n(6381)},6381:function(t){t.exports=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}},9500:function(t){t.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}},2397:function(t){t.exports=function(t,e){var n=e[0],i=e[1],r=e[2],o=n*n+i*i+r*r;o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o);return t}},2283:function(t){t.exports=function(t,e){e=e||1;var n=2*Math.random()*Math.PI,i=2*Math.random()-1,r=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(n)*r,t[1]=Math.sin(n)*r,t[2]=i*e,t}},4871:function(t){t.exports=function(t,e,n,i){var r=n[1],o=n[2],a=e[1]-r,s=e[2]-o,l=Math.sin(i),u=Math.cos(i);return t[0]=e[0],t[1]=r+a*u-s*l,t[2]=o+a*l+s*u,t}},7927:function(t){t.exports=function(t,e,n,i){var r=n[0],o=n[2],a=e[0]-r,s=e[2]-o,l=Math.sin(i),u=Math.cos(i);return t[0]=r+s*l+a*u,t[1]=e[1],t[2]=o+s*u-a*l,t}},2998:function(t){t.exports=function(t,e,n,i){var r=n[0],o=n[1],a=e[0]-r,s=e[1]-o,l=Math.sin(i),u=Math.cos(i);return t[0]=r+a*u-s*l,t[1]=o+a*l+s*u,t[2]=e[2],t}},5084:function(t){t.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},498:function(t){t.exports=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}},6993:function(t){t.exports=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t}},6952:function(t){t.exports=function(t,e,n,i){return t[0]=e,t[1]=n,t[2]=i,t}},9867:function(t,e,n){t.exports=n(3440)},609:function(t,e,n){t.exports=n(5228)},3440:function(t){t.exports=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return n*n+i*i+r*r}},5228:function(t){t.exports=function(t){var e=t[0],n=t[1],i=t[2];return e*e+n*n+i*i}},3379:function(t,e,n){t.exports=n(7916)},7916:function(t){t.exports=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}},932:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t}},2964:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[3]*i+n[7]*r+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/a,t[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/a,t[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/a,t}},4516:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2],u=n[3],c=u*i+s*o-l*r,d=u*r+l*i-a*o,h=u*o+a*r-s*i,f=-a*i-s*r-l*o;return t[0]=c*u+f*-a+d*-l-h*-s,t[1]=d*u+f*-s+h*-a-c*-l,t[2]=h*u+f*-l+c*-s-d*-a,t}},5492:function(t){t.exports=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}},5967:function(t){t.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},4729:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},8922:function(t){t.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},3256:function(t){t.exports=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(n*n+i*i+r*r+o*o)}},409:function(t){t.exports=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}},3643:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},5166:function(t){t.exports=function(t,e,n,i){var r=new Float32Array(4);return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r}},8608:function(t,e,n){t.exports={create:n(8922),clone:n(5967),fromValues:n(5166),copy:n(4729),set:n(256),add:n(5492),subtract:n(1250),multiply:n(4683),divide:n(409),min:n(8485),max:n(6225),scale:n(7141),scaleAndAdd:n(2100),distance:n(3256),squaredDistance:n(8726),length:n(7358),squaredLength:n(3e3),negate:n(2618),inverse:n(9556),normalize:n(959),dot:n(3643),lerp:n(117),random:n(9855),transformMat4:n(161),transformQuat:n(228)}},9556:function(t){t.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},7358:function(t){t.exports=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return Math.sqrt(e*e+n*n+i*i+r*r)}},117:function(t){t.exports=function(t,e,n,i){var r=e[0],o=e[1],a=e[2],s=e[3];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t[3]=s+i*(n[3]-s),t}},6225:function(t){t.exports=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t}},8485:function(t){t.exports=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t}},4683:function(t){t.exports=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}},2618:function(t){t.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},959:function(t){t.exports=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*n+i*i+r*r+o*o;a>0&&(a=1/Math.sqrt(a),t[0]=n*a,t[1]=i*a,t[2]=r*a,t[3]=o*a);return t}},9855:function(t,e,n){var i=n(959),r=n(7141);t.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),i(t,t),r(t,t,e),t}},7141:function(t){t.exports=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}},2100:function(t){t.exports=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t}},256:function(t){t.exports=function(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}},8726:function(t){t.exports=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2],o=e[3]-t[3];return n*n+i*i+r*r+o*o}},3e3:function(t){t.exports=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return e*e+n*n+i*i+r*r}},1250:function(t){t.exports=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}},161:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3];return t[0]=n[0]*i+n[4]*r+n[8]*o+n[12]*a,t[1]=n[1]*i+n[5]*r+n[9]*o+n[13]*a,t[2]=n[2]*i+n[6]*r+n[10]*o+n[14]*a,t[3]=n[3]*i+n[7]*r+n[11]*o+n[15]*a,t}},228:function(t){t.exports=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2],u=n[3],c=u*i+s*o-l*r,d=u*r+l*i-a*o,h=u*o+a*r-s*i,f=-a*i-s*r-l*o;return t[0]=c*u+f*-a+d*-l-h*-s,t[1]=d*u+f*-s+h*-a-c*-l,t[2]=h*u+f*-l+c*-s-d*-a,t[3]=e[3],t}},6502:function(t,e,n){var i,r,o=n(5240),a=n(8608),s=n(5365),l=n(5638);r=this,void 0===(i=function(){return r.vgl=function(){if(void 0===t)var t={};t.namespace=function(e){"use strict";var n,i=e.split("."),r=t;for("ogs"===i[0]&&(i=i.slice(1)),n=0;n<i.length;n+=1)void 0===r[i[n]]&&(r[i[n]]={}),r=r[i[n]];return r};var e=t.namespace("gl");window.vgl=e,e.inherit=function(t,e){"use strict";var n=inherit.func();n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t},e.inherit.func=function(){"use strict";return function(){}},window.inherit=e.inherit,Object.size=function(t){"use strict";var e,n=0;for(e in t)t.hasOwnProperty(e)&&(n+=1);return n},Math.log2||(Math.log2=function(t){return Math.log(t)/Math.log(2)}),e.version="0.3.11",e.GL={ACTIVE_ATTRIBUTES:35721,ACTIVE_TEXTURE:34016,ACTIVE_UNIFORMS:35718,ALIASED_LINE_WIDTH_RANGE:33902,ALIASED_POINT_SIZE_RANGE:33901,ALPHA:6406,ALPHA_BITS:3413,ALWAYS:519,ARRAY_BUFFER:34962,ARRAY_BUFFER_BINDING:34964,ATTACHED_SHADERS:35717,BACK:1029,BLEND:3042,BLEND_COLOR:32773,BLEND_DST_ALPHA:32970,BLEND_DST_RGB:32968,BLEND_EQUATION:32777,BLEND_EQUATION_ALPHA:34877,BLEND_EQUATION_RGB:32777,BLEND_SRC_ALPHA:32971,BLEND_SRC_RGB:32969,BLUE_BITS:3412,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,BROWSER_DEFAULT_WEBGL:37444,BUFFER_SIZE:34660,BUFFER_USAGE:34661,BYTE:5120,CCW:2305,CLAMP_TO_EDGE:33071,COLOR_ATTACHMENT0:36064,COLOR_BUFFER_BIT:16384,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,COMPILE_STATUS:35713,COMPRESSED_TEXTURE_FORMATS:34467,CONSTANT_ALPHA:32771,CONSTANT_COLOR:32769,CONTEXT_LOST_WEBGL:37442,CULL_FACE:2884,CULL_FACE_MODE:2885,CURRENT_PROGRAM:35725,CURRENT_VERTEX_ATTRIB:34342,CW:2304,DECR:7683,DECR_WRAP:34056,DELETE_STATUS:35712,DEPTH_ATTACHMENT:36096,DEPTH_BITS:3414,DEPTH_BUFFER_BIT:256,DEPTH_CLEAR_VALUE:2931,DEPTH_COMPONENT:6402,DEPTH_COMPONENT16:33189,DEPTH_FUNC:2932,DEPTH_RANGE:2928,DEPTH_STENCIL:34041,DEPTH_STENCIL_ATTACHMENT:33306,DEPTH_TEST:2929,DEPTH_WRITEMASK:2930,DITHER:3024,DONT_CARE:4352,DST_ALPHA:772,DST_COLOR:774,DYNAMIC_DRAW:35048,ELEMENT_ARRAY_BUFFER:34963,ELEMENT_ARRAY_BUFFER_BINDING:34965,EQUAL:514,FASTEST:4353,FLOAT:5126,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,FRAGMENT_SHADER:35632,FRAMEBUFFER:36160,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_BINDING:36006,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_UNSUPPORTED:36061,FRONT:1028,FRONT_AND_BACK:1032,FRONT_FACE:2886,FUNC_ADD:32774,FUNC_REVERSE_SUBTRACT:32779,FUNC_SUBTRACT:32778,GENERATE_MIPMAP_HINT:33170,GEQUAL:518,GREATER:516,GREEN_BITS:3411,HIGH_FLOAT:36338,HIGH_INT:36341,INCR:7682,INCR_WRAP:34055,INT:5124,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,INVALID_ENUM:1280,INVALID_FRAMEBUFFER_OPERATION:1286,INVALID_OPERATION:1282,INVALID_VALUE:1281,INVERT:5386,KEEP:7680,LEQUAL:515,LESS:513,LINEAR:9729,LINEAR_MIPMAP_LINEAR:9987,LINEAR_MIPMAP_NEAREST:9985,LINES:1,LINE_LOOP:2,LINE_STRIP:3,LINE_WIDTH:2849,LINK_STATUS:35714,LOW_FLOAT:36336,LOW_INT:36339,LUMINANCE:6409,LUMINANCE_ALPHA:6410,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_CUBE_MAP_TEXTURE_SIZE:34076,MAX_FRAGMENT_UNIFORM_VECTORS:36349,MAX_RENDERBUFFER_SIZE:34024,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_TEXTURE_SIZE:3379,MAX_VARYING_VECTORS:36348,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VIEWPORT_DIMS:3386,MEDIUM_FLOAT:36337,MEDIUM_INT:36340,MIRRORED_REPEAT:33648,NEAREST:9728,NEAREST_MIPMAP_LINEAR:9986,NEAREST_MIPMAP_NEAREST:9984,NEVER:512,NICEST:4354,NONE:0,NOTEQUAL:517,NO_ERROR:0,ONE:1,ONE_MINUS_CONSTANT_ALPHA:32772,ONE_MINUS_CONSTANT_COLOR:32770,ONE_MINUS_DST_ALPHA:773,ONE_MINUS_DST_COLOR:775,ONE_MINUS_SRC_ALPHA:771,ONE_MINUS_SRC_COLOR:769,OUT_OF_MEMORY:1285,PACK_ALIGNMENT:3333,POINTS:0,POLYGON_OFFSET_FACTOR:32824,POLYGON_OFFSET_FILL:32823,POLYGON_OFFSET_UNITS:10752,RED_BITS:3410,RENDERBUFFER:36161,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_BINDING:36007,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_STENCIL_SIZE:36181,RENDERBUFFER_WIDTH:36162,RENDERER:7937,REPEAT:10497,REPLACE:7681,RGB:6407,RGB565:36194,RGB5_A1:32855,RGBA:6408,RGBA4:32854,SAMPLER_2D:35678,SAMPLER_CUBE:35680,SAMPLES:32937,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_BUFFERS:32936,SAMPLE_COVERAGE:32928,SAMPLE_COVERAGE_INVERT:32939,SAMPLE_COVERAGE_VALUE:32938,SCISSOR_BOX:3088,SCISSOR_TEST:3089,SHADER_TYPE:35663,SHADING_LANGUAGE_VERSION:35724,SHORT:5122,SRC_ALPHA:770,SRC_ALPHA_SATURATE:776,SRC_COLOR:768,STATIC_DRAW:35044,STENCIL_ATTACHMENT:36128,STENCIL_BACK_FAIL:34817,STENCIL_BACK_FUNC:34816,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,STENCIL_BITS:3415,STENCIL_BUFFER_BIT:1024,STENCIL_CLEAR_VALUE:2961,STENCIL_FAIL:2964,STENCIL_FUNC:2962,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_TEST:2960,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STREAM_DRAW:35040,SUBPIXEL_BITS:3408,TEXTURE:5890,TEXTURE0:33984,TEXTURE1:33985,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE2:33986,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE3:33987,TEXTURE30:34014,TEXTURE31:34015,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE_2D:3553,TEXTURE_BINDING_2D:32873,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP:34067,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TRIANGLES:4,TRIANGLE_FAN:6,TRIANGLE_STRIP:5,UNPACK_ALIGNMENT:3317,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,UNSIGNED_BYTE:5121,UNSIGNED_INT:5125,UNSIGNED_SHORT:5123,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,VALIDATE_STATUS:35715,VENDOR:7936,VERSION:7938,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_SHADER:35633,VIEWPORT:2978,ZERO:0};var n=0;e.timestamp=function(){"use strict";if(!(this instanceof e.timestamp))return new e.timestamp;var t=0;this.modified=function(){t=n+=1},this.getMTime=function(){return t}},e.object=function(){"use strict";if(!(this instanceof e.object))return new e.object;var t=e.timestamp();return t.modified(),this.modified=function(){t.modified()},this.getMTime=function(){return t.getMTime()},this},e.event=function(){"use strict";return this instanceof e.event?(e.object.call(this),this):new e.event},inherit(e.event,e.object),e.event.keyPress="vgl.event.keyPress",e.event.mousePress="vgl.event.mousePress",e.event.mouseRelease="vgl.event.mouseRelease",e.event.contextMenu="vgl.event.contextMenu",e.event.configure="vgl.event.configure",e.event.enable="vgl.event.enable",e.event.mouseWheel="vgl.event.mouseWheel",e.event.keyRelease="vgl.event.keyRelease",e.event.middleButtonPress="vgl.event.middleButtonPress",e.event.startInteraction="vgl.event.startInteraction",e.event.enter="vgl.event.enter",e.event.rightButtonPress="vgl.event.rightButtonPress",e.event.middleButtonRelease="vgl.event.middleButtonRelease",e.event.char="vgl.event.char",e.event.disable="vgl.event.disable",e.event.endInteraction="vgl.event.endInteraction",e.event.mouseMove="vgl.event.mouseMove",e.event.mouseOut="vgl.event.mouseOut",e.event.expose="vgl.event.expose",e.event.timer="vgl.event.timer",e.event.leftButtonPress="vgl.event.leftButtonPress",e.event.leave="vgl.event.leave",e.event.rightButtonRelease="vgl.event.rightButtonRelease",e.event.leftButtonRelease="vgl.event.leftButtonRelease",e.event.click="vgl.event.click",e.event.dblClick="vgl.event.dblClick",e.boundingObject=function(){"use strict";if(!(this instanceof e.boundingObject))return new e.boundingObject;e.object.call(this);var t=[0,0,0,0,0,0],n=e.timestamp(),i=e.timestamp();return n.modified(),i.modified(),this.bounds=function(){return t},this.hasValidBounds=function(t){return t[0]!==Number.MAX_VALUE&&t[1]!==-Number.MAX_VALUE&&t[2]!==Number.MAX_VALUE&&t[3]!==-Number.MAX_VALUE&&t[4]!==Number.MAX_VALUE&&t[5]!==-Number.MAX_VALUE},this.setBounds=function(e,i,r,o,a,s){if(this.hasValidBounds([e,i,r,o,a,s]))return t[0]=e,t[1]=i,t[2]=r,t[3]=o,t[4]=a,t[5]=s,this.modified(),n.modified(),!0},this.resetBounds=function(){t[0]=Number.MAX_VALUE,t[1]=-Number.MAX_VALUE,t[2]=Number.MAX_VALUE,t[3]=-Number.MAX_VALUE,t[4]=Number.MAX_VALUE,t[5]=-Number.MAX_VALUE,this.modified()},this.computeBounds=function(){},this.computeBoundsTimestamp=function(){return n},this.boundsDirtyTimestamp=function(){return i},this.resetBounds(),this},e.boundingObject.ReferenceFrame={Relative:0,Absolute:1},inherit(e.boundingObject,e.object),e.node=function(){"use strict";if(!(this instanceof e.node))return new e.node;e.boundingObject.call(this);var t=null,n=null,i=!0,r=!1;return this.accept=function(t){t.visit(this)},this.material=function(){return n},this.setMaterial=function(t){return t!==n&&(n=t,this.modified(),!0)},this.visible=function(){return i},this.setVisible=function(t){return t!==i&&(i=t,this.modified(),!0)},this.parent=function(){return t},this.setParent=function(e){return e!==t&&(null!==t&&t.removeChild(this),t=e,this.modified(),!0)},this.overlay=function(){return r},this.setOverlay=function(t){return r!==t&&(r=t,this.modified(),!0)},this.ascend=function(t){t=t},this.traverse=function(t){t=t},this.boundsModified=function(){this.boundsDirtyTimestamp().modified(),null!==t&&t.boundsModified()},this},inherit(e.node,e.boundingObject),e.groupNode=function(){"use strict";if(!(this instanceof e.groupNode))return new e.groupNode;e.node.call(this);var t=[];return this.b_setVisible=this.setVisible,this.setVisible=function(e){var n;if(!0!==this.b_setVisible(e))return!1;for(n=0;n<t.length;n+=1)t[n].setVisible(e);return!0},this.addChild=function(n){return n instanceof e.node&&-1===t.indexOf(n)&&(n.setParent(this),t.push(n),this.boundsDirtyTimestamp().modified(),!0)},this.removeChild=function(e){if(e.parent()===this){var n=t.indexOf(e);if(n>=0)return t.splice(n,1),e.setParent(null),this.boundsDirtyTimestamp().modified(),!0}},this.removeChildren=function(){for(;t.length;)this.removeChild(t[0]);this.modified()},this.children=function(){return t},this.hasChild=function(e){var n=0,i=!1;for(n=0;n<t.length;n+=1)if(t[n]===e){i=!0;break}return i},this.accept=function(t){t.visit(this)},this.traverse=function(t){switch(t.type()){case t.UpdateVisitor:this.traverseChildrenAndUpdateBounds(t);break;case t.CullVisitor:this.traverseChildren(t)}},this.traverseChildrenAndUpdateBounds=function(e){var n;if(this.parent()&&this.boundsDirtyTimestamp().getMTime()>this.computeBoundsTimestamp().getMTime()&&this.parent().boundsDirtyTimestamp().modified(),this.computeBounds(),e.mode()===e.TraverseAllChildren)for(n=0;n<t.length;n+=1)t[n].accept(e),this.updateBounds(t[n]);this.computeBoundsTimestamp().modified()},this.traverseChildren=function(e){var n;if(e.mode()===e.TraverseAllChildren)for(n=0;n<t.length;n+=1)t[n].accept(e)},this.computeBounds=function(){var e=0;if(!(this.computeBoundsTimestamp().getMTime()>this.boundsDirtyTimestamp().getMTime()))for(e=0;e<t.length;e+=1)this.updateBounds(t[e])},this.updateBounds=function(t){if(!t.overlay()){t.computeBounds();var e,n=this.bounds(),i=t.bounds(),r=0,o=0;for(e=0;e<3;e+=1)o=2*e+1,i[r=2*e]<n[r]&&(n[r]=i[r]),i[o]>n[o]&&(n[o]=i[o]);this.setBounds(n[0],n[1],n[2],n[3],n[4],n[5])}},this},inherit(e.groupNode,e.node),e.actor=function(){"use strict";if(!(this instanceof e.actor))return new e.actor;e.node.call(this);var t=this,n=o.create(),i=e.boundingObject.ReferenceFrame.Relative,r=null;return this.matrix=function(){return n},this.setMatrix=function(e){e!==n&&(n=e,t.modified())},this.referenceFrame=function(){return i},this.setReferenceFrame=function(e){return e!==i&&(i=e,t.modified(),!0)},this.mapper=function(){return r},this.setMapper=function(e){e!==r&&(r=e,t.boundsModified())},this.accept=function(t){t=t},this.ascend=function(t){t=t},this.computeLocalToWorldMatrix=function(t,e){t=t,e=e},this.computeWorldToLocalMatrix=function(t,e){t=t,e=e},this.computeBounds=function(){if(null!=r){var e,i,o,a,l=t.computeBoundsTimestamp();(t.boundsDirtyTimestamp().getMTime()>l.getMTime()||r.boundsDirtyTimestamp().getMTime()>l.getMTime())&&(r.computeBounds(),i=[(e=r.bounds())[0],e[2],e[4]],o=[e[1],e[3],e[5]],s.transformMat4(i,i,n),s.transformMat4(o,o,n),a=[i[0]>o[0]?o[0]:i[0],i[0]>o[0]?i[0]:o[0],i[1]>o[1]?o[1]:i[1],i[1]>o[1]?i[1]:o[1],i[2]>o[2]?o[2]:i[2],i[2]>o[2]?i[2]:o[2]],t.setBounds(a[0],a[1],a[2],a[3],a[4],a[5]),l.modified())}else t.resetBounds()},t},inherit(e.actor,e.node),e.freezeObject=function(t){"use strict";var e=Object.freeze?Object.freeze(t):void 0;return void 0===e?t:e},e.defaultValue=function(t,e){"use strict";return void 0!==t?t:e},e.defaultValue.EMPTY_OBJECT=e.freezeObject({}),e.graphicsObject=function(t){"use strict";if(t=t,!(this instanceof e.graphicsObject))return new e.graphicsObject;e.object.call(this);var n=this;return this._setup=function(t){return t=t,!1},this._cleanup=function(t){return t=t,!1},this.bind=function(t){return t=t,!1},this.undoBind=function(t){return t=t,!1},this.render=function(t){return t=t,!1},this.remove=function(t){n._cleanup(t)},n},inherit(e.graphicsObject,e.object),e.geojsonReader=function(){"use strict";return this instanceof e.geojsonReader?(this.readScalars=function(t,n,i,r){var o=null,a=null,s=null,l=null,u=null;"values"===this.m_scalarFormat&&4===t.length?(a=t[3],(o=n.sourceData(e.vertexAttributeKeys.Scalar))||(o=new e.sourceDataSf,this.m_scalarRange&&o.setScalarRange(this.m_scalarRange[0],this.m_scalarRange[1]),void 0!==i&&(o.data().length=i),n.addSource(o)),void 0===i?o.pushBack(a):o.insertAt(r,a)):"rgb"===this.m_scalarFormat&&6===t.length&&((o=n.sourceData(e.vertexAttributeKeys.Color))||(o=new e.sourceDataC3fv,void 0!==i&&(o.length=3*i),n.addSource(o)),s=t[3],l=t[4],u=t[5],void 0===i?o.pushBack([s,l,u]):o.insertAt(r,[s,l,u]))},this.readPoint=function(t){var n=new e.geometryData,i=new e.points,r=new e.sourceDataP3fv,o=new Uint16Array(1),a=null,s=null,l=null,u=null;for(n.addSource(r),u=0;u<1;u+=1)o[u]=u,a=t[0],s=t[1],l=0,t.length>2&&(l=t[2]),r.pushBack([a,s,l]),this.readScalars(t,n);return i.setIndices(o),n.addPrimitive(i),n.setName("aPoint"),n},this.readMultiPoint=function(t){var n,i=new e.geometryData,r=new e.points,o=new e.sourceDataP3fv,a=new Uint16Array(t.length),s=0,l=t.length,u=null,c=null,d=null;for(o.data().length=3*l,n=0;n<t.length;n+=1)a[n]=n,u=t[n][0],c=t[n][1],d=0,t[n].length>2&&(d=t[n][2]),o.insertAt(s,[u,c,d]),this.readScalars(t[n],i,l,s),s+=1;return r.setIndices(a),i.addPrimitive(r),i.addSource(o),i.setName("manyPoints"),i},this.readLineString=function(t){var n=new e.geometryData,i=new e.lineStrip,r=new e.sourceDataP3fv,o=[],a=null,s=null,l=null,u=null;for(i.setIndicesPerPrimitive(t.length),a=0;a<t.length;a+=1)o.push(a),s=t[a][0],l=t[a][1],u=0,t[a].length>2&&(u=t[a][2]),r.pushBack([s,l,u]),this.readScalars(t[a],n);return i.setIndices(o),n.addPrimitive(i),n.addSource(r),n.setName("aLineString"),n},this.readMultiLineString=function(t){var n=new e.geometryData,i=new e.sourceDataP3fv,r=0,o=2*t.length,a=null,s=null,l=null,u=null,c=null,d=null,h=null,f=null;for(i.data().length=3*o,s=0;s<t.length;s+=1){for(d=[],h=new e.lineStrip,f=t[s].length,h.setIndicesPerPrimitive(f),a=0;a<f;a+=1)d.push(r),l=t[s][a][0],u=t[s][a][1],c=0,t[s][a].length>2&&(c=t[s][a][2]),i.insertAt(r,[l,u,c]),this.readScalars(t[s][a],n,2*o,r),r+=1;h.setIndices(d),n.addPrimitive(h)}return n.setName("aMultiLineString"),n.addSource(i),n},this.readPolygon=function(t){var n=new e.geometryData,i=new e.sourceDataP3fv,r=null,o=null,a=null,s=t[0].length,l=1,u=null,c=null,d=null;for(u=0;u<s;u+=1)r=t[0][u][0],o=t[0][u][1],a=0,t[0][u].length>2&&(a=t[0][u][2]),i.pushBack([r,o,a]),this.readScalars(t[0][u],n),u>1&&(c=new Uint16Array([0,l,u]),(d=new e.triangles).setIndices(c),n.addPrimitive(d),l=u);return n.setName("POLY"),n.addSource(i),n},this.readMultiPolygon=function(t){var n=new e.geometryData,i=new e.sourceDataP3fv,r=0,o=t.length,a=0,s=3*o,l=new e.triangles,u=[],c=null,d=null,h=null,f=null,p=null,m=null,g=null,v=null,y=null,x=!1,b=0;for(i.data().length=3*o,d=0;d<o;d+=1)for(m=t[d][0].length,g=r,v=r+1,y=[!1,!1,!1],c=0;c<m;c+=1)h=t[d][0][c][0],f=t[d][0][c][1],p=0,t[d][0][c].length>2&&(p=t[d][0][c][2]),x=!1,h>180&&(x=!0,h-=360),0===c?y[0]=x:y[1+(c-1)%2]=x,i.insertAt(a,[h,f,p]),this.readScalars(t[d][0][c],n,s,a),a+=1,c>1&&(y[0]===y[1]&&y[1]===y[2]&&(u[3*b+0]=g,u[3*b+1]=v,u[3*b+2]=r,b+=1),v=r),r+=1;return l.setIndices(u),n.addPrimitive(l),n.setName("aMultiPoly"),n.addSource(i),n},this.readGJObjectInt=function(t){if(!t.hasOwnProperty("type"))return null;t.properties&&t.properties.ScalarFormat&&"values"===t.properties.ScalarFormat&&(this.m_scalarFormat="values",t.properties.ScalarRange&&(this.m_scalarRange=t.properties.ScalarRange)),t.properties&&t.properties.ScalarFormat&&"rgb"===t.properties.ScalarFormat&&(this.m_scalarFormat="rgb");var e,n=t.type,i=null,r=null,o=null;switch(n){case"Point":e=this.readPoint(t.coordinates);break;case"MultiPoint":e=this.readMultiPoint(t.coordinates);break;case"LineString":e=this.readLineString(t.coordinates);break;case"MultiLineString":e=this.readMultiLineString(t.coordinates);break;case"Polygon":e=this.readPolygon(t.coordinates);break;case"MultiPolygon":e=this.readMultiPolygon(t.coordinates);break;case"GeometryCollection":for(r=[],o=0;o<t.geometries.length;o+=1)i=this.readGJObject(t.geometries[o]),r.push(i);e=r;break;case"Feature":e=i=this.readGJObject(t.geometry);break;case"FeatureCollection":for(r=[],o=0;o<t.features.length;o+=1)i=this.readGJObject(t.features[o]),r.push(i);e=r;break;default:console.log("Don't understand type "+n),e=null}return e},this.readGJObject=function(t){return this.readGJObjectInt(t)},this.linearizeGeoms=function(t,e){var n=null;if("[object Array]"===Object.prototype.toString.call(e))for(n=0;n<e.length;n+=1)this.linearizeGeoms(t,e[n]);else t.push(e)},this.readGeomObject=function(t){var e,n=[];return e=this.readGJObject(t),this.linearizeGeoms(n,e),n},this.getPrimitives=function(t){if(!t)return[];var e=JSON.parse(t),n=this.readGJObject(e),i=[];return this.m_scalarFormat="none",this.m_scalarRange=null,this.linearizeGeoms(i,n),{geoms:i,scalarFormat:this.m_scalarFormat,scalarRange:this.m_scalarRange}},this):new e.geojsonReader},e.data=function(){"use strict";if(!(this instanceof e.data))return new e.data;this.type=function(){}},e.data.raster=0,e.data.point=1,e.data.lineString=2,e.data.polygon=3,e.data.geometry=10,e.primitive=function(){"use strict";if(!(this instanceof e.primitive))return new e.primitive;var t=0,n=0,i=0,r=null;return this.indices=function(){return r},this.createIndices=function(t){r=new Uint16Array},this.numberOfIndices=function(){return r.length},this.sizeInBytes=function(){return r.length*Uint16Array.BYTES_PER_ELEMENT},this.primitiveType=function(){return n},this.setPrimitiveType=function(t){n=t},this.indicesPerPrimitive=function(){return t},this.setIndicesPerPrimitive=function(e){t=e},this.indicesValueType=function(){return i},this.setIndicesValueType=function(t){i=t},this.setIndices=function(t){r=new Uint16Array(t)},this},e.triangleStrip=function(){"use strict";return this instanceof e.triangleStrip?(e.primitive.call(this),this.setPrimitiveType(e.GL.TRIANGLE_STRIP),this.setIndicesValueType(e.GL.UNSIGNED_SHORT),this.setIndicesPerPrimitive(3),this):new e.triangleStrip},inherit(e.triangleStrip,e.primitive),e.triangles=function(){"use strict";return this instanceof e.triangles?(e.primitive.call(this),this.setPrimitiveType(e.GL.TRIANGLES),this.setIndicesValueType(e.GL.UNSIGNED_SHORT),this.setIndicesPerPrimitive(3),this):new e.triangles},inherit(e.triangles,e.primitive),e.lines=function(){"use strict";return this instanceof e.lines?(e.primitive.call(this),this.setPrimitiveType(e.GL.LINES),this.setIndicesValueType(e.GL.UNSIGNED_SHORT),this.setIndicesPerPrimitive(2),this):new e.lines},inherit(e.lines,e.primitive),e.lineStrip=function(){"use strict";return this instanceof e.lineStrip?(e.primitive.call(this),this.setPrimitiveType(e.GL.LINE_STRIP),this.setIndicesValueType(e.GL.UNSIGNED_SHORT),this.setIndicesPerPrimitive(2),this):new e.lineStrip},inherit(e.lineStrip,e.primitive),e.points=function(){"use strict";return this instanceof e.points?(e.primitive.call(this),this.setPrimitiveType(e.GL.POINTS),this.setIndicesValueType(e.GL.UNSIGNED_SHORT),this.setIndicesPerPrimitive(1),this):new e.points},inherit(e.points,e.primitive),e.vertexDataP3f=function(){"use strict";return this instanceof e.vertexDataP3f?(this.m_position=[],this):new e.vertexDataP3f},e.vertexDataP3N3f=function(){"use strict";return this instanceof e.vertexDataP3N3f?(this.m_position=[],this.m_normal=[],this):new e.vertexDataP3N3f},e.vertexDataP3T3f=function(){"use strict";return this instanceof e.vertexDataP3T3f?(this.m_position=[],this.m_texCoordinate=[],this):new e.vertexDataP3T3f},e.sourceData=function(t){"use strict";if(!(this instanceof e.sourceData))return new e.sourceData(t);var n={},i=[],r=(t=t||{}).name||"Source "+(new Date).toISOString(),o=function(){this.m_numberOfComponents=0,this.m_dataType=0,this.m_dataTypeSize=0,this.m_normalized=!1,this.m_stride=0,this.m_offset=0};return this.data=function(){return i},this.getData=function(){return this.data()},this.dataToFloat32Array=function(){return i instanceof Float32Array||(i=new Float32Array(i)),i},this.setData=function(t){t instanceof Array||t instanceof Float32Array?i=t instanceof Float32Array?t:t.slice(0):console.log("[error] Requires array")},this.addAttribute=function(t,e,i,r,a,s,l){if(!n.hasOwnProperty(t)){var u=new o;u.m_dataType=e,u.m_dataTypeSize=i,u.m_offset=r,u.m_stride=a,u.m_numberOfComponents=s,u.m_normalized=l,n[t]=u}},this.sizeOfArray=function(){return Object.size(i)},this.lengthOfArray=function(){return i.length},this.sizeInBytes=function(){var t,e=0,n=this.keys();for(t=0;t<n.length;t+=1)e+=this.attributeNumberOfComponents(n[t])*this.sizeOfAttributeDataType(n[t]);return e*=this.sizeOfArray()},this.hasKey=function(t){return n.hasOwnProperty(t)},this.keys=function(){return Object.keys(n)},this.numberOfAttributes=function(){return Object.size(n)},this.attributeNumberOfComponents=function(t){return n.hasOwnProperty(t)?n[t].m_numberOfComponents:0},this.normalized=function(t){return!!n.hasOwnProperty(t)&&n[t].m_normalized},this.sizeOfAttributeDataType=function(t){return n.hasOwnProperty(t)?n[t].m_dataTypeSize:0},this.attributeDataType=function(t){if(n.hasOwnProperty(t))return n[t].m_dataType},this.attributeOffset=function(t){return n.hasOwnProperty(t)?n[t].m_offset:0},this.attributeStride=function(t){return n.hasOwnProperty(t)?n[t].m_stride:0},this.pushBack=function(t){},this.insert=function(t){var e;if(!i.length&&t.length&&t instanceof Float32Array)i=t;else if(i.slice||!i.length&&t.slice||(i=Array.prototype.slice.call(i)),t.length)if(!i.length&&t.slice)i=t.slice(0);else for(e=0;e<t.length;e+=1)i[i.length]=t[e];else i[i.length]=t},this.insertAt=function(t,e){var n;if(e.length)for(n=0;n<e.length;n+=1)i[t*e.length+n]=e[n];else i[t]=e},this.name=function(){return r},this.setName=function(t){r=t},this},e.sourceDataAnyfv=function(t,n,i){"use strict";return this instanceof e.sourceDataAnyfv?(e.sourceData.call(this,i),this.addAttribute(n,e.GL.FLOAT,4,0,4*t,t,!1),this.pushBack=function(t){this.insert(t)},this):new e.sourceDataAnyfv(t,n,i)},inherit(e.sourceDataAnyfv,e.sourceData),e.sourceDataP3T3f=function(t){"use strict";return this instanceof e.sourceDataP3T3f?(e.sourceData.call(this,t),this.addAttribute(e.vertexAttributeKeys.Position,e.GL.FLOAT,4,0,24,3,!1),this.addAttribute(e.vertexAttributeKeys.TextureCoordinate,e.GL.FLOAT,4,12,24,3,!1),this.pushBack=function(t){this.insert(t.m_position),this.insert(t.m_texCoordinate)},this):new e.sourceDataP3T3f(t)},inherit(e.sourceDataP3T3f,e.sourceData),e.sourceDataP3N3f=function(t){"use strict";return this instanceof e.sourceDataP3N3f?(e.sourceData.call(this,t),this.addAttribute(e.vertexAttributeKeys.Position,e.GL.FLOAT,4,0,24,3,!1),this.addAttribute(e.vertexAttributeKeys.Normal,e.GL.FLOAT,4,12,24,3,!1),this.pushBack=function(t){this.insert(t.m_position),this.insert(t.m_normal)},this):new e.sourceDataP3N3f(t)},inherit(e.sourceDataP3N3f,e.sourceData),e.sourceDataP3fv=function(t){"use strict";return this instanceof e.sourceDataP3fv?(e.sourceData.call(this,t),this.addAttribute(e.vertexAttributeKeys.Position,e.GL.FLOAT,4,0,12,3,!1),this.pushBack=function(t){this.insert(t)},this):new e.sourceDataP3fv(t)},inherit(e.sourceDataP3fv,e.sourceData),e.sourceDataT2fv=function(t){"use strict";return this instanceof e.sourceDataT2fv?(e.sourceData.call(this,t),this.addAttribute(e.vertexAttributeKeys.TextureCoordinate,e.GL.FLOAT,4,0,8,2,!1),this.pushBack=function(t){this.insert(t)},this):new e.sourceDataT2fv(t)},inherit(e.sourceDataT2fv,e.sourceData),e.sourceDataC3fv=function(t){"use strict";return this instanceof e.sourceDataC3fv?(e.sourceData.call(this,t),this.addAttribute(e.vertexAttributeKeys.Color,e.GL.FLOAT,4,0,12,3,!1),this.pushBack=function(t){this.insert(t)},this):new e.sourceDataC3fv(t)},inherit(e.sourceDataC3fv,e.sourceData),e.sourceDataSf=function(t){"use strict";if(!(this instanceof e.sourceDataSf))return new e.sourceDataSf(t);var n=null,i=null,r=null,o=null;return e.sourceData.call(this,t),this.addAttribute(e.vertexAttributeKeys.Scalar,e.GL.FLOAT,4,0,4,1,!1),this.pushBack=function(t){(null===i||t>i)&&(i=t),(null===n||t<n)&&(n=t),this.data()[this.data().length]=t},this.insertAt=function(t,e){(null===i||e>i)&&(i=e),(null===n||e<n)&&(n=e),this.data()[t]=e},this.scalarRange=function(){return null===r||null===o?[n,i]:[r,o]},this.setScalarRange=function(t,e){r=t,o=e},this},inherit(e.sourceDataSf,e.sourceData),e.sourceDataDf=function(t){"use strict";return this instanceof e.sourceDataDf?(e.sourceData.call(this,t),this.addAttribute(e.vertexAttributeKeys.Scalar,e.GL.FLOAT,4,0,4,1,!1),this.pushBack=function(t){this.data()[this.data().length]=t},this.insertAt=function(t,e){this.data()[t]=e},this):new e.sourceDataDf(t)},inherit(e.sourceDataDf,e.sourceData),e.geometryData=function(){"use strict";if(!(this instanceof e.geometryData))return new e.geometryData;e.data.call(this);var t="",n=[],i=[],r=[0,0,0,0,0,0],o=e.timestamp(),a=e.timestamp();return this.type=function(){return e.data.geometry},this.name=function(){return t},this.setName=function(e){t=e},this.addSource=function(t,n){return void 0!==n&&t.setName(n),-1===i.indexOf(t)&&(i.push(t),t.hasKey(e.vertexAttributeKeys.Position)&&a.modified(),!0)},this.source=function(t){return t<i.length?i[t]:0},this.sourceByName=function(t){for(var e=0;e<i.length;e+=1)if(i[e].name()===t)return i[e];return 0},this.numberOfSources=function(){return i.length},this.sourceData=function(t){var e;for(e=0;e<i.length;e+=1)if(i[e].hasKey(t))return i[e];return null},this.addPrimitive=function(t){return n.push(t),!0},this.primitive=function(t){return t<n.length?n[t]:null},this.numberOfPrimitives=function(){return n.length},this.bounds=function(){return a.getMTime()>o.getMTime()&&this.computeBounds(),r},this.boundsDirty=function(t){return t&&a.modified(),a.getMTime()>o.getMTime()},this.resetBounds=function(){r[0]=0,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=0},this.setBounds=function(t,e,n,i,a,s){return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r[4]=a,r[5]=s,o.modified(),!0},this.computeBounds=function(){if(a.getMTime()>o.getMTime()){var t,n,i,s,l,u,c=e.vertexAttributeKeys.Position,d=this.sourceData(c),h=d.data(),f=d.attributeNumberOfComponents(c),p=d.attributeStride(c),m=d.attributeOffset(c),g=d.sizeOfAttributeDataType(c),v=h.length,y=null;for(p/=g,m/=g,this.resetBounds(),t=0;t<f;t+=1){for(n=2*t,i=2*t+1,s=l=v?r[i]=h[m+t]:0,u=m+p+t;u<v;u+=p)(y=h[u])>s&&(s=y),y<l&&(l=y);r[n]=l,r[i]=s}o.modified()}},this.findClosestVertex=function(t){var n,i,r,o,a,s,l,u=e.vertexAttributeKeys.Position,c=this.sourceData(u),d=c.sizeOfAttributeDataType(u),h=c.attributeNumberOfComponents(u),f=c.data(),p=c.attributeStride(u)/d,m=c.attributeOffset(u)/d,g=Number.MAX_VALUE,v=null;for(3!==h&&console.log("[warning] Find closest vertex assumes threecomponent vertex "),t.z||(t={x:t.x,y:t.y,z:0}),n=m,l=0;n<f.length;n+=p,l+=1)r=(i=[f[n],f[n+1],f[n+2]])[0]-t.x,o=i[1]-t.y,a=i[2]-t.z,(s=Math.sqrt(r*r+o*o+a*a))<g&&(g=s,v=l);return v},this.getPosition=function(t){var n=e.vertexAttributeKeys.Position,i=this.sourceData(n),r=i.sizeOfAttributeDataType(n),o=i.attributeNumberOfComponents(n),a=i.data(),s=i.attributeStride(n)/r,l=i.attributeOffset(n)/r;return 3!==o&&console.log("[warning] getPosition assumes three component data"),[a[l+t*s],a[l+t*s+1],a[l+t*s+2]]},this.getScalar=function(t){var n,i,r,o,a=e.vertexAttributeKeys.Scalar,s=this.sourceData(a);return s?(n=s.sizeOfAttributeDataType(a),i=s.data(),t*(r=s.attributeStride(a)/n)+(o=s.attributeOffset(a)/n)>=i.length&&console.log("access out of bounds in getScalar"),i[t*r+o]):null},this},inherit(e.geometryData,e.data),e.mapper=function(t){"use strict";if(!(this instanceof e.mapper))return new e.mapper(t);e.boundingObject.call(this);var n=[0,1,1],i=null,r=[],o={},a=void 0!==(t=t||{}).dynamicDraw&&t.dynamicDraw,s=e.timestamp(),l=null,u=this;function c(t){if(i){t&&(l=t.m_context);var n,u,c,d,h,f,p,m=i.numberOfSources(),g=null;for(n=0;n<m;n+=1){for(g=l.createBuffer(),l.bindBuffer(e.GL.ARRAY_BUFFER,g),(p=i.source(n).data())instanceof Float32Array||(p=new Float32Array(p)),l.bufferData(e.GL.ARRAY_BUFFER,p,a?e.GL.DYNAMIC_DRAW:e.GL.STATIC_DRAW),d=i.source(n).keys(),h=[],u=0;u<d.length;u+=1)h.push(d[u]);o[n]=h,r[n]=g}for(f=i.numberOfPrimitives(),c=0;c<f;c+=1)g=l.createBuffer(),l.bindBuffer(e.GL.ARRAY_BUFFER,g),l.bufferData(e.GL.ARRAY_BUFFER,i.primitive(c).indices(),e.GL.STATIC_DRAW),r[n]=g,n+=1;s.modified()}}function d(t){o={},r=[]}function h(t){u.deleteVertexBufferObjects(t),d(t),c(t)}return this.deleteVertexBufferObjects=function(t){var e,n=l;if(t&&(n=t.m_context),n)for(e=0;e<r.length;e+=1)n.deleteBuffer(r[e])},this._cleanup=function(t){u.deleteVertexBufferObjects(t),d(t),u.modified()},this.computeBounds=function(){if(null!=i){var t=this.computeBoundsTimestamp(),e=null;this.boundsDirtyTimestamp().getMTime()>t.getMTime()&&(e=i.bounds(),this.setBounds(e[0],e[1],e[2],e[3],e[4],e[5]),t.modified())}else this.resetBounds()},this.color=function(){return n},this.setColor=function(t,e,i){n[0]=t,n[1]=e,n[2]=i,this.modified()},this.geometryData=function(){return i},this.setGeometryData=function(t){i!==t&&(i=t,this.modified(),this.boundsDirtyTimestamp().modified())},this.updateSourceBuffer=function(t,n,o){if(o&&(l=o.m_context),!l)return!1;for(var a=-1,s=0;s<i.numberOfSources();s+=1)if(i.source(s).name()===t){a=s;break}return!(a<0||a>=r.length||(n||(n=i.source(s).dataToFloat32Array()),l.bindBuffer(e.GL.ARRAY_BUFFER,r[a]),n instanceof Float32Array?l.bufferSubData(e.GL.ARRAY_BUFFER,0,n):l.bufferSubData(e.GL.ARRAY_BUFFER,0,new Float32Array(n)),0))},this.getSourceBuffer=function(t){var e=i.sourceByName(t);return e?e.dataToFloat32Array():new Float32Array},this.render=function(t,n){(this.getMTime()>s.getMTime()||t.m_contextChanged)&&h(t),(l=t.m_context).vertexAttrib3fv(e.vertexAttributeKeys.Color,this.color());var a,u=0,c=0,d=null,f=null;for(a in o)if(o.hasOwnProperty(a)){for(l.bindBuffer(e.GL.ARRAY_BUFFER,r[u]),c=0;c<o[a].length;c+=1)t.m_material.bindVertexData(t,o[a][c]);u+=1}for(d=i.numberOfPrimitives(),c=0;c<d;c+=1,u+=1)if((f=i.primitive(c)).numberOfIndices()){switch(l.bindBuffer(e.GL.ARRAY_BUFFER,r[u]),f.primitiveType()){case e.GL.POINTS:l.drawArrays(e.GL.POINTS,0,f.numberOfIndices());break;case e.GL.LINES:l.drawArrays(e.GL.LINES,0,f.numberOfIndices());break;case e.GL.LINE_STRIP:l.drawArrays(e.GL.LINE_STRIP,0,f.numberOfIndices());break;case e.GL.TRIANGLES:l.drawArrays(e.GL.TRIANGLES,0,f.numberOfIndices());break;case e.GL.TRIANGLE_STRIP:l.drawArrays(e.GL.TRIANGLE_STRIP,0,f.numberOfIndices())}l.bindBuffer(e.GL.ARRAY_BUFFER,null)}n||this.undoBindVertexData(t)},this.undoBindVertexData=function(t){var e,n;for(e in o)if(o.hasOwnProperty(e))for(n=0;n<o[e].length;n+=1)t.m_material.undoBindVertexData(t,o[e][n])},this},inherit(e.mapper,e.boundingObject),e.groupMapper=function(){"use strict";if(!(this instanceof e.groupMapper))return new e.groupMapper;e.mapper.call(this);var t=e.timestamp(),n=[],i=[];return this.geometryData=function(t){return void 0!==t&&t<i.length?i[t]:i.length>0?i[0]:null},this.setGeometryData=function(t){1===i.length&&i[0]===t||((i=[]).push(t),this.modified())},this.geometryDataArray=function(){return i},this.setGeometryDataArray=function(t){if(t instanceof Array){if(i!==t)return i=[],i=t,this.modified(),!0}else console.log("[error] Requies array of geometry data");return!1},this.computeBounds=function(){if(null!=i){var t=this.computeBoundsTimestamp(),e=this.boundsDirtyTimestamp(),n=this.bounds(),r=null,o=null;if(e.getMTime()>t.getMTime()){for(o=0;o<i.length;o+=1)r=i[o].bounds(),n[0]>r[0]&&(n[0]=r[0]),n[1]<r[1]&&(n[1]=r[1]),n[2]>r[2]&&(n[2]=r[2]),n[3]<r[3]&&(n[3]=r[3]),n[4]>r[4]&&(n[4]=r[4]),n[5]<r[5]&&(n[5]=r[5]);this.modified(),t.modified()}}else this.resetBounds()},this.render=function(r){var o=null;if(this.getMTime()>t.getMTime()){for(o=0;o<i.length;o+=1)n.push(e.mapper()),n[o].setGeometryData(i[o]);t.modified()}for(o=0;o<n.length;o+=1)n[o].render(r)},this},inherit(e.groupMapper,e.mapper),e.materialAttributeType={Undefined:0,ShaderProgram:1,Texture:2,Blend:3,Depth:4},e.materialAttribute=function(t){"use strict";if(!(this instanceof e.materialAttribute))return new e.materialAttribute(t);e.graphicsObject.call(this);var n=this,i=t,r=!0;return this.type=function(){return i},this.enabled=function(){return r},this.bindVertexData=function(t,e){return t=t,e=e,!1},this.undoBindVertexData=function(t,e){return t=t,e=e,!1},n},inherit(e.materialAttribute,e.graphicsObject),e.blendFunction=function(t,n){"use strict";if(!(this instanceof e.blendFunction))return new e.blendFunction(t,n);var i=t,r=n;return this.apply=function(t){t.m_context.blendFuncSeparate(i,r,e.GL.ONE,e.GL.ONE_MINUS_SRC_ALPHA)},this},e.blend=function(){"use strict";if(!(this instanceof e.blend))return new e.blend;e.materialAttribute.call(this,e.materialAttributeType.Blend);var t=!1,n=e.blendFunction(e.GL.SRC_ALPHA,e.GL.ONE_MINUS_SRC_ALPHA);return this.bind=function(i){return t=i.m_context.isEnabled(e.GL.BLEND),this.enabled()?(i.m_context.enable(e.GL.BLEND),n.apply(i)):i.m_context.disable(e.GL.BLEND),!0},this.undoBind=function(n){return t?n.m_context.enable(e.GL.BLEND):n.m_context.disable(e.GL.BLEND),!0},this},inherit(e.blend,e.materialAttribute),e.material=function(){"use strict";if(!(this instanceof e.material))return new e.material;e.graphicsObject.call(this);var t=this,n=new e.shaderProgram,i=100,r={},o={};return this.binNumber=function(){return i},this.setBinNumber=function(e){i=e,t.modified()},this.exists=function(t){return t.type()===e.materialAttributeType.Texture?r.hasOwnProperty(t.textureUnit()):o.hasOwnProperty(t.type())},this.uniform=function(t){return n?n.uniform(t):null},this.attribute=function(t,n){return o.hasOwnProperty(t)?o[t]:t===e.materialAttributeType.Texture&&r.hasOwnProperty(n)?r[n]:null},this.setAttribute=function(i){return i.type()===e.materialAttributeType.Texture?r[i.textureUnit()]!==i&&(r[i.textureUnit()]=i,t.modified(),!0):o[i.type()]!==i&&(i.type()===e.materialAttributeType.ShaderProgram&&(n=i),o[i.type()]=i,t.modified(),!0)},this.addAttribute=function(i){return!t.exists(i)&&(i.type()===e.materialAttributeType.Texture?(r[i.textureUnit()]=i,t.modified(),!0):(i.type()===e.materialAttributeType.ShaderProgram&&(n=i),o[i.type()]=i,t.modified(),!0))},this.shaderProgram=function(){return n},this._setup=function(t){return!1},this._cleanup=function(e){for(var i in o)o.hasOwnProperty(i)&&o[i]._cleanup(e);for(i in r)r.hasOwnProperty(i)&&r[i]._cleanup(e);n._cleanup(e),t.modified()},this.bind=function(t){var e=null;for(e in n.bind(t),o)o.hasOwnProperty(e)&&o[e]!==n&&o[e].bind(t);for(e in r)r.hasOwnProperty(e)&&r[e].bind(t)},this.undoBind=function(t){var e=null;for(e in o)o.hasOwnProperty(e)&&o[e].undoBind(t);for(e in r)r.hasOwnProperty(e)&&r[e].undoBind(t)},this.bindVertexData=function(t,e){var n=null;for(n in o)o.hasOwnProperty(n)&&o[n].bindVertexData(t,e)},this.undoBindVertexData=function(t,e){var n=null;for(n in o)o.hasOwnProperty(n)&&o[n].undoBindVertexData(t,e)},t},e.material.RenderBin={Base:0,Default:100,Opaque:100,Transparent:1e3,Overlay:1e4},inherit(e.material,e.graphicsObject),e.renderState=function(){"use strict";this.m_context=null,this.m_modelViewMatrix=o.create(),this.m_normalMatrix=o.create(),this.m_projectionMatrix=null,this.m_material=null,this.m_mapper=null},e.renderer=function(t){"use strict";if(!(this instanceof e.renderer))return new e.renderer(t);e.graphicsObject.call(this),t=t||{};var n=this;return n.m_renderWindow=null,n.m_contextChanged=!1,n.m_sceneRoot=new e.groupNode,n.m_camera=new e.camera(t),n.m_nearClippingPlaneTolerance=null,n.m_x=0,n.m_y=0,n.m_width=0,n.m_height=0,n.m_resizable=!0,n.m_resetScene=!0,n.m_layer=0,n.m_renderPasses=null,n.m_resetClippingRange=!0,n.m_depthBits=null,n.m_camera.addChild(n.m_sceneRoot),this.width=function(){return n.m_width},this.height=function(){return n.m_height},this.layer=function(){return n.m_layer},this.setLayer=function(t){n.m_layer=t,n.modified()},this.isResizable=function(){return n.m_resizable},this.setResizable=function(t){n.m_resizable=t},this.renderWindow=function(){return n.m_renderWindow},this.setRenderWindow=function(t){n.m_renderWindow!==t&&(n.m_renderWindow&&n.m_renderWindow.removeRenderer(this),n.m_renderWindow=t,n.m_contextChanged=!0,n.modified())},this.backgroundColor=function(){return n.m_camera.clearColor()},this.setBackgroundColor=function(t,e,i,r){n.m_camera.setClearColor(t,e,i,r),n.modified()},this.sceneRoot=function(){return n.m_sceneRoot},this.camera=function(){return n.m_camera},this.render=function(){var t,i,r,a=null,s=[],l=o.create(),u=null;if((i=new e.renderState).m_renderer=n,i.m_context=n.renderWindow().context(),n.m_depthBits&&!n.m_contextChanged||(n.m_depthBits=i.m_context.getParameter(e.GL.DEPTH_BITS)),i.m_contextChanged=n.m_contextChanged,n.m_renderPasses)for(t=0;t<n.m_renderPasses.length;t+=1){if(n.m_renderPasses[t].render(i))return console.log("returning"),void n.m_renderPasses[t].remove(i);n.m_renderPasses[t].remove(i)}for(i.m_context.enable(e.GL.DEPTH_TEST),i.m_context.depthFunc(e.GL.LEQUAL),n.m_camera.clearMask()&e.GL.COLOR_BUFFER_BIT&&(u=n.m_camera.clearColor(),i.m_context.clearColor(u[0],u[1],u[2],u[3])),n.m_camera.clearMask()&e.GL.DEPTH_BUFFER_BIT&&i.m_context.clearDepth(n.m_camera.clearDepth()),i.m_context.clear(n.m_camera.clearMask()),i.m_context.viewport(n.m_x,n.m_y,n.m_width,n.m_height),(r=n.m_sceneRoot.children()).length>0&&n.m_resetScene&&(n.resetCamera(),n.m_resetScene=!1),t=0;t<r.length;t+=1)(a=r[t]).computeBounds(),a.visible()&&a.material().binNumber()>=0&&s.push([a.material().binNumber(),a]);for(s.sort((function(t,e){return t[0]-e[0]})),t=0;t<s.length;t+=1){if((a=s[t][1]).referenceFrame()===e.boundingObject.ReferenceFrame.Relative){var c=n.m_camera.viewMatrix();c instanceof Array&&(i.m_modelViewMatrix=new Array(16)),o.multiply(i.m_modelViewMatrix,c,a.matrix()),i.m_projectionMatrix=n.m_camera.projectionMatrix(),i.m_modelViewAlignment=n.m_camera.viewAlignment()}else i.m_modelViewMatrix=a.matrix(),i.m_modelViewAlignment=null,i.m_projectionMatrix=o.create(),o.ortho(i.m_projectionMatrix,0,n.m_width,0,n.m_height,-1,1);o.invert(l,i.m_modelViewMatrix),o.transpose(i.m_normalMatrix,l),i.m_material=a.material(),i.m_mapper=a.mapper(),i.m_material.bind(i),i.m_mapper.render(i),i.m_material.undoBind(i)}i.m_context.finish(),n.m_contextChanged=!1,n.m_lastRenderState=i},this.resetCamera=function(){n.m_camera.computeBounds();var t=n.m_camera.directionOfProjection(),e=n.m_camera.bounds(),i=[(e[0]+e[1])/2,(e[2]+e[3])/2,(e[4]+e[5])/2],r=[e[1]-e[0],e[3]-e[2],e[5]-e[4]],o=0,a=n.m_camera.viewAspect(),l=n.m_camera.viewAngle(),u=null,c=null;o=r[0]>r[1]?r[0]>r[2]?r[0]/2:r[2]/2:r[1]>r[2]?r[1]/2:r[2]/2,l=a>=1?2*Math.atan(Math.tan(.5*l)/a):2*Math.atan(Math.tan(.5*l)*a),u=o/Math.sin(.5*l),c=n.m_camera.viewUpDirection(),Math.abs(s.dot(c,t))>.999&&n.m_camera.setViewUpDirection(-c[2],c[0],c[1]),n.m_camera.setFocalPoint(i[0],i[1],i[2]),n.m_camera.setPosition(i[0]+u*-t[0],i[1]+u*-t[1],i[2]+u*-t[2]),n.resetCameraClippingRange(e)},this.hasValidBounds=function(t){return t[0]!==Number.MAX_VALUE&&t[1]!==-Number.MAX_VALUE&&t[2]!==Number.MAX_VALUE&&t[3]!==-Number.MAX_VALUE&&t[4]!==Number.MAX_VALUE&&t[5]!==-Number.MAX_VALUE},this.resetCameraClippingRange=function(t){if(void 0===t&&(n.m_camera.computeBounds(),t=n.m_camera.bounds()),n.hasValidBounds(t)){var e=n.m_camera.viewPlaneNormal(),i=n.m_camera.position(),r=-e[0],o=-e[1],a=-e[2],s=-(r*i[0]+o*i[1]+a*i[2]),l=vec2.create(),u=null,c=null,d=null,h=null;if(n.m_resetClippingRange){for(l[0]=r*t[0]+o*t[2]+a*t[4]+s,l[1]=1e-18,h=0;h<2;h+=1)for(d=0;d<2;d+=1)for(c=0;c<2;c+=1)u=r*t[c]+o*t[2+d]+a*t[4+h]+s,l[0]=u<l[0]?u:l[0],l[1]=u>l[1]?u:l[1];l[0]<0&&(l[0]=0),l[0]=.99*l[0]-.5*(l[1]-l[0]),l[1]=1.01*l[1]+.5*(l[1]-l[0]),l[0]=l[0]>=l[1]?.01*l[1]:l[0],n.m_nearClippingPlaneTolerance||(n.m_nearClippingPlaneTolerance=.01,n.m_depthBits&&n.m_depthBits>16&&(n.m_nearClippingPlaneTolerance=.001)),l[0]<n.m_nearClippingPlaneTolerance*l[1]&&(l[0]=n.m_nearClippingPlaneTolerance*l[1]),n.m_camera.setClippingRange(l[0],l[1])}}},this.resize=function(t,e){t&&e&&n.positionAndResize(n.m_x,n.m_y,t,e)},this.positionAndResize=function(t,e,i,r){var o;if(t<0||e<0||i<=0||r<=0)console.log("[error] Invalid position and resize values",t,e,i,r);else if(n.m_resizable&&(n.m_width=i,n.m_height=r,n.m_camera.setViewAspect(i/r),n.m_camera.setParallelExtents({width:i,height:r}),n.modified()),n.m_renderPasses)for(o=0;o<n.m_renderPasses.length;o+=1)n.m_renderPasses[o].resize(i,r),n.m_renderPasses[o].renderer().positionAndResize(t,e,i,r)},this.addActor=function(t){return t instanceof e.actor&&(n.m_sceneRoot.addChild(t),n.modified(),!0)},this.hasActor=function(t){return n.m_sceneRoot.hasChild(t)},this.addActors=function(t){var e=null;if(t instanceof Array){for(e=0;e<t.length;e+=1)n.m_sceneRoot.addChild(t[e]);n.modified()}},this.removeActor=function(t){return-1!==n.m_sceneRoot.children().indexOf(t)&&(n.m_lastRenderState&&(t.mapper()&&t.mapper()._cleanup(n.m_lastRenderState),t.material()&&t.material()._cleanup(n.m_lastRenderState)),t.modified(),n.m_sceneRoot.removeChild(t),n.modified(),!0)},this.removeActors=function(t){if(!(t instanceof Array))return!1;var e;for(e=0;e<t.length;e+=1)n.m_sceneRoot.removeChild(t[e]);return n.modified(),!0},this.removeAllActors=function(){return n.m_sceneRoot.removeChildren()},this.worldToDisplay=function(t,e,n,i,r){var s=o.create(),l=null,u=null,c=null,d=null,h=null;return o.multiply(s,n,e),h=a.create(),a.transformMat4(h,t,s),0!==h[3]&&(h[0]=h[0]/h[3],h[1]=h[1]/h[3],h[2]=h[2]/h[3],h[3]=1),l=(h[0]+1)/2*i,u=(1-h[1])/2*r,c=h[2],d=h[3],a.fromValues(l,u,c,d)},this.displayToWorld=function(t,e,n,i,r){var s=2*t[0]/i-1,l=-2*t[1]/r+1,u=t[2],c=o.create(),d=null;return o.multiply(c,n,e),o.invert(c,c),d=a.fromValues(s,l,u,1),a.transformMat4(d,d,c),0!==d[3]&&(d[0]=d[0]/d[3],d[1]=d[1]/d[3],d[2]=d[2]/d[3],d[3]=1),d},this.focusDisplayPoint=function(){var t=n.m_camera.focalPoint(),e=a.fromValues(t[0],t[1],t[2],1);return n.worldToDisplay(e,n.m_camera.viewMatrix(),n.m_camera.projectionMatrix(),n.m_width,n.m_height)},this.resetScene=function(){return n.m_resetScene},this.setResetScene=function(t){n.m_resetScene!==t&&(n.m_resetScene=t,n.modified())},this.resetClippingRange=function(){return n.m_resetClippingRange},this.setResetClippingRange=function(t){n.m_resetClippingRange!==t&&(n.m_resetClippingRange=t,n.modified())},this.addRenderPass=function(t){var e;if(n.m_renderPasses)for(e=0;e<n.m_renderPasses.length;e+=1)if(t===n.m_renderPasses[e])return;n.m_renderPasses=[],n.m_renderPasses.push(t)},this.removeRenderPass=function(t){t=t},this._cleanup=function(t){for(var e=n.m_sceneRoot.children(),i=0;i<e.length;i+=1){var r=e[i];r.material()._cleanup(t),r.mapper()._cleanup(t)}n.m_sceneRoot.removeChildren(),n.modified()},n},inherit(e.renderer,e.graphicsObject),e.renderWindow=function(t){"use strict";if(!(this instanceof e.renderWindow))return new e.renderWindow(t);e.graphicsObject.call(this);var n=this,i=0,r=0,o=400,s=400,l=t,u=null,c=[],d=null;return this.windowSize=function(){return[o,s]},this.setWindowSize=function(t,e){return(o!==t||s!==e)&&(o=t,s=e,n.modified(),!0)},this.windowPosition=function(){return[i,r]},this.setWindowPosition=function(t,e){return(i!==t||r!==e)&&(i=t,r=e,n.modified(),!0)},this.renderers=function(){return c},this.activeRenderer=function(){return u},this.addRenderer=function(t){return!1===n.hasRenderer(t)&&(c.push(t),t.setRenderWindow(n),null===u&&(u=t),0!==t.layer()&&t.camera().setClearMask(e.GL.DepthBufferBit),n.modified(),!0)},this.removeRenderer=function(t){var e=c.indexOf(t);return-1!==e&&(u===t&&(u=null),c.splice(e,1),n.modified(),!0)},this.getRenderer=function(t){return t<c.length?c[t]:(console.log("[WARNING] Out of index array"),null)},this.hasRenderer=function(t){var e;for(e=0;e<c.length;e+=1)if(t===c[e])return!0;return!1},this.resize=function(t,e){n.positionAndResize(i,r,t,e),n.modified()},this.positionAndResize=function(t,e,a,l){var u;for(i=t,r=e,o=a,s=l,u=0;u<c.length;u+=1)c[u].positionAndResize(i,r,o,s);n.modified()},this._setup=function(t){t=t,d=null;try{var e;for(d=l.getContext("webgl")||l.getContext("experimental-webgl"),e=0;e<c.length;e+=1)(c[e].width()>o||0===c[e].width()||c[e].height()>s||0===c[e].height())&&c[e].resize(i,r,o,s);return!0}catch(t){}return d||console("[ERROR] Unable to initialize WebGL. Your browser may not support it."),!1},this.context=function(){return d},this._cleanup=function(t){var i;for(i=0;i<c.length;i+=1)c[i]._cleanup(t);e.clearCachedShaders(t?t.m_context:null),n.modified()},this.render=function(){var t;for(c.sort((function(t,e){return t.layer()-e.layer()})),t=0;t<c.length;t+=1)c[t].render()},this.focusDisplayPoint=function(){return u.focusDisplayPoint()},this.displayToWorld=function(t,e,n,i){var r=(i=void 0===i?i=u:i).camera();return n||(n=i.focusDisplayPoint()),i.displayToWorld(a.fromValues(t,e,n[2],1),r.viewMatrix(),r.projectionMatrix(),o,s)},this.worldToDisplay=function(t,e,n,i){var r=(i=void 0===i?i=u:i).camera();return i.worldToDisplay(a.fromValues(t,e,n,1),r.viewMatrix(),r.projectionMatrix(),o,s)},n},inherit(e.renderWindow,e.graphicsObject),e.camera=function(t){"use strict";if(!(this instanceof e.camera))return new e.camera(t);e.groupNode.call(this),t=t||{};var n=30*Math.PI/180,i=a.fromValues(0,0,1,1),r=a.fromValues(0,0,0,1),l=s.fromValues(0,0,0),u=a.fromValues(0,1,0,0),c=a.fromValues(1,0,0,0),d=.01,h=1e4,f=1,p=a.fromValues(0,0,-1,0),m=a.fromValues(0,0,1,0),g=o.create(),v=o.create(),y=e.timestamp(),x=e.timestamp(),b=-1,_=1,w=1,M=-1,A={zoom:1,tilesize:256},T=!0,C=!0,E=!0,S=!1,k=[0,0,0,0],P=1,O=e.GL.COLOR_BUFFER_BIT|e.GL.DEPTH_BUFFER_BIT;return void 0!==t.parallelProjection&&(S=!!t.parallelProjection),this.viewAngle=function(){return n},this.setViewAngleDegrees=function(t){this.setViewAngle(Math.PI*t/180)},this.setViewAngle=function(t){E&&(n=t,this.modified())},this.position=function(){return i},this.setPosition=function(t,e,n){T&&(i=a.fromValues(t,e,n,1),this.modified())},this.focalPoint=function(){return r},this.setFocalPoint=function(t,e,n){C&&T&&(r=a.fromValues(t,e,n,1),this.modified())},this.viewUpDirection=function(){return u},this.setViewUpDirection=function(t,e,n){u=a.fromValues(t,e,n,0),this.modified()},this.centerOfRotation=function(){return l},this.setCenterOfRotation=function(t){l=t,this.modified()},this.clippingRange=function(){return[d,h]},this.setClippingRange=function(t,e){d=t,h=e,this.modified()},this.viewAspect=function(){return f},this.setViewAspect=function(t){f=t,this.modified()},this.enableScale=function(){return E},this.setEnableScale=function(t){return t!==E?(E=t,this.modified(),!0):E},this.enableRotation=function(){return C},this.setEnableRotation=function(t){return t!==C?(C=t,this.modified(),!0):C},this.enableTranslation=function(){return T},this.setEnableTranslation=function(t){return t!==T?(T=t,this.modified(),!0):T},this.isEnabledParallelProjection=function(){return S},this.enableParallelProjection=function(t){return t!==S?(S=t,this.modified(),!0):S},this.setEnableParallelProjection=function(t){return this.enableParallelProjection(t)},this.parallelProjection=function(){return{left:b,right:_,top:w,bottom:M}},this.setParallelProjection=function(t,e,n,i){b=t,_=e,w=n,M=i,this.modified()},this.parallelExtents=function(){return A},this.setParallelExtents=function(t){var e,n,i=["width","height","zoom","tilesize"],r=!1;for(e=0;e<i.length;e+=1)void 0!==t[n=i[e]]&&t[n]!==A[n]&&(A[n]=t[n],r=!0);if(r&&A.width&&A.height&&void 0!==A.zoom&&A.tilesize){var o=this.unitsPerPixel(A.zoom,A.tilesize);_=o*A.width/2,b=-_,w=o*A.height/2,M=-w,this.modified()}},this.unitsPerPixel=function(t,e){return e=e||256,360*Math.pow(2,-t)/e},this.directionOfProjection=function(){return this.computeDirectionOfProjection(),p},this.viewPlaneNormal=function(){return this.computeViewPlaneNormal(),m},this.viewMatrix=function(){return this.computeViewMatrix()},this.setViewMatrix=function(t,e){e?g=t.slice():o.copy(g,t),y.modified()},this.projectionMatrix=function(){return this.computeProjectionMatrix()},this.setProjectionMatrix=function(t){o.copy(v,t),x.modified()},this.clearMask=function(){return O},this.setClearMask=function(t){O=t,this.modified()},this.clearColor=function(){return k},this.setClearColor=function(t,e,n,i){k[0]=t,k[1]=e,k[2]=n,k[3]=i,this.modified()},this.clearDepth=function(){return P},this.setClearDepth=function(t){P=t,this.modified()},this.computeDirectionOfProjection=function(){s.subtract(p,r,i),s.normalize(p,p),this.modified()},this.computeViewPlaneNormal=function(){m[0]=-p[0],m[1]=-p[1],m[2]=-p[2]},this.zoom=function(t,e){0!==t&&T&&(t*=s.distance(r,i),e?(i[0]=i[0]+t*e[0],i[1]=i[1]+t*e[1],i[2]=i[2]+t*e[2]):(e=p,i[0]=r[0]-t*e[0],i[1]=r[1]-t*e[1],i[2]=r[2]-t*e[2]),this.modified())},this.pan=function(t,e,n){T&&(i[0]+=t,i[1]+=e,i[2]+=n,r[0]+=t,r[1]+=e,r[2]+=n,this.modified())},this.computeOrthogonalAxes=function(){this.computeDirectionOfProjection(),s.cross(c,p,u),s.normalize(c,c),this.modified()},this.rotate=function(t,e){if(C){t=.5*t*(Math.PI/180),e=.5*e*(Math.PI/180);var n=o.create(),d=new s.create;o.identity(n),d[0]=-l[0],d[1]=-l[1],d[2]=-l[2],o.translate(n,n,l),o.rotate(n,n,t,u),o.rotate(n,n,e,c),o.translate(n,n,d),a.transformMat4(i,i,n),a.transformMat4(r,r,n),a.transformMat4(u,u,n),a.normalize(u,u),this.computeOrthogonalAxes(),this.modified()}},this.computeViewMatrix=function(){return y.getMTime()<this.getMTime()&&(o.lookAt(g,i,r,u),y.modified()),g},this.viewAlignment=function(){if(!S){var t=this.projectionMatrix();if(t[1]||t[2]||t[3]||t[4]||t[6]||t[7]||t[8]||t[9]||t[12]||t[13]||t[15])return null}var e=this.unitsPerPixel(A.zoom,A.tilesize);if(!A.width||!A.height||!e)return null;if(parseFloat(A.zoom.toFixed(6))!==parseFloat(A.zoom.toFixed(0)))return null;var n={roundx:e,roundy:e,dx:0,dy:0};return A.width%2&&(n.dx=.5*e),A.height%2&&(n.dy=.5*e),n},this.computeProjectionMatrix=function(){return x.getMTime()<this.getMTime()&&(S?o.ortho(v,b,_,M,w,d,h):o.perspective(v,n,f,d,h),x.modified()),v},this.zoomToHeight=function(t,i,r){return e.zoomToHeight(t,i,r,n)},this.computeDirectionOfProjection(),this},inherit(e.camera,e.groupNode),e.zoomToHeight=function(t,e,n,i){"use strict";i=i||30*Math.PI/180;var r=360*Math.pow(2,-t);return r/=2*Math.tan(i/2)*256/n},e.heightToZoom=function(t,e,n,i){"use strict";return i=i||30*Math.PI/180,t*=2*Math.tan(i/2)*256/n,-Math.log2(t/360)},e.interactorStyle=function(){"use strict";if(!(this instanceof e.interactorStyle))return new e.interactorStyle;e.object.call(this);var t=this,n=null;return this.viewer=function(){return n},this.setViewer=function(i){i!==n&&(l(n=i).on(e.event.mousePress,t.handleMouseDown),l(n).on(e.event.mouseRelease,t.handleMouseUp),l(n).on(e.event.mouseMove,t.handleMouseMove),l(n).on(e.event.mouseOut,t.handleMouseOut),l(n).on(e.event.mouseWheel,t.handleMouseWheel),l(n).on(e.event.keyPress,t.handleKeyPress),l(n).on(e.event.mouseContextMenu,t.handleContextMenu),l(n).on(e.event.click,t.handleClick),l(n).on(e.event.dblClick,t.handleDoubleClick),this.modified())},this.handleMouseDown=function(t){return t=t,!0},this.handleMouseUp=function(t){return t=t,!0},this.handleMouseMove=function(t){return t=t,!0},this.handleMouseOut=function(t){return t=t,!0},this.handleMouseWheel=function(t){return t=t,!0},this.handleClick=function(t){return t=t,!0},this.handleDoubleClick=function(t){return t=t,!0},this.handleKeyPress=function(t){return t=t,!0},this.handleContextMenu=function(t){return t=t,!0},this.reset=function(){return!0},this},inherit(e.interactorStyle,e.object),e.trackballInteractorStyle=function(){"use strict";if(!(this instanceof e.trackballInteractorStyle))return new e.trackballInteractorStyle;e.interactorStyle.call(this);var t,n=this,i=!1,r=!1,o=!1,s={x:0,y:0},l={x:0,y:0};return this.handleMouseMove=function(e){var u,c,d,h,f,p,m,g,v,y,x,b=n.viewer().renderWindow().windowSize()[0],_=n.viewer().renderWindow().windowSize()[1],w=n.viewer().renderWindow().activeRenderer(),M=w.camera(),A=n.viewer().relMouseCoords(e);if(t=!1,s={x:0,y:0},A.x<0||A.x>b?(s.x=0,t=!0):s.x=A.x,A.y<0||A.y>_?(s.y=0,t=!0):s.y=A.y,!0!==t)return u=M.focalPoint(),d=a.fromValues(u[0],u[1],u[2],1),c=w.worldToDisplay(d,M.viewMatrix(),M.projectionMatrix(),b,_),h=a.fromValues(s.x,s.y,c[2],1),f=a.fromValues(l.x,l.y,c[2],1),p=w.displayToWorld(h,M.viewMatrix(),M.projectionMatrix(),b,_),m=w.displayToWorld(f,M.viewMatrix(),M.projectionMatrix(),b,_),g=p[0]-m[0],v=p[1]-m[1],y=p[2]-m[2],o&&(M.pan(-g,-v,-y),n.viewer().render()),i&&(M.rotate(l.x-s.x,l.y-s.y),w.resetCameraClippingRange(),n.viewer().render()),r&&((x=2*(s.y-l.y)/_)>0?M.zoom(1-Math.abs(x)):M.zoom(1+Math.abs(x)),w.resetCameraClippingRange(),n.viewer().render()),l.x=s.x,l.y=s.y,!1},this.handleMouseDown=function(t){var e;return 0===t.button&&(i=!0),1===t.button&&(o=!0),2===t.button&&(r=!0),(e=n.viewer().relMouseCoords(t)).x<0?l.x=0:l.x=e.x,e.y<0?l.y=0:l.y=e.y,!1},this.handleMouseUp=function(t){return 0===t.button&&(i=!1),1===t.button&&(o=!1),2===t.button&&(r=!1),!1},this.handleMouseWheel=function(t){var e=n.viewer().renderWindow().activeRenderer(),i=e.camera();return t.originalEvent.wheelDelta<0?i.zoom(.9):i.zoom(1.1),e.resetCameraClippingRange(),n.viewer().render(),!0},this},inherit(e.trackballInteractorStyle,e.interactorStyle),e.viewer=function(t,n){"use strict";if(!(this instanceof e.viewer))return new e.viewer(t,n);e.object.call(this);var i=this,r=t,o=!0,a=null,s=e.renderer(n),u=e.renderWindow(r);return this.canvas=function(){return r},this.renderWindow=function(){return u},this.init=function(){null!==u?u._setup():console.log("[ERROR] No render window attached")},this.exit=function(t){null!==u?u._cleanup(t):console.log("[ERROR] No render window attached")},this.interactorStyle=function(){return a},this.setInteractorStyle=function(t){t!==a&&((a=t).setViewer(this),this.modified())},this.handleMouseDown=function(t){if(!0===o){var n=l.event.fix(t||window.event);2===t.button&&n.preventDefault(),n.state="down",n.type=e.event.mousePress,l(i).trigger(n)}return!0},this.handleMouseUp=function(t){if(!0===o){var n=l.event.fix(t||window.event);n.preventDefault(),n.state="up",n.type=e.event.mouseRelease,l(i).trigger(n)}return!0},this.handleMouseMove=function(t){if(!0===o){var n=l.event.fix(t||window.event);n.preventDefault(),n.type=e.event.mouseMove,l(i).trigger(n)}return!0},this.handleMouseWheel=function(t){if(!0===o){var n=l.event.fix(t||window.event);n.preventDefault(),n.type=e.event.mouseWheel,l(i).trigger(n)}return!0},this.handleMouseOut=function(t){if(!0===o){var n=l.event.fix(t||window.event);n.preventDefault(),n.type=e.event.mouseOut,l(i).trigger(n)}return!0},this.handleKeyPress=function(t){if(!0===o){var n=l.event.fix(t||window.event);n.preventDefault(),n.type=e.event.keyPress,l(i).trigger(n)}return!0},this.handleContextMenu=function(t){if(!0===o){var n=l.event.fix(t||window.event);n.preventDefault(),n.type=e.event.contextMenu,l(i).trigger(n)}return!1},this.handleClick=function(t){if(!0===o){var n=l.event.fix(t||window.event);n.preventDefault(),n.type=e.event.click,l(i).trigger(n)}return!1},this.handleDoubleClick=function(t){if(!0===o){var n=l.event.fix(t||window.event);n.preventDefault(),n.type=e.event.dblClick,l(i).trigger(n)}return!1},this.relMouseCoords=function(t){if(void 0===t.pageX||void 0===t.pageY)throw"Missing attributes pageX and pageY on the event";var e=0,n=0,i=r;do{e+=i.offsetLeft-i.scrollLeft,n+=i.offsetTop-i.scrollTop,i=i.offsetParent}while(i);return{x:t.pageX-e,y:t.pageY-n}},this.render=function(){u.render()},this.bindEventHandlers=function(){l(r).on("mousedown",this.handleMouseDown),l(r).on("mouseup",this.handleMouseUp),l(r).on("mousemove",this.handleMouseMove),l(r).on("mousewheel",this.handleMouseWheel),l(r).on("contextmenu",this.handleContextMenu)},this.unbindEventHandlers=function(){l(r).off("mousedown",this.handleMouseDown),l(r).off("mouseup",this.handleMouseUp),l(r).off("mousemove",this.handleMouseMove),l(r).off("mousewheel",this.handleMouseWheel),l(r).off("contextmenu",this.handleContextMenu)},this._init=function(){this.bindEventHandlers(),u.addRenderer(s)},this._init(),this},inherit(e.viewer,e.object),e.shader=function(t){"use strict";if(!(this instanceof e.shader))return new e.shader(t);e.object.call(this);var n=[],i=t,r="";this._getContextEntry=function(t){var i,r,o=t.m_context;for(i=0;i<n.length;i+=1)if(n[i].context===o)return n[i];return r={context:o,compileTimestamp:e.timestamp()},n.push(r),r},this.removeContext=function(t){var e,i=t.m_context;for(e=0;e<n.length;e+=1)if(n[e].context===i)return void n.splice(e,1)},this.shaderHandle=function(t){return this._getContextEntry(t).shaderHandle},this.shaderType=function(){return i},this.shaderSource=function(){return r},this.setShaderSource=function(t){r=t,this.modified()},this.compile=function(t){var n=this._getContextEntry(t);return this.getMTime()<n.compileTimestamp.getMTime()?n.shaderHandle:(t.m_context.deleteShader(n.shaderHandle),n.shaderHandle=t.m_context.createShader(i),t.m_context.shaderSource(n.shaderHandle,r),t.m_context.compileShader(n.shaderHandle),t.m_context.getShaderParameter(n.shaderHandle,e.GL.COMPILE_STATUS)?(n.compileTimestamp.modified(),n.shaderHandle):(console.log("[ERROR] An error occurred compiling the shaders: "+t.m_context.getShaderInfoLog(n.shaderHandle)),console.log(r),t.m_context.deleteShader(n.shaderHandle),null))},this.attachShader=function(t,e){t.m_context.attachShader(e,this.shaderHandle(t))}},inherit(e.shader,e.object),function(){"use strict";var t=[],n=10;e.getCachedShader=function(i,r,o){for(var a=0;a<t.length;a+=1)if(t[a].type===i&&t[a].context===r&&t[a].source===o)return a&&t.splice(0,0,t.splice(a,1)[0]),t[0].shader;var s=new e.shader(i);return s.setShaderSource(o),t.unshift({type:i,context:r,source:o,shader:s}),t.length>=n&&t.splice(n,t.length-n),s},e.clearCachedShaders=function(e){for(var n=t.length-1;n>=0;n-=1)null!=e&&t[n].context!==e||t.splice(n,1)}}();var i=function(){"use strict";var t=".",e=document.getElementsByTagName("script");if(e.length>0){var n=e.length-1,i=e[n];n=i.src.lastIndexOf("/"),t=i.src.substring(0,n)}return function(){return t}}();return e.shaderProgram=function(){"use strict";if(!(this instanceof e.shaderProgram))return new e.shaderProgram;e.materialAttribute.call(this,e.materialAttributeType.ShaderProgram);var t=this,n=0,r=e.timestamp(),o=e.timestamp(),a=[],s=[],u={},c={},d={};return this.loadFromFile=function(n,i){var r,o=!1;return l.ajax({url:i,type:"GET",dataType:"text",async:!1,success:function(i){(r=e.shader(n)).setShaderSource(i),t.addShader(r),o=!0}}),o},this.loadShader=function(t,e){return this.loadFromFile(t,i()+"/shaders/"+e)},this.queryUniformLocation=function(t,e){return t.m_context.getUniformLocation(n,e)},this.queryAttributeLocation=function(t,e){return t.m_context.getAttribLocation(n,e)},this.addShader=function(e){if(a.indexOf(e)>-1)return!1;var n;for(n=a.length-2;n>=0;n-=1)a[n].shaderType()===e.shaderType()&&a.splice(n,1);return a.push(e),t.modified(),!0},this.addUniform=function(e){return!(s.indexOf(e)>-1||(s.push(e),t.modified(),0))},this.addVertexAttribute=function(e,n){u[n]=e,t.modified()},this.uniformLocation=function(t){return c[t]},this.attributeLocation=function(t){return d[t]},this.uniform=function(t){var e;for(e=0;e<s.length;e+=1)if(s[e].name()===t)return s[e];return null},this.updateUniforms=function(t){var e;for(e=0;e<s.length;e+=1)s[e].callGL(t,c[s[e].name()])},this.link=function(t){return t.m_context.linkProgram(n),!!t.m_context.getProgramParameter(n,e.GL.LINK_STATUS)||(console.log("[ERROR] Unable to initialize the shader program."),!1)},this.use=function(t){t.m_context.useProgram(n)},this._setup=function(t){0===n&&(n=t.m_context.createProgram())},this._cleanup=function(e){t.deleteVertexAndFragment(e),t.deleteProgram(e),t.modified()},this.deleteProgram=function(t){n&&t.m_context.deleteProgram(n),n=0},this.deleteVertexAndFragment=function(t){var e;for(e=0;e<a.length;e+=1)a[e].shaderHandle(t)&&t.m_context.detachShader(n,a[e].shaderHandle(t)),t.m_context.deleteShader(a[e].shaderHandle(t)),a[e].removeContext(t)},this.compileAndLink=function(e){var i;if(!(r.getMTime()>=this.getMTime())){for(t._setup(e),i=0;i<a.length;i+=1)a[i].compile(e),a[i].attachShader(e,n);t.bindAttributes(e),t.link(e)||(console.log("[ERROR] Failed to link Program"),t._cleanup(e)),r.modified()}},this.bind=function(e){var n=0;for(o.getMTime()<t.getMTime()?(t.compileAndLink(e),t.use(e),t.bindUniforms(e),o.modified()):t.use(e),n=0;n<s.length;n+=1)s[n].update(e,t);t.updateUniforms(e)},this.undoBind=function(t){t.m_context.useProgram(null)},this.bindVertexData=function(t,e){u.hasOwnProperty(e)&&u[e].bindVertexData(t,e)},this.undoBindVertexData=function(t,e){u.hasOwnProperty(e)&&u[e].undoBindVertexData(t,e)},this.bindUniforms=function(t){var e;for(e=0;e<s.length;e+=1)c[s[e].name()]=this.queryUniformLocation(t,s[e].name())},this.bindAttributes=function(t){var e,i;for(e in u)u.hasOwnProperty(e)&&(i=u[e].name(),t.m_context.bindAttribLocation(n,e,i),d[i]=e)},t},inherit(e.shaderProgram,e.materialAttribute),e.texture=function(){"use strict";if(!(this instanceof e.texture))return new e.texture;e.materialAttribute.call(this,e.materialAttributeType.Texture),this.m_width=0,this.m_height=0,this.m_depth=0,this.m_textureHandle=null,this.m_textureUnit=0,this.m_pixelFormat=e.GL.RGBA,this.m_pixelDataType=e.GL.UNSIGNED_BYTE,this.m_internalFormat=e.GL.RGBA,this.m_nearestPixel=!1,this.m_image=null;var t=e.timestamp(),n=this;function i(t){switch(n.m_textureUnit){case 0:t.m_context.activeTexture(e.GL.TEXTURE0);break;case 1:t.m_context.activeTexture(e.GL.TEXTURE1);break;case 2:t.m_context.activeTexture(e.GL.TEXTURE2);break;case 3:t.m_context.activeTexture(e.GL.TEXTURE3);break;case 4:t.m_context.activeTexture(e.GL.TEXTURE4);break;case 5:t.m_context.activeTexture(e.GL.TEXTURE5);break;case 6:t.m_context.activeTexture(e.GL.TEXTURE6);break;case 7:t.m_context.activeTexture(e.GL.TEXTURE7);break;case 8:t.m_context.activeTexture(e.GL.TEXTURE8);break;case 9:t.m_context.activeTexture(e.GL.TEXTURE9);break;case 10:t.m_context.activeTexture(e.GL.TEXTURE10);break;case 11:t.m_context.activeTexture(e.GL.TEXTURE11);break;case 12:t.m_context.activeTexture(e.GL.TEXTURE12);break;case 13:t.m_context.activeTexture(e.GL.TEXTURE13);break;case 14:t.m_context.activeTexture(e.GL.TEXTURE14);break;case 15:t.m_context.activeTexture(e.GL.TEXTURE15);break;default:throw"[error] Texture unit "+n.m_textureUnit+" is not supported"}}return this.setup=function(n){i(n),n.m_context.deleteTexture(this.m_textureHandle),this.m_textureHandle=n.m_context.createTexture(),n.m_context.bindTexture(e.GL.TEXTURE_2D,this.m_textureHandle),n.m_context.texParameteri(e.GL.TEXTURE_2D,e.GL.TEXTURE_MIN_FILTER,this.m_nearestPixel?e.GL.NEAREST:e.GL.LINEAR),n.m_context.texParameteri(e.GL.TEXTURE_2D,e.GL.TEXTURE_MAG_FILTER,this.m_nearestPixel?e.GL.NEAREST:e.GL.LINEAR),n.m_context.texParameteri(e.GL.TEXTURE_2D,e.GL.TEXTURE_WRAP_S,e.GL.CLAMP_TO_EDGE),n.m_context.texParameteri(e.GL.TEXTURE_2D,e.GL.TEXTURE_WRAP_T,e.GL.CLAMP_TO_EDGE),null!==this.m_image?(n.m_context.pixelStorei(e.GL.UNPACK_ALIGNMENT,1),n.m_context.pixelStorei(e.GL.UNPACK_FLIP_Y_WEBGL,!0),this.updateDimensions(),this.computeInternalFormatUsingImage(),n.m_context.texImage2D(e.GL.TEXTURE_2D,0,this.m_internalFormat,this.m_pixelFormat,this.m_pixelDataType,this.m_image)):n.m_context.texImage2D(e.GL.TEXTURE_2D,0,this.m_internalFormat,this.m_width,this.m_height,0,this.m_pixelFormat,this.m_pixelDataType,null),n.m_context.bindTexture(e.GL.TEXTURE_2D,null),t.modified()},this.bind=function(n){this.getMTime()>t.getMTime()&&this.setup(n),i(n),n.m_context.bindTexture(e.GL.TEXTURE_2D,this.m_textureHandle)},this.undoBind=function(t){t.m_context.bindTexture(e.GL.TEXTURE_2D,null)},this.image=function(){return this.m_image},this.setImage=function(t){return null!==t&&(this.m_image=t,this.updateDimensions(),this.modified(),!0)},this.nearestPixel=function(){return this.m_nearestPixel},this.setNearestPixel=function(t){return(t=!!t)!==this.m_nearestPixel&&(this.m_nearestPixel=t,this.modified(),!0)},this.textureUnit=function(){return this.m_textureUnit},this.setTextureUnit=function(t){return this.m_textureUnit!==t&&(this.m_textureUnit=t,this.modified(),!0)},this.width=function(){return this.m_width},this.setWidth=function(t){return n.m_width!==t&&(n.m_width=t,n.modified(),!0)},this.height=function(){return n.m_height},this.setHeight=function(t){return n.m_height!==t&&(n.m_height=t,n.modified(),!0)},this.depth=function(){return this.m_depth},this.setDepth=function(t){return null!==this.m_image&&(this.m_depth=t,this.modified(),!0)},this.textureHandle=function(){return this.m_textureHandle},this.internalFormat=function(){return this.m_internalFormat},this.setInternalFormat=function(t){return this.m_internalFormat!==t&&(this.m_internalFormat=t,this.modified(),!0)},this.pixelFormat=function(){return this.m_pixelFormat},this.setPixelFormat=function(t){return null!==this.m_image&&(this.m_pixelFormat=t,this.modified(),!0)},this.pixelDataType=function(){return this.m_pixelDataType},this.setPixelDataType=function(t){return null!==this.m_image&&(this.m_pixelDataType=t,this.modified(),!0)},this.computeInternalFormatUsingImage=function(){this.m_internalFormat=e.GL.RGBA,this.m_pixelFormat=e.GL.RGBA,this.m_pixelDataType=e.GL.UNSIGNED_BYTE},this.updateDimensions=function(){null!==this.m_image&&(this.m_width=this.m_image.width,this.m_height=this.m_image.height,this.m_depth=0)},this},inherit(e.texture,e.materialAttribute),e.lookupTable=function(){"use strict";if(!(this instanceof e.lookupTable))return new e.lookupTable;e.texture.call(this);var t=e.timestamp(),n=[0,0];return this.m_colorTable=[.07514311,.468049805,1,1,.247872569,.498782363,1,1,.339526309,.528909511,1,1,.409505078,.558608486,1,1,.468487184,.588057293,1,1,.520796675,.617435078,1,1,.568724526,.646924167,1,1,.613686735,.676713218,1,1,.656658579,.707001303,1,1,.698372844,.738002964,1,1,.739424025,.769954435,1,1,.780330104,.803121429,1,1,.821573924,.837809045,1,1,.863634967,.874374691,1,1,.907017747,.913245283,1,1,.936129275,.938743558,.983038586,1,.943467973,.943498599,.943398095,1,.990146732,.928791426,.917447482,1,1,.88332677,.861943246,1,1,.833985467,.803839606,1,1,.788626485,.750707739,1,1,.746206642,.701389973,1,1,.70590052,.654994046,1,1,.667019783,.610806959,1,1,.6289553,.568237474,1,1,.591130233,.526775617,1,1,.552955184,.485962266,1,1,.513776083,.445364274,1,1,.472800903,.404551679,1,1,.428977855,.363073592,1,1,.380759558,.320428137,1,.961891484,.313155629,.265499262,1,.916482116,.236630659,.209939162,1].map((function(t){return 255*t})),this.setup=function(n){0===this.textureUnit()?n.m_context.activeTexture(e.GL.TEXTURE0):1===this.textureUnit()&&n.m_context.activeTexture(e.GL.TEXTURE1),n.m_context.deleteTexture(this.m_textureHandle),this.m_textureHandle=n.m_context.createTexture(),n.m_context.bindTexture(e.GL.TEXTURE_2D,this.m_textureHandle),n.m_context.texParameteri(e.GL.TEXTURE_2D,e.GL.TEXTURE_MIN_FILTER,e.GL.LINEAR),n.m_context.texParameteri(e.GL.TEXTURE_2D,e.GL.TEXTURE_MAG_FILTER,e.GL.LINEAR),n.m_context.texParameteri(e.GL.TEXTURE_2D,e.GL.TEXTURE_WRAP_S,e.GL.CLAMP_TO_EDGE),n.m_context.texParameteri(e.GL.TEXTURE_2D,e.GL.TEXTURE_WRAP_T,e.GL.CLAMP_TO_EDGE),n.m_context.pixelStorei(e.GL.UNPACK_ALIGNMENT,1),this.m_width=this.m_colorTable.length/4,this.m_height=1,this.m_depth=0,n.m_context.texImage2D(e.GL.TEXTURE_2D,0,e.GL.RGBA,this.m_width,this.m_height,this.m_depth,e.GL.RGBA,e.GL.UNSIGNED_BYTE,new Uint8Array(this.m_colorTable)),n.m_context.bindTexture(e.GL.TEXTURE_2D,null),t.modified()},this.colorTable=function(){return this.m_colorTable},this.setColorTable=function(t){return this.m_colorTable!==t&&(this.m_colorTable=t,this.modified(),!0)},this.range=function(){return n},this.setRange=function(t){return n!==t&&(n=t,this.modified(),!0)},this.updateRange=function(t){t instanceof Array||console.log("[error] Invalid data type for range. Requires array [min,max]"),t[0]<n[0]&&(n[0]=t[0],this.modified()),t[1]>n[1]&&(n[1]=t[1],this.modified())},this},inherit(e.lookupTable,e.texture),e.uniform=function(t,n){"use strict";if(!(this instanceof e.uniform))return new e.uniform(t,n);this.getTypeNumberOfComponents=function(t){switch(t){case e.GL.FLOAT:case e.GL.INT:case e.GL.BOOL:return 1;case e.GL.FLOAT_VEC2:case e.GL.INT_VEC2:case e.GL.BOOL_VEC2:return 2;case e.GL.FLOAT_VEC3:case e.GL.INT_VEC3:case e.GL.BOOL_VEC3:return 3;case e.GL.FLOAT_VEC4:case e.GL.INT_VEC4:case e.GL.BOOL_VEC4:return 4;case e.GL.FLOAT_MAT3:return 9;case e.GL.FLOAT_MAT4:return 16;default:return 0}};var i=t,r=n,o=[];return o.length=this.getTypeNumberOfComponents(i),this.name=function(){return r},this.type=function(){return i},this.get=function(){return o},this.set=function(t){var e=0,n=o.length;if(1!==n)for(e=0;e<n;e+=1)o[e]=t[e];else o[0]=t},this.callGL=function(t,n){switch(i){case e.GL.BOOL:case e.GL.INT:t.m_context.uniform1iv(n,o);break;case e.GL.FLOAT:t.m_context.uniform1fv(n,o);break;case e.GL.BOOL_VEC2:case e.GL.INT_VEC2:t.m_context.uniform2iv(n,o);break;case e.GL.FLOAT_VEC2:t.m_context.uniform2fv(n,o);break;case e.GL.BOOL_VEC3:case e.GL.INT_VEC3:t.m_context.uniform3iv(n,o);break;case e.GL.FLOAT_VEC3:t.m_context.uniform3fv(n,o);break;case e.GL.BOOL_VEC4:case e.GL.INT_VEC4:t.m_context.uniform4iv(n,o);break;case e.GL.FLOAT_VEC4:t.m_context.uniform4fv(n,o);break;case e.GL.FLOAT_MAT3:t.m_context.uniformMatrix3fv(n,e.GL.FALSE,o);break;case e.GL.FLOAT_MAT4:t.m_context.uniformMatrix4fv(n,e.GL.FALSE,o)}},this.update=function(t,e){},this},e.modelViewUniform=function(t){"use strict";return this instanceof e.modelViewUniform?(t||(t="modelViewMatrix"),e.uniform.call(this,e.GL.FLOAT_MAT4,t),this.set(o.create()),this.update=function(t,e){this.set(t.m_modelViewMatrix)},this):new e.modelViewUniform(t)},inherit(e.modelViewUniform,e.uniform),e.modelViewOriginUniform=function(t,n){"use strict";if(!(this instanceof e.modelViewOriginUniform))return new e.modelViewOriginUniform(t,n);t||(t="modelViewMatrix");var i=[(n=n||[0,0,0])[0],n[1],n[2]||0];return e.uniform.call(this,e.GL.FLOAT_MAT4,t),this.set(o.create()),this.setOrigin=function(t){i=[(t=t||[0,0,0])[0],t[1],t[2]||0]},this.update=function(t,e){var n=t.m_modelViewMatrix;if(t.m_modelViewAlignment){var r=t.m_modelViewAlignment;(n=n.slice?n.slice():Array.prototype.slice.call(n))[12]=Math.round(n[12]/r.roundx)*r.roundx+r.dx,n[13]=Math.round(n[13]/r.roundy)*r.roundy+r.dy}n=o.translate(o.create(),n,i),this.set(n)},this},inherit(e.modelViewOriginUniform,e.uniform),e.projectionUniform=function(t){"use strict";return this instanceof e.projectionUniform?(t||(t="projectionMatrix"),e.uniform.call(this,e.GL.FLOAT_MAT4,t),this.set(o.create()),this.update=function(t,e){this.set(t.m_projectionMatrix)},this):new e.projectionUniform(t)},inherit(e.projectionUniform,e.uniform),e.floatUniform=function(t,n){"use strict";if(!(this instanceof e.floatUniform))return new e.floatUniform(t,n);t||(t="floatUniform"),n=void 0===n?1:n,e.uniform.call(this,e.GL.FLOAT,t),this.set(n)},inherit(e.floatUniform,e.uniform),e.normalMatrixUniform=function(t){"use strict";return this instanceof e.normalMatrixUniform?(t||(t="normalMatrix"),e.uniform.call(this,e.GL.FLOAT_MAT4,t),this.set(o.create()),this.update=function(t,e){this.set(t.m_normalMatrix)},this):new e.normalMatrixUniform(t)},inherit(e.normalMatrixUniform,e.uniform),e.vertexAttributeKeys={Position:0,Normal:1,TextureCoordinate:2,Color:3,Scalar:4,CountAttributeIndex:5},e.vertexAttributeKeysIndexed={Zero:0,One:1,Two:2,Three:3,Four:4,Five:5,Six:6,Seven:7,Eight:8,Nine:9},e.vertexAttribute=function(t){"use strict";if(!(this instanceof e.vertexAttribute))return new e.vertexAttribute(t);var n=t;this.name=function(){return n},this.bindVertexData=function(t,e){var i=t.m_mapper.geometryData().sourceData(e),r=t.m_material.shaderProgram();t.m_context.vertexAttribPointer(r.attributeLocation(n),i.attributeNumberOfComponents(e),i.attributeDataType(e),i.normalized(e),i.attributeStride(e),i.attributeOffset(e)),t.m_context.enableVertexAttribArray(r.attributeLocation(n))},this.undoBindVertexData=function(t,e){e=e;var i=t.m_material.shaderProgram();t.m_context.disableVertexAttribArray(i.attributeLocation(n))}},e.source=function(){"use strict";return this instanceof e.source?(e.object.call(this),this.create=function(){},this):new e.source},inherit(e.source,e.object),e.planeSource=function(){"use strict";if(!(this instanceof e.planeSource))return new e.planeSource;e.source.call(this);var t=[0,0,0],n=[1,0,0],i=[0,1,0],r=[0,0,1],o=1,a=1,s=null;this.setOrigin=function(e,n,i){t[0]=e,t[1]=n,t[2]=i},this.setPoint1=function(t,e,i){n[0]=t,n[1]=e,n[2]=i},this.setPoint2=function(t,e,n){i[0]=t,i[1]=e,i[2]=n},this.create=function(){s=new e.geometryData;var l,u,c,d,h,f=[],p=[],m=[],g=[],v=[],y=0,x=0,b=0,_=0,w=[],M=[],A=[],T=[],C=[],E=null,S=null,k=null;for(f.length=3,p.length=2,m.length=3,g.length=3,v.length=3,l=0;l<3;l+=1)m[l]=n[l]-t[l],g[l]=i[l]-t[l];for(d=(o+1)*(a+1),w.length=3*d,M.length=3*d,T.length=2*d,C.length=d,l=0;l<a+1;l+=1)for(p[1]=l/a,u=0;u<o+1;u+=1){for(p[0]=u/o,c=0;c<3;c+=1)f[c]=t[c]+p[0]*m[c]+p[1]*g[c];w[y++]=f[0],w[y++]=f[1],w[y++]=f[2],A[b++]=1,A[b++]=1,A[b++]=1,M[x++]=r[0],M[x++]=r[1],M[x++]=r[2],T[_++]=p[0],T[_++]=p[1]}for(l=0;l<a;l+=1)for(u=0;u<o;u+=1)v[0]=u+l*(o+1),v[1]=v[0]+1,v[2]=v[0]+o+2,v[3]=v[0]+o+1;for(l=0;l<d;l+=1)C[l]=l;return(E=new e.triangleStrip).setIndices(C),(S=e.sourceDataP3fv()).pushBack(w),(k=e.sourceDataC3fv()).pushBack(A),(h=e.sourceDataT2fv()).pushBack(T),s.addSource(S),s.addSource(k),s.addSource(h),s.addPrimitive(E),s}},inherit(e.planeSource,e.source),e.pointSource=function(){"use strict";if(!(this instanceof e.pointSource))return new e.pointSource;e.source.call(this);var t=this,n=[],i=[],r=[],o=[],a=null;this.getPositions=function(){return n},this.setPositions=function(e){e instanceof Array?n=e:console.log("[ERROR] Invalid data type for positions. Array is required."),t.modified()},this.getColors=function(){return i},this.setColors=function(e){e instanceof Array?i=e:console.log("[ERROR] Invalid data type for colors. Array is required."),t.modified()},this.getSize=function(){return o},this.setSize=function(t){o=t,this.modified()},this.setTextureCoordinates=function(e){e instanceof Array?r=e:console.log("[ERROR] Invalid data type for texture coordinates. Array is required."),t.modified()},this.create=function(){if(a=new e.geometryData,n.length%3==0){var t,s,l,u,c,d=n.length/3,h=0,f=[];for(f.length=d,h=0;h<d;h+=1)f[h]=h;if(c=e.sourceDataDf(),d!==o.length)for(h=0;h<d;h+=1)c.pushBack(o);else c.setData(o);return a.addSource(c),(t=new e.points).setIndices(f),(s=e.sourceDataP3fv()).pushBack(n),a.addSource(s),i.length>0&&i.length===n.length?((l=e.sourceDataC3fv()).pushBack(i),a.addSource(l)):i.length>0&&i.length!==n.length&&console.log("[ERROR] Number of colors are different than number of points"),r.length>0&&r.length===n.length?((u=e.sourceDataT2fv()).pushBack(r),a.addSource(u)):r.length>0&&r.length/2!=n.length/3&&console.log("[ERROR] Number of texture coordinates are different than number of points"),a.addPrimitive(t),a}console.log("[ERROR] Invalid length of the points array")}},inherit(e.pointSource,e.source),e.lineSource=function(t,n){"use strict";if(!(this instanceof e.lineSource))return new e.lineSource;e.source.call(this);var i=t,r=n;this.setPositions=function(t){return t instanceof Array?(i=t,this.modified(),!0):(console.log("[ERROR] Invalid data type for positions. Array is required."),!1)},this.setColors=function(t){return t instanceof Array?(r=t,this.modified(),!0):(console.log("[ERROR] Invalid data type for colors. Array is required."),!1)},this.create=function(){if(i)if(i.length%3==0){if(i.length%3==0){var t,n,o,a,s=new e.geometryData,l=i.length/3,u=[];for(u.length=l,t=0;t<l;t+=1)u[t]=t;return(n=new e.lines).setIndices(u),(o=e.sourceDataP3fv()).pushBack(i),s.addSource(o),r&&r.length>0&&r.length===i.length?((a=e.sourceDataC3fv()).pushBack(r),s.addSource(a)):r&&r.length>0&&r.length!==i.length&&console.log("[error] Number of colors are different than number of points"),s.addPrimitive(n),s}console.log("[ERROR] Invalid length of the points array")}else console.log("[error] Line source requires 3d points");else console.log("[error] Invalid positions")}},inherit(e.lineSource,e.source),e.utils=function(){"use strict";return this instanceof e.utils?(e.object.call(this),this):new e.utils},inherit(e.utils,e.object),e.utils.computePowerOfTwo=function(t,e){"use strict";for(e=e||1;e<t;)e*=2;return e},e.utils.createTextureVertexShader=function(t){"use strict";var n=["attribute vec3 vertexPosition;","attribute vec3 textureCoord;","uniform mediump float pointSize;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","varying highp vec3 iTextureCoord;","void main(void)","{","gl_PointSize = pointSize;","gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition, 1.0);"," iTextureCoord = textureCoord;","}"].join("\n");return e.getCachedShader(e.GL.VERTEX_SHADER,t,n)},e.utils.createTextureFragmentShader=function(t){"use strict";var n=["varying highp vec3 iTextureCoord;","uniform sampler2D sampler2d;","uniform mediump float opacity;","void main(void) {","gl_FragColor = vec4(texture2D(sampler2d, vec2(iTextureCoord.s, iTextureCoord.t)).xyz, opacity);","}"].join("\n");return e.getCachedShader(e.GL.FRAGMENT_SHADER,t,n)},e.utils.createRgbaTextureFragmentShader=function(t){"use strict";var n=["varying highp vec3 iTextureCoord;","uniform sampler2D sampler2d;","uniform mediump float opacity;","void main(void) {"," mediump vec4 color = vec4(texture2D(sampler2d, vec2(iTextureCoord.s, iTextureCoord.t)).xyzw);"," color.w *= opacity;"," gl_FragColor = color;","}"].join("\n");return e.getCachedShader(e.GL.FRAGMENT_SHADER,t,n)},e.utils.createVertexShader=function(t){"use strict";var n=["attribute vec3 vertexPosition;","attribute vec3 vertexColor;","uniform mediump float pointSize;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","varying mediump vec3 iVertexColor;","varying highp vec3 iTextureCoord;","void main(void)","{","gl_PointSize = pointSize;","gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition, 1.0);"," iVertexColor = vertexColor;","}"].join("\n");return e.getCachedShader(e.GL.VERTEX_SHADER,t,n)},e.utils.createPointVertexShader=function(t){"use strict";var n=["attribute vec3 vertexPosition;","attribute vec3 vertexColor;","attribute float vertexSize;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","varying mediump vec3 iVertexColor;","varying highp vec3 iTextureCoord;","void main(void)","{","gl_PointSize = vertexSize;","gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition, 1.0);"," iVertexColor = vertexColor;","}"].join("\n");return e.getCachedShader(e.GL.VERTEX_SHADER,t,n)},e.utils.createVertexShaderSolidColor=function(t){"use strict";var n=["attribute vec3 vertexPosition;","uniform mediump float pointSize;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","void main(void)","{","gl_PointSize = pointSize;","gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition, 1.0);","}"].join("\n");return e.getCachedShader(e.GL.VERTEX_SHADER,t,n)},e.utils.createVertexShaderColorMap=function(t,n,i){"use strict";n=n,i=i;var r=["attribute vec3 vertexPosition;","attribute float vertexScalar;","uniform mediump float pointSize;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float lutMin;","uniform float lutMax;","varying mediump float iVertexScalar;","void main(void)","{","gl_PointSize = pointSize;","gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition, 1.0);","iVertexScalar = (vertexScalar-lutMin)/(lutMax-lutMin);","}"].join("\n");return e.getCachedShader(e.GL.VERTEX_SHADER,t,r)},e.utils.createFragmentShader=function(t){"use strict";var n=["varying mediump vec3 iVertexColor;","uniform mediump float opacity;","void main(void) {","gl_FragColor = vec4(iVertexColor, opacity);","}"].join("\n");return e.getCachedShader(e.GL.FRAGMENT_SHADER,t,n)},e.utils.createPhongVertexShader=function(t){"use strict";var n=["attribute highp vec3 vertexPosition;","attribute mediump vec3 vertexNormal;","attribute mediump vec3 vertexColor;","uniform highp mat4 projectionMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 normalMatrix;","varying highp vec4 varPosition;","varying mediump vec3 varNormal;","varying mediump vec3 varVertexColor;","void main(void)","{","varPosition = modelViewMatrix * vec4(vertexPosition, 1.0);","gl_Position = projectionMatrix * varPosition;","varNormal = vec3(normalMatrix * vec4(vertexNormal, 0.0));","varVertexColor = vertexColor;","}"].join("\n");return e.getCachedShader(e.GL.VERTEX_SHADER,t,n)},e.utils.createPhongFragmentShader=function(t){"use strict";var n=["uniform mediump float opacity;","precision mediump float;","varying vec3 varNormal;","varying vec4 varPosition;","varying mediump vec3 varVertexColor;","const vec3 lightPos = vec3(0.0, 0.0,10000.0);","const vec3 ambientColor = vec3(0.01, 0.01, 0.01);","const vec3 specColor = vec3(0.0, 0.0, 0.0);","void main() {","vec3 normal = normalize(varNormal);","vec3 lightDir = normalize(lightPos);","vec3 reflectDir = -reflect(lightDir, normal);","vec3 viewDir = normalize(-varPosition.xyz);","float lambertian = max(dot(lightDir, normal), 0.0);","vec3 color = vec3(0.0);","if(lambertian > 0.0) {"," color = lambertian * varVertexColor;","}","gl_FragColor = vec4(color * opacity, 1.0 - opacity);","}"].join("\n");return e.getCachedShader(e.GL.FRAGMENT_SHADER,t,n)},e.utils.createFragmentShaderSolidColor=function(t,n){"use strict";var i=["uniform mediump float opacity;","void main(void) {","gl_FragColor = vec4("+n[0]+","+n[1]+","+n[2]+", opacity);","}"].join("\n");return e.getCachedShader(e.GL.FRAGMENT_SHADER,t,i)},e.utils.createFragmentShaderColorMap=function(t){"use strict";var n=["varying mediump float iVertexScalar;","uniform sampler2D sampler2d;","uniform mediump float opacity;","void main(void) {","gl_FragColor = vec4(texture2D(sampler2d, vec2(iVertexScalar, 0.0)).xyz, opacity);","}"].join("\n");return e.getCachedShader(e.GL.FRAGMENT_SHADER,t,n)},e.utils.createPointSpritesVertexShader=function(t){"use strict";var n=["attribute vec3 vertexPosition;","attribute vec3 vertexColor;","uniform mediump vec2 pointSize;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float height;","varying mediump vec3 iVertexColor;","varying highp float iVertexScalar;","void main(void)","{","mediump float realPointSize = pointSize.y;","if (pointSize.x > pointSize.y) {"," realPointSize = pointSize.x;}","gl_PointSize = realPointSize ;","iVertexScalar = vertexPosition.z;","gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition.xy, height, 1.0);"," iVertexColor = vertexColor;","}"].join("\n");return e.getCachedShader(e.GL.VERTEX_SHADER,t,n)},e.utils.createPointSpritesFragmentShader=function(t){"use strict";var n=["varying mediump vec3 iVertexColor;","varying highp float iVertexScalar;","uniform sampler2D opacityLookup;","uniform highp float lutMin;","uniform highp float lutMax;","uniform sampler2D scalarsToColors;","uniform int useScalarsToColors;","uniform int useVertexColors;","uniform mediump vec2 pointSize;","uniform mediump float vertexColorWeight;","void main(void) {","mediump vec2 realTexCoord;","if (pointSize.x > pointSize.y) {"," realTexCoord = vec2(1.0, pointSize.y/pointSize.x) * gl_PointCoord;","} else {"," realTexCoord = vec2(pointSize.x/pointSize.y, 1.0) * gl_PointCoord;","}","highp float texOpacity = texture2D(opacityLookup, realTexCoord).w;","if (useScalarsToColors == 1) {"," gl_FragColor = vec4(texture2D(scalarsToColors, vec2((iVertexScalar - lutMin)/(lutMax - lutMin), 0.0)).xyz, texOpacity);","} else if (useVertexColors == 1) {"," gl_FragColor = vec4(iVertexColor, texOpacity);","} else {"," gl_FragColor = vec4(texture2D(opacityLookup, realTexCoord).xyz, texOpacity);","}}"].join("\n");return e.getCachedShader(e.GL.FRAGMENT_SHADER,t,n)},e.utils.createTextureMaterial=function(t,n){"use strict";var i,r=new e.material,o=new e.blend,a=new e.shaderProgram,s=e.utils.createTextureVertexShader(e.GL),l=null,u=new e.vertexAttribute("vertexPosition"),c=new e.vertexAttribute("textureCoord"),d=new e.floatUniform("pointSize",5),h=new e.projectionUniform("projectionMatrix"),f=new e.uniform(e.GL.INT,"sampler2d"),p=null;return i=void 0!==n?new e.modelViewOriginUniform("modelViewMatrix",n):new e.modelViewUniform("modelViewMatrix"),f.set(0),a.addVertexAttribute(u,e.vertexAttributeKeys.Position),a.addVertexAttribute(c,e.vertexAttributeKeys.TextureCoordinate),a.addUniform(d),a.addUniform(i),a.addUniform(h),l=t?e.utils.createRgbaTextureFragmentShader(e.GL):e.utils.createTextureFragmentShader(e.GL),p=new e.floatUniform("opacity",1),a.addUniform(p),a.addShader(l),a.addShader(s),r.addAttribute(a),r.addAttribute(o),r},e.utils.createGeometryMaterial=function(){"use strict";var t=new e.material,n=new e.shaderProgram,i=5,r=1,o=e.utils.createVertexShader(e.GL),a=e.utils.createFragmentShader(e.GL),s=new e.vertexAttribute("vertexPosition"),l=new e.vertexAttribute("vertexColor"),u=new e.floatUniform("pointSize",i),c=new e.floatUniform("opacity",r),d=new e.modelViewUniform("modelViewMatrix"),h=new e.projectionUniform("projectionMatrix");return n.addVertexAttribute(s,e.vertexAttributeKeys.Position),n.addVertexAttribute(l,e.vertexAttributeKeys.Color),n.addUniform(u),n.addUniform(c),n.addUniform(d),n.addUniform(h),n.addShader(a),n.addShader(o),t.addAttribute(n),t},e.utils.createPointGeometryMaterial=function(t){"use strict";t=void 0===t?1:t;var n=new e.material,i=new e.blend,r=new e.shaderProgram,o=e.utils.createPointVertexShader(e.GL),a=e.utils.createFragmentShader(e.GL),s=new e.vertexAttribute("vertexPosition"),l=new e.vertexAttribute("vertexColor"),u=new e.vertexAttribute("vertexSize"),c=new e.floatUniform("opacity",t),d=new e.modelViewUniform("modelViewMatrix"),h=new e.projectionUniform("projectionMatrix");return r.addVertexAttribute(s,e.vertexAttributeKeys.Position),r.addVertexAttribute(l,e.vertexAttributeKeys.Color),r.addVertexAttribute(u,e.vertexAttributeKeys.Scalar),r.addUniform(c),r.addUniform(d),r.addUniform(h),r.addShader(a),r.addShader(o),n.addAttribute(r),n.addAttribute(i),n},e.utils.createPhongMaterial=function(){"use strict";var t=new e.material,n=new e.shaderProgram,i=e.utils.createPhongVertexShader(e.GL),r=e.utils.createPhongFragmentShader(e.GL),o=new e.vertexAttribute("vertexPosition"),a=new e.vertexAttribute("vertexNormal"),s=new e.vertexAttribute("vertexColor"),l=new e.floatUniform("opacity",1),u=new e.modelViewUniform("modelViewMatrix"),c=new e.normalMatrixUniform("normalMatrix"),d=new e.projectionUniform("projectionMatrix");return n.addVertexAttribute(o,e.vertexAttributeKeys.Position),n.addVertexAttribute(a,e.vertexAttributeKeys.Normal),n.addVertexAttribute(s,e.vertexAttributeKeys.Color),n.addUniform(l),n.addUniform(u),n.addUniform(d),n.addUniform(c),n.addShader(r),n.addShader(i),t.addAttribute(n),t},e.utils.createColorMaterial=function(){"use strict";var t=new e.material,n=new e.blend,i=new e.shaderProgram,r=e.utils.createVertexShader(e.GL),o=e.utils.createFragmentShader(e.GL),a=new e.vertexAttribute("vertexPosition"),s=new e.vertexAttribute("textureCoord"),l=new e.vertexAttribute("vertexColor"),u=new e.floatUniform("pointSize",5),c=new e.floatUniform("opacity",1),d=new e.modelViewUniform("modelViewMatrix"),h=new e.projectionUniform("projectionMatrix");return i.addVertexAttribute(a,e.vertexAttributeKeys.Position),i.addVertexAttribute(l,e.vertexAttributeKeys.Color),i.addVertexAttribute(s,e.vertexAttributeKeys.TextureCoordinate),i.addUniform(u),i.addUniform(c),i.addUniform(d),i.addUniform(h),i.addShader(o),i.addShader(r),t.addAttribute(i),t.addAttribute(n),t},e.utils.createColorMappedMaterial=function(t){"use strict";t||(t=new e.lookupTable);var n=t.range(),i=new e.material,r=new e.blend,o=new e.shaderProgram,a=e.utils.createVertexShaderColorMap(e.GL,n[0],n[1]),s=e.utils.createFragmentShaderColorMap(e.GL),l=new e.vertexAttribute("vertexPosition"),u=new e.vertexAttribute("vertexScalar"),c=new e.floatUniform("pointSize",5),d=new e.floatUniform("opacity",1),h=new e.floatUniform("lutMin",n[0]),f=new e.floatUniform("lutMax",n[1]),p=new e.modelViewUniform("modelViewMatrix"),m=new e.projectionUniform("projectionMatrix"),g=t;return new e.uniform(e.GL.FLOAT,"sampler2d").set(0),o.addVertexAttribute(l,e.vertexAttributeKeys.Position),o.addVertexAttribute(u,e.vertexAttributeKeys.Scalar),o.addUniform(c),o.addUniform(d),o.addUniform(h),o.addUniform(f),o.addUniform(p),o.addUniform(m),o.addShader(s),o.addShader(a),i.addAttribute(o),i.addAttribute(r),i.addAttribute(g),i},e.utils.updateColorMappedMaterial=function(t,e){"use strict";if(t)if(e){var n=t.shaderProgram().uniform("lutMin"),i=t.shaderProgram().uniform("lutMax");n.set(e.range()[0]),i.set(e.range()[1]),t.setAttribute(e)}else console.log("[warning] Invalid lookup table. Nothing to update.");else console.log("[warning] Invalid material. Nothing to update.")},e.utils.createSolidColorMaterial=function(t){"use strict";t||(t=[1,1,1]);var n=new e.material,i=new e.blend,r=new e.shaderProgram,o=e.utils.createVertexShaderSolidColor(e.GL),a=e.utils.createFragmentShaderSolidColor(e.GL,t),s=new e.vertexAttribute("vertexPosition"),l=new e.floatUniform("pointSize",5),u=new e.floatUniform("opacity",1),c=new e.modelViewUniform("modelViewMatrix"),d=new e.projectionUniform("projectionMatrix");return r.addVertexAttribute(s,e.vertexAttributeKeys.Position),r.addUniform(l),r.addUniform(u),r.addUniform(c),r.addUniform(d),r.addShader(a),r.addShader(o),n.addAttribute(r),n.addAttribute(i),n},e.utils.createPointSpritesMaterial=function(t,n){"use strict";var i=void 0===n?[0,1]:n.range(),r=new e.material,o=new e.blend,a=new e.shaderProgram,s=e.utils.createPointSpritesVertexShader(e.GL),l=e.utils.createPointSpritesFragmentShader(e.GL),u=new e.vertexAttribute("vertexPosition"),c=new e.vertexAttribute("vertexColor"),d=new e.floatUniform("height",0),h=new e.floatUniform("vertexColorWeight",0),f=new e.floatUniform("lutMin",i[0]),p=new e.floatUniform("lutMax",i[1]),m=new e.modelViewUniform("modelViewMatrix"),g=new e.projectionUniform("projectionMatrix"),v=new e.uniform(e.GL.INT,"opacityLookup"),y=new e.uniform(e.GL.INT,"scalarsToColors"),x=new e.uniform(e.GL.INT,"useScalarsToColors"),b=new e.uniform(e.GL.INT,"useVertexColors"),_=new e.uniform(e.GL.FLOAT_VEC2,"pointSize"),w=new e.texture;return v.set(0),y.set(1),x.set(0),b.set(0),_.set([1,1]),a.addVertexAttribute(u,e.vertexAttributeKeys.Position),a.addVertexAttribute(c,e.vertexAttributeKeys.Color),a.addUniform(d),a.addUniform(h),a.addUniform(m),a.addUniform(g),a.addUniform(v),a.addUniform(b),a.addUniform(x),a.addUniform(_),a.addShader(l),a.addShader(s),r.addAttribute(a),r.addAttribute(o),n&&(a.addUniform(y),x.set(1),a.addUniform(f),a.addUniform(p),n.setTextureUnit(1),r.addAttribute(n)),w.setImage(t),w.setTextureUnit(0),r.addAttribute(w),r},e.utils.createPlane=function(t,n,i,r,o,a,s,l,u){"use strict";var c=new e.mapper,d=new e.planeSource,h=e.utils.createGeometryMaterial(),f=new e.actor;return d.setOrigin(t,n,i),d.setPoint1(r,o,a),d.setPoint2(s,l,u),c.setGeometryData(d.create()),f.setMapper(c),f.setMaterial(h),f},e.utils.createTexturePlane=function(t,n,i,r,o,a,s,l,u,c){"use strict";var d=new e.mapper,h=new e.planeSource,f=e.utils.createTextureMaterial(c,[t,n,i]),p=new e.actor;return h.setPoint1(r-t,o-n,a-i),h.setPoint2(s-t,l-n,u-i),d.setGeometryData(h.create()),p.setMapper(d),p.setMaterial(f),p},e.utils.createPoints=function(t,n,i,r,o){"use strict";if(!t)return console.log("[ERROR] Cannot create points without positions"),null;o=void 0===o?1:o;var a=new e.mapper,s=new e.pointSource,l=e.utils.createPointGeometryMaterial(o),u=new e.actor;return s.setPositions(t),i&&s.setColors(i),r&&s.setTextureCoordinates(r),n?s.setSize(n):s.setSize(1),a.setGeometryData(s.create()),u.setMapper(a),u.setMaterial(l),u},e.utils.createPointSprites=function(t,n,i,r){"use strict";if(!t)return console.log("[ERROR] Point sprites requires an image"),null;if(!n)return console.log("[ERROR] Cannot create points without positions"),null;var o=new e.mapper,a=new e.pointSource,s=e.utils.createPointSpritesMaterial(t),l=new e.actor;return a.setPositions(n),i&&a.setColors(i),r&&a.setTextureCoordinates(r),o.setGeometryData(a.create()),l.setMapper(o),l.setMaterial(s),l},e.utils.createLines=function(t,n){"use strict";if(!t)return console.log("[ERROR] Cannot create points without positions"),null;var i=new e.mapper,r=new e.lineSource,o=e.utils.createGeometryMaterial(),a=new e.actor;return r.setPositions(t),n&&r.setColors(n),i.setGeometryData(r.create()),a.setMapper(i),a.setMaterial(o),a},e.utils.createColorLegend=function(t,n,i,r,o,a,s){"use strict";if(!n)return console.log("[error] Invalid lookup table"),[];function l(t,n,i){if(n)if(n.length%3==0){if(i){var r,o=null,a=e.utils.computePowerOfTwo(48),s=0,l=[],u=[],c=[],d=[],h=n[6]-n[0],f=4;for(u.length=3,c.length=3,d.length=3,r=0;r<2;r+=1)s=r*(n.length-3),u[0]=n[s]-h,u[1]=n[s+1]-2*h,u[2]=n[s+2],c[0]=n[s]+h,c[1]=u[1],c[2]=u[2],d[0]=u[0],d[1]=n[1],d[2]=u[2],(o=e.utils.createTexturePlane(u[0],u[1],u[2],c[0],c[1],c[2],d[0],d[1],d[2],!0)).setReferenceFrame(e.boundingObject.ReferenceFrame.Absolute),o.material().setBinNumber(e.material.RenderBin.Overlay),o.material().addAttribute(e.utils.create2DTexture(i[r].toFixed(2).toString(),12,null)),l.push(o);return u[0]=.5*(n[0]+n[n.length-3]-a),u[1]=n[1]+f,u[2]=n[2],c[0]=u[0]+a,c[1]=u[1],c[2]=u[2],d[0]=u[0],d[1]=u[1]+a,d[2]=u[2],(o=e.utils.createTexturePlane(u[0],u[1],u[2],c[0],c[1],c[2],d[0],d[1],d[2],!0)).setReferenceFrame(e.boundingObject.ReferenceFrame.Absolute),o.material().setBinNumber(e.material.RenderBin.Overlay),o.material().addAttribute(e.utils.create2DTexture(t,24,null)),l.push(o),l}console.log("[error] Create labels requires Valid range")}else console.log("[error] Create labels require positions array contain 3d points");else console.log("[error] Create labels requires positions (x,y,z) array")}function u(t,e,n,i,r,o,a,s,u,c,d,h,f,p,m){m=m;var g=null,v=(u-o)/h,y=[],x=[];for(g=0;g<=h;g+=1)y.push(o+v*g),y.push(a),y.push(s),y.push(o+v*g),y.push(a+p),y.push(s);return x=x.concat(l(t,y,e.range()))}var c=i[0]+r,d=i[1],h=0,f=i[0],p=i[1]+o,m=0,g=[],v=null,y=null,x=e.groupNode();return(y=(v=e.utils.createTexturePlane(i[0],i[1],i[2],c,d,h,f,p,m,!0)).material()).addAttribute(n),v.setMaterial(y),x.addChild(v),v.material().setBinNumber(e.material.RenderBin.Overlay),v.setReferenceFrame(e.boundingObject.ReferenceFrame.Absolute),g.push(v),g=g.concat(u(t,n,i[0],i[1],i[1],f,d,h,c,d,h,a,s,5,3))},e.utils.create2DTexture=function(t,n,i,r,o,a,s){"use strict";var l=document.getElementById("textRendering"),u=null,c=e.texture();return r=r||"sans-serif",o=o||"center",a=a||"bottom",void 0===s&&(s=!0),l||(l=document.createElement("canvas")),u=l.getContext("2d"),l.setAttribute("id","textRendering"),l.style.display="none",l.height=e.utils.computePowerOfTwo(8*n),l.width=l.height,u.fillStyle="rgba(0, 0, 0, 0)",u.fillRect(0,0,u.canvas.width,u.canvas.height),u.fillStyle="rgba(200, 85, 10, 1.0)",u.textAlign=o,u.textBaseline=a,u.font=4*n+"px "+r,s&&(u.font="bold "+u.font),u.fillText(t,l.width/2,l.height/2,l.width),c.setImage(l),c.updateDimensions(),c},e.picker=function(){"use strict";if(!(this instanceof e.picker))return new e.picker;e.object.call(this);var t=[];return this.getActors=function(){return t},this.pick=function(e,n,i){if(void 0===e)return 0;if(void 0===n)return 0;if(void 0===i)return 0;t=[];var r,o,s,l,u,c,d,h,f,p,m,g=i.camera(),v=i.width(),y=i.height(),x=g.focalPoint(),b=a.fromValues(x[0],x[1],x[2],1),_=i.worldToDisplay(b,g.viewMatrix(),g.projectionMatrix(),v,y),w=a.fromValues(e,n,_[2],1),M=i.displayToWorld(w,g.viewMatrix(),g.projectionMatrix(),v,y),A=g.position(),T=[];for(s=0;s<3;s+=1)T[s]=M[s]-A[s];for(r=i.sceneRoot().children(),o=0,s=0;s<r.length;s+=1)if(!0===(m=r[s]).visible()){if(l=m.bounds(),T[0]>=0?(u=(l[0]-A[0])/T[0],c=(l[1]-A[0])/T[0]):(u=(l[1]-A[0])/T[0],c=(l[0]-A[0])/T[0]),T[1]>=0?(d=(l[2]-A[1])/T[1],h=(l[3]-A[1])/T[1]):(d=(l[3]-A[1])/T[1],h=(l[2]-A[1])/T[1]),u>h||d>c)continue;if(d>u&&(u=d),h<c&&(c=h),T[2]>=0?(f=(l[4]-A[2])/T[2],p=(l[5]-A[2])/T[2]):(f=(l[5]-A[2])/T[2],p=(l[4]-A[2])/T[2]),u>p||f>c)continue;f>u&&(u=f),p<c&&(c=p),t[o]=m,o+=1}return o},this},inherit(e.picker,e.object),e.shapefileReader=function(){"use strict";if(!(this instanceof e.shapefileReader))return new e.shapefileReader;var t=this,n=0,i=1,r=5,o=3;return this.int8=function(t,e){return t.charCodeAt(e)},this.bint32=function(t,e){return((255&t.charCodeAt(e))<<24)+((255&t.charCodeAt(e+1))<<16)+((255&t.charCodeAt(e+2))<<8)+(255&t.charCodeAt(e+3))},this.lint32=function(t,e){return((255&t.charCodeAt(e+3))<<24)+((255&t.charCodeAt(e+2))<<16)+((255&t.charCodeAt(e+1))<<8)+(255&t.charCodeAt(e))},this.bint16=function(t,e){return((255&t.charCodeAt(e))<<8)+(255&t.charCodeAt(e+1))},this.lint16=function(t,e){return((255&t.charCodeAt(e+1))<<8)+(255&t.charCodeAt(e))},this.ldbl64=function(t,e){var n=255&t.charCodeAt(e),i=255&t.charCodeAt(e+1),r=255&t.charCodeAt(e+2),o=255&t.charCodeAt(e+3),a=255&t.charCodeAt(e+4),s=255&t.charCodeAt(e+5),l=255&t.charCodeAt(e+6),u=255&t.charCodeAt(e+7),c=((127&u)<<4)+((240&l)>>4)-1023;return(1-2*(u>>7))*(1+((15&l)*Math.pow(2,48)+s*Math.pow(2,40)+a*Math.pow(2,32)+o*Math.pow(2,24)+r*Math.pow(2,16)+i*Math.pow(2,8)+n)*Math.pow(2,-52))*Math.pow(2,c)},this.lfloat32=function(t,e){var n=255&t.charCodeAt(e),i=255&t.charCodeAt(e+1),r=255&t.charCodeAt(e+2),o=255&t.charCodeAt(e+3),a=((127&o)<<1)+((254&r)>>7)-127;return(1-2*(o>>7))*(1+((127&r)*Math.pow(2,16)+i*Math.pow(2,8)+n)*Math.pow(2,-23))*Math.pow(2,a)},this.str=function(t,e,n){for(var i=[],r=e;r<e+n;){var o=t[r];if(0===o.charCodeAt(0))break;i.push(o),r+=1}return i.join("")},this.readHeader=function(t){return{code:this.bint32(t,0),length:this.bint32(t,24),version:this.lint32(t,28),shapetype:this.lint32(t,32)}},this.loadShx=function(e){for(var n=[],i=function(i){return n.push(2*t.bint32(e,i)),i+8},r=100;r<e.length;)r=i(r);return n},this.Shapefile=function(t){var e=t.path;l.ajax({url:e+".shx",mimeType:"text/plain; charset=x-user-defined",success:function(n){var i=this.loadShx(n);l.ajax({url:e+".shp",mimeType:"text/plain; charset=x-user-defined",success:function(n){l.ajax({url:e+".dbf",mimeType:"text/plain; charset=x-user-defined",success:function(e){var r=this.loadShp(n,e,i,t);t.success(r)}})}})}})},this.localShapefile=function(e){var n=e.shx,i=e.shp,r=e.dbf,o=new FileReader;o.onloadend=function(){var n=t.loadShx(o.result),a=new FileReader;a.onloadend=function(){var i=a.result,o=new FileReader;o.onloadend=function(){var r=o.result,a=t.loadShp(i,r,n,e);e.success(a)},o.readAsBinaryString(r)},a.readAsBinaryString(i)},o.readAsBinaryString(n)},this.loadDBF=function(e){var n=function(n){return{name:t.str(e,n,10),type:t.str(e,n+11,1),length:t.int8(e,n+16)}};if(4===t.int8(e,0))throw"Level 7 dBASE not supported";for(var i=t.lint32(e,4),r=t.lint16(e,8),o=t.lint16(e,10),a=32,s=32,l=[];s<r-1;)l.push(n(s)),s+=a;for(var u=[],c=r;c<r+i*o;)if("*"===t.str(e,c,1))c+=o;else{c+=1;for(var d={},h=0;h<l.length;h+=1){var f,p=l[h];"C"===p.type?f=t.str(e,c,p.length).trim():"N"===p.type&&(f=parseFloat(t.str(e,c,p.length))),c+=p.length,d[p.name]=f}u.push(d)}return u},this.loadShp=function(e,a,s,l){l=l;var u,c=[],d=function(n,i,r){for(var o=[],a=r-1;a>=i;a-=1){var s=t.ldbl64(e,n+16*a),l=t.ldbl64(e,n+16*a+8);o.push([s,l])}return o},h=function(a){var s,l,u,h,f,p,m,g,v,y=a+8,x=t.lint32(e,y);if(x===n)console.log("NULL Shape");else if(x===i){var b=t.ldbl64(e,y+4),_=t.ldbl64(e,y+12);c.push({type:"Point",attr:{},geom:[[b,_]]})}else if(x===r){for(s=t.lint32(e,y+36),l=t.lint32(e,y+40),u=a+52,h=a+52+4*s,v=[],f=0;f<s;f+=1)p=t.lint32(e,u+4*f),m=f+1<s?t.lint32(e,u+4*(f+1)):l,g=d(h,p,m),v.push(g);c.push({type:"Polygon",attr:{},geom:[v]})}else{if(x!==o)throw"Not Implemented: "+x;for(s=t.lint32(e,y+36),l=t.lint32(e,y+40),u=a+52,h=a+52+4*s,v=[],f=0;f<s;f+=1)p=t.lint32(e,u+4*f),m=f+1<s?t.lint32(e,u+4*(f+1)):l,g=d(h,p,m),v.push(g);c.push({type:"Polyline",attr:{},geom:[v]})}},f=this.loadDBF(a);for(u=0;u<s.length;u+=1)h(s[u]);var p=[];for(u=0;u<c.length;u+=1){var m=c[u];m.attr=f[u],p.push(m)}return p},this},e.vtkReader=function(){"use strict";if(!(this instanceof e.vtkReader))return new e.vtkReader;var t=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"],n=[],i={},r=0,a=null,s=null,l=-1,u="",c=0,d=0,h=null,f=0;if(0===n.length)for(f=0;f<t.length;f+=1)n[t[f]]=f;return this.ntos=function(t){var e;return 1===(e=t.toString(16)).length&&(e="0"+e),e="%"+e,unescape(e)},this.readReverseBase64=function(){var t;if(!u)return l;for(;;){if(c>=u.length)return l;if(t=u.charAt(c),c+=1,n[t])return n[t];if("A"===t)return 0}return l},this.decode64=function(t){var e="",n=new Array(4),i=!1;for(u=t,c=0;!i&&(n[0]=this.readReverseBase64())!==l&&(n[1]=this.readReverseBase64())!==l;)n[2]=this.readReverseBase64(),n[3]=this.readReverseBase64(),e+=this.ntos(n[0]<<2&255|n[1]>>4),n[2]!==l?(e+=this.ntos(n[1]<<4&255|n[2]>>2),n[3]!==l?e+=this.ntos(n[2]<<6&255|n[3]):i=!0):i=!0;return e},this.readNumber=function(t){return t[d++]+(t[d++]<<8)+(t[d++]<<16)+(t[d++]<<24)},this.readF3Array=function(t,e){var n,i=4*t*3,r=new Int8Array(i);for(n=0;n<i;n+=1)r[n]=e[d],d+=1;return new Float32Array(r.buffer)},this.readColorArray=function(t,e,n){var i,r=0,o=new Array(3*t);for(i=0;i<t;i+=1)o[r++]=e[d++]/255,o[r++]=e[d++]/255,o[r++]=e[d++]/255,d++;n.insert(o)},this.parseObject=function(t){var n,i,r,a,s,l,u,c,p,m,g=new e.geometryData,v=e.mapper(),y=[],x=null,b=null,_=null,w=null;for(b=atob(t.data),f=0;f<b.length;f+=1)y[f]=255&b.charCodeAt(f);if(d=0,n=this.readNumber(y),x=String.fromCharCode(y[d]),d+=1,g.setName(x),"L"===x)_=this.parseLineData(g,y),w=e.utils.createGeometryMaterial();else if("M"===x)_=this.parseMeshData(g,y),w=e.utils.createPhongMaterial();else if("P"===x)_=this.parsePointData(g,y),w=e.utils.createGeometryMaterial();else{if("C"===x){for(r=this.parseColorMapData(g,y,n),l=[],f=0;f<r.colors.length;f+=1)l.push(r.colors[f][1]),l.push(r.colors[f][2]),l.push(r.colors[f][3]),l.push(255*r.colors[f][0]);return(s=new e.lookupTable).setColorTable(l),u=h.renderWindow().windowSize(),c=r.size[0]*u[0],p=r.size[1]*u[1],(m=[r.position[0]*u[0],(1-r.position[1])*u[1],0])[1]=m[1]-p,p=30,e.utils.createColorLegend(r.title,s,m,c,p,3,0)}console.log("Ignoring unrecognized encoded data type "+x)}return v.setGeometryData(g),t.hasTransparency&&(a=w.shaderProgram().uniform("opacity"),console.log("opacity ",t.opacity),a.set(t.opacity),w.setBinNumber(1e3)),(i=e.actor()).setMapper(v),i.setMaterial(w),i.setMatrix(o.transpose(o.create(),_)),[i]},this.parseLineData=function(t,n){var i,r,a,s,l,u,c,h,f=null,p=null,m=null,g=o.create(),v=null,y=0;for(r=this.readNumber(n),v=new Array(3*r),f=new e.sourceDataP3fv,a=this.readF3Array(r,n),h=0;h<r;h+=1)v[y++]=a[3*h],v[y++]=a[3*h+1],v[y++]=a[3*h+2];for(f.insert(v),t.addSource(f),p=new e.sourceDataC3fv,this.readColorArray(r,n,p),t.addSource(p),m=new e.lines,t.addPrimitive(m),i=this.readNumber(n),s=new Int8Array(2*i),h=0;h<2*i;h+=1)s[h]=n[d],d+=1;for(l=new Uint16Array(s.buffer),m.setIndices(l),m.setPrimitiveType(e.GL.LINES),u=64,s=new Int8Array(u),h=0;h<u;h+=1)s[h]=n[d],d+=1;return c=new Float32Array(s.buffer),o.copy(g,c),g},this.parseMeshData=function(t,n){var i,r,a,s,l,u,c,h,f=null,p=null,m=null,g=o.create(),v=null,y=null,x=0;for(r=this.readNumber(n),y=new Array(6*r),f=new e.sourceDataP3N3f,a=this.readF3Array(r,n),m=this.readF3Array(r,n),h=0;h<r;h+=1)y[x++]=a[3*h],y[x++]=a[3*h+1],y[x++]=a[3*h+2],y[x++]=m[3*h],y[x++]=m[3*h+1],y[x++]=m[3*h+2];for(f.insert(y),t.addSource(f),p=new e.sourceDataC3fv,this.readColorArray(r,n,p),t.addSource(p),s=[],v=new e.triangles,i=this.readNumber(n),s=new Int8Array(2*i),h=0;h<2*i;h+=1)s[h]=n[d],d+=1;for(l=new Uint16Array(s.buffer),v.setIndices(l),t.addPrimitive(v),u=64,s=new Int8Array(u),h=0;h<u;h+=1)s[h]=n[d],d+=1;return c=new Float32Array(s.buffer),o.copy(g,c),g},this.parsePointData=function(t,n){var i,r,a,s,l,u,c=o.create(),h=null,p=null,m=null,g=null,v=0;for(i=this.readNumber(n),g=new Array(3*i),h=new e.sourceDataP3fv,r=this.readF3Array(i,n),a=new Uint16Array(i),f=0;f<i;f+=1)a[f]=f,g[v++]=r[3*f],g[v++]=r[3*f+1],g[v++]=r[3*f+2];for(h.insert(g),t.addSource(h),p=new e.sourceDataC3fv,this.readColorArray(i,n,p),t.addSource(p),(m=new e.points).setIndices(a),t.addPrimitive(m),l=64,s=new Int8Array(l),f=0;f<l;f+=1)s[f]=n[d],d+=1;return u=new Float32Array(s.buffer),o.copy(c,u),c},this.parseColorMapData=function(t,e,n){var i,r,o,a,s,l={};for(l.numOfColors=n,r=8,i=new Int8Array(r),a=0;a<r;a+=1)i[a]=e[d],d+=1;for(l.position=new Float32Array(i.buffer),r=8,i=new Int8Array(r),a=0;a<r;a+=1)i[a]=e[d],d+=1;for(l.size=new Float32Array(i.buffer),l.colors=[],s=0;s<l.numOfColors;s+=1){for(i=new Int8Array(4),a=0;a<4;a+=1)i[a]=e[d],d+=1;o=[new Float32Array(i.buffer)[0],e[d++],e[d++],e[d++]],l.colors[s]=o}for(l.orientation=e[d++],l.numOfLabels=e[d++],l.title="";d<e.length;)l.title+=String.fromCharCode(e[d++]);return l},this.parseSceneMetadata=function(t,e){var n,i,r,o=a.Renderers[e],l=t.camera();i=(o.size[0]-o.origin[0])*s.width,r=(o.size[1]-o.origin[1])*s.height,t.resize(i,r),l.setCenterOfRotation([o.LookAt[1],o.LookAt[2],o.LookAt[3]]),l.setViewAngleDegrees(o.LookAt[0]),l.setPosition(o.LookAt[7],o.LookAt[8],o.LookAt[9]),l.setFocalPoint(o.LookAt[1],o.LookAt[2],o.LookAt[3]),l.setViewUpDirection(o.LookAt[4],o.LookAt[5],o.LookAt[6]),0===e?(n=o.Background1,t.setBackgroundColor(n[0],n[1],n[2],1)):t.setResizable(!1),t.setLayer(e)},this.initScene=function(){var t,e;if(null===a)return h;for(e=a.Renderers.length-1;e>=0;e-=1)t=this.getRenderer(e),this.parseSceneMetadata(t,e);return h},this.createViewer=function(t){var n;return null===h&&(s=t,(h=e.viewer(t)).init(),h.renderWindow().removeRenderer(h.renderWindow().activeRenderer()),h.renderWindow().addRenderer(new e.depthPeelRenderer),i[0]=h.renderWindow().activeRenderer(),h.renderWindow().resize(t.width,t.height),n=e.pvwInteractorStyle(),h.setInteractorStyle(n)),h},this.deleteViewer=function(){i={},h=null},this.updateCanvas=function(t){return s=t,h.renderWindow().resize(t.width,t.height),h},this.numObjects=function(){return r},this.getRenderer=function(t){var n;return null==(n=i[t])&&((n=new e.renderer).setResetScene(!1),n.setResetClippingRange(!1),h.renderWindow().addRenderer(n),0!==t&&n.camera().setClearMask(e.GL.DepthBufferBit),i[t]=n),n},this.setVtkScene=function(t){a=t},this},e.DataBuffers=function(t){"use strict";if(!(this instanceof e.DataBuffers))return new e.DataBuffers(t);var n,i={};n=t||0===t?t:256;var r=0,o=function(t,e,n,i){if(!t)throw"No destination";n||(n=0),i||(i=e.length);for(var r=0;r<i;r+=1)t[n+r]=e[r]},a=function(t){var e=n;for(2*e<t&&(e=t);e<t;)e*=2;for(var r in n=e,i)if(i.hasOwnProperty(r)){var a=new Float32Array(e*i[r].len),s=i[r].array;o(a,s),i[r].array=a,i[r].dirty=!0}};this.create=function(t,e){if(!e||e<0)throw"Length of buffer must be a positive integer";var r=new Float32Array(n*e);return i[t]={array:r,len:e,dirty:!1},i[t].array},this.alloc=function(t){r+t>=n&&a(r+t);var e=r;return r+=t,e},this.get=function(t){return i[t].array},this.write=function(t,e,r,a){if(r+a>n)throw"Write would exceed buffer size";o(i[t].array,e,r*i[t].len,a*i[t].len),i[t].dirty=!0},this.repeat=function(t,e,r,a){if(r+a>n)throw"Repeat would exceed buffer size";for(var s=0;s<a;s+=1)o(i[t].array,e,(r+s)*i[t].len,i[t].len);i[t].dirty=!0},this.count=function(){return r},this.data=function(t){return i[t].array}},e}()}.apply(e,[]))||(t.exports=i)},5638:function(t,e){var n;
36
36
  /*!
37
37
  * jQuery JavaScript Library v3.6.0
38
38
  * https://jquery.com/
@@ -56,5 +56,5 @@ var i=n(5638),r=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^/\0
56
56
  *
57
57
  * Date: 2021-02-16
58
58
  */
59
- function(t){var e,n,i,r,o,a,s,l,u,c,d,h,f,p,m,g,v,y,x,b="sizzle"+1*new Date,_=t.document,w=0,M=0,A=lt(),T=lt(),C=lt(),E=lt(),S=function(t,e){return t===e&&(d=!0),0},k={}.hasOwnProperty,P=[],O=P.pop,R=P.push,L=P.push,D=P.slice,I=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},F="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",j="[\\x20\\t\\r\\n\\f]",z="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",N="\\[[\\x20\\t\\r\\n\\f]*("+z+")(?:"+j+"*([*^$|!~]?=)"+j+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+z+"))|)"+j+"*\\]",B=":("+z+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",V=new RegExp(j+"+","g"),G=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),U=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),q=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),W=new RegExp(j+"|>"),H=new RegExp(B),Z=new RegExp("^"+z+"$"),X={ID:new RegExp("^#("+z+")"),CLASS:new RegExp("^\\.("+z+")"),TAG:new RegExp("^("+z+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+F+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},Q=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),nt=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},it=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,rt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){h()},at=bt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{L.apply(P=D.call(_.childNodes),_.childNodes),P[_.childNodes.length].nodeType}catch(t){L={apply:P.length?function(t,e){R.apply(t,D.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}function st(t,e,i,r){var o,s,u,c,d,p,v,y=e&&e.ownerDocument,_=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==_&&9!==_&&11!==_)return i;if(!r&&(h(e),e=e||f,m)){if(11!==_&&(d=$.exec(t)))if(o=d[1]){if(9===_){if(!(u=e.getElementById(o)))return i;if(u.id===o)return i.push(u),i}else if(y&&(u=y.getElementById(o))&&x(e,u)&&u.id===o)return i.push(u),i}else{if(d[2])return L.apply(i,e.getElementsByTagName(t)),i;if((o=d[3])&&n.getElementsByClassName&&e.getElementsByClassName)return L.apply(i,e.getElementsByClassName(o)),i}if(n.qsa&&!E[t+" "]&&(!g||!g.test(t))&&(1!==_||"object"!==e.nodeName.toLowerCase())){if(v=t,y=e,1===_&&(W.test(t)||q.test(t))){for((y=tt.test(t)&&vt(e.parentNode)||e)===e&&n.scope||((c=e.getAttribute("id"))?c=c.replace(it,rt):e.setAttribute("id",c=b)),s=(p=a(t)).length;s--;)p[s]=(c?"#"+c:":scope")+" "+xt(p[s]);v=p.join(",")}try{return L.apply(i,y.querySelectorAll(v)),i}catch(e){E(t,!0)}finally{c===b&&e.removeAttribute("id")}}}return l(t.replace(G,"$1"),e,i,r)}function lt(){var t=[];return function e(n,r){return t.push(n+" ")>i.cacheLength&&delete e[t.shift()],e[n+" "]=r}}function ut(t){return t[b]=!0,t}function ct(t){var e=f.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function dt(t,e){for(var n=t.split("|"),r=n.length;r--;)i.attrHandle[n[r]]=e}function ht(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ft(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function pt(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function mt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&at(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function gt(t){return ut((function(e){return e=+e,ut((function(n,i){for(var r,o=t([],n.length,e),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))}))}))}function vt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=st.support={},o=st.isXML=function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!Q.test(e||n&&n.nodeName||"HTML")},h=st.setDocument=function(t){var e,r,a=t?t.ownerDocument||t:_;return a!=f&&9===a.nodeType&&a.documentElement?(p=(f=a).documentElement,m=!o(f),_!=f&&(r=f.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",ot,!1):r.attachEvent&&r.attachEvent("onunload",ot)),n.scope=ct((function(t){return p.appendChild(t).appendChild(f.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),n.attributes=ct((function(t){return t.className="i",!t.getAttribute("className")})),n.getElementsByTagName=ct((function(t){return t.appendChild(f.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=J.test(f.getElementsByClassName),n.getById=ct((function(t){return p.appendChild(t).id=b,!f.getElementsByName||!f.getElementsByName(b).length})),n.getById?(i.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n=e.getElementById(t);return n?[n]:[]}}):(i.filter.ID=function(t){var e=t.replace(et,nt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n,i,r,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(r=e.getElementsByName(t),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),i.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},i.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&m)return e.getElementsByClassName(t)},v=[],g=[],(n.qsa=J.test(f.querySelectorAll))&&(ct((function(t){var e;p.appendChild(t).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll("[selected]").length||g.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+F+")"),t.querySelectorAll("[id~="+b+"-]").length||g.push("~="),(e=f.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||g.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll(":checked").length||g.push(":checked"),t.querySelectorAll("a#"+b+"+*").length||g.push(".#.+[+~]"),t.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ct((function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=f.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&g.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),p.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=J.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ct((function(t){n.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),v.push("!=",B)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),e=J.test(p.compareDocumentPosition),x=e||J.test(p.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},S=e?function(t,e){if(t===e)return d=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===i?t==f||t.ownerDocument==_&&x(_,t)?-1:e==f||e.ownerDocument==_&&x(_,e)?1:c?I(c,t)-I(c,e):0:4&i?-1:1)}:function(t,e){if(t===e)return d=!0,0;var n,i=0,r=t.parentNode,o=e.parentNode,a=[t],s=[e];if(!r||!o)return t==f?-1:e==f?1:r?-1:o?1:c?I(c,t)-I(c,e):0;if(r===o)return ht(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)s.unshift(n);for(;a[i]===s[i];)i++;return i?ht(a[i],s[i]):a[i]==_?-1:s[i]==_?1:0},f):f},st.matches=function(t,e){return st(t,null,null,e)},st.matchesSelector=function(t,e){if(h(t),n.matchesSelector&&m&&!E[e+" "]&&(!v||!v.test(e))&&(!g||!g.test(e)))try{var i=y.call(t,e);if(i||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){E(e,!0)}return st(e,f,null,[t]).length>0},st.contains=function(t,e){return(t.ownerDocument||t)!=f&&h(t),x(t,e)},st.attr=function(t,e){(t.ownerDocument||t)!=f&&h(t);var r=i.attrHandle[e.toLowerCase()],o=r&&k.call(i.attrHandle,e.toLowerCase())?r(t,e,!m):void 0;return void 0!==o?o:n.attributes||!m?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},st.escape=function(t){return(t+"").replace(it,rt)},st.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},st.uniqueSort=function(t){var e,i=[],r=0,o=0;if(d=!n.detectDuplicates,c=!n.sortStable&&t.slice(0),t.sort(S),d){for(;e=t[o++];)e===t[o]&&(r=i.push(o));for(;r--;)t.splice(i[r],1)}return c=null,t},r=st.getText=function(t){var e,n="",i=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=r(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[i++];)n+=r(e);return n},i=st.selectors={cacheLength:50,createPseudo:ut,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||st.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&st.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return X.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&H.test(n)&&(e=a(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=A[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+j+"|$)"))&&A(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(i){var r=st.attr(i,t);return null==r?"!="===e:!e||(r+="","="===e?r===n:"!="===e?r!==n:"^="===e?n&&0===r.indexOf(n):"*="===e?n&&r.indexOf(n)>-1:"$="===e?n&&r.slice(-n.length)===n:"~="===e?(" "+r.replace(V," ")+" ").indexOf(n)>-1:"|="===e&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,i,r){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,l){var u,c,d,h,f,p,m=o!==a?"nextSibling":"previousSibling",g=e.parentNode,v=s&&e.nodeName.toLowerCase(),y=!l&&!s,x=!1;if(g){if(o){for(;m;){for(h=e;h=h[m];)if(s?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=m="only"===t&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&y){for(x=(f=(u=(c=(d=(h=g)[b]||(h[b]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===w&&u[1])&&u[2],h=f&&g.childNodes[f];h=++f&&h&&h[m]||(x=f=0)||p.pop();)if(1===h.nodeType&&++x&&h===e){c[t]=[w,f,x];break}}else if(y&&(x=f=(u=(c=(d=(h=e)[b]||(h[b]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===w&&u[1]),!1===x)for(;(h=++f&&h&&h[m]||(x=f=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++x||(y&&((c=(d=h[b]||(h[b]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]=[w,x]),h!==e)););return(x-=r)===i||x%i==0&&x/i>=0}}},PSEUDO:function(t,e){var n,r=i.pseudos[t]||i.setFilters[t.toLowerCase()]||st.error("unsupported pseudo: "+t);return r[b]?r(e):r.length>1?(n=[t,t,"",e],i.setFilters.hasOwnProperty(t.toLowerCase())?ut((function(t,n){for(var i,o=r(t,e),a=o.length;a--;)t[i=I(t,o[a])]=!(n[i]=o[a])})):function(t){return r(t,0,n)}):r}},pseudos:{not:ut((function(t){var e=[],n=[],i=s(t.replace(G,"$1"));return i[b]?ut((function(t,e,n,r){for(var o,a=i(t,null,r,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))})):function(t,r,o){return e[0]=t,i(e,null,o,n),e[0]=null,!n.pop()}})),has:ut((function(t){return function(e){return st(t,e).length>0}})),contains:ut((function(t){return t=t.replace(et,nt),function(e){return(e.textContent||r(e)).indexOf(t)>-1}})),lang:ut((function(t){return Z.test(t||"")||st.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=m?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===p},focus:function(t){return t===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:mt(!1),disabled:mt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!i.pseudos.empty(t)},header:function(t){return Y.test(t.nodeName)},input:function(t){return K.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:gt((function(){return[0]})),last:gt((function(t,e){return[e-1]})),eq:gt((function(t,e,n){return[n<0?n+e:n]})),even:gt((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:gt((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:gt((function(t,e,n){for(var i=n<0?n+e:n>e?e:n;--i>=0;)t.push(i);return t})),gt:gt((function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t}))}},i.pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[e]=ft(e);for(e in{submit:!0,reset:!0})i.pseudos[e]=pt(e);function yt(){}function xt(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function bt(t,e,n){var i=e.dir,r=e.next,o=r||i,a=n&&"parentNode"===o,s=M++;return e.first?function(e,n,r){for(;e=e[i];)if(1===e.nodeType||a)return t(e,n,r);return!1}:function(e,n,l){var u,c,d,h=[w,s];if(l){for(;e=e[i];)if((1===e.nodeType||a)&&t(e,n,l))return!0}else for(;e=e[i];)if(1===e.nodeType||a)if(c=(d=e[b]||(e[b]={}))[e.uniqueID]||(d[e.uniqueID]={}),r&&r===e.nodeName.toLowerCase())e=e[i]||e;else{if((u=c[o])&&u[0]===w&&u[1]===s)return h[2]=u[2];if(c[o]=h,h[2]=t(e,n,l))return!0}return!1}}function _t(t){return t.length>1?function(e,n,i){for(var r=t.length;r--;)if(!t[r](e,n,i))return!1;return!0}:t[0]}function wt(t,e,n,i,r){for(var o,a=[],s=0,l=t.length,u=null!=e;s<l;s++)(o=t[s])&&(n&&!n(o,i,r)||(a.push(o),u&&e.push(s)));return a}function Mt(t,e,n,i,r,o){return i&&!i[b]&&(i=Mt(i)),r&&!r[b]&&(r=Mt(r,o)),ut((function(o,a,s,l){var u,c,d,h=[],f=[],p=a.length,m=o||function(t,e,n){for(var i=0,r=e.length;i<r;i++)st(t,e[i],n);return n}(e||"*",s.nodeType?[s]:s,[]),g=!t||!o&&e?m:wt(m,h,t,s,l),v=n?r||(o?t:p||i)?[]:a:g;if(n&&n(g,v,s,l),i)for(u=wt(v,f),i(u,[],s,l),c=u.length;c--;)(d=u[c])&&(v[f[c]]=!(g[f[c]]=d));if(o){if(r||t){if(r){for(u=[],c=v.length;c--;)(d=v[c])&&u.push(g[c]=d);r(null,v=[],u,l)}for(c=v.length;c--;)(d=v[c])&&(u=r?I(o,d):h[c])>-1&&(o[u]=!(a[u]=d))}}else v=wt(v===a?v.splice(p,v.length):v),r?r(null,a,v,l):L.apply(a,v)}))}function At(t){for(var e,n,r,o=t.length,a=i.relative[t[0].type],s=a||i.relative[" "],l=a?1:0,c=bt((function(t){return t===e}),s,!0),d=bt((function(t){return I(e,t)>-1}),s,!0),h=[function(t,n,i){var r=!a&&(i||n!==u)||((e=n).nodeType?c(t,n,i):d(t,n,i));return e=null,r}];l<o;l++)if(n=i.relative[t[l].type])h=[bt(_t(h),n)];else{if((n=i.filter[t[l].type].apply(null,t[l].matches))[b]){for(r=++l;r<o&&!i.relative[t[r].type];r++);return Mt(l>1&&_t(h),l>1&&xt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(G,"$1"),n,l<r&&At(t.slice(l,r)),r<o&&At(t=t.slice(r)),r<o&&xt(t))}h.push(n)}return _t(h)}return yt.prototype=i.filters=i.pseudos,i.setFilters=new yt,a=st.tokenize=function(t,e){var n,r,o,a,s,l,u,c=T[t+" "];if(c)return e?0:c.slice(0);for(s=t,l=[],u=i.preFilter;s;){for(a in n&&!(r=U.exec(s))||(r&&(s=s.slice(r[0].length)||s),l.push(o=[])),n=!1,(r=q.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(G," ")}),s=s.slice(n.length)),i.filter)!(r=X[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return e?s.length:s?st.error(t):T(t,l).slice(0)},s=st.compile=function(t,e){var n,r=[],o=[],s=C[t+" "];if(!s){for(e||(e=a(t)),n=e.length;n--;)(s=At(e[n]))[b]?r.push(s):o.push(s);s=C(t,function(t,e){var n=e.length>0,r=t.length>0,o=function(o,a,s,l,c){var d,p,g,v=0,y="0",x=o&&[],b=[],_=u,M=o||r&&i.find.TAG("*",c),A=w+=null==_?1:Math.random()||.1,T=M.length;for(c&&(u=a==f||a||c);y!==T&&null!=(d=M[y]);y++){if(r&&d){for(p=0,a||d.ownerDocument==f||(h(d),s=!m);g=t[p++];)if(g(d,a||f,s)){l.push(d);break}c&&(w=A)}n&&((d=!g&&d)&&v--,o&&x.push(d))}if(v+=y,n&&y!==v){for(p=0;g=e[p++];)g(x,b,a,s);if(o){if(v>0)for(;y--;)x[y]||b[y]||(b[y]=O.call(l));b=wt(b)}L.apply(l,b),c&&!o&&b.length>0&&v+e.length>1&&st.uniqueSort(l)}return c&&(w=A,u=_),x};return n?ut(o):o}(o,r)),s.selector=t}return s},l=st.select=function(t,e,n,r){var o,l,u,c,d,h="function"==typeof t&&t,f=!r&&a(t=h.selector||t);if(n=n||[],1===f.length){if((l=f[0]=f[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&9===e.nodeType&&m&&i.relative[l[1].type]){if(!(e=(i.find.ID(u.matches[0].replace(et,nt),e)||[])[0]))return n;h&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(o=X.needsContext.test(t)?0:l.length;o--&&(u=l[o],!i.relative[c=u.type]);)if((d=i.find[c])&&(r=d(u.matches[0].replace(et,nt),tt.test(l[0].type)&&vt(e.parentNode)||e))){if(l.splice(o,1),!(t=r.length&&xt(l)))return L.apply(n,r),n;break}}return(h||s(t,f))(r,e,!m,n,!e||tt.test(t)&&vt(e.parentNode)||e),n},n.sortStable=b.split("").sort(S).join("")===b,n.detectDuplicates=!!d,h(),n.sortDetached=ct((function(t){return 1&t.compareDocumentPosition(f.createElement("fieldset"))})),ct((function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")}))||dt("type|href|height|width",(function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),n.attributes&&ct((function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||dt("value",(function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),ct((function(t){return null==t.getAttribute("disabled")}))||dt(F,(function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null})),st}(i);A.find=C,A.expr=C.selectors,A.expr[":"]=A.expr.pseudos,A.uniqueSort=A.unique=C.uniqueSort,A.text=C.getText,A.isXMLDoc=C.isXML,A.contains=C.contains,A.escapeSelector=C.escape;var E=function(t,e,n){for(var i=[],r=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&A(t).is(n))break;i.push(t)}return i},S=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},k=A.expr.match.needsContext;function P(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var O=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function R(t,e,n){return v(e)?A.grep(t,(function(t,i){return!!e.call(t,i,t)!==n})):e.nodeType?A.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?A.grep(t,(function(t){return c.call(e,t)>-1!==n})):A.filter(e,t,n)}A.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?A.find.matchesSelector(i,t)?[i]:[]:A.find.matches(t,A.grep(e,(function(t){return 1===t.nodeType})))},A.fn.extend({find:function(t){var e,n,i=this.length,r=this;if("string"!=typeof t)return this.pushStack(A(t).filter((function(){for(e=0;e<i;e++)if(A.contains(r[e],this))return!0})));for(n=this.pushStack([]),e=0;e<i;e++)A.find(t,r[e],n);return i>1?A.uniqueSort(n):n},filter:function(t){return this.pushStack(R(this,t||[],!1))},not:function(t){return this.pushStack(R(this,t||[],!0))},is:function(t){return!!R(this,"string"==typeof t&&k.test(t)?A(t):t||[],!1).length}});var L,D=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(A.fn.init=function(t,e,n){var i,r;if(!t)return this;if(n=n||L,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:D.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof A?e[0]:e,A.merge(this,A.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:x,!0)),O.test(i[1])&&A.isPlainObject(e))for(i in e)v(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(r=x.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):v(t)?void 0!==n.ready?n.ready(t):t(A):A.makeArray(t,this)}).prototype=A.fn,L=A(x);var I=/^(?:parents|prev(?:Until|All))/,F={children:!0,contents:!0,next:!0,prev:!0};function j(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}A.fn.extend({has:function(t){var e=A(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(A.contains(this,e[t]))return!0}))},closest:function(t,e){var n,i=0,r=this.length,o=[],a="string"!=typeof t&&A(t);if(!k.test(t))for(;i<r;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&A.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?A.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?c.call(A(t),this[0]):c.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(A.uniqueSort(A.merge(this.get(),A(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),A.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return E(t,"parentNode")},parentsUntil:function(t,e,n){return E(t,"parentNode",n)},next:function(t){return j(t,"nextSibling")},prev:function(t){return j(t,"previousSibling")},nextAll:function(t){return E(t,"nextSibling")},prevAll:function(t){return E(t,"previousSibling")},nextUntil:function(t,e,n){return E(t,"nextSibling",n)},prevUntil:function(t,e,n){return E(t,"previousSibling",n)},siblings:function(t){return S((t.parentNode||{}).firstChild,t)},children:function(t){return S(t.firstChild)},contents:function(t){return null!=t.contentDocument&&a(t.contentDocument)?t.contentDocument:(P(t,"template")&&(t=t.content||t),A.merge([],t.childNodes))}},(function(t,e){A.fn[t]=function(n,i){var r=A.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=A.filter(i,r)),this.length>1&&(F[t]||A.uniqueSort(r),I.test(t)&&r.reverse()),this.pushStack(r)}}));var z=/[^\x20\t\r\n\f]+/g;function N(t){return t}function B(t){throw t}function V(t,e,n,i){var r;try{t&&v(r=t.promise)?r.call(t).done(e).fail(n):t&&v(r=t.then)?r.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}A.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return A.each(t.match(z)||[],(function(t,n){e[n]=!0})),e}(t):A.extend({},t);var e,n,i,r,o=[],a=[],s=-1,l=function(){for(r=r||t.once,i=e=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&t.stopOnFalse&&(s=o.length,n=!1);t.memory||(n=!1),e=!1,r&&(o=n?[]:"")},u={add:function(){return o&&(n&&!e&&(s=o.length-1,a.push(n)),function e(n){A.each(n,(function(n,i){v(i)?t.unique&&u.has(i)||o.push(i):i&&i.length&&"string"!==w(i)&&e(i)}))}(arguments),n&&!e&&l()),this},remove:function(){return A.each(arguments,(function(t,e){for(var n;(n=A.inArray(e,o,n))>-1;)o.splice(n,1),n<=s&&s--})),this},has:function(t){return t?A.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=a=[],n||e||(o=n=""),this},locked:function(){return!!r},fireWith:function(t,n){return r||(n=[t,(n=n||[]).slice?n.slice():n],a.push(n),e||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},A.extend({Deferred:function(t){var e=[["notify","progress",A.Callbacks("memory"),A.Callbacks("memory"),2],["resolve","done",A.Callbacks("once memory"),A.Callbacks("once memory"),0,"resolved"],["reject","fail",A.Callbacks("once memory"),A.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return r.then(null,t)},pipe:function(){var t=arguments;return A.Deferred((function(n){A.each(e,(function(e,i){var r=v(t[i[4]])&&t[i[4]];o[i[1]]((function(){var t=r&&r.apply(this,arguments);t&&v(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[t]:arguments)}))})),t=null})).promise()},then:function(t,n,r){var o=0;function a(t,e,n,r){return function(){var s=this,l=arguments,u=function(){var i,u;if(!(t<o)){if((i=n.apply(s,l))===e.promise())throw new TypeError("Thenable self-resolution");u=i&&("object"==typeof i||"function"==typeof i)&&i.then,v(u)?r?u.call(i,a(o,e,N,r),a(o,e,B,r)):(o++,u.call(i,a(o,e,N,r),a(o,e,B,r),a(o,e,N,e.notifyWith))):(n!==N&&(s=void 0,l=[i]),(r||e.resolveWith)(s,l))}},c=r?u:function(){try{u()}catch(i){A.Deferred.exceptionHook&&A.Deferred.exceptionHook(i,c.stackTrace),t+1>=o&&(n!==B&&(s=void 0,l=[i]),e.rejectWith(s,l))}};t?c():(A.Deferred.getStackHook&&(c.stackTrace=A.Deferred.getStackHook()),i.setTimeout(c))}}return A.Deferred((function(i){e[0][3].add(a(0,i,v(r)?r:N,i.notifyWith)),e[1][3].add(a(0,i,v(t)?t:N)),e[2][3].add(a(0,i,v(n)?n:B))})).promise()},promise:function(t){return null!=t?A.extend(t,r):r}},o={};return A.each(e,(function(t,i){var a=i[2],s=i[5];r[i[1]]=a.add,s&&a.add((function(){n=s}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),a.add(i[3].fire),o[i[0]]=function(){return o[i[0]+"With"](this===o?void 0:this,arguments),this},o[i[0]+"With"]=a.fireWith})),r.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,i=Array(n),r=s.call(arguments),o=A.Deferred(),a=function(t){return function(n){i[t]=this,r[t]=arguments.length>1?s.call(arguments):n,--e||o.resolveWith(i,r)}};if(e<=1&&(V(t,o.done(a(n)).resolve,o.reject,!e),"pending"===o.state()||v(r[n]&&r[n].then)))return o.then();for(;n--;)V(r[n],a(n),o.reject);return o.promise()}});var G=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;A.Deferred.exceptionHook=function(t,e){i.console&&i.console.warn&&t&&G.test(t.name)&&i.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},A.readyException=function(t){i.setTimeout((function(){throw t}))};var U=A.Deferred();function q(){x.removeEventListener("DOMContentLoaded",q),i.removeEventListener("load",q),A.ready()}A.fn.ready=function(t){return U.then(t).catch((function(t){A.readyException(t)})),this},A.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--A.readyWait:A.isReady)||(A.isReady=!0,!0!==t&&--A.readyWait>0||U.resolveWith(x,[A]))}}),A.ready.then=U.then,"complete"===x.readyState||"loading"!==x.readyState&&!x.documentElement.doScroll?i.setTimeout(A.ready):(x.addEventListener("DOMContentLoaded",q),i.addEventListener("load",q));var W=function(t,e,n,i,r,o,a){var s=0,l=t.length,u=null==n;if("object"===w(n))for(s in r=!0,n)W(t,e,s,n[s],!0,o,a);else if(void 0!==i&&(r=!0,v(i)||(a=!0),u&&(a?(e.call(t,i),e=null):(u=e,e=function(t,e,n){return u.call(A(t),n)})),e))for(;s<l;s++)e(t[s],n,a?i:i.call(t[s],s,e(t[s],n)));return r?t:u?e.call(t):l?e(t[0],n):o},H=/^-ms-/,Z=/-([a-z])/g;function X(t,e){return e.toUpperCase()}function Q(t){return t.replace(H,"ms-").replace(Z,X)}var K=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function Y(){this.expando=A.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(t){var e=t[this.expando];return e||(e={},K(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var i,r=this.cache(t);if("string"==typeof e)r[Q(e)]=n;else for(i in e)r[Q(i)]=e[i];return r},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][Q(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,i=t[this.expando];if(void 0!==i){if(void 0!==e){n=(e=Array.isArray(e)?e.map(Q):(e=Q(e))in i?[e]:e.match(z)||[]).length;for(;n--;)delete i[e[n]]}(void 0===e||A.isEmptyObject(i))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!A.isEmptyObject(e)}};var J=new Y,$=new Y,tt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,et=/[A-Z]/g;function nt(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(et,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:tt.test(t)?JSON.parse(t):t)}(n)}catch(t){}$.set(t,e,n)}else n=void 0;return n}A.extend({hasData:function(t){return $.hasData(t)||J.hasData(t)},data:function(t,e,n){return $.access(t,e,n)},removeData:function(t,e){$.remove(t,e)},_data:function(t,e,n){return J.access(t,e,n)},_removeData:function(t,e){J.remove(t,e)}}),A.fn.extend({data:function(t,e){var n,i,r,o=this[0],a=o&&o.attributes;if(void 0===t){if(this.length&&(r=$.get(o),1===o.nodeType&&!J.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(i=a[n].name).indexOf("data-")&&(i=Q(i.slice(5)),nt(o,i,r[i]));J.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof t?this.each((function(){$.set(this,t)})):W(this,(function(e){var n;if(o&&void 0===e)return void 0!==(n=$.get(o,t))||void 0!==(n=nt(o,t))?n:void 0;this.each((function(){$.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){$.remove(this,t)}))}}),A.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=J.get(t,e),n&&(!i||Array.isArray(n)?i=J.access(t,e,A.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=A.queue(t,e),i=n.length,r=n.shift(),o=A._queueHooks(t,e);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,(function(){A.dequeue(t,e)}),o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return J.get(t,n)||J.access(t,n,{empty:A.Callbacks("once memory").add((function(){J.remove(t,[e+"queue",n])}))})}}),A.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?A.queue(this[0],t):void 0===e?this:this.each((function(){var n=A.queue(this,t,e);A._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&A.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){A.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,r=A.Deferred(),o=this,a=this.length,s=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";a--;)(n=J.get(o[a],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(e)}});var it=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,rt=new RegExp("^(?:([+-])=|)("+it+")([a-z%]*)$","i"),ot=["Top","Right","Bottom","Left"],at=x.documentElement,st=function(t){return A.contains(t.ownerDocument,t)},lt={composed:!0};at.getRootNode&&(st=function(t){return A.contains(t.ownerDocument,t)||t.getRootNode(lt)===t.ownerDocument});var ut=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&st(t)&&"none"===A.css(t,"display")};function ct(t,e,n,i){var r,o,a=20,s=i?function(){return i.cur()}:function(){return A.css(t,e,"")},l=s(),u=n&&n[3]||(A.cssNumber[e]?"":"px"),c=t.nodeType&&(A.cssNumber[e]||"px"!==u&&+l)&&rt.exec(A.css(t,e));if(c&&c[3]!==u){for(l/=2,u=u||c[3],c=+l||1;a--;)A.style(t,e,c+u),(1-o)*(1-(o=s()/l||.5))<=0&&(a=0),c/=o;c*=2,A.style(t,e,c+u),n=n||[]}return n&&(c=+c||+l||0,r=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=c,i.end=r)),r}var dt={};function ht(t){var e,n=t.ownerDocument,i=t.nodeName,r=dt[i];return r||(e=n.body.appendChild(n.createElement(i)),r=A.css(e,"display"),e.parentNode.removeChild(e),"none"===r&&(r="block"),dt[i]=r,r)}function ft(t,e){for(var n,i,r=[],o=0,a=t.length;o<a;o++)(i=t[o]).style&&(n=i.style.display,e?("none"===n&&(r[o]=J.get(i,"display")||null,r[o]||(i.style.display="")),""===i.style.display&&ut(i)&&(r[o]=ht(i))):"none"!==n&&(r[o]="none",J.set(i,"display",n)));for(o=0;o<a;o++)null!=r[o]&&(t[o].style.display=r[o]);return t}A.fn.extend({show:function(){return ft(this,!0)},hide:function(){return ft(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){ut(this)?A(this).show():A(this).hide()}))}});var pt,mt,gt=/^(?:checkbox|radio)$/i,vt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,yt=/^$|^module$|\/(?:java|ecma)script/i;pt=x.createDocumentFragment().appendChild(x.createElement("div")),(mt=x.createElement("input")).setAttribute("type","radio"),mt.setAttribute("checked","checked"),mt.setAttribute("name","t"),pt.appendChild(mt),g.checkClone=pt.cloneNode(!0).cloneNode(!0).lastChild.checked,pt.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!pt.cloneNode(!0).lastChild.defaultValue,pt.innerHTML="<option></option>",g.option=!!pt.lastChild;var xt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function bt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&P(t,e)?A.merge([t],n):n}function _t(t,e){for(var n=0,i=t.length;n<i;n++)J.set(t[n],"globalEval",!e||J.get(e[n],"globalEval"))}xt.tbody=xt.tfoot=xt.colgroup=xt.caption=xt.thead,xt.th=xt.td,g.option||(xt.optgroup=xt.option=[1,"<select multiple='multiple'>","</select>"]);var wt=/<|&#?\w+;/;function Mt(t,e,n,i,r){for(var o,a,s,l,u,c,d=e.createDocumentFragment(),h=[],f=0,p=t.length;f<p;f++)if((o=t[f])||0===o)if("object"===w(o))A.merge(h,o.nodeType?[o]:o);else if(wt.test(o)){for(a=a||d.appendChild(e.createElement("div")),s=(vt.exec(o)||["",""])[1].toLowerCase(),l=xt[s]||xt._default,a.innerHTML=l[1]+A.htmlPrefilter(o)+l[2],c=l[0];c--;)a=a.lastChild;A.merge(h,a.childNodes),(a=d.firstChild).textContent=""}else h.push(e.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(i&&A.inArray(o,i)>-1)r&&r.push(o);else if(u=st(o),a=bt(d.appendChild(o),"script"),u&&_t(a),n)for(c=0;o=a[c++];)yt.test(o.type||"")&&n.push(o);return d}var At=/^([^.]*)(?:\.(.+)|)/;function Tt(){return!0}function Ct(){return!1}function Et(t,e){return t===function(){try{return x.activeElement}catch(t){}}()==("focus"===e)}function St(t,e,n,i,r,o){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(i=i||n,n=void 0),e)St(t,s,n,i,e[s],o);return t}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=Ct;else if(!r)return t;return 1===o&&(a=r,r=function(t){return A().off(t),a.apply(this,arguments)},r.guid=a.guid||(a.guid=A.guid++)),t.each((function(){A.event.add(this,e,r,i,n)}))}function kt(t,e,n){n?(J.set(t,e,!1),A.event.add(t,e,{namespace:!1,handler:function(t){var i,r,o=J.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(A.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=s.call(arguments),J.set(this,e,o),i=n(this,e),this[e](),o!==(r=J.get(this,e))||i?J.set(this,e,!1):r={},o!==r)return t.stopImmediatePropagation(),t.preventDefault(),r&&r.value}else o.length&&(J.set(this,e,{value:A.event.trigger(A.extend(o[0],A.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===J.get(t,e)&&A.event.add(t,e,Tt)}A.event={global:{},add:function(t,e,n,i,r){var o,a,s,l,u,c,d,h,f,p,m,g=J.get(t);if(K(t))for(n.handler&&(n=(o=n).handler,r=o.selector),r&&A.find.matchesSelector(at,r),n.guid||(n.guid=A.guid++),(l=g.events)||(l=g.events=Object.create(null)),(a=g.handle)||(a=g.handle=function(e){return void 0!==A&&A.event.triggered!==e.type?A.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(z)||[""]).length;u--;)f=m=(s=At.exec(e[u])||[])[1],p=(s[2]||"").split(".").sort(),f&&(d=A.event.special[f]||{},f=(r?d.delegateType:d.bindType)||f,d=A.event.special[f]||{},c=A.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&A.expr.match.needsContext.test(r),namespace:p.join(".")},o),(h=l[f])||((h=l[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,i,p,a)||t.addEventListener&&t.addEventListener(f,a)),d.add&&(d.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,c):h.push(c),A.event.global[f]=!0)},remove:function(t,e,n,i,r){var o,a,s,l,u,c,d,h,f,p,m,g=J.hasData(t)&&J.get(t);if(g&&(l=g.events)){for(u=(e=(e||"").match(z)||[""]).length;u--;)if(f=m=(s=At.exec(e[u])||[])[1],p=(s[2]||"").split(".").sort(),f){for(d=A.event.special[f]||{},h=l[f=(i?d.delegateType:d.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)c=h[o],!r&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,d.remove&&d.remove.call(t,c));a&&!h.length&&(d.teardown&&!1!==d.teardown.call(t,p,g.handle)||A.removeEvent(t,f,g.handle),delete l[f])}else for(f in l)A.event.remove(t,f+e[u],n,i,!0);A.isEmptyObject(l)&&J.remove(t,"handle events")}},dispatch:function(t){var e,n,i,r,o,a,s=new Array(arguments.length),l=A.event.fix(t),u=(J.get(this,"events")||Object.create(null))[l.type]||[],c=A.event.special[l.type]||{};for(s[0]=l,e=1;e<arguments.length;e++)s[e]=arguments[e];if(l.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,l)){for(a=A.event.handlers.call(this,l,u),e=0;(r=a[e++])&&!l.isPropagationStopped();)for(l.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==o.namespace&&!l.rnamespace.test(o.namespace)||(l.handleObj=o,l.data=o.data,void 0!==(i=((A.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,s))&&!1===(l.result=i)&&(l.preventDefault(),l.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,l),l.result}},handlers:function(t,e){var n,i,r,o,a,s=[],l=e.delegateCount,u=t.target;if(l&&u.nodeType&&!("click"===t.type&&t.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(o=[],a={},n=0;n<l;n++)void 0===a[r=(i=e[n]).selector+" "]&&(a[r]=i.needsContext?A(r,this).index(u)>-1:A.find(r,this,null,[u]).length),a[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return u=this,l<e.length&&s.push({elem:u,handlers:e.slice(l)}),s},addProp:function(t,e){Object.defineProperty(A.Event.prototype,t,{enumerable:!0,configurable:!0,get:v(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[A.expando]?t:new A.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return gt.test(e.type)&&e.click&&P(e,"input")&&kt(e,"click",Tt),!1},trigger:function(t){var e=this||t;return gt.test(e.type)&&e.click&&P(e,"input")&&kt(e,"click"),!0},_default:function(t){var e=t.target;return gt.test(e.type)&&e.click&&P(e,"input")&&J.get(e,"click")||P(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},A.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},A.Event=function(t,e){if(!(this instanceof A.Event))return new A.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Tt:Ct,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&A.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[A.expando]=!0},A.Event.prototype={constructor:A.Event,isDefaultPrevented:Ct,isPropagationStopped:Ct,isImmediatePropagationStopped:Ct,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Tt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Tt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Tt,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},A.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},A.event.addProp),A.each({focus:"focusin",blur:"focusout"},(function(t,e){A.event.special[t]={setup:function(){return kt(this,t,Et),!1},trigger:function(){return kt(this,t),!0},_default:function(){return!0},delegateType:e}})),A.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){A.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,r=t.relatedTarget,o=t.handleObj;return r&&(r===i||A.contains(i,r))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}})),A.fn.extend({on:function(t,e,n,i){return St(this,t,e,n,i)},one:function(t,e,n,i){return St(this,t,e,n,i,1)},off:function(t,e,n){var i,r;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,A(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(r in t)this.off(r,e,t[r]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=Ct),this.each((function(){A.event.remove(this,t,n,e)}))}});var Pt=/<script|<style|<link/i,Ot=/checked\s*(?:[^=]|=\s*.checked.)/i,Rt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Lt(t,e){return P(t,"table")&&P(11!==e.nodeType?e:e.firstChild,"tr")&&A(t).children("tbody")[0]||t}function Dt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function It(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Ft(t,e){var n,i,r,o,a,s;if(1===e.nodeType){if(J.hasData(t)&&(s=J.get(t).events))for(r in J.remove(e,"handle events"),s)for(n=0,i=s[r].length;n<i;n++)A.event.add(e,r,s[r][n]);$.hasData(t)&&(o=$.access(t),a=A.extend({},o),$.set(e,a))}}function jt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&gt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function zt(t,e,n,i){e=l(e);var r,o,a,s,u,c,d=0,h=t.length,f=h-1,p=e[0],m=v(p);if(m||h>1&&"string"==typeof p&&!g.checkClone&&Ot.test(p))return t.each((function(r){var o=t.eq(r);m&&(e[0]=p.call(this,r,o.html())),zt(o,e,n,i)}));if(h&&(o=(r=Mt(e,t[0].ownerDocument,!1,t,i)).firstChild,1===r.childNodes.length&&(r=o),o||i)){for(s=(a=A.map(bt(r,"script"),Dt)).length;d<h;d++)u=r,d!==f&&(u=A.clone(u,!0,!0),s&&A.merge(a,bt(u,"script"))),n.call(t[d],u,d);if(s)for(c=a[a.length-1].ownerDocument,A.map(a,It),d=0;d<s;d++)u=a[d],yt.test(u.type||"")&&!J.access(u,"globalEval")&&A.contains(c,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?A._evalUrl&&!u.noModule&&A._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},c):_(u.textContent.replace(Rt,""),u,c))}return t}function Nt(t,e,n){for(var i,r=e?A.filter(e,t):t,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||A.cleanData(bt(i)),i.parentNode&&(n&&st(i)&&_t(bt(i,"script")),i.parentNode.removeChild(i));return t}A.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var i,r,o,a,s=t.cloneNode(!0),l=st(t);if(!(g.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||A.isXMLDoc(t)))for(a=bt(s),i=0,r=(o=bt(t)).length;i<r;i++)jt(o[i],a[i]);if(e)if(n)for(o=o||bt(t),a=a||bt(s),i=0,r=o.length;i<r;i++)Ft(o[i],a[i]);else Ft(t,s);return(a=bt(s,"script")).length>0&&_t(a,!l&&bt(t,"script")),s},cleanData:function(t){for(var e,n,i,r=A.event.special,o=0;void 0!==(n=t[o]);o++)if(K(n)){if(e=n[J.expando]){if(e.events)for(i in e.events)r[i]?A.event.remove(n,i):A.removeEvent(n,i,e.handle);n[J.expando]=void 0}n[$.expando]&&(n[$.expando]=void 0)}}}),A.fn.extend({detach:function(t){return Nt(this,t,!0)},remove:function(t){return Nt(this,t)},text:function(t){return W(this,(function(t){return void 0===t?A.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return zt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Lt(this,t).appendChild(t)}))},prepend:function(){return zt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Lt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return zt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return zt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(A.cleanData(bt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return A.clone(this,t,e)}))},html:function(t){return W(this,(function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Pt.test(t)&&!xt[(vt.exec(t)||["",""])[1].toLowerCase()]){t=A.htmlPrefilter(t);try{for(;n<i;n++)1===(e=this[n]||{}).nodeType&&(A.cleanData(bt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return zt(this,arguments,(function(e){var n=this.parentNode;A.inArray(this,t)<0&&(A.cleanData(bt(this)),n&&n.replaceChild(e,this))}),t)}}),A.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){A.fn[t]=function(t){for(var n,i=[],r=A(t),o=r.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),A(r[a])[e](n),u.apply(i,n.get());return this.pushStack(i)}}));var Bt=new RegExp("^("+it+")(?!px)[a-z%]+$","i"),Vt=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=i),e.getComputedStyle(t)},Gt=function(t,e,n){var i,r,o={};for(r in e)o[r]=t.style[r],t.style[r]=e[r];for(r in i=n.call(t),e)t.style[r]=o[r];return i},Ut=new RegExp(ot.join("|"),"i");function qt(t,e,n){var i,r,o,a,s=t.style;return(n=n||Vt(t))&&(""!==(a=n.getPropertyValue(e)||n[e])||st(t)||(a=A.style(t,e)),!g.pixelBoxStyles()&&Bt.test(a)&&Ut.test(e)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o)),void 0!==a?a+"":a}function Wt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(c){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",at.appendChild(u).appendChild(c);var t=i.getComputedStyle(c);n="1%"!==t.top,l=12===e(t.marginLeft),c.style.right="60%",a=36===e(t.right),r=36===e(t.width),c.style.position="absolute",o=12===e(c.offsetWidth/3),at.removeChild(u),c=null}}function e(t){return Math.round(parseFloat(t))}var n,r,o,a,s,l,u=x.createElement("div"),c=x.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===c.style.backgroundClip,A.extend(g,{boxSizingReliable:function(){return t(),r},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),n},reliableMarginLeft:function(){return t(),l},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,e,n,r;return null==s&&(t=x.createElement("table"),e=x.createElement("tr"),n=x.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",e.style.cssText="border:1px solid",e.style.height="1px",n.style.height="9px",n.style.display="block",at.appendChild(t).appendChild(e).appendChild(n),r=i.getComputedStyle(e),s=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===e.offsetHeight,at.removeChild(t)),s}}))}();var Ht=["Webkit","Moz","ms"],Zt=x.createElement("div").style,Xt={};function Qt(t){var e=A.cssProps[t]||Xt[t];return e||(t in Zt?t:Xt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Ht.length;n--;)if((t=Ht[n]+e)in Zt)return t}(t)||t)}var Kt=/^(none|table(?!-c[ea]).+)/,Yt=/^--/,Jt={position:"absolute",visibility:"hidden",display:"block"},$t={letterSpacing:"0",fontWeight:"400"};function te(t,e,n){var i=rt.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function ee(t,e,n,i,r,o){var a="width"===e?1:0,s=0,l=0;if(n===(i?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=A.css(t,n+ot[a],!0,r)),i?("content"===n&&(l-=A.css(t,"padding"+ot[a],!0,r)),"margin"!==n&&(l-=A.css(t,"border"+ot[a]+"Width",!0,r))):(l+=A.css(t,"padding"+ot[a],!0,r),"padding"!==n?l+=A.css(t,"border"+ot[a]+"Width",!0,r):s+=A.css(t,"border"+ot[a]+"Width",!0,r));return!i&&o>=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-l-s-.5))||0),l}function ne(t,e,n){var i=Vt(t),r=(!g.boxSizingReliable()||n)&&"border-box"===A.css(t,"boxSizing",!1,i),o=r,a=qt(t,e,i),s="offset"+e[0].toUpperCase()+e.slice(1);if(Bt.test(a)){if(!n)return a;a="auto"}return(!g.boxSizingReliable()&&r||!g.reliableTrDimensions()&&P(t,"tr")||"auto"===a||!parseFloat(a)&&"inline"===A.css(t,"display",!1,i))&&t.getClientRects().length&&(r="border-box"===A.css(t,"boxSizing",!1,i),(o=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+ee(t,e,n||(r?"border":"content"),o,i,a)+"px"}function ie(t,e,n,i,r){return new ie.prototype.init(t,e,n,i,r)}A.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=qt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,a,s=Q(e),l=Yt.test(e),u=t.style;if(l||(e=Qt(s)),a=A.cssHooks[e]||A.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(r=a.get(t,!1,i))?r:u[e];"string"===(o=typeof n)&&(r=rt.exec(n))&&r[1]&&(n=ct(t,e,r),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=r&&r[3]||(A.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==n||0!==e.indexOf("background")||(u[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,i))||(l?u.setProperty(e,n):u[e]=n))}},css:function(t,e,n,i){var r,o,a,s=Q(e);return Yt.test(e)||(e=Qt(s)),(a=A.cssHooks[e]||A.cssHooks[s])&&"get"in a&&(r=a.get(t,!0,n)),void 0===r&&(r=qt(t,e,i)),"normal"===r&&e in $t&&(r=$t[e]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),A.each(["height","width"],(function(t,e){A.cssHooks[e]={get:function(t,n,i){if(n)return!Kt.test(A.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ne(t,e,i):Gt(t,Jt,(function(){return ne(t,e,i)}))},set:function(t,n,i){var r,o=Vt(t),a=!g.scrollboxSize()&&"absolute"===o.position,s=(a||i)&&"border-box"===A.css(t,"boxSizing",!1,o),l=i?ee(t,e,i,s,o):0;return s&&a&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ee(t,e,"border",!1,o)-.5)),l&&(r=rt.exec(n))&&"px"!==(r[3]||"px")&&(t.style[e]=n,n=A.css(t,e)),te(0,n,l)}}})),A.cssHooks.marginLeft=Wt(g.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(qt(t,"marginLeft"))||t.getBoundingClientRect().left-Gt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),A.each({margin:"",padding:"",border:"Width"},(function(t,e){A.cssHooks[t+e]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];i<4;i++)r[t+ot[i]+e]=o[i]||o[i-2]||o[0];return r}},"margin"!==t&&(A.cssHooks[t+e].set=te)})),A.fn.extend({css:function(t,e){return W(this,(function(t,e,n){var i,r,o={},a=0;if(Array.isArray(e)){for(i=Vt(t),r=e.length;a<r;a++)o[e[a]]=A.css(t,e[a],!1,i);return o}return void 0!==n?A.style(t,e,n):A.css(t,e)}),t,e,arguments.length>1)}}),A.Tween=ie,ie.prototype={constructor:ie,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||A.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(A.cssNumber[n]?"":"px")},cur:function(){var t=ie.propHooks[this.prop];return t&&t.get?t.get(this):ie.propHooks._default.get(this)},run:function(t){var e,n=ie.propHooks[this.prop];return this.options.duration?this.pos=e=A.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ie.propHooks._default.set(this),this}},ie.prototype.init.prototype=ie.prototype,ie.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=A.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){A.fx.step[t.prop]?A.fx.step[t.prop](t):1!==t.elem.nodeType||!A.cssHooks[t.prop]&&null==t.elem.style[Qt(t.prop)]?t.elem[t.prop]=t.now:A.style(t.elem,t.prop,t.now+t.unit)}}},ie.propHooks.scrollTop=ie.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},A.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},A.fx=ie.prototype.init,A.fx.step={};var re,oe,ae=/^(?:toggle|show|hide)$/,se=/queueHooks$/;function le(){oe&&(!1===x.hidden&&i.requestAnimationFrame?i.requestAnimationFrame(le):i.setTimeout(le,A.fx.interval),A.fx.tick())}function ue(){return i.setTimeout((function(){re=void 0})),re=Date.now()}function ce(t,e){var n,i=0,r={height:t};for(e=e?1:0;i<4;i+=2-e)r["margin"+(n=ot[i])]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function de(t,e,n){for(var i,r=(he.tweeners[e]||[]).concat(he.tweeners["*"]),o=0,a=r.length;o<a;o++)if(i=r[o].call(n,e,t))return i}function he(t,e,n){var i,r,o=0,a=he.prefilters.length,s=A.Deferred().always((function(){delete l.elem})),l=function(){if(r)return!1;for(var e=re||ue(),n=Math.max(0,u.startTime+u.duration-e),i=1-(n/u.duration||0),o=0,a=u.tweens.length;o<a;o++)u.tweens[o].run(i);return s.notifyWith(t,[u,i,n]),i<1&&a?n:(a||s.notifyWith(t,[u,1,0]),s.resolveWith(t,[u]),!1)},u=s.promise({elem:t,props:A.extend({},e),opts:A.extend(!0,{specialEasing:{},easing:A.easing._default},n),originalProperties:e,originalOptions:n,startTime:re||ue(),duration:n.duration,tweens:[],createTween:function(e,n){var i=A.Tween(t,u.opts,e,n,u.opts.specialEasing[e]||u.opts.easing);return u.tweens.push(i),i},stop:function(e){var n=0,i=e?u.tweens.length:0;if(r)return this;for(r=!0;n<i;n++)u.tweens[n].run(1);return e?(s.notifyWith(t,[u,1,0]),s.resolveWith(t,[u,e])):s.rejectWith(t,[u,e]),this}}),c=u.props;for(!function(t,e){var n,i,r,o,a;for(n in t)if(r=e[i=Q(n)],o=t[n],Array.isArray(o)&&(r=o[1],o=t[n]=o[0]),n!==i&&(t[i]=o,delete t[n]),(a=A.cssHooks[i])&&"expand"in a)for(n in o=a.expand(o),delete t[i],o)n in t||(t[n]=o[n],e[n]=r);else e[i]=r}(c,u.opts.specialEasing);o<a;o++)if(i=he.prefilters[o].call(u,t,c,u.opts))return v(i.stop)&&(A._queueHooks(u.elem,u.opts.queue).stop=i.stop.bind(i)),i;return A.map(c,de,u),v(u.opts.start)&&u.opts.start.call(t,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),A.fx.timer(A.extend(l,{elem:t,anim:u,queue:u.opts.queue})),u}A.Animation=A.extend(he,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return ct(n.elem,t,rt.exec(e),n),n}]},tweener:function(t,e){v(t)?(e=t,t=["*"]):t=t.match(z);for(var n,i=0,r=t.length;i<r;i++)n=t[i],he.tweeners[n]=he.tweeners[n]||[],he.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var i,r,o,a,s,l,u,c,d="width"in e||"height"in e,h=this,f={},p=t.style,m=t.nodeType&&ut(t),g=J.get(t,"fxshow");for(i in n.queue||(null==(a=A._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,A.queue(t,"fx").length||a.empty.fire()}))}))),e)if(r=e[i],ae.test(r)){if(delete e[i],o=o||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;m=!0}f[i]=g&&g[i]||A.style(t,i)}if((l=!A.isEmptyObject(e))||!A.isEmptyObject(f))for(i in d&&1===t.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(u=g&&g.display)&&(u=J.get(t,"display")),"none"===(c=A.css(t,"display"))&&(u?c=u:(ft([t],!0),u=t.style.display||u,c=A.css(t,"display"),ft([t]))),("inline"===c||"inline-block"===c&&null!=u)&&"none"===A.css(t,"float")&&(l||(h.done((function(){p.display=u})),null==u&&(c=p.display,u="none"===c?"":c)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),l=!1,f)l||(g?"hidden"in g&&(m=g.hidden):g=J.access(t,"fxshow",{display:u}),o&&(g.hidden=!m),m&&ft([t],!0),h.done((function(){for(i in m||ft([t]),J.remove(t,"fxshow"),f)A.style(t,i,f[i])}))),l=de(m?g[i]:0,i,h),i in g||(g[i]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?he.prefilters.unshift(t):he.prefilters.push(t)}}),A.speed=function(t,e,n){var i=t&&"object"==typeof t?A.extend({},t):{complete:n||!n&&e||v(t)&&t,duration:t,easing:n&&e||e&&!v(e)&&e};return A.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in A.fx.speeds?i.duration=A.fx.speeds[i.duration]:i.duration=A.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){v(i.old)&&i.old.call(this),i.queue&&A.dequeue(this,i.queue)},i},A.fn.extend({fadeTo:function(t,e,n,i){return this.filter(ut).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var r=A.isEmptyObject(t),o=A.speed(e,n,i),a=function(){var e=he(this,A.extend({},t),o);(r||J.get(this,"finish"))&&e.stop(!0)};return a.finish=a,r||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,r=null!=t&&t+"queueHooks",o=A.timers,a=J.get(this);if(r)a[r]&&a[r].stop&&i(a[r]);else for(r in a)a[r]&&a[r].stop&&se.test(r)&&i(a[r]);for(r=o.length;r--;)o[r].elem!==this||null!=t&&o[r].queue!==t||(o[r].anim.stop(n),e=!1,o.splice(r,1));!e&&n||A.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=J.get(this),i=n[t+"queue"],r=n[t+"queueHooks"],o=A.timers,a=i?i.length:0;for(n.finish=!0,A.queue(this,t,[]),r&&r.stop&&r.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<a;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish}))}}),A.each(["toggle","show","hide"],(function(t,e){var n=A.fn[e];A.fn[e]=function(t,i,r){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(ce(e,!0),t,i,r)}})),A.each({slideDown:ce("show"),slideUp:ce("hide"),slideToggle:ce("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){A.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}})),A.timers=[],A.fx.tick=function(){var t,e=0,n=A.timers;for(re=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||A.fx.stop(),re=void 0},A.fx.timer=function(t){A.timers.push(t),A.fx.start()},A.fx.interval=13,A.fx.start=function(){oe||(oe=!0,le())},A.fx.stop=function(){oe=null},A.fx.speeds={slow:600,fast:200,_default:400},A.fn.delay=function(t,e){return t=A.fx&&A.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,n){var r=i.setTimeout(e,t);n.stop=function(){i.clearTimeout(r)}}))},function(){var t=x.createElement("input"),e=x.createElement("select").appendChild(x.createElement("option"));t.type="checkbox",g.checkOn=""!==t.value,g.optSelected=e.selected,(t=x.createElement("input")).value="t",t.type="radio",g.radioValue="t"===t.value}();var fe,pe=A.expr.attrHandle;A.fn.extend({attr:function(t,e){return W(this,A.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){A.removeAttr(this,t)}))}}),A.extend({attr:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?A.prop(t,e,n):(1===o&&A.isXMLDoc(t)||(r=A.attrHooks[e.toLowerCase()]||(A.expr.match.bool.test(e)?fe:void 0)),void 0!==n?null===n?void A.removeAttr(t,e):r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n):r&&"get"in r&&null!==(i=r.get(t,e))?i:null==(i=A.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!g.radioValue&&"radio"===e&&P(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,r=e&&e.match(z);if(r&&1===t.nodeType)for(;n=r[i++];)t.removeAttribute(n)}}),fe={set:function(t,e,n){return!1===e?A.removeAttr(t,n):t.setAttribute(n,n),n}},A.each(A.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=pe[e]||A.find.attr;pe[e]=function(t,e,i){var r,o,a=e.toLowerCase();return i||(o=pe[a],pe[a]=r,r=null!=n(t,e,i)?a:null,pe[a]=o),r}}));var me=/^(?:input|select|textarea|button)$/i,ge=/^(?:a|area)$/i;function ve(t){return(t.match(z)||[]).join(" ")}function ye(t){return t.getAttribute&&t.getAttribute("class")||""}function xe(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(z)||[]}A.fn.extend({prop:function(t,e){return W(this,A.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[A.propFix[t]||t]}))}}),A.extend({prop:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&A.isXMLDoc(t)||(e=A.propFix[e]||e,r=A.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=A.find.attr(t,"tabindex");return e?parseInt(e,10):me.test(t.nodeName)||ge.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(A.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),A.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){A.propFix[this.toLowerCase()]=this})),A.fn.extend({addClass:function(t){var e,n,i,r,o,a,s,l=0;if(v(t))return this.each((function(e){A(this).addClass(t.call(this,e,ye(this)))}));if((e=xe(t)).length)for(;n=this[l++];)if(r=ye(n),i=1===n.nodeType&&" "+ve(r)+" "){for(a=0;o=e[a++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");r!==(s=ve(i))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,i,r,o,a,s,l=0;if(v(t))return this.each((function(e){A(this).removeClass(t.call(this,e,ye(this)))}));if(!arguments.length)return this.attr("class","");if((e=xe(t)).length)for(;n=this[l++];)if(r=ye(n),i=1===n.nodeType&&" "+ve(r)+" "){for(a=0;o=e[a++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");r!==(s=ve(i))&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=typeof t,i="string"===n||Array.isArray(t);return"boolean"==typeof e&&i?e?this.addClass(t):this.removeClass(t):v(t)?this.each((function(n){A(this).toggleClass(t.call(this,n,ye(this),e),e)})):this.each((function(){var e,r,o,a;if(i)for(r=0,o=A(this),a=xe(t);e=a[r++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||((e=ye(this))&&J.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":J.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+ve(ye(n))+" ").indexOf(e)>-1)return!0;return!1}});var be=/\r/g;A.fn.extend({val:function(t){var e,n,i,r=this[0];return arguments.length?(i=v(t),this.each((function(n){var r;1===this.nodeType&&(null==(r=i?t.call(this,n,A(this).val()):t)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=A.map(r,(function(t){return null==t?"":t+""}))),(e=A.valHooks[this.type]||A.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))}))):r?(e=A.valHooks[r.type]||A.valHooks[r.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(be,""):null==n?"":n:void 0}}),A.extend({valHooks:{option:{get:function(t){var e=A.find.attr(t,"value");return null!=e?e:ve(A.text(t))}},select:{get:function(t){var e,n,i,r=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],l=a?o+1:r.length;for(i=o<0?l:a?o:0;i<l;i++)if(((n=r[i]).selected||i===o)&&!n.disabled&&(!n.parentNode.disabled||!P(n.parentNode,"optgroup"))){if(e=A(n).val(),a)return e;s.push(e)}return s},set:function(t,e){for(var n,i,r=t.options,o=A.makeArray(e),a=r.length;a--;)((i=r[a]).selected=A.inArray(A.valHooks.option.get(i),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),A.each(["radio","checkbox"],(function(){A.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=A.inArray(A(t).val(),e)>-1}},g.checkOn||(A.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),g.focusin="onfocusin"in i;var _e=/^(?:focusinfocus|focusoutblur)$/,we=function(t){t.stopPropagation()};A.extend(A.event,{trigger:function(t,e,n,r){var o,a,s,l,u,c,d,h,p=[n||x],m=f.call(t,"type")?t.type:t,g=f.call(t,"namespace")?t.namespace.split("."):[];if(a=h=s=n=n||x,3!==n.nodeType&&8!==n.nodeType&&!_e.test(m+A.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),u=m.indexOf(":")<0&&"on"+m,(t=t[A.expando]?t:new A.Event(m,"object"==typeof t&&t)).isTrigger=r?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:A.makeArray(e,[t]),d=A.event.special[m]||{},r||!d.trigger||!1!==d.trigger.apply(n,e))){if(!r&&!d.noBubble&&!y(n)){for(l=d.delegateType||m,_e.test(l+m)||(a=a.parentNode);a;a=a.parentNode)p.push(a),s=a;s===(n.ownerDocument||x)&&p.push(s.defaultView||s.parentWindow||i)}for(o=0;(a=p[o++])&&!t.isPropagationStopped();)h=a,t.type=o>1?l:d.bindType||m,(c=(J.get(a,"events")||Object.create(null))[t.type]&&J.get(a,"handle"))&&c.apply(a,e),(c=u&&a[u])&&c.apply&&K(a)&&(t.result=c.apply(a,e),!1===t.result&&t.preventDefault());return t.type=m,r||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),e)||!K(n)||u&&v(n[m])&&!y(n)&&((s=n[u])&&(n[u]=null),A.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,we),n[m](),t.isPropagationStopped()&&h.removeEventListener(m,we),A.event.triggered=void 0,s&&(n[u]=s)),t.result}},simulate:function(t,e,n){var i=A.extend(new A.Event,n,{type:t,isSimulated:!0});A.event.trigger(i,null,e)}}),A.fn.extend({trigger:function(t,e){return this.each((function(){A.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return A.event.trigger(t,e,n,!0)}}),g.focusin||A.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){A.event.simulate(e,t.target,A.event.fix(t))};A.event.special[e]={setup:function(){var i=this.ownerDocument||this.document||this,r=J.access(i,e);r||i.addEventListener(t,n,!0),J.access(i,e,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,r=J.access(i,e)-1;r?J.access(i,e,r):(i.removeEventListener(t,n,!0),J.remove(i,e))}}}));var Me=i.location,Ae={guid:Date.now()},Te=/\?/;A.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{e=(new i.DOMParser).parseFromString(t,"text/xml")}catch(t){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||A.error("Invalid XML: "+(n?A.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var Ce=/\[\]$/,Ee=/\r?\n/g,Se=/^(?:submit|button|image|reset|file)$/i,ke=/^(?:input|select|textarea|keygen)/i;function Pe(t,e,n,i){var r;if(Array.isArray(e))A.each(e,(function(e,r){n||Ce.test(t)?i(t,r):Pe(t+"["+("object"==typeof r&&null!=r?e:"")+"]",r,n,i)}));else if(n||"object"!==w(e))i(t,e);else for(r in e)Pe(t+"["+r+"]",e[r],n,i)}A.param=function(t,e){var n,i=[],r=function(t,e){var n=v(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!A.isPlainObject(t))A.each(t,(function(){r(this.name,this.value)}));else for(n in t)Pe(n,t[n],e,r);return i.join("&")},A.fn.extend({serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=A.prop(this,"elements");return t?A.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!A(this).is(":disabled")&&ke.test(this.nodeName)&&!Se.test(t)&&(this.checked||!gt.test(t))})).map((function(t,e){var n=A(this).val();return null==n?null:Array.isArray(n)?A.map(n,(function(t){return{name:e.name,value:t.replace(Ee,"\r\n")}})):{name:e.name,value:n.replace(Ee,"\r\n")}})).get()}});var Oe=/%20/g,Re=/#.*$/,Le=/([?&])_=[^&]*/,De=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ie=/^(?:GET|HEAD)$/,Fe=/^\/\//,je={},ze={},Ne="*/".concat("*"),Be=x.createElement("a");function Ve(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,r=0,o=e.toLowerCase().match(z)||[];if(v(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function Ge(t,e,n,i){var r={},o=t===ze;function a(s){var l;return r[s]=!0,A.each(t[s]||[],(function(t,s){var u=s(e,n,i);return"string"!=typeof u||o||r[u]?o?!(l=u):void 0:(e.dataTypes.unshift(u),a(u),!1)})),l}return a(e.dataTypes[0])||!r["*"]&&a("*")}function Ue(t,e){var n,i,r=A.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((r[n]?t:i||(i={}))[n]=e[n]);return i&&A.extend(!0,t,i),t}Be.href=Me.href,A.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Me.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Me.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ne,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":A.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Ue(Ue(t,A.ajaxSettings),e):Ue(A.ajaxSettings,t)},ajaxPrefilter:Ve(je),ajaxTransport:Ve(ze),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,r,o,a,s,l,u,c,d,h,f=A.ajaxSetup({},e),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?A(p):A.event,g=A.Deferred(),v=A.Callbacks("once memory"),y=f.statusCode||{},b={},_={},w="canceled",M={readyState:0,getResponseHeader:function(t){var e;if(u){if(!a)for(a={};e=De.exec(o);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(t,e){return null==u&&(t=_[t.toLowerCase()]=_[t.toLowerCase()]||t,b[t]=e),this},overrideMimeType:function(t){return null==u&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(u)M.always(t[M.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||w;return n&&n.abort(e),T(0,e),this}};if(g.promise(M),f.url=((t||f.url||Me.href)+"").replace(Fe,Me.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(z)||[""],null==f.crossDomain){l=x.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=Be.protocol+"//"+Be.host!=l.protocol+"//"+l.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=A.param(f.data,f.traditional)),Ge(je,f,e,M),u)return M;for(d in(c=A.event&&f.global)&&0==A.active++&&A.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Ie.test(f.type),r=f.url.replace(Re,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Oe,"+")):(h=f.url.slice(r.length),f.data&&(f.processData||"string"==typeof f.data)&&(r+=(Te.test(r)?"&":"?")+f.data,delete f.data),!1===f.cache&&(r=r.replace(Le,"$1"),h=(Te.test(r)?"&":"?")+"_="+Ae.guid+++h),f.url=r+h),f.ifModified&&(A.lastModified[r]&&M.setRequestHeader("If-Modified-Since",A.lastModified[r]),A.etag[r]&&M.setRequestHeader("If-None-Match",A.etag[r])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&M.setRequestHeader("Content-Type",f.contentType),M.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Ne+"; q=0.01":""):f.accepts["*"]),f.headers)M.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,M,f)||u))return M.abort();if(w="abort",v.add(f.complete),M.done(f.success),M.fail(f.error),n=Ge(ze,f,e,M)){if(M.readyState=1,c&&m.trigger("ajaxSend",[M,f]),u)return M;f.async&&f.timeout>0&&(s=i.setTimeout((function(){M.abort("timeout")}),f.timeout));try{u=!1,n.send(b,T)}catch(t){if(u)throw t;T(-1,t)}}else T(-1,"No Transport");function T(t,e,a,l){var d,h,x,b,_,w=e;u||(u=!0,s&&i.clearTimeout(s),n=void 0,o=l||"",M.readyState=t>0?4:0,d=t>=200&&t<300||304===t,a&&(b=function(t,e,n){for(var i,r,o,a,s=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(r in s)if(s[r]&&s[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||t.converters[r+" "+l[0]]){o=r;break}a||(a=r)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),n[o]}(f,M,a)),!d&&A.inArray("script",f.dataTypes)>-1&&A.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),b=function(t,e,n,i){var r,o,a,s,l,u={},c=t.dataTypes.slice();if(c[1])for(a in t.converters)u[a.toLowerCase()]=t.converters[a];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=u[l+" "+o]||u["* "+o]))for(r in u)if((s=r.split(" "))[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[r]:!0!==u[r]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}(f,b,M,d),d?(f.ifModified&&((_=M.getResponseHeader("Last-Modified"))&&(A.lastModified[r]=_),(_=M.getResponseHeader("etag"))&&(A.etag[r]=_)),204===t||"HEAD"===f.type?w="nocontent":304===t?w="notmodified":(w=b.state,h=b.data,d=!(x=b.error))):(x=w,!t&&w||(w="error",t<0&&(t=0))),M.status=t,M.statusText=(e||w)+"",d?g.resolveWith(p,[h,w,M]):g.rejectWith(p,[M,w,x]),M.statusCode(y),y=void 0,c&&m.trigger(d?"ajaxSuccess":"ajaxError",[M,f,d?h:x]),v.fireWith(p,[M,w]),c&&(m.trigger("ajaxComplete",[M,f]),--A.active||A.event.trigger("ajaxStop")))}return M},getJSON:function(t,e,n){return A.get(t,e,n,"json")},getScript:function(t,e){return A.get(t,void 0,e,"script")}}),A.each(["get","post"],(function(t,e){A[e]=function(t,n,i,r){return v(n)&&(r=r||i,i=n,n=void 0),A.ajax(A.extend({url:t,type:e,dataType:r,data:n,success:i},A.isPlainObject(t)&&t))}})),A.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),A._evalUrl=function(t,e,n){return A.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){A.globalEval(t,e,n)}})},A.fn.extend({wrapAll:function(t){var e;return this[0]&&(v(t)&&(t=t.call(this[0])),e=A(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return v(t)?this.each((function(e){A(this).wrapInner(t.call(this,e))})):this.each((function(){var e=A(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=v(t);return this.each((function(n){A(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){A(this).replaceWith(this.childNodes)})),this}}),A.expr.pseudos.hidden=function(t){return!A.expr.pseudos.visible(t)},A.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},A.ajaxSettings.xhr=function(){try{return new i.XMLHttpRequest}catch(t){}};var qe={0:200,1223:204},We=A.ajaxSettings.xhr();g.cors=!!We&&"withCredentials"in We,g.ajax=We=!!We,A.ajaxTransport((function(t){var e,n;if(g.cors||We&&!t.crossDomain)return{send:function(r,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)s.setRequestHeader(a,r[a]);e=function(t){return function(){e&&(e=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(qe[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),n=s.onerror=s.ontimeout=e("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&i.setTimeout((function(){e&&n()}))},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),A.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),A.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return A.globalEval(t),t}}}),A.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),A.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(i,r){e=A("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&r("error"===t.type?404:200,t.type)}),x.head.appendChild(e[0])},abort:function(){n&&n()}}}));var He,Ze=[],Xe=/(=)\?(?=&|$)|\?\?/;A.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ze.pop()||A.expando+"_"+Ae.guid++;return this[t]=!0,t}}),A.ajaxPrefilter("json jsonp",(function(t,e,n){var r,o,a,s=!1!==t.jsonp&&(Xe.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Xe.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return r=t.jsonpCallback=v(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Xe,"$1"+r):!1!==t.jsonp&&(t.url+=(Te.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return a||A.error(r+" was not called"),a[0]},t.dataTypes[0]="json",o=i[r],i[r]=function(){a=arguments},n.always((function(){void 0===o?A(i).removeProp(r):i[r]=o,t[r]&&(t.jsonpCallback=e.jsonpCallback,Ze.push(r)),a&&v(o)&&o(a[0]),a=o=void 0})),"script"})),g.createHTMLDocument=((He=x.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===He.childNodes.length),A.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(g.createHTMLDocument?((i=(e=x.implementation.createHTMLDocument("")).createElement("base")).href=x.location.href,e.head.appendChild(i)):e=x),o=!n&&[],(r=O.exec(t))?[e.createElement(r[1])]:(r=Mt([t],e,o),o&&o.length&&A(o).remove(),A.merge([],r.childNodes)));var i,r,o},A.fn.load=function(t,e,n){var i,r,o,a=this,s=t.indexOf(" ");return s>-1&&(i=ve(t.slice(s)),t=t.slice(0,s)),v(e)?(n=e,e=void 0):e&&"object"==typeof e&&(r="POST"),a.length>0&&A.ajax({url:t,type:r||"GET",dataType:"html",data:e}).done((function(t){o=arguments,a.html(i?A("<div>").append(A.parseHTML(t)).find(i):t)})).always(n&&function(t,e){a.each((function(){n.apply(this,o||[t.responseText,e,t])}))}),this},A.expr.pseudos.animated=function(t){return A.grep(A.timers,(function(e){return t===e.elem})).length},A.offset={setOffset:function(t,e,n){var i,r,o,a,s,l,u=A.css(t,"position"),c=A(t),d={};"static"===u&&(t.style.position="relative"),s=c.offset(),o=A.css(t,"top"),l=A.css(t,"left"),("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1?(a=(i=c.position()).top,r=i.left):(a=parseFloat(o)||0,r=parseFloat(l)||0),v(e)&&(e=e.call(t,n,A.extend({},s))),null!=e.top&&(d.top=e.top-s.top+a),null!=e.left&&(d.left=e.left-s.left+r),"using"in e?e.using.call(t,d):c.css(d)}},A.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){A.offset.setOffset(this,t,e)}));var e,n,i=this[0];return i?i.getClientRects().length?(e=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,i=this[0],r={top:0,left:0};if("fixed"===A.css(i,"position"))e=i.getBoundingClientRect();else{for(e=this.offset(),n=i.ownerDocument,t=i.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===A.css(t,"position");)t=t.parentNode;t&&t!==i&&1===t.nodeType&&((r=A(t).offset()).top+=A.css(t,"borderTopWidth",!0),r.left+=A.css(t,"borderLeftWidth",!0))}return{top:e.top-r.top-A.css(i,"marginTop",!0),left:e.left-r.left-A.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===A.css(t,"position");)t=t.offsetParent;return t||at}))}}),A.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;A.fn[t]=function(i){return W(this,(function(t,i,r){var o;if(y(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===r)return o?o[e]:t[i];o?o.scrollTo(n?o.pageXOffset:r,n?r:o.pageYOffset):t[i]=r}),t,i,arguments.length)}})),A.each(["top","left"],(function(t,e){A.cssHooks[e]=Wt(g.pixelPosition,(function(t,n){if(n)return n=qt(t,e),Bt.test(n)?A(t).position()[e]+"px":n}))})),A.each({Height:"height",Width:"width"},(function(t,e){A.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,i){A.fn[i]=function(r,o){var a=arguments.length&&(n||"boolean"!=typeof r),s=n||(!0===r||!0===o?"margin":"border");return W(this,(function(e,n,r){var o;return y(e)?0===i.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===r?A.css(e,n,s):A.style(e,n,r,s)}),e,a?r:void 0,a)}}))})),A.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){A.fn[e]=function(t){return this.on(e,t)}})),A.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),A.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){A.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var Qe=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;A.proxy=function(t,e){var n,i,r;if("string"==typeof e&&(n=t[e],e=t,t=n),v(t))return i=s.call(arguments,2),r=function(){return t.apply(e||this,i.concat(s.call(arguments)))},r.guid=t.guid=t.guid||A.guid++,r},A.holdReady=function(t){t?A.readyWait++:A.ready(!0)},A.isArray=Array.isArray,A.parseJSON=JSON.parse,A.nodeName=P,A.isFunction=v,A.isWindow=y,A.camelCase=Q,A.type=w,A.now=Date.now,A.isNumeric=function(t){var e=A.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},A.trim=function(t){return null==t?"":(t+"").replace(Qe,"")},void 0===(n=function(){return A}.apply(e,[]))||(t.exports=n);var Ke=i.jQuery,Ye=i.$;return A.noConflict=function(t){return i.$===A&&(i.$=Ye),t&&i.jQuery===A&&(i.jQuery=Ke),A},void 0===r&&(i.jQuery=i.$=A),A}))},8173:function(t){t.exports=function(){"use strict";function t(n,i,r,o,a,s){if(!(a-o<=r)){var l=o+a>>1;e(n,i,l,o,a,s%2),t(n,i,r,o,l-1,s+1),t(n,i,r,l+1,a,s+1)}}function e(t,i,r,o,a,s){for(;a>o;){if(a-o>600){var l=a-o+1,u=r-o+1,c=Math.log(l),d=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*d*(l-d)/l)*(u-l/2<0?-1:1);e(t,i,r,Math.max(o,Math.floor(r-u*d/l+h)),Math.min(a,Math.floor(r+(l-u)*d/l+h)),s)}var f=i[2*r+s],p=o,m=a;for(n(t,i,o,r),i[2*a+s]>f&&n(t,i,o,a);p<m;){for(n(t,i,p,m),p++,m--;i[2*p+s]<f;)p++;for(;i[2*m+s]>f;)m--}i[2*o+s]===f?n(t,i,o,m):n(t,i,++m,a),m<=r&&(o=m+1),r<=m&&(a=m-1)}}function n(t,e,n,r){i(t,n,r),i(e,2*n,2*r),i(e,2*n+1,2*r+1)}function i(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function r(t,e,n,i,r,o,a){for(var s,l,u=[0,t.length-1,0],c=[];u.length;){var d=u.pop(),h=u.pop(),f=u.pop();if(h-f<=a)for(var p=f;p<=h;p++)s=e[2*p],l=e[2*p+1],s>=n&&s<=r&&l>=i&&l<=o&&c.push(t[p]);else{var m=Math.floor((f+h)/2);s=e[2*m],l=e[2*m+1],s>=n&&s<=r&&l>=i&&l<=o&&c.push(t[m]);var g=(d+1)%2;(0===d?n<=s:i<=l)&&(u.push(f),u.push(m-1),u.push(g)),(0===d?r>=s:o>=l)&&(u.push(m+1),u.push(h),u.push(g))}}return c}function o(t,e,n,i,r,o){for(var s=[0,t.length-1,0],l=[],u=r*r;s.length;){var c=s.pop(),d=s.pop(),h=s.pop();if(d-h<=o)for(var f=h;f<=d;f++)a(e[2*f],e[2*f+1],n,i)<=u&&l.push(t[f]);else{var p=Math.floor((h+d)/2),m=e[2*p],g=e[2*p+1];a(m,g,n,i)<=u&&l.push(t[p]);var v=(c+1)%2;(0===c?n-r<=m:i-r<=g)&&(s.push(h),s.push(p-1),s.push(v)),(0===c?n+r>=m:i+r>=g)&&(s.push(p+1),s.push(d),s.push(v))}}return l}function a(t,e,n,i){var r=t-n,o=e-i;return r*r+o*o}var s=function(t){return t[0]},l=function(t){return t[1]},u=function(e,n,i,r,o){void 0===n&&(n=s),void 0===i&&(i=l),void 0===r&&(r=64),void 0===o&&(o=Float64Array),this.nodeSize=r,this.points=e;for(var a=e.length<65536?Uint16Array:Uint32Array,u=this.ids=new a(e.length),c=this.coords=new o(2*e.length),d=0;d<e.length;d++)u[d]=d,c[2*d]=n(e[d]),c[2*d+1]=i(e[d]);t(u,c,r,0,u.length-1,0)};return u.prototype.range=function(t,e,n,i){return r(this.ids,this.coords,t,e,n,i,this.nodeSize)},u.prototype.within=function(t,e,n){return o(this.ids,this.coords,t,e,n,this.nodeSize)},u}()},3345:function(t,e,n){var i;!function(r,o,a){if(r){for(var s,l={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},u={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},c={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},d={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},h=1;h<20;++h)l[111+h]="f"+h;for(h=0;h<=9;++h)l[h+96]=h.toString();x.prototype.bind=function(t,e,n){var i=this;return t=t instanceof Array?t:[t],i._bindMultiple.call(i,t,e,n),i},x.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},x.prototype.trigger=function(t,e){var n=this;return n._directMap[t+":"+e]&&n._directMap[t+":"+e]({},t),n},x.prototype.reset=function(){var t=this;return t._callbacks={},t._directMap={},t},x.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(y(e,this.target))return!1;if("composedPath"in t&&"function"==typeof t.composedPath){var n=t.composedPath()[0];n!==t.target&&(e=n)}return"INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable},x.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},x.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(l[e]=t[e]);s=null},x.init=function(){var t=x(o);for(var e in t)"_"!==e.charAt(0)&&(x[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},x.init(),r.Mousetrap=x,t.exports&&(t.exports=x),void 0===(i=function(){return x}.call(e,n,e,t))||(t.exports=i)}function f(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)}function p(t){if("keypress"==t.type){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return l[t.which]?l[t.which]:u[t.which]?u[t.which]:String.fromCharCode(t.which).toLowerCase()}function m(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function g(t,e,n){return n||(n=function(){if(!s)for(var t in s={},l)t>95&&t<112||l.hasOwnProperty(t)&&(s[l[t]]=t);return s}()[t]?"keydown":"keypress"),"keypress"==n&&e.length&&(n="keydown"),n}function v(t,e){var n,i,r,o=[];for(n=function(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus")).split("+")}(t),r=0;r<n.length;++r)i=n[r],d[i]&&(i=d[i]),e&&"keypress"!=e&&c[i]&&(i=c[i],o.push("shift")),m(i)&&o.push(i);return{key:i,modifiers:o,action:e=g(i,o,e)}}function y(t,e){return null!==t&&t!==o&&(t===e||y(t.parentNode,e))}function x(t){var e=this;if(t=t||o,!(e instanceof x))return new x(t);e.target=t,e._callbacks={},e._directMap={};var n,i={},r=!1,a=!1,s=!1;function l(t){t=t||{};var e,n=!1;for(e in i)t[e]?n=!0:i[e]=0;n||(s=!1)}function u(t,n,r,o,a,s){var l,u,c,d,h=[],f=r.type;if(!e._callbacks[t])return[];for("keyup"==f&&m(t)&&(n=[t]),l=0;l<e._callbacks[t].length;++l)if(u=e._callbacks[t][l],(o||!u.seq||i[u.seq]==u.level)&&f==u.action&&("keypress"==f&&!r.metaKey&&!r.ctrlKey||(c=n,d=u.modifiers,c.sort().join(",")===d.sort().join(",")))){var p=!o&&u.combo==a,g=o&&u.seq==o&&u.level==s;(p||g)&&e._callbacks[t].splice(l,1),h.push(u)}return h}function c(t,n,i,r){e.stopCallback(n,n.target||n.srcElement,i,r)||!1===t(n,i)&&(function(t){t.preventDefault?t.preventDefault():t.returnValue=!1}(n),function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}(n))}function d(t){"number"!=typeof t.which&&(t.which=t.keyCode);var n=p(t);n&&("keyup"!=t.type||r!==n?e.handleKey(n,function(t){var e=[];return t.shiftKey&&e.push("shift"),t.altKey&&e.push("alt"),t.ctrlKey&&e.push("ctrl"),t.metaKey&&e.push("meta"),e}(t),t):r=!1)}function h(t,e,o,a){function u(e){return function(){s=e,++i[t],clearTimeout(n),n=setTimeout(l,1e3)}}function d(e){c(o,e,t),"keyup"!==a&&(r=p(e)),setTimeout(l,10)}i[t]=0;for(var h=0;h<e.length;++h){var f=h+1===e.length?d:u(a||v(e[h+1]).action);g(e[h],f,a,t,h)}}function g(t,n,i,r,o){e._directMap[t+":"+i]=n;var a,s=(t=t.replace(/\s+/g," ")).split(" ");s.length>1?h(t,s,n,i):(a=v(t,i),e._callbacks[a.key]=e._callbacks[a.key]||[],u(a.key,a.modifiers,{type:a.action},r,t,o),e._callbacks[a.key][r?"unshift":"push"]({callback:n,modifiers:a.modifiers,action:a.action,seq:r,level:o,combo:t}))}e._handleKey=function(t,e,n){var i,r=u(t,e,n),o={},d=0,h=!1;for(i=0;i<r.length;++i)r[i].seq&&(d=Math.max(d,r[i].level));for(i=0;i<r.length;++i)if(r[i].seq){if(r[i].level!=d)continue;h=!0,o[r[i].seq]=1,c(r[i].callback,n,r[i].combo,r[i].seq)}else h||c(r[i].callback,n,r[i].combo);var f="keypress"==n.type&&a;n.type!=s||m(t)||f||l(o),a=h&&"keydown"==n.type},e._bindMultiple=function(t,e,n){for(var i=0;i<t.length;++i)g(t[i],e,n)},f(t,"keypress",d),f(t,"keydown",d),f(t,"keyup",d)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)},6886:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var i=n(8217),r=n(7676);function o(t){return Math.abs(t)<i.pj?t:t-(0,r.Z)(t)*Math.PI}},759:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var i=n(8217),r=n(7676);function o(t){return Math.abs(t)<=i.U2?t:t-(0,r.Z)(t)*i.uo}},8348:function(t,e,n){"use strict";function i(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}n.d(e,{Z:function(){return i}})},4074:function(t,e,n){"use strict";function i(t){var e=Math.exp(t);return e=(e+1/e)/2}n.d(e,{Z:function(){return i}})},8053:function(t,e,n){"use strict";function i(t){return 1-.25*t*(1+t/16*(3+1.25*t))}n.d(e,{Z:function(){return i}})},7743:function(t,e,n){"use strict";function i(t){return.375*t*(1+.25*t*(1+.46875*t))}n.d(e,{Z:function(){return i}})},9032:function(t,e,n){"use strict";function i(t){return.05859375*t*t*(1+.75*t)}n.d(e,{Z:function(){return i}})},7325:function(t,e,n){"use strict";function i(t){return t*t*t*(35/3072)}n.d(e,{Z:function(){return i}})},918:function(t,e,n){"use strict";function i(t,e,n){var i=e*n;return t/Math.sqrt(1-i*i)}n.d(e,{Z:function(){return i}})},110:function(t,e,n){"use strict";function i(t,e){t=Math.abs(t),e=Math.abs(e);var n=Math.max(t,e),i=Math.min(t,e)/(n||1);return n*Math.sqrt(1+Math.pow(i,2))}n.d(e,{Z:function(){return i}})},6415:function(t,e,n){"use strict";function i(t,e,n,i,r){var o,a;o=t/e;for(var s=0;s<15;s++)if(o+=a=(t-(e*o-n*Math.sin(2*o)+i*Math.sin(4*o)-r*Math.sin(6*o)))/(e-2*n*Math.cos(2*o)+4*i*Math.cos(4*o)-6*r*Math.cos(6*o)),Math.abs(a)<=1e-10)return o;return NaN}n.d(e,{Z:function(){return i}})},3464:function(t,e,n){"use strict";function i(t,e,n,i,r){return t*r-e*Math.sin(2*r)+n*Math.sin(4*r)-i*Math.sin(6*r)}n.d(e,{Z:function(){return i}})},4541:function(t,e,n){"use strict";function i(t,e,n){var i=t*e;return n/Math.sqrt(1-i*i)}n.d(e,{Z:function(){return i}})},4919:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var i=n(8217);function r(t,e){for(var n,r,o=.5*t,a=i.pj-2*Math.atan(e),s=0;s<=15;s++)if(n=t*Math.sin(a),a+=r=i.pj-2*Math.atan(e*Math.pow((1-n)/(1+n),o))-a,Math.abs(r)<=1e-10)return a;return-9999}},5054:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var i=.046875,r=.01953125,o=.01068115234375;function a(t){var e=[];e[0]=1-t*(.25+t*(i+t*(r+t*o))),e[1]=t*(.75-t*(i+t*(r+t*o)));var n=t*t;return e[2]=n*(.46875-t*(.013020833333333334+.007120768229166667*t)),n*=t,e[3]=n*(.3645833333333333-.005696614583333333*t),e[4]=n*t*.3076171875,e}},6574:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var i=n(5386),r=n(8217);function o(t,e,n){for(var o=1/(1-e),a=t,s=20;s;--s){var l=Math.sin(a),u=1-e*l*l;if(a-=u=((0,i.Z)(a,l,Math.cos(a),n)-t)*(u*Math.sqrt(u))*o,Math.abs(u)<r.cp)return a}return a}},5386:function(t,e,n){"use strict";function i(t,e,n,i){return n*=e,e*=e,i[0]*t-n*(i[1]+e*(i[2]+e*(i[3]+e*i[4])))}n.d(e,{Z:function(){return i}})},3998:function(t,e,n){"use strict";function i(t,e){var n;return t>1e-7?(1-t*t)*(e/(1-(n=t*e)*n)-.5/t*Math.log((1-n)/(1+n))):2*e}n.d(e,{Z:function(){return i}})},7676:function(t,e,n){"use strict";function i(t){return t<0?-1:1}n.d(e,{Z:function(){return i}})},9507:function(t,e,n){"use strict";function i(t){var e=Math.exp(t);return e=(e-1/e)/2}n.d(e,{Z:function(){return i}})},5346:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var i=n(8217);function r(t,e,n){var r=t*n,o=.5*t;return r=Math.pow((1-r)/(1+r),o),Math.tan(.5*(i.pj-e))/r}},8217:function(t,e,n){"use strict";n.d(e,{cN:function(){return i},iM:function(){return r},Hp:function(){return o},JP:function(){return a},Qf:function(){return s},ht:function(){return l},Er:function(){return u},Be:function(){return c},uK:function(){return d},pj:function(){return h},s3:function(){return f},y1:function(){return p},zJ:function(){return m},cp:function(){return g},Qx:function(){return v},Pn:function(){return y},Qg:function(){return x},uo:function(){return b},U2:function(){return _}});var i=1,r=2,o=3,a=4,s=5,l=6378137,u=6356752.314,c=.0066943799901413165,d=484813681109536e-20,h=Math.PI/2,f=.16666666666666666,p=.04722222222222222,m=.022156084656084655,g=1e-10,v=.017453292519943295,y=57.29577951308232,x=Math.PI/4,b=2*Math.PI,_=3.14159265359},2629:function(t,e,n){"use strict";n.d(e,{Lv:function(){return r},Gu:function(){return o},Xu:function(){return a},jJ:function(){return s},QN:function(){return l}});var i=n(8217);function r(t,e){return t.datum_type===e.datum_type&&(!(t.a!==e.a||Math.abs(t.es-e.es)>5e-11)&&(t.datum_type===i.cN?t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:t.datum_type!==i.iM||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6]))}function o(t,e,n){var r,o,a,s,l=t.x,u=t.y,c=t.z?t.z:0;if(u<-i.pj&&u>-1.001*i.pj)u=-i.pj;else if(u>i.pj&&u<1.001*i.pj)u=i.pj;else{if(u<-i.pj)return{x:-1/0,y:-1/0,z:t.z};if(u>i.pj)return{x:1/0,y:1/0,z:t.z}}return l>Math.PI&&(l-=2*Math.PI),o=Math.sin(u),s=Math.cos(u),a=o*o,{x:((r=n/Math.sqrt(1-e*a))+c)*s*Math.cos(l),y:(r+c)*s*Math.sin(l),z:(r*(1-e)+c)*o}}function a(t,e,n,r){var o,a,s,l,u,c,d,h,f,p,m,g,v,y,x,b=1e-12,_=t.x,w=t.y,M=t.z?t.z:0;if(o=Math.sqrt(_*_+w*w),a=Math.sqrt(_*_+w*w+M*M),o/n<b){if(y=0,a/n<b)return i.pj,x=-r,{x:t.x,y:t.y,z:t.z}}else y=Math.atan2(w,_);s=M/a,h=(l=o/a)*(1-e)*(u=1/Math.sqrt(1-e*(2-e)*l*l)),f=s*u,v=0;do{v++,c=e*(d=n/Math.sqrt(1-e*f*f))/(d+(x=o*h+M*f-d*(1-e*f*f))),g=(m=s*(u=1/Math.sqrt(1-c*(2-c)*l*l)))*h-(p=l*(1-c)*u)*f,h=p,f=m}while(g*g>1e-24&&v<30);return{x:y,y:Math.atan(m/Math.abs(p)),z:x}}function s(t,e,n){if(e===i.cN)return{x:t.x+n[0],y:t.y+n[1],z:t.z+n[2]};if(e===i.iM){var r=n[0],o=n[1],a=n[2],s=n[3],l=n[4],u=n[5],c=n[6];return{x:c*(t.x-u*t.y+l*t.z)+r,y:c*(u*t.x+t.y-s*t.z)+o,z:c*(-l*t.x+s*t.y+t.z)+a}}}function l(t,e,n){if(e===i.cN)return{x:t.x-n[0],y:t.y-n[1],z:t.z-n[2]};if(e===i.iM){var r=n[0],o=n[1],a=n[2],s=n[3],l=n[4],u=n[5],c=n[6],d=(t.x-r)/c,h=(t.y-o)/c,f=(t.z-a)/c;return{x:d+u*h-l*f,y:-u*d+h+s*f,z:l*d-s*h+f}}}},4252:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return $t}});var i=n(8217),r={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},o={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},a=/[\s_\-\/\(\)]/g;function s(t,e){if(t[e])return t[e];for(var n,i=Object.keys(t),r=e.toLowerCase().replace(a,""),o=-1;++o<i.length;)if((n=i[o]).toLowerCase().replace(a,"")===r)return t[n]}function l(t){var e,n,a,l={},u=t.split("+").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,e){var n=e.split("=");return n.push(!0),t[n[0].toLowerCase()]=n[1],t}),{}),c={proj:"projName",datum:"datumCode",rf:function(t){l.rf=parseFloat(t)},lat_0:function(t){l.lat0=t*i.Qx},lat_1:function(t){l.lat1=t*i.Qx},lat_2:function(t){l.lat2=t*i.Qx},lat_ts:function(t){l.lat_ts=t*i.Qx},lon_0:function(t){l.long0=t*i.Qx},lon_1:function(t){l.long1=t*i.Qx},lon_2:function(t){l.long2=t*i.Qx},alpha:function(t){l.alpha=parseFloat(t)*i.Qx},gamma:function(t){l.rectified_grid_angle=parseFloat(t)},lonc:function(t){l.longc=t*i.Qx},x_0:function(t){l.x0=parseFloat(t)},y_0:function(t){l.y0=parseFloat(t)},k_0:function(t){l.k0=parseFloat(t)},k:function(t){l.k0=parseFloat(t)},a:function(t){l.a=parseFloat(t)},b:function(t){l.b=parseFloat(t)},r_a:function(){l.R_A=!0},zone:function(t){l.zone=parseInt(t,10)},south:function(){l.utmSouth=!0},towgs84:function(t){l.datum_params=t.split(",").map((function(t){return parseFloat(t)}))},to_meter:function(t){l.to_meter=parseFloat(t)},units:function(t){l.units=t;var e=s(o,t);e&&(l.to_meter=e.to_meter)},from_greenwich:function(t){l.from_greenwich=t*i.Qx},pm:function(t){var e=s(r,t);l.from_greenwich=(e||parseFloat(t))*i.Qx},nadgrids:function(t){"@null"===t?l.datumCode="none":l.nadgrids=t},axis:function(t){var e="ewnsud";3===t.length&&-1!==e.indexOf(t.substr(0,1))&&-1!==e.indexOf(t.substr(1,1))&&-1!==e.indexOf(t.substr(2,1))&&(l.axis=t)},approx:function(){l.approx=!0}};for(e in u)n=u[e],e in c?"function"==typeof(a=c[e])?a(n):l[a]=n:l[e]=n;return"string"==typeof l.datumCode&&"WGS84"!==l.datumCode&&(l.datumCode=l.datumCode.toLowerCase()),l}var u=function(t){return new m(t).output()},c=/\s/,d=/[A-Za-z]/,h=/[A-Za-z84_]/,f=/[,\]]/,p=/[\d\.E\-\+]/;function m(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=1}function g(t,e,n){Array.isArray(e)&&(n.unshift(e),e=null);var i=e?{}:t,r=n.reduce((function(t,e){return v(e,t),t}),i);e&&(t[e]=r)}function v(t,e){if(Array.isArray(t)){var n=t.shift();if("PARAMETER"===n&&(n=t.shift()),1===t.length)return Array.isArray(t[0])?(e[n]={},void v(t[0],e[n])):void(e[n]=t[0]);if(t.length)if("TOWGS84"!==n){if("AXIS"===n)return n in e||(e[n]=[]),void e[n].push(t);var i;switch(Array.isArray(n)||(e[n]={}),n){case"UNIT":case"PRIMEM":case"VERT_DATUM":return e[n]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&v(t[2],e[n]));case"SPHEROID":case"ELLIPSOID":return e[n]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&v(t[3],e[n]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return t[0]=["name",t[0]],void g(e,n,t);default:for(i=-1;++i<t.length;)if(!Array.isArray(t[i]))return v(t,e[n]);return g(e,n,t)}}else e[n]=t;else e[n]=!0}else e[t]=!0}m.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;c.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},m.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(f.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},m.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},m.prototype.number=function(t){if(!p.test(t)){if(f.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},m.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},m.prototype.keyword=function(t){if(h.test(t))this.word+=t;else{if("["===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=1)}if(!f.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},m.prototype.neutral=function(t){if(d.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(p.test(t))return this.word=t,void(this.state=3);if(!f.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},m.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function y(t){return.017453292519943295*t}function x(t){var e=u(t),n=e.shift(),i=e.shift();e.unshift(["name",i]),e.unshift(["type",n]);var r={};return v(e,r),function(t){if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var e="",n=0,i=t.AXIS.length;n<i;++n){var r=[t.AXIS[n][0].toLowerCase(),t.AXIS[n][1].toLowerCase()];-1!==r[0].indexOf("north")||("y"===r[0]||"lat"===r[0])&&"north"===r[1]?e+="n":-1!==r[0].indexOf("south")||("y"===r[0]||"lat"===r[0])&&"south"===r[1]?e+="s":-1!==r[0].indexOf("east")||("x"===r[0]||"lon"===r[0])&&"east"===r[1]?e+="e":-1===r[0].indexOf("west")&&("x"!==r[0]&&"lon"!==r[0]||"west"!==r[1])||(e+="w")}2===e.length&&(e+="u"),3===e.length&&(t.axis=e)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var o=t.GEOGCS;function a(e){return e*(t.to_meter||1)}"GEOGCS"===t.type&&(o=t),o&&(o.DATUM?t.datumCode=o.DATUM.name.toLowerCase():t.datumCode=o.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==t.datumCode&&"new_zealand_1949"!==t.datumCode||(t.datumCode="nzgd49"),"wgs_1984"!==t.datumCode&&"world_geodetic_system_1984"!==t.datumCode||("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"_ferro"===t.datumCode.slice(-6)&&(t.datumCode=t.datumCode.slice(0,-6)),"_jakarta"===t.datumCode.slice(-8)&&(t.datumCode=t.datumCode.slice(0,-8)),~t.datumCode.indexOf("belge")&&(t.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(t.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=o.DATUM.SPHEROID.a,t.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(t.datum_params=o.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",y],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",y],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",y],["lat0","latitude_of_origin",y],["lat0","standard_parallel_1",y],["lat1","standard_parallel_1",y],["lat2","standard_parallel_2",y],["azimuth","Azimuth"],["alpha","azimuth",y],["srsCode","name"]].forEach((function(e){return n=t,r=(i=e)[0],o=i[1],void(!(r in n)&&o in n&&(n[r]=n[o],3===i.length&&(n[r]=i[2](n[r]))));var n,i,r,o})),t.long0||!t.longc||"Albers_Conic_Equal_Area"!==t.projName&&"Lambert_Azimuthal_Equal_Area"!==t.projName||(t.long0=t.longc),t.lat_ts||!t.lat1||"Stereographic_South_Pole"!==t.projName&&"Polar Stereographic (variant B)"!==t.projName||(t.lat0=y(t.lat1>0?90:-90),t.lat_ts=t.lat1)}(r),r}function b(t){var e=this;if(2===arguments.length){var n=arguments[1];"string"==typeof n?"+"===n.charAt(0)?b[t]=l(arguments[1]):b[t]=x(arguments[1]):b[t]=n}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){Array.isArray(t)?b.apply(e,t):b(t)}));if("string"==typeof t){if(t in b)return b[t]}else"EPSG"in t?b["EPSG:"+t.EPSG]=t:"ESRI"in t?b["ESRI:"+t.ESRI]=t:"IAU2000"in t?b["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(b);var _=b;var w=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var M=["3857","900913","3785","102113"];var A=function(t){if(!function(t){return"string"==typeof t}(t))return t;if(function(t){return t in _}(t))return _[t];if(function(t){return w.some((function(e){return t.indexOf(e)>-1}))}(t)){var e=x(t);if(function(t){var e=s(t,"authority");if(e){var n=s(e,"epsg");return n&&M.indexOf(n)>-1}}(e))return _["EPSG:3857"];var n=function(t){var e=s(t,"extension");if(e)return s(e,"proj4")}(e);return n?l(n):e}return function(t){return"+"===t[0]}(t)?l(t):void 0};function T(t,e){var n,i;if(t=t||{},!e)return t;for(i in e)void 0!==(n=e[i])&&(t[i]=n);return t}var C=n(9820),E=n(897),S=[C.default,E.default],k={},P=[];function O(t,e){var n=P.length;return t.names?(P[n]=t,t.names.forEach((function(t){k[t.toLowerCase()]=n})),this):(console.log(e),!0)}var R={start:function(){S.forEach(O)},add:O,get:function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==k[e]&&P[k[e]]?P[k[e]]:void 0}},L={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},D=L.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};L.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var I={};I.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},I.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},I.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},I.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},I.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},I.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},I.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},I.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},I.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},I.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},I.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},I.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},I.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},I.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},I.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},I.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},I.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};var F=function(t,e,n,r,o,a,s){var l={};return l.datum_type=void 0===t||"none"===t?i.Qf:i.JP,e&&(l.datum_params=e.map(parseFloat),0===l.datum_params[0]&&0===l.datum_params[1]&&0===l.datum_params[2]||(l.datum_type=i.cN),l.datum_params.length>3&&(0===l.datum_params[3]&&0===l.datum_params[4]&&0===l.datum_params[5]&&0===l.datum_params[6]||(l.datum_type=i.iM,l.datum_params[3]*=i.uK,l.datum_params[4]*=i.uK,l.datum_params[5]*=i.uK,l.datum_params[6]=l.datum_params[6]/1e6+1))),s&&(l.datum_type=i.Hp,l.grids=s),l.a=n,l.b=r,l.es=o,l.ep2=a,l},j={};function z(t){if(0===t.length)return null;var e="@"===t[0];return e&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:t,mandatory:!e,grid:j[t]||null,isNull:!1}}function N(t){return t/3600*Math.PI/180}function B(t,e,n){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(e,n)))}function V(t){return t.map((function(t){return[N(t.longitudeShift),N(t.latitudeShift)]}))}function G(t,e,n){return{name:B(t,e+8,e+16).trim(),parent:B(t,e+24,e+24+8).trim(),lowerLatitude:t.getFloat64(e+72,n),upperLatitude:t.getFloat64(e+88,n),lowerLongitude:t.getFloat64(e+104,n),upperLongitude:t.getFloat64(e+120,n),latitudeInterval:t.getFloat64(e+136,n),longitudeInterval:t.getFloat64(e+152,n),gridNodeCount:t.getInt32(e+168,n)}}function U(t,e,n,i){for(var r=e+176,o=[],a=0;a<n.gridNodeCount;a++){var s={latitudeShift:t.getFloat32(r+16*a,i),longitudeShift:t.getFloat32(r+16*a+4,i),latitudeAccuracy:t.getFloat32(r+16*a+8,i),longitudeAccuracy:t.getFloat32(r+16*a+12,i)};o.push(s)}return o}function q(t,e){if(!(this instanceof q))return new q(t);e=e||function(t){if(t)throw t};var n=A(t);if("object"==typeof n){var r=q.projections.get(n.projName);if(r){if(n.datumCode&&"none"!==n.datumCode){var o=s(I,n.datumCode);o&&(n.datum_params=n.datum_params||(o.towgs84?o.towgs84.split(","):null),n.ellps=o.ellipse,n.datumName=o.datumName?o.datumName:n.datumCode)}n.k0=n.k0||1,n.axis=n.axis||"enu",n.ellps=n.ellps||"wgs84",n.lat1=n.lat1||n.lat0;var a,l,u,c,d,h,f,p=function(t,e,n,r,o){if(!t){var a=s(L,r);a||(a=D),t=a.a,e=a.b,n=a.rf}return n&&!e&&(e=(1-1/n)*t),(0===n||Math.abs(t-e)<i.cp)&&(o=!0,e=t),{a:t,b:e,rf:n,sphere:o}}(n.a,n.b,n.rf,n.ellps,n.sphere),m=(a=p.a,l=p.b,p.rf,u=n.R_A,h=((c=a*a)-(d=l*l))/c,f=0,u?(c=(a*=1-h*(i.s3+h*(i.y1+h*i.zJ)))*a,h=0):f=Math.sqrt(h),{es:h,e:f,ep2:(c-d)/d}),g=function(t){return void 0===t?null:t.split(",").map(z)}(n.nadgrids),v=n.datum||F(n.datumCode,n.datum_params,p.a,p.b,m.es,m.ep2,g);T(this,n),T(this,r),this.a=p.a,this.b=p.b,this.rf=p.rf,this.sphere=p.sphere,this.es=m.es,this.e=m.e,this.ep2=m.ep2,this.datum=v,this.init(),e(null,this)}else e(t)}else e(t)}q.projections=R,q.projections.start();var W=q,H=n(2629),Z=n(759);function X(t){return t===i.cN||t===i.iM}function Q(t,e,n){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;for(var r={x:-n.x,y:n.y},o={x:Number.NaN,y:Number.NaN},a=[],s=0;s<t.grids.length;s++){var l=t.grids[s];if(a.push(l.name),l.isNull){o=r;break}if(l.mandatory,null!==l.grid){var u=l.grid.subgrids[0],c=(Math.abs(u.del[1])+Math.abs(u.del[0]))/1e4,d=u.ll[0]-c,h=u.ll[1]-c,f=u.ll[0]+(u.lim[0]-1)*u.del[0]+c,p=u.ll[1]+(u.lim[1]-1)*u.del[1]+c;if(!(h>r.y||d>r.x||p<r.y||f<r.x||(o=K(r,e,u),isNaN(o.x))))break}else if(l.mandatory)return console.log("Unable to find mandatory grid '"+l.name+"'"),-1}return isNaN(o.x)?(console.log("Failed to find a grid shift table for location '"+-r.x*i.Pn+" "+r.y*i.Pn+" tried: '"+a+"'"),-1):(n.x=-o.x,n.y=o.y,0)}function K(t,e,n){var i={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return i;var r={x:t.x,y:t.y};r.x-=n.ll[0],r.y-=n.ll[1],r.x=(0,Z.Z)(r.x-Math.PI)+Math.PI;var o=Y(r,n);if(e){if(isNaN(o.x))return i;o.x=r.x-o.x,o.y=r.y-o.y;var a,s,l=9;do{if(s=Y(o,n),isNaN(s.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}a={x:r.x-(s.x+o.x),y:r.y-(s.y+o.y)},o.x+=a.x,o.y+=a.y}while(l--&&Math.abs(a.x)>1e-12&&Math.abs(a.y)>1e-12);if(l<0)return console.log("Inverse grid shift iterator failed to converge."),i;i.x=(0,Z.Z)(o.x+n.ll[0]),i.y=o.y+n.ll[1]}else isNaN(o.x)||(i.x=t.x+o.x,i.y=t.y+o.y);return i}function Y(t,e){var n,i={x:t.x/e.del[0],y:t.y/e.del[1]},r=Math.floor(i.x),o=Math.floor(i.y),a=i.x-1*r,s=i.y-1*o,l={x:Number.NaN,y:Number.NaN};if(r<0||r>=e.lim[0])return l;if(o<0||o>=e.lim[1])return l;n=o*e.lim[0]+r;var u=e.cvs[n][0],c=e.cvs[n][1];n++;var d=e.cvs[n][0],h=e.cvs[n][1];n+=e.lim[0];var f=e.cvs[n][0],p=e.cvs[n][1];n--;var m=e.cvs[n][0],g=e.cvs[n][1],v=a*s,y=a*(1-s),x=(1-a)*(1-s),b=(1-a)*s;return l.x=x*u+y*d+b*m+v*f,l.y=x*c+y*h+b*g+v*p,l}function J(t,e,n){var i,r,o,a=n.x,s=n.y,l=n.z||0,u={};for(o=0;o<3;o++)if(!e||2!==o||void 0!==n.z)switch(0===o?(i=a,r=-1!=="ew".indexOf(t.axis[o])?"x":"y"):1===o?(i=s,r=-1!=="ns".indexOf(t.axis[o])?"y":"x"):(i=l,r="z"),t.axis[o]){case"e":case"n":u[r]=i;break;case"w":case"s":u[r]=-i;break;case"u":void 0!==n[r]&&(u.z=i);break;case"d":void 0!==n[r]&&(u.z=-i);break;default:return null}return u}function $(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}function tt(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function et(t,e,n,r){var o;if(Array.isArray(n)&&(n=$(n)),function(t){tt(t.x),tt(t.y)}(n),t.datum&&e.datum&&function(t,e){return(t.datum.datum_type===i.cN||t.datum.datum_type===i.iM)&&"WGS84"!==e.datumCode||(e.datum.datum_type===i.cN||e.datum.datum_type===i.iM)&&"WGS84"!==t.datumCode}(t,e)&&(n=et(t,o=new W("WGS84"),n,r),t=o),r&&"enu"!==t.axis&&(n=J(t,!1,n)),"longlat"===t.projName)n={x:n.x*i.Qx,y:n.y*i.Qx,z:n.z||0};else if(t.to_meter&&(n={x:n.x*t.to_meter,y:n.y*t.to_meter,z:n.z||0}),!(n=t.inverse(n)))return;if(t.from_greenwich&&(n.x+=t.from_greenwich),n=function(t,e,n){if((0,H.Lv)(t,e))return n;if(t.datum_type===i.Qf||e.datum_type===i.Qf)return n;var r=t.a,o=t.es;if(t.datum_type===i.Hp){if(0!==Q(t,!1,n))return;r=i.ht,o=i.Be}var a=e.a,s=e.b,l=e.es;if(e.datum_type===i.Hp&&(a=i.ht,s=i.Er,l=i.Be),o===l&&r===a&&!X(t.datum_type)&&!X(e.datum_type))return n;if(n=(0,H.Gu)(n,o,r),X(t.datum_type)&&(n=(0,H.jJ)(n,t.datum_type,t.datum_params)),X(e.datum_type)&&(n=(0,H.QN)(n,e.datum_type,e.datum_params)),n=(0,H.Xu)(n,l,a,s),e.datum_type===i.Hp&&0!==Q(e,!0,n))return;return n}(t.datum,e.datum,n),n)return e.from_greenwich&&(n={x:n.x-e.from_greenwich,y:n.y,z:n.z||0}),"longlat"===e.projName?n={x:n.x*i.Pn,y:n.y*i.Pn,z:n.z||0}:(n=e.forward(n),e.to_meter&&(n={x:n.x/e.to_meter,y:n.y/e.to_meter,z:n.z||0})),r&&"enu"!==e.axis?J(e,!0,n):n}var nt=W("WGS84");function it(t,e,n,i){var r,o,a;return Array.isArray(n)?(r=et(t,e,n,i)||{x:NaN,y:NaN},n.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name?"number"==typeof r.z?[r.x,r.y,r.z].concat(n.splice(3)):[r.x,r.y,n[2]].concat(n.splice(3)):[r.x,r.y].concat(n.splice(2)):[r.x,r.y]):(o=et(t,e,n,i),2===(a=Object.keys(n)).length||a.forEach((function(i){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===i||"y"===i||"z"===i)return}else if("x"===i||"y"===i)return;o[i]=n[i]})),o)}function rt(t){return t instanceof W?t:t.oProj?t.oProj:W(t)}var ot=function(t,e,n){t=rt(t);var i,r=!1;return void 0===e?(e=t,t=nt,r=!0):(void 0!==e.x||Array.isArray(e))&&(n=e,e=t,t=nt,r=!0),e=rt(e),n?it(t,e,n):(i={forward:function(n,i){return it(t,e,n,i)},inverse:function(n,i){return it(e,t,n,i)}},r&&(i.oProj=e),i)},at="AJSAJS",st="AFAFAF",lt=65,ut=73,ct=79,dt=86,ht=90,ft={forward:pt,inverse:function(t){var e=yt(_t(t.toUpperCase()));if(e.lat&&e.lon)return[e.lon,e.lat,e.lon,e.lat];return[e.left,e.bottom,e.right,e.top]},toPoint:mt};function pt(t,e){return e=e||5,function(t,e){var n="00000"+t.easting,i="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(f=t.easting,p=t.northing,m=t.zoneNumber,g=bt(m),v=Math.floor(f/1e5),y=Math.floor(p/1e5)%20,r=v,o=y,a=g,s=a-1,l=at.charCodeAt(s),u=st.charCodeAt(s),c=l+r-1,d=u+o,h=!1,c>ht&&(c=c-ht+lt-1,h=!0),(c===ut||l<ut&&c>ut||(c>ut||l<ut)&&h)&&c++,(c===ct||l<ct&&c>ct||(c>ct||l<ct)&&h)&&++c===ut&&c++,c>ht&&(c=c-ht+lt-1),d>dt?(d=d-dt+lt-1,h=!0):h=!1,(d===ut||u<ut&&d>ut||(d>ut||u<ut)&&h)&&d++,(d===ct||u<ct&&d>ct||(d>ct||u<ct)&&h)&&++d===ut&&d++,d>dt&&(d=d-dt+lt-1),String.fromCharCode(c)+String.fromCharCode(d))+n.substr(n.length-5,e)+i.substr(i.length-5,e);var r,o,a,s,l,u,c,d,h;var f,p,m,g,v,y}(function(t){var e,n,i,r,o,a,s,l,u=t.lat,c=t.lon,d=6378137,h=.00669438,f=.9996,p=gt(u),m=gt(c);l=Math.floor((c+180)/6)+1,180===c&&(l=60);u>=56&&u<64&&c>=3&&c<12&&(l=32);u>=72&&u<84&&(c>=0&&c<9?l=31:c>=9&&c<21?l=33:c>=21&&c<33?l=35:c>=33&&c<42&&(l=37));s=gt(6*(l-1)-180+3),e=h/(1-h),n=d/Math.sqrt(1-h*Math.sin(p)*Math.sin(p)),i=Math.tan(p)*Math.tan(p),r=e*Math.cos(p)*Math.cos(p),o=Math.cos(p)*(m-s),a=d*((1-h/4-3*h*h/64-5*h*h*h/256)*p-(3*h/8+3*h*h/32+45*h*h*h/1024)*Math.sin(2*p)+(15*h*h/256+45*h*h*h/1024)*Math.sin(4*p)-35*h*h*h/3072*Math.sin(6*p));var g=f*n*(o+(1-i+r)*o*o*o/6+(5-18*i+i*i+72*r-58*e)*o*o*o*o*o/120)+5e5,v=f*(a+n*Math.tan(p)*(o*o/2+(5-i+9*r+4*r*r)*o*o*o*o/24+(61-58*i+i*i+600*r-330*e)*o*o*o*o*o*o/720));u<0&&(v+=1e7);return{northing:Math.round(v),easting:Math.round(g),zoneNumber:l,zoneLetter:xt(u)}}({lat:t[1],lon:t[0]}),e)}function mt(t){var e=yt(_t(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function gt(t){return t*(Math.PI/180)}function vt(t){return t/Math.PI*180}function yt(t){var e=t.northing,n=t.easting,i=t.zoneLetter,r=t.zoneNumber;if(r<0||r>60)return null;var o,a,s,l,u,c,d,h,f,p=.9996,m=6378137,g=.00669438,v=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),y=n-5e5,x=e;i<"N"&&(x-=1e7),d=6*(r-1)-180+3,o=.006739496752268451,f=(h=x/p/6367449.145945056)+(3*v/2-27*v*v*v/32)*Math.sin(2*h)+(21*v*v/16-55*v*v*v*v/32)*Math.sin(4*h)+151*v*v*v/96*Math.sin(6*h),a=m/Math.sqrt(1-g*Math.sin(f)*Math.sin(f)),s=Math.tan(f)*Math.tan(f),l=o*Math.cos(f)*Math.cos(f),u=.99330562*m/Math.pow(1-g*Math.sin(f)*Math.sin(f),1.5),c=y/(a*p);var b=f-a*Math.tan(f)/u*(c*c/2-(5+3*s+10*l-4*l*l-9*o)*c*c*c*c/24+(61+90*s+298*l+45*s*s-1.6983531815716497-3*l*l)*c*c*c*c*c*c/720);b=vt(b);var _,w=(c-(1+2*s+l)*c*c*c/6+(5-2*l+28*s-3*l*l+8*o+24*s*s)*c*c*c*c*c/120)/Math.cos(f);if(w=d+vt(w),t.accuracy){var M=yt({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});_={top:M.lat,right:M.lon,bottom:b,left:w}}else _={lat:b,lon:w};return _}function xt(t){var e="Z";return 84>=t&&t>=72?e="X":72>t&&t>=64?e="W":64>t&&t>=56?e="V":56>t&&t>=48?e="U":48>t&&t>=40?e="T":40>t&&t>=32?e="S":32>t&&t>=24?e="R":24>t&&t>=16?e="Q":16>t&&t>=8?e="P":8>t&&t>=0?e="N":0>t&&t>=-8?e="M":-8>t&&t>=-16?e="L":-16>t&&t>=-24?e="K":-24>t&&t>=-32?e="J":-32>t&&t>=-40?e="H":-40>t&&t>=-48?e="G":-48>t&&t>=-56?e="F":-56>t&&t>=-64?e="E":-64>t&&t>=-72?e="D":-72>t&&t>=-80&&(e="C"),e}function bt(t){var e=t%6;return 0===e&&(e=6),e}function _t(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,n=t.length,i=null,r="",o=0;!/[A-Z]/.test(e=t.charAt(o));){if(o>=2)throw"MGRSPoint bad conversion from: "+t;r+=e,o++}var a=parseInt(r,10);if(0===o||o+3>n)throw"MGRSPoint bad conversion from: "+t;var s=t.charAt(o++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+t;i=t.substring(o,o+=2);for(var l=bt(a),u=function(t,e){var n=at.charCodeAt(e-1),i=1e5,r=!1;for(;n!==t.charCodeAt(0);){if(++n===ut&&n++,n===ct&&n++,n>ht){if(r)throw"Bad character: "+t;n=lt,r=!0}i+=1e5}return i}(i.charAt(0),l),c=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;var n=st.charCodeAt(e-1),i=0,r=!1;for(;n!==t.charCodeAt(0);){if(++n===ut&&n++,n===ct&&n++,n>dt){if(r)throw"Bad character: "+t;n=lt,r=!0}i+=1e5}return i}(i.charAt(1),l);c<wt(s);)c+=2e6;var d=n-o;if(d%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var h,f,p,m=d/2,g=0,v=0;return m>0&&(h=1e5/Math.pow(10,m),f=t.substring(o,o+m),g=parseFloat(f)*h,p=t.substring(o+m),v=parseFloat(p)*h),{easting:g+u,northing:v+c,zoneLetter:s,zoneNumber:a,accuracy:h}}function wt(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}function Mt(t,e,n){if(!(this instanceof Mt))return new Mt(t,e,n);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var i=t.split(",");this.x=parseFloat(i[0],10),this.y=parseFloat(i[1],10),this.z=parseFloat(i[2],10)||0}else this.x=t,this.y=e,this.z=n||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Mt.fromMGRS=function(t){return new Mt(mt(t))},Mt.prototype.toMGRS=function(t){return pt([this.x,this.y],t)};var At=Mt,Tt=n(3157),Ct=n(516),Et=n(973),St=n(9936),kt=n(7983),Pt=n(4176),Ot=n(208),Rt=n(9164),Lt=n(6235),Dt=n(5234),It=n(3769),Ft=n(9816),jt=n(4655),zt=n(7712),Nt=n(1941),Bt=n(6089),Vt=n(5591),Gt=n(7841),Ut=n(9926),qt=n(6105),Wt=n(245),Ht=n(604),Zt=n(2765),Xt=n(2310),Qt=n(4689),Kt=n(4402),Yt=n(1258),Jt=n(6470);ot.defaultDatum="WGS84",ot.Proj=W,ot.WGS84=new ot.Proj("WGS84"),ot.Point=At,ot.toPoint=$,ot.defs=_,ot.nadgrid=function(t,e){var n=new DataView(e),i=function(t){var e=t.getInt32(8,!1);if(11===e)return!1;11!==(e=t.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian");return!0}(n),r=function(t,e){return{nFields:t.getInt32(8,e),nSubgridFields:t.getInt32(24,e),nSubgrids:t.getInt32(40,e),shiftType:B(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,e),fromSemiMinorAxis:t.getFloat64(136,e),toSemiMajorAxis:t.getFloat64(152,e),toSemiMinorAxis:t.getFloat64(168,e)}}(n,i);r.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var o=function(t,e,n){for(var i=176,r=[],o=0;o<e.nSubgrids;o++){var a=G(t,i,n),s=U(t,i,a,n),l=Math.round(1+(a.upperLongitude-a.lowerLongitude)/a.longitudeInterval),u=Math.round(1+(a.upperLatitude-a.lowerLatitude)/a.latitudeInterval);r.push({ll:[N(a.lowerLongitude),N(a.lowerLatitude)],del:[N(a.longitudeInterval),N(a.latitudeInterval)],lim:[l,u],count:a.gridNodeCount,cvs:V(s)})}return r}(n,r,i),a={header:r,subgrids:o};return j[t]=a,a},ot.transform=et,ot.mgrs=ft,ot.version="__VERSION__",function(t){t.Proj.projections.add(Tt.default),t.Proj.projections.add(Ct.default),t.Proj.projections.add(Et.default),t.Proj.projections.add(St.default),t.Proj.projections.add(kt.default),t.Proj.projections.add(Pt.default),t.Proj.projections.add(Ot.default),t.Proj.projections.add(Rt.default),t.Proj.projections.add(Lt.default),t.Proj.projections.add(Dt.default),t.Proj.projections.add(It.default),t.Proj.projections.add(Ft.default),t.Proj.projections.add(jt.default),t.Proj.projections.add(zt.default),t.Proj.projections.add(Nt.default),t.Proj.projections.add(Bt.default),t.Proj.projections.add(Vt.default),t.Proj.projections.add(Gt.default),t.Proj.projections.add(Ut.default),t.Proj.projections.add(qt.default),t.Proj.projections.add(Wt.default),t.Proj.projections.add(Ht.default),t.Proj.projections.add(Zt.default),t.Proj.projections.add(Xt.default),t.Proj.projections.add(Qt.default),t.Proj.projections.add(Kt.default),t.Proj.projections.add(Yt.default),t.Proj.projections.add(Jt.default)}(ot);var $t=ot},9816:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return l},forward:function(){return u},inverse:function(){return c},phi1z:function(){return d},names:function(){return h}});var i=n(4541),r=n(3998),o=n(759),a=n(8348),s=n(8217);function l(){Math.abs(this.lat1+this.lat2)<s.cp||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=(0,i.Z)(this.e3,this.sin_po,this.cos_po),this.qs1=(0,r.Z)(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=(0,i.Z)(this.e3,this.sin_po,this.cos_po),this.qs2=(0,r.Z)(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=(0,r.Z)(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>s.cp?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function u(t){var e=t.x,n=t.y;this.sin_phi=Math.sin(n),this.cos_phi=Math.cos(n);var i=(0,r.Z)(this.e3,this.sin_phi,this.cos_phi),a=this.a*Math.sqrt(this.c-this.ns0*i)/this.ns0,s=this.ns0*(0,o.Z)(e-this.long0),l=a*Math.sin(s)+this.x0,u=this.rh-a*Math.cos(s)+this.y0;return t.x=l,t.y=u,t}function c(t){var e,n,i,r,a,s;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),i=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),i=-1),r=0,0!==e&&(r=Math.atan2(i*t.x,i*t.y)),i=e*this.ns0/this.a,this.sphere?s=Math.asin((this.c-i*i)/(2*this.ns0)):(n=(this.c-i*i)/this.ns0,s=this.phi1z(this.e3,n)),a=(0,o.Z)(r/this.ns0+this.long0),t.x=a,t.y=s,t}function d(t,e){var n,i,r,o,l=(0,a.Z)(.5*e);if(t<s.cp)return l;for(var u=t*t,c=1;c<=25;c++)if(l+=o=.5*(r=1-(i=t*(n=Math.sin(l)))*i)*r/Math.cos(l)*(e/(1-u)-n/r+.5/t*Math.log((1-i)/(1+i))),Math.abs(o)<=1e-7)return l;return null}var h=["Albers_Conic_Equal_Area","Albers","aea"];e.default={init:l,forward:u,inverse:c,names:h,phi1z:d}},2765:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return f},forward:function(){return p},inverse:function(){return m},names:function(){return g}});var i=n(759),r=n(8217),o=n(3464),a=n(8053),s=n(7743),l=n(9032),u=n(7325),c=n(918),d=n(8348),h=n(6415);function f(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function p(t){var e,n,d,h,f,p,m,g,v,y,x,b,_,w,M,A,T,C,E,S,k,P,O=t.x,R=t.y,L=Math.sin(t.y),D=Math.cos(t.y),I=(0,i.Z)(O-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=r.cp?(t.x=this.x0+this.a*(r.pj-R)*Math.sin(I),t.y=this.y0-this.a*(r.pj-R)*Math.cos(I),t):Math.abs(this.sin_p12+1)<=r.cp?(t.x=this.x0+this.a*(r.pj+R)*Math.sin(I),t.y=this.y0+this.a*(r.pj+R)*Math.cos(I),t):(C=this.sin_p12*L+this.cos_p12*D*Math.cos(I),T=(A=Math.acos(C))?A/Math.sin(A):1,t.x=this.x0+this.a*T*D*Math.sin(I),t.y=this.y0+this.a*T*(this.cos_p12*L-this.sin_p12*D*Math.cos(I)),t):(e=(0,a.Z)(this.es),n=(0,s.Z)(this.es),d=(0,l.Z)(this.es),h=(0,u.Z)(this.es),Math.abs(this.sin_p12-1)<=r.cp?(f=this.a*(0,o.Z)(e,n,d,h,r.pj),p=this.a*(0,o.Z)(e,n,d,h,R),t.x=this.x0+(f-p)*Math.sin(I),t.y=this.y0-(f-p)*Math.cos(I),t):Math.abs(this.sin_p12+1)<=r.cp?(f=this.a*(0,o.Z)(e,n,d,h,r.pj),p=this.a*(0,o.Z)(e,n,d,h,R),t.x=this.x0+(f+p)*Math.sin(I),t.y=this.y0+(f+p)*Math.cos(I),t):(m=L/D,g=(0,c.Z)(this.a,this.e,this.sin_p12),v=(0,c.Z)(this.a,this.e,L),y=Math.atan((1-this.es)*m+this.es*g*this.sin_p12/(v*D)),E=0===(x=Math.atan2(Math.sin(I),this.cos_p12*Math.tan(y)-this.sin_p12*Math.cos(I)))?Math.asin(this.cos_p12*Math.sin(y)-this.sin_p12*Math.cos(y)):Math.abs(Math.abs(x)-Math.PI)<=r.cp?-Math.asin(this.cos_p12*Math.sin(y)-this.sin_p12*Math.cos(y)):Math.asin(Math.sin(I)*Math.cos(y)/Math.sin(x)),b=this.e*this.sin_p12/Math.sqrt(1-this.es),A=g*E*(1-(S=E*E)*(M=(_=this.e*this.cos_p12*Math.cos(x)/Math.sqrt(1-this.es))*_)*(1-M)/6+(k=S*E)/8*(w=b*_)*(1-2*M)+(P=k*E)/120*(M*(4-7*M)-3*b*b*(1-7*M))-P*E/48*w),t.x=this.x0+A*Math.sin(x),t.y=this.y0+A*Math.cos(x),t))}function m(t){var e,n,f,p,m,g,v,y,x,b,_,w,M,A,T,C,E,S,k,P,O,R,L,D;if(t.x-=this.x0,t.y-=this.y0,this.sphere){if((e=Math.sqrt(t.x*t.x+t.y*t.y))>2*r.pj*this.a)return;return n=e/this.a,f=Math.sin(n),p=Math.cos(n),m=this.long0,Math.abs(e)<=r.cp?g=this.lat0:(g=(0,d.Z)(p*this.sin_p12+t.y*f*this.cos_p12/e),v=Math.abs(this.lat0)-r.pj,m=Math.abs(v)<=r.cp?this.lat0>=0?(0,i.Z)(this.long0+Math.atan2(t.x,-t.y)):(0,i.Z)(this.long0-Math.atan2(-t.x,t.y)):(0,i.Z)(this.long0+Math.atan2(t.x*f,e*this.cos_p12*p-t.y*this.sin_p12*f))),t.x=m,t.y=g,t}return y=(0,a.Z)(this.es),x=(0,s.Z)(this.es),b=(0,l.Z)(this.es),_=(0,u.Z)(this.es),Math.abs(this.sin_p12-1)<=r.cp?(M=(w=this.a*(0,o.Z)(y,x,b,_,r.pj))-(e=Math.sqrt(t.x*t.x+t.y*t.y)),g=(0,h.Z)(M/this.a,y,x,b,_),m=(0,i.Z)(this.long0+Math.atan2(t.x,-1*t.y)),t.x=m,t.y=g,t):Math.abs(this.sin_p12+1)<=r.cp?(w=this.a*(0,o.Z)(y,x,b,_,r.pj),M=(e=Math.sqrt(t.x*t.x+t.y*t.y))-w,g=(0,h.Z)(M/this.a,y,x,b,_),m=(0,i.Z)(this.long0+Math.atan2(t.x,t.y)),t.x=m,t.y=g,t):(e=Math.sqrt(t.x*t.x+t.y*t.y),C=Math.atan2(t.x,t.y),A=(0,c.Z)(this.a,this.e,this.sin_p12),E=Math.cos(C),k=-(S=this.e*this.cos_p12*E)*S/(1-this.es),P=3*this.es*(1-k)*this.sin_p12*this.cos_p12*E/(1-this.es),L=1-k*(R=(O=e/A)-k*(1+k)*Math.pow(O,3)/6-P*(1+3*k)*Math.pow(O,4)/24)*R/2-O*R*R*R/6,T=Math.asin(this.sin_p12*Math.cos(R)+this.cos_p12*Math.sin(R)*E),m=(0,i.Z)(this.long0+Math.asin(Math.sin(C)*Math.sin(R)/Math.cos(T))),D=Math.sin(T),g=Math.atan2((D-this.es*L*this.sin_p12)*Math.tan(T),D*(1-this.es)),t.x=m,t.y=g,t)}var g=["Azimuthal_Equidistant","aeqd"];e.default={init:f,forward:p,inverse:m,names:g}},5234:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return f},forward:function(){return p},inverse:function(){return m},names:function(){return g}});var i=n(3464),r=n(8053),o=n(7743),a=n(9032),s=n(7325),l=n(918),u=n(759),c=n(6886),d=n(6415),h=n(8217);function f(){this.sphere||(this.e0=(0,r.Z)(this.es),this.e1=(0,o.Z)(this.es),this.e2=(0,a.Z)(this.es),this.e3=(0,s.Z)(this.es),this.ml0=this.a*(0,i.Z)(this.e0,this.e1,this.e2,this.e3,this.lat0))}function p(t){var e,n,r=t.x,o=t.y;if(r=(0,u.Z)(r-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(o)*Math.sin(r)),n=this.a*(Math.atan2(Math.tan(o),Math.cos(r))-this.lat0);else{var a=Math.sin(o),s=Math.cos(o),c=(0,l.Z)(this.a,this.e,a),d=Math.tan(o)*Math.tan(o),h=r*Math.cos(o),f=h*h,p=this.es*s*s/(1-this.es);e=c*h*(1-f*d*(1/6-(8-d+8*p)*f/120)),n=this.a*(0,i.Z)(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+c*a/s*f*(.5+(5-d+6*p)*f/24)}return t.x=e+this.x0,t.y=n+this.y0,t}function m(t){t.x-=this.x0,t.y-=this.y0;var e,n,i=t.x/this.a,r=t.y/this.a;if(this.sphere){var o=r+this.lat0;e=Math.asin(Math.sin(o)*Math.cos(i)),n=Math.atan2(Math.tan(i),Math.cos(o))}else{var a=this.ml0/this.a+r,s=(0,d.Z)(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-h.pj)<=h.cp)return t.x=this.long0,t.y=h.pj,r<0&&(t.y*=-1),t;var f=(0,l.Z)(this.a,this.e,Math.sin(s)),p=f*f*f/this.a/this.a*(1-this.es),m=Math.pow(Math.tan(s),2),g=i*this.a/f,v=g*g;e=s-f*Math.tan(s)/p*g*g*(.5-(1+3*m)*g*g/24),n=g*(1-v*(m/3+(1+3*m)*m*v/15))/Math.cos(s)}return t.x=(0,u.Z)(n+this.long0),t.y=(0,c.Z)(e),t}var g=["Cassini","Cassini_Soldner","cass"];e.default={init:f,forward:p,inverse:m,names:g}},7712:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return d},forward:function(){return l},init:function(){return s},inverse:function(){return u},names:function(){return c}});var i=n(759),r=n(3998),o=n(4541),a=n(8217);function s(){this.sphere||(this.k0=(0,o.Z)(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function l(t){var e,n,o=t.x,a=t.y,s=(0,i.Z)(o-this.long0);if(this.sphere)e=this.x0+this.a*s*Math.cos(this.lat_ts),n=this.y0+this.a*Math.sin(a)/Math.cos(this.lat_ts);else{var l=(0,r.Z)(this.e,Math.sin(a));e=this.x0+this.a*this.k0*s,n=this.y0+this.a*l*.5/this.k0}return t.x=e,t.y=n,t}function u(t){var e,n;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=(0,i.Z)(this.long0+t.x/this.a/Math.cos(this.lat_ts)),n=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(n=function(t,e){var n=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-n)<1e-6)return e<0?-1*a.pj:a.pj;for(var i,r,o,s,l=Math.asin(.5*e),u=0;u<30;u++)if(r=Math.sin(l),o=Math.cos(l),s=t*r,l+=i=Math.pow(1-s*s,2)/(2*o)*(e/(1-t*t)-r/(1-s*s)+.5/t*Math.log((1-s)/(1+s))),Math.abs(i)<=1e-10)return l;return NaN}(this.e,2*t.y*this.k0/this.a),e=(0,i.Z)(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=n,t}var c=["cea"],d={init:s,forward:l,inverse:u,names:c}},1941:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return o},forward:function(){return a},inverse:function(){return s},names:function(){return l}});var i=n(759),r=n(6886);function o(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function a(t){var e=t.x,n=t.y,o=(0,i.Z)(e-this.long0),a=(0,r.Z)(n-this.lat0);return t.x=this.x0+this.a*o*this.rc,t.y=this.y0+this.a*a,t}function s(t){var e=t.x,n=t.y;return t.x=(0,i.Z)(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=(0,r.Z)(this.lat0+(n-this.y0)/this.a),t}var l=["Equirectangular","Equidistant_Cylindrical","eqc"];e.default={init:o,forward:a,inverse:s,names:l}},245:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return f},forward:function(){return p},inverse:function(){return m},names:function(){return g}});var i=n(8053),r=n(7743),o=n(9032),a=n(7325),s=n(4541),l=n(3464),u=n(759),c=n(6886),d=n(6415),h=n(8217);function f(){Math.abs(this.lat1+this.lat2)<h.cp||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=(0,i.Z)(this.es),this.e1=(0,r.Z)(this.es),this.e2=(0,o.Z)(this.es),this.e3=(0,a.Z)(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=(0,s.Z)(this.e,this.sinphi,this.cosphi),this.ml1=(0,l.Z)(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<h.cp?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=(0,s.Z)(this.e,this.sinphi,this.cosphi),this.ml2=(0,l.Z)(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=(0,l.Z)(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function p(t){var e,n=t.x,i=t.y;if(this.sphere)e=this.a*(this.g-i);else{var r=(0,l.Z)(this.e0,this.e1,this.e2,this.e3,i);e=this.a*(this.g-r)}var o=this.ns*(0,u.Z)(n-this.long0),a=this.x0+e*Math.sin(o),s=this.y0+this.rh-e*Math.cos(o);return t.x=a,t.y=s,t}function m(t){var e,n,i,r;t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns>=0?(n=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(n=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var o=0;if(0!==n&&(o=Math.atan2(e*t.x,e*t.y)),this.sphere)return r=(0,u.Z)(this.long0+o/this.ns),i=(0,c.Z)(this.g-n/this.a),t.x=r,t.y=i,t;var a=this.g-n/this.a;return i=(0,d.Z)(a,this.e0,this.e1,this.e2,this.e3),r=(0,u.Z)(this.long0+o/this.ns),t.x=r,t.y=i,t}var g=["Equidistant_Conic","eqdc"];e.default={init:f,forward:p,inverse:m,names:g}},1903:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return r},forward:function(){return o},inverse:function(){return a},names:function(){return s}});var i=n(759);function r(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0}function o(t){var e=t.x,n=t.y,r=(0,i.Z)(e-this.long0),o=this.x0+this.a*r*Math.cos(this.lat0),a=this.y0+this.a*n;return this.t1=o,this.t2=Math.cos(this.lat0),t.x=o,t.y=a,t}function a(t){t.x-=this.x0,t.y-=this.y0;var e=t.y/this.a,n=(0,i.Z)(this.long0+t.x/(this.a*Math.cos(this.lat0)));t.x=n,t.y=e}var s=["equi"];e.default={init:r,forward:o,inverse:a,names:s}},516:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return m},forward:function(){return h},init:function(){return d},inverse:function(){return f},names:function(){return p}});var i=n(3157),r=n(9507),o=n(110);function a(t){var e=Math.abs(t);return e=function(t){var e=1+t,n=e-1;return 0===n?t:t*Math.log(e)/n}(e*(1+e/((0,o.Z)(1,e)+1))),t<0?-e:e}function s(t,e){for(var n,i=2*Math.cos(2*e),r=t.length-1,o=t[r],a=0;--r>=0;)n=i*o-a+t[r],a=o,o=n;return e+n*Math.sin(2*e)}var l=n(4074);function u(t,e,n){for(var i,o,a=Math.sin(e),s=Math.cos(e),u=(0,r.Z)(n),c=(0,l.Z)(n),d=2*s*c,h=-2*a*u,f=t.length-1,p=t[f],m=0,g=0,v=0;--f>=0;)i=g,o=m,p=d*(g=p)-i-h*(m=v)+t[f],v=h*g-o+d*m;return[(d=a*c)*p-(h=s*u)*v,d*v+h*p]}var c=n(759);function d(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(i.default.init.apply(this),this.forward=i.default.forward,this.inverse=i.default.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),n=e;this.cgb[0]=e*(2+e*(-2/3+e*(e*(116/45+e*(26/45+e*(-2854/675)))-2))),this.cbg[0]=e*(e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))-2),n*=e,this.cgb[1]=n*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=n*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),n*=e,this.cgb[2]=n*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=n*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),n*=e,this.cgb[3]=n*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=n*(1237/630+e*(e*(-24832/14175)-2.4)),n*=e,this.cgb[4]=n*(4174/315+e*(-144838/6237)),this.cbg[4]=n*(-734/315+e*(109598/31185)),n*=e,this.cgb[5]=n*(601676/22275),this.cbg[5]=n*(444337/155925),n=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+n*(1/4+n*(1/64+n/256))),this.utg[0]=e*(e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))-.5),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=n*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=n*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),n*=e,this.utg[2]=n*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=n*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),n*=e,this.utg[3]=n*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=n*(49561/161280+e*(-179/168+e*(6601661/7257600))),n*=e,this.utg[4]=n*(-4583/161280+e*(108847/3991680)),this.gtu[4]=n*(34729/80640+e*(-3418889/1995840)),n*=e,this.utg[5]=n*(-20648693/638668800),this.gtu[5]=.6650675310896665*n;var r=s(this.cbg,this.lat0);this.Zb=-this.Qn*(r+function(t,e){for(var n,i=2*Math.cos(e),r=t.length-1,o=t[r],a=0;--r>=0;)n=i*o-a+t[r],a=o,o=n;return Math.sin(e)*n}(this.gtu,2*r))}function h(t){var e=(0,c.Z)(t.x-this.long0),n=t.y;n=s(this.cbg,n);var i=Math.sin(n),r=Math.cos(n),l=Math.sin(e),d=Math.cos(e);n=Math.atan2(i,d*r),e=Math.atan2(l*r,(0,o.Z)(i,r*d)),e=a(Math.tan(e));var h,f,p=u(this.gtu,2*n,2*e);return n+=p[0],e+=p[1],Math.abs(e)<=2.623395162778?(h=this.a*(this.Qn*e)+this.x0,f=this.a*(this.Qn*n+this.Zb)+this.y0):(h=1/0,f=1/0),t.x=h,t.y=f,t}function f(t){var e,n,i=(t.x-this.x0)*(1/this.a),a=(t.y-this.y0)*(1/this.a);if(a=(a-this.Zb)/this.Qn,i/=this.Qn,Math.abs(i)<=2.623395162778){var l=u(this.utg,2*a,2*i);a+=l[0],i+=l[1],i=Math.atan((0,r.Z)(i));var d=Math.sin(a),h=Math.cos(a),f=Math.sin(i),p=Math.cos(i);a=Math.atan2(d*p,(0,o.Z)(f,p*h)),i=Math.atan2(f,p*h),e=(0,c.Z)(i+this.long0),n=s(this.cgb,a)}else e=1/0,n=1/0;return t.x=e,t.y=n,t}var p=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"],m={init:d,forward:h,inverse:f,names:p}},9326:function(t,e,n){"use strict";function i(t,e){return Math.pow((1-t)/(1+t),e)}n.r(e),n.d(e,{default:function(){return u},forward:function(){return a},init:function(){return o},inverse:function(){return s},names:function(){return l}});var r=n(8217);function o(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+r.Qg)/(Math.pow(Math.tan(.5*this.lat0+r.Qg),this.C)*i(this.e*t,this.ratexp))}function a(t){var e=t.x,n=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*n+r.Qg),this.C)*i(this.e*Math.sin(n),this.ratexp))-r.pj,t.x=this.C*e,t}function s(t){for(var e=t.x/this.C,n=t.y,o=Math.pow(Math.tan(.5*n+r.Qg)/this.K,1/this.C),a=20;a>0&&(n=2*Math.atan(o*i(this.e*Math.sin(t.y),-.5*this.e))-r.pj,!(Math.abs(n-t.y)<1e-14));--a)t.y=n;return a?(t.x=e,t.y=n,t):null}var l=["gauss"],u={init:o,forward:a,inverse:s,names:l}},1258:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return r},forward:function(){return o},inverse:function(){return a},names:function(){return s}});var i=n(2629);function r(){this.name="geocent"}function o(t){return(0,i.Gu)(t,this.es,this.a)}function a(t){return(0,i.Xu)(t,this.es,this.a,this.b)}var s=["Geocentric","geocentric","geocent","Geocent"];e.default={init:r,forward:o,inverse:a,names:s}},4655:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return a},forward:function(){return s},inverse:function(){return l},names:function(){return u}});var i=n(759),r=n(8348),o=n(8217);function a(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function s(t){var e,n,r,a,s,l,u,c=t.x,d=t.y;return r=(0,i.Z)(c-this.long0),e=Math.sin(d),n=Math.cos(d),a=Math.cos(r),1,(s=this.sin_p14*e+this.cos_p14*n*a)>0||Math.abs(s)<=o.cp?(l=this.x0+1*this.a*n*Math.sin(r)/s,u=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*n*a)/s):(l=this.x0+this.infinity_dist*n*Math.sin(r),u=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*n*a)),t.x=l,t.y=u,t}function l(t){var e,n,o,a,s,l;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(a=Math.atan2(e,this.rc),n=Math.sin(a),o=Math.cos(a),l=(0,r.Z)(o*this.sin_p14+t.y*n*this.cos_p14/e),s=Math.atan2(t.x*n,e*this.cos_p14*o-t.y*this.sin_p14*n),s=(0,i.Z)(this.long0+s)):(l=this.phic0,s=0),t.x=s,t.y=l,t}var u=["gnom"];e.default={init:a,forward:s,inverse:l,names:u}},2653:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return h},forward:function(){return u},init:function(){return l},inverse:function(){return c},names:function(){return d}});var i=n(8217);function r(t,e,n){if(Math.abs(e)>i.pj)return Number.NaN;if(e===i.pj)return Number.POSITIVE_INFINITY;if(e===-1*i.pj)return Number.NEGATIVE_INFINITY;var r=t*n;return Math.log(Math.tan((i.pj+e)/2))+t*Math.log((1-r)/(1+r))/2}var o=n(9507),a=n(4074);function s(t,e){return 2*Math.atan(t*Math.exp(e))-i.pj}function l(){var t=this.b/this.a;this.e=Math.sqrt(1-t*t),this.lc=this.long0,this.rs=Math.sqrt(1+this.e*this.e*Math.pow(Math.cos(this.lat0),4)/(1-this.e*this.e));var e=Math.sin(this.lat0),n=Math.asin(e/this.rs),i=Math.sin(n);this.cp=r(0,n,i)-this.rs*r(this.e,this.lat0,e),this.n2=this.k0*this.a*Math.sqrt(1-this.e*this.e)/(1-this.e*this.e*e*e),this.xs=this.x0,this.ys=this.y0-this.n2*n,this.title||(this.title="Gauss Schreiber transverse mercator")}function u(t){var e=t.x,n=t.y,i=this.rs*(e-this.lc),s=this.cp+this.rs*r(this.e,n,Math.sin(n)),l=Math.asin(Math.sin(i)/(0,a.Z)(s)),u=r(0,l,Math.sin(l));return t.x=this.xs+this.n2*u,t.y=this.ys+this.n2*Math.atan((0,o.Z)(s)/Math.cos(i)),t}function c(t){var e=t.x,n=t.y,i=Math.atan((0,o.Z)((e-this.xs)/this.n2)/Math.cos((n-this.ys)/this.n2)),l=Math.asin(Math.sin((n-this.ys)/this.n2)/(0,a.Z)((e-this.xs)/this.n2)),u=r(0,l,Math.sin(l));return t.x=this.lc+i/this.rs,t.y=function(t,e){var n=s(1,e),i=0,r=0;do{i=n,r=t*Math.sin(i),n=s(Math.exp(t*Math.log((1+r)/(1-r))/2),e)}while(Math.abs(n-i)>1e-12);return n}(this.e,(u-this.cp)/this.rs),t}var d=["gstmerg","gstmerc"],h={init:l,forward:u,inverse:c,names:d}},6235:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return r},forward:function(){return o},inverse:function(){return a},names:function(){return s}});var i=n(759);function r(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function o(t){var e,n,r,o,a,s,l,u=t.x,c=t.y,d=(0,i.Z)(u-this.long0);return e=Math.pow((1+this.e*Math.sin(c))/(1-this.e*Math.sin(c)),this.alfa*this.e/2),n=2*(Math.atan(this.k*Math.pow(Math.tan(c/2+this.s45),this.alfa)/e)-this.s45),r=-d*this.alfa,o=Math.asin(Math.cos(this.ad)*Math.sin(n)+Math.sin(this.ad)*Math.cos(n)*Math.cos(r)),a=Math.asin(Math.cos(n)*Math.sin(r)/Math.cos(o)),s=this.n*a,l=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(o/2+this.s45),this.n),t.y=l*Math.cos(s)/1,t.x=l*Math.sin(s)/1,this.czech||(t.y*=-1,t.x*=-1),t}function a(t){var e,n,i,r,o,a,s,l=t.x;t.x=t.y,t.y=l,this.czech||(t.y*=-1,t.x*=-1),o=Math.sqrt(t.x*t.x+t.y*t.y),r=Math.atan2(t.y,t.x)/Math.sin(this.s0),i=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(i)-Math.sin(this.ad)*Math.cos(i)*Math.cos(r)),n=Math.asin(Math.cos(i)*Math.sin(r)/Math.cos(e)),t.x=this.long0-n/this.alfa,a=e,s=0;var u=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-t.y)<1e-10&&(s=1),a=t.y,u+=1}while(0===s&&u<15);return u>=15?null:t}var s=["Krovak","krovak"];e.default={init:r,forward:o,inverse:a,names:s}},3769:function(t,e,n){"use strict";n.r(e),n.d(e,{S_POLE:function(){return a},N_POLE:function(){return s},EQUIT:function(){return l},OBLIQ:function(){return u},init:function(){return c},forward:function(){return d},inverse:function(){return h},names:function(){return x}});var i=n(8217),r=n(3998),o=n(759),a=1,s=2,l=3,u=4;function c(){var t,e=Math.abs(this.lat0);if(Math.abs(e-i.pj)<i.cp?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(e)<i.cp?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=(0,r.Z)(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,n=[];return n[0]=t*f,e=t*t,n[0]+=e*p,n[1]=e*g,e*=t,n[0]+=e*m,n[1]+=e*v,n[2]=e*y,n}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=(0,r.Z)(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function d(t){var e,n,a,s,l,u,c,d,h,f,p=t.x,m=t.y;if(p=(0,o.Z)(p-this.long0),this.sphere){if(l=Math.sin(m),f=Math.cos(m),a=Math.cos(p),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((n=this.mode===this.EQUIT?1+f*a:1+this.sinph0*l+this.cosph0*f*a)<=i.cp)return null;e=(n=Math.sqrt(2/n))*f*Math.sin(p),n*=this.mode===this.EQUIT?l:this.cosph0*l-this.sinph0*f*a}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(a=-a),Math.abs(m+this.lat0)<i.cp)return null;n=i.Qg-.5*m,e=(n=2*(this.mode===this.S_POLE?Math.cos(n):Math.sin(n)))*Math.sin(p),n*=a}}else{switch(c=0,d=0,h=0,a=Math.cos(p),s=Math.sin(p),l=Math.sin(m),u=(0,r.Z)(this.e,l),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(c=u/this.qp,d=Math.sqrt(1-c*c)),this.mode){case this.OBLIQ:h=1+this.sinb1*c+this.cosb1*d*a;break;case this.EQUIT:h=1+d*a;break;case this.N_POLE:h=i.pj+m,u=this.qp-u;break;case this.S_POLE:h=m-i.pj,u=this.qp+u}if(Math.abs(h)<i.cp)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:h=Math.sqrt(2/h),n=this.mode===this.OBLIQ?this.ymf*h*(this.cosb1*c-this.sinb1*d*a):(h=Math.sqrt(2/(1+d*a)))*c*this.ymf,e=this.xmf*h*d*s;break;case this.N_POLE:case this.S_POLE:u>=0?(e=(h=Math.sqrt(u))*s,n=a*(this.mode===this.S_POLE?h:-h)):e=n=0}}return t.x=this.a*e+this.x0,t.y=this.a*n+this.y0,t}function h(t){t.x-=this.x0,t.y-=this.y0;var e,n,r,a,s,l,u,c,d,h,f=t.x/this.a,p=t.y/this.a;if(this.sphere){var m,g=0,v=0;if((n=.5*(m=Math.sqrt(f*f+p*p)))>1)return null;switch(n=2*Math.asin(n),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(v=Math.sin(n),g=Math.cos(n)),this.mode){case this.EQUIT:n=Math.abs(m)<=i.cp?0:Math.asin(p*v/m),f*=v,p=g*m;break;case this.OBLIQ:n=Math.abs(m)<=i.cp?this.lat0:Math.asin(g*this.sinph0+p*v*this.cosph0/m),f*=v*this.cosph0,p=(g-Math.sin(n)*this.sinph0)*m;break;case this.N_POLE:p=-p,n=i.pj-n;break;case this.S_POLE:n-=i.pj}e=0!==p||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(f,p):0}else{if(u=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(f/=this.dd,p*=this.dd,(l=Math.sqrt(f*f+p*p))<i.cp)return t.x=this.long0,t.y=this.lat0,t;a=2*Math.asin(.5*l/this.rq),r=Math.cos(a),f*=a=Math.sin(a),this.mode===this.OBLIQ?(u=r*this.sinb1+p*a*this.cosb1/l,s=this.qp*u,p=l*this.cosb1*r-p*this.sinb1*a):(u=p*a/l,s=this.qp*u,p=l*r)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(p=-p),!(s=f*f+p*p))return t.x=this.long0,t.y=this.lat0,t;u=1-s/this.qp,this.mode===this.S_POLE&&(u=-u)}e=Math.atan2(f,p),c=Math.asin(u),d=this.apa,h=c+c,n=c+d[0]*Math.sin(h)+d[1]*Math.sin(h+h)+d[2]*Math.sin(h+h+h)}return t.x=(0,o.Z)(this.long0+e),t.y=n,t}var f=.3333333333333333,p=.17222222222222222,m=.10257936507936508,g=.06388888888888888,v=.0664021164021164,y=.016415012942191543;var x=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];e.default={init:c,forward:d,inverse:h,names:x,S_POLE:a,N_POLE:s,EQUIT:l,OBLIQ:u}},9164:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return u},forward:function(){return c},inverse:function(){return d},names:function(){return h}});var i=n(4541),r=n(5346),o=n(7676),a=n(759),s=n(4919),l=n(8217);function u(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<l.cp)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var e=Math.sin(this.lat1),n=Math.cos(this.lat1),o=(0,i.Z)(this.e,e,n),a=(0,r.Z)(this.e,this.lat1,e),s=Math.sin(this.lat2),u=Math.cos(this.lat2),c=(0,i.Z)(this.e,s,u),d=(0,r.Z)(this.e,this.lat2,s),h=(0,r.Z)(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>l.cp?this.ns=Math.log(o/c)/Math.log(a/d):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=o/(this.ns*Math.pow(a,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function c(t){var e=t.x,n=t.y;Math.abs(2*Math.abs(n)-Math.PI)<=l.cp&&(n=(0,o.Z)(n)*(l.pj-2*l.cp));var i,s,u=Math.abs(Math.abs(n)-l.pj);if(u>l.cp)i=(0,r.Z)(this.e,n,Math.sin(n)),s=this.a*this.f0*Math.pow(i,this.ns);else{if((u=n*this.ns)<=0)return null;s=0}var c=this.ns*(0,a.Z)(e-this.long0);return t.x=this.k0*(s*Math.sin(c))+this.x0,t.y=this.k0*(this.rh-s*Math.cos(c))+this.y0,t}function d(t){var e,n,i,r,o,u=(t.x-this.x0)/this.k0,c=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(u*u+c*c),n=1):(e=-Math.sqrt(u*u+c*c),n=-1);var d=0;if(0!==e&&(d=Math.atan2(n*u,n*c)),0!==e||this.ns>0){if(n=1/this.ns,i=Math.pow(e/(this.a*this.f0),n),-9999===(r=(0,s.Z)(this.e,i)))return null}else r=-l.pj;return o=(0,a.Z)(d/this.ns+this.long0),t.x=o,t.y=r,t}var h=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc"];e.default={init:u,forward:c,inverse:d,names:h}},897:function(t,e,n){"use strict";function i(){}function r(t){return t}n.r(e),n.d(e,{init:function(){return i},forward:function(){return r},inverse:function(){return r},names:function(){return o}});var o=["longlat","identity"];e.default={init:i,forward:r,inverse:r,names:o}},9820:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return l},forward:function(){return u},inverse:function(){return c},names:function(){return d}});var i=n(4541),r=n(759),o=n(5346),a=n(4919),s=n(8217);function l(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=(0,i.Z)(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function u(t){var e,n,i=t.x,a=t.y;if(a*s.Pn>90&&a*s.Pn<-90&&i*s.Pn>180&&i*s.Pn<-180)return null;if(Math.abs(Math.abs(a)-s.pj)<=s.cp)return null;if(this.sphere)e=this.x0+this.a*this.k0*(0,r.Z)(i-this.long0),n=this.y0+this.a*this.k0*Math.log(Math.tan(s.Qg+.5*a));else{var l=Math.sin(a),u=(0,o.Z)(this.e,a,l);e=this.x0+this.a*this.k0*(0,r.Z)(i-this.long0),n=this.y0-this.a*this.k0*Math.log(u)}return t.x=e,t.y=n,t}function c(t){var e,n,i=t.x-this.x0,o=t.y-this.y0;if(this.sphere)n=s.pj-2*Math.atan(Math.exp(-o/(this.a*this.k0)));else{var l=Math.exp(-o/(this.a*this.k0));if(-9999===(n=(0,a.Z)(this.e,l)))return null}return e=(0,r.Z)(this.long0+i/(this.a*this.k0)),t.x=e,t.y=n,t}var d=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];e.default={init:l,forward:u,inverse:c,names:d}},7841:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return r},forward:function(){return o},inverse:function(){return a},names:function(){return s}});var i=n(759);function r(){}function o(t){var e=t.x,n=t.y,r=(0,i.Z)(e-this.long0),o=this.x0+this.a*r,a=this.y0+this.a*Math.log(Math.tan(Math.PI/4+n/2.5))*1.25;return t.x=o,t.y=a,t}function a(t){t.x-=this.x0,t.y-=this.y0;var e=(0,i.Z)(this.long0+t.x/this.a),n=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=e,t.y=n,t}var s=["Miller_Cylindrical","mill"];e.default={init:r,forward:o,inverse:a,names:s}},6105:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return o},forward:function(){return a},inverse:function(){return s},names:function(){return l}});var i=n(759),r=n(8217);function o(){}function a(t){for(var e=t.x,n=t.y,o=(0,i.Z)(e-this.long0),a=n,s=Math.PI*Math.sin(n);;){var l=-(a+Math.sin(a)-s)/(1+Math.cos(a));if(a+=l,Math.abs(l)<r.cp)break}a/=2,Math.PI/2-Math.abs(n)<r.cp&&(o=0);var u=.900316316158*this.a*o*Math.cos(a)+this.x0,c=1.4142135623731*this.a*Math.sin(a)+this.y0;return t.x=u,t.y=c,t}function s(t){var e,n;t.x-=this.x0,t.y-=this.y0,n=t.y/(1.4142135623731*this.a),Math.abs(n)>.999999999999&&(n=.999999999999),e=Math.asin(n);var r=(0,i.Z)(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));r<-Math.PI&&(r=-Math.PI),r>Math.PI&&(r=Math.PI),n=(2*e+Math.sin(2*e))/Math.PI,Math.abs(n)>1&&(n=1);var o=Math.asin(n);return t.x=r,t.y=o,t}var l=["Mollweide","moll"];e.default={init:o,forward:a,inverse:s,names:l}},5591:function(t,e,n){"use strict";n.r(e),n.d(e,{iterations:function(){return r},init:function(){return o},forward:function(){return a},inverse:function(){return s},names:function(){return l}});var i=n(8217),r=1;function o(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function a(t){var e,n=t.x,r=t.y-this.lat0,o=n-this.long0,a=r/i.uK*1e-5,s=o,l=1,u=0;for(e=1;e<=10;e++)l*=a,u+=this.A[e]*l;var c,d=u,h=s,f=1,p=0,m=0,g=0;for(e=1;e<=6;e++)c=p*d+f*h,f=f*d-p*h,p=c,m=m+this.B_re[e]*f-this.B_im[e]*p,g=g+this.B_im[e]*f+this.B_re[e]*p;return t.x=g*this.a+this.x0,t.y=m*this.a+this.y0,t}function s(t){var e,n,r=t.x,o=t.y,a=r-this.x0,s=(o-this.y0)/this.a,l=a/this.a,u=1,c=0,d=0,h=0;for(e=1;e<=6;e++)n=c*s+u*l,u=u*s-c*l,c=n,d=d+this.C_re[e]*u-this.C_im[e]*c,h=h+this.C_im[e]*u+this.C_re[e]*c;for(var f=0;f<this.iterations;f++){var p,m=d,g=h,v=s,y=l;for(e=2;e<=6;e++)p=g*d+m*h,m=m*d-g*h,g=p,v+=(e-1)*(this.B_re[e]*m-this.B_im[e]*g),y+=(e-1)*(this.B_im[e]*m+this.B_re[e]*g);m=1,g=0;var x=this.B_re[1],b=this.B_im[1];for(e=2;e<=6;e++)p=g*d+m*h,m=m*d-g*h,g=p,x+=e*(this.B_re[e]*m-this.B_im[e]*g),b+=e*(this.B_im[e]*m+this.B_re[e]*g);var _=x*x+b*b;d=(v*x+y*b)/_,h=(y*x-v*b)/_}var w=d,M=h,A=1,T=0;for(e=1;e<=9;e++)A*=w,T+=this.D[e]*A;var C=this.lat0+T*i.uK*1e5,E=this.long0+M;return t.x=E,t.y=C,t}var l=["New_Zealand_Map_Grid","nzmg"];e.default={init:o,forward:a,inverse:s,names:l}},208:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return l},forward:function(){return u},inverse:function(){return c},names:function(){return d}});var i=n(5346),r=n(759),o=n(4919),a=n(8217),s=1e-7;function l(){var t,e,n,o,l,u,c,d,h,f,p,m,g,v=0,y=0,x=0,b=0,_=0,w=0,M=0;this.no_off=(g="object"==typeof(m=this).PROJECTION?Object.keys(m.PROJECTION)[0]:m.PROJECTION,"no_uoff"in m||"no_off"in m||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(g)),this.no_rot="no_rot"in this;var A=!1;"alpha"in this&&(A=!0);var T=!1;if("rectified_grid_angle"in this&&(T=!0),A&&(M=this.alpha),T&&(v=this.rectified_grid_angle*a.Qx),A||T)y=this.longc;else if(x=this.long1,_=this.lat1,b=this.long2,w=this.lat2,Math.abs(_-w)<=s||(t=Math.abs(_))<=s||Math.abs(t-a.pj)<=s||Math.abs(Math.abs(this.lat0)-a.pj)<=s||Math.abs(Math.abs(w)-a.pj)<=s)throw new Error;var C=1-this.es;e=Math.sqrt(C),Math.abs(this.lat0)>a.cp?(d=Math.sin(this.lat0),n=Math.cos(this.lat0),t=1-this.es*d*d,this.B=n*n,this.B=Math.sqrt(1+this.es*this.B*this.B/C),this.A=this.B*this.k0*e/t,(l=(o=this.B*e/(n*Math.sqrt(t)))*o-1)<=0?l=0:(l=Math.sqrt(l),this.lat0<0&&(l=-l)),this.E=l+=o,this.E*=Math.pow((0,i.Z)(this.e,this.lat0,d),this.B)):(this.B=1/e,this.A=this.k0,this.E=o=l=1),A||T?(A?(p=Math.asin(Math.sin(M)/o),T||(v=M)):(p=v,M=Math.asin(o*Math.sin(p))),this.lam0=y-Math.asin(.5*(l-1/l)*Math.tan(p))/this.B):(u=Math.pow((0,i.Z)(this.e,_,Math.sin(_)),this.B),c=Math.pow((0,i.Z)(this.e,w,Math.sin(w)),this.B),l=this.E/u,h=(c-u)/(c+u),f=((f=this.E*this.E)-c*u)/(f+c*u),(t=x-b)<-Math.pi?b-=a.uo:t>Math.pi&&(b+=a.uo),this.lam0=(0,r.Z)(.5*(x+b)-Math.atan(f*Math.tan(.5*this.B*(x-b))/h)/this.B),p=Math.atan(2*Math.sin(this.B*(0,r.Z)(x-this.lam0))/(l-1/l)),v=M=Math.asin(o*Math.sin(p))),this.singam=Math.sin(p),this.cosgam=Math.cos(p),this.sinrot=Math.sin(v),this.cosrot=Math.cos(v),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(o*o-1)/Math.cos(M))),this.lat0<0&&(this.u_0=-this.u_0)),l=.5*p,this.v_pole_n=this.ArB*Math.log(Math.tan(a.Qg-l)),this.v_pole_s=this.ArB*Math.log(Math.tan(a.Qg+l))}function u(t){var e,n,r,o,l,u,c,d,h={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-a.pj)>a.cp){if(e=.5*((l=this.E/Math.pow((0,i.Z)(this.e,t.y,Math.sin(t.y)),this.B))-(u=1/l)),n=.5*(l+u),o=Math.sin(this.B*t.x),r=(e*this.singam-o*this.cosgam)/n,Math.abs(Math.abs(r)-1)<a.cp)throw new Error;d=.5*this.ArB*Math.log((1-r)/(1+r)),u=Math.cos(this.B*t.x),c=Math.abs(u)<s?this.A*t.x:this.ArB*Math.atan2(e*this.cosgam+o*this.singam,u)}else d=t.y>0?this.v_pole_n:this.v_pole_s,c=this.ArB*t.y;return this.no_rot?(h.x=c,h.y=d):(c-=this.u_0,h.x=d*this.cosrot+c*this.sinrot,h.y=c*this.cosrot-d*this.sinrot),h.x=this.a*h.x+this.x0,h.y=this.a*h.y+this.y0,h}function c(t){var e,n,i,r,s,l,u,c={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(n=t.y,e=t.x):(n=t.x*this.cosrot-t.y*this.sinrot,e=t.y*this.cosrot+t.x*this.sinrot+this.u_0),r=.5*((i=Math.exp(-this.BrA*n))-1/i),s=.5*(i+1/i),u=((l=Math.sin(this.BrA*e))*this.cosgam+r*this.singam)/s,Math.abs(Math.abs(u)-1)<a.cp)c.x=0,c.y=u<0?-a.pj:a.pj;else{if(c.y=this.E/Math.sqrt((1+u)/(1-u)),c.y=(0,o.Z)(this.e,Math.pow(c.y,1/this.B)),c.y===1/0)throw new Error;c.x=-this.rB*Math.atan2(r*this.cosgam-l*this.singam,Math.cos(this.BrA*e))}return c.x+=this.lam0,c}var d=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];e.default={init:l,forward:u,inverse:c,names:d}},2310:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return a},forward:function(){return s},inverse:function(){return l},names:function(){return u}});var i=n(759),r=n(8348),o=n(8217);function a(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function s(t){var e,n,r,a,s,l,u,c=t.x,d=t.y;return r=(0,i.Z)(c-this.long0),e=Math.sin(d),n=Math.cos(d),a=Math.cos(r),1,((s=this.sin_p14*e+this.cos_p14*n*a)>0||Math.abs(s)<=o.cp)&&(l=1*this.a*n*Math.sin(r),u=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*n*a)),t.x=l,t.y=u,t}function l(t){var e,n,a,s,l,u,c;return t.x-=this.x0,t.y-=this.y0,e=Math.sqrt(t.x*t.x+t.y*t.y),n=(0,r.Z)(e/this.a),a=Math.sin(n),s=Math.cos(n),u=this.long0,Math.abs(e)<=o.cp?(c=this.lat0,t.x=u,t.y=c,t):(c=(0,r.Z)(s*this.sin_p14+t.y*a*this.cos_p14/e),l=Math.abs(this.lat0)-o.pj,Math.abs(l)<=o.cp?(u=this.lat0>=0?(0,i.Z)(this.long0+Math.atan2(t.x,-t.y)):(0,i.Z)(this.long0-Math.atan2(-t.x,t.y)),t.x=u,t.y=c,t):(u=(0,i.Z)(this.long0+Math.atan2(t.x*a,e*this.cos_p14*s-t.y*this.sin_p14*a)),t.x=u,t.y=c,t))}var u=["ortho"];e.default={init:a,forward:s,inverse:l,names:u}},6089:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return h},forward:function(){return f},inverse:function(){return p},names:function(){return m}});var i=n(8053),r=n(7743),o=n(9032),a=n(7325),s=n(759),l=n(6886),u=n(3464),c=n(8217),d=n(918);function h(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=(0,i.Z)(this.es),this.e1=(0,r.Z)(this.es),this.e2=(0,o.Z)(this.es),this.e3=(0,a.Z)(this.es),this.ml0=this.a*(0,u.Z)(this.e0,this.e1,this.e2,this.e3,this.lat0)}function f(t){var e,n,i,r=t.x,o=t.y,a=(0,s.Z)(r-this.long0);if(i=a*Math.sin(o),this.sphere)Math.abs(o)<=c.cp?(e=this.a*a,n=-1*this.a*this.lat0):(e=this.a*Math.sin(i)/Math.tan(o),n=this.a*((0,l.Z)(o-this.lat0)+(1-Math.cos(i))/Math.tan(o)));else if(Math.abs(o)<=c.cp)e=this.a*a,n=-1*this.ml0;else{var h=(0,d.Z)(this.a,this.e,Math.sin(o))/Math.tan(o);e=h*Math.sin(i),n=this.a*(0,u.Z)(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+h*(1-Math.cos(i))}return t.x=e+this.x0,t.y=n+this.y0,t}function p(t){var e,n,i,r,o,a,l,d,h;if(i=t.x-this.x0,r=t.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=c.cp)e=(0,s.Z)(i/this.a+this.long0),n=0;else{var f;for(a=this.lat0+r/this.a,l=i*i/this.a/this.a+a*a,d=a,o=20;o;--o)if(d+=h=-1*(a*(d*(f=Math.tan(d))+1)-d-.5*(d*d+l)*f)/((d-a)/f-1),Math.abs(h)<=c.cp){n=d;break}e=(0,s.Z)(this.long0+Math.asin(i*Math.tan(d)/this.a)/Math.sin(n))}else if(Math.abs(r+this.ml0)<=c.cp)n=0,e=(0,s.Z)(this.long0+i/this.a);else{var p,m,g,v,y;for(a=(this.ml0+r)/this.a,l=i*i/this.a/this.a+a*a,d=a,o=20;o;--o)if(y=this.e*Math.sin(d),p=Math.sqrt(1-y*y)*Math.tan(d),m=this.a*(0,u.Z)(this.e0,this.e1,this.e2,this.e3,d),g=this.e0-2*this.e1*Math.cos(2*d)+4*this.e2*Math.cos(4*d)-6*this.e3*Math.cos(6*d),d-=h=(a*(p*(v=m/this.a)+1)-v-.5*p*(v*v+l))/(this.es*Math.sin(2*d)*(v*v+l-2*a*v)/(4*p)+(a-v)*(p*g-2/Math.sin(2*d))-g),Math.abs(h)<=c.cp){n=d;break}p=Math.sqrt(1-this.es*Math.pow(Math.sin(n),2))*Math.tan(n),e=(0,s.Z)(this.long0+Math.asin(i*p/this.a)/Math.sin(n))}return t.x=e,t.y=n,t}var m=["Polyconic","poly"];e.default={init:h,forward:f,inverse:p,names:m}},4689:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return p},forward:function(){return m},inverse:function(){return g},names:function(){return x}});var i=n(8217),r=1,o=2,a=3,s=4,l=5,u=6,c=1,d=2,h=3,f=4;function p(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=i.pj-i.Qg/2?this.face=l:this.lat0<=-(i.pj-i.Qg/2)?this.face=u:Math.abs(this.long0)<=i.Qg?this.face=r:Math.abs(this.long0)<=i.pj+i.Qg?this.face=this.long0>0?o:s:this.face=a,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function m(t){var e,n,p,m,g,x,b={x:0,y:0},_={value:0};if(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,n=t.x,this.face===l)m=i.pj-e,n>=i.Qg&&n<=i.pj+i.Qg?(_.value=c,p=n-i.pj):n>i.pj+i.Qg||n<=-(i.pj+i.Qg)?(_.value=d,p=n>0?n-i.U2:n+i.U2):n>-(i.pj+i.Qg)&&n<=-i.Qg?(_.value=h,p=n+i.pj):(_.value=f,p=n);else if(this.face===u)m=i.pj+e,n>=i.Qg&&n<=i.pj+i.Qg?(_.value=c,p=-n+i.pj):n<i.Qg&&n>=-i.Qg?(_.value=d,p=-n):n<-i.Qg&&n>=-(i.pj+i.Qg)?(_.value=h,p=-n-i.pj):(_.value=f,p=n>0?-n+i.U2:-n-i.U2);else{var w,M,A,T,C,E;this.face===o?n=y(n,+i.pj):this.face===a?n=y(n,+i.U2):this.face===s&&(n=y(n,-i.pj)),T=Math.sin(e),C=Math.cos(e),E=Math.sin(n),w=C*Math.cos(n),M=C*E,A=T,this.face===r?p=v(m=Math.acos(w),A,M,_):this.face===o?p=v(m=Math.acos(M),A,-w,_):this.face===a?p=v(m=Math.acos(-w),A,-M,_):this.face===s?p=v(m=Math.acos(-M),A,w,_):(m=p=0,_.value=c)}return x=Math.atan(12/i.U2*(p+Math.acos(Math.sin(p)*Math.cos(i.Qg))-i.pj)),g=Math.sqrt((1-Math.cos(m))/(Math.cos(x)*Math.cos(x))/(1-Math.cos(Math.atan(1/Math.cos(p))))),_.value===d?x+=i.pj:_.value===h?x+=i.U2:_.value===f&&(x+=1.5*i.U2),b.x=g*Math.cos(x),b.y=g*Math.sin(x),b.x=b.x*this.a+this.x0,b.y=b.y*this.a+this.y0,t.x=b.x,t.y=b.y,t}function g(t){var e,n,r,p,m,g,v,x,b,_,w,M,A={lam:0,phi:0},T={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,n=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),e=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?T.value=c:t.y>=0&&t.y>=Math.abs(t.x)?(T.value=d,e-=i.pj):t.x<0&&-t.x>=Math.abs(t.y)?(T.value=h,e=e<0?e+i.U2:e-i.U2):(T.value=f,e+=i.pj),b=i.U2/12*Math.tan(e),m=Math.sin(b)/(Math.cos(b)-1/Math.sqrt(2)),g=Math.atan(m),(v=1-(r=Math.cos(e))*r*(p=Math.tan(n))*p*(1-Math.cos(Math.atan(1/Math.cos(g)))))<-1?v=-1:v>1&&(v=1),this.face===l)x=Math.acos(v),A.phi=i.pj-x,T.value===c?A.lam=g+i.pj:T.value===d?A.lam=g<0?g+i.U2:g-i.U2:T.value===h?A.lam=g-i.pj:A.lam=g;else if(this.face===u)x=Math.acos(v),A.phi=x-i.pj,T.value===c?A.lam=-g+i.pj:T.value===d?A.lam=-g:T.value===h?A.lam=-g-i.pj:A.lam=g<0?-g-i.U2:-g+i.U2;else{var C,E,S;b=(C=v)*C,E=(b+=(S=b>=1?0:Math.sqrt(1-b)*Math.sin(g))*S)>=1?0:Math.sqrt(1-b),T.value===d?(b=E,E=-S,S=b):T.value===h?(E=-E,S=-S):T.value===f&&(b=E,E=S,S=-b),this.face===o?(b=C,C=-E,E=b):this.face===a?(C=-C,E=-E):this.face===s&&(b=C,C=E,E=-b),A.phi=Math.acos(-S)-i.pj,A.lam=Math.atan2(E,C),this.face===o?A.lam=y(A.lam,-i.pj):this.face===a?A.lam=y(A.lam,-i.U2):this.face===s&&(A.lam=y(A.lam,+i.pj))}0!==this.es&&(_=A.phi<0?1:0,w=Math.tan(A.phi),M=this.b/Math.sqrt(w*w+this.one_minus_f_squared),A.phi=Math.atan(Math.sqrt(this.a*this.a-M*M)/(this.one_minus_f*M)),_&&(A.phi=-A.phi));return A.lam+=this.long0,t.x=A.lam,t.y=A.phi,t}function v(t,e,n,r){var o;return t<i.cp?(r.value=c,o=0):(o=Math.atan2(e,n),Math.abs(o)<=i.Qg?r.value=c:o>i.Qg&&o<=i.pj+i.Qg?(r.value=d,o-=i.pj):o>i.pj+i.Qg||o<=-(i.pj+i.Qg)?(r.value=h,o=o>=0?o-i.U2:o+i.U2):(r.value=f,o+=i.pj)),o}function y(t,e){var n=t+e;return n<-i.U2?n+=i.uo:n>+i.U2&&(n-=i.uo),n}var x=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];e.default={init:p,forward:m,inverse:g,names:x}},4402:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return f},forward:function(){return p},inverse:function(){return m},names:function(){return g}});var i=n(8217),r=n(759),o=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],a=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],s=.8487,l=1.3523,u=i.Pn/5,c=1/u,d=18,h=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))};function f(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function p(t){var e=(0,r.Z)(t.x-this.long0),n=Math.abs(t.y),f=Math.floor(n*u);f<0?f=0:f>=d&&(f=17),n=i.Pn*(n-c*f);var p={x:h(o[f],n)*e,y:h(a[f],n)};return t.y<0&&(p.y=-p.y),p.x=p.x*this.a*s+this.x0,p.y=p.y*this.a*l+this.y0,p}function m(t){var e={x:(t.x-this.x0)/(this.a*s),y:Math.abs(t.y-this.y0)/(this.a*l)};if(e.y>=1)e.x/=o[18][0],e.y=t.y<0?-i.pj:i.pj;else{var n=Math.floor(e.y*d);for(n<0?n=0:n>=d&&(n=17);;)if(a[n][0]>e.y)--n;else{if(!(a[n+1][0]<=e.y))break;++n}var u=a[n],c=5*(e.y-u[0])/(a[n+1][0]-u[0]);c=function(t,e,n,i){for(var r=e;i;--i){var o=t(r);if(r-=o,Math.abs(o)<n)break}return r}((function(t){return(h(u,t)-e.y)/function(t,e){return t[1]+e*(2*t[2]+3*e*t[3])}(u,t)}),c,i.cp,100),e.x/=h(o[n],c),e.y=(5*n+c)*i.Qx,t.y<0&&(e.y=-e.y)}return e.x=(0,r.Z)(e.x+this.long0),e}var g=["Robinson","robin"];e.default={init:f,forward:p,inverse:m,names:g}},9926:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return c},forward:function(){return d},inverse:function(){return h},names:function(){return f}});var i=n(759),r=n(6886),o=n(5054),a=n(5386),s=n(6574),l=n(8217),u=n(8348);function c(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=(0,o.Z)(this.es)}function d(t){var e,n,r=t.x,o=t.y;if(r=(0,i.Z)(r-this.long0),this.sphere){if(this.m)for(var s=this.n*Math.sin(o),u=20;u;--u){var c=(this.m*o+Math.sin(o)-s)/(this.m+Math.cos(o));if(o-=c,Math.abs(c)<l.cp)break}else o=1!==this.n?Math.asin(this.n*Math.sin(o)):o;e=this.a*this.C_x*r*(this.m+Math.cos(o)),n=this.a*this.C_y*o}else{var d=Math.sin(o),h=Math.cos(o);n=this.a*(0,a.Z)(o,d,h,this.en),e=this.a*r*h/Math.sqrt(1-this.es*d*d)}return t.x=e,t.y=n,t}function h(t){var e,n,o,a;return t.x-=this.x0,o=t.x/this.a,t.y-=this.y0,e=t.y/this.a,this.sphere?(e/=this.C_y,o/=this.C_x*(this.m+Math.cos(e)),this.m?e=(0,u.Z)((this.m*e+Math.sin(e))/this.n):1!==this.n&&(e=(0,u.Z)(Math.sin(e)/this.n)),o=(0,i.Z)(o+this.long0),e=(0,r.Z)(e)):(e=(0,s.Z)(t.y/this.a,this.es,this.en),(a=Math.abs(e))<l.pj?(a=Math.sin(e),n=this.long0+t.x*Math.sqrt(1-this.es*a*a)/(this.a*Math.cos(e)),o=(0,i.Z)(n)):a-l.cp<l.pj&&(o=this.long0)),t.x=o,t.y=e,t}var f=["Sinusoidal","sinu"];e.default={init:c,forward:d,inverse:h,names:f}},4176:function(t,e,n){"use strict";function i(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),n=this.a,i=1/this.rf,r=2*i-Math.pow(i,2),o=this.e=Math.sqrt(r);this.R=this.k0*n*Math.sqrt(1-r)/(1-r*Math.pow(e,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+t/2)),l=Math.log((1+o*e)/(1-o*e));this.K=a-this.alpha*s+this.alpha*o/2*l}function r(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),n=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),i=-this.alpha*(e+n)+this.K,r=2*(Math.atan(Math.exp(i))-Math.PI/4),o=this.alpha*(t.x-this.lambda0),a=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(o))),s=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(o));return t.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,t.x=this.R*a+this.x0,t}function o(t){for(var e=t.x-this.x0,n=t.y-this.y0,i=e/this.R,r=2*(Math.atan(Math.exp(n/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(i)),a=Math.atan(Math.sin(i)/(Math.cos(this.b0)*Math.cos(i)-Math.sin(this.b0)*Math.tan(r))),s=this.lambda0+a/this.alpha,l=0,u=o,c=-1e3,d=0;Math.abs(u-c)>1e-7;){if(++d>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2)),c=u,u=2*Math.atan(Math.exp(l))-Math.PI/2}return t.x=s,t.y=u,t}n.r(e),n.d(e,{init:function(){return i},forward:function(){return r},inverse:function(){return o},names:function(){return a}});var a=["somerc"];e.default={init:i,forward:r,inverse:o,names:a}},7983:function(t,e,n){"use strict";n.r(e),n.d(e,{ssfn_:function(){return u},init:function(){return c},forward:function(){return d},inverse:function(){return h},names:function(){return f}});var i=n(8217),r=n(7676),o=n(4541),a=n(5346),s=n(4919),l=n(759);function u(t,e,n){return e*=n,Math.tan(.5*(i.pj+t))*Math.pow((1-e)/(1+e),.5*n)}function c(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=i.cp&&(this.k0=.5*(1+(0,r.Z)(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=i.cp&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=i.cp&&(this.k0=.5*this.cons*(0,o.Z)(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/(0,a.Z)(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=(0,o.Z)(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-i.pj,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function d(t){var e,n,r,o,s,u,c=t.x,d=t.y,h=Math.sin(d),f=Math.cos(d),p=(0,l.Z)(c-this.long0);return Math.abs(Math.abs(c-this.long0)-Math.PI)<=i.cp&&Math.abs(d+this.lat0)<=i.cp?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*h+this.coslat0*f*Math.cos(p)),t.x=this.a*e*f*Math.sin(p)+this.x0,t.y=this.a*e*(this.coslat0*h-this.sinlat0*f*Math.cos(p))+this.y0,t):(n=2*Math.atan(this.ssfn_(d,h,this.e))-i.pj,o=Math.cos(n),r=Math.sin(n),Math.abs(this.coslat0)<=i.cp?(s=(0,a.Z)(this.e,d*this.con,this.con*h),u=2*this.a*this.k0*s/this.cons,t.x=this.x0+u*Math.sin(c-this.long0),t.y=this.y0-this.con*u*Math.cos(c-this.long0),t):(Math.abs(this.sinlat0)<i.cp?(e=2*this.a*this.k0/(1+o*Math.cos(p)),t.y=e*r):(e=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*r+this.cosX0*o*Math.cos(p))),t.y=e*(this.cosX0*r-this.sinX0*o*Math.cos(p))+this.y0),t.x=e*o*Math.sin(p)+this.x0,t))}function h(t){var e,n,r,o,a;t.x-=this.x0,t.y-=this.y0;var u=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var c=2*Math.atan(u/(2*this.a*this.k0));return e=this.long0,n=this.lat0,u<=i.cp?(t.x=e,t.y=n,t):(n=Math.asin(Math.cos(c)*this.sinlat0+t.y*Math.sin(c)*this.coslat0/u),e=Math.abs(this.coslat0)<i.cp?this.lat0>0?(0,l.Z)(this.long0+Math.atan2(t.x,-1*t.y)):(0,l.Z)(this.long0+Math.atan2(t.x,t.y)):(0,l.Z)(this.long0+Math.atan2(t.x*Math.sin(c),u*this.coslat0*Math.cos(c)-t.y*this.sinlat0*Math.sin(c))),t.x=e,t.y=n,t)}if(Math.abs(this.coslat0)<=i.cp){if(u<=i.cp)return n=this.lat0,e=this.long0,t.x=e,t.y=n,t;t.x*=this.con,t.y*=this.con,r=u*this.cons/(2*this.a*this.k0),n=this.con*(0,s.Z)(this.e,r),e=this.con*(0,l.Z)(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else o=2*Math.atan(u*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,u<=i.cp?a=this.X0:(a=Math.asin(Math.cos(o)*this.sinX0+t.y*Math.sin(o)*this.cosX0/u),e=(0,l.Z)(this.long0+Math.atan2(t.x*Math.sin(o),u*this.cosX0*Math.cos(o)-t.y*this.sinX0*Math.sin(o)))),n=-1*(0,s.Z)(this.e,Math.tan(.5*(i.pj+a)));return t.x=e,t.y=n,t}var f=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"];e.default={init:c,forward:d,inverse:h,names:f,ssfn_:u}},9936:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return o},forward:function(){return a},inverse:function(){return s},names:function(){return l}});var i=n(9326),r=n(759);function o(){i.default.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function a(t){var e,n,o,a;return t.x=(0,r.Z)(t.x-this.long0),i.default.forward.apply(this,[t]),e=Math.sin(t.y),n=Math.cos(t.y),o=Math.cos(t.x),a=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*n*o),t.x=a*n*Math.sin(t.x),t.y=a*(this.cosc0*e-this.sinc0*n*o),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function s(t){var e,n,o,a,s;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,s=Math.sqrt(t.x*t.x+t.y*t.y)){var l=2*Math.atan2(s,this.R2);e=Math.sin(l),n=Math.cos(l),a=Math.asin(n*this.sinc0+t.y*e*this.cosc0/s),o=Math.atan2(t.x*e,s*this.cosc0*n-t.y*this.sinc0*e)}else a=this.phic0,o=0;return t.x=o,t.y=a,i.default.inverse.apply(this,[t]),t.x=(0,r.Z)(t.x+this.long0),t}var l=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];e.default={init:o,forward:a,inverse:s,names:l}},3157:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return u},forward:function(){return c},inverse:function(){return d},names:function(){return h}});var i=n(5054),r=n(5386),o=n(6574),a=n(759),s=n(8217),l=n(7676);function u(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=(0,i.Z)(this.es),this.ml0=(0,r.Z)(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function c(t){var e,n,i,o=t.x,l=t.y,u=(0,a.Z)(o-this.long0),c=Math.sin(l),d=Math.cos(l);if(this.es){var h=d*u,f=Math.pow(h,2),p=this.ep2*Math.pow(d,2),m=Math.pow(p,2),g=Math.abs(d)>s.cp?Math.tan(l):0,v=Math.pow(g,2),y=Math.pow(v,2);e=1-this.es*Math.pow(c,2),h/=Math.sqrt(e);var x=(0,r.Z)(l,c,d,this.en);n=this.a*(this.k0*h*(1+f/6*(1-v+p+f/20*(5-18*v+y+14*p-58*v*p+f/42*(61+179*y-y*v-479*v)))))+this.x0,i=this.a*(this.k0*(x-this.ml0+c*u*h/2*(1+f/12*(5-v+9*p+4*m+f/30*(61+y-58*v+270*p-330*v*p+f/56*(1385+543*y-y*v-3111*v))))))+this.y0}else{var b=d*Math.sin(u);if(Math.abs(Math.abs(b)-1)<s.cp)return 93;if(n=.5*this.a*this.k0*Math.log((1+b)/(1-b))+this.x0,i=d*Math.cos(u)/Math.sqrt(1-Math.pow(b,2)),(b=Math.abs(i))>=1){if(b-1>s.cp)return 93;i=0}else i=Math.acos(i);l<0&&(i=-i),i=this.a*this.k0*(i-this.lat0)+this.y0}return t.x=n,t.y=i,t}function d(t){var e,n,i,r,u=(t.x-this.x0)*(1/this.a),c=(t.y-this.y0)*(1/this.a);if(this.es)if(e=this.ml0+c/this.k0,n=(0,o.Z)(e,this.es,this.en),Math.abs(n)<s.pj){var d=Math.sin(n),h=Math.cos(n),f=Math.abs(h)>s.cp?Math.tan(n):0,p=this.ep2*Math.pow(h,2),m=Math.pow(p,2),g=Math.pow(f,2),v=Math.pow(g,2);e=1-this.es*Math.pow(d,2);var y=u*Math.sqrt(e)/this.k0,x=Math.pow(y,2);i=n-(e*=f)*x/(1-this.es)*.5*(1-x/12*(5+3*g-9*p*g+p-4*m-x/30*(61+90*g-252*p*g+45*v+46*p-x/56*(1385+3633*g+4095*v+1574*v*g)))),r=(0,a.Z)(this.long0+y*(1-x/6*(1+2*g+p-x/20*(5+28*g+24*v+8*p*g+6*p-x/42*(61+662*g+1320*v+720*v*g))))/h)}else i=s.pj*(0,l.Z)(c),r=0;else{var b=Math.exp(u/this.k0),_=.5*(b-1/b),w=this.lat0+c/this.k0,M=Math.cos(w);e=Math.sqrt((1-Math.pow(M,2))/(1+Math.pow(_,2))),i=Math.asin(e),c<0&&(i=-i),r=0===_&&0===M?0:(0,a.Z)(Math.atan2(_,M)+this.long0)}return t.x=r,t.y=i,t}var h=["Fast_Transverse_Mercator","Fast Transverse Mercator"];e.default={init:u,forward:c,inverse:d,names:h}},6470:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return c},forward:function(){return d},inverse:function(){return h},names:function(){return f}});var i=n(8217),r=n(110),o=0,a=1,s=2,l=3,u={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function c(){if(Object.keys(u).forEach(function(t){if(void 0===this[t])this[t]=u[t].def;else{if(u[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);u[t].num&&(this[t]=parseFloat(this[t]))}u[t].degrees&&(this[t]=this[t]*i.Qx)}.bind(this)),Math.abs(Math.abs(this.lat0)-i.pj)<i.cp?this.mode=this.lat0<0?a:o:Math.abs(this.lat0)<i.cp?this.mode=s:(this.mode=l,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(t),this.sw=Math.sin(t)}function d(t){t.x-=this.long0;var e,n,i,r,u=Math.sin(t.y),c=Math.cos(t.y),d=Math.cos(t.x);switch(this.mode){case l:n=this.sinph0*u+this.cosph0*c*d;break;case s:n=c*d;break;case a:n=-u;break;case o:n=u}switch(e=(n=this.pn1/(this.p-n))*c*Math.sin(t.x),this.mode){case l:n*=this.cosph0*u-this.sinph0*c*d;break;case s:n*=u;break;case o:n*=-c*d;break;case a:n*=c*d}return r=1/((i=n*this.cg+e*this.sg)*this.sw*this.h1+this.cw),e=(e*this.cg-n*this.sg)*this.cw*r,n=i*r,t.x=e*this.a,t.y=n*this.a,t}function h(t){t.x/=this.a,t.y/=this.a;var e,n,u,c={x:t.x,y:t.y};u=1/(this.pn1-t.y*this.sw),e=this.pn1*t.x*u,n=this.pn1*t.y*this.cw*u,t.x=e*this.cg+n*this.sg,t.y=n*this.cg-e*this.sg;var d=(0,r.Z)(t.x,t.y);if(Math.abs(d)<i.cp)c.x=0,c.y=t.y;else{var h,f;switch(f=1-d*d*this.pfact,f=(this.p-Math.sqrt(f))/(this.pn1/d+d/this.pn1),h=Math.sqrt(1-f*f),this.mode){case l:c.y=Math.asin(h*this.sinph0+t.y*f*this.cosph0/d),t.y=(h-this.sinph0*Math.sin(c.y))*d,t.x*=f*this.cosph0;break;case s:c.y=Math.asin(t.y*f/d),t.y=h*d,t.x*=f;break;case o:c.y=Math.asin(h),t.y=-t.y;break;case a:c.y=-Math.asin(h)}c.x=Math.atan2(t.x,t.y)}return t.x=c.x+this.long0,t.y=c.y,t}var f=["Tilted_Perspective","tpers"];e.default={init:c,forward:d,inverse:h,names:f}},973:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return u},dependsOn:function(){return a},init:function(){return s},names:function(){return l}});var i=n(759);var r=n(516),o=n(8217),a="etmerc";function s(){var t=function(t,e){if(void 0===t){if((t=Math.floor(30*((0,i.Z)(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*o.Qx,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,r.default.init.apply(this),this.forward=r.default.forward,this.inverse=r.default.inverse}var l=["Universal Transverse Mercator System","utm"],u={init:s,names:l,dependsOn:a}},604:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return a},forward:function(){return s},inverse:function(){return l},names:function(){return u}});var i=n(759),r=n(8217),o=n(8348);function a(){this.R=this.a}function s(t){var e,n,a=t.x,s=t.y,l=(0,i.Z)(a-this.long0);Math.abs(s)<=r.cp&&(e=this.x0+this.R*l,n=this.y0);var u=(0,o.Z)(2*Math.abs(s/Math.PI));(Math.abs(l)<=r.cp||Math.abs(Math.abs(s)-r.pj)<=r.cp)&&(e=this.x0,n=s>=0?this.y0+Math.PI*this.R*Math.tan(.5*u):this.y0+Math.PI*this.R*-Math.tan(.5*u));var c=.5*Math.abs(Math.PI/l-l/Math.PI),d=c*c,h=Math.sin(u),f=Math.cos(u),p=f/(h+f-1),m=p*p,g=p*(2/h-1),v=g*g,y=Math.PI*this.R*(c*(p-v)+Math.sqrt(d*(p-v)*(p-v)-(v+d)*(m-v)))/(v+d);l<0&&(y=-y),e=this.x0+y;var x=d+p;return y=Math.PI*this.R*(g*x-c*Math.sqrt((v+d)*(d+1)-x*x))/(v+d),n=s>=0?this.y0+y:this.y0-y,t.x=e,t.y=n,t}function l(t){var e,n,o,a,s,l,u,c,d,h,f,p;return t.x-=this.x0,t.y-=this.y0,f=Math.PI*this.R,s=(o=t.x/f)*o+(a=t.y/f)*a,f=3*(a*a/(c=-2*(l=-Math.abs(a)*(1+s))+1+2*a*a+s*s)+(2*(u=l-2*a*a+o*o)*u*u/c/c/c-9*l*u/c/c)/27)/(d=(l-u*u/3/c)/c)/(h=2*Math.sqrt(-d/3)),Math.abs(f)>1&&(f=f>=0?1:-1),p=Math.acos(f)/3,n=t.y>=0?(-h*Math.cos(p+Math.PI/3)-u/3/c)*Math.PI:-(-h*Math.cos(p+Math.PI/3)-u/3/c)*Math.PI,e=Math.abs(o)<r.cp?this.long0:(0,i.Z)(this.long0+Math.PI*(s-1+Math.sqrt(1+2*(o*o-a*a)+s*s))/2/o),t.x=e,t.y=n,t}var u=["Van_der_Grinten_I","VanDerGrinten","vandg"];e.default={init:a,forward:s,inverse:l,names:u}},1103:function(t,e,n){var i={"./aea.js":9816,"./aeqd.js":2765,"./cass.js":5234,"./cea.js":7712,"./eqc.js":1941,"./eqdc.js":245,"./equi.js":1903,"./etmerc.js":516,"./gauss.js":9326,"./geocent.js":1258,"./gnom.js":4655,"./gstmerc.js":2653,"./krovak.js":6235,"./laea.js":3769,"./lcc.js":9164,"./longlat.js":897,"./merc.js":9820,"./mill.js":7841,"./moll.js":6105,"./nzmg.js":5591,"./omerc.js":208,"./ortho.js":2310,"./poly.js":6089,"./qsc.js":4689,"./robin.js":4402,"./sinu.js":9926,"./somerc.js":4176,"./stere.js":7983,"./sterea.js":9936,"./tmerc.js":3157,"./tpers.js":6470,"./utm.js":973,"./vandg.js":604};function r(t){var e=o(t);return n(e)}function o(t){if(!n.o(i,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return i[t]}r.keys=function(){return Object.keys(i)},r.resolve=o,t.exports=r,r.id=1103},9162:function(t){t.exports="/* lineFeature fragment shader */\n\n#ifdef GL_ES\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n #else\n precision mediump float;\n #endif\n#endif\nvarying vec4 strokeColorVar;\nvarying vec4 subpos;\nvarying vec4 info;\nvarying vec4 angles;\nuniform float antialiasing;\nuniform float miterLimit;\nuniform float fixedFlags;\n\nvoid main () {\n vec4 color = strokeColorVar;\n float opacity = 1.0;\n int nearMode = int(floor(info.x + 0.5));\n int farMode = int(floor(info.y + 0.5));\n float cosABC = angles.x;\n float sinABC = angles.y;\n float cosBCD = angles.z;\n float sinBCD = angles.w;\n // never render on the opposite side of a miter. This uses a bit of\n // slop, via pow(smoothstep()) instead of step(), since there are\n // precision issues in this calculation. This doesn't wholly solve\n // the precision issue; sometimes pixels are missed or double\n // rendered along the inside seam of a miter.\n if (nearMode >= 4) {\n float dist = cosABC * subpos.x - sinABC * subpos.y;\n opacity = min(opacity, pow(smoothstep(-0.02, 0.02, dist), 0.5));\n if (opacity == 0.0) {\n discard;\n }\n }\n if (farMode >= 4) {\n float dist = cosBCD * subpos.z - sinBCD * subpos.y;\n opacity = min(opacity, pow(smoothstep(-0.02, 0.02, dist), 0.5));\n if (opacity == 0.0) {\n discard;\n }\n }\n // butt or square cap\n if ((nearMode == 0 || nearMode == 1) && subpos.x < antialiasing) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.x + subpos.w * float(nearMode)));\n }\n if ((farMode == 0 || farMode == 1) && subpos.z < antialiasing) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.z + subpos.w * float(farMode)));\n }\n // round cap\n if (nearMode == 2 && subpos.x <= 0.0) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.w - sqrt(pow(subpos.x, 2.0) + pow(subpos.y - info.z * subpos.w, 2.0))));\n }\n if (farMode == 2 && subpos.z <= 0.0) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.w - sqrt(pow(subpos.z, 2.0) + pow(subpos.y - info.z * subpos.w, 2.0))));\n }\n // bevel and clip joins\n if ((nearMode == 5 || nearMode == 7) && subpos.x < antialiasing) {\n float dist = (sinABC * subpos.x + cosABC * subpos.y) * sign(sinABC);\n float w = subpos.w * (1.0 - info.z * sign(sinABC));\n float maxDist;\n if (nearMode == 5) maxDist = cosABC * w;\n else maxDist = miterLimit * w;\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, maxDist + dist));\n }\n if ((farMode == 5 || farMode == 7) && subpos.z < antialiasing) {\n float dist = (sinBCD * subpos.z + cosBCD * subpos.y) * sign(sinBCD);\n float w = subpos.w * (1.0 - info.z * sign(sinBCD));\n float maxDist;\n if (farMode == 5) maxDist = cosBCD * w;\n else maxDist = miterLimit * w;\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, maxDist + dist));\n }\n // round join\n if (nearMode == 6 && subpos.x <= 0.0) {\n float w = subpos.w * (1.0 - info.z * sign(sinABC));\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, w - sqrt(pow(subpos.x, 2.0) + pow(subpos.y, 2.0))));\n }\n if (farMode == 6 && subpos.z <= 0.0) {\n float w = subpos.w * (1.0 - info.z * sign(sinBCD));\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, w - sqrt(pow(subpos.z, 2.0) + pow(subpos.y, 2.0))));\n }\n // antialias along main edges\n if (antialiasing > 0.0) {\n if (subpos.y > subpos.w * (1.0 + info.z) - antialiasing) {\n opacity = min(opacity, smoothstep(antialiasing, -antialiasing, subpos.y - subpos.w * (1.0 + info.z)));\n }\n if (subpos.y < subpos.w * (-1.0 + info.z) + antialiasing) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.y - subpos.w * (-1.0 + info.z)));\n }\n }\n if (opacity == 0.0) {\n discard;\n }\n color.a *= opacity;\n gl_FragColor = color;\n}\n"},916:function(t){t.exports="/* lineFeature vertex shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nattribute vec3 pos;\nattribute vec3 prev;\nattribute vec3 next;\nattribute vec3 far;\nattribute float flags;\n\nattribute vec3 strokeColor;\nattribute float strokeOpacity;\nattribute float strokeWidth;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float pixelWidth;\nuniform float aspect;\nuniform float miterLimit;\nuniform float antialiasing;\n\nvarying vec4 strokeColorVar;\nvarying vec4 subpos; /* px, py, length - px, width */\nvarying vec4 info; /* near mode, far mode, offset */\nvarying vec4 angles; /* near angle cos, sin, far angle cos, sin */\n\nconst float PI = 3.14159265358979323846264;\n\nvec4 viewCoord(vec3 c) {\n vec4 result = projectionMatrix * modelViewMatrix * vec4(c.xyz, 1.0);\n if (result.w != 0.0) result = result / result.w;\n return result;\n}\n\nfloat atan2(float y, float x) {\n if (x > 0.0) return atan(y / x);\n if (x < 0.0 && y >= 0.0) return atan(y / x) + PI;\n if (x < 0.0) return atan(y / x) - PI;\n return sign(y) * 0.5 * PI;\n}\n\nvoid main(void)\n{\n /* If any vertex has been deliberately set to a negative opacity,\n * skip doing computations on it. */\n if (strokeOpacity < 0.0) {\n gl_Position = vec4(2.0, 2.0, 0.0, 1.0);\n return;\n }\n /* convert coordinates. We have four values, since we need to\n * calculate the angles between the lines formed by prev-pos and\n * pos-next, and between pos-next and next-far, plus know the angle\n * (prev)---(pos)---(next)---(far) => A---B---C---D */\n vec4 A = viewCoord(prev);\n vec4 B = viewCoord(pos);\n vec4 C = viewCoord(next);\n vec4 D = viewCoord(far);\n // calculate line segment vector and angle\n vec2 deltaCB = C.xy - B.xy;\n if (deltaCB == vec2(0.0, 0.0)) {\n gl_Position = vec4(2.0, 2.0, 0.0, 1.0);\n return;\n }\n float angleCB = atan2(deltaCB.y, deltaCB.x * aspect);\n // values we need to pass along\n strokeColorVar = vec4(strokeColor, strokeOpacity);\n // extract values from our flags field\n int vertex = int(mod(flags, 4.0));\n int nearMode = int(mod(floor(flags / 4.0), 8.0));\n int farMode = int(mod(floor(flags / 32.0), 8.0));\n // we use 11 bits of the flags for the offset, where -1023 to 1023\n // maps to -1 to 1. The 11 bits are a signed value, so simply\n // selecting the bits will result in an unsigned values that may be\n // greater than 1, in which case we have to subtract appropriately.\n float offset = mod(floor(flags / 256.0), 2048.0) / 1023.0;\n if (offset > 1.0) offset -= 2048.0 / 1023.0;\n // by default, offset by the width and don't extend lines. Later,\n // calculate line extensions based on end cap and end join modes\n float yOffset = strokeWidth + antialiasing;\n if (vertex == 0 || vertex == 2) yOffset *= -1.0;\n yOffset += strokeWidth * offset;\n float xOffset = 0.0;\n // end caps\n if (nearMode == 0) {\n xOffset = antialiasing;\n } else if (nearMode == 1 || nearMode == 2) {\n xOffset = strokeWidth + antialiasing;\n }\n\n // If joining lines, calculate the angles in screen space formed by\n // the near end (A-B-C) and far end (B-C-D), and determine how much\n // space is needed for the particular join.\n // This could be changed: if the lines are not a uniform width and\n // offset, then the functional join angle is not simply half the\n // angle between the two lines, but rather half the angle of the\n // inside edge of the the two lines.\n float cosABC = 1.0, sinABC = 0.0, cosBCD = 1.0, sinBCD = 0.0; // of half angles\n // handle near end\n if (nearMode >= 4) {\n float angleBA = atan2(B.y - A.y, (B.x - A.x) * aspect);\n if (A.xy == B.xy) angleBA = angleCB;\n float angleABC = angleCB - angleBA;\n // ensure angle is in the range [-PI, PI], then take the half angle\n angleABC = (mod(angleABC + 3.0 * PI, 2.0 * PI) - PI) / 2.0;\n cosABC = cos(angleABC); sinABC = sin(angleABC);\n // if this angle is close to flat, pass-through the join\n if (nearMode >= 4 && cosABC > 0.999999) {\n nearMode = 3;\n }\n // miter, miter-clip\n if (nearMode == 4 || nearMode == 7) {\n if (cosABC < 0.000001 || 1.0 / cosABC > miterLimit) {\n if (nearMode == 4) {\n nearMode = 5;\n } else {\n xOffset = miterLimit * strokeWidth * (1.0 - offset * sign(sinABC)) + antialiasing;\n }\n } else {\n // we add an extra 1.0 to the xOffset to make sure that fragment\n // shader is doing the clipping\n xOffset = abs(sinABC / cosABC) * strokeWidth * (1.0 - offset * sign(sinABC)) + antialiasing + 1.0;\n nearMode = 4;\n }\n }\n // bevel or round join\n if (nearMode == 5 || nearMode == 6) {\n xOffset = strokeWidth * (1.0 - offset * sign(sinABC)) + antialiasing;\n }\n }\n\n // handle far end\n if (farMode >= 4) {\n float angleDC = atan2(D.y - C.y, (D.x - C.x) * aspect);\n if (D.xy == C.xy) angleDC = angleCB;\n float angleBCD = angleDC - angleCB;\n // ensure angle is in the range [-PI, PI], then take the half angle\n angleBCD = (mod(angleBCD + 3.0 * PI, 2.0 * PI) - PI) / 2.0;\n cosBCD = cos(angleBCD); sinBCD = sin(angleBCD);\n // if this angle is close to flat, pass-through the join\n if (farMode >= 4 && cosBCD > 0.999999) {\n farMode = 3;\n }\n // miter, miter-clip\n if (farMode == 4 || farMode == 7) {\n if (cosBCD < 0.000001 || 1.0 / cosBCD > miterLimit) {\n if (farMode == 4) farMode = 5;\n } else {\n farMode = 4;\n }\n }\n }\n\n // compute the location of a vertex to include everything that might\n // need to be rendered\n xOffset *= -1.0;\n gl_Position = vec4(\n B.x + (xOffset * cos(angleCB) - yOffset * sin(angleCB)) * pixelWidth,\n B.y + (xOffset * sin(angleCB) + yOffset * cos(angleCB)) * pixelWidth * aspect,\n B.z, 1.0);\n // store other values needed to determine which pixels to plot.\n float lineLength = length(vec2(deltaCB.x, deltaCB.y / aspect)) / pixelWidth;\n\n if (vertex == 0 || vertex == 1) {\n subpos = vec4(xOffset, yOffset, lineLength - xOffset, strokeWidth);\n info = vec4(float(nearMode), float(farMode), offset, 0.0);\n angles = vec4(cosABC, sinABC, cosBCD, sinBCD);\n } else {\n subpos = vec4(lineLength - xOffset, -yOffset, xOffset, strokeWidth);\n info = vec4(float(farMode), float(nearMode), -offset, 0.0);\n angles = vec4(cosBCD, -sinBCD, cosABC, -sinABC);\n }\n}\n"},359:function(t){t.exports="/* lineFeature debug fragment shader */\n\n#ifdef GL_ES\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n #else\n precision mediump float;\n #endif\n#endif\nvarying vec4 strokeColorVar;\nvarying vec4 subpos;\nvarying vec4 info;\nvarying vec4 angles;\nuniform float antialiasing;\nuniform float miterLimit;\nuniform float fixedFlags;\n\nvoid main () {\n vec4 color = strokeColorVar;\n bool debug = bool(mod(fixedFlags, 2.0));\n float opacity = 1.0;\n int nearMode = int(floor(info.x + 0.5));\n int farMode = int(floor(info.y + 0.5));\n float cosABC = angles.x;\n float sinABC = angles.y;\n float cosBCD = angles.z;\n float sinBCD = angles.w;\n // never render on the opposite side of a miter. This uses a bit of\n // slop, via pow(smoothstep()) instead of step(), since there are\n // precision issues in this calculation. This doesn't wholly solve\n // the precision issue; sometimes pixels are missed or double\n // rendered along the inside seam of a miter.\n if (nearMode >= 4) {\n float dist = cosABC * subpos.x - sinABC * subpos.y;\n opacity = min(opacity, pow(smoothstep(-0.02, 0.02, dist), 0.5));\n if (opacity == 0.0) {\n if (debug) {\n color.r = 255.0 / 255.0;\n gl_FragColor = color;\n return;\n }\n discard;\n }\n }\n if (farMode >= 4) {\n float dist = cosBCD * subpos.z - sinBCD * subpos.y;\n opacity = min(opacity, pow(smoothstep(-0.02, 0.02, dist), 0.5));\n if (opacity == 0.0) {\n if (debug) {\n color.r = 254.0 / 255.0;\n gl_FragColor = color;\n return;\n }\n discard;\n }\n }\n // butt or square cap\n if ((nearMode == 0 || nearMode == 1) && subpos.x < antialiasing) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.x + subpos.w * float(nearMode)));\n }\n if ((farMode == 0 || farMode == 1) && subpos.z < antialiasing) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.z + subpos.w * float(farMode)));\n }\n // round cap\n if (nearMode == 2 && subpos.x <= 0.0) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.w - sqrt(pow(subpos.x, 2.0) + pow(subpos.y - info.z * subpos.w, 2.0))));\n }\n if (farMode == 2 && subpos.z <= 0.0) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.w - sqrt(pow(subpos.z, 2.0) + pow(subpos.y - info.z * subpos.w, 2.0))));\n }\n // bevel and clip joins\n if ((nearMode == 5 || nearMode == 7) && subpos.x < antialiasing) {\n float dist = (sinABC * subpos.x + cosABC * subpos.y) * sign(sinABC);\n float w = subpos.w * (1.0 - info.z * sign(sinABC));\n float maxDist;\n if (nearMode == 5) maxDist = cosABC * w;\n else maxDist = miterLimit * w;\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, maxDist + dist));\n }\n if ((farMode == 5 || farMode == 7) && subpos.z < antialiasing) {\n float dist = (sinBCD * subpos.z + cosBCD * subpos.y) * sign(sinBCD);\n float w = subpos.w * (1.0 - info.z * sign(sinBCD));\n float maxDist;\n if (farMode == 5) maxDist = cosBCD * w;\n else maxDist = miterLimit * w;\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, maxDist + dist));\n }\n // round join\n if (nearMode == 6 && subpos.x <= 0.0) {\n float w = subpos.w * (1.0 - info.z * sign(sinABC));\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, w - sqrt(pow(subpos.x, 2.0) + pow(subpos.y, 2.0))));\n }\n if (farMode == 6 && subpos.z <= 0.0) {\n float w = subpos.w * (1.0 - info.z * sign(sinBCD));\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, w - sqrt(pow(subpos.z, 2.0) + pow(subpos.y, 2.0))));\n }\n // antialias along main edges\n if (antialiasing > 0.0) {\n if (subpos.y > subpos.w * (1.0 + info.z) - antialiasing) {\n opacity = min(opacity, smoothstep(antialiasing, -antialiasing, subpos.y - subpos.w * (1.0 + info.z)));\n }\n if (subpos.y < subpos.w * (-1.0 + info.z) + antialiasing) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.y - subpos.w * (-1.0 + info.z)));\n }\n }\n if (opacity == 0.0) {\n if (debug) {\n color.r = 253.0 / 255.0;\n gl_FragColor = color;\n return;\n }\n discard;\n }\n color.a *= opacity;\n gl_FragColor = color;\n}\n"},5573:function(t){t.exports="/* markerFeature square/triangle fragment shader */\n\n/* markerFeature common fragment shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nvarying float radiusVar;\nvarying vec4 fillColorVar;\nvarying vec4 strokeColorVar;\nvarying float strokeWidthVar;\nvarying float symbolVar; /* contains some bit fields */\nvarying float symbolValueVar;\nvarying float rotationVar;\n// the square/triangle shader defines unitVar\nconst int symbolEllipse = 0;\nconst int symbolFlowerBase = 1;\nconst int symbolFlowerMax = 16;\nconst int symbolTriangle = 16;\nconst int symbolStarBase = 17;\nconst int symbolStarMax = 16;\nconst int symbolRectangle = 32;\nconst int symbolCrossBase = 33;\nconst int symbolCrossMax = 16;\nconst int symbolOval = 48;\nconst int symbolJackBase = 49;\nconst int symbolJackMax = 16;\nconst int symbolDrop = 64;\nconst int symbolDropBase = 65;\nconst int symbolDropMax = 16;\nconst int symbolArrow = 80;\nconst int symbolArrowBase = 81;\nconst int symbolArrowMax = 16;\n// Distance to antialias in pixels\nconst float antialiasDist = 1.5;\n\n/* Compute the distance from a point to an arrow defined by the radiusVar and a\n * packed value containing\n * headWidth: ratio to radius (0, 1]\n * headLength: ratio to diameter (0, 1]\n * stemWidth: ratio to headWidth [0, 1]\n * sweep: boolean\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float packed: the packed value.\n * Exit: float dist: the distance to the drop in pixels. Negative is inside.\n */\nfloat distanceToArrow(vec2 pos, float value) {\n bool sweep = value < 0.0;\n value = abs(value);\n float pack0 = (mod(value, 252.0) - 1.0) / 250.0;\n value = floor(value / 252.0);\n float pack1 = (mod(value, 252.0) - 1.0) / 250.0;\n value = floor(value / 252.0);\n float pack2 = (mod(value, 252.0) - 1.0) / 250.0;\n\n float headWidth = (pack0 > 0.0 ? pack0 : 2.0 / 3.0);\n float headEnd = 1.0 - 2.0 * (pack1 > 0.0 ? pack1 : 1.0 / 2.0);\n float stemWidth = headWidth * (pack2 >= 0.0 ? pack2 : 1.0 / 3.0);\n if (length(vec2(headWidth, headEnd)) > 1.0) {\n vec2 scaledHead = normalize(vec2(headWidth, headEnd));\n headWidth = scaledHead.x;\n headEnd = scaledHead.y;\n }\n float stemEnd = -cos(asin(stemWidth));\n\n headWidth *= radiusVar;\n headEnd *= radiusVar;\n stemWidth *= radiusVar;\n stemEnd *= radiusVar;\n pos.y = abs(pos.y);\n float stemDist = pos.y - stemWidth;\n float stemEndDist = stemEnd - pos.x;\n float B = (radiusVar - headEnd) / headWidth;\n float headDist = (pos.x + B * pos.y - radiusVar) / sqrt(1.0 + B * B);\n float headEndDist;\n if (sweep) {\n B = (radiusVar - headEnd) / 3.0 / headWidth;\n headEndDist = -(pos.x + B * pos.y - (radiusVar + headEnd * 2.0) / 3.0) / sqrt(1.0 + B * B);\n } else {\n headEndDist = headEnd - pos.x;\n }\n headEndDist = min(headEndDist, stemDist);\n return max(max(headDist, headEndDist), stemEndDist);\n}\n\n/* Compute the distance from a point to a drop defined by the radiusVar (the\n * semimajor axis) and ratio (between the minor and major radii).\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: ratio of minor / major axes.\n * Exit: float dist: the distance to the drop in pixels. Negative is inside.\n */\nfloat distanceToDrop(vec2 pos, float ratio) {\n ratio = abs(ratio);\n if (ratio == 0.0 || ratio >= 1.0) {\n ratio = 1.0;\n }\n float r = radiusVar * ratio;\n float cx = radiusVar - r;\n float rad = distance(pos.xy, vec2(cx, 0.0)) - r;\n if (ratio < 0.5) {\n float x = radiusVar - r - r * r / cx;\n float y = sqrt(r * r - (cx - x) * (cx - x));\n float Bt = (cx - x) / y;\n if ((pos.x + Bt * abs(pos.y) - cx) / sqrt(1.0 + Bt * Bt) < 0.0) {\n float B = -x / y;\n return -(pos.x + B * abs(pos.y)) / sqrt(1.0 + B * B);\n }\n }\n return rad;\n}\n\n/* Compute the distance from a point to the ellipse defined by the radiusVar\n * (the semimajor axis) and ratio (between the minor and major axes).\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: ratio of minor / major axes.\n * Exit: float dist: the distance to the ellipse in pixels. Negative is\n * inside.\n */\nfloat distanceToEllipse(vec2 pos, float ratio) {\n // a and b are the semi-major and semi-minor axes\n // ratio is the between the minor and major axes. If > 1, swap these and\n // rotate 90 degrees.\n if (ratio == 0.0) {\n ratio = 1.0;\n }\n float a = radiusVar, b = abs(radiusVar * ratio);\n if (b > a) {\n pos = vec2(pos.y, -pos.x);\n b = abs(radiusVar / ratio);\n }\n float a2 = a * a, b2 = b * b;\n // compute the distance to the ellipse. See this discussion:\n // https://stackoverflow.com/questions/22959698\n float f = sqrt(a2 - b2),\n // this value will be positive if outside and negative if inside. If\n // we used it directly, the stroke would be too thick along the long\n // edges of the ellipse\n d = (distance(pos, vec2(f, 0.0)) + distance(pos, vec2(-f, 0.0))) * 0.5 - a;\n // if we are outside of the ellipse, accuracy is not important, so return\n // early.\n if (d >= 0.0) {\n return d;\n }\n // work in one quadrant\n pos = abs(pos);\n // t (the angle from center) could start as `atan(pos.y, pos.x)`, but this\n // results in a slower solution near narrow ends\n float t = 0.7;\n float cost = cos(t), sint = sin(t), x = a * cost, y = b * sint;\n vec2 lastxy;\n for (int iter = 0; iter < 10; iter += 1) {\n lastxy = vec2(x, y);\n float ex = (a2 - b2) * pow(cost, 3.0) / a,\n ey = (b2 - a2) * pow(sint, 3.0) / b;\n vec2 r = vec2(x - ex, y - ey),\n q = vec2(pos.x - ex, pos.y - ey);\n float lenr = length(r);\n t += lenr * asin((r.x * q.y - r.y * q.x) / lenr / length(q)) / sqrt(a2 + b2 - x * x - y * y);\n t = clamp(t, 0.0, acos(0.0));\n cost = cos(t);\n sint = sin(t);\n x = a * cost;\n y = b * sint;\n if (distance(lastxy, vec2(x, y)) < 0.05) {\n break;\n }\n }\n return sign(d) * distance(pos, vec2(x, y));\n}\n\n/* Compute the distance from a point to an isosceles triangle.\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: length of the base compared to the other sides.\n * Exit: float dist: the distance to the rectangle in pixels. Negative is\n * inside.\n */\nfloat distanceToIsoscelesTriangle(vec2 pos, float ratio) {\n ratio = clamp(abs(ratio), 0.0, 2.0);\n if (ratio == 0.0 || ratio == 2.0) {\n ratio = 1.0;\n }\n float s1, s2, x0, x1, y1;\n if (ratio < sqrt(2.0)) {\n s1 = radiusVar * sqrt(4.0 - ratio * ratio); // length of equal sides\n s2 = s1 * ratio;\n y1 = s2 / 2.0;\n x0 = radiusVar;\n x1 = x0 - sqrt(s1 * s1 - y1 * y1);\n } else {\n s2 = radiusVar * 2.0;\n s1 = s2 / ratio;\n y1 = s2 / 2.0;\n x0 = sqrt(s1 * s1 - y1 * y1);\n x1 = 0.0;\n }\n float B = (x0 - x1) / y1;\n return max(x1 - pos.x, (pos.x + B * abs(pos.y) - x0) / sqrt(1.0 + B * B));\n}\n\n/* Compute the distance from a point to an oval defined by the radiusVar (the\n * semimajor axis) and ratio (between the minor and major axes). Here an oval\n * is defined as two semicircles connected by straight line segments.\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: ratio of minor / major axes.\n * Exit: float dist: the distance to the oval in pixels. Negative is inside.\n */\nfloat distanceToOval(vec2 pos, float ratio) {\n ratio = abs(ratio);\n if (ratio == 0.0 || ratio >= 1.0) {\n ratio = 1.0;\n }\n float minor = radiusVar * ratio;\n float center = radiusVar - minor;\n pos = abs(pos);\n if (pos.x <= center) {\n return pos.y - minor;\n }\n return distance(pos, vec2(center, 0.0)) - minor;\n}\n\n/* Compute the distance from a point to a rectangle defined by the radiusVar\n * (the semidiagonal) and ratio (between the minor and major axes).\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: ratio of minor / major axes.\n * Exit: float dist: the distance to the rectangle in pixels. Negative is\n * inside.\n */\nfloat distanceToRectangle(vec2 pos, float ratio) {\n ratio = abs(ratio);\n if (ratio == 0.0) {\n ratio = 1.0;\n }\n vec2 wh = normalize(vec2(1.0, abs(ratio))) * radiusVar;\n vec2 dist = abs(pos) - wh;\n return max(dist.x, dist.y);\n}\n\n/* Based on a repetition value, return a position for rotational symmetry.\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * int repetitions: number of repetitions on the cross.\n * Exit: float dist: a point in the primary position.\n */\nvec2 rotationalSymmetry(vec2 pos, int repetitions) {\n float pi = acos(-1.0);\n float limit = pi / float(repetitions);\n float ang = atan(pos.y, pos.x);\n ang = mod(ang + pi * 2.0, limit * 2.0);\n if (ang > limit) {\n ang -= limit * 2.0;\n }\n return vec2(cos(ang), sin(ang)) * length(pos);\n}\n\nvoid markerFeatureFragment(vec2 pos) {\n // rad is a value in pixels from the edge of the symbol where negative is\n // inside the shape\n float rad = length(pos.xy) - radiusVar;\n // never allow points outside of the main radius\n if (rad > 0.0) {\n discard;\n return;\n }\n // apply clockwise rotation\n if (rotationVar != 0.0) {\n float cosr = cos(rotationVar), sinr = sin(rotationVar);\n pos = vec2(pos.x * cosr + pos.y * sinr, -pos.x * sinr + pos.y * cosr);\n }\n\n int symbol = int(floor(symbolVar / 64.0));\n bool isimage = bool(mod(floor(symbolVar / 8.0), 2.0));\n vec4 fillColor, strokeColor;\n float endStep;\n\n float ratio = symbolValueVar;\n // When ratio is 0, it usually gets changed to 1; some shapes could have\n // better defaults\n /* Symbol shapes */\n if (symbol == symbolTriangle) {\n rad = distanceToIsoscelesTriangle(pos, ratio);\n } else if (symbol == symbolRectangle) {\n rad = distanceToRectangle(pos, ratio);\n } else if (symbol == symbolOval) {\n rad = distanceToOval(pos, ratio);\n } else if (symbol == symbolDrop) {\n rad = distanceToDrop(pos, ratio);\n } else if (symbol == symbolArrow) {\n rad = distanceToArrow(pos, ratio);\n } else if (symbol >= symbolCrossBase && symbol <= symbolCrossBase + symbolCrossMax - 2) {\n rad = distanceToRectangle(rotationalSymmetry(pos, symbol - symbolCrossBase + 2), ratio);\n } else if (symbol >= symbolFlowerBase && symbol <= symbolFlowerBase + symbolFlowerMax - 2) {\n rad = distanceToEllipse(rotationalSymmetry(pos, symbol - symbolFlowerBase + 2), ratio);\n } else if (symbol >= symbolStarBase && symbol <= symbolStarBase + symbolStarMax - 2) {\n rad = distanceToIsoscelesTriangle(rotationalSymmetry(pos, symbol - symbolStarBase + 2), ratio);\n } else if (symbol >= symbolJackBase && symbol <= symbolJackBase + symbolJackMax - 2) {\n rad = distanceToOval(rotationalSymmetry(pos, symbol - symbolJackBase + 2), ratio);\n } else if (symbol >= symbolDropBase && symbol <= symbolDropBase + symbolDropMax - 2) {\n rad = distanceToDrop(rotationalSymmetry(pos, symbol - symbolDropBase + 2), ratio);\n } else if (symbol >= symbolArrowBase && symbol <= symbolArrowBase + symbolArrowMax - 2) {\n rad = distanceToArrow(rotationalSymmetry(pos, symbol - symbolArrowBase + 2), ratio);\n } else { // default - circle or ellipse; a value of 0 or 1 is a circle\n if (ratio != 0.0 && ratio != 1.0) {\n rad = distanceToEllipse(pos, ratio);\n }\n }\n\n if (rad >= 0.0) {\n discard;\n return;\n }\n // If there is no stroke, the fill region should transition to nothing\n if (strokeColorVar.a == 0.0 || strokeWidthVar <= 0.0) {\n strokeColor = vec4(fillColorVar.rgb, 0.0);\n endStep = 0.0;\n } else {\n strokeColor = strokeColorVar;\n endStep = -strokeWidthVar;\n }\n // Likewise, if there is no fill, the stroke should transition to nothing\n if (fillColorVar.a == 0.0) {\n fillColor = vec4(strokeColorVar.rgb, 0.0);\n } else {\n fillColor = fillColorVar;\n }\n if (rad <= endStep) {\n float step = smoothstep(endStep - antialiasDist, endStep, rad);\n vec4 color = mix(fillColor, strokeColor, step);\n float step2 = smoothstep(-antialiasDist, 0.0, rad);\n gl_FragColor = mix(color, vec4(color.rgb, 0.0), step2);\n } else {\n float step = smoothstep(-antialiasDist, 0.0, rad);\n gl_FragColor = mix(strokeColor, vec4(strokeColor.rgb, 0.0), step);\n }\n}\n\n\nvarying vec2 unitVar; // distinct for square/triangle\n\nvoid main() {\n if (fillColorVar.a == 0.0 && strokeColorVar.a == 0.0)\n discard;\n markerFeatureFragment(unitVar);\n}\n"},2043:function(t){t.exports="/* markerFeature square/triangle vertex shader */\n\n/* markerFeature common vertex shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nattribute vec3 pos;\nattribute float radius;\nattribute vec3 fillColor;\nattribute float fillOpacity;\nattribute vec3 strokeColor;\nattribute float strokeOpacity;\nattribute float strokeWidth;\nattribute float symbol; /* contains some bit fields */\nattribute float symbolValue;\nattribute float rotation;\nuniform float zoom;\nuniform float rotationUniform;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n// non-sprite has other definitions.\nvarying float radiusVar;\nvarying vec4 fillColorVar;\nvarying vec4 strokeColorVar;\nvarying float strokeWidthVar;\nvarying float symbolVar; /* contains some bit fields */\nvarying float symbolValueVar;\nvarying float rotationVar;\n\nfloat markerFeaturePrep(void)\n{\n // No stroke or fill implies nothing to draw\n if (radius <= 0.0 || (strokeOpacity <= 0.0 && fillOpacity <= 0.0)) {\n gl_Position = vec4(2.0, 2.0, 0.0, 1.0);\n return 0.0;\n }\n radiusVar = radius;\n strokeWidthVar = strokeWidth;\n int scaleMode = int(mod(symbol, 4.0));\n float strokeOffset = mod(floor(symbol / 16.0), 4.0) - 1.0;\n radiusVar += (strokeOffset + 1.0) / 2.0 * strokeWidthVar;\n if (scaleMode == 1) { // fill\n radiusVar = (radiusVar - strokeWidthVar) * exp2(zoom) + strokeWidthVar;\n } else if (scaleMode == 2) { // stroke\n radiusVar += strokeWidthVar * (exp2(zoom) - 1.0);\n strokeWidthVar *= exp2(zoom);\n } else if (scaleMode == 3) { // all\n radiusVar *= exp2(zoom);\n strokeWidthVar *= exp2(zoom);\n }\n fillColorVar = vec4(fillColor, fillOpacity);\n strokeColorVar = vec4(strokeColor, strokeOpacity);\n symbolVar = symbol;\n symbolValueVar = symbolValue;\n rotationVar = rotation;\n if (bool(mod(floor(symbolVar / 4.0), 2.0))) {\n rotationVar += rotationUniform;\n }\n return radiusVar;\n}\n\n\nuniform float pixelWidth; // for non-sprite\nuniform float aspect; // for non-sprite\nattribute vec2 unit; // for non-sprite\nvarying vec2 unitVar; // for non-sprite\n\nvoid main(void)\n{\n radiusVar = markerFeaturePrep();\n if (radiusVar == 0.0) {\n return;\n }\n // for non-sprite\n unitVar = unit * radiusVar;\n unitVar.y *= -1.0;\n vec4 p = (projectionMatrix * modelViewMatrix * vec4(pos, 1.0)).xyzw;\n if (p.w != 0.0) {\n p = p / p.w;\n }\n p += radiusVar * vec4(unit.x * pixelWidth, unit.y * pixelWidth * aspect, 0.0, 1.0);\n gl_Position = vec4(p.xyz, 1.0);\n}\n"},468:function(t){t.exports="/* markerFeature sprite fragment shader */\n\n/* markerFeature common fragment shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nvarying float radiusVar;\nvarying vec4 fillColorVar;\nvarying vec4 strokeColorVar;\nvarying float strokeWidthVar;\nvarying float symbolVar; /* contains some bit fields */\nvarying float symbolValueVar;\nvarying float rotationVar;\n// the square/triangle shader defines unitVar\nconst int symbolEllipse = 0;\nconst int symbolFlowerBase = 1;\nconst int symbolFlowerMax = 16;\nconst int symbolTriangle = 16;\nconst int symbolStarBase = 17;\nconst int symbolStarMax = 16;\nconst int symbolRectangle = 32;\nconst int symbolCrossBase = 33;\nconst int symbolCrossMax = 16;\nconst int symbolOval = 48;\nconst int symbolJackBase = 49;\nconst int symbolJackMax = 16;\nconst int symbolDrop = 64;\nconst int symbolDropBase = 65;\nconst int symbolDropMax = 16;\nconst int symbolArrow = 80;\nconst int symbolArrowBase = 81;\nconst int symbolArrowMax = 16;\n// Distance to antialias in pixels\nconst float antialiasDist = 1.5;\n\n/* Compute the distance from a point to an arrow defined by the radiusVar and a\n * packed value containing\n * headWidth: ratio to radius (0, 1]\n * headLength: ratio to diameter (0, 1]\n * stemWidth: ratio to headWidth [0, 1]\n * sweep: boolean\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float packed: the packed value.\n * Exit: float dist: the distance to the drop in pixels. Negative is inside.\n */\nfloat distanceToArrow(vec2 pos, float value) {\n bool sweep = value < 0.0;\n value = abs(value);\n float pack0 = (mod(value, 252.0) - 1.0) / 250.0;\n value = floor(value / 252.0);\n float pack1 = (mod(value, 252.0) - 1.0) / 250.0;\n value = floor(value / 252.0);\n float pack2 = (mod(value, 252.0) - 1.0) / 250.0;\n\n float headWidth = (pack0 > 0.0 ? pack0 : 2.0 / 3.0);\n float headEnd = 1.0 - 2.0 * (pack1 > 0.0 ? pack1 : 1.0 / 2.0);\n float stemWidth = headWidth * (pack2 >= 0.0 ? pack2 : 1.0 / 3.0);\n if (length(vec2(headWidth, headEnd)) > 1.0) {\n vec2 scaledHead = normalize(vec2(headWidth, headEnd));\n headWidth = scaledHead.x;\n headEnd = scaledHead.y;\n }\n float stemEnd = -cos(asin(stemWidth));\n\n headWidth *= radiusVar;\n headEnd *= radiusVar;\n stemWidth *= radiusVar;\n stemEnd *= radiusVar;\n pos.y = abs(pos.y);\n float stemDist = pos.y - stemWidth;\n float stemEndDist = stemEnd - pos.x;\n float B = (radiusVar - headEnd) / headWidth;\n float headDist = (pos.x + B * pos.y - radiusVar) / sqrt(1.0 + B * B);\n float headEndDist;\n if (sweep) {\n B = (radiusVar - headEnd) / 3.0 / headWidth;\n headEndDist = -(pos.x + B * pos.y - (radiusVar + headEnd * 2.0) / 3.0) / sqrt(1.0 + B * B);\n } else {\n headEndDist = headEnd - pos.x;\n }\n headEndDist = min(headEndDist, stemDist);\n return max(max(headDist, headEndDist), stemEndDist);\n}\n\n/* Compute the distance from a point to a drop defined by the radiusVar (the\n * semimajor axis) and ratio (between the minor and major radii).\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: ratio of minor / major axes.\n * Exit: float dist: the distance to the drop in pixels. Negative is inside.\n */\nfloat distanceToDrop(vec2 pos, float ratio) {\n ratio = abs(ratio);\n if (ratio == 0.0 || ratio >= 1.0) {\n ratio = 1.0;\n }\n float r = radiusVar * ratio;\n float cx = radiusVar - r;\n float rad = distance(pos.xy, vec2(cx, 0.0)) - r;\n if (ratio < 0.5) {\n float x = radiusVar - r - r * r / cx;\n float y = sqrt(r * r - (cx - x) * (cx - x));\n float Bt = (cx - x) / y;\n if ((pos.x + Bt * abs(pos.y) - cx) / sqrt(1.0 + Bt * Bt) < 0.0) {\n float B = -x / y;\n return -(pos.x + B * abs(pos.y)) / sqrt(1.0 + B * B);\n }\n }\n return rad;\n}\n\n/* Compute the distance from a point to the ellipse defined by the radiusVar\n * (the semimajor axis) and ratio (between the minor and major axes).\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: ratio of minor / major axes.\n * Exit: float dist: the distance to the ellipse in pixels. Negative is\n * inside.\n */\nfloat distanceToEllipse(vec2 pos, float ratio) {\n // a and b are the semi-major and semi-minor axes\n // ratio is the between the minor and major axes. If > 1, swap these and\n // rotate 90 degrees.\n if (ratio == 0.0) {\n ratio = 1.0;\n }\n float a = radiusVar, b = abs(radiusVar * ratio);\n if (b > a) {\n pos = vec2(pos.y, -pos.x);\n b = abs(radiusVar / ratio);\n }\n float a2 = a * a, b2 = b * b;\n // compute the distance to the ellipse. See this discussion:\n // https://stackoverflow.com/questions/22959698\n float f = sqrt(a2 - b2),\n // this value will be positive if outside and negative if inside. If\n // we used it directly, the stroke would be too thick along the long\n // edges of the ellipse\n d = (distance(pos, vec2(f, 0.0)) + distance(pos, vec2(-f, 0.0))) * 0.5 - a;\n // if we are outside of the ellipse, accuracy is not important, so return\n // early.\n if (d >= 0.0) {\n return d;\n }\n // work in one quadrant\n pos = abs(pos);\n // t (the angle from center) could start as `atan(pos.y, pos.x)`, but this\n // results in a slower solution near narrow ends\n float t = 0.7;\n float cost = cos(t), sint = sin(t), x = a * cost, y = b * sint;\n vec2 lastxy;\n for (int iter = 0; iter < 10; iter += 1) {\n lastxy = vec2(x, y);\n float ex = (a2 - b2) * pow(cost, 3.0) / a,\n ey = (b2 - a2) * pow(sint, 3.0) / b;\n vec2 r = vec2(x - ex, y - ey),\n q = vec2(pos.x - ex, pos.y - ey);\n float lenr = length(r);\n t += lenr * asin((r.x * q.y - r.y * q.x) / lenr / length(q)) / sqrt(a2 + b2 - x * x - y * y);\n t = clamp(t, 0.0, acos(0.0));\n cost = cos(t);\n sint = sin(t);\n x = a * cost;\n y = b * sint;\n if (distance(lastxy, vec2(x, y)) < 0.05) {\n break;\n }\n }\n return sign(d) * distance(pos, vec2(x, y));\n}\n\n/* Compute the distance from a point to an isosceles triangle.\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: length of the base compared to the other sides.\n * Exit: float dist: the distance to the rectangle in pixels. Negative is\n * inside.\n */\nfloat distanceToIsoscelesTriangle(vec2 pos, float ratio) {\n ratio = clamp(abs(ratio), 0.0, 2.0);\n if (ratio == 0.0 || ratio == 2.0) {\n ratio = 1.0;\n }\n float s1, s2, x0, x1, y1;\n if (ratio < sqrt(2.0)) {\n s1 = radiusVar * sqrt(4.0 - ratio * ratio); // length of equal sides\n s2 = s1 * ratio;\n y1 = s2 / 2.0;\n x0 = radiusVar;\n x1 = x0 - sqrt(s1 * s1 - y1 * y1);\n } else {\n s2 = radiusVar * 2.0;\n s1 = s2 / ratio;\n y1 = s2 / 2.0;\n x0 = sqrt(s1 * s1 - y1 * y1);\n x1 = 0.0;\n }\n float B = (x0 - x1) / y1;\n return max(x1 - pos.x, (pos.x + B * abs(pos.y) - x0) / sqrt(1.0 + B * B));\n}\n\n/* Compute the distance from a point to an oval defined by the radiusVar (the\n * semimajor axis) and ratio (between the minor and major axes). Here an oval\n * is defined as two semicircles connected by straight line segments.\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: ratio of minor / major axes.\n * Exit: float dist: the distance to the oval in pixels. Negative is inside.\n */\nfloat distanceToOval(vec2 pos, float ratio) {\n ratio = abs(ratio);\n if (ratio == 0.0 || ratio >= 1.0) {\n ratio = 1.0;\n }\n float minor = radiusVar * ratio;\n float center = radiusVar - minor;\n pos = abs(pos);\n if (pos.x <= center) {\n return pos.y - minor;\n }\n return distance(pos, vec2(center, 0.0)) - minor;\n}\n\n/* Compute the distance from a point to a rectangle defined by the radiusVar\n * (the semidiagonal) and ratio (between the minor and major axes).\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: ratio of minor / major axes.\n * Exit: float dist: the distance to the rectangle in pixels. Negative is\n * inside.\n */\nfloat distanceToRectangle(vec2 pos, float ratio) {\n ratio = abs(ratio);\n if (ratio == 0.0) {\n ratio = 1.0;\n }\n vec2 wh = normalize(vec2(1.0, abs(ratio))) * radiusVar;\n vec2 dist = abs(pos) - wh;\n return max(dist.x, dist.y);\n}\n\n/* Based on a repetition value, return a position for rotational symmetry.\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * int repetitions: number of repetitions on the cross.\n * Exit: float dist: a point in the primary position.\n */\nvec2 rotationalSymmetry(vec2 pos, int repetitions) {\n float pi = acos(-1.0);\n float limit = pi / float(repetitions);\n float ang = atan(pos.y, pos.x);\n ang = mod(ang + pi * 2.0, limit * 2.0);\n if (ang > limit) {\n ang -= limit * 2.0;\n }\n return vec2(cos(ang), sin(ang)) * length(pos);\n}\n\nvoid markerFeatureFragment(vec2 pos) {\n // rad is a value in pixels from the edge of the symbol where negative is\n // inside the shape\n float rad = length(pos.xy) - radiusVar;\n // never allow points outside of the main radius\n if (rad > 0.0) {\n discard;\n return;\n }\n // apply clockwise rotation\n if (rotationVar != 0.0) {\n float cosr = cos(rotationVar), sinr = sin(rotationVar);\n pos = vec2(pos.x * cosr + pos.y * sinr, -pos.x * sinr + pos.y * cosr);\n }\n\n int symbol = int(floor(symbolVar / 64.0));\n bool isimage = bool(mod(floor(symbolVar / 8.0), 2.0));\n vec4 fillColor, strokeColor;\n float endStep;\n\n float ratio = symbolValueVar;\n // When ratio is 0, it usually gets changed to 1; some shapes could have\n // better defaults\n /* Symbol shapes */\n if (symbol == symbolTriangle) {\n rad = distanceToIsoscelesTriangle(pos, ratio);\n } else if (symbol == symbolRectangle) {\n rad = distanceToRectangle(pos, ratio);\n } else if (symbol == symbolOval) {\n rad = distanceToOval(pos, ratio);\n } else if (symbol == symbolDrop) {\n rad = distanceToDrop(pos, ratio);\n } else if (symbol == symbolArrow) {\n rad = distanceToArrow(pos, ratio);\n } else if (symbol >= symbolCrossBase && symbol <= symbolCrossBase + symbolCrossMax - 2) {\n rad = distanceToRectangle(rotationalSymmetry(pos, symbol - symbolCrossBase + 2), ratio);\n } else if (symbol >= symbolFlowerBase && symbol <= symbolFlowerBase + symbolFlowerMax - 2) {\n rad = distanceToEllipse(rotationalSymmetry(pos, symbol - symbolFlowerBase + 2), ratio);\n } else if (symbol >= symbolStarBase && symbol <= symbolStarBase + symbolStarMax - 2) {\n rad = distanceToIsoscelesTriangle(rotationalSymmetry(pos, symbol - symbolStarBase + 2), ratio);\n } else if (symbol >= symbolJackBase && symbol <= symbolJackBase + symbolJackMax - 2) {\n rad = distanceToOval(rotationalSymmetry(pos, symbol - symbolJackBase + 2), ratio);\n } else if (symbol >= symbolDropBase && symbol <= symbolDropBase + symbolDropMax - 2) {\n rad = distanceToDrop(rotationalSymmetry(pos, symbol - symbolDropBase + 2), ratio);\n } else if (symbol >= symbolArrowBase && symbol <= symbolArrowBase + symbolArrowMax - 2) {\n rad = distanceToArrow(rotationalSymmetry(pos, symbol - symbolArrowBase + 2), ratio);\n } else { // default - circle or ellipse; a value of 0 or 1 is a circle\n if (ratio != 0.0 && ratio != 1.0) {\n rad = distanceToEllipse(pos, ratio);\n }\n }\n\n if (rad >= 0.0) {\n discard;\n return;\n }\n // If there is no stroke, the fill region should transition to nothing\n if (strokeColorVar.a == 0.0 || strokeWidthVar <= 0.0) {\n strokeColor = vec4(fillColorVar.rgb, 0.0);\n endStep = 0.0;\n } else {\n strokeColor = strokeColorVar;\n endStep = -strokeWidthVar;\n }\n // Likewise, if there is no fill, the stroke should transition to nothing\n if (fillColorVar.a == 0.0) {\n fillColor = vec4(strokeColorVar.rgb, 0.0);\n } else {\n fillColor = fillColorVar;\n }\n if (rad <= endStep) {\n float step = smoothstep(endStep - antialiasDist, endStep, rad);\n vec4 color = mix(fillColor, strokeColor, step);\n float step2 = smoothstep(-antialiasDist, 0.0, rad);\n gl_FragColor = mix(color, vec4(color.rgb, 0.0), step2);\n } else {\n float step = smoothstep(-antialiasDist, 0.0, rad);\n gl_FragColor = mix(strokeColor, vec4(strokeColor.rgb, 0.0), step);\n }\n}\n\n\n// the square/triangle shader defines unitVar\n\nvoid main(void) {\n // No stroke or fill implies nothing to draw\n if (fillColorVar.a == 0.0 && strokeColorVar.a == 0.0)\n discard;\n // for sprites, convert the position to [-radius,radius],[-radius,radius]\n vec2 pos = (gl_PointCoord.xy - 0.5) * 2.0 * radiusVar;\n markerFeatureFragment(pos);\n}\n"},7981:function(t){t.exports="/* markerFeature sprite vertex shader */\n\n/* markerFeature common vertex shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nattribute vec3 pos;\nattribute float radius;\nattribute vec3 fillColor;\nattribute float fillOpacity;\nattribute vec3 strokeColor;\nattribute float strokeOpacity;\nattribute float strokeWidth;\nattribute float symbol; /* contains some bit fields */\nattribute float symbolValue;\nattribute float rotation;\nuniform float zoom;\nuniform float rotationUniform;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n// non-sprite has other definitions.\nvarying float radiusVar;\nvarying vec4 fillColorVar;\nvarying vec4 strokeColorVar;\nvarying float strokeWidthVar;\nvarying float symbolVar; /* contains some bit fields */\nvarying float symbolValueVar;\nvarying float rotationVar;\n\nfloat markerFeaturePrep(void)\n{\n // No stroke or fill implies nothing to draw\n if (radius <= 0.0 || (strokeOpacity <= 0.0 && fillOpacity <= 0.0)) {\n gl_Position = vec4(2.0, 2.0, 0.0, 1.0);\n return 0.0;\n }\n radiusVar = radius;\n strokeWidthVar = strokeWidth;\n int scaleMode = int(mod(symbol, 4.0));\n float strokeOffset = mod(floor(symbol / 16.0), 4.0) - 1.0;\n radiusVar += (strokeOffset + 1.0) / 2.0 * strokeWidthVar;\n if (scaleMode == 1) { // fill\n radiusVar = (radiusVar - strokeWidthVar) * exp2(zoom) + strokeWidthVar;\n } else if (scaleMode == 2) { // stroke\n radiusVar += strokeWidthVar * (exp2(zoom) - 1.0);\n strokeWidthVar *= exp2(zoom);\n } else if (scaleMode == 3) { // all\n radiusVar *= exp2(zoom);\n strokeWidthVar *= exp2(zoom);\n }\n fillColorVar = vec4(fillColor, fillOpacity);\n strokeColorVar = vec4(strokeColor, strokeOpacity);\n symbolVar = symbol;\n symbolValueVar = symbolValue;\n rotationVar = rotation;\n if (bool(mod(floor(symbolVar / 4.0), 2.0))) {\n rotationVar += rotationUniform;\n }\n return radiusVar;\n}\n\n\nvoid main(void)\n{\n radiusVar = markerFeaturePrep();\n if (radiusVar == 0.0) {\n return;\n }\n // for sprite\n gl_Position = (projectionMatrix * modelViewMatrix * vec4(pos, 1.0)).xyzw;\n gl_PointSize = 2.0 * radiusVar;\n}\n"},4351:function(t){t.exports="/* contourFeature fragment shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nuniform vec4 minColor;\nuniform vec4 maxColor;\nuniform float steps;\nuniform bool stepped;\nuniform sampler2D sampler2d;\nvarying float valueVar;\nvarying float opacityVar;\n\nvoid main () {\n vec4 clr;\n if (valueVar < 0.0) {\n clr = minColor;\n } else if (valueVar > steps) {\n clr = maxColor;\n } else {\n float step;\n if (stepped) {\n step = floor(valueVar) + 0.5;\n if (step > steps) {\n step = steps - 0.5;\n }\n } else {\n step = valueVar + 0.5;\n }\n // our texture is padded on either end by a repeated value to ensure\n // we interpolate smoothly at the ends.\n clr = texture2D(sampler2d, vec2((step + 1.0) / (steps + 2.0), 0.0));\n }\n gl_FragColor = vec4(clr.rgb, clr.a * opacityVar);\n}\n"},5836:function(t){t.exports="/* contourFeature vertex shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nattribute vec3 pos;\nattribute float value;\nattribute float opacity;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nvarying float valueVar;\nvarying float opacityVar;\n\nvoid main(void)\n{\n /* Don't use z values */\n vec4 scrPos = projectionMatrix * modelViewMatrix * vec4(pos.xy, 0, 1);\n if (scrPos.w != 0.0) {\n scrPos = scrPos / scrPos.w;\n }\n valueVar = value;\n opacityVar = opacity;\n gl_Position = scrPos;\n}\n"},3953:function(t){t.exports="/* pixelmapFeature fragment shader */\n\nvarying highp vec2 iTextureCoord;\nuniform sampler2D sampler2d;\nuniform sampler2D lutSampler;\nuniform int lutWidth;\nuniform int lutHeight;\nuniform mediump float opacity;\nuniform highp vec2 crop;\n\nvoid main(void) {\n if ((crop.s < 1.0 && iTextureCoord.s > crop.s) || (crop.t < 1.0 && 1.0 - iTextureCoord.t > crop.t)) {\n discard;\n }\n // to add anti-aliasing, we would need to know the current pixel size\n // (probably computed in the vertex shader) and then sample the base image at\n // multiple points, then average the output color.\n highp vec4 lutValue = texture2D(sampler2d, iTextureCoord);\n highp vec2 lutCoord;\n lutCoord.s = (\n mod(\n // add 0.5 to handle float imprecision\n floor(lutValue.r * 255.0 + 0.5) +\n floor(lutValue.g * 255.0 + 0.5) * 256.0,\n float(lutWidth)\n // center in pixel\n ) + 0.5) / float(lutWidth);\n // Our image is top-down, so invert the coordinate\n lutCoord.t = 1.0 - (\n floor(\n (\n // add 0.5 to handle float imprecision\n floor(lutValue.r * 255.0 + 0.5) +\n floor(lutValue.g * 255.0 + 0.5) * 256.0 +\n floor(lutValue.b * 255.0 + 0.5) * 256.0 * 256.0\n // We may want an option to use the alpha channel to allow more indices\n ) / float(lutWidth)\n // center in pixel\n ) + 0.5) / float(lutHeight);\n if (lutCoord.t < 0.0) {\n discard;\n }\n mediump vec4 color = texture2D(lutSampler, lutCoord);\n\n color.a *= opacity;\n gl_FragColor = color;\n}\n"},1815:function(t){t.exports="/* pointFeature square/triangle fragment shader */\n\n/* pointFeature common fragment shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nvarying vec4 fillColorVar;\nvarying vec4 strokeColorVar;\nvarying float radiusVar;\nvarying float strokeWidthVar;\n\nvoid pointFeatureFragment(float rad) {\n vec4 strokeColor, fillColor;\n float endStep;\n // No stroke or fill implies nothing to draw\n if (rad > 1.0)\n discard;\n // If there is no stroke, the fill region should transition to nothing\n if (strokeColorVar.a == 0.0) {\n strokeColor = vec4(fillColorVar.rgb, 0.0);\n endStep = 1.0;\n } else {\n strokeColor = strokeColorVar;\n endStep = radiusVar / (radiusVar + strokeWidthVar);\n }\n // Likewise, if there is no fill, the stroke should transition to nothing\n if (fillColorVar.a == 0.0)\n fillColor = vec4(strokeColor.rgb, 0.0);\n else\n fillColor = fillColorVar;\n // Distance to antialias over. First number is in pixels\n float antialiasDist = 1.5 / (radiusVar + strokeWidthVar);\n if (rad < endStep) {\n float step = smoothstep(max(0.0, endStep - antialiasDist), endStep, rad);\n vec4 color = mix(fillColor, strokeColor, step);\n float step2 = smoothstep(max(0.0, 1.0 - antialiasDist), 1.0, rad);\n gl_FragColor = mix(color, vec4(color.rgb, 0.0), step2);\n } else {\n float step = smoothstep(max(0.0, 1.0 - antialiasDist), 1.0, rad);\n gl_FragColor = mix(strokeColor, vec4(strokeColor.rgb, 0.0), step);\n }\n}\n\n\nvarying vec3 unitVar; // distinct for square/triangle\n\nvoid main () {\n if (fillColorVar.a == 0.0 && strokeColorVar.a == 0.0)\n discard;\n float rad = length(unitVar.xy); // distinct for square/triangle\n pointFeatureFragment(rad);\n}\n"},9713:function(t){t.exports="/* pointFeature square/triangle vertex shader */\n\n/* pointFeature common vertex shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nattribute vec3 pos;\nattribute float radius;\nattribute vec3 fillColor;\nattribute vec3 strokeColor;\nattribute float fillOpacity;\nattribute float strokeWidth;\nattribute float strokeOpacity;\nattribute float fill;\nattribute float stroke;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nvarying vec4 fillColorVar;\nvarying vec4 strokeColorVar;\nvarying float radiusVar;\nvarying float strokeWidthVar;\n\nfloat pointFeaturePrep() {\n strokeWidthVar = strokeWidth;\n fillColorVar = vec4(fillColor, fillOpacity);\n strokeColorVar = vec4(strokeColor, strokeOpacity);\n // No stroke or fill implies nothing to draw\n if (stroke < 1.0 || strokeWidth <= 0.0 || strokeOpacity <= 0.0) {\n strokeColorVar.a = 0.0;\n strokeWidthVar = 0.0;\n }\n if (fill < 1.0 || radius <= 0.0 || fillOpacity <= 0.0)\n fillColorVar.a = 0.0;\n /* If the point has no visible pixels, skip doing computations on it. */\n if (fillColorVar.a == 0.0 && strokeColorVar.a == 0.0) {\n gl_Position = vec4(2, 2, 0, 1);\n return 0.0;\n }\n return radius;\n}\n\n\nuniform float pixelWidth; // for non-sprite\nuniform float aspect; // for non-sprite\nattribute vec2 unit; // for non-sprite\nvarying vec3 unitVar; // for non-sprite\n\nvoid main(void)\n{\n radiusVar = pointFeaturePrep();\n if (radiusVar == 0.0) {\n return;\n }\n // for non-sprite\n unitVar = vec3(unit, 1.0);\n vec4 p = (projectionMatrix * modelViewMatrix * vec4(pos, 1.0)).xyzw;\n if (p.w != 0.0) {\n p = p / p.w;\n }\n p += (radius + strokeWidthVar) *\n vec4(unit.x * pixelWidth, unit.y * pixelWidth * aspect, 0.0, 1.0);\n gl_Position = vec4(p.xyz, 1.0);\n}\n"},4900:function(t){t.exports="/* pointFeature sprite fragment shader */\n\n/* pointFeature common fragment shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nvarying vec4 fillColorVar;\nvarying vec4 strokeColorVar;\nvarying float radiusVar;\nvarying float strokeWidthVar;\n\nvoid pointFeatureFragment(float rad) {\n vec4 strokeColor, fillColor;\n float endStep;\n // No stroke or fill implies nothing to draw\n if (rad > 1.0)\n discard;\n // If there is no stroke, the fill region should transition to nothing\n if (strokeColorVar.a == 0.0) {\n strokeColor = vec4(fillColorVar.rgb, 0.0);\n endStep = 1.0;\n } else {\n strokeColor = strokeColorVar;\n endStep = radiusVar / (radiusVar + strokeWidthVar);\n }\n // Likewise, if there is no fill, the stroke should transition to nothing\n if (fillColorVar.a == 0.0)\n fillColor = vec4(strokeColor.rgb, 0.0);\n else\n fillColor = fillColorVar;\n // Distance to antialias over. First number is in pixels\n float antialiasDist = 1.5 / (radiusVar + strokeWidthVar);\n if (rad < endStep) {\n float step = smoothstep(max(0.0, endStep - antialiasDist), endStep, rad);\n vec4 color = mix(fillColor, strokeColor, step);\n float step2 = smoothstep(max(0.0, 1.0 - antialiasDist), 1.0, rad);\n gl_FragColor = mix(color, vec4(color.rgb, 0.0), step2);\n } else {\n float step = smoothstep(max(0.0, 1.0 - antialiasDist), 1.0, rad);\n gl_FragColor = mix(strokeColor, vec4(strokeColor.rgb, 0.0), step);\n }\n}\n\n\n// the square/triangle shader defines unitVar\n\nvoid main () {\n // No stroke or fill implies nothing to draw\n if (fillColorVar.a == 0.0 && strokeColorVar.a == 0.0)\n discard;\n float rad = 2.0 * length(gl_PointCoord - vec2(0.5)); // distinct for sprite\n pointFeatureFragment(rad);\n}\n"},8410:function(t){t.exports="/* pointFeature sprite vertex shader */\n\n/* pointFeature common vertex shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nattribute vec3 pos;\nattribute float radius;\nattribute vec3 fillColor;\nattribute vec3 strokeColor;\nattribute float fillOpacity;\nattribute float strokeWidth;\nattribute float strokeOpacity;\nattribute float fill;\nattribute float stroke;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nvarying vec4 fillColorVar;\nvarying vec4 strokeColorVar;\nvarying float radiusVar;\nvarying float strokeWidthVar;\n\nfloat pointFeaturePrep() {\n strokeWidthVar = strokeWidth;\n fillColorVar = vec4(fillColor, fillOpacity);\n strokeColorVar = vec4(strokeColor, strokeOpacity);\n // No stroke or fill implies nothing to draw\n if (stroke < 1.0 || strokeWidth <= 0.0 || strokeOpacity <= 0.0) {\n strokeColorVar.a = 0.0;\n strokeWidthVar = 0.0;\n }\n if (fill < 1.0 || radius <= 0.0 || fillOpacity <= 0.0)\n fillColorVar.a = 0.0;\n /* If the point has no visible pixels, skip doing computations on it. */\n if (fillColorVar.a == 0.0 && strokeColorVar.a == 0.0) {\n gl_Position = vec4(2, 2, 0, 1);\n return 0.0;\n }\n return radius;\n}\n\n\nvoid main(void)\n{\n radiusVar = pointFeaturePrep();\n if (radiusVar == 0.0) {\n return;\n }\n // for sprite\n gl_Position = (projectionMatrix * modelViewMatrix * vec4(pos, 1.0)).xyzw;\n gl_PointSize = 2.0 * (radius + strokeWidthVar);\n}\n"},1859:function(t){t.exports="/* polygonFeature fragment shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nvarying vec4 fillColorVar;\n\nvoid main () {\n gl_FragColor = fillColorVar;\n}\n"},5810:function(t){t.exports="/* polygonFeature vertex shader */\n\nattribute vec3 pos;\nattribute vec3 fillColor;\nattribute float fillOpacity;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nvarying vec4 fillColorVar;\n\nvoid main(void)\n{\n vec4 clipPos = projectionMatrix * modelViewMatrix * vec4(pos.xyz, 1.0);\n if (clipPos.w != 0.0) {\n clipPos = clipPos/clipPos.w;\n }\n fillColorVar = vec4(fillColor, fillOpacity);\n gl_Position = clipPos;\n}\n"},630:function(t){t.exports="/* quadFeature Color fragment shader */\n\nvarying mediump vec3 iVertexColor;\nuniform mediump float opacity;\n\nvoid main(void) {\n gl_FragColor = vec4(iVertexColor, opacity);\n}\n"},1899:function(t){t.exports="/* quadFeature Color vertex shader */\n\nattribute vec3 vertexPosition;\nuniform float zOffset;\nuniform vec3 vertexColor;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nvarying mediump vec3 iVertexColor;\n\nvoid main(void) {\n gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition, 1.0);\n gl_Position.z += zOffset;\n iVertexColor = vertexColor;\n}\n"},7521:function(t){t.exports="/* quadFeature Image fragment shader */\n\nvarying highp vec2 iTextureCoord;\nuniform sampler2D sampler2d;\nuniform mediump float opacity;\nuniform highp vec2 crop;\n\nvoid main(void) {\n mediump vec4 color = texture2D(sampler2d, iTextureCoord);\n if ((crop.s < 1.0 && iTextureCoord.s > crop.s) || (crop.t < 1.0 && 1.0 - iTextureCoord.t > crop.t)) {\n discard;\n }\n color.w *= opacity;\n gl_FragColor = color;\n}\n"},5804:function(t){t.exports="/* quadFeature Image vertex shader */\n\nattribute vec3 vertexPosition;\nattribute vec2 textureCoord;\nuniform float zOffset;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nvarying highp vec2 iTextureCoord;\nuniform highp vec4 cropsource;\n\nvoid main(void) {\n gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition, 1.0);\n gl_Position.z += zOffset;\n if (cropsource.p > cropsource.s && cropsource.q > cropsource.t && (cropsource.p < 1.0 || cropsource.s > 0.0 || cropsource.q < 1.0 || cropsource.t > 0.0)) {\n iTextureCoord.s = textureCoord.s * (cropsource.p - cropsource.s) + cropsource.s;\n iTextureCoord.t = textureCoord.t * (cropsource.q - cropsource.t) + cropsource.t;\n } else {\n iTextureCoord = textureCoord;\n }\n}\n"},8701:function(t,e,n){"use strict";n.r(e);var i=n(1892),r=n.n(i),o=n(5760),a=n.n(o),s=n(8311),l=n.n(s),u=n(8192),c=n.n(u),d=n(8060),h=n.n(d),f=n(4865),p=n.n(f),m=n(406),g={};g.styleTagTransform=p(),g.setAttributes=c(),g.insert=l().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=h();r()(m.Z,g);e.default=m.Z&&m.Z.locals?m.Z.locals:void 0},2352:function(t,e,n){"use strict";n.r(e);var i=n(1892),r=n.n(i),o=n(5760),a=n.n(o),s=n(8311),l=n.n(s),u=n(8192),c=n.n(u),d=n(8060),h=n.n(d),f=n(4865),p=n.n(f),m=n(7747),g={};g.styleTagTransform=p(),g.setAttributes=c(),g.insert=l().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=h();r()(m.Z,g);e.default=m.Z&&m.Z.locals?m.Z.locals:void 0},4129:function(t,e,n){"use strict";n.r(e);var i=n(1892),r=n.n(i),o=n(5760),a=n.n(o),s=n(8311),l=n.n(s),u=n(8192),c=n.n(u),d=n(8060),h=n.n(d),f=n(4865),p=n.n(f),m=n(1680),g={};g.styleTagTransform=p(),g.setAttributes=c(),g.insert=l().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=h();r()(m.Z,g);e.default=m.Z&&m.Z.locals?m.Z.locals:void 0},1892:function(t){"use strict";var e=[];function n(t){for(var n=-1,i=0;i<e.length;i++)if(e[i].identifier===t){n=i;break}return n}function i(t,i){for(var o={},a=[],s=0;s<t.length;s++){var l=t[s],u=i.base?l[0]+i.base:l[0],c=o[u]||0,d="".concat(u," ").concat(c);o[u]=c+1;var h=n(d),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)e[h].references++,e[h].updater(f);else{var p=r(f,i);i.byIndex=s,e.splice(s,0,{identifier:d,updater:p,references:1})}a.push(d)}return a}function r(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,r){var o=i(t=t||[],r=r||{});return function(t){t=t||[];for(var a=0;a<o.length;a++){var s=n(o[a]);e[s].references--}for(var l=i(t,r),u=0;u<o.length;u++){var c=n(o[u]);0===e[c].references&&(e[c].updater(),e.splice(c,1))}o=l}}},8311:function(t){"use strict";var e={};t.exports=function(t,n){var i=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},8060:function(t){"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},8192:function(t,e,n){"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},5760:function(t){"use strict";t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,r&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(i,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},4865:function(t){"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},9990:function(t){"use strict";if(void 0===e){var n=new Error("Cannot find module 'd3'");throw n.code="MODULE_NOT_FOUND",n}t.exports=e},999:function(t){"use strict";if(void 0===n){var e=new Error("Cannot find module 'vtk.js'");throw e.code="MODULE_NOT_FOUND",e}t.exports=n},3877:function(e){"use strict";if(void 0===t){var n=new Error("Cannot find module 'hammerjs'");throw n.code="MODULE_NOT_FOUND",n}e.exports=t}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var n=r[t]={id:t,exports:{}};return i[t].call(n.exports,n,n.exports,o),n.exports}return o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o(6062)}()}));
59
+ function(t){var e,n,i,r,o,a,s,l,u,c,d,h,f,p,m,g,v,y,x,b="sizzle"+1*new Date,_=t.document,w=0,M=0,A=lt(),T=lt(),C=lt(),E=lt(),S=function(t,e){return t===e&&(d=!0),0},k={}.hasOwnProperty,P=[],O=P.pop,R=P.push,L=P.push,D=P.slice,I=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},F="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",j="[\\x20\\t\\r\\n\\f]",N="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",z="\\[[\\x20\\t\\r\\n\\f]*("+N+")(?:"+j+"*([*^$|!~]?=)"+j+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+j+"*\\]",B=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+z+")*)|.*)\\)|)",V=new RegExp(j+"+","g"),G=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),U=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),q=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),W=new RegExp(j+"|>"),H=new RegExp(B),Z=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N+"|[*])"),ATTR:new RegExp("^"+z),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+F+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},Q=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),nt=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},it=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,rt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){h()},at=bt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{L.apply(P=D.call(_.childNodes),_.childNodes),P[_.childNodes.length].nodeType}catch(t){L={apply:P.length?function(t,e){R.apply(t,D.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}function st(t,e,i,r){var o,s,u,c,d,p,v,y=e&&e.ownerDocument,_=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==_&&9!==_&&11!==_)return i;if(!r&&(h(e),e=e||f,m)){if(11!==_&&(d=$.exec(t)))if(o=d[1]){if(9===_){if(!(u=e.getElementById(o)))return i;if(u.id===o)return i.push(u),i}else if(y&&(u=y.getElementById(o))&&x(e,u)&&u.id===o)return i.push(u),i}else{if(d[2])return L.apply(i,e.getElementsByTagName(t)),i;if((o=d[3])&&n.getElementsByClassName&&e.getElementsByClassName)return L.apply(i,e.getElementsByClassName(o)),i}if(n.qsa&&!E[t+" "]&&(!g||!g.test(t))&&(1!==_||"object"!==e.nodeName.toLowerCase())){if(v=t,y=e,1===_&&(W.test(t)||q.test(t))){for((y=tt.test(t)&&vt(e.parentNode)||e)===e&&n.scope||((c=e.getAttribute("id"))?c=c.replace(it,rt):e.setAttribute("id",c=b)),s=(p=a(t)).length;s--;)p[s]=(c?"#"+c:":scope")+" "+xt(p[s]);v=p.join(",")}try{return L.apply(i,y.querySelectorAll(v)),i}catch(e){E(t,!0)}finally{c===b&&e.removeAttribute("id")}}}return l(t.replace(G,"$1"),e,i,r)}function lt(){var t=[];return function e(n,r){return t.push(n+" ")>i.cacheLength&&delete e[t.shift()],e[n+" "]=r}}function ut(t){return t[b]=!0,t}function ct(t){var e=f.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function dt(t,e){for(var n=t.split("|"),r=n.length;r--;)i.attrHandle[n[r]]=e}function ht(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ft(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function pt(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function mt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&at(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function gt(t){return ut((function(e){return e=+e,ut((function(n,i){for(var r,o=t([],n.length,e),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))}))}))}function vt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=st.support={},o=st.isXML=function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!Q.test(e||n&&n.nodeName||"HTML")},h=st.setDocument=function(t){var e,r,a=t?t.ownerDocument||t:_;return a!=f&&9===a.nodeType&&a.documentElement?(p=(f=a).documentElement,m=!o(f),_!=f&&(r=f.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",ot,!1):r.attachEvent&&r.attachEvent("onunload",ot)),n.scope=ct((function(t){return p.appendChild(t).appendChild(f.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),n.attributes=ct((function(t){return t.className="i",!t.getAttribute("className")})),n.getElementsByTagName=ct((function(t){return t.appendChild(f.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=J.test(f.getElementsByClassName),n.getById=ct((function(t){return p.appendChild(t).id=b,!f.getElementsByName||!f.getElementsByName(b).length})),n.getById?(i.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n=e.getElementById(t);return n?[n]:[]}}):(i.filter.ID=function(t){var e=t.replace(et,nt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n,i,r,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(r=e.getElementsByName(t),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),i.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},i.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&m)return e.getElementsByClassName(t)},v=[],g=[],(n.qsa=J.test(f.querySelectorAll))&&(ct((function(t){var e;p.appendChild(t).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll("[selected]").length||g.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+F+")"),t.querySelectorAll("[id~="+b+"-]").length||g.push("~="),(e=f.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||g.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll(":checked").length||g.push(":checked"),t.querySelectorAll("a#"+b+"+*").length||g.push(".#.+[+~]"),t.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ct((function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=f.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&g.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),p.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=J.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ct((function(t){n.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),v.push("!=",B)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),e=J.test(p.compareDocumentPosition),x=e||J.test(p.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},S=e?function(t,e){if(t===e)return d=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===i?t==f||t.ownerDocument==_&&x(_,t)?-1:e==f||e.ownerDocument==_&&x(_,e)?1:c?I(c,t)-I(c,e):0:4&i?-1:1)}:function(t,e){if(t===e)return d=!0,0;var n,i=0,r=t.parentNode,o=e.parentNode,a=[t],s=[e];if(!r||!o)return t==f?-1:e==f?1:r?-1:o?1:c?I(c,t)-I(c,e):0;if(r===o)return ht(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)s.unshift(n);for(;a[i]===s[i];)i++;return i?ht(a[i],s[i]):a[i]==_?-1:s[i]==_?1:0},f):f},st.matches=function(t,e){return st(t,null,null,e)},st.matchesSelector=function(t,e){if(h(t),n.matchesSelector&&m&&!E[e+" "]&&(!v||!v.test(e))&&(!g||!g.test(e)))try{var i=y.call(t,e);if(i||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){E(e,!0)}return st(e,f,null,[t]).length>0},st.contains=function(t,e){return(t.ownerDocument||t)!=f&&h(t),x(t,e)},st.attr=function(t,e){(t.ownerDocument||t)!=f&&h(t);var r=i.attrHandle[e.toLowerCase()],o=r&&k.call(i.attrHandle,e.toLowerCase())?r(t,e,!m):void 0;return void 0!==o?o:n.attributes||!m?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},st.escape=function(t){return(t+"").replace(it,rt)},st.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},st.uniqueSort=function(t){var e,i=[],r=0,o=0;if(d=!n.detectDuplicates,c=!n.sortStable&&t.slice(0),t.sort(S),d){for(;e=t[o++];)e===t[o]&&(r=i.push(o));for(;r--;)t.splice(i[r],1)}return c=null,t},r=st.getText=function(t){var e,n="",i=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=r(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[i++];)n+=r(e);return n},i=st.selectors={cacheLength:50,createPseudo:ut,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||st.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&st.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return X.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&H.test(n)&&(e=a(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=A[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+j+"|$)"))&&A(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(i){var r=st.attr(i,t);return null==r?"!="===e:!e||(r+="","="===e?r===n:"!="===e?r!==n:"^="===e?n&&0===r.indexOf(n):"*="===e?n&&r.indexOf(n)>-1:"$="===e?n&&r.slice(-n.length)===n:"~="===e?(" "+r.replace(V," ")+" ").indexOf(n)>-1:"|="===e&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,i,r){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,l){var u,c,d,h,f,p,m=o!==a?"nextSibling":"previousSibling",g=e.parentNode,v=s&&e.nodeName.toLowerCase(),y=!l&&!s,x=!1;if(g){if(o){for(;m;){for(h=e;h=h[m];)if(s?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=m="only"===t&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&y){for(x=(f=(u=(c=(d=(h=g)[b]||(h[b]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===w&&u[1])&&u[2],h=f&&g.childNodes[f];h=++f&&h&&h[m]||(x=f=0)||p.pop();)if(1===h.nodeType&&++x&&h===e){c[t]=[w,f,x];break}}else if(y&&(x=f=(u=(c=(d=(h=e)[b]||(h[b]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===w&&u[1]),!1===x)for(;(h=++f&&h&&h[m]||(x=f=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++x||(y&&((c=(d=h[b]||(h[b]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]=[w,x]),h!==e)););return(x-=r)===i||x%i==0&&x/i>=0}}},PSEUDO:function(t,e){var n,r=i.pseudos[t]||i.setFilters[t.toLowerCase()]||st.error("unsupported pseudo: "+t);return r[b]?r(e):r.length>1?(n=[t,t,"",e],i.setFilters.hasOwnProperty(t.toLowerCase())?ut((function(t,n){for(var i,o=r(t,e),a=o.length;a--;)t[i=I(t,o[a])]=!(n[i]=o[a])})):function(t){return r(t,0,n)}):r}},pseudos:{not:ut((function(t){var e=[],n=[],i=s(t.replace(G,"$1"));return i[b]?ut((function(t,e,n,r){for(var o,a=i(t,null,r,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))})):function(t,r,o){return e[0]=t,i(e,null,o,n),e[0]=null,!n.pop()}})),has:ut((function(t){return function(e){return st(t,e).length>0}})),contains:ut((function(t){return t=t.replace(et,nt),function(e){return(e.textContent||r(e)).indexOf(t)>-1}})),lang:ut((function(t){return Z.test(t||"")||st.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=m?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===p},focus:function(t){return t===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:mt(!1),disabled:mt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!i.pseudos.empty(t)},header:function(t){return Y.test(t.nodeName)},input:function(t){return K.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:gt((function(){return[0]})),last:gt((function(t,e){return[e-1]})),eq:gt((function(t,e,n){return[n<0?n+e:n]})),even:gt((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:gt((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:gt((function(t,e,n){for(var i=n<0?n+e:n>e?e:n;--i>=0;)t.push(i);return t})),gt:gt((function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t}))}},i.pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[e]=ft(e);for(e in{submit:!0,reset:!0})i.pseudos[e]=pt(e);function yt(){}function xt(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function bt(t,e,n){var i=e.dir,r=e.next,o=r||i,a=n&&"parentNode"===o,s=M++;return e.first?function(e,n,r){for(;e=e[i];)if(1===e.nodeType||a)return t(e,n,r);return!1}:function(e,n,l){var u,c,d,h=[w,s];if(l){for(;e=e[i];)if((1===e.nodeType||a)&&t(e,n,l))return!0}else for(;e=e[i];)if(1===e.nodeType||a)if(c=(d=e[b]||(e[b]={}))[e.uniqueID]||(d[e.uniqueID]={}),r&&r===e.nodeName.toLowerCase())e=e[i]||e;else{if((u=c[o])&&u[0]===w&&u[1]===s)return h[2]=u[2];if(c[o]=h,h[2]=t(e,n,l))return!0}return!1}}function _t(t){return t.length>1?function(e,n,i){for(var r=t.length;r--;)if(!t[r](e,n,i))return!1;return!0}:t[0]}function wt(t,e,n,i,r){for(var o,a=[],s=0,l=t.length,u=null!=e;s<l;s++)(o=t[s])&&(n&&!n(o,i,r)||(a.push(o),u&&e.push(s)));return a}function Mt(t,e,n,i,r,o){return i&&!i[b]&&(i=Mt(i)),r&&!r[b]&&(r=Mt(r,o)),ut((function(o,a,s,l){var u,c,d,h=[],f=[],p=a.length,m=o||function(t,e,n){for(var i=0,r=e.length;i<r;i++)st(t,e[i],n);return n}(e||"*",s.nodeType?[s]:s,[]),g=!t||!o&&e?m:wt(m,h,t,s,l),v=n?r||(o?t:p||i)?[]:a:g;if(n&&n(g,v,s,l),i)for(u=wt(v,f),i(u,[],s,l),c=u.length;c--;)(d=u[c])&&(v[f[c]]=!(g[f[c]]=d));if(o){if(r||t){if(r){for(u=[],c=v.length;c--;)(d=v[c])&&u.push(g[c]=d);r(null,v=[],u,l)}for(c=v.length;c--;)(d=v[c])&&(u=r?I(o,d):h[c])>-1&&(o[u]=!(a[u]=d))}}else v=wt(v===a?v.splice(p,v.length):v),r?r(null,a,v,l):L.apply(a,v)}))}function At(t){for(var e,n,r,o=t.length,a=i.relative[t[0].type],s=a||i.relative[" "],l=a?1:0,c=bt((function(t){return t===e}),s,!0),d=bt((function(t){return I(e,t)>-1}),s,!0),h=[function(t,n,i){var r=!a&&(i||n!==u)||((e=n).nodeType?c(t,n,i):d(t,n,i));return e=null,r}];l<o;l++)if(n=i.relative[t[l].type])h=[bt(_t(h),n)];else{if((n=i.filter[t[l].type].apply(null,t[l].matches))[b]){for(r=++l;r<o&&!i.relative[t[r].type];r++);return Mt(l>1&&_t(h),l>1&&xt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(G,"$1"),n,l<r&&At(t.slice(l,r)),r<o&&At(t=t.slice(r)),r<o&&xt(t))}h.push(n)}return _t(h)}return yt.prototype=i.filters=i.pseudos,i.setFilters=new yt,a=st.tokenize=function(t,e){var n,r,o,a,s,l,u,c=T[t+" "];if(c)return e?0:c.slice(0);for(s=t,l=[],u=i.preFilter;s;){for(a in n&&!(r=U.exec(s))||(r&&(s=s.slice(r[0].length)||s),l.push(o=[])),n=!1,(r=q.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(G," ")}),s=s.slice(n.length)),i.filter)!(r=X[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return e?s.length:s?st.error(t):T(t,l).slice(0)},s=st.compile=function(t,e){var n,r=[],o=[],s=C[t+" "];if(!s){for(e||(e=a(t)),n=e.length;n--;)(s=At(e[n]))[b]?r.push(s):o.push(s);s=C(t,function(t,e){var n=e.length>0,r=t.length>0,o=function(o,a,s,l,c){var d,p,g,v=0,y="0",x=o&&[],b=[],_=u,M=o||r&&i.find.TAG("*",c),A=w+=null==_?1:Math.random()||.1,T=M.length;for(c&&(u=a==f||a||c);y!==T&&null!=(d=M[y]);y++){if(r&&d){for(p=0,a||d.ownerDocument==f||(h(d),s=!m);g=t[p++];)if(g(d,a||f,s)){l.push(d);break}c&&(w=A)}n&&((d=!g&&d)&&v--,o&&x.push(d))}if(v+=y,n&&y!==v){for(p=0;g=e[p++];)g(x,b,a,s);if(o){if(v>0)for(;y--;)x[y]||b[y]||(b[y]=O.call(l));b=wt(b)}L.apply(l,b),c&&!o&&b.length>0&&v+e.length>1&&st.uniqueSort(l)}return c&&(w=A,u=_),x};return n?ut(o):o}(o,r)),s.selector=t}return s},l=st.select=function(t,e,n,r){var o,l,u,c,d,h="function"==typeof t&&t,f=!r&&a(t=h.selector||t);if(n=n||[],1===f.length){if((l=f[0]=f[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&9===e.nodeType&&m&&i.relative[l[1].type]){if(!(e=(i.find.ID(u.matches[0].replace(et,nt),e)||[])[0]))return n;h&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(o=X.needsContext.test(t)?0:l.length;o--&&(u=l[o],!i.relative[c=u.type]);)if((d=i.find[c])&&(r=d(u.matches[0].replace(et,nt),tt.test(l[0].type)&&vt(e.parentNode)||e))){if(l.splice(o,1),!(t=r.length&&xt(l)))return L.apply(n,r),n;break}}return(h||s(t,f))(r,e,!m,n,!e||tt.test(t)&&vt(e.parentNode)||e),n},n.sortStable=b.split("").sort(S).join("")===b,n.detectDuplicates=!!d,h(),n.sortDetached=ct((function(t){return 1&t.compareDocumentPosition(f.createElement("fieldset"))})),ct((function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")}))||dt("type|href|height|width",(function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),n.attributes&&ct((function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||dt("value",(function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),ct((function(t){return null==t.getAttribute("disabled")}))||dt(F,(function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null})),st}(i);A.find=C,A.expr=C.selectors,A.expr[":"]=A.expr.pseudos,A.uniqueSort=A.unique=C.uniqueSort,A.text=C.getText,A.isXMLDoc=C.isXML,A.contains=C.contains,A.escapeSelector=C.escape;var E=function(t,e,n){for(var i=[],r=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&A(t).is(n))break;i.push(t)}return i},S=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},k=A.expr.match.needsContext;function P(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var O=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function R(t,e,n){return v(e)?A.grep(t,(function(t,i){return!!e.call(t,i,t)!==n})):e.nodeType?A.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?A.grep(t,(function(t){return c.call(e,t)>-1!==n})):A.filter(e,t,n)}A.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?A.find.matchesSelector(i,t)?[i]:[]:A.find.matches(t,A.grep(e,(function(t){return 1===t.nodeType})))},A.fn.extend({find:function(t){var e,n,i=this.length,r=this;if("string"!=typeof t)return this.pushStack(A(t).filter((function(){for(e=0;e<i;e++)if(A.contains(r[e],this))return!0})));for(n=this.pushStack([]),e=0;e<i;e++)A.find(t,r[e],n);return i>1?A.uniqueSort(n):n},filter:function(t){return this.pushStack(R(this,t||[],!1))},not:function(t){return this.pushStack(R(this,t||[],!0))},is:function(t){return!!R(this,"string"==typeof t&&k.test(t)?A(t):t||[],!1).length}});var L,D=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(A.fn.init=function(t,e,n){var i,r;if(!t)return this;if(n=n||L,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:D.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof A?e[0]:e,A.merge(this,A.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:x,!0)),O.test(i[1])&&A.isPlainObject(e))for(i in e)v(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(r=x.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):v(t)?void 0!==n.ready?n.ready(t):t(A):A.makeArray(t,this)}).prototype=A.fn,L=A(x);var I=/^(?:parents|prev(?:Until|All))/,F={children:!0,contents:!0,next:!0,prev:!0};function j(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}A.fn.extend({has:function(t){var e=A(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(A.contains(this,e[t]))return!0}))},closest:function(t,e){var n,i=0,r=this.length,o=[],a="string"!=typeof t&&A(t);if(!k.test(t))for(;i<r;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&A.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?A.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?c.call(A(t),this[0]):c.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(A.uniqueSort(A.merge(this.get(),A(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),A.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return E(t,"parentNode")},parentsUntil:function(t,e,n){return E(t,"parentNode",n)},next:function(t){return j(t,"nextSibling")},prev:function(t){return j(t,"previousSibling")},nextAll:function(t){return E(t,"nextSibling")},prevAll:function(t){return E(t,"previousSibling")},nextUntil:function(t,e,n){return E(t,"nextSibling",n)},prevUntil:function(t,e,n){return E(t,"previousSibling",n)},siblings:function(t){return S((t.parentNode||{}).firstChild,t)},children:function(t){return S(t.firstChild)},contents:function(t){return null!=t.contentDocument&&a(t.contentDocument)?t.contentDocument:(P(t,"template")&&(t=t.content||t),A.merge([],t.childNodes))}},(function(t,e){A.fn[t]=function(n,i){var r=A.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=A.filter(i,r)),this.length>1&&(F[t]||A.uniqueSort(r),I.test(t)&&r.reverse()),this.pushStack(r)}}));var N=/[^\x20\t\r\n\f]+/g;function z(t){return t}function B(t){throw t}function V(t,e,n,i){var r;try{t&&v(r=t.promise)?r.call(t).done(e).fail(n):t&&v(r=t.then)?r.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}A.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return A.each(t.match(N)||[],(function(t,n){e[n]=!0})),e}(t):A.extend({},t);var e,n,i,r,o=[],a=[],s=-1,l=function(){for(r=r||t.once,i=e=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&t.stopOnFalse&&(s=o.length,n=!1);t.memory||(n=!1),e=!1,r&&(o=n?[]:"")},u={add:function(){return o&&(n&&!e&&(s=o.length-1,a.push(n)),function e(n){A.each(n,(function(n,i){v(i)?t.unique&&u.has(i)||o.push(i):i&&i.length&&"string"!==w(i)&&e(i)}))}(arguments),n&&!e&&l()),this},remove:function(){return A.each(arguments,(function(t,e){for(var n;(n=A.inArray(e,o,n))>-1;)o.splice(n,1),n<=s&&s--})),this},has:function(t){return t?A.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=a=[],n||e||(o=n=""),this},locked:function(){return!!r},fireWith:function(t,n){return r||(n=[t,(n=n||[]).slice?n.slice():n],a.push(n),e||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},A.extend({Deferred:function(t){var e=[["notify","progress",A.Callbacks("memory"),A.Callbacks("memory"),2],["resolve","done",A.Callbacks("once memory"),A.Callbacks("once memory"),0,"resolved"],["reject","fail",A.Callbacks("once memory"),A.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return r.then(null,t)},pipe:function(){var t=arguments;return A.Deferred((function(n){A.each(e,(function(e,i){var r=v(t[i[4]])&&t[i[4]];o[i[1]]((function(){var t=r&&r.apply(this,arguments);t&&v(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[t]:arguments)}))})),t=null})).promise()},then:function(t,n,r){var o=0;function a(t,e,n,r){return function(){var s=this,l=arguments,u=function(){var i,u;if(!(t<o)){if((i=n.apply(s,l))===e.promise())throw new TypeError("Thenable self-resolution");u=i&&("object"==typeof i||"function"==typeof i)&&i.then,v(u)?r?u.call(i,a(o,e,z,r),a(o,e,B,r)):(o++,u.call(i,a(o,e,z,r),a(o,e,B,r),a(o,e,z,e.notifyWith))):(n!==z&&(s=void 0,l=[i]),(r||e.resolveWith)(s,l))}},c=r?u:function(){try{u()}catch(i){A.Deferred.exceptionHook&&A.Deferred.exceptionHook(i,c.stackTrace),t+1>=o&&(n!==B&&(s=void 0,l=[i]),e.rejectWith(s,l))}};t?c():(A.Deferred.getStackHook&&(c.stackTrace=A.Deferred.getStackHook()),i.setTimeout(c))}}return A.Deferred((function(i){e[0][3].add(a(0,i,v(r)?r:z,i.notifyWith)),e[1][3].add(a(0,i,v(t)?t:z)),e[2][3].add(a(0,i,v(n)?n:B))})).promise()},promise:function(t){return null!=t?A.extend(t,r):r}},o={};return A.each(e,(function(t,i){var a=i[2],s=i[5];r[i[1]]=a.add,s&&a.add((function(){n=s}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),a.add(i[3].fire),o[i[0]]=function(){return o[i[0]+"With"](this===o?void 0:this,arguments),this},o[i[0]+"With"]=a.fireWith})),r.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,i=Array(n),r=s.call(arguments),o=A.Deferred(),a=function(t){return function(n){i[t]=this,r[t]=arguments.length>1?s.call(arguments):n,--e||o.resolveWith(i,r)}};if(e<=1&&(V(t,o.done(a(n)).resolve,o.reject,!e),"pending"===o.state()||v(r[n]&&r[n].then)))return o.then();for(;n--;)V(r[n],a(n),o.reject);return o.promise()}});var G=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;A.Deferred.exceptionHook=function(t,e){i.console&&i.console.warn&&t&&G.test(t.name)&&i.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},A.readyException=function(t){i.setTimeout((function(){throw t}))};var U=A.Deferred();function q(){x.removeEventListener("DOMContentLoaded",q),i.removeEventListener("load",q),A.ready()}A.fn.ready=function(t){return U.then(t).catch((function(t){A.readyException(t)})),this},A.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--A.readyWait:A.isReady)||(A.isReady=!0,!0!==t&&--A.readyWait>0||U.resolveWith(x,[A]))}}),A.ready.then=U.then,"complete"===x.readyState||"loading"!==x.readyState&&!x.documentElement.doScroll?i.setTimeout(A.ready):(x.addEventListener("DOMContentLoaded",q),i.addEventListener("load",q));var W=function(t,e,n,i,r,o,a){var s=0,l=t.length,u=null==n;if("object"===w(n))for(s in r=!0,n)W(t,e,s,n[s],!0,o,a);else if(void 0!==i&&(r=!0,v(i)||(a=!0),u&&(a?(e.call(t,i),e=null):(u=e,e=function(t,e,n){return u.call(A(t),n)})),e))for(;s<l;s++)e(t[s],n,a?i:i.call(t[s],s,e(t[s],n)));return r?t:u?e.call(t):l?e(t[0],n):o},H=/^-ms-/,Z=/-([a-z])/g;function X(t,e){return e.toUpperCase()}function Q(t){return t.replace(H,"ms-").replace(Z,X)}var K=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function Y(){this.expando=A.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(t){var e=t[this.expando];return e||(e={},K(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var i,r=this.cache(t);if("string"==typeof e)r[Q(e)]=n;else for(i in e)r[Q(i)]=e[i];return r},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][Q(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,i=t[this.expando];if(void 0!==i){if(void 0!==e){n=(e=Array.isArray(e)?e.map(Q):(e=Q(e))in i?[e]:e.match(N)||[]).length;for(;n--;)delete i[e[n]]}(void 0===e||A.isEmptyObject(i))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!A.isEmptyObject(e)}};var J=new Y,$=new Y,tt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,et=/[A-Z]/g;function nt(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(et,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:tt.test(t)?JSON.parse(t):t)}(n)}catch(t){}$.set(t,e,n)}else n=void 0;return n}A.extend({hasData:function(t){return $.hasData(t)||J.hasData(t)},data:function(t,e,n){return $.access(t,e,n)},removeData:function(t,e){$.remove(t,e)},_data:function(t,e,n){return J.access(t,e,n)},_removeData:function(t,e){J.remove(t,e)}}),A.fn.extend({data:function(t,e){var n,i,r,o=this[0],a=o&&o.attributes;if(void 0===t){if(this.length&&(r=$.get(o),1===o.nodeType&&!J.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(i=a[n].name).indexOf("data-")&&(i=Q(i.slice(5)),nt(o,i,r[i]));J.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof t?this.each((function(){$.set(this,t)})):W(this,(function(e){var n;if(o&&void 0===e)return void 0!==(n=$.get(o,t))||void 0!==(n=nt(o,t))?n:void 0;this.each((function(){$.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){$.remove(this,t)}))}}),A.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=J.get(t,e),n&&(!i||Array.isArray(n)?i=J.access(t,e,A.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=A.queue(t,e),i=n.length,r=n.shift(),o=A._queueHooks(t,e);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,(function(){A.dequeue(t,e)}),o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return J.get(t,n)||J.access(t,n,{empty:A.Callbacks("once memory").add((function(){J.remove(t,[e+"queue",n])}))})}}),A.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?A.queue(this[0],t):void 0===e?this:this.each((function(){var n=A.queue(this,t,e);A._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&A.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){A.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,r=A.Deferred(),o=this,a=this.length,s=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";a--;)(n=J.get(o[a],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(e)}});var it=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,rt=new RegExp("^(?:([+-])=|)("+it+")([a-z%]*)$","i"),ot=["Top","Right","Bottom","Left"],at=x.documentElement,st=function(t){return A.contains(t.ownerDocument,t)},lt={composed:!0};at.getRootNode&&(st=function(t){return A.contains(t.ownerDocument,t)||t.getRootNode(lt)===t.ownerDocument});var ut=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&st(t)&&"none"===A.css(t,"display")};function ct(t,e,n,i){var r,o,a=20,s=i?function(){return i.cur()}:function(){return A.css(t,e,"")},l=s(),u=n&&n[3]||(A.cssNumber[e]?"":"px"),c=t.nodeType&&(A.cssNumber[e]||"px"!==u&&+l)&&rt.exec(A.css(t,e));if(c&&c[3]!==u){for(l/=2,u=u||c[3],c=+l||1;a--;)A.style(t,e,c+u),(1-o)*(1-(o=s()/l||.5))<=0&&(a=0),c/=o;c*=2,A.style(t,e,c+u),n=n||[]}return n&&(c=+c||+l||0,r=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=c,i.end=r)),r}var dt={};function ht(t){var e,n=t.ownerDocument,i=t.nodeName,r=dt[i];return r||(e=n.body.appendChild(n.createElement(i)),r=A.css(e,"display"),e.parentNode.removeChild(e),"none"===r&&(r="block"),dt[i]=r,r)}function ft(t,e){for(var n,i,r=[],o=0,a=t.length;o<a;o++)(i=t[o]).style&&(n=i.style.display,e?("none"===n&&(r[o]=J.get(i,"display")||null,r[o]||(i.style.display="")),""===i.style.display&&ut(i)&&(r[o]=ht(i))):"none"!==n&&(r[o]="none",J.set(i,"display",n)));for(o=0;o<a;o++)null!=r[o]&&(t[o].style.display=r[o]);return t}A.fn.extend({show:function(){return ft(this,!0)},hide:function(){return ft(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){ut(this)?A(this).show():A(this).hide()}))}});var pt,mt,gt=/^(?:checkbox|radio)$/i,vt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,yt=/^$|^module$|\/(?:java|ecma)script/i;pt=x.createDocumentFragment().appendChild(x.createElement("div")),(mt=x.createElement("input")).setAttribute("type","radio"),mt.setAttribute("checked","checked"),mt.setAttribute("name","t"),pt.appendChild(mt),g.checkClone=pt.cloneNode(!0).cloneNode(!0).lastChild.checked,pt.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!pt.cloneNode(!0).lastChild.defaultValue,pt.innerHTML="<option></option>",g.option=!!pt.lastChild;var xt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function bt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&P(t,e)?A.merge([t],n):n}function _t(t,e){for(var n=0,i=t.length;n<i;n++)J.set(t[n],"globalEval",!e||J.get(e[n],"globalEval"))}xt.tbody=xt.tfoot=xt.colgroup=xt.caption=xt.thead,xt.th=xt.td,g.option||(xt.optgroup=xt.option=[1,"<select multiple='multiple'>","</select>"]);var wt=/<|&#?\w+;/;function Mt(t,e,n,i,r){for(var o,a,s,l,u,c,d=e.createDocumentFragment(),h=[],f=0,p=t.length;f<p;f++)if((o=t[f])||0===o)if("object"===w(o))A.merge(h,o.nodeType?[o]:o);else if(wt.test(o)){for(a=a||d.appendChild(e.createElement("div")),s=(vt.exec(o)||["",""])[1].toLowerCase(),l=xt[s]||xt._default,a.innerHTML=l[1]+A.htmlPrefilter(o)+l[2],c=l[0];c--;)a=a.lastChild;A.merge(h,a.childNodes),(a=d.firstChild).textContent=""}else h.push(e.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(i&&A.inArray(o,i)>-1)r&&r.push(o);else if(u=st(o),a=bt(d.appendChild(o),"script"),u&&_t(a),n)for(c=0;o=a[c++];)yt.test(o.type||"")&&n.push(o);return d}var At=/^([^.]*)(?:\.(.+)|)/;function Tt(){return!0}function Ct(){return!1}function Et(t,e){return t===function(){try{return x.activeElement}catch(t){}}()==("focus"===e)}function St(t,e,n,i,r,o){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(i=i||n,n=void 0),e)St(t,s,n,i,e[s],o);return t}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=Ct;else if(!r)return t;return 1===o&&(a=r,r=function(t){return A().off(t),a.apply(this,arguments)},r.guid=a.guid||(a.guid=A.guid++)),t.each((function(){A.event.add(this,e,r,i,n)}))}function kt(t,e,n){n?(J.set(t,e,!1),A.event.add(t,e,{namespace:!1,handler:function(t){var i,r,o=J.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(A.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=s.call(arguments),J.set(this,e,o),i=n(this,e),this[e](),o!==(r=J.get(this,e))||i?J.set(this,e,!1):r={},o!==r)return t.stopImmediatePropagation(),t.preventDefault(),r&&r.value}else o.length&&(J.set(this,e,{value:A.event.trigger(A.extend(o[0],A.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===J.get(t,e)&&A.event.add(t,e,Tt)}A.event={global:{},add:function(t,e,n,i,r){var o,a,s,l,u,c,d,h,f,p,m,g=J.get(t);if(K(t))for(n.handler&&(n=(o=n).handler,r=o.selector),r&&A.find.matchesSelector(at,r),n.guid||(n.guid=A.guid++),(l=g.events)||(l=g.events=Object.create(null)),(a=g.handle)||(a=g.handle=function(e){return void 0!==A&&A.event.triggered!==e.type?A.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(N)||[""]).length;u--;)f=m=(s=At.exec(e[u])||[])[1],p=(s[2]||"").split(".").sort(),f&&(d=A.event.special[f]||{},f=(r?d.delegateType:d.bindType)||f,d=A.event.special[f]||{},c=A.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&A.expr.match.needsContext.test(r),namespace:p.join(".")},o),(h=l[f])||((h=l[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,i,p,a)||t.addEventListener&&t.addEventListener(f,a)),d.add&&(d.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,c):h.push(c),A.event.global[f]=!0)},remove:function(t,e,n,i,r){var o,a,s,l,u,c,d,h,f,p,m,g=J.hasData(t)&&J.get(t);if(g&&(l=g.events)){for(u=(e=(e||"").match(N)||[""]).length;u--;)if(f=m=(s=At.exec(e[u])||[])[1],p=(s[2]||"").split(".").sort(),f){for(d=A.event.special[f]||{},h=l[f=(i?d.delegateType:d.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)c=h[o],!r&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,d.remove&&d.remove.call(t,c));a&&!h.length&&(d.teardown&&!1!==d.teardown.call(t,p,g.handle)||A.removeEvent(t,f,g.handle),delete l[f])}else for(f in l)A.event.remove(t,f+e[u],n,i,!0);A.isEmptyObject(l)&&J.remove(t,"handle events")}},dispatch:function(t){var e,n,i,r,o,a,s=new Array(arguments.length),l=A.event.fix(t),u=(J.get(this,"events")||Object.create(null))[l.type]||[],c=A.event.special[l.type]||{};for(s[0]=l,e=1;e<arguments.length;e++)s[e]=arguments[e];if(l.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,l)){for(a=A.event.handlers.call(this,l,u),e=0;(r=a[e++])&&!l.isPropagationStopped();)for(l.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==o.namespace&&!l.rnamespace.test(o.namespace)||(l.handleObj=o,l.data=o.data,void 0!==(i=((A.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,s))&&!1===(l.result=i)&&(l.preventDefault(),l.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,l),l.result}},handlers:function(t,e){var n,i,r,o,a,s=[],l=e.delegateCount,u=t.target;if(l&&u.nodeType&&!("click"===t.type&&t.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(o=[],a={},n=0;n<l;n++)void 0===a[r=(i=e[n]).selector+" "]&&(a[r]=i.needsContext?A(r,this).index(u)>-1:A.find(r,this,null,[u]).length),a[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return u=this,l<e.length&&s.push({elem:u,handlers:e.slice(l)}),s},addProp:function(t,e){Object.defineProperty(A.Event.prototype,t,{enumerable:!0,configurable:!0,get:v(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[A.expando]?t:new A.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return gt.test(e.type)&&e.click&&P(e,"input")&&kt(e,"click",Tt),!1},trigger:function(t){var e=this||t;return gt.test(e.type)&&e.click&&P(e,"input")&&kt(e,"click"),!0},_default:function(t){var e=t.target;return gt.test(e.type)&&e.click&&P(e,"input")&&J.get(e,"click")||P(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},A.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},A.Event=function(t,e){if(!(this instanceof A.Event))return new A.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Tt:Ct,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&A.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[A.expando]=!0},A.Event.prototype={constructor:A.Event,isDefaultPrevented:Ct,isPropagationStopped:Ct,isImmediatePropagationStopped:Ct,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Tt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Tt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Tt,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},A.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},A.event.addProp),A.each({focus:"focusin",blur:"focusout"},(function(t,e){A.event.special[t]={setup:function(){return kt(this,t,Et),!1},trigger:function(){return kt(this,t),!0},_default:function(){return!0},delegateType:e}})),A.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){A.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,r=t.relatedTarget,o=t.handleObj;return r&&(r===i||A.contains(i,r))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}})),A.fn.extend({on:function(t,e,n,i){return St(this,t,e,n,i)},one:function(t,e,n,i){return St(this,t,e,n,i,1)},off:function(t,e,n){var i,r;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,A(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(r in t)this.off(r,e,t[r]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=Ct),this.each((function(){A.event.remove(this,t,n,e)}))}});var Pt=/<script|<style|<link/i,Ot=/checked\s*(?:[^=]|=\s*.checked.)/i,Rt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Lt(t,e){return P(t,"table")&&P(11!==e.nodeType?e:e.firstChild,"tr")&&A(t).children("tbody")[0]||t}function Dt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function It(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Ft(t,e){var n,i,r,o,a,s;if(1===e.nodeType){if(J.hasData(t)&&(s=J.get(t).events))for(r in J.remove(e,"handle events"),s)for(n=0,i=s[r].length;n<i;n++)A.event.add(e,r,s[r][n]);$.hasData(t)&&(o=$.access(t),a=A.extend({},o),$.set(e,a))}}function jt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&gt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Nt(t,e,n,i){e=l(e);var r,o,a,s,u,c,d=0,h=t.length,f=h-1,p=e[0],m=v(p);if(m||h>1&&"string"==typeof p&&!g.checkClone&&Ot.test(p))return t.each((function(r){var o=t.eq(r);m&&(e[0]=p.call(this,r,o.html())),Nt(o,e,n,i)}));if(h&&(o=(r=Mt(e,t[0].ownerDocument,!1,t,i)).firstChild,1===r.childNodes.length&&(r=o),o||i)){for(s=(a=A.map(bt(r,"script"),Dt)).length;d<h;d++)u=r,d!==f&&(u=A.clone(u,!0,!0),s&&A.merge(a,bt(u,"script"))),n.call(t[d],u,d);if(s)for(c=a[a.length-1].ownerDocument,A.map(a,It),d=0;d<s;d++)u=a[d],yt.test(u.type||"")&&!J.access(u,"globalEval")&&A.contains(c,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?A._evalUrl&&!u.noModule&&A._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},c):_(u.textContent.replace(Rt,""),u,c))}return t}function zt(t,e,n){for(var i,r=e?A.filter(e,t):t,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||A.cleanData(bt(i)),i.parentNode&&(n&&st(i)&&_t(bt(i,"script")),i.parentNode.removeChild(i));return t}A.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var i,r,o,a,s=t.cloneNode(!0),l=st(t);if(!(g.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||A.isXMLDoc(t)))for(a=bt(s),i=0,r=(o=bt(t)).length;i<r;i++)jt(o[i],a[i]);if(e)if(n)for(o=o||bt(t),a=a||bt(s),i=0,r=o.length;i<r;i++)Ft(o[i],a[i]);else Ft(t,s);return(a=bt(s,"script")).length>0&&_t(a,!l&&bt(t,"script")),s},cleanData:function(t){for(var e,n,i,r=A.event.special,o=0;void 0!==(n=t[o]);o++)if(K(n)){if(e=n[J.expando]){if(e.events)for(i in e.events)r[i]?A.event.remove(n,i):A.removeEvent(n,i,e.handle);n[J.expando]=void 0}n[$.expando]&&(n[$.expando]=void 0)}}}),A.fn.extend({detach:function(t){return zt(this,t,!0)},remove:function(t){return zt(this,t)},text:function(t){return W(this,(function(t){return void 0===t?A.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Nt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Lt(this,t).appendChild(t)}))},prepend:function(){return Nt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Lt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Nt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Nt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(A.cleanData(bt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return A.clone(this,t,e)}))},html:function(t){return W(this,(function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Pt.test(t)&&!xt[(vt.exec(t)||["",""])[1].toLowerCase()]){t=A.htmlPrefilter(t);try{for(;n<i;n++)1===(e=this[n]||{}).nodeType&&(A.cleanData(bt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Nt(this,arguments,(function(e){var n=this.parentNode;A.inArray(this,t)<0&&(A.cleanData(bt(this)),n&&n.replaceChild(e,this))}),t)}}),A.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){A.fn[t]=function(t){for(var n,i=[],r=A(t),o=r.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),A(r[a])[e](n),u.apply(i,n.get());return this.pushStack(i)}}));var Bt=new RegExp("^("+it+")(?!px)[a-z%]+$","i"),Vt=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=i),e.getComputedStyle(t)},Gt=function(t,e,n){var i,r,o={};for(r in e)o[r]=t.style[r],t.style[r]=e[r];for(r in i=n.call(t),e)t.style[r]=o[r];return i},Ut=new RegExp(ot.join("|"),"i");function qt(t,e,n){var i,r,o,a,s=t.style;return(n=n||Vt(t))&&(""!==(a=n.getPropertyValue(e)||n[e])||st(t)||(a=A.style(t,e)),!g.pixelBoxStyles()&&Bt.test(a)&&Ut.test(e)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o)),void 0!==a?a+"":a}function Wt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(c){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",at.appendChild(u).appendChild(c);var t=i.getComputedStyle(c);n="1%"!==t.top,l=12===e(t.marginLeft),c.style.right="60%",a=36===e(t.right),r=36===e(t.width),c.style.position="absolute",o=12===e(c.offsetWidth/3),at.removeChild(u),c=null}}function e(t){return Math.round(parseFloat(t))}var n,r,o,a,s,l,u=x.createElement("div"),c=x.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===c.style.backgroundClip,A.extend(g,{boxSizingReliable:function(){return t(),r},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),n},reliableMarginLeft:function(){return t(),l},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,e,n,r;return null==s&&(t=x.createElement("table"),e=x.createElement("tr"),n=x.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",e.style.cssText="border:1px solid",e.style.height="1px",n.style.height="9px",n.style.display="block",at.appendChild(t).appendChild(e).appendChild(n),r=i.getComputedStyle(e),s=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===e.offsetHeight,at.removeChild(t)),s}}))}();var Ht=["Webkit","Moz","ms"],Zt=x.createElement("div").style,Xt={};function Qt(t){var e=A.cssProps[t]||Xt[t];return e||(t in Zt?t:Xt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Ht.length;n--;)if((t=Ht[n]+e)in Zt)return t}(t)||t)}var Kt=/^(none|table(?!-c[ea]).+)/,Yt=/^--/,Jt={position:"absolute",visibility:"hidden",display:"block"},$t={letterSpacing:"0",fontWeight:"400"};function te(t,e,n){var i=rt.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function ee(t,e,n,i,r,o){var a="width"===e?1:0,s=0,l=0;if(n===(i?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=A.css(t,n+ot[a],!0,r)),i?("content"===n&&(l-=A.css(t,"padding"+ot[a],!0,r)),"margin"!==n&&(l-=A.css(t,"border"+ot[a]+"Width",!0,r))):(l+=A.css(t,"padding"+ot[a],!0,r),"padding"!==n?l+=A.css(t,"border"+ot[a]+"Width",!0,r):s+=A.css(t,"border"+ot[a]+"Width",!0,r));return!i&&o>=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-l-s-.5))||0),l}function ne(t,e,n){var i=Vt(t),r=(!g.boxSizingReliable()||n)&&"border-box"===A.css(t,"boxSizing",!1,i),o=r,a=qt(t,e,i),s="offset"+e[0].toUpperCase()+e.slice(1);if(Bt.test(a)){if(!n)return a;a="auto"}return(!g.boxSizingReliable()&&r||!g.reliableTrDimensions()&&P(t,"tr")||"auto"===a||!parseFloat(a)&&"inline"===A.css(t,"display",!1,i))&&t.getClientRects().length&&(r="border-box"===A.css(t,"boxSizing",!1,i),(o=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+ee(t,e,n||(r?"border":"content"),o,i,a)+"px"}function ie(t,e,n,i,r){return new ie.prototype.init(t,e,n,i,r)}A.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=qt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,a,s=Q(e),l=Yt.test(e),u=t.style;if(l||(e=Qt(s)),a=A.cssHooks[e]||A.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(r=a.get(t,!1,i))?r:u[e];"string"===(o=typeof n)&&(r=rt.exec(n))&&r[1]&&(n=ct(t,e,r),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=r&&r[3]||(A.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==n||0!==e.indexOf("background")||(u[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,i))||(l?u.setProperty(e,n):u[e]=n))}},css:function(t,e,n,i){var r,o,a,s=Q(e);return Yt.test(e)||(e=Qt(s)),(a=A.cssHooks[e]||A.cssHooks[s])&&"get"in a&&(r=a.get(t,!0,n)),void 0===r&&(r=qt(t,e,i)),"normal"===r&&e in $t&&(r=$t[e]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),A.each(["height","width"],(function(t,e){A.cssHooks[e]={get:function(t,n,i){if(n)return!Kt.test(A.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ne(t,e,i):Gt(t,Jt,(function(){return ne(t,e,i)}))},set:function(t,n,i){var r,o=Vt(t),a=!g.scrollboxSize()&&"absolute"===o.position,s=(a||i)&&"border-box"===A.css(t,"boxSizing",!1,o),l=i?ee(t,e,i,s,o):0;return s&&a&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ee(t,e,"border",!1,o)-.5)),l&&(r=rt.exec(n))&&"px"!==(r[3]||"px")&&(t.style[e]=n,n=A.css(t,e)),te(0,n,l)}}})),A.cssHooks.marginLeft=Wt(g.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(qt(t,"marginLeft"))||t.getBoundingClientRect().left-Gt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),A.each({margin:"",padding:"",border:"Width"},(function(t,e){A.cssHooks[t+e]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];i<4;i++)r[t+ot[i]+e]=o[i]||o[i-2]||o[0];return r}},"margin"!==t&&(A.cssHooks[t+e].set=te)})),A.fn.extend({css:function(t,e){return W(this,(function(t,e,n){var i,r,o={},a=0;if(Array.isArray(e)){for(i=Vt(t),r=e.length;a<r;a++)o[e[a]]=A.css(t,e[a],!1,i);return o}return void 0!==n?A.style(t,e,n):A.css(t,e)}),t,e,arguments.length>1)}}),A.Tween=ie,ie.prototype={constructor:ie,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||A.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(A.cssNumber[n]?"":"px")},cur:function(){var t=ie.propHooks[this.prop];return t&&t.get?t.get(this):ie.propHooks._default.get(this)},run:function(t){var e,n=ie.propHooks[this.prop];return this.options.duration?this.pos=e=A.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ie.propHooks._default.set(this),this}},ie.prototype.init.prototype=ie.prototype,ie.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=A.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){A.fx.step[t.prop]?A.fx.step[t.prop](t):1!==t.elem.nodeType||!A.cssHooks[t.prop]&&null==t.elem.style[Qt(t.prop)]?t.elem[t.prop]=t.now:A.style(t.elem,t.prop,t.now+t.unit)}}},ie.propHooks.scrollTop=ie.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},A.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},A.fx=ie.prototype.init,A.fx.step={};var re,oe,ae=/^(?:toggle|show|hide)$/,se=/queueHooks$/;function le(){oe&&(!1===x.hidden&&i.requestAnimationFrame?i.requestAnimationFrame(le):i.setTimeout(le,A.fx.interval),A.fx.tick())}function ue(){return i.setTimeout((function(){re=void 0})),re=Date.now()}function ce(t,e){var n,i=0,r={height:t};for(e=e?1:0;i<4;i+=2-e)r["margin"+(n=ot[i])]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function de(t,e,n){for(var i,r=(he.tweeners[e]||[]).concat(he.tweeners["*"]),o=0,a=r.length;o<a;o++)if(i=r[o].call(n,e,t))return i}function he(t,e,n){var i,r,o=0,a=he.prefilters.length,s=A.Deferred().always((function(){delete l.elem})),l=function(){if(r)return!1;for(var e=re||ue(),n=Math.max(0,u.startTime+u.duration-e),i=1-(n/u.duration||0),o=0,a=u.tweens.length;o<a;o++)u.tweens[o].run(i);return s.notifyWith(t,[u,i,n]),i<1&&a?n:(a||s.notifyWith(t,[u,1,0]),s.resolveWith(t,[u]),!1)},u=s.promise({elem:t,props:A.extend({},e),opts:A.extend(!0,{specialEasing:{},easing:A.easing._default},n),originalProperties:e,originalOptions:n,startTime:re||ue(),duration:n.duration,tweens:[],createTween:function(e,n){var i=A.Tween(t,u.opts,e,n,u.opts.specialEasing[e]||u.opts.easing);return u.tweens.push(i),i},stop:function(e){var n=0,i=e?u.tweens.length:0;if(r)return this;for(r=!0;n<i;n++)u.tweens[n].run(1);return e?(s.notifyWith(t,[u,1,0]),s.resolveWith(t,[u,e])):s.rejectWith(t,[u,e]),this}}),c=u.props;for(!function(t,e){var n,i,r,o,a;for(n in t)if(r=e[i=Q(n)],o=t[n],Array.isArray(o)&&(r=o[1],o=t[n]=o[0]),n!==i&&(t[i]=o,delete t[n]),(a=A.cssHooks[i])&&"expand"in a)for(n in o=a.expand(o),delete t[i],o)n in t||(t[n]=o[n],e[n]=r);else e[i]=r}(c,u.opts.specialEasing);o<a;o++)if(i=he.prefilters[o].call(u,t,c,u.opts))return v(i.stop)&&(A._queueHooks(u.elem,u.opts.queue).stop=i.stop.bind(i)),i;return A.map(c,de,u),v(u.opts.start)&&u.opts.start.call(t,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),A.fx.timer(A.extend(l,{elem:t,anim:u,queue:u.opts.queue})),u}A.Animation=A.extend(he,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return ct(n.elem,t,rt.exec(e),n),n}]},tweener:function(t,e){v(t)?(e=t,t=["*"]):t=t.match(N);for(var n,i=0,r=t.length;i<r;i++)n=t[i],he.tweeners[n]=he.tweeners[n]||[],he.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var i,r,o,a,s,l,u,c,d="width"in e||"height"in e,h=this,f={},p=t.style,m=t.nodeType&&ut(t),g=J.get(t,"fxshow");for(i in n.queue||(null==(a=A._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,A.queue(t,"fx").length||a.empty.fire()}))}))),e)if(r=e[i],ae.test(r)){if(delete e[i],o=o||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;m=!0}f[i]=g&&g[i]||A.style(t,i)}if((l=!A.isEmptyObject(e))||!A.isEmptyObject(f))for(i in d&&1===t.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(u=g&&g.display)&&(u=J.get(t,"display")),"none"===(c=A.css(t,"display"))&&(u?c=u:(ft([t],!0),u=t.style.display||u,c=A.css(t,"display"),ft([t]))),("inline"===c||"inline-block"===c&&null!=u)&&"none"===A.css(t,"float")&&(l||(h.done((function(){p.display=u})),null==u&&(c=p.display,u="none"===c?"":c)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),l=!1,f)l||(g?"hidden"in g&&(m=g.hidden):g=J.access(t,"fxshow",{display:u}),o&&(g.hidden=!m),m&&ft([t],!0),h.done((function(){for(i in m||ft([t]),J.remove(t,"fxshow"),f)A.style(t,i,f[i])}))),l=de(m?g[i]:0,i,h),i in g||(g[i]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?he.prefilters.unshift(t):he.prefilters.push(t)}}),A.speed=function(t,e,n){var i=t&&"object"==typeof t?A.extend({},t):{complete:n||!n&&e||v(t)&&t,duration:t,easing:n&&e||e&&!v(e)&&e};return A.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in A.fx.speeds?i.duration=A.fx.speeds[i.duration]:i.duration=A.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){v(i.old)&&i.old.call(this),i.queue&&A.dequeue(this,i.queue)},i},A.fn.extend({fadeTo:function(t,e,n,i){return this.filter(ut).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var r=A.isEmptyObject(t),o=A.speed(e,n,i),a=function(){var e=he(this,A.extend({},t),o);(r||J.get(this,"finish"))&&e.stop(!0)};return a.finish=a,r||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,r=null!=t&&t+"queueHooks",o=A.timers,a=J.get(this);if(r)a[r]&&a[r].stop&&i(a[r]);else for(r in a)a[r]&&a[r].stop&&se.test(r)&&i(a[r]);for(r=o.length;r--;)o[r].elem!==this||null!=t&&o[r].queue!==t||(o[r].anim.stop(n),e=!1,o.splice(r,1));!e&&n||A.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=J.get(this),i=n[t+"queue"],r=n[t+"queueHooks"],o=A.timers,a=i?i.length:0;for(n.finish=!0,A.queue(this,t,[]),r&&r.stop&&r.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<a;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish}))}}),A.each(["toggle","show","hide"],(function(t,e){var n=A.fn[e];A.fn[e]=function(t,i,r){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(ce(e,!0),t,i,r)}})),A.each({slideDown:ce("show"),slideUp:ce("hide"),slideToggle:ce("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){A.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}})),A.timers=[],A.fx.tick=function(){var t,e=0,n=A.timers;for(re=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||A.fx.stop(),re=void 0},A.fx.timer=function(t){A.timers.push(t),A.fx.start()},A.fx.interval=13,A.fx.start=function(){oe||(oe=!0,le())},A.fx.stop=function(){oe=null},A.fx.speeds={slow:600,fast:200,_default:400},A.fn.delay=function(t,e){return t=A.fx&&A.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,n){var r=i.setTimeout(e,t);n.stop=function(){i.clearTimeout(r)}}))},function(){var t=x.createElement("input"),e=x.createElement("select").appendChild(x.createElement("option"));t.type="checkbox",g.checkOn=""!==t.value,g.optSelected=e.selected,(t=x.createElement("input")).value="t",t.type="radio",g.radioValue="t"===t.value}();var fe,pe=A.expr.attrHandle;A.fn.extend({attr:function(t,e){return W(this,A.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){A.removeAttr(this,t)}))}}),A.extend({attr:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?A.prop(t,e,n):(1===o&&A.isXMLDoc(t)||(r=A.attrHooks[e.toLowerCase()]||(A.expr.match.bool.test(e)?fe:void 0)),void 0!==n?null===n?void A.removeAttr(t,e):r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n):r&&"get"in r&&null!==(i=r.get(t,e))?i:null==(i=A.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!g.radioValue&&"radio"===e&&P(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,r=e&&e.match(N);if(r&&1===t.nodeType)for(;n=r[i++];)t.removeAttribute(n)}}),fe={set:function(t,e,n){return!1===e?A.removeAttr(t,n):t.setAttribute(n,n),n}},A.each(A.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=pe[e]||A.find.attr;pe[e]=function(t,e,i){var r,o,a=e.toLowerCase();return i||(o=pe[a],pe[a]=r,r=null!=n(t,e,i)?a:null,pe[a]=o),r}}));var me=/^(?:input|select|textarea|button)$/i,ge=/^(?:a|area)$/i;function ve(t){return(t.match(N)||[]).join(" ")}function ye(t){return t.getAttribute&&t.getAttribute("class")||""}function xe(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(N)||[]}A.fn.extend({prop:function(t,e){return W(this,A.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[A.propFix[t]||t]}))}}),A.extend({prop:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&A.isXMLDoc(t)||(e=A.propFix[e]||e,r=A.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=A.find.attr(t,"tabindex");return e?parseInt(e,10):me.test(t.nodeName)||ge.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(A.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),A.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){A.propFix[this.toLowerCase()]=this})),A.fn.extend({addClass:function(t){var e,n,i,r,o,a,s,l=0;if(v(t))return this.each((function(e){A(this).addClass(t.call(this,e,ye(this)))}));if((e=xe(t)).length)for(;n=this[l++];)if(r=ye(n),i=1===n.nodeType&&" "+ve(r)+" "){for(a=0;o=e[a++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");r!==(s=ve(i))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,i,r,o,a,s,l=0;if(v(t))return this.each((function(e){A(this).removeClass(t.call(this,e,ye(this)))}));if(!arguments.length)return this.attr("class","");if((e=xe(t)).length)for(;n=this[l++];)if(r=ye(n),i=1===n.nodeType&&" "+ve(r)+" "){for(a=0;o=e[a++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");r!==(s=ve(i))&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=typeof t,i="string"===n||Array.isArray(t);return"boolean"==typeof e&&i?e?this.addClass(t):this.removeClass(t):v(t)?this.each((function(n){A(this).toggleClass(t.call(this,n,ye(this),e),e)})):this.each((function(){var e,r,o,a;if(i)for(r=0,o=A(this),a=xe(t);e=a[r++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||((e=ye(this))&&J.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":J.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+ve(ye(n))+" ").indexOf(e)>-1)return!0;return!1}});var be=/\r/g;A.fn.extend({val:function(t){var e,n,i,r=this[0];return arguments.length?(i=v(t),this.each((function(n){var r;1===this.nodeType&&(null==(r=i?t.call(this,n,A(this).val()):t)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=A.map(r,(function(t){return null==t?"":t+""}))),(e=A.valHooks[this.type]||A.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))}))):r?(e=A.valHooks[r.type]||A.valHooks[r.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(be,""):null==n?"":n:void 0}}),A.extend({valHooks:{option:{get:function(t){var e=A.find.attr(t,"value");return null!=e?e:ve(A.text(t))}},select:{get:function(t){var e,n,i,r=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],l=a?o+1:r.length;for(i=o<0?l:a?o:0;i<l;i++)if(((n=r[i]).selected||i===o)&&!n.disabled&&(!n.parentNode.disabled||!P(n.parentNode,"optgroup"))){if(e=A(n).val(),a)return e;s.push(e)}return s},set:function(t,e){for(var n,i,r=t.options,o=A.makeArray(e),a=r.length;a--;)((i=r[a]).selected=A.inArray(A.valHooks.option.get(i),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),A.each(["radio","checkbox"],(function(){A.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=A.inArray(A(t).val(),e)>-1}},g.checkOn||(A.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),g.focusin="onfocusin"in i;var _e=/^(?:focusinfocus|focusoutblur)$/,we=function(t){t.stopPropagation()};A.extend(A.event,{trigger:function(t,e,n,r){var o,a,s,l,u,c,d,h,p=[n||x],m=f.call(t,"type")?t.type:t,g=f.call(t,"namespace")?t.namespace.split("."):[];if(a=h=s=n=n||x,3!==n.nodeType&&8!==n.nodeType&&!_e.test(m+A.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),u=m.indexOf(":")<0&&"on"+m,(t=t[A.expando]?t:new A.Event(m,"object"==typeof t&&t)).isTrigger=r?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:A.makeArray(e,[t]),d=A.event.special[m]||{},r||!d.trigger||!1!==d.trigger.apply(n,e))){if(!r&&!d.noBubble&&!y(n)){for(l=d.delegateType||m,_e.test(l+m)||(a=a.parentNode);a;a=a.parentNode)p.push(a),s=a;s===(n.ownerDocument||x)&&p.push(s.defaultView||s.parentWindow||i)}for(o=0;(a=p[o++])&&!t.isPropagationStopped();)h=a,t.type=o>1?l:d.bindType||m,(c=(J.get(a,"events")||Object.create(null))[t.type]&&J.get(a,"handle"))&&c.apply(a,e),(c=u&&a[u])&&c.apply&&K(a)&&(t.result=c.apply(a,e),!1===t.result&&t.preventDefault());return t.type=m,r||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),e)||!K(n)||u&&v(n[m])&&!y(n)&&((s=n[u])&&(n[u]=null),A.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,we),n[m](),t.isPropagationStopped()&&h.removeEventListener(m,we),A.event.triggered=void 0,s&&(n[u]=s)),t.result}},simulate:function(t,e,n){var i=A.extend(new A.Event,n,{type:t,isSimulated:!0});A.event.trigger(i,null,e)}}),A.fn.extend({trigger:function(t,e){return this.each((function(){A.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return A.event.trigger(t,e,n,!0)}}),g.focusin||A.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){A.event.simulate(e,t.target,A.event.fix(t))};A.event.special[e]={setup:function(){var i=this.ownerDocument||this.document||this,r=J.access(i,e);r||i.addEventListener(t,n,!0),J.access(i,e,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,r=J.access(i,e)-1;r?J.access(i,e,r):(i.removeEventListener(t,n,!0),J.remove(i,e))}}}));var Me=i.location,Ae={guid:Date.now()},Te=/\?/;A.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{e=(new i.DOMParser).parseFromString(t,"text/xml")}catch(t){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||A.error("Invalid XML: "+(n?A.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var Ce=/\[\]$/,Ee=/\r?\n/g,Se=/^(?:submit|button|image|reset|file)$/i,ke=/^(?:input|select|textarea|keygen)/i;function Pe(t,e,n,i){var r;if(Array.isArray(e))A.each(e,(function(e,r){n||Ce.test(t)?i(t,r):Pe(t+"["+("object"==typeof r&&null!=r?e:"")+"]",r,n,i)}));else if(n||"object"!==w(e))i(t,e);else for(r in e)Pe(t+"["+r+"]",e[r],n,i)}A.param=function(t,e){var n,i=[],r=function(t,e){var n=v(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!A.isPlainObject(t))A.each(t,(function(){r(this.name,this.value)}));else for(n in t)Pe(n,t[n],e,r);return i.join("&")},A.fn.extend({serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=A.prop(this,"elements");return t?A.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!A(this).is(":disabled")&&ke.test(this.nodeName)&&!Se.test(t)&&(this.checked||!gt.test(t))})).map((function(t,e){var n=A(this).val();return null==n?null:Array.isArray(n)?A.map(n,(function(t){return{name:e.name,value:t.replace(Ee,"\r\n")}})):{name:e.name,value:n.replace(Ee,"\r\n")}})).get()}});var Oe=/%20/g,Re=/#.*$/,Le=/([?&])_=[^&]*/,De=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ie=/^(?:GET|HEAD)$/,Fe=/^\/\//,je={},Ne={},ze="*/".concat("*"),Be=x.createElement("a");function Ve(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,r=0,o=e.toLowerCase().match(N)||[];if(v(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function Ge(t,e,n,i){var r={},o=t===Ne;function a(s){var l;return r[s]=!0,A.each(t[s]||[],(function(t,s){var u=s(e,n,i);return"string"!=typeof u||o||r[u]?o?!(l=u):void 0:(e.dataTypes.unshift(u),a(u),!1)})),l}return a(e.dataTypes[0])||!r["*"]&&a("*")}function Ue(t,e){var n,i,r=A.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((r[n]?t:i||(i={}))[n]=e[n]);return i&&A.extend(!0,t,i),t}Be.href=Me.href,A.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Me.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Me.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ze,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":A.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Ue(Ue(t,A.ajaxSettings),e):Ue(A.ajaxSettings,t)},ajaxPrefilter:Ve(je),ajaxTransport:Ve(Ne),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,r,o,a,s,l,u,c,d,h,f=A.ajaxSetup({},e),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?A(p):A.event,g=A.Deferred(),v=A.Callbacks("once memory"),y=f.statusCode||{},b={},_={},w="canceled",M={readyState:0,getResponseHeader:function(t){var e;if(u){if(!a)for(a={};e=De.exec(o);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(t,e){return null==u&&(t=_[t.toLowerCase()]=_[t.toLowerCase()]||t,b[t]=e),this},overrideMimeType:function(t){return null==u&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(u)M.always(t[M.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||w;return n&&n.abort(e),T(0,e),this}};if(g.promise(M),f.url=((t||f.url||Me.href)+"").replace(Fe,Me.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(N)||[""],null==f.crossDomain){l=x.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=Be.protocol+"//"+Be.host!=l.protocol+"//"+l.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=A.param(f.data,f.traditional)),Ge(je,f,e,M),u)return M;for(d in(c=A.event&&f.global)&&0==A.active++&&A.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Ie.test(f.type),r=f.url.replace(Re,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Oe,"+")):(h=f.url.slice(r.length),f.data&&(f.processData||"string"==typeof f.data)&&(r+=(Te.test(r)?"&":"?")+f.data,delete f.data),!1===f.cache&&(r=r.replace(Le,"$1"),h=(Te.test(r)?"&":"?")+"_="+Ae.guid+++h),f.url=r+h),f.ifModified&&(A.lastModified[r]&&M.setRequestHeader("If-Modified-Since",A.lastModified[r]),A.etag[r]&&M.setRequestHeader("If-None-Match",A.etag[r])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&M.setRequestHeader("Content-Type",f.contentType),M.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+ze+"; q=0.01":""):f.accepts["*"]),f.headers)M.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,M,f)||u))return M.abort();if(w="abort",v.add(f.complete),M.done(f.success),M.fail(f.error),n=Ge(Ne,f,e,M)){if(M.readyState=1,c&&m.trigger("ajaxSend",[M,f]),u)return M;f.async&&f.timeout>0&&(s=i.setTimeout((function(){M.abort("timeout")}),f.timeout));try{u=!1,n.send(b,T)}catch(t){if(u)throw t;T(-1,t)}}else T(-1,"No Transport");function T(t,e,a,l){var d,h,x,b,_,w=e;u||(u=!0,s&&i.clearTimeout(s),n=void 0,o=l||"",M.readyState=t>0?4:0,d=t>=200&&t<300||304===t,a&&(b=function(t,e,n){for(var i,r,o,a,s=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(r in s)if(s[r]&&s[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||t.converters[r+" "+l[0]]){o=r;break}a||(a=r)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),n[o]}(f,M,a)),!d&&A.inArray("script",f.dataTypes)>-1&&A.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),b=function(t,e,n,i){var r,o,a,s,l,u={},c=t.dataTypes.slice();if(c[1])for(a in t.converters)u[a.toLowerCase()]=t.converters[a];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=u[l+" "+o]||u["* "+o]))for(r in u)if((s=r.split(" "))[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[r]:!0!==u[r]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}(f,b,M,d),d?(f.ifModified&&((_=M.getResponseHeader("Last-Modified"))&&(A.lastModified[r]=_),(_=M.getResponseHeader("etag"))&&(A.etag[r]=_)),204===t||"HEAD"===f.type?w="nocontent":304===t?w="notmodified":(w=b.state,h=b.data,d=!(x=b.error))):(x=w,!t&&w||(w="error",t<0&&(t=0))),M.status=t,M.statusText=(e||w)+"",d?g.resolveWith(p,[h,w,M]):g.rejectWith(p,[M,w,x]),M.statusCode(y),y=void 0,c&&m.trigger(d?"ajaxSuccess":"ajaxError",[M,f,d?h:x]),v.fireWith(p,[M,w]),c&&(m.trigger("ajaxComplete",[M,f]),--A.active||A.event.trigger("ajaxStop")))}return M},getJSON:function(t,e,n){return A.get(t,e,n,"json")},getScript:function(t,e){return A.get(t,void 0,e,"script")}}),A.each(["get","post"],(function(t,e){A[e]=function(t,n,i,r){return v(n)&&(r=r||i,i=n,n=void 0),A.ajax(A.extend({url:t,type:e,dataType:r,data:n,success:i},A.isPlainObject(t)&&t))}})),A.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),A._evalUrl=function(t,e,n){return A.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){A.globalEval(t,e,n)}})},A.fn.extend({wrapAll:function(t){var e;return this[0]&&(v(t)&&(t=t.call(this[0])),e=A(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return v(t)?this.each((function(e){A(this).wrapInner(t.call(this,e))})):this.each((function(){var e=A(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=v(t);return this.each((function(n){A(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){A(this).replaceWith(this.childNodes)})),this}}),A.expr.pseudos.hidden=function(t){return!A.expr.pseudos.visible(t)},A.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},A.ajaxSettings.xhr=function(){try{return new i.XMLHttpRequest}catch(t){}};var qe={0:200,1223:204},We=A.ajaxSettings.xhr();g.cors=!!We&&"withCredentials"in We,g.ajax=We=!!We,A.ajaxTransport((function(t){var e,n;if(g.cors||We&&!t.crossDomain)return{send:function(r,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)s.setRequestHeader(a,r[a]);e=function(t){return function(){e&&(e=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(qe[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),n=s.onerror=s.ontimeout=e("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&i.setTimeout((function(){e&&n()}))},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),A.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),A.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return A.globalEval(t),t}}}),A.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),A.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(i,r){e=A("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&r("error"===t.type?404:200,t.type)}),x.head.appendChild(e[0])},abort:function(){n&&n()}}}));var He,Ze=[],Xe=/(=)\?(?=&|$)|\?\?/;A.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ze.pop()||A.expando+"_"+Ae.guid++;return this[t]=!0,t}}),A.ajaxPrefilter("json jsonp",(function(t,e,n){var r,o,a,s=!1!==t.jsonp&&(Xe.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Xe.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return r=t.jsonpCallback=v(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Xe,"$1"+r):!1!==t.jsonp&&(t.url+=(Te.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return a||A.error(r+" was not called"),a[0]},t.dataTypes[0]="json",o=i[r],i[r]=function(){a=arguments},n.always((function(){void 0===o?A(i).removeProp(r):i[r]=o,t[r]&&(t.jsonpCallback=e.jsonpCallback,Ze.push(r)),a&&v(o)&&o(a[0]),a=o=void 0})),"script"})),g.createHTMLDocument=((He=x.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===He.childNodes.length),A.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(g.createHTMLDocument?((i=(e=x.implementation.createHTMLDocument("")).createElement("base")).href=x.location.href,e.head.appendChild(i)):e=x),o=!n&&[],(r=O.exec(t))?[e.createElement(r[1])]:(r=Mt([t],e,o),o&&o.length&&A(o).remove(),A.merge([],r.childNodes)));var i,r,o},A.fn.load=function(t,e,n){var i,r,o,a=this,s=t.indexOf(" ");return s>-1&&(i=ve(t.slice(s)),t=t.slice(0,s)),v(e)?(n=e,e=void 0):e&&"object"==typeof e&&(r="POST"),a.length>0&&A.ajax({url:t,type:r||"GET",dataType:"html",data:e}).done((function(t){o=arguments,a.html(i?A("<div>").append(A.parseHTML(t)).find(i):t)})).always(n&&function(t,e){a.each((function(){n.apply(this,o||[t.responseText,e,t])}))}),this},A.expr.pseudos.animated=function(t){return A.grep(A.timers,(function(e){return t===e.elem})).length},A.offset={setOffset:function(t,e,n){var i,r,o,a,s,l,u=A.css(t,"position"),c=A(t),d={};"static"===u&&(t.style.position="relative"),s=c.offset(),o=A.css(t,"top"),l=A.css(t,"left"),("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1?(a=(i=c.position()).top,r=i.left):(a=parseFloat(o)||0,r=parseFloat(l)||0),v(e)&&(e=e.call(t,n,A.extend({},s))),null!=e.top&&(d.top=e.top-s.top+a),null!=e.left&&(d.left=e.left-s.left+r),"using"in e?e.using.call(t,d):c.css(d)}},A.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){A.offset.setOffset(this,t,e)}));var e,n,i=this[0];return i?i.getClientRects().length?(e=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,i=this[0],r={top:0,left:0};if("fixed"===A.css(i,"position"))e=i.getBoundingClientRect();else{for(e=this.offset(),n=i.ownerDocument,t=i.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===A.css(t,"position");)t=t.parentNode;t&&t!==i&&1===t.nodeType&&((r=A(t).offset()).top+=A.css(t,"borderTopWidth",!0),r.left+=A.css(t,"borderLeftWidth",!0))}return{top:e.top-r.top-A.css(i,"marginTop",!0),left:e.left-r.left-A.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===A.css(t,"position");)t=t.offsetParent;return t||at}))}}),A.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;A.fn[t]=function(i){return W(this,(function(t,i,r){var o;if(y(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===r)return o?o[e]:t[i];o?o.scrollTo(n?o.pageXOffset:r,n?r:o.pageYOffset):t[i]=r}),t,i,arguments.length)}})),A.each(["top","left"],(function(t,e){A.cssHooks[e]=Wt(g.pixelPosition,(function(t,n){if(n)return n=qt(t,e),Bt.test(n)?A(t).position()[e]+"px":n}))})),A.each({Height:"height",Width:"width"},(function(t,e){A.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,i){A.fn[i]=function(r,o){var a=arguments.length&&(n||"boolean"!=typeof r),s=n||(!0===r||!0===o?"margin":"border");return W(this,(function(e,n,r){var o;return y(e)?0===i.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===r?A.css(e,n,s):A.style(e,n,r,s)}),e,a?r:void 0,a)}}))})),A.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){A.fn[e]=function(t){return this.on(e,t)}})),A.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),A.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){A.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var Qe=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;A.proxy=function(t,e){var n,i,r;if("string"==typeof e&&(n=t[e],e=t,t=n),v(t))return i=s.call(arguments,2),r=function(){return t.apply(e||this,i.concat(s.call(arguments)))},r.guid=t.guid=t.guid||A.guid++,r},A.holdReady=function(t){t?A.readyWait++:A.ready(!0)},A.isArray=Array.isArray,A.parseJSON=JSON.parse,A.nodeName=P,A.isFunction=v,A.isWindow=y,A.camelCase=Q,A.type=w,A.now=Date.now,A.isNumeric=function(t){var e=A.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},A.trim=function(t){return null==t?"":(t+"").replace(Qe,"")},void 0===(n=function(){return A}.apply(e,[]))||(t.exports=n);var Ke=i.jQuery,Ye=i.$;return A.noConflict=function(t){return i.$===A&&(i.$=Ye),t&&i.jQuery===A&&(i.jQuery=Ke),A},void 0===r&&(i.jQuery=i.$=A),A}))},8173:function(t){t.exports=function(){"use strict";function t(n,i,r,o,a,s){if(!(a-o<=r)){var l=o+a>>1;e(n,i,l,o,a,s%2),t(n,i,r,o,l-1,s+1),t(n,i,r,l+1,a,s+1)}}function e(t,i,r,o,a,s){for(;a>o;){if(a-o>600){var l=a-o+1,u=r-o+1,c=Math.log(l),d=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*d*(l-d)/l)*(u-l/2<0?-1:1);e(t,i,r,Math.max(o,Math.floor(r-u*d/l+h)),Math.min(a,Math.floor(r+(l-u)*d/l+h)),s)}var f=i[2*r+s],p=o,m=a;for(n(t,i,o,r),i[2*a+s]>f&&n(t,i,o,a);p<m;){for(n(t,i,p,m),p++,m--;i[2*p+s]<f;)p++;for(;i[2*m+s]>f;)m--}i[2*o+s]===f?n(t,i,o,m):n(t,i,++m,a),m<=r&&(o=m+1),r<=m&&(a=m-1)}}function n(t,e,n,r){i(t,n,r),i(e,2*n,2*r),i(e,2*n+1,2*r+1)}function i(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function r(t,e,n,i,r,o,a){for(var s,l,u=[0,t.length-1,0],c=[];u.length;){var d=u.pop(),h=u.pop(),f=u.pop();if(h-f<=a)for(var p=f;p<=h;p++)s=e[2*p],l=e[2*p+1],s>=n&&s<=r&&l>=i&&l<=o&&c.push(t[p]);else{var m=Math.floor((f+h)/2);s=e[2*m],l=e[2*m+1],s>=n&&s<=r&&l>=i&&l<=o&&c.push(t[m]);var g=(d+1)%2;(0===d?n<=s:i<=l)&&(u.push(f),u.push(m-1),u.push(g)),(0===d?r>=s:o>=l)&&(u.push(m+1),u.push(h),u.push(g))}}return c}function o(t,e,n,i,r,o){for(var s=[0,t.length-1,0],l=[],u=r*r;s.length;){var c=s.pop(),d=s.pop(),h=s.pop();if(d-h<=o)for(var f=h;f<=d;f++)a(e[2*f],e[2*f+1],n,i)<=u&&l.push(t[f]);else{var p=Math.floor((h+d)/2),m=e[2*p],g=e[2*p+1];a(m,g,n,i)<=u&&l.push(t[p]);var v=(c+1)%2;(0===c?n-r<=m:i-r<=g)&&(s.push(h),s.push(p-1),s.push(v)),(0===c?n+r>=m:i+r>=g)&&(s.push(p+1),s.push(d),s.push(v))}}return l}function a(t,e,n,i){var r=t-n,o=e-i;return r*r+o*o}var s=function(t){return t[0]},l=function(t){return t[1]},u=function(e,n,i,r,o){void 0===n&&(n=s),void 0===i&&(i=l),void 0===r&&(r=64),void 0===o&&(o=Float64Array),this.nodeSize=r,this.points=e;for(var a=e.length<65536?Uint16Array:Uint32Array,u=this.ids=new a(e.length),c=this.coords=new o(2*e.length),d=0;d<e.length;d++)u[d]=d,c[2*d]=n(e[d]),c[2*d+1]=i(e[d]);t(u,c,r,0,u.length-1,0)};return u.prototype.range=function(t,e,n,i){return r(this.ids,this.coords,t,e,n,i,this.nodeSize)},u.prototype.within=function(t,e,n){return o(this.ids,this.coords,t,e,n,this.nodeSize)},u}()},3345:function(t,e,n){var i;!function(r,o,a){if(r){for(var s,l={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},u={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},c={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},d={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},h=1;h<20;++h)l[111+h]="f"+h;for(h=0;h<=9;++h)l[h+96]=h.toString();x.prototype.bind=function(t,e,n){var i=this;return t=t instanceof Array?t:[t],i._bindMultiple.call(i,t,e,n),i},x.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},x.prototype.trigger=function(t,e){var n=this;return n._directMap[t+":"+e]&&n._directMap[t+":"+e]({},t),n},x.prototype.reset=function(){var t=this;return t._callbacks={},t._directMap={},t},x.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(y(e,this.target))return!1;if("composedPath"in t&&"function"==typeof t.composedPath){var n=t.composedPath()[0];n!==t.target&&(e=n)}return"INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable},x.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},x.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(l[e]=t[e]);s=null},x.init=function(){var t=x(o);for(var e in t)"_"!==e.charAt(0)&&(x[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},x.init(),r.Mousetrap=x,t.exports&&(t.exports=x),void 0===(i=function(){return x}.call(e,n,e,t))||(t.exports=i)}function f(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)}function p(t){if("keypress"==t.type){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return l[t.which]?l[t.which]:u[t.which]?u[t.which]:String.fromCharCode(t.which).toLowerCase()}function m(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function g(t,e,n){return n||(n=function(){if(!s)for(var t in s={},l)t>95&&t<112||l.hasOwnProperty(t)&&(s[l[t]]=t);return s}()[t]?"keydown":"keypress"),"keypress"==n&&e.length&&(n="keydown"),n}function v(t,e){var n,i,r,o=[];for(n=function(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus")).split("+")}(t),r=0;r<n.length;++r)i=n[r],d[i]&&(i=d[i]),e&&"keypress"!=e&&c[i]&&(i=c[i],o.push("shift")),m(i)&&o.push(i);return{key:i,modifiers:o,action:e=g(i,o,e)}}function y(t,e){return null!==t&&t!==o&&(t===e||y(t.parentNode,e))}function x(t){var e=this;if(t=t||o,!(e instanceof x))return new x(t);e.target=t,e._callbacks={},e._directMap={};var n,i={},r=!1,a=!1,s=!1;function l(t){t=t||{};var e,n=!1;for(e in i)t[e]?n=!0:i[e]=0;n||(s=!1)}function u(t,n,r,o,a,s){var l,u,c,d,h=[],f=r.type;if(!e._callbacks[t])return[];for("keyup"==f&&m(t)&&(n=[t]),l=0;l<e._callbacks[t].length;++l)if(u=e._callbacks[t][l],(o||!u.seq||i[u.seq]==u.level)&&f==u.action&&("keypress"==f&&!r.metaKey&&!r.ctrlKey||(c=n,d=u.modifiers,c.sort().join(",")===d.sort().join(",")))){var p=!o&&u.combo==a,g=o&&u.seq==o&&u.level==s;(p||g)&&e._callbacks[t].splice(l,1),h.push(u)}return h}function c(t,n,i,r){e.stopCallback(n,n.target||n.srcElement,i,r)||!1===t(n,i)&&(function(t){t.preventDefault?t.preventDefault():t.returnValue=!1}(n),function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}(n))}function d(t){"number"!=typeof t.which&&(t.which=t.keyCode);var n=p(t);n&&("keyup"!=t.type||r!==n?e.handleKey(n,function(t){var e=[];return t.shiftKey&&e.push("shift"),t.altKey&&e.push("alt"),t.ctrlKey&&e.push("ctrl"),t.metaKey&&e.push("meta"),e}(t),t):r=!1)}function h(t,e,o,a){function u(e){return function(){s=e,++i[t],clearTimeout(n),n=setTimeout(l,1e3)}}function d(e){c(o,e,t),"keyup"!==a&&(r=p(e)),setTimeout(l,10)}i[t]=0;for(var h=0;h<e.length;++h){var f=h+1===e.length?d:u(a||v(e[h+1]).action);g(e[h],f,a,t,h)}}function g(t,n,i,r,o){e._directMap[t+":"+i]=n;var a,s=(t=t.replace(/\s+/g," ")).split(" ");s.length>1?h(t,s,n,i):(a=v(t,i),e._callbacks[a.key]=e._callbacks[a.key]||[],u(a.key,a.modifiers,{type:a.action},r,t,o),e._callbacks[a.key][r?"unshift":"push"]({callback:n,modifiers:a.modifiers,action:a.action,seq:r,level:o,combo:t}))}e._handleKey=function(t,e,n){var i,r=u(t,e,n),o={},d=0,h=!1;for(i=0;i<r.length;++i)r[i].seq&&(d=Math.max(d,r[i].level));for(i=0;i<r.length;++i)if(r[i].seq){if(r[i].level!=d)continue;h=!0,o[r[i].seq]=1,c(r[i].callback,n,r[i].combo,r[i].seq)}else h||c(r[i].callback,n,r[i].combo);var f="keypress"==n.type&&a;n.type!=s||m(t)||f||l(o),a=h&&"keydown"==n.type},e._bindMultiple=function(t,e,n){for(var i=0;i<t.length;++i)g(t[i],e,n)},f(t,"keypress",d),f(t,"keydown",d),f(t,"keyup",d)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)},6886:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var i=n(8217),r=n(7676);function o(t){return Math.abs(t)<i.pj?t:t-(0,r.Z)(t)*Math.PI}},759:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var i=n(8217),r=n(7676);function o(t){return Math.abs(t)<=i.U2?t:t-(0,r.Z)(t)*i.uo}},8348:function(t,e,n){"use strict";function i(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}n.d(e,{Z:function(){return i}})},4074:function(t,e,n){"use strict";function i(t){var e=Math.exp(t);return e=(e+1/e)/2}n.d(e,{Z:function(){return i}})},8053:function(t,e,n){"use strict";function i(t){return 1-.25*t*(1+t/16*(3+1.25*t))}n.d(e,{Z:function(){return i}})},7743:function(t,e,n){"use strict";function i(t){return.375*t*(1+.25*t*(1+.46875*t))}n.d(e,{Z:function(){return i}})},9032:function(t,e,n){"use strict";function i(t){return.05859375*t*t*(1+.75*t)}n.d(e,{Z:function(){return i}})},7325:function(t,e,n){"use strict";function i(t){return t*t*t*(35/3072)}n.d(e,{Z:function(){return i}})},918:function(t,e,n){"use strict";function i(t,e,n){var i=e*n;return t/Math.sqrt(1-i*i)}n.d(e,{Z:function(){return i}})},110:function(t,e,n){"use strict";function i(t,e){t=Math.abs(t),e=Math.abs(e);var n=Math.max(t,e),i=Math.min(t,e)/(n||1);return n*Math.sqrt(1+Math.pow(i,2))}n.d(e,{Z:function(){return i}})},6415:function(t,e,n){"use strict";function i(t,e,n,i,r){var o,a;o=t/e;for(var s=0;s<15;s++)if(o+=a=(t-(e*o-n*Math.sin(2*o)+i*Math.sin(4*o)-r*Math.sin(6*o)))/(e-2*n*Math.cos(2*o)+4*i*Math.cos(4*o)-6*r*Math.cos(6*o)),Math.abs(a)<=1e-10)return o;return NaN}n.d(e,{Z:function(){return i}})},3464:function(t,e,n){"use strict";function i(t,e,n,i,r){return t*r-e*Math.sin(2*r)+n*Math.sin(4*r)-i*Math.sin(6*r)}n.d(e,{Z:function(){return i}})},4541:function(t,e,n){"use strict";function i(t,e,n){var i=t*e;return n/Math.sqrt(1-i*i)}n.d(e,{Z:function(){return i}})},4919:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var i=n(8217);function r(t,e){for(var n,r,o=.5*t,a=i.pj-2*Math.atan(e),s=0;s<=15;s++)if(n=t*Math.sin(a),a+=r=i.pj-2*Math.atan(e*Math.pow((1-n)/(1+n),o))-a,Math.abs(r)<=1e-10)return a;return-9999}},5054:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var i=.046875,r=.01953125,o=.01068115234375;function a(t){var e=[];e[0]=1-t*(.25+t*(i+t*(r+t*o))),e[1]=t*(.75-t*(i+t*(r+t*o)));var n=t*t;return e[2]=n*(.46875-t*(.013020833333333334+.007120768229166667*t)),n*=t,e[3]=n*(.3645833333333333-.005696614583333333*t),e[4]=n*t*.3076171875,e}},6574:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var i=n(5386),r=n(8217);function o(t,e,n){for(var o=1/(1-e),a=t,s=20;s;--s){var l=Math.sin(a),u=1-e*l*l;if(a-=u=((0,i.Z)(a,l,Math.cos(a),n)-t)*(u*Math.sqrt(u))*o,Math.abs(u)<r.cp)return a}return a}},5386:function(t,e,n){"use strict";function i(t,e,n,i){return n*=e,e*=e,i[0]*t-n*(i[1]+e*(i[2]+e*(i[3]+e*i[4])))}n.d(e,{Z:function(){return i}})},3998:function(t,e,n){"use strict";function i(t,e){var n;return t>1e-7?(1-t*t)*(e/(1-(n=t*e)*n)-.5/t*Math.log((1-n)/(1+n))):2*e}n.d(e,{Z:function(){return i}})},7676:function(t,e,n){"use strict";function i(t){return t<0?-1:1}n.d(e,{Z:function(){return i}})},9507:function(t,e,n){"use strict";function i(t){var e=Math.exp(t);return e=(e-1/e)/2}n.d(e,{Z:function(){return i}})},5346:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var i=n(8217);function r(t,e,n){var r=t*n,o=.5*t;return r=Math.pow((1-r)/(1+r),o),Math.tan(.5*(i.pj-e))/r}},8217:function(t,e,n){"use strict";n.d(e,{Be:function(){return c},Er:function(){return u},Hp:function(){return o},JP:function(){return a},Pn:function(){return y},Qf:function(){return s},Qg:function(){return x},Qx:function(){return v},U2:function(){return _},cN:function(){return i},cp:function(){return g},ht:function(){return l},iM:function(){return r},pj:function(){return h},s3:function(){return f},uK:function(){return d},uo:function(){return b},y1:function(){return p},zJ:function(){return m}});var i=1,r=2,o=3,a=4,s=5,l=6378137,u=6356752.314,c=.0066943799901413165,d=484813681109536e-20,h=Math.PI/2,f=.16666666666666666,p=.04722222222222222,m=.022156084656084655,g=1e-10,v=.017453292519943295,y=57.29577951308232,x=Math.PI/4,b=2*Math.PI,_=3.14159265359},2629:function(t,e,n){"use strict";n.d(e,{Gu:function(){return o},Lv:function(){return r},QN:function(){return l},Xu:function(){return a},jJ:function(){return s}});var i=n(8217);function r(t,e){return t.datum_type===e.datum_type&&(!(t.a!==e.a||Math.abs(t.es-e.es)>5e-11)&&(t.datum_type===i.cN?t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:t.datum_type!==i.iM||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6]))}function o(t,e,n){var r,o,a,s,l=t.x,u=t.y,c=t.z?t.z:0;if(u<-i.pj&&u>-1.001*i.pj)u=-i.pj;else if(u>i.pj&&u<1.001*i.pj)u=i.pj;else{if(u<-i.pj)return{x:-1/0,y:-1/0,z:t.z};if(u>i.pj)return{x:1/0,y:1/0,z:t.z}}return l>Math.PI&&(l-=2*Math.PI),o=Math.sin(u),s=Math.cos(u),a=o*o,{x:((r=n/Math.sqrt(1-e*a))+c)*s*Math.cos(l),y:(r+c)*s*Math.sin(l),z:(r*(1-e)+c)*o}}function a(t,e,n,r){var o,a,s,l,u,c,d,h,f,p,m,g,v,y,x,b=1e-12,_=t.x,w=t.y,M=t.z?t.z:0;if(o=Math.sqrt(_*_+w*w),a=Math.sqrt(_*_+w*w+M*M),o/n<b){if(y=0,a/n<b)return i.pj,x=-r,{x:t.x,y:t.y,z:t.z}}else y=Math.atan2(w,_);s=M/a,h=(l=o/a)*(1-e)*(u=1/Math.sqrt(1-e*(2-e)*l*l)),f=s*u,v=0;do{v++,c=e*(d=n/Math.sqrt(1-e*f*f))/(d+(x=o*h+M*f-d*(1-e*f*f))),g=(m=s*(u=1/Math.sqrt(1-c*(2-c)*l*l)))*h-(p=l*(1-c)*u)*f,h=p,f=m}while(g*g>1e-24&&v<30);return{x:y,y:Math.atan(m/Math.abs(p)),z:x}}function s(t,e,n){if(e===i.cN)return{x:t.x+n[0],y:t.y+n[1],z:t.z+n[2]};if(e===i.iM){var r=n[0],o=n[1],a=n[2],s=n[3],l=n[4],u=n[5],c=n[6];return{x:c*(t.x-u*t.y+l*t.z)+r,y:c*(u*t.x+t.y-s*t.z)+o,z:c*(-l*t.x+s*t.y+t.z)+a}}}function l(t,e,n){if(e===i.cN)return{x:t.x-n[0],y:t.y-n[1],z:t.z-n[2]};if(e===i.iM){var r=n[0],o=n[1],a=n[2],s=n[3],l=n[4],u=n[5],c=n[6],d=(t.x-r)/c,h=(t.y-o)/c,f=(t.z-a)/c;return{x:d+u*h-l*f,y:-u*d+h+s*f,z:l*d-s*h+f}}}},4252:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return te}});var i=n(8217),r={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},o={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},a=/[\s_\-\/\(\)]/g;function s(t,e){if(t[e])return t[e];for(var n,i=Object.keys(t),r=e.toLowerCase().replace(a,""),o=-1;++o<i.length;)if((n=i[o]).toLowerCase().replace(a,"")===r)return t[n]}function l(t){var e,n,a,l={},u=t.split("+").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,e){var n=e.split("=");return n.push(!0),t[n[0].toLowerCase()]=n[1],t}),{}),c={proj:"projName",datum:"datumCode",rf:function(t){l.rf=parseFloat(t)},lat_0:function(t){l.lat0=t*i.Qx},lat_1:function(t){l.lat1=t*i.Qx},lat_2:function(t){l.lat2=t*i.Qx},lat_ts:function(t){l.lat_ts=t*i.Qx},lon_0:function(t){l.long0=t*i.Qx},lon_1:function(t){l.long1=t*i.Qx},lon_2:function(t){l.long2=t*i.Qx},alpha:function(t){l.alpha=parseFloat(t)*i.Qx},gamma:function(t){l.rectified_grid_angle=parseFloat(t)},lonc:function(t){l.longc=t*i.Qx},x_0:function(t){l.x0=parseFloat(t)},y_0:function(t){l.y0=parseFloat(t)},k_0:function(t){l.k0=parseFloat(t)},k:function(t){l.k0=parseFloat(t)},a:function(t){l.a=parseFloat(t)},b:function(t){l.b=parseFloat(t)},r_a:function(){l.R_A=!0},zone:function(t){l.zone=parseInt(t,10)},south:function(){l.utmSouth=!0},towgs84:function(t){l.datum_params=t.split(",").map((function(t){return parseFloat(t)}))},to_meter:function(t){l.to_meter=parseFloat(t)},units:function(t){l.units=t;var e=s(o,t);e&&(l.to_meter=e.to_meter)},from_greenwich:function(t){l.from_greenwich=t*i.Qx},pm:function(t){var e=s(r,t);l.from_greenwich=(e||parseFloat(t))*i.Qx},nadgrids:function(t){"@null"===t?l.datumCode="none":l.nadgrids=t},axis:function(t){var e="ewnsud";3===t.length&&-1!==e.indexOf(t.substr(0,1))&&-1!==e.indexOf(t.substr(1,1))&&-1!==e.indexOf(t.substr(2,1))&&(l.axis=t)},approx:function(){l.approx=!0}};for(e in u)n=u[e],e in c?"function"==typeof(a=c[e])?a(n):l[a]=n:l[e]=n;return"string"==typeof l.datumCode&&"WGS84"!==l.datumCode&&(l.datumCode=l.datumCode.toLowerCase()),l}var u=function(t){return new m(t).output()},c=/\s/,d=/[A-Za-z]/,h=/[A-Za-z84_]/,f=/[,\]]/,p=/[\d\.E\-\+]/;function m(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=1}function g(t,e,n){Array.isArray(e)&&(n.unshift(e),e=null);var i=e?{}:t,r=n.reduce((function(t,e){return v(e,t),t}),i);e&&(t[e]=r)}function v(t,e){if(Array.isArray(t)){var n=t.shift();if("PARAMETER"===n&&(n=t.shift()),1===t.length)return Array.isArray(t[0])?(e[n]={},void v(t[0],e[n])):void(e[n]=t[0]);if(t.length)if("TOWGS84"!==n){if("AXIS"===n)return n in e||(e[n]=[]),void e[n].push(t);var i;switch(Array.isArray(n)||(e[n]={}),n){case"UNIT":case"PRIMEM":case"VERT_DATUM":return e[n]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&v(t[2],e[n]));case"SPHEROID":case"ELLIPSOID":return e[n]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&v(t[3],e[n]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return t[0]=["name",t[0]],void g(e,n,t);default:for(i=-1;++i<t.length;)if(!Array.isArray(t[i]))return v(t,e[n]);return g(e,n,t)}}else e[n]=t;else e[n]=!0}else e[t]=!0}m.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;c.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},m.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(f.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},m.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},m.prototype.number=function(t){if(!p.test(t)){if(f.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},m.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},m.prototype.keyword=function(t){if(h.test(t))this.word+=t;else{if("["===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=1)}if(!f.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},m.prototype.neutral=function(t){if(d.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(p.test(t))return this.word=t,void(this.state=3);if(!f.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},m.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function y(t){return.017453292519943295*t}function x(t){var e=u(t),n=e.shift(),i=e.shift();e.unshift(["name",i]),e.unshift(["type",n]);var r={};return v(e,r),function(t){if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var e="",n=0,i=t.AXIS.length;n<i;++n){var r=[t.AXIS[n][0].toLowerCase(),t.AXIS[n][1].toLowerCase()];-1!==r[0].indexOf("north")||("y"===r[0]||"lat"===r[0])&&"north"===r[1]?e+="n":-1!==r[0].indexOf("south")||("y"===r[0]||"lat"===r[0])&&"south"===r[1]?e+="s":-1!==r[0].indexOf("east")||("x"===r[0]||"lon"===r[0])&&"east"===r[1]?e+="e":-1===r[0].indexOf("west")&&("x"!==r[0]&&"lon"!==r[0]||"west"!==r[1])||(e+="w")}2===e.length&&(e+="u"),3===e.length&&(t.axis=e)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var o=t.GEOGCS;function a(e){return e*(t.to_meter||1)}"GEOGCS"===t.type&&(o=t),o&&(o.DATUM?t.datumCode=o.DATUM.name.toLowerCase():t.datumCode=o.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==t.datumCode&&"new_zealand_1949"!==t.datumCode||(t.datumCode="nzgd49"),"wgs_1984"!==t.datumCode&&"world_geodetic_system_1984"!==t.datumCode||("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"_ferro"===t.datumCode.slice(-6)&&(t.datumCode=t.datumCode.slice(0,-6)),"_jakarta"===t.datumCode.slice(-8)&&(t.datumCode=t.datumCode.slice(0,-8)),~t.datumCode.indexOf("belge")&&(t.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(t.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=o.DATUM.SPHEROID.a,t.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(t.datum_params=o.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",y],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",y],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",y],["lat0","latitude_of_origin",y],["lat0","standard_parallel_1",y],["lat1","standard_parallel_1",y],["lat2","standard_parallel_2",y],["azimuth","Azimuth"],["alpha","azimuth",y],["srsCode","name"]].forEach((function(e){return n=t,r=(i=e)[0],o=i[1],void(!(r in n)&&o in n&&(n[r]=n[o],3===i.length&&(n[r]=i[2](n[r]))));var n,i,r,o})),t.long0||!t.longc||"Albers_Conic_Equal_Area"!==t.projName&&"Lambert_Azimuthal_Equal_Area"!==t.projName||(t.long0=t.longc),t.lat_ts||!t.lat1||"Stereographic_South_Pole"!==t.projName&&"Polar Stereographic (variant B)"!==t.projName||(t.lat0=y(t.lat1>0?90:-90),t.lat_ts=t.lat1)}(r),r}function b(t){var e=this;if(2===arguments.length){var n=arguments[1];"string"==typeof n?"+"===n.charAt(0)?b[t]=l(arguments[1]):b[t]=x(arguments[1]):b[t]=n}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){Array.isArray(t)?b.apply(e,t):b(t)}));if("string"==typeof t){if(t in b)return b[t]}else"EPSG"in t?b["EPSG:"+t.EPSG]=t:"ESRI"in t?b["ESRI:"+t.ESRI]=t:"IAU2000"in t?b["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(b);var _=b;var w=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var M=["3857","900913","3785","102113"];var A=function(t){if(!function(t){return"string"==typeof t}(t))return t;if(function(t){return t in _}(t))return _[t];if(function(t){return w.some((function(e){return t.indexOf(e)>-1}))}(t)){var e=x(t);if(function(t){var e=s(t,"authority");if(e){var n=s(e,"epsg");return n&&M.indexOf(n)>-1}}(e))return _["EPSG:3857"];var n=function(t){var e=s(t,"extension");if(e)return s(e,"proj4")}(e);return n?l(n):e}return function(t){return"+"===t[0]}(t)?l(t):void 0};function T(t,e){var n,i;if(t=t||{},!e)return t;for(i in e)void 0!==(n=e[i])&&(t[i]=n);return t}var C=n(9820),E=n(897),S=[C.default,E.default],k={},P=[];function O(t,e){var n=P.length;return t.names?(P[n]=t,t.names.forEach((function(t){k[t.toLowerCase()]=n})),this):(console.log(e),!0)}var R={start:function(){S.forEach(O)},add:O,get:function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==k[e]&&P[k[e]]?P[k[e]]:void 0}},L={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},D=L.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};L.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var I={};I.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},I.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},I.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},I.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},I.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},I.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},I.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},I.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},I.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},I.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},I.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},I.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},I.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},I.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},I.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},I.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},I.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};var F=function(t,e,n,r,o,a,s){var l={};return l.datum_type=void 0===t||"none"===t?i.Qf:i.JP,e&&(l.datum_params=e.map(parseFloat),0===l.datum_params[0]&&0===l.datum_params[1]&&0===l.datum_params[2]||(l.datum_type=i.cN),l.datum_params.length>3&&(0===l.datum_params[3]&&0===l.datum_params[4]&&0===l.datum_params[5]&&0===l.datum_params[6]||(l.datum_type=i.iM,l.datum_params[3]*=i.uK,l.datum_params[4]*=i.uK,l.datum_params[5]*=i.uK,l.datum_params[6]=l.datum_params[6]/1e6+1))),s&&(l.datum_type=i.Hp,l.grids=s),l.a=n,l.b=r,l.es=o,l.ep2=a,l},j={};function N(t){if(0===t.length)return null;var e="@"===t[0];return e&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:t,mandatory:!e,grid:j[t]||null,isNull:!1}}function z(t){return t/3600*Math.PI/180}function B(t,e,n){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(e,n)))}function V(t){return t.map((function(t){return[z(t.longitudeShift),z(t.latitudeShift)]}))}function G(t,e,n){return{name:B(t,e+8,e+16).trim(),parent:B(t,e+24,e+24+8).trim(),lowerLatitude:t.getFloat64(e+72,n),upperLatitude:t.getFloat64(e+88,n),lowerLongitude:t.getFloat64(e+104,n),upperLongitude:t.getFloat64(e+120,n),latitudeInterval:t.getFloat64(e+136,n),longitudeInterval:t.getFloat64(e+152,n),gridNodeCount:t.getInt32(e+168,n)}}function U(t,e,n,i){for(var r=e+176,o=[],a=0;a<n.gridNodeCount;a++){var s={latitudeShift:t.getFloat32(r+16*a,i),longitudeShift:t.getFloat32(r+16*a+4,i),latitudeAccuracy:t.getFloat32(r+16*a+8,i),longitudeAccuracy:t.getFloat32(r+16*a+12,i)};o.push(s)}return o}function q(t,e){if(!(this instanceof q))return new q(t);e=e||function(t){if(t)throw t};var n=A(t);if("object"==typeof n){var r=q.projections.get(n.projName);if(r){if(n.datumCode&&"none"!==n.datumCode){var o=s(I,n.datumCode);o&&(n.datum_params=n.datum_params||(o.towgs84?o.towgs84.split(","):null),n.ellps=o.ellipse,n.datumName=o.datumName?o.datumName:n.datumCode)}n.k0=n.k0||1,n.axis=n.axis||"enu",n.ellps=n.ellps||"wgs84",n.lat1=n.lat1||n.lat0;var a,l,u,c,d,h,f,p=function(t,e,n,r,o){if(!t){var a=s(L,r);a||(a=D),t=a.a,e=a.b,n=a.rf}return n&&!e&&(e=(1-1/n)*t),(0===n||Math.abs(t-e)<i.cp)&&(o=!0,e=t),{a:t,b:e,rf:n,sphere:o}}(n.a,n.b,n.rf,n.ellps,n.sphere),m=(a=p.a,l=p.b,p.rf,u=n.R_A,h=((c=a*a)-(d=l*l))/c,f=0,u?(c=(a*=1-h*(i.s3+h*(i.y1+h*i.zJ)))*a,h=0):f=Math.sqrt(h),{es:h,e:f,ep2:(c-d)/d}),g=function(t){return void 0===t?null:t.split(",").map(N)}(n.nadgrids),v=n.datum||F(n.datumCode,n.datum_params,p.a,p.b,m.es,m.ep2,g);T(this,n),T(this,r),this.a=p.a,this.b=p.b,this.rf=p.rf,this.sphere=p.sphere,this.es=m.es,this.e=m.e,this.ep2=m.ep2,this.datum=v,this.init(),e(null,this)}else e(t)}else e(t)}q.projections=R,q.projections.start();var W=q,H=n(2629),Z=n(759);function X(t){return t===i.cN||t===i.iM}function Q(t,e,n){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;for(var r={x:-n.x,y:n.y},o={x:Number.NaN,y:Number.NaN},a=[],s=0;s<t.grids.length;s++){var l=t.grids[s];if(a.push(l.name),l.isNull){o=r;break}if(l.mandatory,null!==l.grid){var u=l.grid.subgrids[0],c=(Math.abs(u.del[1])+Math.abs(u.del[0]))/1e4,d=u.ll[0]-c,h=u.ll[1]-c,f=u.ll[0]+(u.lim[0]-1)*u.del[0]+c,p=u.ll[1]+(u.lim[1]-1)*u.del[1]+c;if(!(h>r.y||d>r.x||p<r.y||f<r.x||(o=K(r,e,u),isNaN(o.x))))break}else if(l.mandatory)return console.log("Unable to find mandatory grid '"+l.name+"'"),-1}return isNaN(o.x)?(console.log("Failed to find a grid shift table for location '"+-r.x*i.Pn+" "+r.y*i.Pn+" tried: '"+a+"'"),-1):(n.x=-o.x,n.y=o.y,0)}function K(t,e,n){var i={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return i;var r={x:t.x,y:t.y};r.x-=n.ll[0],r.y-=n.ll[1],r.x=(0,Z.Z)(r.x-Math.PI)+Math.PI;var o=Y(r,n);if(e){if(isNaN(o.x))return i;o.x=r.x-o.x,o.y=r.y-o.y;var a,s,l=9;do{if(s=Y(o,n),isNaN(s.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}a={x:r.x-(s.x+o.x),y:r.y-(s.y+o.y)},o.x+=a.x,o.y+=a.y}while(l--&&Math.abs(a.x)>1e-12&&Math.abs(a.y)>1e-12);if(l<0)return console.log("Inverse grid shift iterator failed to converge."),i;i.x=(0,Z.Z)(o.x+n.ll[0]),i.y=o.y+n.ll[1]}else isNaN(o.x)||(i.x=t.x+o.x,i.y=t.y+o.y);return i}function Y(t,e){var n,i={x:t.x/e.del[0],y:t.y/e.del[1]},r=Math.floor(i.x),o=Math.floor(i.y),a=i.x-1*r,s=i.y-1*o,l={x:Number.NaN,y:Number.NaN};if(r<0||r>=e.lim[0])return l;if(o<0||o>=e.lim[1])return l;n=o*e.lim[0]+r;var u=e.cvs[n][0],c=e.cvs[n][1];n++;var d=e.cvs[n][0],h=e.cvs[n][1];n+=e.lim[0];var f=e.cvs[n][0],p=e.cvs[n][1];n--;var m=e.cvs[n][0],g=e.cvs[n][1],v=a*s,y=a*(1-s),x=(1-a)*(1-s),b=(1-a)*s;return l.x=x*u+y*d+b*m+v*f,l.y=x*c+y*h+b*g+v*p,l}function J(t,e,n){var i,r,o,a=n.x,s=n.y,l=n.z||0,u={};for(o=0;o<3;o++)if(!e||2!==o||void 0!==n.z)switch(0===o?(i=a,r=-1!=="ew".indexOf(t.axis[o])?"x":"y"):1===o?(i=s,r=-1!=="ns".indexOf(t.axis[o])?"y":"x"):(i=l,r="z"),t.axis[o]){case"e":case"n":u[r]=i;break;case"w":case"s":u[r]=-i;break;case"u":void 0!==n[r]&&(u.z=i);break;case"d":void 0!==n[r]&&(u.z=-i);break;default:return null}return u}function $(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}function tt(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function et(t,e,n,r){var o;if(Array.isArray(n)&&(n=$(n)),function(t){tt(t.x),tt(t.y)}(n),t.datum&&e.datum&&function(t,e){return(t.datum.datum_type===i.cN||t.datum.datum_type===i.iM)&&"WGS84"!==e.datumCode||(e.datum.datum_type===i.cN||e.datum.datum_type===i.iM)&&"WGS84"!==t.datumCode}(t,e)&&(n=et(t,o=new W("WGS84"),n,r),t=o),r&&"enu"!==t.axis&&(n=J(t,!1,n)),"longlat"===t.projName)n={x:n.x*i.Qx,y:n.y*i.Qx,z:n.z||0};else if(t.to_meter&&(n={x:n.x*t.to_meter,y:n.y*t.to_meter,z:n.z||0}),!(n=t.inverse(n)))return;if(t.from_greenwich&&(n.x+=t.from_greenwich),n=function(t,e,n){if((0,H.Lv)(t,e))return n;if(t.datum_type===i.Qf||e.datum_type===i.Qf)return n;var r=t.a,o=t.es;if(t.datum_type===i.Hp){if(0!==Q(t,!1,n))return;r=i.ht,o=i.Be}var a=e.a,s=e.b,l=e.es;if(e.datum_type===i.Hp&&(a=i.ht,s=i.Er,l=i.Be),o===l&&r===a&&!X(t.datum_type)&&!X(e.datum_type))return n;if(n=(0,H.Gu)(n,o,r),X(t.datum_type)&&(n=(0,H.jJ)(n,t.datum_type,t.datum_params)),X(e.datum_type)&&(n=(0,H.QN)(n,e.datum_type,e.datum_params)),n=(0,H.Xu)(n,l,a,s),e.datum_type===i.Hp&&0!==Q(e,!0,n))return;return n}(t.datum,e.datum,n),n)return e.from_greenwich&&(n={x:n.x-e.from_greenwich,y:n.y,z:n.z||0}),"longlat"===e.projName?n={x:n.x*i.Pn,y:n.y*i.Pn,z:n.z||0}:(n=e.forward(n),e.to_meter&&(n={x:n.x/e.to_meter,y:n.y/e.to_meter,z:n.z||0})),r&&"enu"!==e.axis?J(e,!0,n):n}var nt=W("WGS84");function it(t,e,n,i){var r,o,a;return Array.isArray(n)?(r=et(t,e,n,i)||{x:NaN,y:NaN},n.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name?"number"==typeof r.z?[r.x,r.y,r.z].concat(n.splice(3)):[r.x,r.y,n[2]].concat(n.splice(3)):[r.x,r.y].concat(n.splice(2)):[r.x,r.y]):(o=et(t,e,n,i),2===(a=Object.keys(n)).length||a.forEach((function(i){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===i||"y"===i||"z"===i)return}else if("x"===i||"y"===i)return;o[i]=n[i]})),o)}function rt(t){return t instanceof W?t:t.oProj?t.oProj:W(t)}var ot=function(t,e,n){t=rt(t);var i,r=!1;return void 0===e?(e=t,t=nt,r=!0):(void 0!==e.x||Array.isArray(e))&&(n=e,e=t,t=nt,r=!0),e=rt(e),n?it(t,e,n):(i={forward:function(n,i){return it(t,e,n,i)},inverse:function(n,i){return it(e,t,n,i)}},r&&(i.oProj=e),i)},at="AJSAJS",st="AFAFAF",lt=65,ut=73,ct=79,dt=86,ht=90,ft={forward:pt,inverse:function(t){var e=yt(_t(t.toUpperCase()));if(e.lat&&e.lon)return[e.lon,e.lat,e.lon,e.lat];return[e.left,e.bottom,e.right,e.top]},toPoint:mt};function pt(t,e){return e=e||5,function(t,e){var n="00000"+t.easting,i="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(f=t.easting,p=t.northing,m=t.zoneNumber,g=bt(m),v=Math.floor(f/1e5),y=Math.floor(p/1e5)%20,r=v,o=y,a=g,s=a-1,l=at.charCodeAt(s),u=st.charCodeAt(s),c=l+r-1,d=u+o,h=!1,c>ht&&(c=c-ht+lt-1,h=!0),(c===ut||l<ut&&c>ut||(c>ut||l<ut)&&h)&&c++,(c===ct||l<ct&&c>ct||(c>ct||l<ct)&&h)&&++c===ut&&c++,c>ht&&(c=c-ht+lt-1),d>dt?(d=d-dt+lt-1,h=!0):h=!1,(d===ut||u<ut&&d>ut||(d>ut||u<ut)&&h)&&d++,(d===ct||u<ct&&d>ct||(d>ct||u<ct)&&h)&&++d===ut&&d++,d>dt&&(d=d-dt+lt-1),String.fromCharCode(c)+String.fromCharCode(d))+n.substr(n.length-5,e)+i.substr(i.length-5,e);var r,o,a,s,l,u,c,d,h;var f,p,m,g,v,y}(function(t){var e,n,i,r,o,a,s,l,u=t.lat,c=t.lon,d=6378137,h=.00669438,f=.9996,p=gt(u),m=gt(c);l=Math.floor((c+180)/6)+1,180===c&&(l=60);u>=56&&u<64&&c>=3&&c<12&&(l=32);u>=72&&u<84&&(c>=0&&c<9?l=31:c>=9&&c<21?l=33:c>=21&&c<33?l=35:c>=33&&c<42&&(l=37));s=gt(6*(l-1)-180+3),e=h/(1-h),n=d/Math.sqrt(1-h*Math.sin(p)*Math.sin(p)),i=Math.tan(p)*Math.tan(p),r=e*Math.cos(p)*Math.cos(p),o=Math.cos(p)*(m-s),a=d*((1-h/4-3*h*h/64-5*h*h*h/256)*p-(3*h/8+3*h*h/32+45*h*h*h/1024)*Math.sin(2*p)+(15*h*h/256+45*h*h*h/1024)*Math.sin(4*p)-35*h*h*h/3072*Math.sin(6*p));var g=f*n*(o+(1-i+r)*o*o*o/6+(5-18*i+i*i+72*r-58*e)*o*o*o*o*o/120)+5e5,v=f*(a+n*Math.tan(p)*(o*o/2+(5-i+9*r+4*r*r)*o*o*o*o/24+(61-58*i+i*i+600*r-330*e)*o*o*o*o*o*o/720));u<0&&(v+=1e7);return{northing:Math.round(v),easting:Math.round(g),zoneNumber:l,zoneLetter:xt(u)}}({lat:t[1],lon:t[0]}),e)}function mt(t){var e=yt(_t(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function gt(t){return t*(Math.PI/180)}function vt(t){return t/Math.PI*180}function yt(t){var e=t.northing,n=t.easting,i=t.zoneLetter,r=t.zoneNumber;if(r<0||r>60)return null;var o,a,s,l,u,c,d,h,f,p=.9996,m=6378137,g=.00669438,v=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),y=n-5e5,x=e;i<"N"&&(x-=1e7),d=6*(r-1)-180+3,o=.006739496752268451,f=(h=x/p/6367449.145945056)+(3*v/2-27*v*v*v/32)*Math.sin(2*h)+(21*v*v/16-55*v*v*v*v/32)*Math.sin(4*h)+151*v*v*v/96*Math.sin(6*h),a=m/Math.sqrt(1-g*Math.sin(f)*Math.sin(f)),s=Math.tan(f)*Math.tan(f),l=o*Math.cos(f)*Math.cos(f),u=.99330562*m/Math.pow(1-g*Math.sin(f)*Math.sin(f),1.5),c=y/(a*p);var b=f-a*Math.tan(f)/u*(c*c/2-(5+3*s+10*l-4*l*l-9*o)*c*c*c*c/24+(61+90*s+298*l+45*s*s-1.6983531815716497-3*l*l)*c*c*c*c*c*c/720);b=vt(b);var _,w=(c-(1+2*s+l)*c*c*c/6+(5-2*l+28*s-3*l*l+8*o+24*s*s)*c*c*c*c*c/120)/Math.cos(f);if(w=d+vt(w),t.accuracy){var M=yt({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});_={top:M.lat,right:M.lon,bottom:b,left:w}}else _={lat:b,lon:w};return _}function xt(t){var e="Z";return 84>=t&&t>=72?e="X":72>t&&t>=64?e="W":64>t&&t>=56?e="V":56>t&&t>=48?e="U":48>t&&t>=40?e="T":40>t&&t>=32?e="S":32>t&&t>=24?e="R":24>t&&t>=16?e="Q":16>t&&t>=8?e="P":8>t&&t>=0?e="N":0>t&&t>=-8?e="M":-8>t&&t>=-16?e="L":-16>t&&t>=-24?e="K":-24>t&&t>=-32?e="J":-32>t&&t>=-40?e="H":-40>t&&t>=-48?e="G":-48>t&&t>=-56?e="F":-56>t&&t>=-64?e="E":-64>t&&t>=-72?e="D":-72>t&&t>=-80&&(e="C"),e}function bt(t){var e=t%6;return 0===e&&(e=6),e}function _t(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,n=t.length,i=null,r="",o=0;!/[A-Z]/.test(e=t.charAt(o));){if(o>=2)throw"MGRSPoint bad conversion from: "+t;r+=e,o++}var a=parseInt(r,10);if(0===o||o+3>n)throw"MGRSPoint bad conversion from: "+t;var s=t.charAt(o++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+t;i=t.substring(o,o+=2);for(var l=bt(a),u=function(t,e){var n=at.charCodeAt(e-1),i=1e5,r=!1;for(;n!==t.charCodeAt(0);){if(++n===ut&&n++,n===ct&&n++,n>ht){if(r)throw"Bad character: "+t;n=lt,r=!0}i+=1e5}return i}(i.charAt(0),l),c=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;var n=st.charCodeAt(e-1),i=0,r=!1;for(;n!==t.charCodeAt(0);){if(++n===ut&&n++,n===ct&&n++,n>dt){if(r)throw"Bad character: "+t;n=lt,r=!0}i+=1e5}return i}(i.charAt(1),l);c<wt(s);)c+=2e6;var d=n-o;if(d%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var h,f,p,m=d/2,g=0,v=0;return m>0&&(h=1e5/Math.pow(10,m),f=t.substring(o,o+m),g=parseFloat(f)*h,p=t.substring(o+m),v=parseFloat(p)*h),{easting:g+u,northing:v+c,zoneLetter:s,zoneNumber:a,accuracy:h}}function wt(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}function Mt(t,e,n){if(!(this instanceof Mt))return new Mt(t,e,n);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var i=t.split(",");this.x=parseFloat(i[0],10),this.y=parseFloat(i[1],10),this.z=parseFloat(i[2],10)||0}else this.x=t,this.y=e,this.z=n||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Mt.fromMGRS=function(t){return new Mt(mt(t))},Mt.prototype.toMGRS=function(t){return pt([this.x,this.y],t)};var At=Mt,Tt=n(3157),Ct=n(516),Et=n(973),St=n(9936),kt=n(7983),Pt=n(4176),Ot=n(208),Rt=n(9164),Lt=n(6235),Dt=n(5234),It=n(3769),Ft=n(9816),jt=n(4655),Nt=n(7712),zt=n(1941),Bt=n(6089),Vt=n(5591),Gt=n(7841),Ut=n(9926),qt=n(6105),Wt=n(245),Ht=n(604),Zt=n(2765),Xt=n(2310),Qt=n(4689),Kt=n(4402),Yt=n(1258),Jt=n(6470),$t=n(813);ot.defaultDatum="WGS84",ot.Proj=W,ot.WGS84=new ot.Proj("WGS84"),ot.Point=At,ot.toPoint=$,ot.defs=_,ot.nadgrid=function(t,e){var n=new DataView(e),i=function(t){var e=t.getInt32(8,!1);if(11===e)return!1;11!==(e=t.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian");return!0}(n),r=function(t,e){return{nFields:t.getInt32(8,e),nSubgridFields:t.getInt32(24,e),nSubgrids:t.getInt32(40,e),shiftType:B(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,e),fromSemiMinorAxis:t.getFloat64(136,e),toSemiMajorAxis:t.getFloat64(152,e),toSemiMinorAxis:t.getFloat64(168,e)}}(n,i);r.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var o=function(t,e,n){for(var i=176,r=[],o=0;o<e.nSubgrids;o++){var a=G(t,i,n),s=U(t,i,a,n),l=Math.round(1+(a.upperLongitude-a.lowerLongitude)/a.longitudeInterval),u=Math.round(1+(a.upperLatitude-a.lowerLatitude)/a.latitudeInterval);r.push({ll:[z(a.lowerLongitude),z(a.lowerLatitude)],del:[z(a.longitudeInterval),z(a.latitudeInterval)],lim:[l,u],count:a.gridNodeCount,cvs:V(s)})}return r}(n,r,i),a={header:r,subgrids:o};return j[t]=a,a},ot.transform=et,ot.mgrs=ft,ot.version="__VERSION__",function(t){t.Proj.projections.add(Tt.default),t.Proj.projections.add(Ct.default),t.Proj.projections.add(Et.default),t.Proj.projections.add(St.default),t.Proj.projections.add(kt.default),t.Proj.projections.add(Pt.default),t.Proj.projections.add(Ot.default),t.Proj.projections.add(Rt.default),t.Proj.projections.add(Lt.default),t.Proj.projections.add(Dt.default),t.Proj.projections.add(It.default),t.Proj.projections.add(Ft.default),t.Proj.projections.add(jt.default),t.Proj.projections.add(Nt.default),t.Proj.projections.add(zt.default),t.Proj.projections.add(Bt.default),t.Proj.projections.add(Vt.default),t.Proj.projections.add(Gt.default),t.Proj.projections.add(Ut.default),t.Proj.projections.add(qt.default),t.Proj.projections.add(Wt.default),t.Proj.projections.add(Ht.default),t.Proj.projections.add(Zt.default),t.Proj.projections.add(Xt.default),t.Proj.projections.add(Qt.default),t.Proj.projections.add(Kt.default),t.Proj.projections.add(Yt.default),t.Proj.projections.add(Jt.default),t.Proj.projections.add($t.default)}(ot);var te=ot},9816:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return u},init:function(){return l},inverse:function(){return c},names:function(){return h},phi1z:function(){return d}});var i=n(4541),r=n(3998),o=n(759),a=n(8348),s=n(8217);function l(){Math.abs(this.lat1+this.lat2)<s.cp||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=(0,i.Z)(this.e3,this.sin_po,this.cos_po),this.qs1=(0,r.Z)(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=(0,i.Z)(this.e3,this.sin_po,this.cos_po),this.qs2=(0,r.Z)(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=(0,r.Z)(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>s.cp?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function u(t){var e=t.x,n=t.y;this.sin_phi=Math.sin(n),this.cos_phi=Math.cos(n);var i=(0,r.Z)(this.e3,this.sin_phi,this.cos_phi),a=this.a*Math.sqrt(this.c-this.ns0*i)/this.ns0,s=this.ns0*(0,o.Z)(e-this.long0),l=a*Math.sin(s)+this.x0,u=this.rh-a*Math.cos(s)+this.y0;return t.x=l,t.y=u,t}function c(t){var e,n,i,r,a,s;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),i=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),i=-1),r=0,0!==e&&(r=Math.atan2(i*t.x,i*t.y)),i=e*this.ns0/this.a,this.sphere?s=Math.asin((this.c-i*i)/(2*this.ns0)):(n=(this.c-i*i)/this.ns0,s=this.phi1z(this.e3,n)),a=(0,o.Z)(r/this.ns0+this.long0),t.x=a,t.y=s,t}function d(t,e){var n,i,r,o,l=(0,a.Z)(.5*e);if(t<s.cp)return l;for(var u=t*t,c=1;c<=25;c++)if(l+=o=.5*(r=1-(i=t*(n=Math.sin(l)))*i)*r/Math.cos(l)*(e/(1-u)-n/r+.5/t*Math.log((1-i)/(1+i))),Math.abs(o)<=1e-7)return l;return null}var h=["Albers_Conic_Equal_Area","Albers","aea"];e.default={init:l,forward:u,inverse:c,names:h,phi1z:d}},2765:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return p},init:function(){return f},inverse:function(){return m},names:function(){return g}});var i=n(759),r=n(8217),o=n(3464),a=n(8053),s=n(7743),l=n(9032),u=n(7325),c=n(918),d=n(8348),h=n(6415);function f(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function p(t){var e,n,d,h,f,p,m,g,v,y,x,b,_,w,M,A,T,C,E,S,k,P,O=t.x,R=t.y,L=Math.sin(t.y),D=Math.cos(t.y),I=(0,i.Z)(O-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=r.cp?(t.x=this.x0+this.a*(r.pj-R)*Math.sin(I),t.y=this.y0-this.a*(r.pj-R)*Math.cos(I),t):Math.abs(this.sin_p12+1)<=r.cp?(t.x=this.x0+this.a*(r.pj+R)*Math.sin(I),t.y=this.y0+this.a*(r.pj+R)*Math.cos(I),t):(C=this.sin_p12*L+this.cos_p12*D*Math.cos(I),T=(A=Math.acos(C))?A/Math.sin(A):1,t.x=this.x0+this.a*T*D*Math.sin(I),t.y=this.y0+this.a*T*(this.cos_p12*L-this.sin_p12*D*Math.cos(I)),t):(e=(0,a.Z)(this.es),n=(0,s.Z)(this.es),d=(0,l.Z)(this.es),h=(0,u.Z)(this.es),Math.abs(this.sin_p12-1)<=r.cp?(f=this.a*(0,o.Z)(e,n,d,h,r.pj),p=this.a*(0,o.Z)(e,n,d,h,R),t.x=this.x0+(f-p)*Math.sin(I),t.y=this.y0-(f-p)*Math.cos(I),t):Math.abs(this.sin_p12+1)<=r.cp?(f=this.a*(0,o.Z)(e,n,d,h,r.pj),p=this.a*(0,o.Z)(e,n,d,h,R),t.x=this.x0+(f+p)*Math.sin(I),t.y=this.y0+(f+p)*Math.cos(I),t):(m=L/D,g=(0,c.Z)(this.a,this.e,this.sin_p12),v=(0,c.Z)(this.a,this.e,L),y=Math.atan((1-this.es)*m+this.es*g*this.sin_p12/(v*D)),E=0===(x=Math.atan2(Math.sin(I),this.cos_p12*Math.tan(y)-this.sin_p12*Math.cos(I)))?Math.asin(this.cos_p12*Math.sin(y)-this.sin_p12*Math.cos(y)):Math.abs(Math.abs(x)-Math.PI)<=r.cp?-Math.asin(this.cos_p12*Math.sin(y)-this.sin_p12*Math.cos(y)):Math.asin(Math.sin(I)*Math.cos(y)/Math.sin(x)),b=this.e*this.sin_p12/Math.sqrt(1-this.es),A=g*E*(1-(S=E*E)*(M=(_=this.e*this.cos_p12*Math.cos(x)/Math.sqrt(1-this.es))*_)*(1-M)/6+(k=S*E)/8*(w=b*_)*(1-2*M)+(P=k*E)/120*(M*(4-7*M)-3*b*b*(1-7*M))-P*E/48*w),t.x=this.x0+A*Math.sin(x),t.y=this.y0+A*Math.cos(x),t))}function m(t){var e,n,f,p,m,g,v,y,x,b,_,w,M,A,T,C,E,S,k,P,O,R,L,D;if(t.x-=this.x0,t.y-=this.y0,this.sphere){if((e=Math.sqrt(t.x*t.x+t.y*t.y))>2*r.pj*this.a)return;return n=e/this.a,f=Math.sin(n),p=Math.cos(n),m=this.long0,Math.abs(e)<=r.cp?g=this.lat0:(g=(0,d.Z)(p*this.sin_p12+t.y*f*this.cos_p12/e),v=Math.abs(this.lat0)-r.pj,m=Math.abs(v)<=r.cp?this.lat0>=0?(0,i.Z)(this.long0+Math.atan2(t.x,-t.y)):(0,i.Z)(this.long0-Math.atan2(-t.x,t.y)):(0,i.Z)(this.long0+Math.atan2(t.x*f,e*this.cos_p12*p-t.y*this.sin_p12*f))),t.x=m,t.y=g,t}return y=(0,a.Z)(this.es),x=(0,s.Z)(this.es),b=(0,l.Z)(this.es),_=(0,u.Z)(this.es),Math.abs(this.sin_p12-1)<=r.cp?(M=(w=this.a*(0,o.Z)(y,x,b,_,r.pj))-(e=Math.sqrt(t.x*t.x+t.y*t.y)),g=(0,h.Z)(M/this.a,y,x,b,_),m=(0,i.Z)(this.long0+Math.atan2(t.x,-1*t.y)),t.x=m,t.y=g,t):Math.abs(this.sin_p12+1)<=r.cp?(w=this.a*(0,o.Z)(y,x,b,_,r.pj),M=(e=Math.sqrt(t.x*t.x+t.y*t.y))-w,g=(0,h.Z)(M/this.a,y,x,b,_),m=(0,i.Z)(this.long0+Math.atan2(t.x,t.y)),t.x=m,t.y=g,t):(e=Math.sqrt(t.x*t.x+t.y*t.y),C=Math.atan2(t.x,t.y),A=(0,c.Z)(this.a,this.e,this.sin_p12),E=Math.cos(C),k=-(S=this.e*this.cos_p12*E)*S/(1-this.es),P=3*this.es*(1-k)*this.sin_p12*this.cos_p12*E/(1-this.es),L=1-k*(R=(O=e/A)-k*(1+k)*Math.pow(O,3)/6-P*(1+3*k)*Math.pow(O,4)/24)*R/2-O*R*R*R/6,T=Math.asin(this.sin_p12*Math.cos(R)+this.cos_p12*Math.sin(R)*E),m=(0,i.Z)(this.long0+Math.asin(Math.sin(C)*Math.sin(R)/Math.cos(T))),D=Math.sin(T),g=Math.atan2((D-this.es*L*this.sin_p12)*Math.tan(T),D*(1-this.es)),t.x=m,t.y=g,t)}var g=["Azimuthal_Equidistant","aeqd"];e.default={init:f,forward:p,inverse:m,names:g}},5234:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return p},init:function(){return f},inverse:function(){return m},names:function(){return g}});var i=n(3464),r=n(8053),o=n(7743),a=n(9032),s=n(7325),l=n(918),u=n(759),c=n(6886),d=n(6415),h=n(8217);function f(){this.sphere||(this.e0=(0,r.Z)(this.es),this.e1=(0,o.Z)(this.es),this.e2=(0,a.Z)(this.es),this.e3=(0,s.Z)(this.es),this.ml0=this.a*(0,i.Z)(this.e0,this.e1,this.e2,this.e3,this.lat0))}function p(t){var e,n,r=t.x,o=t.y;if(r=(0,u.Z)(r-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(o)*Math.sin(r)),n=this.a*(Math.atan2(Math.tan(o),Math.cos(r))-this.lat0);else{var a=Math.sin(o),s=Math.cos(o),c=(0,l.Z)(this.a,this.e,a),d=Math.tan(o)*Math.tan(o),h=r*Math.cos(o),f=h*h,p=this.es*s*s/(1-this.es);e=c*h*(1-f*d*(1/6-(8-d+8*p)*f/120)),n=this.a*(0,i.Z)(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+c*a/s*f*(.5+(5-d+6*p)*f/24)}return t.x=e+this.x0,t.y=n+this.y0,t}function m(t){t.x-=this.x0,t.y-=this.y0;var e,n,i=t.x/this.a,r=t.y/this.a;if(this.sphere){var o=r+this.lat0;e=Math.asin(Math.sin(o)*Math.cos(i)),n=Math.atan2(Math.tan(i),Math.cos(o))}else{var a=this.ml0/this.a+r,s=(0,d.Z)(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-h.pj)<=h.cp)return t.x=this.long0,t.y=h.pj,r<0&&(t.y*=-1),t;var f=(0,l.Z)(this.a,this.e,Math.sin(s)),p=f*f*f/this.a/this.a*(1-this.es),m=Math.pow(Math.tan(s),2),g=i*this.a/f,v=g*g;e=s-f*Math.tan(s)/p*g*g*(.5-(1+3*m)*g*g/24),n=g*(1-v*(m/3+(1+3*m)*m*v/15))/Math.cos(s)}return t.x=(0,u.Z)(n+this.long0),t.y=(0,c.Z)(e),t}var g=["Cassini","Cassini_Soldner","cass"];e.default={init:f,forward:p,inverse:m,names:g}},7712:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return d},forward:function(){return l},init:function(){return s},inverse:function(){return u},names:function(){return c}});var i=n(759),r=n(3998),o=n(4541),a=n(8217);function s(){this.sphere||(this.k0=(0,o.Z)(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function l(t){var e,n,o=t.x,a=t.y,s=(0,i.Z)(o-this.long0);if(this.sphere)e=this.x0+this.a*s*Math.cos(this.lat_ts),n=this.y0+this.a*Math.sin(a)/Math.cos(this.lat_ts);else{var l=(0,r.Z)(this.e,Math.sin(a));e=this.x0+this.a*this.k0*s,n=this.y0+this.a*l*.5/this.k0}return t.x=e,t.y=n,t}function u(t){var e,n;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=(0,i.Z)(this.long0+t.x/this.a/Math.cos(this.lat_ts)),n=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(n=function(t,e){var n=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-n)<1e-6)return e<0?-1*a.pj:a.pj;for(var i,r,o,s,l=Math.asin(.5*e),u=0;u<30;u++)if(r=Math.sin(l),o=Math.cos(l),s=t*r,l+=i=Math.pow(1-s*s,2)/(2*o)*(e/(1-t*t)-r/(1-s*s)+.5/t*Math.log((1-s)/(1+s))),Math.abs(i)<=1e-10)return l;return NaN}(this.e,2*t.y*this.k0/this.a),e=(0,i.Z)(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=n,t}var c=["cea"],d={init:s,forward:l,inverse:u,names:c}},1941:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return a},init:function(){return o},inverse:function(){return s},names:function(){return l}});var i=n(759),r=n(6886);function o(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function a(t){var e=t.x,n=t.y,o=(0,i.Z)(e-this.long0),a=(0,r.Z)(n-this.lat0);return t.x=this.x0+this.a*o*this.rc,t.y=this.y0+this.a*a,t}function s(t){var e=t.x,n=t.y;return t.x=(0,i.Z)(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=(0,r.Z)(this.lat0+(n-this.y0)/this.a),t}var l=["Equirectangular","Equidistant_Cylindrical","eqc"];e.default={init:o,forward:a,inverse:s,names:l}},245:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return p},init:function(){return f},inverse:function(){return m},names:function(){return g}});var i=n(8053),r=n(7743),o=n(9032),a=n(7325),s=n(4541),l=n(3464),u=n(759),c=n(6886),d=n(6415),h=n(8217);function f(){Math.abs(this.lat1+this.lat2)<h.cp||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=(0,i.Z)(this.es),this.e1=(0,r.Z)(this.es),this.e2=(0,o.Z)(this.es),this.e3=(0,a.Z)(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=(0,s.Z)(this.e,this.sinphi,this.cosphi),this.ml1=(0,l.Z)(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<h.cp?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=(0,s.Z)(this.e,this.sinphi,this.cosphi),this.ml2=(0,l.Z)(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=(0,l.Z)(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function p(t){var e,n=t.x,i=t.y;if(this.sphere)e=this.a*(this.g-i);else{var r=(0,l.Z)(this.e0,this.e1,this.e2,this.e3,i);e=this.a*(this.g-r)}var o=this.ns*(0,u.Z)(n-this.long0),a=this.x0+e*Math.sin(o),s=this.y0+this.rh-e*Math.cos(o);return t.x=a,t.y=s,t}function m(t){var e,n,i,r;t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns>=0?(n=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(n=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var o=0;if(0!==n&&(o=Math.atan2(e*t.x,e*t.y)),this.sphere)return r=(0,u.Z)(this.long0+o/this.ns),i=(0,c.Z)(this.g-n/this.a),t.x=r,t.y=i,t;var a=this.g-n/this.a;return i=(0,d.Z)(a,this.e0,this.e1,this.e2,this.e3),r=(0,u.Z)(this.long0+o/this.ns),t.x=r,t.y=i,t}var g=["Equidistant_Conic","eqdc"];e.default={init:f,forward:p,inverse:m,names:g}},1903:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return o},init:function(){return r},inverse:function(){return a},names:function(){return s}});var i=n(759);function r(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0}function o(t){var e=t.x,n=t.y,r=(0,i.Z)(e-this.long0),o=this.x0+this.a*r*Math.cos(this.lat0),a=this.y0+this.a*n;return this.t1=o,this.t2=Math.cos(this.lat0),t.x=o,t.y=a,t}function a(t){t.x-=this.x0,t.y-=this.y0;var e=t.y/this.a,n=(0,i.Z)(this.long0+t.x/(this.a*Math.cos(this.lat0)));t.x=n,t.y=e}var s=["equi"];e.default={init:r,forward:o,inverse:a,names:s}},516:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return m},forward:function(){return h},init:function(){return d},inverse:function(){return f},names:function(){return p}});var i=n(3157),r=n(9507),o=n(110);function a(t){var e=Math.abs(t);return e=function(t){var e=1+t,n=e-1;return 0===n?t:t*Math.log(e)/n}(e*(1+e/((0,o.Z)(1,e)+1))),t<0?-e:e}function s(t,e){for(var n,i=2*Math.cos(2*e),r=t.length-1,o=t[r],a=0;--r>=0;)n=i*o-a+t[r],a=o,o=n;return e+n*Math.sin(2*e)}var l=n(4074);function u(t,e,n){for(var i,o,a=Math.sin(e),s=Math.cos(e),u=(0,r.Z)(n),c=(0,l.Z)(n),d=2*s*c,h=-2*a*u,f=t.length-1,p=t[f],m=0,g=0,v=0;--f>=0;)i=g,o=m,p=d*(g=p)-i-h*(m=v)+t[f],v=h*g-o+d*m;return[(d=a*c)*p-(h=s*u)*v,d*v+h*p]}var c=n(759);function d(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(i.default.init.apply(this),this.forward=i.default.forward,this.inverse=i.default.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),n=e;this.cgb[0]=e*(2+e*(-2/3+e*(e*(116/45+e*(26/45+e*(-2854/675)))-2))),this.cbg[0]=e*(e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))-2),n*=e,this.cgb[1]=n*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=n*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),n*=e,this.cgb[2]=n*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=n*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),n*=e,this.cgb[3]=n*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=n*(1237/630+e*(e*(-24832/14175)-2.4)),n*=e,this.cgb[4]=n*(4174/315+e*(-144838/6237)),this.cbg[4]=n*(-734/315+e*(109598/31185)),n*=e,this.cgb[5]=n*(601676/22275),this.cbg[5]=n*(444337/155925),n=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+n*(1/4+n*(1/64+n/256))),this.utg[0]=e*(e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))-.5),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=n*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=n*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),n*=e,this.utg[2]=n*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=n*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),n*=e,this.utg[3]=n*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=n*(49561/161280+e*(-179/168+e*(6601661/7257600))),n*=e,this.utg[4]=n*(-4583/161280+e*(108847/3991680)),this.gtu[4]=n*(34729/80640+e*(-3418889/1995840)),n*=e,this.utg[5]=n*(-20648693/638668800),this.gtu[5]=.6650675310896665*n;var r=s(this.cbg,this.lat0);this.Zb=-this.Qn*(r+function(t,e){for(var n,i=2*Math.cos(e),r=t.length-1,o=t[r],a=0;--r>=0;)n=i*o-a+t[r],a=o,o=n;return Math.sin(e)*n}(this.gtu,2*r))}function h(t){var e=(0,c.Z)(t.x-this.long0),n=t.y;n=s(this.cbg,n);var i=Math.sin(n),r=Math.cos(n),l=Math.sin(e),d=Math.cos(e);n=Math.atan2(i,d*r),e=Math.atan2(l*r,(0,o.Z)(i,r*d)),e=a(Math.tan(e));var h,f,p=u(this.gtu,2*n,2*e);return n+=p[0],e+=p[1],Math.abs(e)<=2.623395162778?(h=this.a*(this.Qn*e)+this.x0,f=this.a*(this.Qn*n+this.Zb)+this.y0):(h=1/0,f=1/0),t.x=h,t.y=f,t}function f(t){var e,n,i=(t.x-this.x0)*(1/this.a),a=(t.y-this.y0)*(1/this.a);if(a=(a-this.Zb)/this.Qn,i/=this.Qn,Math.abs(i)<=2.623395162778){var l=u(this.utg,2*a,2*i);a+=l[0],i+=l[1],i=Math.atan((0,r.Z)(i));var d=Math.sin(a),h=Math.cos(a),f=Math.sin(i),p=Math.cos(i);a=Math.atan2(d*p,(0,o.Z)(f,p*h)),i=Math.atan2(f,p*h),e=(0,c.Z)(i+this.long0),n=s(this.cgb,a)}else e=1/0,n=1/0;return t.x=e,t.y=n,t}var p=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"],m={init:d,forward:h,inverse:f,names:p}},9326:function(t,e,n){"use strict";function i(t,e){return Math.pow((1-t)/(1+t),e)}n.r(e),n.d(e,{default:function(){return u},forward:function(){return a},init:function(){return o},inverse:function(){return s},names:function(){return l}});var r=n(8217);function o(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+r.Qg)/(Math.pow(Math.tan(.5*this.lat0+r.Qg),this.C)*i(this.e*t,this.ratexp))}function a(t){var e=t.x,n=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*n+r.Qg),this.C)*i(this.e*Math.sin(n),this.ratexp))-r.pj,t.x=this.C*e,t}function s(t){for(var e=t.x/this.C,n=t.y,o=Math.pow(Math.tan(.5*n+r.Qg)/this.K,1/this.C),a=20;a>0&&(n=2*Math.atan(o*i(this.e*Math.sin(t.y),-.5*this.e))-r.pj,!(Math.abs(n-t.y)<1e-14));--a)t.y=n;return a?(t.x=e,t.y=n,t):null}var l=["gauss"],u={init:o,forward:a,inverse:s,names:l}},1258:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return o},init:function(){return r},inverse:function(){return a},names:function(){return s}});var i=n(2629);function r(){this.name="geocent"}function o(t){return(0,i.Gu)(t,this.es,this.a)}function a(t){return(0,i.Xu)(t,this.es,this.a,this.b)}var s=["Geocentric","geocentric","geocent","Geocent"];e.default={init:r,forward:o,inverse:a,names:s}},813:function(t,e,n){"use strict";n.r(e),n.d(e,{init:function(){return r},names:function(){return o}});var i=n(110);function r(){if(this.flip_axis="x"===this.sweep?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,e=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=e,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}var o=["Geostationary Satellite View","Geostationary_Satellite","geos"];e.default={init:r,forward:function(t){var e,n,r,o,a=t.x,s=t.y;if(a-=this.long0,"ellipse"===this.shape){s=Math.atan(this.radius_p2*Math.tan(s));var l=this.radius_p/(0,i.Z)(this.radius_p*Math.cos(s),Math.sin(s));if(n=l*Math.cos(a)*Math.cos(s),r=l*Math.sin(a)*Math.cos(s),o=l*Math.sin(s),(this.radius_g-n)*n-r*r-o*o*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;e=this.radius_g-n,this.flip_axis?(t.x=this.radius_g_1*Math.atan(r/(0,i.Z)(o,e)),t.y=this.radius_g_1*Math.atan(o/e)):(t.x=this.radius_g_1*Math.atan(r/e),t.y=this.radius_g_1*Math.atan(o/(0,i.Z)(r,e)))}else"sphere"===this.shape&&(e=Math.cos(s),n=Math.cos(a)*e,r=Math.sin(a)*e,o=Math.sin(s),e=this.radius_g-n,this.flip_axis?(t.x=this.radius_g_1*Math.atan(r/(0,i.Z)(o,e)),t.y=this.radius_g_1*Math.atan(o/e)):(t.x=this.radius_g_1*Math.atan(r/e),t.y=this.radius_g_1*Math.atan(o/(0,i.Z)(r,e))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var e,n,r,o,a=-1,s=0,l=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(l=Math.tan(t.y/this.radius_g_1),s=Math.tan(t.x/this.radius_g_1)*(0,i.Z)(1,l)):(s=Math.tan(t.x/this.radius_g_1),l=Math.tan(t.y/this.radius_g_1)*(0,i.Z)(1,s));var u=l/this.radius_p;if(e=s*s+u*u+a*a,(r=(n=2*this.radius_g*a)*n-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;o=(-n-Math.sqrt(r))/(2*e),a=this.radius_g+o*a,s*=o,l*=o,t.x=Math.atan2(s,a),t.y=Math.atan(l*Math.cos(t.x)/a),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(l=Math.tan(t.y/this.radius_g_1),s=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+l*l)):(s=Math.tan(t.x/this.radius_g_1),l=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+s*s)),e=s*s+l*l+a*a,(r=(n=2*this.radius_g*a)*n-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;o=(-n-Math.sqrt(r))/(2*e),a=this.radius_g+o*a,s*=o,l*=o,t.x=Math.atan2(s,a),t.y=Math.atan(l*Math.cos(t.x)/a)}return t.x=t.x+this.long0,t},names:o}},4655:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return s},init:function(){return a},inverse:function(){return l},names:function(){return u}});var i=n(759),r=n(8348),o=n(8217);function a(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function s(t){var e,n,r,a,s,l,u,c=t.x,d=t.y;return r=(0,i.Z)(c-this.long0),e=Math.sin(d),n=Math.cos(d),a=Math.cos(r),1,(s=this.sin_p14*e+this.cos_p14*n*a)>0||Math.abs(s)<=o.cp?(l=this.x0+1*this.a*n*Math.sin(r)/s,u=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*n*a)/s):(l=this.x0+this.infinity_dist*n*Math.sin(r),u=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*n*a)),t.x=l,t.y=u,t}function l(t){var e,n,o,a,s,l;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(a=Math.atan2(e,this.rc),n=Math.sin(a),o=Math.cos(a),l=(0,r.Z)(o*this.sin_p14+t.y*n*this.cos_p14/e),s=Math.atan2(t.x*n,e*this.cos_p14*o-t.y*this.sin_p14*n),s=(0,i.Z)(this.long0+s)):(l=this.phic0,s=0),t.x=s,t.y=l,t}var u=["gnom"];e.default={init:a,forward:s,inverse:l,names:u}},2653:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return h},forward:function(){return u},init:function(){return l},inverse:function(){return c},names:function(){return d}});var i=n(8217);function r(t,e,n){if(Math.abs(e)>i.pj)return Number.NaN;if(e===i.pj)return Number.POSITIVE_INFINITY;if(e===-1*i.pj)return Number.NEGATIVE_INFINITY;var r=t*n;return Math.log(Math.tan((i.pj+e)/2))+t*Math.log((1-r)/(1+r))/2}var o=n(9507),a=n(4074);function s(t,e){return 2*Math.atan(t*Math.exp(e))-i.pj}function l(){var t=this.b/this.a;this.e=Math.sqrt(1-t*t),this.lc=this.long0,this.rs=Math.sqrt(1+this.e*this.e*Math.pow(Math.cos(this.lat0),4)/(1-this.e*this.e));var e=Math.sin(this.lat0),n=Math.asin(e/this.rs),i=Math.sin(n);this.cp=r(0,n,i)-this.rs*r(this.e,this.lat0,e),this.n2=this.k0*this.a*Math.sqrt(1-this.e*this.e)/(1-this.e*this.e*e*e),this.xs=this.x0,this.ys=this.y0-this.n2*n,this.title||(this.title="Gauss Schreiber transverse mercator")}function u(t){var e=t.x,n=t.y,i=this.rs*(e-this.lc),s=this.cp+this.rs*r(this.e,n,Math.sin(n)),l=Math.asin(Math.sin(i)/(0,a.Z)(s)),u=r(0,l,Math.sin(l));return t.x=this.xs+this.n2*u,t.y=this.ys+this.n2*Math.atan((0,o.Z)(s)/Math.cos(i)),t}function c(t){var e=t.x,n=t.y,i=Math.atan((0,o.Z)((e-this.xs)/this.n2)/Math.cos((n-this.ys)/this.n2)),l=Math.asin(Math.sin((n-this.ys)/this.n2)/(0,a.Z)((e-this.xs)/this.n2)),u=r(0,l,Math.sin(l));return t.x=this.lc+i/this.rs,t.y=function(t,e){var n=s(1,e),i=0,r=0;do{i=n,r=t*Math.sin(i),n=s(Math.exp(t*Math.log((1+r)/(1-r))/2),e)}while(Math.abs(n-i)>1e-12);return n}(this.e,(u-this.cp)/this.rs),t}var d=["gstmerg","gstmerc"],h={init:l,forward:u,inverse:c,names:d}},6235:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return o},init:function(){return r},inverse:function(){return a},names:function(){return s}});var i=n(759);function r(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function o(t){var e,n,r,o,a,s,l,u=t.x,c=t.y,d=(0,i.Z)(u-this.long0);return e=Math.pow((1+this.e*Math.sin(c))/(1-this.e*Math.sin(c)),this.alfa*this.e/2),n=2*(Math.atan(this.k*Math.pow(Math.tan(c/2+this.s45),this.alfa)/e)-this.s45),r=-d*this.alfa,o=Math.asin(Math.cos(this.ad)*Math.sin(n)+Math.sin(this.ad)*Math.cos(n)*Math.cos(r)),a=Math.asin(Math.cos(n)*Math.sin(r)/Math.cos(o)),s=this.n*a,l=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(o/2+this.s45),this.n),t.y=l*Math.cos(s)/1,t.x=l*Math.sin(s)/1,this.czech||(t.y*=-1,t.x*=-1),t}function a(t){var e,n,i,r,o,a,s,l=t.x;t.x=t.y,t.y=l,this.czech||(t.y*=-1,t.x*=-1),o=Math.sqrt(t.x*t.x+t.y*t.y),r=Math.atan2(t.y,t.x)/Math.sin(this.s0),i=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(i)-Math.sin(this.ad)*Math.cos(i)*Math.cos(r)),n=Math.asin(Math.cos(i)*Math.sin(r)/Math.cos(e)),t.x=this.long0-n/this.alfa,a=e,s=0;var u=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-t.y)<1e-10&&(s=1),a=t.y,u+=1}while(0===s&&u<15);return u>=15?null:t}var s=["Krovak","krovak"];e.default={init:r,forward:o,inverse:a,names:s}},3769:function(t,e,n){"use strict";n.r(e),n.d(e,{EQUIT:function(){return l},N_POLE:function(){return s},OBLIQ:function(){return u},S_POLE:function(){return a},forward:function(){return d},init:function(){return c},inverse:function(){return h},names:function(){return x}});var i=n(8217),r=n(3998),o=n(759),a=1,s=2,l=3,u=4;function c(){var t,e=Math.abs(this.lat0);if(Math.abs(e-i.pj)<i.cp?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(e)<i.cp?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=(0,r.Z)(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,n=[];return n[0]=t*f,e=t*t,n[0]+=e*p,n[1]=e*g,e*=t,n[0]+=e*m,n[1]+=e*v,n[2]=e*y,n}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=(0,r.Z)(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function d(t){var e,n,a,s,l,u,c,d,h,f,p=t.x,m=t.y;if(p=(0,o.Z)(p-this.long0),this.sphere){if(l=Math.sin(m),f=Math.cos(m),a=Math.cos(p),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((n=this.mode===this.EQUIT?1+f*a:1+this.sinph0*l+this.cosph0*f*a)<=i.cp)return null;e=(n=Math.sqrt(2/n))*f*Math.sin(p),n*=this.mode===this.EQUIT?l:this.cosph0*l-this.sinph0*f*a}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(a=-a),Math.abs(m+this.lat0)<i.cp)return null;n=i.Qg-.5*m,e=(n=2*(this.mode===this.S_POLE?Math.cos(n):Math.sin(n)))*Math.sin(p),n*=a}}else{switch(c=0,d=0,h=0,a=Math.cos(p),s=Math.sin(p),l=Math.sin(m),u=(0,r.Z)(this.e,l),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(c=u/this.qp,d=Math.sqrt(1-c*c)),this.mode){case this.OBLIQ:h=1+this.sinb1*c+this.cosb1*d*a;break;case this.EQUIT:h=1+d*a;break;case this.N_POLE:h=i.pj+m,u=this.qp-u;break;case this.S_POLE:h=m-i.pj,u=this.qp+u}if(Math.abs(h)<i.cp)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:h=Math.sqrt(2/h),n=this.mode===this.OBLIQ?this.ymf*h*(this.cosb1*c-this.sinb1*d*a):(h=Math.sqrt(2/(1+d*a)))*c*this.ymf,e=this.xmf*h*d*s;break;case this.N_POLE:case this.S_POLE:u>=0?(e=(h=Math.sqrt(u))*s,n=a*(this.mode===this.S_POLE?h:-h)):e=n=0}}return t.x=this.a*e+this.x0,t.y=this.a*n+this.y0,t}function h(t){t.x-=this.x0,t.y-=this.y0;var e,n,r,a,s,l,u,c,d,h,f=t.x/this.a,p=t.y/this.a;if(this.sphere){var m,g=0,v=0;if((n=.5*(m=Math.sqrt(f*f+p*p)))>1)return null;switch(n=2*Math.asin(n),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(v=Math.sin(n),g=Math.cos(n)),this.mode){case this.EQUIT:n=Math.abs(m)<=i.cp?0:Math.asin(p*v/m),f*=v,p=g*m;break;case this.OBLIQ:n=Math.abs(m)<=i.cp?this.lat0:Math.asin(g*this.sinph0+p*v*this.cosph0/m),f*=v*this.cosph0,p=(g-Math.sin(n)*this.sinph0)*m;break;case this.N_POLE:p=-p,n=i.pj-n;break;case this.S_POLE:n-=i.pj}e=0!==p||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(f,p):0}else{if(u=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(f/=this.dd,p*=this.dd,(l=Math.sqrt(f*f+p*p))<i.cp)return t.x=this.long0,t.y=this.lat0,t;a=2*Math.asin(.5*l/this.rq),r=Math.cos(a),f*=a=Math.sin(a),this.mode===this.OBLIQ?(u=r*this.sinb1+p*a*this.cosb1/l,s=this.qp*u,p=l*this.cosb1*r-p*this.sinb1*a):(u=p*a/l,s=this.qp*u,p=l*r)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(p=-p),!(s=f*f+p*p))return t.x=this.long0,t.y=this.lat0,t;u=1-s/this.qp,this.mode===this.S_POLE&&(u=-u)}e=Math.atan2(f,p),c=Math.asin(u),d=this.apa,h=c+c,n=c+d[0]*Math.sin(h)+d[1]*Math.sin(h+h)+d[2]*Math.sin(h+h+h)}return t.x=(0,o.Z)(this.long0+e),t.y=n,t}var f=.3333333333333333,p=.17222222222222222,m=.10257936507936508,g=.06388888888888888,v=.0664021164021164,y=.016415012942191543;var x=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];e.default={init:c,forward:d,inverse:h,names:x,S_POLE:a,N_POLE:s,EQUIT:l,OBLIQ:u}},9164:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return c},init:function(){return u},inverse:function(){return d},names:function(){return h}});var i=n(4541),r=n(5346),o=n(7676),a=n(759),s=n(4919),l=n(8217);function u(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<l.cp)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var e=Math.sin(this.lat1),n=Math.cos(this.lat1),o=(0,i.Z)(this.e,e,n),a=(0,r.Z)(this.e,this.lat1,e),s=Math.sin(this.lat2),u=Math.cos(this.lat2),c=(0,i.Z)(this.e,s,u),d=(0,r.Z)(this.e,this.lat2,s),h=(0,r.Z)(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>l.cp?this.ns=Math.log(o/c)/Math.log(a/d):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=o/(this.ns*Math.pow(a,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function c(t){var e=t.x,n=t.y;Math.abs(2*Math.abs(n)-Math.PI)<=l.cp&&(n=(0,o.Z)(n)*(l.pj-2*l.cp));var i,s,u=Math.abs(Math.abs(n)-l.pj);if(u>l.cp)i=(0,r.Z)(this.e,n,Math.sin(n)),s=this.a*this.f0*Math.pow(i,this.ns);else{if((u=n*this.ns)<=0)return null;s=0}var c=this.ns*(0,a.Z)(e-this.long0);return t.x=this.k0*(s*Math.sin(c))+this.x0,t.y=this.k0*(this.rh-s*Math.cos(c))+this.y0,t}function d(t){var e,n,i,r,o,u=(t.x-this.x0)/this.k0,c=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(u*u+c*c),n=1):(e=-Math.sqrt(u*u+c*c),n=-1);var d=0;if(0!==e&&(d=Math.atan2(n*u,n*c)),0!==e||this.ns>0){if(n=1/this.ns,i=Math.pow(e/(this.a*this.f0),n),-9999===(r=(0,s.Z)(this.e,i)))return null}else r=-l.pj;return o=(0,a.Z)(d/this.ns+this.long0),t.x=o,t.y=r,t}var h=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];e.default={init:u,forward:c,inverse:d,names:h}},897:function(t,e,n){"use strict";function i(){}function r(t){return t}n.r(e),n.d(e,{forward:function(){return r},init:function(){return i},inverse:function(){return r},names:function(){return o}});var o=["longlat","identity"];e.default={init:i,forward:r,inverse:r,names:o}},9820:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return u},init:function(){return l},inverse:function(){return c},names:function(){return d}});var i=n(4541),r=n(759),o=n(5346),a=n(4919),s=n(8217);function l(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=(0,i.Z)(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function u(t){var e,n,i=t.x,a=t.y;if(a*s.Pn>90&&a*s.Pn<-90&&i*s.Pn>180&&i*s.Pn<-180)return null;if(Math.abs(Math.abs(a)-s.pj)<=s.cp)return null;if(this.sphere)e=this.x0+this.a*this.k0*(0,r.Z)(i-this.long0),n=this.y0+this.a*this.k0*Math.log(Math.tan(s.Qg+.5*a));else{var l=Math.sin(a),u=(0,o.Z)(this.e,a,l);e=this.x0+this.a*this.k0*(0,r.Z)(i-this.long0),n=this.y0-this.a*this.k0*Math.log(u)}return t.x=e,t.y=n,t}function c(t){var e,n,i=t.x-this.x0,o=t.y-this.y0;if(this.sphere)n=s.pj-2*Math.atan(Math.exp(-o/(this.a*this.k0)));else{var l=Math.exp(-o/(this.a*this.k0));if(-9999===(n=(0,a.Z)(this.e,l)))return null}return e=(0,r.Z)(this.long0+i/(this.a*this.k0)),t.x=e,t.y=n,t}var d=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];e.default={init:l,forward:u,inverse:c,names:d}},7841:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return o},init:function(){return r},inverse:function(){return a},names:function(){return s}});var i=n(759);function r(){}function o(t){var e=t.x,n=t.y,r=(0,i.Z)(e-this.long0),o=this.x0+this.a*r,a=this.y0+this.a*Math.log(Math.tan(Math.PI/4+n/2.5))*1.25;return t.x=o,t.y=a,t}function a(t){t.x-=this.x0,t.y-=this.y0;var e=(0,i.Z)(this.long0+t.x/this.a),n=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=e,t.y=n,t}var s=["Miller_Cylindrical","mill"];e.default={init:r,forward:o,inverse:a,names:s}},6105:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return a},init:function(){return o},inverse:function(){return s},names:function(){return l}});var i=n(759),r=n(8217);function o(){}function a(t){for(var e=t.x,n=t.y,o=(0,i.Z)(e-this.long0),a=n,s=Math.PI*Math.sin(n);;){var l=-(a+Math.sin(a)-s)/(1+Math.cos(a));if(a+=l,Math.abs(l)<r.cp)break}a/=2,Math.PI/2-Math.abs(n)<r.cp&&(o=0);var u=.900316316158*this.a*o*Math.cos(a)+this.x0,c=1.4142135623731*this.a*Math.sin(a)+this.y0;return t.x=u,t.y=c,t}function s(t){var e,n;t.x-=this.x0,t.y-=this.y0,n=t.y/(1.4142135623731*this.a),Math.abs(n)>.999999999999&&(n=.999999999999),e=Math.asin(n);var r=(0,i.Z)(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));r<-Math.PI&&(r=-Math.PI),r>Math.PI&&(r=Math.PI),n=(2*e+Math.sin(2*e))/Math.PI,Math.abs(n)>1&&(n=1);var o=Math.asin(n);return t.x=r,t.y=o,t}var l=["Mollweide","moll"];e.default={init:o,forward:a,inverse:s,names:l}},5591:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return a},init:function(){return o},inverse:function(){return s},iterations:function(){return r},names:function(){return l}});var i=n(8217),r=1;function o(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function a(t){var e,n=t.x,r=t.y-this.lat0,o=n-this.long0,a=r/i.uK*1e-5,s=o,l=1,u=0;for(e=1;e<=10;e++)l*=a,u+=this.A[e]*l;var c,d=u,h=s,f=1,p=0,m=0,g=0;for(e=1;e<=6;e++)c=p*d+f*h,f=f*d-p*h,p=c,m=m+this.B_re[e]*f-this.B_im[e]*p,g=g+this.B_im[e]*f+this.B_re[e]*p;return t.x=g*this.a+this.x0,t.y=m*this.a+this.y0,t}function s(t){var e,n,r=t.x,o=t.y,a=r-this.x0,s=(o-this.y0)/this.a,l=a/this.a,u=1,c=0,d=0,h=0;for(e=1;e<=6;e++)n=c*s+u*l,u=u*s-c*l,c=n,d=d+this.C_re[e]*u-this.C_im[e]*c,h=h+this.C_im[e]*u+this.C_re[e]*c;for(var f=0;f<this.iterations;f++){var p,m=d,g=h,v=s,y=l;for(e=2;e<=6;e++)p=g*d+m*h,m=m*d-g*h,g=p,v+=(e-1)*(this.B_re[e]*m-this.B_im[e]*g),y+=(e-1)*(this.B_im[e]*m+this.B_re[e]*g);m=1,g=0;var x=this.B_re[1],b=this.B_im[1];for(e=2;e<=6;e++)p=g*d+m*h,m=m*d-g*h,g=p,x+=e*(this.B_re[e]*m-this.B_im[e]*g),b+=e*(this.B_im[e]*m+this.B_re[e]*g);var _=x*x+b*b;d=(v*x+y*b)/_,h=(y*x-v*b)/_}var w=d,M=h,A=1,T=0;for(e=1;e<=9;e++)A*=w,T+=this.D[e]*A;var C=this.lat0+T*i.uK*1e5,E=this.long0+M;return t.x=E,t.y=C,t}var l=["New_Zealand_Map_Grid","nzmg"];e.default={init:o,forward:a,inverse:s,names:l}},208:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return u},init:function(){return l},inverse:function(){return c},names:function(){return d}});var i=n(5346),r=n(759),o=n(4919),a=n(8217),s=1e-7;function l(){var t,e,n,o,l,u,c,d,h,f,p,m,g,v=0,y=0,x=0,b=0,_=0,w=0,M=0;this.no_off=(g="object"==typeof(m=this).PROJECTION?Object.keys(m.PROJECTION)[0]:m.PROJECTION,"no_uoff"in m||"no_off"in m||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(g)),this.no_rot="no_rot"in this;var A=!1;"alpha"in this&&(A=!0);var T=!1;if("rectified_grid_angle"in this&&(T=!0),A&&(M=this.alpha),T&&(v=this.rectified_grid_angle*a.Qx),A||T)y=this.longc;else if(x=this.long1,_=this.lat1,b=this.long2,w=this.lat2,Math.abs(_-w)<=s||(t=Math.abs(_))<=s||Math.abs(t-a.pj)<=s||Math.abs(Math.abs(this.lat0)-a.pj)<=s||Math.abs(Math.abs(w)-a.pj)<=s)throw new Error;var C=1-this.es;e=Math.sqrt(C),Math.abs(this.lat0)>a.cp?(d=Math.sin(this.lat0),n=Math.cos(this.lat0),t=1-this.es*d*d,this.B=n*n,this.B=Math.sqrt(1+this.es*this.B*this.B/C),this.A=this.B*this.k0*e/t,(l=(o=this.B*e/(n*Math.sqrt(t)))*o-1)<=0?l=0:(l=Math.sqrt(l),this.lat0<0&&(l=-l)),this.E=l+=o,this.E*=Math.pow((0,i.Z)(this.e,this.lat0,d),this.B)):(this.B=1/e,this.A=this.k0,this.E=o=l=1),A||T?(A?(p=Math.asin(Math.sin(M)/o),T||(v=M)):(p=v,M=Math.asin(o*Math.sin(p))),this.lam0=y-Math.asin(.5*(l-1/l)*Math.tan(p))/this.B):(u=Math.pow((0,i.Z)(this.e,_,Math.sin(_)),this.B),c=Math.pow((0,i.Z)(this.e,w,Math.sin(w)),this.B),l=this.E/u,h=(c-u)/(c+u),f=((f=this.E*this.E)-c*u)/(f+c*u),(t=x-b)<-Math.pi?b-=a.uo:t>Math.pi&&(b+=a.uo),this.lam0=(0,r.Z)(.5*(x+b)-Math.atan(f*Math.tan(.5*this.B*(x-b))/h)/this.B),p=Math.atan(2*Math.sin(this.B*(0,r.Z)(x-this.lam0))/(l-1/l)),v=M=Math.asin(o*Math.sin(p))),this.singam=Math.sin(p),this.cosgam=Math.cos(p),this.sinrot=Math.sin(v),this.cosrot=Math.cos(v),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(o*o-1)/Math.cos(M))),this.lat0<0&&(this.u_0=-this.u_0)),l=.5*p,this.v_pole_n=this.ArB*Math.log(Math.tan(a.Qg-l)),this.v_pole_s=this.ArB*Math.log(Math.tan(a.Qg+l))}function u(t){var e,n,r,o,l,u,c,d,h={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-a.pj)>a.cp){if(e=.5*((l=this.E/Math.pow((0,i.Z)(this.e,t.y,Math.sin(t.y)),this.B))-(u=1/l)),n=.5*(l+u),o=Math.sin(this.B*t.x),r=(e*this.singam-o*this.cosgam)/n,Math.abs(Math.abs(r)-1)<a.cp)throw new Error;d=.5*this.ArB*Math.log((1-r)/(1+r)),u=Math.cos(this.B*t.x),c=Math.abs(u)<s?this.A*t.x:this.ArB*Math.atan2(e*this.cosgam+o*this.singam,u)}else d=t.y>0?this.v_pole_n:this.v_pole_s,c=this.ArB*t.y;return this.no_rot?(h.x=c,h.y=d):(c-=this.u_0,h.x=d*this.cosrot+c*this.sinrot,h.y=c*this.cosrot-d*this.sinrot),h.x=this.a*h.x+this.x0,h.y=this.a*h.y+this.y0,h}function c(t){var e,n,i,r,s,l,u,c={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(n=t.y,e=t.x):(n=t.x*this.cosrot-t.y*this.sinrot,e=t.y*this.cosrot+t.x*this.sinrot+this.u_0),r=.5*((i=Math.exp(-this.BrA*n))-1/i),s=.5*(i+1/i),u=((l=Math.sin(this.BrA*e))*this.cosgam+r*this.singam)/s,Math.abs(Math.abs(u)-1)<a.cp)c.x=0,c.y=u<0?-a.pj:a.pj;else{if(c.y=this.E/Math.sqrt((1+u)/(1-u)),c.y=(0,o.Z)(this.e,Math.pow(c.y,1/this.B)),c.y===1/0)throw new Error;c.x=-this.rB*Math.atan2(r*this.cosgam-l*this.singam,Math.cos(this.BrA*e))}return c.x+=this.lam0,c}var d=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];e.default={init:l,forward:u,inverse:c,names:d}},2310:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return s},init:function(){return a},inverse:function(){return l},names:function(){return u}});var i=n(759),r=n(8348),o=n(8217);function a(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function s(t){var e,n,r,a,s,l,u,c=t.x,d=t.y;return r=(0,i.Z)(c-this.long0),e=Math.sin(d),n=Math.cos(d),a=Math.cos(r),1,((s=this.sin_p14*e+this.cos_p14*n*a)>0||Math.abs(s)<=o.cp)&&(l=1*this.a*n*Math.sin(r),u=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*n*a)),t.x=l,t.y=u,t}function l(t){var e,n,a,s,l,u,c;return t.x-=this.x0,t.y-=this.y0,e=Math.sqrt(t.x*t.x+t.y*t.y),n=(0,r.Z)(e/this.a),a=Math.sin(n),s=Math.cos(n),u=this.long0,Math.abs(e)<=o.cp?(c=this.lat0,t.x=u,t.y=c,t):(c=(0,r.Z)(s*this.sin_p14+t.y*a*this.cos_p14/e),l=Math.abs(this.lat0)-o.pj,Math.abs(l)<=o.cp?(u=this.lat0>=0?(0,i.Z)(this.long0+Math.atan2(t.x,-t.y)):(0,i.Z)(this.long0-Math.atan2(-t.x,t.y)),t.x=u,t.y=c,t):(u=(0,i.Z)(this.long0+Math.atan2(t.x*a,e*this.cos_p14*s-t.y*this.sin_p14*a)),t.x=u,t.y=c,t))}var u=["ortho"];e.default={init:a,forward:s,inverse:l,names:u}},6089:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return f},init:function(){return h},inverse:function(){return p},names:function(){return m}});var i=n(8053),r=n(7743),o=n(9032),a=n(7325),s=n(759),l=n(6886),u=n(3464),c=n(8217),d=n(918);function h(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=(0,i.Z)(this.es),this.e1=(0,r.Z)(this.es),this.e2=(0,o.Z)(this.es),this.e3=(0,a.Z)(this.es),this.ml0=this.a*(0,u.Z)(this.e0,this.e1,this.e2,this.e3,this.lat0)}function f(t){var e,n,i,r=t.x,o=t.y,a=(0,s.Z)(r-this.long0);if(i=a*Math.sin(o),this.sphere)Math.abs(o)<=c.cp?(e=this.a*a,n=-1*this.a*this.lat0):(e=this.a*Math.sin(i)/Math.tan(o),n=this.a*((0,l.Z)(o-this.lat0)+(1-Math.cos(i))/Math.tan(o)));else if(Math.abs(o)<=c.cp)e=this.a*a,n=-1*this.ml0;else{var h=(0,d.Z)(this.a,this.e,Math.sin(o))/Math.tan(o);e=h*Math.sin(i),n=this.a*(0,u.Z)(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+h*(1-Math.cos(i))}return t.x=e+this.x0,t.y=n+this.y0,t}function p(t){var e,n,i,r,o,a,l,d,h;if(i=t.x-this.x0,r=t.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=c.cp)e=(0,s.Z)(i/this.a+this.long0),n=0;else{var f;for(a=this.lat0+r/this.a,l=i*i/this.a/this.a+a*a,d=a,o=20;o;--o)if(d+=h=-1*(a*(d*(f=Math.tan(d))+1)-d-.5*(d*d+l)*f)/((d-a)/f-1),Math.abs(h)<=c.cp){n=d;break}e=(0,s.Z)(this.long0+Math.asin(i*Math.tan(d)/this.a)/Math.sin(n))}else if(Math.abs(r+this.ml0)<=c.cp)n=0,e=(0,s.Z)(this.long0+i/this.a);else{var p,m,g,v,y;for(a=(this.ml0+r)/this.a,l=i*i/this.a/this.a+a*a,d=a,o=20;o;--o)if(y=this.e*Math.sin(d),p=Math.sqrt(1-y*y)*Math.tan(d),m=this.a*(0,u.Z)(this.e0,this.e1,this.e2,this.e3,d),g=this.e0-2*this.e1*Math.cos(2*d)+4*this.e2*Math.cos(4*d)-6*this.e3*Math.cos(6*d),d-=h=(a*(p*(v=m/this.a)+1)-v-.5*p*(v*v+l))/(this.es*Math.sin(2*d)*(v*v+l-2*a*v)/(4*p)+(a-v)*(p*g-2/Math.sin(2*d))-g),Math.abs(h)<=c.cp){n=d;break}p=Math.sqrt(1-this.es*Math.pow(Math.sin(n),2))*Math.tan(n),e=(0,s.Z)(this.long0+Math.asin(i*p/this.a)/Math.sin(n))}return t.x=e,t.y=n,t}var m=["Polyconic","poly"];e.default={init:h,forward:f,inverse:p,names:m}},4689:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return m},init:function(){return p},inverse:function(){return g},names:function(){return x}});var i=n(8217),r=1,o=2,a=3,s=4,l=5,u=6,c=1,d=2,h=3,f=4;function p(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=i.pj-i.Qg/2?this.face=l:this.lat0<=-(i.pj-i.Qg/2)?this.face=u:Math.abs(this.long0)<=i.Qg?this.face=r:Math.abs(this.long0)<=i.pj+i.Qg?this.face=this.long0>0?o:s:this.face=a,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function m(t){var e,n,p,m,g,x,b={x:0,y:0},_={value:0};if(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,n=t.x,this.face===l)m=i.pj-e,n>=i.Qg&&n<=i.pj+i.Qg?(_.value=c,p=n-i.pj):n>i.pj+i.Qg||n<=-(i.pj+i.Qg)?(_.value=d,p=n>0?n-i.U2:n+i.U2):n>-(i.pj+i.Qg)&&n<=-i.Qg?(_.value=h,p=n+i.pj):(_.value=f,p=n);else if(this.face===u)m=i.pj+e,n>=i.Qg&&n<=i.pj+i.Qg?(_.value=c,p=-n+i.pj):n<i.Qg&&n>=-i.Qg?(_.value=d,p=-n):n<-i.Qg&&n>=-(i.pj+i.Qg)?(_.value=h,p=-n-i.pj):(_.value=f,p=n>0?-n+i.U2:-n-i.U2);else{var w,M,A,T,C,E;this.face===o?n=y(n,+i.pj):this.face===a?n=y(n,+i.U2):this.face===s&&(n=y(n,-i.pj)),T=Math.sin(e),C=Math.cos(e),E=Math.sin(n),w=C*Math.cos(n),M=C*E,A=T,this.face===r?p=v(m=Math.acos(w),A,M,_):this.face===o?p=v(m=Math.acos(M),A,-w,_):this.face===a?p=v(m=Math.acos(-w),A,-M,_):this.face===s?p=v(m=Math.acos(-M),A,w,_):(m=p=0,_.value=c)}return x=Math.atan(12/i.U2*(p+Math.acos(Math.sin(p)*Math.cos(i.Qg))-i.pj)),g=Math.sqrt((1-Math.cos(m))/(Math.cos(x)*Math.cos(x))/(1-Math.cos(Math.atan(1/Math.cos(p))))),_.value===d?x+=i.pj:_.value===h?x+=i.U2:_.value===f&&(x+=1.5*i.U2),b.x=g*Math.cos(x),b.y=g*Math.sin(x),b.x=b.x*this.a+this.x0,b.y=b.y*this.a+this.y0,t.x=b.x,t.y=b.y,t}function g(t){var e,n,r,p,m,g,v,x,b,_,w,M,A={lam:0,phi:0},T={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,n=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),e=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?T.value=c:t.y>=0&&t.y>=Math.abs(t.x)?(T.value=d,e-=i.pj):t.x<0&&-t.x>=Math.abs(t.y)?(T.value=h,e=e<0?e+i.U2:e-i.U2):(T.value=f,e+=i.pj),b=i.U2/12*Math.tan(e),m=Math.sin(b)/(Math.cos(b)-1/Math.sqrt(2)),g=Math.atan(m),(v=1-(r=Math.cos(e))*r*(p=Math.tan(n))*p*(1-Math.cos(Math.atan(1/Math.cos(g)))))<-1?v=-1:v>1&&(v=1),this.face===l)x=Math.acos(v),A.phi=i.pj-x,T.value===c?A.lam=g+i.pj:T.value===d?A.lam=g<0?g+i.U2:g-i.U2:T.value===h?A.lam=g-i.pj:A.lam=g;else if(this.face===u)x=Math.acos(v),A.phi=x-i.pj,T.value===c?A.lam=-g+i.pj:T.value===d?A.lam=-g:T.value===h?A.lam=-g-i.pj:A.lam=g<0?-g-i.U2:-g+i.U2;else{var C,E,S;b=(C=v)*C,E=(b+=(S=b>=1?0:Math.sqrt(1-b)*Math.sin(g))*S)>=1?0:Math.sqrt(1-b),T.value===d?(b=E,E=-S,S=b):T.value===h?(E=-E,S=-S):T.value===f&&(b=E,E=S,S=-b),this.face===o?(b=C,C=-E,E=b):this.face===a?(C=-C,E=-E):this.face===s&&(b=C,C=E,E=-b),A.phi=Math.acos(-S)-i.pj,A.lam=Math.atan2(E,C),this.face===o?A.lam=y(A.lam,-i.pj):this.face===a?A.lam=y(A.lam,-i.U2):this.face===s&&(A.lam=y(A.lam,+i.pj))}0!==this.es&&(_=A.phi<0?1:0,w=Math.tan(A.phi),M=this.b/Math.sqrt(w*w+this.one_minus_f_squared),A.phi=Math.atan(Math.sqrt(this.a*this.a-M*M)/(this.one_minus_f*M)),_&&(A.phi=-A.phi));return A.lam+=this.long0,t.x=A.lam,t.y=A.phi,t}function v(t,e,n,r){var o;return t<i.cp?(r.value=c,o=0):(o=Math.atan2(e,n),Math.abs(o)<=i.Qg?r.value=c:o>i.Qg&&o<=i.pj+i.Qg?(r.value=d,o-=i.pj):o>i.pj+i.Qg||o<=-(i.pj+i.Qg)?(r.value=h,o=o>=0?o-i.U2:o+i.U2):(r.value=f,o+=i.pj)),o}function y(t,e){var n=t+e;return n<-i.U2?n+=i.uo:n>+i.U2&&(n-=i.uo),n}var x=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];e.default={init:p,forward:m,inverse:g,names:x}},4402:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return p},init:function(){return f},inverse:function(){return m},names:function(){return g}});var i=n(8217),r=n(759),o=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],a=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],s=.8487,l=1.3523,u=i.Pn/5,c=1/u,d=18,h=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))};function f(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function p(t){var e=(0,r.Z)(t.x-this.long0),n=Math.abs(t.y),f=Math.floor(n*u);f<0?f=0:f>=d&&(f=17),n=i.Pn*(n-c*f);var p={x:h(o[f],n)*e,y:h(a[f],n)};return t.y<0&&(p.y=-p.y),p.x=p.x*this.a*s+this.x0,p.y=p.y*this.a*l+this.y0,p}function m(t){var e={x:(t.x-this.x0)/(this.a*s),y:Math.abs(t.y-this.y0)/(this.a*l)};if(e.y>=1)e.x/=o[18][0],e.y=t.y<0?-i.pj:i.pj;else{var n=Math.floor(e.y*d);for(n<0?n=0:n>=d&&(n=17);;)if(a[n][0]>e.y)--n;else{if(!(a[n+1][0]<=e.y))break;++n}var u=a[n],c=5*(e.y-u[0])/(a[n+1][0]-u[0]);c=function(t,e,n,i){for(var r=e;i;--i){var o=t(r);if(r-=o,Math.abs(o)<n)break}return r}((function(t){return(h(u,t)-e.y)/function(t,e){return t[1]+e*(2*t[2]+3*e*t[3])}(u,t)}),c,i.cp,100),e.x/=h(o[n],c),e.y=(5*n+c)*i.Qx,t.y<0&&(e.y=-e.y)}return e.x=(0,r.Z)(e.x+this.long0),e}var g=["Robinson","robin"];e.default={init:f,forward:p,inverse:m,names:g}},9926:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return d},init:function(){return c},inverse:function(){return h},names:function(){return f}});var i=n(759),r=n(6886),o=n(5054),a=n(5386),s=n(6574),l=n(8217),u=n(8348);function c(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=(0,o.Z)(this.es)}function d(t){var e,n,r=t.x,o=t.y;if(r=(0,i.Z)(r-this.long0),this.sphere){if(this.m)for(var s=this.n*Math.sin(o),u=20;u;--u){var c=(this.m*o+Math.sin(o)-s)/(this.m+Math.cos(o));if(o-=c,Math.abs(c)<l.cp)break}else o=1!==this.n?Math.asin(this.n*Math.sin(o)):o;e=this.a*this.C_x*r*(this.m+Math.cos(o)),n=this.a*this.C_y*o}else{var d=Math.sin(o),h=Math.cos(o);n=this.a*(0,a.Z)(o,d,h,this.en),e=this.a*r*h/Math.sqrt(1-this.es*d*d)}return t.x=e,t.y=n,t}function h(t){var e,n,o,a;return t.x-=this.x0,o=t.x/this.a,t.y-=this.y0,e=t.y/this.a,this.sphere?(e/=this.C_y,o/=this.C_x*(this.m+Math.cos(e)),this.m?e=(0,u.Z)((this.m*e+Math.sin(e))/this.n):1!==this.n&&(e=(0,u.Z)(Math.sin(e)/this.n)),o=(0,i.Z)(o+this.long0),e=(0,r.Z)(e)):(e=(0,s.Z)(t.y/this.a,this.es,this.en),(a=Math.abs(e))<l.pj?(a=Math.sin(e),n=this.long0+t.x*Math.sqrt(1-this.es*a*a)/(this.a*Math.cos(e)),o=(0,i.Z)(n)):a-l.cp<l.pj&&(o=this.long0)),t.x=o,t.y=e,t}var f=["Sinusoidal","sinu"];e.default={init:c,forward:d,inverse:h,names:f}},4176:function(t,e,n){"use strict";function i(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),n=this.a,i=1/this.rf,r=2*i-Math.pow(i,2),o=this.e=Math.sqrt(r);this.R=this.k0*n*Math.sqrt(1-r)/(1-r*Math.pow(e,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+t/2)),l=Math.log((1+o*e)/(1-o*e));this.K=a-this.alpha*s+this.alpha*o/2*l}function r(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),n=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),i=-this.alpha*(e+n)+this.K,r=2*(Math.atan(Math.exp(i))-Math.PI/4),o=this.alpha*(t.x-this.lambda0),a=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(o))),s=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(o));return t.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,t.x=this.R*a+this.x0,t}function o(t){for(var e=t.x-this.x0,n=t.y-this.y0,i=e/this.R,r=2*(Math.atan(Math.exp(n/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(i)),a=Math.atan(Math.sin(i)/(Math.cos(this.b0)*Math.cos(i)-Math.sin(this.b0)*Math.tan(r))),s=this.lambda0+a/this.alpha,l=0,u=o,c=-1e3,d=0;Math.abs(u-c)>1e-7;){if(++d>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2)),c=u,u=2*Math.atan(Math.exp(l))-Math.PI/2}return t.x=s,t.y=u,t}n.r(e),n.d(e,{forward:function(){return r},init:function(){return i},inverse:function(){return o},names:function(){return a}});var a=["somerc"];e.default={init:i,forward:r,inverse:o,names:a}},7983:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return d},init:function(){return c},inverse:function(){return h},names:function(){return f},ssfn_:function(){return u}});var i=n(8217),r=n(7676),o=n(4541),a=n(5346),s=n(4919),l=n(759);function u(t,e,n){return e*=n,Math.tan(.5*(i.pj+t))*Math.pow((1-e)/(1+e),.5*n)}function c(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=i.cp&&(this.k0=.5*(1+(0,r.Z)(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=i.cp&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=i.cp&&(this.k0=.5*this.cons*(0,o.Z)(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/(0,a.Z)(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=(0,o.Z)(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-i.pj,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function d(t){var e,n,r,o,s,u,c=t.x,d=t.y,h=Math.sin(d),f=Math.cos(d),p=(0,l.Z)(c-this.long0);return Math.abs(Math.abs(c-this.long0)-Math.PI)<=i.cp&&Math.abs(d+this.lat0)<=i.cp?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*h+this.coslat0*f*Math.cos(p)),t.x=this.a*e*f*Math.sin(p)+this.x0,t.y=this.a*e*(this.coslat0*h-this.sinlat0*f*Math.cos(p))+this.y0,t):(n=2*Math.atan(this.ssfn_(d,h,this.e))-i.pj,o=Math.cos(n),r=Math.sin(n),Math.abs(this.coslat0)<=i.cp?(s=(0,a.Z)(this.e,d*this.con,this.con*h),u=2*this.a*this.k0*s/this.cons,t.x=this.x0+u*Math.sin(c-this.long0),t.y=this.y0-this.con*u*Math.cos(c-this.long0),t):(Math.abs(this.sinlat0)<i.cp?(e=2*this.a*this.k0/(1+o*Math.cos(p)),t.y=e*r):(e=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*r+this.cosX0*o*Math.cos(p))),t.y=e*(this.cosX0*r-this.sinX0*o*Math.cos(p))+this.y0),t.x=e*o*Math.sin(p)+this.x0,t))}function h(t){var e,n,r,o,a;t.x-=this.x0,t.y-=this.y0;var u=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var c=2*Math.atan(u/(2*this.a*this.k0));return e=this.long0,n=this.lat0,u<=i.cp?(t.x=e,t.y=n,t):(n=Math.asin(Math.cos(c)*this.sinlat0+t.y*Math.sin(c)*this.coslat0/u),e=Math.abs(this.coslat0)<i.cp?this.lat0>0?(0,l.Z)(this.long0+Math.atan2(t.x,-1*t.y)):(0,l.Z)(this.long0+Math.atan2(t.x,t.y)):(0,l.Z)(this.long0+Math.atan2(t.x*Math.sin(c),u*this.coslat0*Math.cos(c)-t.y*this.sinlat0*Math.sin(c))),t.x=e,t.y=n,t)}if(Math.abs(this.coslat0)<=i.cp){if(u<=i.cp)return n=this.lat0,e=this.long0,t.x=e,t.y=n,t;t.x*=this.con,t.y*=this.con,r=u*this.cons/(2*this.a*this.k0),n=this.con*(0,s.Z)(this.e,r),e=this.con*(0,l.Z)(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else o=2*Math.atan(u*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,u<=i.cp?a=this.X0:(a=Math.asin(Math.cos(o)*this.sinX0+t.y*Math.sin(o)*this.cosX0/u),e=(0,l.Z)(this.long0+Math.atan2(t.x*Math.sin(o),u*this.cosX0*Math.cos(o)-t.y*this.sinX0*Math.sin(o)))),n=-1*(0,s.Z)(this.e,Math.tan(.5*(i.pj+a)));return t.x=e,t.y=n,t}var f=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"];e.default={init:c,forward:d,inverse:h,names:f,ssfn_:u}},9936:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return a},init:function(){return o},inverse:function(){return s},names:function(){return l}});var i=n(9326),r=n(759);function o(){i.default.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function a(t){var e,n,o,a;return t.x=(0,r.Z)(t.x-this.long0),i.default.forward.apply(this,[t]),e=Math.sin(t.y),n=Math.cos(t.y),o=Math.cos(t.x),a=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*n*o),t.x=a*n*Math.sin(t.x),t.y=a*(this.cosc0*e-this.sinc0*n*o),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function s(t){var e,n,o,a,s;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,s=Math.sqrt(t.x*t.x+t.y*t.y)){var l=2*Math.atan2(s,this.R2);e=Math.sin(l),n=Math.cos(l),a=Math.asin(n*this.sinc0+t.y*e*this.cosc0/s),o=Math.atan2(t.x*e,s*this.cosc0*n-t.y*this.sinc0*e)}else a=this.phic0,o=0;return t.x=o,t.y=a,i.default.inverse.apply(this,[t]),t.x=(0,r.Z)(t.x+this.long0),t}var l=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];e.default={init:o,forward:a,inverse:s,names:l}},3157:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return c},init:function(){return u},inverse:function(){return d},names:function(){return h}});var i=n(5054),r=n(5386),o=n(6574),a=n(759),s=n(8217),l=n(7676);function u(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=(0,i.Z)(this.es),this.ml0=(0,r.Z)(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function c(t){var e,n,i,o=t.x,l=t.y,u=(0,a.Z)(o-this.long0),c=Math.sin(l),d=Math.cos(l);if(this.es){var h=d*u,f=Math.pow(h,2),p=this.ep2*Math.pow(d,2),m=Math.pow(p,2),g=Math.abs(d)>s.cp?Math.tan(l):0,v=Math.pow(g,2),y=Math.pow(v,2);e=1-this.es*Math.pow(c,2),h/=Math.sqrt(e);var x=(0,r.Z)(l,c,d,this.en);n=this.a*(this.k0*h*(1+f/6*(1-v+p+f/20*(5-18*v+y+14*p-58*v*p+f/42*(61+179*y-y*v-479*v)))))+this.x0,i=this.a*(this.k0*(x-this.ml0+c*u*h/2*(1+f/12*(5-v+9*p+4*m+f/30*(61+y-58*v+270*p-330*v*p+f/56*(1385+543*y-y*v-3111*v))))))+this.y0}else{var b=d*Math.sin(u);if(Math.abs(Math.abs(b)-1)<s.cp)return 93;if(n=.5*this.a*this.k0*Math.log((1+b)/(1-b))+this.x0,i=d*Math.cos(u)/Math.sqrt(1-Math.pow(b,2)),(b=Math.abs(i))>=1){if(b-1>s.cp)return 93;i=0}else i=Math.acos(i);l<0&&(i=-i),i=this.a*this.k0*(i-this.lat0)+this.y0}return t.x=n,t.y=i,t}function d(t){var e,n,i,r,u=(t.x-this.x0)*(1/this.a),c=(t.y-this.y0)*(1/this.a);if(this.es)if(e=this.ml0+c/this.k0,n=(0,o.Z)(e,this.es,this.en),Math.abs(n)<s.pj){var d=Math.sin(n),h=Math.cos(n),f=Math.abs(h)>s.cp?Math.tan(n):0,p=this.ep2*Math.pow(h,2),m=Math.pow(p,2),g=Math.pow(f,2),v=Math.pow(g,2);e=1-this.es*Math.pow(d,2);var y=u*Math.sqrt(e)/this.k0,x=Math.pow(y,2);i=n-(e*=f)*x/(1-this.es)*.5*(1-x/12*(5+3*g-9*p*g+p-4*m-x/30*(61+90*g-252*p*g+45*v+46*p-x/56*(1385+3633*g+4095*v+1574*v*g)))),r=(0,a.Z)(this.long0+y*(1-x/6*(1+2*g+p-x/20*(5+28*g+24*v+8*p*g+6*p-x/42*(61+662*g+1320*v+720*v*g))))/h)}else i=s.pj*(0,l.Z)(c),r=0;else{var b=Math.exp(u/this.k0),_=.5*(b-1/b),w=this.lat0+c/this.k0,M=Math.cos(w);e=Math.sqrt((1-Math.pow(M,2))/(1+Math.pow(_,2))),i=Math.asin(e),c<0&&(i=-i),r=0===_&&0===M?0:(0,a.Z)(Math.atan2(_,M)+this.long0)}return t.x=r,t.y=i,t}var h=["Fast_Transverse_Mercator","Fast Transverse Mercator"];e.default={init:u,forward:c,inverse:d,names:h}},6470:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return d},init:function(){return c},inverse:function(){return h},names:function(){return f}});var i=n(8217),r=n(110),o=0,a=1,s=2,l=3,u={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function c(){if(Object.keys(u).forEach(function(t){if(void 0===this[t])this[t]=u[t].def;else{if(u[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);u[t].num&&(this[t]=parseFloat(this[t]))}u[t].degrees&&(this[t]=this[t]*i.Qx)}.bind(this)),Math.abs(Math.abs(this.lat0)-i.pj)<i.cp?this.mode=this.lat0<0?a:o:Math.abs(this.lat0)<i.cp?this.mode=s:(this.mode=l,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(t),this.sw=Math.sin(t)}function d(t){t.x-=this.long0;var e,n,i,r,u=Math.sin(t.y),c=Math.cos(t.y),d=Math.cos(t.x);switch(this.mode){case l:n=this.sinph0*u+this.cosph0*c*d;break;case s:n=c*d;break;case a:n=-u;break;case o:n=u}switch(e=(n=this.pn1/(this.p-n))*c*Math.sin(t.x),this.mode){case l:n*=this.cosph0*u-this.sinph0*c*d;break;case s:n*=u;break;case o:n*=-c*d;break;case a:n*=c*d}return r=1/((i=n*this.cg+e*this.sg)*this.sw*this.h1+this.cw),e=(e*this.cg-n*this.sg)*this.cw*r,n=i*r,t.x=e*this.a,t.y=n*this.a,t}function h(t){t.x/=this.a,t.y/=this.a;var e,n,u,c={x:t.x,y:t.y};u=1/(this.pn1-t.y*this.sw),e=this.pn1*t.x*u,n=this.pn1*t.y*this.cw*u,t.x=e*this.cg+n*this.sg,t.y=n*this.cg-e*this.sg;var d=(0,r.Z)(t.x,t.y);if(Math.abs(d)<i.cp)c.x=0,c.y=t.y;else{var h,f;switch(f=1-d*d*this.pfact,f=(this.p-Math.sqrt(f))/(this.pn1/d+d/this.pn1),h=Math.sqrt(1-f*f),this.mode){case l:c.y=Math.asin(h*this.sinph0+t.y*f*this.cosph0/d),t.y=(h-this.sinph0*Math.sin(c.y))*d,t.x*=f*this.cosph0;break;case s:c.y=Math.asin(t.y*f/d),t.y=h*d,t.x*=f;break;case o:c.y=Math.asin(h),t.y=-t.y;break;case a:c.y=-Math.asin(h)}c.x=Math.atan2(t.x,t.y)}return t.x=c.x+this.long0,t.y=c.y,t}var f=["Tilted_Perspective","tpers"];e.default={init:c,forward:d,inverse:h,names:f}},973:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return u},dependsOn:function(){return a},init:function(){return s},names:function(){return l}});var i=n(759);var r=n(516),o=n(8217),a="etmerc";function s(){var t=function(t,e){if(void 0===t){if((t=Math.floor(30*((0,i.Z)(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*o.Qx,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,r.default.init.apply(this),this.forward=r.default.forward,this.inverse=r.default.inverse}var l=["Universal Transverse Mercator System","utm"],u={init:s,names:l,dependsOn:a}},604:function(t,e,n){"use strict";n.r(e),n.d(e,{forward:function(){return s},init:function(){return a},inverse:function(){return l},names:function(){return u}});var i=n(759),r=n(8217),o=n(8348);function a(){this.R=this.a}function s(t){var e,n,a=t.x,s=t.y,l=(0,i.Z)(a-this.long0);Math.abs(s)<=r.cp&&(e=this.x0+this.R*l,n=this.y0);var u=(0,o.Z)(2*Math.abs(s/Math.PI));(Math.abs(l)<=r.cp||Math.abs(Math.abs(s)-r.pj)<=r.cp)&&(e=this.x0,n=s>=0?this.y0+Math.PI*this.R*Math.tan(.5*u):this.y0+Math.PI*this.R*-Math.tan(.5*u));var c=.5*Math.abs(Math.PI/l-l/Math.PI),d=c*c,h=Math.sin(u),f=Math.cos(u),p=f/(h+f-1),m=p*p,g=p*(2/h-1),v=g*g,y=Math.PI*this.R*(c*(p-v)+Math.sqrt(d*(p-v)*(p-v)-(v+d)*(m-v)))/(v+d);l<0&&(y=-y),e=this.x0+y;var x=d+p;return y=Math.PI*this.R*(g*x-c*Math.sqrt((v+d)*(d+1)-x*x))/(v+d),n=s>=0?this.y0+y:this.y0-y,t.x=e,t.y=n,t}function l(t){var e,n,o,a,s,l,u,c,d,h,f,p;return t.x-=this.x0,t.y-=this.y0,f=Math.PI*this.R,s=(o=t.x/f)*o+(a=t.y/f)*a,f=3*(a*a/(c=-2*(l=-Math.abs(a)*(1+s))+1+2*a*a+s*s)+(2*(u=l-2*a*a+o*o)*u*u/c/c/c-9*l*u/c/c)/27)/(d=(l-u*u/3/c)/c)/(h=2*Math.sqrt(-d/3)),Math.abs(f)>1&&(f=f>=0?1:-1),p=Math.acos(f)/3,n=t.y>=0?(-h*Math.cos(p+Math.PI/3)-u/3/c)*Math.PI:-(-h*Math.cos(p+Math.PI/3)-u/3/c)*Math.PI,e=Math.abs(o)<r.cp?this.long0:(0,i.Z)(this.long0+Math.PI*(s-1+Math.sqrt(1+2*(o*o-a*a)+s*s))/2/o),t.x=e,t.y=n,t}var u=["Van_der_Grinten_I","VanDerGrinten","vandg"];e.default={init:a,forward:s,inverse:l,names:u}},1103:function(t,e,n){var i={"./aea.js":9816,"./aeqd.js":2765,"./cass.js":5234,"./cea.js":7712,"./eqc.js":1941,"./eqdc.js":245,"./equi.js":1903,"./etmerc.js":516,"./gauss.js":9326,"./geocent.js":1258,"./geos.js":813,"./gnom.js":4655,"./gstmerc.js":2653,"./krovak.js":6235,"./laea.js":3769,"./lcc.js":9164,"./longlat.js":897,"./merc.js":9820,"./mill.js":7841,"./moll.js":6105,"./nzmg.js":5591,"./omerc.js":208,"./ortho.js":2310,"./poly.js":6089,"./qsc.js":4689,"./robin.js":4402,"./sinu.js":9926,"./somerc.js":4176,"./stere.js":7983,"./sterea.js":9936,"./tmerc.js":3157,"./tpers.js":6470,"./utm.js":973,"./vandg.js":604};function r(t){var e=o(t);return n(e)}function o(t){if(!n.o(i,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return i[t]}r.keys=function(){return Object.keys(i)},r.resolve=o,t.exports=r,r.id=1103},9162:function(t){t.exports="/* lineFeature fragment shader */\n\n#ifdef GL_ES\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n #else\n precision mediump float;\n #endif\n#endif\nvarying vec4 strokeColorVar;\nvarying vec4 subpos;\nvarying vec4 info;\nvarying vec4 angles;\nuniform float antialiasing;\nuniform float miterLimit;\nuniform float fixedFlags;\n\nvoid main () {\n vec4 color = strokeColorVar;\n float opacity = 1.0;\n int nearMode = int(floor(info.x + 0.5));\n int farMode = int(floor(info.y + 0.5));\n float cosABC = angles.x;\n float sinABC = angles.y;\n float cosBCD = angles.z;\n float sinBCD = angles.w;\n // never render on the opposite side of a miter. This uses a bit of\n // slop, via pow(smoothstep()) instead of step(), since there are\n // precision issues in this calculation. This doesn't wholly solve\n // the precision issue; sometimes pixels are missed or double\n // rendered along the inside seam of a miter.\n if (nearMode >= 4) {\n float dist = cosABC * subpos.x - sinABC * subpos.y;\n opacity = min(opacity, pow(smoothstep(-0.02, 0.02, dist), 0.5));\n if (opacity == 0.0) {\n discard;\n }\n }\n if (farMode >= 4) {\n float dist = cosBCD * subpos.z - sinBCD * subpos.y;\n opacity = min(opacity, pow(smoothstep(-0.02, 0.02, dist), 0.5));\n if (opacity == 0.0) {\n discard;\n }\n }\n // butt or square cap\n if ((nearMode == 0 || nearMode == 1) && subpos.x < antialiasing) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.x + subpos.w * float(nearMode)));\n }\n if ((farMode == 0 || farMode == 1) && subpos.z < antialiasing) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.z + subpos.w * float(farMode)));\n }\n // round cap\n if (nearMode == 2 && subpos.x <= 0.0) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.w - sqrt(pow(subpos.x, 2.0) + pow(subpos.y - info.z * subpos.w, 2.0))));\n }\n if (farMode == 2 && subpos.z <= 0.0) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.w - sqrt(pow(subpos.z, 2.0) + pow(subpos.y - info.z * subpos.w, 2.0))));\n }\n // bevel and clip joins\n if ((nearMode == 5 || nearMode == 7) && subpos.x < antialiasing) {\n float dist = (sinABC * subpos.x + cosABC * subpos.y) * sign(sinABC);\n float w = subpos.w * (1.0 - info.z * sign(sinABC));\n float maxDist;\n if (nearMode == 5) maxDist = cosABC * w;\n else maxDist = miterLimit * w;\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, maxDist + dist));\n }\n if ((farMode == 5 || farMode == 7) && subpos.z < antialiasing) {\n float dist = (sinBCD * subpos.z + cosBCD * subpos.y) * sign(sinBCD);\n float w = subpos.w * (1.0 - info.z * sign(sinBCD));\n float maxDist;\n if (farMode == 5) maxDist = cosBCD * w;\n else maxDist = miterLimit * w;\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, maxDist + dist));\n }\n // round join\n if (nearMode == 6 && subpos.x <= 0.0) {\n float w = subpos.w * (1.0 - info.z * sign(sinABC));\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, w - sqrt(pow(subpos.x, 2.0) + pow(subpos.y, 2.0))));\n }\n if (farMode == 6 && subpos.z <= 0.0) {\n float w = subpos.w * (1.0 - info.z * sign(sinBCD));\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, w - sqrt(pow(subpos.z, 2.0) + pow(subpos.y, 2.0))));\n }\n // antialias along main edges\n if (antialiasing > 0.0) {\n if (subpos.y > subpos.w * (1.0 + info.z) - antialiasing) {\n opacity = min(opacity, smoothstep(antialiasing, -antialiasing, subpos.y - subpos.w * (1.0 + info.z)));\n }\n if (subpos.y < subpos.w * (-1.0 + info.z) + antialiasing) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.y - subpos.w * (-1.0 + info.z)));\n }\n }\n if (opacity == 0.0) {\n discard;\n }\n color.a *= opacity;\n gl_FragColor = color;\n}\n"},916:function(t){t.exports="/* lineFeature vertex shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nattribute vec3 pos;\nattribute vec3 prev;\nattribute vec3 next;\nattribute vec3 far;\nattribute float flags;\n\nattribute vec3 strokeColor;\nattribute float strokeOpacity;\nattribute float strokeWidth;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float pixelWidth;\nuniform float aspect;\nuniform float miterLimit;\nuniform float antialiasing;\n\nvarying vec4 strokeColorVar;\nvarying vec4 subpos; /* px, py, length - px, width */\nvarying vec4 info; /* near mode, far mode, offset */\nvarying vec4 angles; /* near angle cos, sin, far angle cos, sin */\n\nconst float PI = 3.14159265358979323846264;\n\nvec4 viewCoord(vec3 c) {\n vec4 result = projectionMatrix * modelViewMatrix * vec4(c.xyz, 1.0);\n if (result.w != 0.0) result = result / result.w;\n return result;\n}\n\nfloat atan2(float y, float x) {\n if (x > 0.0) return atan(y / x);\n if (x < 0.0 && y >= 0.0) return atan(y / x) + PI;\n if (x < 0.0) return atan(y / x) - PI;\n return sign(y) * 0.5 * PI;\n}\n\nvoid main(void)\n{\n /* If any vertex has been deliberately set to a negative opacity,\n * skip doing computations on it. */\n if (strokeOpacity < 0.0) {\n gl_Position = vec4(2.0, 2.0, 0.0, 1.0);\n return;\n }\n /* convert coordinates. We have four values, since we need to\n * calculate the angles between the lines formed by prev-pos and\n * pos-next, and between pos-next and next-far, plus know the angle\n * (prev)---(pos)---(next)---(far) => A---B---C---D */\n vec4 A = viewCoord(prev);\n vec4 B = viewCoord(pos);\n vec4 C = viewCoord(next);\n vec4 D = viewCoord(far);\n // calculate line segment vector and angle\n vec2 deltaCB = C.xy - B.xy;\n if (deltaCB == vec2(0.0, 0.0)) {\n gl_Position = vec4(2.0, 2.0, 0.0, 1.0);\n return;\n }\n float angleCB = atan2(deltaCB.y, deltaCB.x * aspect);\n // values we need to pass along\n strokeColorVar = vec4(strokeColor, strokeOpacity);\n // extract values from our flags field\n int vertex = int(mod(flags, 4.0));\n int nearMode = int(mod(floor(flags / 4.0), 8.0));\n int farMode = int(mod(floor(flags / 32.0), 8.0));\n // we use 11 bits of the flags for the offset, where -1023 to 1023\n // maps to -1 to 1. The 11 bits are a signed value, so simply\n // selecting the bits will result in an unsigned values that may be\n // greater than 1, in which case we have to subtract appropriately.\n float offset = mod(floor(flags / 256.0), 2048.0) / 1023.0;\n if (offset > 1.0) offset -= 2048.0 / 1023.0;\n // by default, offset by the width and don't extend lines. Later,\n // calculate line extensions based on end cap and end join modes\n float yOffset = strokeWidth + antialiasing;\n if (vertex == 0 || vertex == 2) yOffset *= -1.0;\n yOffset += strokeWidth * offset;\n float xOffset = 0.0;\n // end caps\n if (nearMode == 0) {\n xOffset = antialiasing;\n } else if (nearMode == 1 || nearMode == 2) {\n xOffset = strokeWidth + antialiasing;\n }\n\n // If joining lines, calculate the angles in screen space formed by\n // the near end (A-B-C) and far end (B-C-D), and determine how much\n // space is needed for the particular join.\n // This could be changed: if the lines are not a uniform width and\n // offset, then the functional join angle is not simply half the\n // angle between the two lines, but rather half the angle of the\n // inside edge of the the two lines.\n float cosABC = 1.0, sinABC = 0.0, cosBCD = 1.0, sinBCD = 0.0; // of half angles\n // handle near end\n if (nearMode >= 4) {\n float angleBA = atan2(B.y - A.y, (B.x - A.x) * aspect);\n if (A.xy == B.xy) angleBA = angleCB;\n float angleABC = angleCB - angleBA;\n // ensure angle is in the range [-PI, PI], then take the half angle\n angleABC = (mod(angleABC + 3.0 * PI, 2.0 * PI) - PI) / 2.0;\n cosABC = cos(angleABC); sinABC = sin(angleABC);\n // if this angle is close to flat, pass-through the join\n if (nearMode >= 4 && cosABC > 0.999999) {\n nearMode = 3;\n }\n // miter, miter-clip\n if (nearMode == 4 || nearMode == 7) {\n if (cosABC < 0.000001 || 1.0 / cosABC > miterLimit) {\n if (nearMode == 4) {\n nearMode = 5;\n } else {\n xOffset = miterLimit * strokeWidth * (1.0 - offset * sign(sinABC)) + antialiasing;\n }\n } else {\n // we add an extra 1.0 to the xOffset to make sure that fragment\n // shader is doing the clipping\n xOffset = abs(sinABC / cosABC) * strokeWidth * (1.0 - offset * sign(sinABC)) + antialiasing + 1.0;\n nearMode = 4;\n }\n }\n // bevel or round join\n if (nearMode == 5 || nearMode == 6) {\n xOffset = strokeWidth * (1.0 - offset * sign(sinABC)) + antialiasing;\n }\n }\n\n // handle far end\n if (farMode >= 4) {\n float angleDC = atan2(D.y - C.y, (D.x - C.x) * aspect);\n if (D.xy == C.xy) angleDC = angleCB;\n float angleBCD = angleDC - angleCB;\n // ensure angle is in the range [-PI, PI], then take the half angle\n angleBCD = (mod(angleBCD + 3.0 * PI, 2.0 * PI) - PI) / 2.0;\n cosBCD = cos(angleBCD); sinBCD = sin(angleBCD);\n // if this angle is close to flat, pass-through the join\n if (farMode >= 4 && cosBCD > 0.999999) {\n farMode = 3;\n }\n // miter, miter-clip\n if (farMode == 4 || farMode == 7) {\n if (cosBCD < 0.000001 || 1.0 / cosBCD > miterLimit) {\n if (farMode == 4) farMode = 5;\n } else {\n farMode = 4;\n }\n }\n }\n\n // compute the location of a vertex to include everything that might\n // need to be rendered\n xOffset *= -1.0;\n gl_Position = vec4(\n B.x + (xOffset * cos(angleCB) - yOffset * sin(angleCB)) * pixelWidth,\n B.y + (xOffset * sin(angleCB) + yOffset * cos(angleCB)) * pixelWidth * aspect,\n B.z, 1.0);\n // store other values needed to determine which pixels to plot.\n float lineLength = length(vec2(deltaCB.x, deltaCB.y / aspect)) / pixelWidth;\n\n if (vertex == 0 || vertex == 1) {\n subpos = vec4(xOffset, yOffset, lineLength - xOffset, strokeWidth);\n info = vec4(float(nearMode), float(farMode), offset, 0.0);\n angles = vec4(cosABC, sinABC, cosBCD, sinBCD);\n } else {\n subpos = vec4(lineLength - xOffset, -yOffset, xOffset, strokeWidth);\n info = vec4(float(farMode), float(nearMode), -offset, 0.0);\n angles = vec4(cosBCD, -sinBCD, cosABC, -sinABC);\n }\n}\n"},359:function(t){t.exports="/* lineFeature debug fragment shader */\n\n#ifdef GL_ES\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n #else\n precision mediump float;\n #endif\n#endif\nvarying vec4 strokeColorVar;\nvarying vec4 subpos;\nvarying vec4 info;\nvarying vec4 angles;\nuniform float antialiasing;\nuniform float miterLimit;\nuniform float fixedFlags;\n\nvoid main () {\n vec4 color = strokeColorVar;\n bool debug = bool(mod(fixedFlags, 2.0));\n float opacity = 1.0;\n int nearMode = int(floor(info.x + 0.5));\n int farMode = int(floor(info.y + 0.5));\n float cosABC = angles.x;\n float sinABC = angles.y;\n float cosBCD = angles.z;\n float sinBCD = angles.w;\n // never render on the opposite side of a miter. This uses a bit of\n // slop, via pow(smoothstep()) instead of step(), since there are\n // precision issues in this calculation. This doesn't wholly solve\n // the precision issue; sometimes pixels are missed or double\n // rendered along the inside seam of a miter.\n if (nearMode >= 4) {\n float dist = cosABC * subpos.x - sinABC * subpos.y;\n opacity = min(opacity, pow(smoothstep(-0.02, 0.02, dist), 0.5));\n if (opacity == 0.0) {\n if (debug) {\n color.r = 255.0 / 255.0;\n gl_FragColor = color;\n return;\n }\n discard;\n }\n }\n if (farMode >= 4) {\n float dist = cosBCD * subpos.z - sinBCD * subpos.y;\n opacity = min(opacity, pow(smoothstep(-0.02, 0.02, dist), 0.5));\n if (opacity == 0.0) {\n if (debug) {\n color.r = 254.0 / 255.0;\n gl_FragColor = color;\n return;\n }\n discard;\n }\n }\n // butt or square cap\n if ((nearMode == 0 || nearMode == 1) && subpos.x < antialiasing) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.x + subpos.w * float(nearMode)));\n }\n if ((farMode == 0 || farMode == 1) && subpos.z < antialiasing) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.z + subpos.w * float(farMode)));\n }\n // round cap\n if (nearMode == 2 && subpos.x <= 0.0) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.w - sqrt(pow(subpos.x, 2.0) + pow(subpos.y - info.z * subpos.w, 2.0))));\n }\n if (farMode == 2 && subpos.z <= 0.0) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.w - sqrt(pow(subpos.z, 2.0) + pow(subpos.y - info.z * subpos.w, 2.0))));\n }\n // bevel and clip joins\n if ((nearMode == 5 || nearMode == 7) && subpos.x < antialiasing) {\n float dist = (sinABC * subpos.x + cosABC * subpos.y) * sign(sinABC);\n float w = subpos.w * (1.0 - info.z * sign(sinABC));\n float maxDist;\n if (nearMode == 5) maxDist = cosABC * w;\n else maxDist = miterLimit * w;\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, maxDist + dist));\n }\n if ((farMode == 5 || farMode == 7) && subpos.z < antialiasing) {\n float dist = (sinBCD * subpos.z + cosBCD * subpos.y) * sign(sinBCD);\n float w = subpos.w * (1.0 - info.z * sign(sinBCD));\n float maxDist;\n if (farMode == 5) maxDist = cosBCD * w;\n else maxDist = miterLimit * w;\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, maxDist + dist));\n }\n // round join\n if (nearMode == 6 && subpos.x <= 0.0) {\n float w = subpos.w * (1.0 - info.z * sign(sinABC));\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, w - sqrt(pow(subpos.x, 2.0) + pow(subpos.y, 2.0))));\n }\n if (farMode == 6 && subpos.z <= 0.0) {\n float w = subpos.w * (1.0 - info.z * sign(sinBCD));\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, w - sqrt(pow(subpos.z, 2.0) + pow(subpos.y, 2.0))));\n }\n // antialias along main edges\n if (antialiasing > 0.0) {\n if (subpos.y > subpos.w * (1.0 + info.z) - antialiasing) {\n opacity = min(opacity, smoothstep(antialiasing, -antialiasing, subpos.y - subpos.w * (1.0 + info.z)));\n }\n if (subpos.y < subpos.w * (-1.0 + info.z) + antialiasing) {\n opacity = min(opacity, smoothstep(-antialiasing, antialiasing, subpos.y - subpos.w * (-1.0 + info.z)));\n }\n }\n if (opacity == 0.0) {\n if (debug) {\n color.r = 253.0 / 255.0;\n gl_FragColor = color;\n return;\n }\n discard;\n }\n color.a *= opacity;\n gl_FragColor = color;\n}\n"},5573:function(t){t.exports="/* markerFeature square/triangle fragment shader */\n\n/* markerFeature common fragment shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nvarying float radiusVar;\nvarying vec4 fillColorVar;\nvarying vec4 strokeColorVar;\nvarying float strokeWidthVar;\nvarying float symbolVar; /* contains some bit fields */\nvarying float symbolValueVar;\nvarying float rotationVar;\n// the square/triangle shader defines unitVar\nconst int symbolEllipse = 0;\nconst int symbolFlowerBase = 1;\nconst int symbolFlowerMax = 16;\nconst int symbolTriangle = 16;\nconst int symbolStarBase = 17;\nconst int symbolStarMax = 16;\nconst int symbolRectangle = 32;\nconst int symbolCrossBase = 33;\nconst int symbolCrossMax = 16;\nconst int symbolOval = 48;\nconst int symbolJackBase = 49;\nconst int symbolJackMax = 16;\nconst int symbolDrop = 64;\nconst int symbolDropBase = 65;\nconst int symbolDropMax = 16;\nconst int symbolArrow = 80;\nconst int symbolArrowBase = 81;\nconst int symbolArrowMax = 16;\n// Distance to antialias in pixels\nconst float antialiasDist = 1.5;\n\n/* Compute the distance from a point to an arrow defined by the radiusVar and a\n * packed value containing\n * headWidth: ratio to radius (0, 1]\n * headLength: ratio to diameter (0, 1]\n * stemWidth: ratio to headWidth [0, 1]\n * sweep: boolean\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float packed: the packed value.\n * Exit: float dist: the distance to the drop in pixels. Negative is inside.\n */\nfloat distanceToArrow(vec2 pos, float value) {\n bool sweep = value < 0.0;\n value = abs(value);\n float pack0 = (mod(value, 252.0) - 1.0) / 250.0;\n value = floor(value / 252.0);\n float pack1 = (mod(value, 252.0) - 1.0) / 250.0;\n value = floor(value / 252.0);\n float pack2 = (mod(value, 252.0) - 1.0) / 250.0;\n\n float headWidth = (pack0 > 0.0 ? pack0 : 2.0 / 3.0);\n float headEnd = 1.0 - 2.0 * (pack1 > 0.0 ? pack1 : 1.0 / 2.0);\n float stemWidth = headWidth * (pack2 >= 0.0 ? pack2 : 1.0 / 3.0);\n if (length(vec2(headWidth, headEnd)) > 1.0) {\n vec2 scaledHead = normalize(vec2(headWidth, headEnd));\n headWidth = scaledHead.x;\n headEnd = scaledHead.y;\n }\n float stemEnd = -cos(asin(stemWidth));\n\n headWidth *= radiusVar;\n headEnd *= radiusVar;\n stemWidth *= radiusVar;\n stemEnd *= radiusVar;\n pos.y = abs(pos.y);\n float stemDist = pos.y - stemWidth;\n float stemEndDist = stemEnd - pos.x;\n float B = (radiusVar - headEnd) / headWidth;\n float headDist = (pos.x + B * pos.y - radiusVar) / sqrt(1.0 + B * B);\n float headEndDist;\n if (sweep) {\n B = (radiusVar - headEnd) / 3.0 / headWidth;\n headEndDist = -(pos.x + B * pos.y - (radiusVar + headEnd * 2.0) / 3.0) / sqrt(1.0 + B * B);\n } else {\n headEndDist = headEnd - pos.x;\n }\n headEndDist = min(headEndDist, stemDist);\n return max(max(headDist, headEndDist), stemEndDist);\n}\n\n/* Compute the distance from a point to a drop defined by the radiusVar (the\n * semimajor axis) and ratio (between the minor and major radii).\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: ratio of minor / major axes.\n * Exit: float dist: the distance to the drop in pixels. Negative is inside.\n */\nfloat distanceToDrop(vec2 pos, float ratio) {\n ratio = abs(ratio);\n if (ratio == 0.0 || ratio >= 1.0) {\n ratio = 1.0;\n }\n float r = radiusVar * ratio;\n float cx = radiusVar - r;\n float rad = distance(pos.xy, vec2(cx, 0.0)) - r;\n if (ratio < 0.5) {\n float x = radiusVar - r - r * r / cx;\n float y = sqrt(r * r - (cx - x) * (cx - x));\n float Bt = (cx - x) / y;\n if ((pos.x + Bt * abs(pos.y) - cx) / sqrt(1.0 + Bt * Bt) < 0.0) {\n float B = -x / y;\n return -(pos.x + B * abs(pos.y)) / sqrt(1.0 + B * B);\n }\n }\n return rad;\n}\n\n/* Compute the distance from a point to the ellipse defined by the radiusVar\n * (the semimajor axis) and ratio (between the minor and major axes).\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: ratio of minor / major axes.\n * Exit: float dist: the distance to the ellipse in pixels. Negative is\n * inside.\n */\nfloat distanceToEllipse(vec2 pos, float ratio) {\n // a and b are the semi-major and semi-minor axes\n // ratio is the between the minor and major axes. If > 1, swap these and\n // rotate 90 degrees.\n if (ratio == 0.0) {\n ratio = 1.0;\n }\n float a = radiusVar, b = abs(radiusVar * ratio);\n if (b > a) {\n pos = vec2(pos.y, -pos.x);\n b = abs(radiusVar / ratio);\n }\n float a2 = a * a, b2 = b * b;\n // compute the distance to the ellipse. See this discussion:\n // https://stackoverflow.com/questions/22959698\n float f = sqrt(a2 - b2),\n // this value will be positive if outside and negative if inside. If\n // we used it directly, the stroke would be too thick along the long\n // edges of the ellipse\n d = (distance(pos, vec2(f, 0.0)) + distance(pos, vec2(-f, 0.0))) * 0.5 - a;\n // if we are outside of the ellipse, accuracy is not important, so return\n // early.\n if (d >= 0.0) {\n return d;\n }\n // work in one quadrant\n pos = abs(pos);\n // t (the angle from center) could start as `atan(pos.y, pos.x)`, but this\n // results in a slower solution near narrow ends\n float t = 0.7;\n float cost = cos(t), sint = sin(t), x = a * cost, y = b * sint;\n vec2 lastxy;\n for (int iter = 0; iter < 10; iter += 1) {\n lastxy = vec2(x, y);\n float ex = (a2 - b2) * pow(cost, 3.0) / a,\n ey = (b2 - a2) * pow(sint, 3.0) / b;\n vec2 r = vec2(x - ex, y - ey),\n q = vec2(pos.x - ex, pos.y - ey);\n float lenr = length(r);\n t += lenr * asin((r.x * q.y - r.y * q.x) / lenr / length(q)) / sqrt(a2 + b2 - x * x - y * y);\n t = clamp(t, 0.0, acos(0.0));\n cost = cos(t);\n sint = sin(t);\n x = a * cost;\n y = b * sint;\n if (distance(lastxy, vec2(x, y)) < 0.05) {\n break;\n }\n }\n return sign(d) * distance(pos, vec2(x, y));\n}\n\n/* Compute the distance from a point to an isosceles triangle.\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: length of the base compared to the other sides.\n * Exit: float dist: the distance to the rectangle in pixels. Negative is\n * inside.\n */\nfloat distanceToIsoscelesTriangle(vec2 pos, float ratio) {\n ratio = clamp(abs(ratio), 0.0, 2.0);\n if (ratio == 0.0 || ratio == 2.0) {\n ratio = 1.0;\n }\n float s1, s2, x0, x1, y1;\n if (ratio < sqrt(2.0)) {\n s1 = radiusVar * sqrt(4.0 - ratio * ratio); // length of equal sides\n s2 = s1 * ratio;\n y1 = s2 / 2.0;\n x0 = radiusVar;\n x1 = x0 - sqrt(s1 * s1 - y1 * y1);\n } else {\n s2 = radiusVar * 2.0;\n s1 = s2 / ratio;\n y1 = s2 / 2.0;\n x0 = sqrt(s1 * s1 - y1 * y1);\n x1 = 0.0;\n }\n float B = (x0 - x1) / y1;\n return max(x1 - pos.x, (pos.x + B * abs(pos.y) - x0) / sqrt(1.0 + B * B));\n}\n\n/* Compute the distance from a point to an oval defined by the radiusVar (the\n * semimajor axis) and ratio (between the minor and major axes). Here an oval\n * is defined as two semicircles connected by straight line segments.\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: ratio of minor / major axes.\n * Exit: float dist: the distance to the oval in pixels. Negative is inside.\n */\nfloat distanceToOval(vec2 pos, float ratio) {\n ratio = abs(ratio);\n if (ratio == 0.0 || ratio >= 1.0) {\n ratio = 1.0;\n }\n float minor = radiusVar * ratio;\n float center = radiusVar - minor;\n pos = abs(pos);\n if (pos.x <= center) {\n return pos.y - minor;\n }\n return distance(pos, vec2(center, 0.0)) - minor;\n}\n\n/* Compute the distance from a point to a rectangle defined by the radiusVar\n * (the semidiagonal) and ratio (between the minor and major axes).\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: ratio of minor / major axes.\n * Exit: float dist: the distance to the rectangle in pixels. Negative is\n * inside.\n */\nfloat distanceToRectangle(vec2 pos, float ratio) {\n ratio = abs(ratio);\n if (ratio == 0.0) {\n ratio = 1.0;\n }\n vec2 wh = normalize(vec2(1.0, abs(ratio))) * radiusVar;\n vec2 dist = abs(pos) - wh;\n return max(dist.x, dist.y);\n}\n\n/* Based on a repetition value, return a position for rotational symmetry.\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * int repetitions: number of repetitions on the cross.\n * Exit: float dist: a point in the primary position.\n */\nvec2 rotationalSymmetry(vec2 pos, int repetitions) {\n float pi = acos(-1.0);\n float limit = pi / float(repetitions);\n float ang = atan(pos.y, pos.x);\n ang = mod(ang + pi * 2.0, limit * 2.0);\n if (ang > limit) {\n ang -= limit * 2.0;\n }\n return vec2(cos(ang), sin(ang)) * length(pos);\n}\n\nvoid markerFeatureFragment(vec2 pos) {\n // rad is a value in pixels from the edge of the symbol where negative is\n // inside the shape\n float rad = length(pos.xy) - radiusVar;\n // never allow points outside of the main radius\n if (rad > 0.0) {\n discard;\n return;\n }\n // apply clockwise rotation\n if (rotationVar != 0.0) {\n float cosr = cos(rotationVar), sinr = sin(rotationVar);\n pos = vec2(pos.x * cosr + pos.y * sinr, -pos.x * sinr + pos.y * cosr);\n }\n\n int symbol = int(floor(symbolVar / 64.0));\n bool isimage = bool(mod(floor(symbolVar / 8.0), 2.0));\n vec4 fillColor, strokeColor;\n float endStep;\n\n float ratio = symbolValueVar;\n // When ratio is 0, it usually gets changed to 1; some shapes could have\n // better defaults\n /* Symbol shapes */\n if (symbol == symbolTriangle) {\n rad = distanceToIsoscelesTriangle(pos, ratio);\n } else if (symbol == symbolRectangle) {\n rad = distanceToRectangle(pos, ratio);\n } else if (symbol == symbolOval) {\n rad = distanceToOval(pos, ratio);\n } else if (symbol == symbolDrop) {\n rad = distanceToDrop(pos, ratio);\n } else if (symbol == symbolArrow) {\n rad = distanceToArrow(pos, ratio);\n } else if (symbol >= symbolCrossBase && symbol <= symbolCrossBase + symbolCrossMax - 2) {\n rad = distanceToRectangle(rotationalSymmetry(pos, symbol - symbolCrossBase + 2), ratio);\n } else if (symbol >= symbolFlowerBase && symbol <= symbolFlowerBase + symbolFlowerMax - 2) {\n rad = distanceToEllipse(rotationalSymmetry(pos, symbol - symbolFlowerBase + 2), ratio);\n } else if (symbol >= symbolStarBase && symbol <= symbolStarBase + symbolStarMax - 2) {\n rad = distanceToIsoscelesTriangle(rotationalSymmetry(pos, symbol - symbolStarBase + 2), ratio);\n } else if (symbol >= symbolJackBase && symbol <= symbolJackBase + symbolJackMax - 2) {\n rad = distanceToOval(rotationalSymmetry(pos, symbol - symbolJackBase + 2), ratio);\n } else if (symbol >= symbolDropBase && symbol <= symbolDropBase + symbolDropMax - 2) {\n rad = distanceToDrop(rotationalSymmetry(pos, symbol - symbolDropBase + 2), ratio);\n } else if (symbol >= symbolArrowBase && symbol <= symbolArrowBase + symbolArrowMax - 2) {\n rad = distanceToArrow(rotationalSymmetry(pos, symbol - symbolArrowBase + 2), ratio);\n } else { // default - circle or ellipse; a value of 0 or 1 is a circle\n if (ratio != 0.0 && ratio != 1.0) {\n rad = distanceToEllipse(pos, ratio);\n }\n }\n\n if (rad >= 0.0) {\n discard;\n return;\n }\n // If there is no stroke, the fill region should transition to nothing\n if (strokeColorVar.a == 0.0 || strokeWidthVar <= 0.0) {\n strokeColor = vec4(fillColorVar.rgb, 0.0);\n endStep = 0.0;\n } else {\n strokeColor = strokeColorVar;\n endStep = -strokeWidthVar;\n }\n // Likewise, if there is no fill, the stroke should transition to nothing\n if (fillColorVar.a == 0.0) {\n fillColor = vec4(strokeColorVar.rgb, 0.0);\n } else {\n fillColor = fillColorVar;\n }\n if (rad <= endStep) {\n float step = smoothstep(endStep - antialiasDist, endStep, rad);\n vec4 color = mix(fillColor, strokeColor, step);\n float step2 = smoothstep(-antialiasDist, 0.0, rad);\n gl_FragColor = mix(color, vec4(color.rgb, 0.0), step2);\n } else {\n float step = smoothstep(-antialiasDist, 0.0, rad);\n gl_FragColor = mix(strokeColor, vec4(strokeColor.rgb, 0.0), step);\n }\n}\n\n\nvarying vec2 unitVar; // distinct for square/triangle\n\nvoid main() {\n if (fillColorVar.a == 0.0 && strokeColorVar.a == 0.0)\n discard;\n markerFeatureFragment(unitVar);\n}\n"},2043:function(t){t.exports="/* markerFeature square/triangle vertex shader */\n\n/* markerFeature common vertex shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nattribute vec3 pos;\nattribute float radius;\nattribute vec3 fillColor;\nattribute float fillOpacity;\nattribute vec3 strokeColor;\nattribute float strokeOpacity;\nattribute float strokeWidth;\nattribute float symbol; /* contains some bit fields */\nattribute float symbolValue;\nattribute float rotation;\nuniform float zoom;\nuniform float rotationUniform;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n// non-sprite has other definitions.\nvarying float radiusVar;\nvarying vec4 fillColorVar;\nvarying vec4 strokeColorVar;\nvarying float strokeWidthVar;\nvarying float symbolVar; /* contains some bit fields */\nvarying float symbolValueVar;\nvarying float rotationVar;\n\nfloat markerFeaturePrep(void)\n{\n // No stroke or fill implies nothing to draw\n if (radius <= 0.0 || (strokeOpacity <= 0.0 && fillOpacity <= 0.0)) {\n gl_Position = vec4(2.0, 2.0, 0.0, 1.0);\n return 0.0;\n }\n radiusVar = radius;\n strokeWidthVar = strokeWidth;\n int scaleMode = int(mod(symbol, 4.0));\n float strokeOffset = mod(floor(symbol / 16.0), 4.0) - 1.0;\n radiusVar += (strokeOffset + 1.0) / 2.0 * strokeWidthVar;\n if (scaleMode == 1) { // fill\n radiusVar = (radiusVar - strokeWidthVar) * exp2(zoom) + strokeWidthVar;\n } else if (scaleMode == 2) { // stroke\n radiusVar += strokeWidthVar * (exp2(zoom) - 1.0);\n strokeWidthVar *= exp2(zoom);\n } else if (scaleMode == 3) { // all\n radiusVar *= exp2(zoom);\n strokeWidthVar *= exp2(zoom);\n }\n fillColorVar = vec4(fillColor, fillOpacity);\n strokeColorVar = vec4(strokeColor, strokeOpacity);\n symbolVar = symbol;\n symbolValueVar = symbolValue;\n rotationVar = rotation;\n if (bool(mod(floor(symbolVar / 4.0), 2.0))) {\n rotationVar += rotationUniform;\n }\n return radiusVar;\n}\n\n\nuniform float pixelWidth; // for non-sprite\nuniform float aspect; // for non-sprite\nattribute vec2 unit; // for non-sprite\nvarying vec2 unitVar; // for non-sprite\n\nvoid main(void)\n{\n radiusVar = markerFeaturePrep();\n if (radiusVar == 0.0) {\n return;\n }\n // for non-sprite\n unitVar = unit * radiusVar;\n unitVar.y *= -1.0;\n vec4 p = (projectionMatrix * modelViewMatrix * vec4(pos, 1.0)).xyzw;\n if (p.w != 0.0) {\n p = p / p.w;\n }\n p += radiusVar * vec4(unit.x * pixelWidth, unit.y * pixelWidth * aspect, 0.0, 1.0);\n gl_Position = vec4(p.xyz, 1.0);\n}\n"},468:function(t){t.exports="/* markerFeature sprite fragment shader */\n\n/* markerFeature common fragment shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nvarying float radiusVar;\nvarying vec4 fillColorVar;\nvarying vec4 strokeColorVar;\nvarying float strokeWidthVar;\nvarying float symbolVar; /* contains some bit fields */\nvarying float symbolValueVar;\nvarying float rotationVar;\n// the square/triangle shader defines unitVar\nconst int symbolEllipse = 0;\nconst int symbolFlowerBase = 1;\nconst int symbolFlowerMax = 16;\nconst int symbolTriangle = 16;\nconst int symbolStarBase = 17;\nconst int symbolStarMax = 16;\nconst int symbolRectangle = 32;\nconst int symbolCrossBase = 33;\nconst int symbolCrossMax = 16;\nconst int symbolOval = 48;\nconst int symbolJackBase = 49;\nconst int symbolJackMax = 16;\nconst int symbolDrop = 64;\nconst int symbolDropBase = 65;\nconst int symbolDropMax = 16;\nconst int symbolArrow = 80;\nconst int symbolArrowBase = 81;\nconst int symbolArrowMax = 16;\n// Distance to antialias in pixels\nconst float antialiasDist = 1.5;\n\n/* Compute the distance from a point to an arrow defined by the radiusVar and a\n * packed value containing\n * headWidth: ratio to radius (0, 1]\n * headLength: ratio to diameter (0, 1]\n * stemWidth: ratio to headWidth [0, 1]\n * sweep: boolean\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float packed: the packed value.\n * Exit: float dist: the distance to the drop in pixels. Negative is inside.\n */\nfloat distanceToArrow(vec2 pos, float value) {\n bool sweep = value < 0.0;\n value = abs(value);\n float pack0 = (mod(value, 252.0) - 1.0) / 250.0;\n value = floor(value / 252.0);\n float pack1 = (mod(value, 252.0) - 1.0) / 250.0;\n value = floor(value / 252.0);\n float pack2 = (mod(value, 252.0) - 1.0) / 250.0;\n\n float headWidth = (pack0 > 0.0 ? pack0 : 2.0 / 3.0);\n float headEnd = 1.0 - 2.0 * (pack1 > 0.0 ? pack1 : 1.0 / 2.0);\n float stemWidth = headWidth * (pack2 >= 0.0 ? pack2 : 1.0 / 3.0);\n if (length(vec2(headWidth, headEnd)) > 1.0) {\n vec2 scaledHead = normalize(vec2(headWidth, headEnd));\n headWidth = scaledHead.x;\n headEnd = scaledHead.y;\n }\n float stemEnd = -cos(asin(stemWidth));\n\n headWidth *= radiusVar;\n headEnd *= radiusVar;\n stemWidth *= radiusVar;\n stemEnd *= radiusVar;\n pos.y = abs(pos.y);\n float stemDist = pos.y - stemWidth;\n float stemEndDist = stemEnd - pos.x;\n float B = (radiusVar - headEnd) / headWidth;\n float headDist = (pos.x + B * pos.y - radiusVar) / sqrt(1.0 + B * B);\n float headEndDist;\n if (sweep) {\n B = (radiusVar - headEnd) / 3.0 / headWidth;\n headEndDist = -(pos.x + B * pos.y - (radiusVar + headEnd * 2.0) / 3.0) / sqrt(1.0 + B * B);\n } else {\n headEndDist = headEnd - pos.x;\n }\n headEndDist = min(headEndDist, stemDist);\n return max(max(headDist, headEndDist), stemEndDist);\n}\n\n/* Compute the distance from a point to a drop defined by the radiusVar (the\n * semimajor axis) and ratio (between the minor and major radii).\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: ratio of minor / major axes.\n * Exit: float dist: the distance to the drop in pixels. Negative is inside.\n */\nfloat distanceToDrop(vec2 pos, float ratio) {\n ratio = abs(ratio);\n if (ratio == 0.0 || ratio >= 1.0) {\n ratio = 1.0;\n }\n float r = radiusVar * ratio;\n float cx = radiusVar - r;\n float rad = distance(pos.xy, vec2(cx, 0.0)) - r;\n if (ratio < 0.5) {\n float x = radiusVar - r - r * r / cx;\n float y = sqrt(r * r - (cx - x) * (cx - x));\n float Bt = (cx - x) / y;\n if ((pos.x + Bt * abs(pos.y) - cx) / sqrt(1.0 + Bt * Bt) < 0.0) {\n float B = -x / y;\n return -(pos.x + B * abs(pos.y)) / sqrt(1.0 + B * B);\n }\n }\n return rad;\n}\n\n/* Compute the distance from a point to the ellipse defined by the radiusVar\n * (the semimajor axis) and ratio (between the minor and major axes).\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: ratio of minor / major axes.\n * Exit: float dist: the distance to the ellipse in pixels. Negative is\n * inside.\n */\nfloat distanceToEllipse(vec2 pos, float ratio) {\n // a and b are the semi-major and semi-minor axes\n // ratio is the between the minor and major axes. If > 1, swap these and\n // rotate 90 degrees.\n if (ratio == 0.0) {\n ratio = 1.0;\n }\n float a = radiusVar, b = abs(radiusVar * ratio);\n if (b > a) {\n pos = vec2(pos.y, -pos.x);\n b = abs(radiusVar / ratio);\n }\n float a2 = a * a, b2 = b * b;\n // compute the distance to the ellipse. See this discussion:\n // https://stackoverflow.com/questions/22959698\n float f = sqrt(a2 - b2),\n // this value will be positive if outside and negative if inside. If\n // we used it directly, the stroke would be too thick along the long\n // edges of the ellipse\n d = (distance(pos, vec2(f, 0.0)) + distance(pos, vec2(-f, 0.0))) * 0.5 - a;\n // if we are outside of the ellipse, accuracy is not important, so return\n // early.\n if (d >= 0.0) {\n return d;\n }\n // work in one quadrant\n pos = abs(pos);\n // t (the angle from center) could start as `atan(pos.y, pos.x)`, but this\n // results in a slower solution near narrow ends\n float t = 0.7;\n float cost = cos(t), sint = sin(t), x = a * cost, y = b * sint;\n vec2 lastxy;\n for (int iter = 0; iter < 10; iter += 1) {\n lastxy = vec2(x, y);\n float ex = (a2 - b2) * pow(cost, 3.0) / a,\n ey = (b2 - a2) * pow(sint, 3.0) / b;\n vec2 r = vec2(x - ex, y - ey),\n q = vec2(pos.x - ex, pos.y - ey);\n float lenr = length(r);\n t += lenr * asin((r.x * q.y - r.y * q.x) / lenr / length(q)) / sqrt(a2 + b2 - x * x - y * y);\n t = clamp(t, 0.0, acos(0.0));\n cost = cos(t);\n sint = sin(t);\n x = a * cost;\n y = b * sint;\n if (distance(lastxy, vec2(x, y)) < 0.05) {\n break;\n }\n }\n return sign(d) * distance(pos, vec2(x, y));\n}\n\n/* Compute the distance from a point to an isosceles triangle.\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: length of the base compared to the other sides.\n * Exit: float dist: the distance to the rectangle in pixels. Negative is\n * inside.\n */\nfloat distanceToIsoscelesTriangle(vec2 pos, float ratio) {\n ratio = clamp(abs(ratio), 0.0, 2.0);\n if (ratio == 0.0 || ratio == 2.0) {\n ratio = 1.0;\n }\n float s1, s2, x0, x1, y1;\n if (ratio < sqrt(2.0)) {\n s1 = radiusVar * sqrt(4.0 - ratio * ratio); // length of equal sides\n s2 = s1 * ratio;\n y1 = s2 / 2.0;\n x0 = radiusVar;\n x1 = x0 - sqrt(s1 * s1 - y1 * y1);\n } else {\n s2 = radiusVar * 2.0;\n s1 = s2 / ratio;\n y1 = s2 / 2.0;\n x0 = sqrt(s1 * s1 - y1 * y1);\n x1 = 0.0;\n }\n float B = (x0 - x1) / y1;\n return max(x1 - pos.x, (pos.x + B * abs(pos.y) - x0) / sqrt(1.0 + B * B));\n}\n\n/* Compute the distance from a point to an oval defined by the radiusVar (the\n * semimajor axis) and ratio (between the minor and major axes). Here an oval\n * is defined as two semicircles connected by straight line segments.\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: ratio of minor / major axes.\n * Exit: float dist: the distance to the oval in pixels. Negative is inside.\n */\nfloat distanceToOval(vec2 pos, float ratio) {\n ratio = abs(ratio);\n if (ratio == 0.0 || ratio >= 1.0) {\n ratio = 1.0;\n }\n float minor = radiusVar * ratio;\n float center = radiusVar - minor;\n pos = abs(pos);\n if (pos.x <= center) {\n return pos.y - minor;\n }\n return distance(pos, vec2(center, 0.0)) - minor;\n}\n\n/* Compute the distance from a point to a rectangle defined by the radiusVar\n * (the semidiagonal) and ratio (between the minor and major axes).\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * float ratio: ratio of minor / major axes.\n * Exit: float dist: the distance to the rectangle in pixels. Negative is\n * inside.\n */\nfloat distanceToRectangle(vec2 pos, float ratio) {\n ratio = abs(ratio);\n if (ratio == 0.0) {\n ratio = 1.0;\n }\n vec2 wh = normalize(vec2(1.0, abs(ratio))) * radiusVar;\n vec2 dist = abs(pos) - wh;\n return max(dist.x, dist.y);\n}\n\n/* Based on a repetition value, return a position for rotational symmetry.\n *\n * Enter: vec2 pos: the point in pixel coordinates.\n * int repetitions: number of repetitions on the cross.\n * Exit: float dist: a point in the primary position.\n */\nvec2 rotationalSymmetry(vec2 pos, int repetitions) {\n float pi = acos(-1.0);\n float limit = pi / float(repetitions);\n float ang = atan(pos.y, pos.x);\n ang = mod(ang + pi * 2.0, limit * 2.0);\n if (ang > limit) {\n ang -= limit * 2.0;\n }\n return vec2(cos(ang), sin(ang)) * length(pos);\n}\n\nvoid markerFeatureFragment(vec2 pos) {\n // rad is a value in pixels from the edge of the symbol where negative is\n // inside the shape\n float rad = length(pos.xy) - radiusVar;\n // never allow points outside of the main radius\n if (rad > 0.0) {\n discard;\n return;\n }\n // apply clockwise rotation\n if (rotationVar != 0.0) {\n float cosr = cos(rotationVar), sinr = sin(rotationVar);\n pos = vec2(pos.x * cosr + pos.y * sinr, -pos.x * sinr + pos.y * cosr);\n }\n\n int symbol = int(floor(symbolVar / 64.0));\n bool isimage = bool(mod(floor(symbolVar / 8.0), 2.0));\n vec4 fillColor, strokeColor;\n float endStep;\n\n float ratio = symbolValueVar;\n // When ratio is 0, it usually gets changed to 1; some shapes could have\n // better defaults\n /* Symbol shapes */\n if (symbol == symbolTriangle) {\n rad = distanceToIsoscelesTriangle(pos, ratio);\n } else if (symbol == symbolRectangle) {\n rad = distanceToRectangle(pos, ratio);\n } else if (symbol == symbolOval) {\n rad = distanceToOval(pos, ratio);\n } else if (symbol == symbolDrop) {\n rad = distanceToDrop(pos, ratio);\n } else if (symbol == symbolArrow) {\n rad = distanceToArrow(pos, ratio);\n } else if (symbol >= symbolCrossBase && symbol <= symbolCrossBase + symbolCrossMax - 2) {\n rad = distanceToRectangle(rotationalSymmetry(pos, symbol - symbolCrossBase + 2), ratio);\n } else if (symbol >= symbolFlowerBase && symbol <= symbolFlowerBase + symbolFlowerMax - 2) {\n rad = distanceToEllipse(rotationalSymmetry(pos, symbol - symbolFlowerBase + 2), ratio);\n } else if (symbol >= symbolStarBase && symbol <= symbolStarBase + symbolStarMax - 2) {\n rad = distanceToIsoscelesTriangle(rotationalSymmetry(pos, symbol - symbolStarBase + 2), ratio);\n } else if (symbol >= symbolJackBase && symbol <= symbolJackBase + symbolJackMax - 2) {\n rad = distanceToOval(rotationalSymmetry(pos, symbol - symbolJackBase + 2), ratio);\n } else if (symbol >= symbolDropBase && symbol <= symbolDropBase + symbolDropMax - 2) {\n rad = distanceToDrop(rotationalSymmetry(pos, symbol - symbolDropBase + 2), ratio);\n } else if (symbol >= symbolArrowBase && symbol <= symbolArrowBase + symbolArrowMax - 2) {\n rad = distanceToArrow(rotationalSymmetry(pos, symbol - symbolArrowBase + 2), ratio);\n } else { // default - circle or ellipse; a value of 0 or 1 is a circle\n if (ratio != 0.0 && ratio != 1.0) {\n rad = distanceToEllipse(pos, ratio);\n }\n }\n\n if (rad >= 0.0) {\n discard;\n return;\n }\n // If there is no stroke, the fill region should transition to nothing\n if (strokeColorVar.a == 0.0 || strokeWidthVar <= 0.0) {\n strokeColor = vec4(fillColorVar.rgb, 0.0);\n endStep = 0.0;\n } else {\n strokeColor = strokeColorVar;\n endStep = -strokeWidthVar;\n }\n // Likewise, if there is no fill, the stroke should transition to nothing\n if (fillColorVar.a == 0.0) {\n fillColor = vec4(strokeColorVar.rgb, 0.0);\n } else {\n fillColor = fillColorVar;\n }\n if (rad <= endStep) {\n float step = smoothstep(endStep - antialiasDist, endStep, rad);\n vec4 color = mix(fillColor, strokeColor, step);\n float step2 = smoothstep(-antialiasDist, 0.0, rad);\n gl_FragColor = mix(color, vec4(color.rgb, 0.0), step2);\n } else {\n float step = smoothstep(-antialiasDist, 0.0, rad);\n gl_FragColor = mix(strokeColor, vec4(strokeColor.rgb, 0.0), step);\n }\n}\n\n\n// the square/triangle shader defines unitVar\n\nvoid main(void) {\n // No stroke or fill implies nothing to draw\n if (fillColorVar.a == 0.0 && strokeColorVar.a == 0.0)\n discard;\n // for sprites, convert the position to [-radius,radius],[-radius,radius]\n vec2 pos = (gl_PointCoord.xy - 0.5) * 2.0 * radiusVar;\n markerFeatureFragment(pos);\n}\n"},7981:function(t){t.exports="/* markerFeature sprite vertex shader */\n\n/* markerFeature common vertex shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nattribute vec3 pos;\nattribute float radius;\nattribute vec3 fillColor;\nattribute float fillOpacity;\nattribute vec3 strokeColor;\nattribute float strokeOpacity;\nattribute float strokeWidth;\nattribute float symbol; /* contains some bit fields */\nattribute float symbolValue;\nattribute float rotation;\nuniform float zoom;\nuniform float rotationUniform;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n// non-sprite has other definitions.\nvarying float radiusVar;\nvarying vec4 fillColorVar;\nvarying vec4 strokeColorVar;\nvarying float strokeWidthVar;\nvarying float symbolVar; /* contains some bit fields */\nvarying float symbolValueVar;\nvarying float rotationVar;\n\nfloat markerFeaturePrep(void)\n{\n // No stroke or fill implies nothing to draw\n if (radius <= 0.0 || (strokeOpacity <= 0.0 && fillOpacity <= 0.0)) {\n gl_Position = vec4(2.0, 2.0, 0.0, 1.0);\n return 0.0;\n }\n radiusVar = radius;\n strokeWidthVar = strokeWidth;\n int scaleMode = int(mod(symbol, 4.0));\n float strokeOffset = mod(floor(symbol / 16.0), 4.0) - 1.0;\n radiusVar += (strokeOffset + 1.0) / 2.0 * strokeWidthVar;\n if (scaleMode == 1) { // fill\n radiusVar = (radiusVar - strokeWidthVar) * exp2(zoom) + strokeWidthVar;\n } else if (scaleMode == 2) { // stroke\n radiusVar += strokeWidthVar * (exp2(zoom) - 1.0);\n strokeWidthVar *= exp2(zoom);\n } else if (scaleMode == 3) { // all\n radiusVar *= exp2(zoom);\n strokeWidthVar *= exp2(zoom);\n }\n fillColorVar = vec4(fillColor, fillOpacity);\n strokeColorVar = vec4(strokeColor, strokeOpacity);\n symbolVar = symbol;\n symbolValueVar = symbolValue;\n rotationVar = rotation;\n if (bool(mod(floor(symbolVar / 4.0), 2.0))) {\n rotationVar += rotationUniform;\n }\n return radiusVar;\n}\n\n\nvoid main(void)\n{\n radiusVar = markerFeaturePrep();\n if (radiusVar == 0.0) {\n return;\n }\n // for sprite\n gl_Position = (projectionMatrix * modelViewMatrix * vec4(pos, 1.0)).xyzw;\n gl_PointSize = 2.0 * radiusVar;\n}\n"},4351:function(t){t.exports="/* contourFeature fragment shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nuniform vec4 minColor;\nuniform vec4 maxColor;\nuniform float steps;\nuniform bool stepped;\nuniform sampler2D sampler2d;\nvarying float valueVar;\nvarying float opacityVar;\n\nvoid main () {\n vec4 clr;\n if (valueVar < 0.0) {\n clr = minColor;\n } else if (valueVar > steps) {\n clr = maxColor;\n } else {\n float step;\n if (stepped) {\n step = floor(valueVar) + 0.5;\n if (step > steps) {\n step = steps - 0.5;\n }\n } else {\n step = valueVar + 0.5;\n }\n // our texture is padded on either end by a repeated value to ensure\n // we interpolate smoothly at the ends.\n clr = texture2D(sampler2d, vec2((step + 1.0) / (steps + 2.0), 0.0));\n }\n gl_FragColor = vec4(clr.rgb, clr.a * opacityVar);\n}\n"},5836:function(t){t.exports="/* contourFeature vertex shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nattribute vec3 pos;\nattribute float value;\nattribute float opacity;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nvarying float valueVar;\nvarying float opacityVar;\n\nvoid main(void)\n{\n /* Don't use z values */\n vec4 scrPos = projectionMatrix * modelViewMatrix * vec4(pos.xy, 0, 1);\n if (scrPos.w != 0.0) {\n scrPos = scrPos / scrPos.w;\n }\n valueVar = value;\n opacityVar = opacity;\n gl_Position = scrPos;\n}\n"},3953:function(t){t.exports="/* pixelmapFeature fragment shader */\n\nvarying highp vec2 iTextureCoord;\nuniform sampler2D sampler2d;\nuniform sampler2D lutSampler;\nuniform int lutWidth;\nuniform int lutHeight;\nuniform mediump float opacity;\nuniform highp vec2 crop;\n\nvoid main(void) {\n if ((crop.s < 1.0 && iTextureCoord.s > crop.s) || (crop.t < 1.0 && 1.0 - iTextureCoord.t > crop.t)) {\n discard;\n }\n // to add anti-aliasing, we would need to know the current pixel size\n // (probably computed in the vertex shader) and then sample the base image at\n // multiple points, then average the output color.\n highp vec4 lutValue = texture2D(sampler2d, iTextureCoord);\n highp vec2 lutCoord;\n lutCoord.s = (\n mod(\n // add 0.5 to handle float imprecision\n floor(lutValue.r * 255.0 + 0.5) +\n floor(lutValue.g * 255.0 + 0.5) * 256.0,\n float(lutWidth)\n // center in pixel\n ) + 0.5) / float(lutWidth);\n // Our image is top-down, so invert the coordinate\n lutCoord.t = 1.0 - (\n floor(\n (\n // add 0.5 to handle float imprecision\n floor(lutValue.r * 255.0 + 0.5) +\n floor(lutValue.g * 255.0 + 0.5) * 256.0 +\n floor(lutValue.b * 255.0 + 0.5) * 256.0 * 256.0\n // We may want an option to use the alpha channel to allow more indices\n ) / float(lutWidth)\n // center in pixel\n ) + 0.5) / float(lutHeight);\n if (lutCoord.t < 0.0) {\n discard;\n }\n mediump vec4 color = texture2D(lutSampler, lutCoord);\n\n color.a *= opacity;\n gl_FragColor = color;\n}\n"},1815:function(t){t.exports="/* pointFeature square/triangle fragment shader */\n\n/* pointFeature common fragment shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nvarying vec4 fillColorVar;\nvarying vec4 strokeColorVar;\nvarying float radiusVar;\nvarying float strokeWidthVar;\n\nvoid pointFeatureFragment(float rad) {\n vec4 strokeColor, fillColor;\n float endStep;\n // No stroke or fill implies nothing to draw\n if (rad > 1.0)\n discard;\n // If there is no stroke, the fill region should transition to nothing\n if (strokeColorVar.a == 0.0) {\n strokeColor = vec4(fillColorVar.rgb, 0.0);\n endStep = 1.0;\n } else {\n strokeColor = strokeColorVar;\n endStep = radiusVar / (radiusVar + strokeWidthVar);\n }\n // Likewise, if there is no fill, the stroke should transition to nothing\n if (fillColorVar.a == 0.0)\n fillColor = vec4(strokeColor.rgb, 0.0);\n else\n fillColor = fillColorVar;\n // Distance to antialias over. First number is in pixels\n float antialiasDist = 1.5 / (radiusVar + strokeWidthVar);\n if (rad < endStep) {\n float step = smoothstep(max(0.0, endStep - antialiasDist), endStep, rad);\n vec4 color = mix(fillColor, strokeColor, step);\n float step2 = smoothstep(max(0.0, 1.0 - antialiasDist), 1.0, rad);\n gl_FragColor = mix(color, vec4(color.rgb, 0.0), step2);\n } else {\n float step = smoothstep(max(0.0, 1.0 - antialiasDist), 1.0, rad);\n gl_FragColor = mix(strokeColor, vec4(strokeColor.rgb, 0.0), step);\n }\n}\n\n\nvarying vec3 unitVar; // distinct for square/triangle\n\nvoid main () {\n if (fillColorVar.a == 0.0 && strokeColorVar.a == 0.0)\n discard;\n float rad = length(unitVar.xy); // distinct for square/triangle\n pointFeatureFragment(rad);\n}\n"},9713:function(t){t.exports="/* pointFeature square/triangle vertex shader */\n\n/* pointFeature common vertex shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nattribute vec3 pos;\nattribute float radius;\nattribute vec3 fillColor;\nattribute vec3 strokeColor;\nattribute float fillOpacity;\nattribute float strokeWidth;\nattribute float strokeOpacity;\nattribute float fill;\nattribute float stroke;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nvarying vec4 fillColorVar;\nvarying vec4 strokeColorVar;\nvarying float radiusVar;\nvarying float strokeWidthVar;\n\nfloat pointFeaturePrep() {\n strokeWidthVar = strokeWidth;\n fillColorVar = vec4(fillColor, fillOpacity);\n strokeColorVar = vec4(strokeColor, strokeOpacity);\n // No stroke or fill implies nothing to draw\n if (stroke < 1.0 || strokeWidth <= 0.0 || strokeOpacity <= 0.0) {\n strokeColorVar.a = 0.0;\n strokeWidthVar = 0.0;\n }\n if (fill < 1.0 || radius <= 0.0 || fillOpacity <= 0.0)\n fillColorVar.a = 0.0;\n /* If the point has no visible pixels, skip doing computations on it. */\n if (fillColorVar.a == 0.0 && strokeColorVar.a == 0.0) {\n gl_Position = vec4(2, 2, 0, 1);\n return 0.0;\n }\n return radius;\n}\n\n\nuniform float pixelWidth; // for non-sprite\nuniform float aspect; // for non-sprite\nattribute vec2 unit; // for non-sprite\nvarying vec3 unitVar; // for non-sprite\n\nvoid main(void)\n{\n radiusVar = pointFeaturePrep();\n if (radiusVar == 0.0) {\n return;\n }\n // for non-sprite\n unitVar = vec3(unit, 1.0);\n vec4 p = (projectionMatrix * modelViewMatrix * vec4(pos, 1.0)).xyzw;\n if (p.w != 0.0) {\n p = p / p.w;\n }\n p += (radius + strokeWidthVar) *\n vec4(unit.x * pixelWidth, unit.y * pixelWidth * aspect, 0.0, 1.0);\n gl_Position = vec4(p.xyz, 1.0);\n}\n"},4900:function(t){t.exports="/* pointFeature sprite fragment shader */\n\n/* pointFeature common fragment shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nvarying vec4 fillColorVar;\nvarying vec4 strokeColorVar;\nvarying float radiusVar;\nvarying float strokeWidthVar;\n\nvoid pointFeatureFragment(float rad) {\n vec4 strokeColor, fillColor;\n float endStep;\n // No stroke or fill implies nothing to draw\n if (rad > 1.0)\n discard;\n // If there is no stroke, the fill region should transition to nothing\n if (strokeColorVar.a == 0.0) {\n strokeColor = vec4(fillColorVar.rgb, 0.0);\n endStep = 1.0;\n } else {\n strokeColor = strokeColorVar;\n endStep = radiusVar / (radiusVar + strokeWidthVar);\n }\n // Likewise, if there is no fill, the stroke should transition to nothing\n if (fillColorVar.a == 0.0)\n fillColor = vec4(strokeColor.rgb, 0.0);\n else\n fillColor = fillColorVar;\n // Distance to antialias over. First number is in pixels\n float antialiasDist = 1.5 / (radiusVar + strokeWidthVar);\n if (rad < endStep) {\n float step = smoothstep(max(0.0, endStep - antialiasDist), endStep, rad);\n vec4 color = mix(fillColor, strokeColor, step);\n float step2 = smoothstep(max(0.0, 1.0 - antialiasDist), 1.0, rad);\n gl_FragColor = mix(color, vec4(color.rgb, 0.0), step2);\n } else {\n float step = smoothstep(max(0.0, 1.0 - antialiasDist), 1.0, rad);\n gl_FragColor = mix(strokeColor, vec4(strokeColor.rgb, 0.0), step);\n }\n}\n\n\n// the square/triangle shader defines unitVar\n\nvoid main () {\n // No stroke or fill implies nothing to draw\n if (fillColorVar.a == 0.0 && strokeColorVar.a == 0.0)\n discard;\n float rad = 2.0 * length(gl_PointCoord - vec2(0.5)); // distinct for sprite\n pointFeatureFragment(rad);\n}\n"},8410:function(t){t.exports="/* pointFeature sprite vertex shader */\n\n/* pointFeature common vertex shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nattribute vec3 pos;\nattribute float radius;\nattribute vec3 fillColor;\nattribute vec3 strokeColor;\nattribute float fillOpacity;\nattribute float strokeWidth;\nattribute float strokeOpacity;\nattribute float fill;\nattribute float stroke;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nvarying vec4 fillColorVar;\nvarying vec4 strokeColorVar;\nvarying float radiusVar;\nvarying float strokeWidthVar;\n\nfloat pointFeaturePrep() {\n strokeWidthVar = strokeWidth;\n fillColorVar = vec4(fillColor, fillOpacity);\n strokeColorVar = vec4(strokeColor, strokeOpacity);\n // No stroke or fill implies nothing to draw\n if (stroke < 1.0 || strokeWidth <= 0.0 || strokeOpacity <= 0.0) {\n strokeColorVar.a = 0.0;\n strokeWidthVar = 0.0;\n }\n if (fill < 1.0 || radius <= 0.0 || fillOpacity <= 0.0)\n fillColorVar.a = 0.0;\n /* If the point has no visible pixels, skip doing computations on it. */\n if (fillColorVar.a == 0.0 && strokeColorVar.a == 0.0) {\n gl_Position = vec4(2, 2, 0, 1);\n return 0.0;\n }\n return radius;\n}\n\n\nvoid main(void)\n{\n radiusVar = pointFeaturePrep();\n if (radiusVar == 0.0) {\n return;\n }\n // for sprite\n gl_Position = (projectionMatrix * modelViewMatrix * vec4(pos, 1.0)).xyzw;\n gl_PointSize = 2.0 * (radius + strokeWidthVar);\n}\n"},1859:function(t){t.exports="/* polygonFeature fragment shader */\n\n#ifdef GL_ES\n precision highp float;\n#endif\nvarying vec4 fillColorVar;\n\nvoid main () {\n gl_FragColor = fillColorVar;\n}\n"},5810:function(t){t.exports="/* polygonFeature vertex shader */\n\nattribute vec3 pos;\nattribute vec3 fillColor;\nattribute float fillOpacity;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nvarying vec4 fillColorVar;\n\nvoid main(void)\n{\n vec4 clipPos = projectionMatrix * modelViewMatrix * vec4(pos.xyz, 1.0);\n if (clipPos.w != 0.0) {\n clipPos = clipPos/clipPos.w;\n }\n fillColorVar = vec4(fillColor, fillOpacity);\n gl_Position = clipPos;\n}\n"},630:function(t){t.exports="/* quadFeature Color fragment shader */\n\nvarying mediump vec3 iVertexColor;\nuniform mediump float opacity;\n\nvoid main(void) {\n gl_FragColor = vec4(iVertexColor, opacity);\n}\n"},1899:function(t){t.exports="/* quadFeature Color vertex shader */\n\nattribute vec3 vertexPosition;\nuniform float zOffset;\nuniform vec3 vertexColor;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nvarying mediump vec3 iVertexColor;\n\nvoid main(void) {\n gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition, 1.0);\n gl_Position.z += zOffset;\n iVertexColor = vertexColor;\n}\n"},7521:function(t){t.exports="/* quadFeature Image fragment shader */\n\nvarying highp vec2 iTextureCoord;\nuniform sampler2D sampler2d;\nuniform mediump float opacity;\nuniform highp vec2 crop;\n\nvoid main(void) {\n mediump vec4 color = texture2D(sampler2d, iTextureCoord);\n if ((crop.s < 1.0 && iTextureCoord.s > crop.s) || (crop.t < 1.0 && 1.0 - iTextureCoord.t > crop.t)) {\n discard;\n }\n color.w *= opacity;\n gl_FragColor = color;\n}\n"},5804:function(t){t.exports="/* quadFeature Image vertex shader */\n\nattribute vec3 vertexPosition;\nattribute vec2 textureCoord;\nuniform float zOffset;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nvarying highp vec2 iTextureCoord;\nuniform highp vec4 cropsource;\n\nvoid main(void) {\n gl_Position = projectionMatrix * modelViewMatrix * vec4(vertexPosition, 1.0);\n gl_Position.z += zOffset;\n if (cropsource.p > cropsource.s && cropsource.q > cropsource.t && (cropsource.p < 1.0 || cropsource.s > 0.0 || cropsource.q < 1.0 || cropsource.t > 0.0)) {\n iTextureCoord.s = textureCoord.s * (cropsource.p - cropsource.s) + cropsource.s;\n iTextureCoord.t = textureCoord.t * (cropsource.q - cropsource.t) + cropsource.t;\n } else {\n iTextureCoord = textureCoord;\n }\n}\n"},8701:function(t,e,n){"use strict";n.r(e);var i=n(1892),r=n.n(i),o=n(5760),a=n.n(o),s=n(8311),l=n.n(s),u=n(8192),c=n.n(u),d=n(8060),h=n.n(d),f=n(4865),p=n.n(f),m=n(406),g={};g.styleTagTransform=p(),g.setAttributes=c(),g.insert=l().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=h();r()(m.Z,g);e.default=m.Z&&m.Z.locals?m.Z.locals:void 0},2352:function(t,e,n){"use strict";n.r(e);var i=n(1892),r=n.n(i),o=n(5760),a=n.n(o),s=n(8311),l=n.n(s),u=n(8192),c=n.n(u),d=n(8060),h=n.n(d),f=n(4865),p=n.n(f),m=n(7747),g={};g.styleTagTransform=p(),g.setAttributes=c(),g.insert=l().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=h();r()(m.Z,g);e.default=m.Z&&m.Z.locals?m.Z.locals:void 0},4129:function(t,e,n){"use strict";n.r(e);var i=n(1892),r=n.n(i),o=n(5760),a=n.n(o),s=n(8311),l=n.n(s),u=n(8192),c=n.n(u),d=n(8060),h=n.n(d),f=n(4865),p=n.n(f),m=n(1680),g={};g.styleTagTransform=p(),g.setAttributes=c(),g.insert=l().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=h();r()(m.Z,g);e.default=m.Z&&m.Z.locals?m.Z.locals:void 0},1892:function(t){"use strict";var e=[];function n(t){for(var n=-1,i=0;i<e.length;i++)if(e[i].identifier===t){n=i;break}return n}function i(t,i){for(var o={},a=[],s=0;s<t.length;s++){var l=t[s],u=i.base?l[0]+i.base:l[0],c=o[u]||0,d="".concat(u," ").concat(c);o[u]=c+1;var h=n(d),f={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)e[h].references++,e[h].updater(f);else{var p=r(f,i);i.byIndex=s,e.splice(s,0,{identifier:d,updater:p,references:1})}a.push(d)}return a}function r(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,r){var o=i(t=t||[],r=r||{});return function(t){t=t||[];for(var a=0;a<o.length;a++){var s=n(o[a]);e[s].references--}for(var l=i(t,r),u=0;u<o.length;u++){var c=n(o[u]);0===e[c].references&&(e[c].updater(),e.splice(c,1))}o=l}}},8311:function(t){"use strict";var e={};t.exports=function(t,n){var i=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},8060:function(t){"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},8192:function(t,e,n){"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},5760:function(t){"use strict";t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,r&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(i,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},4865:function(t){"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},9990:function(t){"use strict";if(void 0===e){var n=new Error("Cannot find module 'd3'");throw n.code="MODULE_NOT_FOUND",n}t.exports=e},999:function(t){"use strict";if(void 0===n){var e=new Error("Cannot find module 'vtk.js'");throw e.code="MODULE_NOT_FOUND",e}t.exports=n},3877:function(e){"use strict";if(void 0===t){var n=new Error("Cannot find module 'hammerjs'");throw n.code="MODULE_NOT_FOUND",n}e.exports=t}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var n=r[t]={id:t,exports:{}};return i[t].call(n.exports,n,n.exports,o),n.exports}return o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o(6062)}()}));
60
60
  //# sourceMappingURL=geo.lean.min.js.map