!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.CesiumVectorTile=t()}}(function(){var t;return function(){function t(e,r,n){function i(a,s){if(!r[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var h=new Error("Cannot find module '"+a+"'");throw h.code="MODULE_NOT_FOUND",h}var l=r[a]={exports:{}};e[a][0].call(l.exports,function(t){return i(e[a][1][t]||t)},l,l.exports,t,e,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a0&&(a[0][0]===a[a.length-1][0]&&a[0][1]===a[a.length-1][1]||a.push(a[0]),a.length>=4&&r.push(a))}return r}var o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var a=t("@turf/helpers"),s=t("@turf/invariant"),u=o(t("./lib/lineclip"));r.default=n},{"./lib/lineclip":2,"@turf/helpers":14,"@turf/invariant":17}],2:[function(t,e,r){"use strict";function n(t,e,r){var n,i,s,u,h,l=t.length,f=a(t[0],e),c=[];for(r||(r=[]),n=1;ne[2]&&(r|=2),t[1]e[3]&&(r|=8),r}e.exports=n,e.exports.default=n,n.polyline=n,n.polygon=i},{}],3:[function(t,e,r){"use strict";function n(t,e){void 0===e&&(e={});var r=Number(t[0]),n=Number(t[1]),o=Number(t[2]),a=Number(t[3]);if(6===t.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var s=[r,n],u=[r,a],h=[o,a],l=[o,n];return i.polygon([[s,l,h,u,s]],e.properties,{bbox:t,id:e.id})}Object.defineProperty(r,"__esModule",{value:!0});var i=t("@turf/helpers");r.default=n},{"@turf/helpers":14}],4:[function(t,e,r){"use strict";function n(t){var e=[1/0,1/0,-1/0,-1/0];return i.coordEach(t,function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]t[1]!=h>t[1]&&t[0]<(u-a)*(t[1]-s)/(h-s)+a&&(n=!n)}return n}function o(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}Object.defineProperty(r,"__esModule",{value:!0});var a=t("@turf/invariant");r.default=n},{"@turf/invariant":17}],6:[function(t,e,r){"use strict";function n(t,e){switch(void 0===e&&(e={}),s.getType(t)){case"Point":return t;case"Polygon":var r=[];u.coordEach(t,function(t){r.push(t)});var h,l,f,c,d,p,m,g,y=o.default(t,{properties:e.properties}),v=y.geometry.coordinates,b=0,w=0,_=0,x=r.map(function(t){return[t[0]-v[0],t[1]-v[1]]});for(h=0;h=Math.abs(c)?f>0?o<=n&&n<=s:s<=n&&n<=o:c>0?a<=i&&i<=u:u<=i&&i<=a)}var s=t("@turf/helpers"),u=t("@turf/invariant");e.exports=n,e.exports.default=n},{"@turf/helpers":10,"@turf/invariant":11}],10:[function(t,e,r){"use strict";function n(t,e,r){if(r=r||{},!S(r))throw new Error("options is invalid");var n=r.bbox,i=r.id;if(void 0===t)throw new Error("geometry is required");if(e&&e.constructor!==Object)throw new Error("properties must be an Object");n&&O(n),i&&A(i);var o={type:"Feature"};return i&&(o.id=i),n&&(o.bbox=n),o.properties=e||{},o.geometry=t,o}function i(t,e,r){if(r=r||{},!S(r))throw new Error("options is invalid");var n=r.bbox;if(!t)throw new Error("type is required");if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");n&&O(n);var i;switch(t){case"Point":i=o(e).geometry;break;case"LineString":i=h(e).geometry;break;case"Polygon":i=s(e).geometry;break;case"MultiPoint":i=d(e).geometry;break;case"MultiLineString":i=c(e).geometry;break;case"MultiPolygon":i=p(e).geometry;break;default:throw new Error(t+" is invalid")}return n&&(i.bbox=n),i}function o(t,e,r){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!C(t[0])||!C(t[1]))throw new Error("coordinates must contain numbers");return n({type:"Point",coordinates:t},e,r)}function a(t,e,r){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");return f(t.map(function(t){return o(t,e)}),r)}function s(t,e,r){if(!t)throw new Error("coordinates is required");for(var i=0;i=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r}function y(t,e){if(void 0===t||null===t)throw new Error("radians is required");if(e&&"string"!=typeof e)throw new Error("units must be a string");var r=N[e||"kilometers"];if(!r)throw new Error(e+" units is invalid");return t*r}function v(t,e){if(void 0===t||null===t)throw new Error("distance is required");if(e&&"string"!=typeof e)throw new Error("units must be a string");var r=N[e||"kilometers"];if(!r)throw new Error(e+" units is invalid");return t/r}function b(t,e){return _(v(t,e))}function w(t){if(null===t||void 0===t)throw new Error("bearing is required");var e=t%360;return e<0&&(e+=360),e}function _(t){if(null===t||void 0===t)throw new Error("radians is required");return t%(2*Math.PI)*180/Math.PI}function x(t){if(null===t||void 0===t)throw new Error("degrees is required");return t%360*Math.PI/180}function M(t,e,r){if(null===t||void 0===t)throw new Error("length is required");if(!(t>=0))throw new Error("length must be a positive number");return y(v(t,e),r||"kilometers")}function E(t,e,r){if(null===t||void 0===t)throw new Error("area is required");if(!(t>=0))throw new Error("area must be a positive number");var n=B[e||"meters"];if(!n)throw new Error("invalid original units");var i=B[r||"kilometers"];if(!i)throw new Error("invalid final units");return t/n*i}function C(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function S(t){return!!t&&t.constructor===Object}function O(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(t){if(!C(t))throw new Error("bbox must only contain numbers")})}function A(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}function I(){throw new Error("method has been renamed to `radiansToDegrees`")}function k(){throw new Error("method has been renamed to `degreesToRadians`")}function T(){throw new Error("method has been renamed to `lengthToDegrees`")}function P(){throw new Error("method has been renamed to `lengthToRadians`")}function R(){throw new Error("method has been renamed to `radiansToLength`")}function L(){throw new Error("method has been renamed to `bearingToAzimuth`")}function j(){throw new Error("method has been renamed to `convertLength`")}Object.defineProperty(r,"__esModule",{value:!0});var N={meters:6371008.8,metres:6371008.8,millimeters:6371008800,millimetres:6371008800,centimeters:637100880,centimetres:637100880,kilometers:6371.0088,kilometres:6371.0088,miles:3958.761333810546,nauticalmiles:6371008.8/1852,inches:6371008.8*39.37,yards:6371008.8/1.0936,feet:20902260.511392,radians:1,degrees:6371008.8/111325},q={meters:1,metres:1,millimeters:1e3,millimetres:1e3,centimeters:100,centimetres:100,kilometers:.001,kilometres:.001,miles:1/1609.344,nauticalmiles:1/1852,inches:39.37,yards:1/1.0936,feet:3.28084,radians:1/6371008.8,degrees:1/111325},B={meters:1,metres:1,millimeters:1e6,millimetres:1e6,centimeters:1e4,centimetres:1e4,kilometers:1e-6,kilometres:1e-6,acres:247105e-9,miles:3.86e-7,yards:1.195990046,feet:10.763910417,inches:1550.003100006};r.earthRadius=6371008.8,r.factors=N,r.unitsFactors=q,r.areaFactors=B,r.feature=n,r.geometry=i,r.point=o,r.points=a,r.polygon=s,r.polygons=u,r.lineString=h,r.lineStrings=l,r.featureCollection=f,r.multiLineString=c,r.multiPoint=d,r.multiPolygon=p,r.geometryCollection=m,r.round=g,r.radiansToLength=y,r.lengthToRadians=v,r.lengthToDegrees=b,r.bearingToAzimuth=w,r.radiansToDegrees=_,r.degreesToRadians=x,r.convertLength=M,r.convertArea=E,r.isNumber=C,r.isObject=S,r.validateBBox=O,r.validateId=A,r.radians2degrees=I,r.degrees2radians=k,r.distanceToDegrees=T,r.distanceToRadians=P,r.radiansToDistance=R,r.bearingToAngle=L,r.convertDistance=j},{}],11:[function(t,e,r){"use strict";function n(t){if(!t)throw new Error("coord is required");if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates;if(Array.isArray(t)&&t.length>=2&&void 0===t[0].length&&void 0===t[1].length)return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function i(t){if(!t)throw new Error("coords is required");if("Feature"===t.type&&null!==t.geometry)return t.geometry.coordinates;if(t.coordinates)return t.coordinates;if(Array.isArray(t))return t;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function o(t){if(t.length>1&&c.isNumber(t[0])&&c.isNumber(t[1]))return!0;if(Array.isArray(t[0])&&t[0].length)return o(t[0]);throw new Error("coordinates must only contain numbers")}function a(t,e,r){if(!e||!r)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+r+": must be a "+e+", given "+t.type)}function s(t,e,r){if(!t)throw new Error("No feature passed");if(!r)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+r+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+r+": must be a "+e+", given "+t.geometry.type)}function u(t,e,r){if(!t)throw new Error("No featureCollection passed");if(!r)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+r+", FeatureCollection required");for(var n=0;n3?o.polygon([n]):null}var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var o=t("@turf/helpers"),a=t("@turf/meta"),s=i(t("concaveman"));r.default=n},{"@turf/helpers":14,"@turf/meta":18,concaveman:31}],13:[function(t,e,r){"use strict";function n(t,e,r){void 0===r&&(r={});var n=i.getCoord(t),a=i.getCoord(e),s=o.degreesToRadians(a[1]-n[1]),u=o.degreesToRadians(a[0]-n[0]),h=o.degreesToRadians(n[1]),l=o.degreesToRadians(a[1]),f=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(u/2),2)*Math.cos(h)*Math.cos(l);return o.radiansToLength(2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f)),r.units)}Object.defineProperty(r,"__esModule",{value:!0});var i=t("@turf/invariant"),o=t("@turf/helpers");r.default=n},{"@turf/helpers":14,"@turf/invariant":17}],14:[function(t,e,r){"use strict";function n(t,e,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=e||{},n.geometry=t,n}function i(t,e,r){switch(void 0===r&&(r={}),t){case"Point":return o(e).geometry;case"LineString":return h(e).geometry;case"Polygon":return s(e).geometry;case"MultiPoint":return d(e).geometry;case"MultiLineString":return c(e).geometry;case"MultiPolygon":return p(e).geometry;default:throw new Error(t+" is invalid")}}function o(t,e,r){return void 0===r&&(r={}),n({type:"Point",coordinates:t},e,r)}function a(t,e,r){return void 0===r&&(r={}),f(t.map(function(t){return o(t,e)}),r)}function s(t,e,r){void 0===r&&(r={});for(var i=0,o=t;i=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r}function y(t,e){void 0===e&&(e="kilometers");var n=r.factors[e];if(!n)throw new Error(e+" units is invalid");return t*n}function v(t,e){void 0===e&&(e="kilometers");var n=r.factors[e];if(!n)throw new Error(e+" units is invalid");return t/n}function b(t,e){return _(v(t,e))}function w(t){var e=t%360;return e<0&&(e+=360),e}function _(t){return t%(2*Math.PI)*180/Math.PI}function x(t){return t%360*Math.PI/180}function M(t,e,r){if(void 0===e&&(e="kilometers"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return y(v(t,e),r)}function E(t,e,n){if(void 0===e&&(e="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=r.areaFactors[e];if(!i)throw new Error("invalid original units");var o=r.areaFactors[n];if(!o)throw new Error("invalid final units");return t/i*o}function C(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)&&!/^\s*$/.test(t)}function S(t){return!!t&&t.constructor===Object}function O(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(t){if(!C(t))throw new Error("bbox must only contain numbers")})}function A(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}function I(){throw new Error("method has been renamed to `radiansToDegrees`")}function k(){throw new Error("method has been renamed to `degreesToRadians`")}function T(){throw new Error("method has been renamed to `lengthToDegrees`")}function P(){throw new Error("method has been renamed to `lengthToRadians`")}function R(){throw new Error("method has been renamed to `radiansToLength`")}function L(){throw new Error("method has been renamed to `bearingToAzimuth`")}function j(){throw new Error("method has been renamed to `convertLength`")}Object.defineProperty(r,"__esModule",{value:!0}),r.earthRadius=6371008.8,r.factors={centimeters:100*r.earthRadius,centimetres:100*r.earthRadius,degrees:r.earthRadius/111325,feet:3.28084*r.earthRadius,inches:39.37*r.earthRadius,kilometers:r.earthRadius/1e3,kilometres:r.earthRadius/1e3,meters:r.earthRadius,metres:r.earthRadius,miles:r.earthRadius/1609.344,millimeters:1e3*r.earthRadius,millimetres:1e3*r.earthRadius,nauticalmiles:r.earthRadius/1852,radians:1,yards:r.earthRadius/1.0936},r.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/r.earthRadius,yards:1/1.0936},r.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:3.86e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046},r.feature=n,r.geometry=i,r.point=o,r.points=a,r.polygon=s,r.polygons=u,r.lineString=h,r.lineStrings=l,r.featureCollection=f,r.multiLineString=c,r.multiPoint=d,r.multiPolygon=p,r.geometryCollection=m,r.round=g,r.radiansToLength=y,r.lengthToRadians=v,r.lengthToDegrees=b,r.bearingToAzimuth=w,r.radiansToDegrees=_,r.degreesToRadians=x,r.convertLength=M,r.convertArea=E,r.isNumber=C,r.isObject=S,r.validateBBox=O,r.validateId=A,r.radians2degrees=I,r.degrees2radians=k,r.distanceToDegrees=T,r.distanceToRadians=P,r.radiansToDistance=R,r.bearingToAngle=L,r.convertDistance=j},{}],15:[function(t,e,r){function n(t,e,r){var n=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var i=0,o=e.length-1;it[1]!=h>t[1]&&t[0]<(u-a)*(t[1]-s)/(h-s)+a&&(n=!n)}return n}function i(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}var o=t("@turf/invariant"),a=o.getCoord,s=o.getCoords;e.exports=function(t,e,r){if(!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var o=a(t),u=s(e),h=e.geometry?e.geometry.type:e.type,l=e.bbox;if(l&&!1===i(o,l))return!1;"Polygon"===h&&(u=[u]);for(var f=0,c=!1;f1&&"number"==typeof e[0]&&"number"==typeof e[1])return e;throw new Error("Coordinate is not a valid Point")}function i(t){if(!t)throw new Error("obj is required");var e;if(t.length?e=t:t.coordinates?e=t.coordinates:t.geometry&&t.geometry.coordinates&&(e=t.geometry.coordinates),e)return o(e),e;throw new Error("No valid coordinates")}function o(t){if(t.length>1&&"number"==typeof t[0]&&"number"==typeof t[1])return!0;if(Array.isArray(t[0])&&t[0].length)return o(t[0]);throw new Error("coordinates must only contain numbers")}function a(t,e,r){if(!e||!r)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+r+": must be a "+e+", given "+t.type)}function s(t,e,r){if(!t)throw new Error("No feature passed");if(!r)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+r+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+r+": must be a "+e+", given "+t.geometry.type)}function u(t,e,r){if(!t)throw new Error("No featureCollection passed");if(!r)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+r+", FeatureCollection required");for(var n=0;n=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function i(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function o(t){if(t.length>1&&f.isNumber(t[0])&&f.isNumber(t[1]))return!0;if(Array.isArray(t[0])&&t[0].length)return o(t[0]);throw new Error("coordinates must only contain numbers")}function a(t,e,r){if(!e||!r)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+r+": must be a "+e+", given "+t.type)}function s(t,e,r){if(!t)throw new Error("No feature passed");if(!r)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+r+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+r+": must be a "+e+", given "+t.geometry.type)}function u(t,e,r){if(!t)throw new Error("No featureCollection passed");if(!r)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+r+", FeatureCollection required");for(var n=0,i=t.features;nu||c>h||d>l)return s=n,u=r,h=c,l=d,void(o=0);var p=w.lineString([s,n],t.properties);if(!1===e(p,r,i,d,o))return!1;o++,s=n})&&void 0}}})}function m(t,e,r){var n=r,i=!1;return p(t,function(t,o,a,s,u){n=!1===i&&void 0===r?t:e(n,t,o,a,s,u),i=!0}),n}function g(t,e){if(!t)throw new Error("geojson is required");c(t,function(t,r,n){if(null!==t.geometry){var i=t.geometry.type,o=t.geometry.coordinates;switch(i){case"LineString":if(!1===e(t,r,n,0,0))return!1;break;case"Polygon":for(var a=0;a1?s.multiLineString(t,e):s.lineString(t[0],e)}Object.defineProperty(r,"__esModule",{value:!0});var s=t("@turf/helpers"),u=t("@turf/invariant");r.default=n,r.polygonToLine=i,r.multiPolygonToLine=o,r.coordsToLine=a},{"@turf/helpers":14,"@turf/invariant":17}],21:[function(t,e,r){"use strict";function n(t,e,r){void 0===r&&(r={});var n=a.getCoord(t),s=a.getCoord(e);s[0]+=s[0]-n[0]>180?-360:n[0]-s[0]>180?360:0;var u=i(n,s);return o.convertLength(u,"meters",r.units)}function i(t,e,r){r=void 0===r?o.earthRadius:Number(r);var n=r,i=t[1]*Math.PI/180,a=e[1]*Math.PI/180,s=a-i,u=Math.abs(e[0]-t[0])*Math.PI/180;u>Math.PI&&(u-=2*Math.PI);var h=Math.log(Math.tan(a/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),l=Math.abs(h)>1e-11?s/h:Math.cos(i);return Math.sqrt(s*s+l*l*u*u)*n}Object.defineProperty(r,"__esModule",{value:!0});var o=t("@turf/helpers"),a=t("@turf/invariant");r.default=n},{"@turf/helpers":14,"@turf/invariant":17}],22:[function(t,e,r){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t.default:t}function i(t,e){var r=t.x-e.x,n=t.y-e.y;return r*r+n*n}function o(t,e,r){var n=e.x,i=e.y,o=r.x-n,a=r.y-i;if(0!==o||0!==a){var s=((t.x-n)*o+(t.y-i)*a)/(o*o+a*a);s>1?(n=r.x,i=r.y):s>0&&(n+=o*s,i+=a*s)}return o=t.x-n,a=t.y-i,o*o+a*a}function a(t,e){for(var r,n=t[0],o=[n],a=1,s=t.length;ae&&(o.push(r),n=r);return n!==r&&o.push(r),o}function s(t,e,r,n,i){for(var a,u=n,h=e+1;hu&&(a=h,u=l)}u>n&&(a-e>1&&s(t,e,a,n,i),i.push(t[a]),r-a>1&&s(t,a,r,n,i))}function u(t,e){var r=t.length-1,n=[t[0]];return s(t,0,r,e,n),n.push(t[r]),n}function h(t,e,r){if(t.length<=2)return t;var n=void 0!==e?e*e:1;return t=r?t:a(t,n),t=u(t,n)}function l(t,e){if(e=e||{},!v.isObject(e))throw new Error("options is invalid");var r=void 0!==e.tolerance?e.tolerance:1,n=e.highQuality||!1,i=e.mutate||!1;if(!t)throw new Error("geojson is required");if(r&&r<0)throw new Error("invalid tolerance");return!0!==i&&(t=g(t)),y.geomEach(t,function(t){f(t,r,n)}),t}function f(t,e,r){var n=t.type;if("Point"===n||"MultiPoint"===n)return t;m(t,!0);var i=t.coordinates;switch(n){case"LineString":t.coordinates=c(i,e,r);break;case"MultiLineString":t.coordinates=i.map(function(t){return c(t,e,r)});break;case"Polygon":t.coordinates=d(i,e,r);break;case"MultiPolygon":t.coordinates=i.map(function(t){return d(t,e,r)})}return t}function c(t,e,r){return h(t.map(function(t){return{x:t[0],y:t[1],z:t[2]}}),e,r).map(function(t){return t.z?[t.x,t.y,t.z]:[t.x,t.y]})}function d(t,e,r){return t.map(function(t){var n=t.map(function(t){return{x:t[0],y:t[1]}});if(n.length<4)throw new Error("invalid polygon");for(var i=h(n,e,r).map(function(t){return[t.x,t.y]});!p(i);)e-=.01*e,i=h(n,e,r).map(function(t){return[t.x,t.y]});return i[i.length-1][0]===i[0][0]&&i[i.length-1][1]===i[0][1]||i.push(i[0]),i})}function p(t){return!(t.length<3)&&!(3===t.length&&t[2][0]===t[0][0]&&t[2][1]===t[0][1])}var m=n(t("@turf/clean-coords")),g=n(t("@turf/clone")),y=t("@turf/meta"),v=t("@turf/helpers");e.exports=l,e.exports.default=l},{"@turf/clean-coords":9,"@turf/clone":23,"@turf/helpers":24,"@turf/meta":25}],23:[function(t,e,r){"use strict";function n(t){if(!t)throw new Error("geojson is required");switch(t.type){case"Feature":return i(t);case"FeatureCollection":return a(t);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return s(t);default:throw new Error("unknown GeoJSON type")}}function i(t){var e={type:"Feature"};return Object.keys(t).forEach(function(r){switch(r){case"type":case"properties":case"geometry":return;default:e[r]=t[r]}}),e.properties=o(t.properties),e.geometry=s(t.geometry),e}function o(t){var e={};return t?(Object.keys(t).forEach(function(r){var n=t[r];"object"==typeof n?null===n?e[r]=null:n.length?e[r]=n.map(function(t){return t}):e[r]=o(n):e[r]=n}),e):e}function a(t){var e={type:"FeatureCollection"};return Object.keys(t).forEach(function(r){switch(r){case"type":case"features":return;default:e[r]=t[r]}}),e.features=t.features.map(function(t){return i(t)}),e}function s(t){var e={type:t.type};return t.bbox&&(e.bbox=t.bbox),"GeometryCollection"===t.type?(e.geometries=t.geometries.map(function(t){return s(t)}),e):(e.coordinates=u(t.coordinates),e)}function u(t){return"object"!=typeof t[0]?t.slice():t.map(function(t){return u(t)})}e.exports=n,e.exports.default=n},{}],24:[function(t,e,r){arguments[4][10][0].apply(r,arguments)},{dup:10}],25:[function(t,e,r){"use strict";function n(t,e,r){if(null!==t)for(var i,o,a,s,u,h,l,f,c=0,d=0,p=t.type,m="FeatureCollection"===p,g="Feature"===p,y=m?t.features.length:1,v=0;v=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r}function p(t,e){if(void 0===t||null===t)throw new Error("radians is required");var r=M[e||"kilometers"];if(!r)throw new Error("units is invalid");return t*r}function m(t,e){if(void 0===t||null===t)throw new Error("distance is required");var r=M[e||"kilometers"];if(!r)throw new Error("units is invalid");return t/r}function g(t,e){return v(m(t,e))}function y(t){if(null===t||void 0===t)throw new Error("bearing is required");var e=t%360;return e<0&&(e+=360),e}function v(t){if(null===t||void 0===t)throw new Error("radians is required");return t%(2*Math.PI)*180/Math.PI}function b(t){if(null===t||void 0===t)throw new Error("degrees is required");return t%360*Math.PI/180}function w(t,e,r){if(null===t||void 0===t)throw new Error("distance is required");if(!(t>=0))throw new Error("distance must be a positive number");return p(m(t,e),r||"kilometers")}function _(t,e,r){if(null===t||void 0===t)throw new Error("area is required");if(!(t>=0))throw new Error("area must be a positive number");var n=E[e||"meters"];if(!n)throw new Error("invalid original units");var i=E[r||"kilometers"];if(!i)throw new Error("invalid final units");return t/n*i}function x(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}var M={miles:3960,nauticalmiles:3441.145,degrees:57.2957795,radians:1,inches:250905600,yards:6969600,meters:6373e3,metres:6373e3,centimeters:6373e5,centimetres:6373e5,kilometers:6373,kilometres:6373,feet:20908792.65},E={kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,centimetres:1e4,millimeter:1e6,acres:247105e-9,miles:3.86e-7,yards:1.195990046,feet:10.763910417,inches:1550.003100006};e.exports={feature:n,geometry:i,featureCollection:u,geometryCollection:c,point:o,multiPoint:l,lineString:s,multiLineString:h,polygon:a,multiPolygon:f,radiansToDistance:p,distanceToRadians:m,distanceToDegrees:g,radians2degrees:v,degrees2radians:b,bearingToAngle:y,convertDistance:w,convertArea:_,round:d,isNumber:x}},{}],28:[function(t,e,r){"use strict";function n(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function i(t){var e=n(t),r=e[0],i=e[1];return 3*(r+i)/4-i}function o(t,e,r){return 3*(e+r)/4-r}function a(t){var e,r,i=n(t),a=i[0],s=i[1],u=new c(o(t,a,s)),h=0,l=s>0?a-4:a;for(r=0;r>16&255,u[h++]=e>>8&255,u[h++]=255&e;return 2===s&&(e=f[t.charCodeAt(r)]<<2|f[t.charCodeAt(r+1)]>>4,u[h++]=255&e),1===s&&(e=f[t.charCodeAt(r)]<<10|f[t.charCodeAt(r+1)]<<4|f[t.charCodeAt(r+2)]>>2,u[h++]=e>>8&255,u[h++]=255&e),u}function s(t){return l[t>>18&63]+l[t>>12&63]+l[t>>6&63]+l[63&t]}function u(t,e,r){for(var n,i=[],o=e;oa?a:o+16383));return 1===n?(e=t[r-1],i.push(l[e>>2]+l[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],i.push(l[e>>10]+l[e>>4&63]+l[e<<2&63]+"=")),i.join("")}r.byteLength=i,r.toByteArray=a,r.fromByteArray=h;for(var l=[],f=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,m=d.length;pH)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return Object.setPrototypeOf(r,e.prototype),r}function e(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return s(t)}return i(t,e,r)}function i(t,r,n){if("string"==typeof t)return u(t,r);if(ArrayBuffer.isView(t))return h(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(G(t,ArrayBuffer)||t&&G(t.buffer,ArrayBuffer))return l(t,r,n);if("undefined"!=typeof SharedArrayBuffer&&(G(t,SharedArrayBuffer)||t&&G(t.buffer,SharedArrayBuffer)))return l(t,r,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=t.valueOf&&t.valueOf();if(null!=i&&i!==t)return e.from(i,r,n);var o=f(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return e.from(t[Symbol.toPrimitive]("string"),r,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function o(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function a(t,e,r){return o(t),t<=0?n(t):void 0!==e?"string"==typeof r?n(t).fill(e,r):n(t).fill(e):n(t)}function s(t){return o(t),n(t<0?0:0|c(t))}function u(t,r){if("string"==typeof r&&""!==r||(r="utf8"),!e.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var i=0|p(t,r),o=n(i),a=o.write(t,r);return a!==i&&(o=o.slice(0,a)),o}function h(t){for(var e=t.length<0?0:0|c(t.length),r=n(e),i=0;i=H)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+H.toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),e.alloc(+t)}function p(t,r){if(e.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||G(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var n=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var o=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return D(t).length;default:if(o)return i?-1:B(t).length;r=(""+r).toLowerCase(),o=!0}}function m(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return A(this,e,r);case"latin1":case"binary":return I(this,e,r);case"base64":return C(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,r,n,i,o){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,W(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=e.from(r,i)),e.isBuffer(r))return 0===r.length?-1:v(t,r,n,i,o);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,n):Uint8Array.prototype.lastIndexOf.call(t,r,n):v(t,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){function o(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}var h;if(i){var l=-1;for(h=r;hs&&(r=s-u),h=r;h>=0;h--){for(var f=!0,c=0;ci&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+s<=r){var u,h,l,f;switch(s){case 1:o<128&&(a=o);break;case 2:u=t[i+1],128==(192&u)&&(f=(31&o)<<6|63&u)>127&&(a=f);break;case 3:u=t[i+1],h=t[i+2],128==(192&u)&&128==(192&h)&&(f=(15&o)<<12|(63&u)<<6|63&h)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=t[i+1],h=t[i+2],l=t[i+3],128==(192&u)&&128==(192&h)&&128==(192&l)&&(f=(15&o)<<18|(63&u)<<12|(63&h)<<6|63&l)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return O(n)}function O(t){var e=t.length;if(e<=Z)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function R(t,r,n,i,o,a){if(!e.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||rt.length)throw new RangeError("Index out of range")}function L(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(t,e,r,n,i){return e=+e,r>>>=0,i||L(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),V.write(t,e,r,n,23,4),r+4}function N(t,e,r,n,i){return e=+e,r>>>=0,i||L(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),V.write(t,e,r,n,52,8),r+8}function q(t){if(t=t.split("=")[0],t=t.trim().replace(K,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function B(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{ if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(t){for(var e=[],r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function D(t){return Y.toByteArray(q(t))}function U(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function G(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function W(t){return t!==t}var Y=t("base64-js"),V=t("ieee754"),X="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=e,r.SlowBuffer=d,r.INSPECT_MAX_BYTES=50;var H=2147483647;r.kMaxLength=H,e.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),e.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&e[Symbol.species]===e&&Object.defineProperty(e,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),e.poolSize=8192,e.from=function(t,e,r){return i(t,e,r)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array),e.alloc=function(t,e,r){return a(t,e,r)},e.allocUnsafe=function(t){return s(t)},e.allocUnsafeSlow=function(t){return s(t)},e.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==e.prototype},e.compare=function(t,r){if(G(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),G(r,Uint8Array)&&(r=e.from(r,r.offset,r.byteLength)),!e.isBuffer(t)||!e.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var n=t.length,i=r.length,o=0,a=Math.min(n,i);oe&&(t+=" ... "),""},X&&(e.prototype[X]=e.prototype.inspect),e.prototype.compare=function(t,r,n,i,o){if(G(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),!e.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var a=o-i,s=n-r,u=Math.min(a,s),h=this.slice(i,o),l=t.slice(r,n),f=0;f>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return x(this,t,e,r);case"base64":return M(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;e.prototype.slice=function(t,r){var n=this.length;t=~~t,r=void 0===r?n:~~r,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),r<0?(r+=n)<0&&(r=0):r>n&&(r=n),r>>=0,e>>>=0,r||P(t,e,this.length);for(var n=this[t],i=1,o=0;++o>>=0,e>>>=0,r||P(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},e.prototype.readUInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),this[t]},e.prototype.readUInt16LE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]|this[t+1]<<8},e.prototype.readUInt16BE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]<<8|this[t+1]},e.prototype.readUInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},e.prototype.readUInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},e.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var n=this[t],i=1,o=0;++o=i&&(n-=Math.pow(2,8*e)),n},e.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},e.prototype.readInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},e.prototype.readInt16LE=function(t,e){t>>>=0,e||P(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt16BE=function(t,e){t>>>=0,e||P(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},e.prototype.readInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},e.prototype.readFloatLE=function(t,e){return t>>>=0,e||P(t,4,this.length),V.read(this,t,!0,23,4)},e.prototype.readFloatBE=function(t,e){return t>>>=0,e||P(t,4,this.length),V.read(this,t,!1,23,4)},e.prototype.readDoubleLE=function(t,e){return t>>>=0,e||P(t,8,this.length),V.read(this,t,!0,52,8)},e.prototype.readDoubleBE=function(t,e){return t>>>=0,e||P(t,8,this.length),V.read(this,t,!1,52,8)},e.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){R(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,!n){R(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},e.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,1,255,0),this[e]=255&t,e+1},e.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},e.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);R(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+r},e.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);R(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},e.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},e.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},e.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeFloatLE=function(t,e,r){return j(this,t,e,!0,r)},e.prototype.writeFloatBE=function(t,e,r){return j(this,t,e,!1,r)},e.prototype.writeDoubleLE=function(t,e,r){return N(this,t,e,!0,r)},e.prototype.writeDoubleBE=function(t,e,r){return N(this,t,e,!1,r)},e.prototype.copy=function(t,r,n,i){if(!e.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r=0;--a)t[a+r]=this[a+n];else Uint8Array.prototype.set.call(t,this.subarray(n,i),r);return o},e.prototype.fill=function(t,r,n,i){if("string"==typeof t){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!e.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){var o=t.charCodeAt(0);("utf8"===i&&o<128||"latin1"===i)&&(t=o)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(r<0||this.length>>=0,n=void 0===n?this.length:n>>>0,t||(t=0);var a;if("number"==typeof t)for(a=r;as||l.push({node:d,dist:m})}for(;l.length&&!l.peek().node.children;){var g=l.pop(),y=g.node,b=p(y,e,r),w=p(y,n,i);if(g.dist=e.minX&&t[0]<=e.maxX&&t[1]>=e.minY&&t[1]<=e.maxY}function u(t,e,r){for(var n=Math.min(t[0],e[0]),i=Math.min(t[1],e[1]),o=Math.max(t[0],e[0]),a=Math.max(t[1],e[1]),s=r.search({minX:n,minY:i,maxX:o,maxY:a}),u=0;u0!=w(t,e,n)>0&&w(r,n,t)>0!=w(r,n,e)>0}function l(t){var e=t.p,r=t.next.p;return t.minX=Math.min(e[0],r[0]),t.minY=Math.min(e[1],r[1]),t.maxX=Math.max(e[0],r[0]),t.maxY=Math.max(e[1],r[1]),t}function f(t){for(var e=t[0],r=t[0],n=t[0],i=t[0],o=0;on[0]&&(n=a),a[1]i[1]&&(i=a)}var s=[e,r,n,i],u=s.slice();for(o=0;o1?(n=r[0],i=r[1]):s>0&&(n+=o*s,i+=a*s)}return o=t[0]-n,a=t[1]-i,o*o+a*a}function m(t,e,r,n,i,o,a,s){var u,h,l,f,c=r-t,d=n-e,p=a-i,m=s-o,g=t-i,y=e-o,v=c*c+d*d,b=c*p+d*m,w=p*p+m*m,_=c*g+d*y,x=p*g+m*y,M=v*w-b*b,E=M,C=M;0===M?(h=0,E=1,f=x,C=w):(h=b*x-w*_,f=v*x-b*_,h<0?(h=0,f=x,C=w):h>E&&(h=E,f=x+b,C=w)),f<0?(f=0,-_<0?h=0:-_>v?h=E:(h=-_,E=v)):f>C&&(f=C,-_+b<0?h=0:-_+b>v?h=E:(h=-_+b,E=v)),u=0===h?0:h/E,l=0===f?0:f/C;var S=(1-u)*t+u*r,O=(1-u)*e+u*n,A=(1-l)*i+l*a,I=(1-l)*o+l*s,k=A-S,T=I-O;return k*k+T*T}var g=t("rbush"),y=t("monotone-convex-hull-2d"),v=t("tinyqueue"),b=t("point-in-polygon"),w=t("robust-orientation")[3];e.exports=n,e.exports.default=n},{"monotone-convex-hull-2d":61,"point-in-polygon":80,rbush:84,"robust-orientation":85,tinyqueue:97}],32:[function(t,e,r){r.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,l=-7,f=r?i-1:0,c=r?-1:1,d=t[e+f];for(f+=c,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+t[e+f],f+=c,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+t[e+f],f+=c,l-=8);if(0===o)o=1-h;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=h}return(d?-1:1)*a*Math.pow(2,o-n)},r.write=function(t,e,r,n,i,o){var a,s,u,h=8*o-i-1,l=(1<>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),e+=a+f>=1?c/u:c*Math.pow(2,1-f),e*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;t[r+d]=255&a,d+=p,a/=256,h-=8);t[r+d-p]|=128*m}},{}],33:[function(t,e,r){(function(t){"use strict";function r(){l=!0;for(var t,e,r=f.length;r;){for(e=f,f=[],t=-1;++t=0;--o)if(this.data[o]===e&&this.data[o+1]===r&&this.data[o+2]===n&&this.data[o+3]===i)return o-this.zero;return-1},n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"./dataReader":39}],35:[function(t,e,r){"use strict";var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(t,e){for(var r,i,o,a,s,u,h,l="",f=0;f>2,s=(3&r)<<4|i>>4,u=(15&i)<<2|o>>6,h=63&o,isNaN(i)?u=h=64:isNaN(o)&&(h=64),l=l+n.charAt(a)+n.charAt(s)+n.charAt(u)+n.charAt(h);return l},r.decode=function(t,e){var r,i,o,a,s,u,h,l="",f=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");f>4,i=(15&s)<<4|u>>2,o=(3&u)<<6|h,l+=String.fromCharCode(r),64!=u&&(l+=String.fromCharCode(i)),64!=h&&(l+=String.fromCharCode(o));return l}},{}],36:[function(t,e,r){"use strict";function n(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}n.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},e.exports=n},{}],37:[function(t,e,r){"use strict";r.STORE={magic:"\0\0",compress:function(t,e){return t},uncompress:function(t){return t},compressInputType:null,uncompressInputType:null},r.DEFLATE=t("./flate")},{"./flate":42}],38:[function(t,e,r){"use strict";var n=t("./utils"),i=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];e.exports=function(t,e){if(void 0===t||!t.length)return 0;var r="string"!==n.getTypeOf(t);void 0===e&&(e=0);var o=0,a=0,s=0;e^=-1;for(var u=0,h=t.length;u>>8^o;return-1^e}},{"./utils":55}],39:[function(t,e,r){"use strict";function n(t){this.data=null,this.length=0,this.index=0,this.zero=0}var i=t("./utils");n.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1)}},e.exports=n},{"./utils":55}],40:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!1,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],41:[function(t,e,r){"use strict";var n=t("./utils");r.string2binary=function(t){return n.string2binary(t)},r.string2Uint8Array=function(t){return n.transformTo("uint8array",t)},r.uint8Array2String=function(t){return n.transformTo("string",t)},r.string2Blob=function(t){var e=n.transformTo("arraybuffer",t);return n.arrayBuffer2Blob(e)},r.arrayBuffer2Blob=function(t){return n.arrayBuffer2Blob(t)},r.transformTo=function(t,e){return n.transformTo(t,e)},r.getTypeOf=function(t){return n.getTypeOf(t)},r.checkSupport=function(t){return n.checkSupport(t)},r.MAX_VALUE_16BITS=n.MAX_VALUE_16BITS,r.MAX_VALUE_32BITS=n.MAX_VALUE_32BITS,r.pretty=function(t){return n.pretty(t)},r.findCompression=function(t){return n.findCompression(t)},r.isRegExp=function(t){return n.isRegExp(t)}},{"./utils":55}],42:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=t("pako");r.uncompressInputType=n?"uint8array":"array",r.compressInputType=n?"uint8array":"array",r.magic="\b\0",r.compress=function(t,e){return i.deflateRaw(t,{level:e.level||-1})},r.uncompress=function(t){return i.inflateRaw(t)}},{pako:62}],43:[function(t,e,r){"use strict";function n(t,e){if(!(this instanceof n))return new n(t,e);this.files={},this.comment=null,this.root="",t&&this.load(t,e),this.clone=function(){var t=new n;for(var e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t}}var i=t("./base64");n.prototype=t("./object"),n.prototype.load=t("./load"),n.support=t("./support"),n.defaults=t("./defaults"),n.utils=t("./deprecatedPublicUtils"),n.base64={encode:function(t){return i.encode(t)},decode:function(t){return i.decode(t)}},n.compressions=t("./compressions"),e.exports=n},{"./base64":35,"./compressions":37,"./defaults":40,"./deprecatedPublicUtils":41,"./load":44,"./object":47,"./support":51}],44:[function(t,e,r){"use strict";var n=t("./base64"),i=t("./utf8"),o=t("./utils"),a=t("./zipEntries");e.exports=function(t,e){var r,s,u,h;for(e=o.extend(e||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:i.utf8decode}),e.base64&&(t=n.decode(t)),s=new a(t,e),r=s.files,u=0;u>>=8;return n},w=function(t){return t=t||{},!0!==t.base64||null!==t.binary&&void 0!==t.binary||(t.binary=!0),t=i.extend(t,s),t.date=t.date||new Date,null!==t.compression&&(t.compression=t.compression.toUpperCase()),t},_=function(t,e,r){var n,o=i.getTypeOf(e);if(r=w(r),"string"==typeof r.unixPermissions&&(r.unixPermissions=parseInt(r.unixPermissions,8)),r.unixPermissions&&16384&r.unixPermissions&&(r.dir=!0),r.dosPermissions&&16&r.dosPermissions&&(r.dir=!0),r.dir&&(t=M(t)),r.createFolders&&(n=x(t))&&E.call(this,n,!0),r.dir||null===e||void 0===e)r.base64=!1,r.binary=!1,e=null,o=null;else if("string"===o)r.binary&&!r.base64&&!0!==r.optimizedBinaryString&&(e=i.string2binary(e));else{if(r.base64=!1,r.binary=!0,!(o||e instanceof l))throw new Error("The data of '"+t+"' is in an unsupported format !");"arraybuffer"===o&&(e=i.transformTo("uint8array",e))}var a=new v(t,e,r);return this.files[t]=a,a},x=function(t){"/"==t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return e>0?t.substring(0,e):""},M=function(t){return"/"!=t.slice(-1)&&(t+="/"),t},E=function(t,e){return e=void 0!==e&&e,t=M(t),this.files[t]||_.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]},C=function(t,e,r){var n,a=new l;return t._data instanceof l?(a.uncompressedSize=t._data.uncompressedSize,a.crc32=t._data.crc32,0===a.uncompressedSize||t.dir?(e=h.STORE,a.compressedContent="",a.crc32=0):t._data.compressionMethod===e.magic?a.compressedContent=t._data.getCompressedContent():(n=t._data.getContent(),a.compressedContent=e.compress(i.transformTo(e.compressInputType,n),r))):(n=g(t),n&&0!==n.length&&!t.dir||(e=h.STORE,n=""),a.uncompressedSize=n.length,a.crc32=o(n),a.compressedContent=e.compress(i.transformTo(e.compressInputType,n),r)),a.compressedSize=a.compressedContent.length,a.compressionMethod=e.magic,a},S=function(t,e){var r=t;return t||(r=e?16893:33204),(65535&r)<<16},O=function(t,e){return 63&(t||0)},A=function(t,e,r,n,s,u){var h,l,f,d,p=(r.compressedContent,u!==c.utf8encode),m=i.transformTo("string",u(e.name)),g=i.transformTo("string",c.utf8encode(e.name)),y=e.comment||"",v=i.transformTo("string",u(y)),w=i.transformTo("string",c.utf8encode(y)),_=g.length!==e.name.length,x=w.length!==y.length,M=e.options,E="",C="",A="";f=e._initialMetadata.dir!==e.dir?e.dir:M.dir,d=e._initialMetadata.date!==e.date?e.date:M.date;var I=0,k=0;f&&(I|=16),"UNIX"===s?(k=798,I|=S(e.unixPermissions,f)):(k=20,I|=O(e.dosPermissions)),h=d.getHours(),h<<=6,h|=d.getMinutes(),h<<=5,h|=d.getSeconds()/2,l=d.getFullYear()-1980,l<<=4,l|=d.getMonth()+1,l<<=5,l|=d.getDate(),_&&(C=b(1,1)+b(o(m),4)+g,E+="up"+b(C.length,2)+C),x&&(A=b(1,1)+b(this.crc32(v),4)+w,E+="uc"+b(A.length,2)+A);var T="";return T+="\n\0",T+=p||!_&&!x?"\0\0":"\0\b",T+=r.compressionMethod,T+=b(h,2),T+=b(l,2),T+=b(r.crc32,4),T+=b(r.compressedSize,4),T+=b(r.uncompressedSize,4),T+=b(m.length,2),T+=b(E.length,2),{fileRecord:a.LOCAL_FILE_HEADER+T+m+E,dirRecord:a.CENTRAL_FILE_HEADER+b(k,2)+T+b(v.length,2)+"\0\0\0\0"+b(I,4)+b(n,4)+m+E+v,compressedObject:r}},I={load:function(t,e){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(t){var e,r,n,o,a=[];for(e in this.files)this.files.hasOwnProperty(e)&&(n=this.files[e],o=new v(n.name,n._data,i.extend(n.options)),r=e.slice(this.root.length,e.length),e.slice(0,this.root.length)===this.root&&t(r,o)&&a.push(o));return a},file:function(t,e,r){if(1===arguments.length){if(i.isRegExp(t)){var n=t;return this.filter(function(t,e){return!e.dir&&n.test(t)})}return this.filter(function(e,r){ return!r.dir&&e===t})[0]||null}return t=this.root+t,_.call(this,t,e,r),this},folder:function(t){if(!t)return this;if(i.isRegExp(t))return this.filter(function(e,r){return r.dir&&t.test(e)});var e=this.root+t,r=E.call(this,e),n=this.clone();return n.root=r.name,n},remove:function(t){t=this.root+t;var e=this.files[t];if(e||("/"!=t.slice(-1)&&(t+="/"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var r=this.filter(function(e,r){return r.name.slice(0,t.length)===t}),n=0;n=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;a[254]=a[254]=1;var u=function(t){var e,r,n,o,a,s=t.length,u=0;for(o=0;o>>6,e[a++]=128|63&r):r<65536?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|63&r):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|63&r);return e},h=function(t,e){var r;for(e=e||t.length,e>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+a[t[r]]>e?r:e},l=function(t){var e,r,i,o,s=t.length,u=new Array(2*s);for(r=0,e=0;e4)u[r++]=65533,e+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&e1?u[r++]=65533:i<65536?u[r++]=i:(i-=65536,u[r++]=55296|i>>10&1023,u[r++]=56320|1023&i)}return u.length!==r&&(u.subarray?u=u.subarray(0,r):u.length=r),n.applyFromCharCode(u)};r.utf8encode=function(t){return i.nodebuffer?o(t,"utf-8"):u(t)},r.utf8decode=function(t){if(i.nodebuffer)return n.transformTo("nodebuffer",t).toString("utf-8");t=n.transformTo(i.uint8array?"uint8array":"array",t);for(var e=[],r=0,o=t.length;r1;)try{"array"===o||"nodebuffer"===o?n.push(String.fromCharCode.apply(null,t.slice(a,Math.min(a+e,i)))):n.push(String.fromCharCode.apply(null,t.subarray(a,Math.min(a+e,i)))),a+=e}catch(t){e=Math.floor(e/2)}return n.join("")}function a(t,e){for(var r=0;r1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t0)this.isSignature(e,h.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(t){var e=u.getTypeOf(t);if(u.checkSupport(e),"string"!==e||f.uint8array)if("nodebuffer"===e)this.reader=new o(t);else if(f.uint8array)this.reader=new a(u.transformTo("uint8array",t));else{if(!f.array)throw new Error("Unexpected error: unsupported type '"+e+"'");this.reader=new s(u.transformTo("array",t))}else this.reader=new i(t,this.loadOptions.optimizedBinaryString)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=n},{"./arrayReader":34,"./nodeBufferReader":46,"./object":47,"./signature":48,"./stringReader":49,"./support":51,"./uint8ArrayReader":52,"./utils":55,"./zipEntry":57}],57:[function(t,e,r){"use strict";function n(t,e){this.options=t,this.loadOptions=e}var i=t("./stringReader"),o=t("./utils"),a=t("./compressedObject"),s=t("./object"),u=t("./support");n.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},prepareCompressedContent:function(t,e,r){return function(){var n=t.index;t.setIndex(e);var i=t.readData(r);return t.setIndex(n),i}},prepareContent:function(t,e,r,n,i){return function(){var t=o.transformTo(n.uncompressInputType,this.getCompressedContent()),e=n.uncompress(t);if(e.length!==i)throw new Error("Bug : uncompressed data size mismatch");return e}},readLocalPart:function(t){var e,r;if(t.skip(22),this.fileNameLength=t.readInt(2),r=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(r),-1==this.compressedSize||-1==this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize == -1 || uncompressedSize == -1)");if(null===(e=o.findCompression(this.compressionMethod)))throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");if(this.decompressed=new a,this.decompressed.compressedSize=this.compressedSize,this.decompressed.uncompressedSize=this.uncompressedSize,this.decompressed.crc32=this.crc32,this.decompressed.compressionMethod=this.compressionMethod,this.decompressed.getCompressedContent=this.prepareCompressedContent(t,t.index,this.compressedSize,e),this.decompressed.getContent=this.prepareContent(t,t.index,this.compressedSize,e,this.uncompressedSize),this.loadOptions.checkCRC32&&(this.decompressed=o.transformTo("string",this.decompressed.getContent()),s.crc32(this.decompressed)!==this.crc32))throw new Error("Corrupted zip : CRC32 mismatch")},readCentralPart:function(t){if(this.versionMadeBy=t.readInt(2),this.versionNeeded=t.readInt(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4),this.fileNameLength=t.readInt(2),this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");this.fileName=t.readData(this.fileNameLength),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===t&&(this.dosPermissions=63&this.externalFileAttributes),3===t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=new i(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,r,n,i=t.index;for(this.extraFields=this.extraFields||{};t.indexe.maxAge:t._maxAge&&r>t._maxAge}function s(t,e){h(t,e),e.lu=t._mru++,t._lruList[e.lu]=e}function u(t){for(;t._lrut._max;)l(t,t._lruList[t._lru])}function h(t,e){for(delete t._lruList[e.lu];t._lruthis._max&&u(this)},get:function(){return this._max},enumerable:!0}),Object.defineProperty(i.prototype,"lengthCalculator",{set:function(t){if("function"!=typeof t){this._lengthCalculator=r,this._length=this._itemCount;for(var e in this._cache)this._cache[e].length=1}else{this._lengthCalculator=t,this._length=0;for(var e in this._cache)this._cache[e].length=this._lengthCalculator(this._cache[e].value),this._length+=this._cache[e].length}this._length>this._max&&u(this)},get:function(){return this._lengthCalculator},enumerable:!0}),Object.defineProperty(i.prototype,"length",{get:function(){return this._length},enumerable:!0}),Object.defineProperty(i.prototype,"itemCount",{get:function(){return this._itemCount},enumerable:!0}),i.prototype.forEach=function(t,e){e=e||this;for(var r=0,n=this._itemCount,i=this._mru-1;i>=0&&r=0&&e=0&&e=0&&ethis._max?(l(this,this._cache[e]),!1):(this._dispose&&this._dispose(e,this._cache[e].value),this._cache[e].now=o,this._cache[e].maxAge=i,this._cache[e].value=r,this._length+=a-this._cache[e].length,this._cache[e].length=a,this.get(e),this._length>this._max&&u(this),!0);var s=new f(e,r,this._mru++,a,o,i);return s.length>this._max?(this._dispose&&this._dispose(e,r),!1):(this._length+=s.length,this._lruList[s.lu]=this._cache[e]=s,this._itemCount++,this._length>this._max&&u(this),!0)},i.prototype.has=function(e){return n(e),!!t(this._cache,e)&&!a(this,this._cache[e])},i.prototype.get=function(t){return n(t),o(this,t,!0)},i.prototype.peek=function(t){return n(t),o(this,t,!1)},i.prototype.pop=function(){var t=this._lruList[this._lru];return l(this,t),t||null},i.prototype.del=function(t){n(t),l(this,this._cache[t])},i.prototype.load=function(t){this.reset();for(var e=Date.now(),r=t.length-1;r>=0;r--){var i=t[r];n(i.k);var o=i.e||0;if(0===o)this.set(i.k,i.v);else{var a=o-e;a>0&&this.set(i.k,i.v,a)}}}}()},{}],60:[function(t,e,r){var n=function(t){void 0==t&&(t=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,t.constructor==Array?this.init_by_array(t,t.length):this.init_seed(t)};n.prototype.init_seed=function(t){for(this.mt[0]=t>>>0,this.mti=1;this.mti>>30;this.mt[this.mti]=(1812433253*((4294901760&t)>>>16)<<16)+1812433253*(65535&t)+this.mti,this.mt[this.mti]>>>=0}},n.prototype.init_by_array=function(t,e){var r,n,i;for(this.init_seed(19650218),r=1,n=0,i=this.N>e?this.N:e;i;i--){var o=this.mt[r-1]^this.mt[r-1]>>>30;this.mt[r]=(this.mt[r]^(1664525*((4294901760&o)>>>16)<<16)+1664525*(65535&o))+t[n]+n,this.mt[r]>>>=0,r++,n++,r>=this.N&&(this.mt[0]=this.mt[this.N-1],r=1),n>=e&&(n=0)}for(i=this.N-1;i;i--){var o=this.mt[r-1]^this.mt[r-1]>>>30;this.mt[r]=(this.mt[r]^(1566083941*((4294901760&o)>>>16)<<16)+1566083941*(65535&o))-r,this.mt[r]>>>=0,r++,r>=this.N&&(this.mt[0]=this.mt[this.N-1],r=1)}this.mt[0]=2147483648},n.prototype.random_int=function(){var t,e=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var r;for(this.mti==this.N+1&&this.init_seed(5489),r=0;r>>1^e[1&t];for(;r>>1^e[1&t];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^e[1&t],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,(t^=t>>>18)>>>0},n.prototype.random_int31=function(){return this.random_int()>>>1},n.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},n.prototype.random=function(){return this.random_int()*(1/4294967296)},n.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},n.prototype.random_long=function(){return(67108864*(this.random_int()>>>5)+(this.random_int()>>>6))*(1/9007199254740992)},e.exports=n},{}],61:[function(t,e,r){"use strict";function n(t){var e=t.length;if(e<3){for(var r=new Array(e),n=0;n1&&i(t[a[l-2]],t[a[l-1]],h)<=0;)l-=1,a.pop();for(a.push(u),l=s.length;l>1&&i(t[s[l-2]],t[s[l-1]],h)>=0;)l-=1,s.pop();s.push(u)}for(var r=new Array(s.length+a.length-2),f=0,n=0,c=a.length;n0;--d)r[f++]=s[d];return r}e.exports=n;var i=t("robust-orientation")[3]},{"robust-orientation":85}],62:[function(t,e,r){"use strict";var n=t("./lib/utils/common").assign,i=t("./lib/deflate"),o=t("./lib/inflate"),a=t("./lib/zlib/constants"),s={};n(s,i,o,a),e.exports=s},{"./lib/deflate":63,"./lib/inflate":64,"./lib/utils/common":65,"./lib/zlib/constants":68}],63:[function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);this.options=u.assign({level:p,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:m,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var r=s.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==d)throw new Error(l[r]);if(e.header&&s.deflateSetHeader(this.strm,e.header),e.dictionary){var i;if(i="string"==typeof e.dictionary?h.string2buf(e.dictionary):"[object ArrayBuffer]"===c.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(r=s.deflateSetDictionary(this.strm,i))!==d)throw new Error(l[r]);this._dict_set=!0}}function i(t,e){var r=new n(e);if(r.push(t,!0),r.err)throw r.msg||l[r.err];return r.result}function o(t,e){return e=e||{},e.raw=!0,i(t,e)}function a(t,e){return e=e||{},e.gzip=!0,i(t,e)}var s=t("./zlib/deflate"),u=t("./utils/common"),h=t("./utils/strings"),l=t("./zlib/messages"),f=t("./zlib/zstream"),c=Object.prototype.toString,d=0,p=-1,m=0,g=8;n.prototype.push=function(t,e){var r,n,i=this.strm,o=this.options.chunkSize;if(this.ended)return!1;n=e===~~e?e:!0===e?4:0,"string"==typeof t?i.input=h.string2buf(t):"[object ArrayBuffer]"===c.call(t)?i.input=new Uint8Array(t):i.input=t,i.next_in=0,i.avail_in=i.input.length;do{ if(0===i.avail_out&&(i.output=new u.Buf8(o),i.next_out=0,i.avail_out=o),1!==(r=s.deflate(i,n))&&r!==d)return this.onEnd(r),this.ended=!0,!1;0!==i.avail_out&&(0!==i.avail_in||4!==n&&2!==n)||("string"===this.options.to?this.onData(h.buf2binstring(u.shrinkBuf(i.output,i.next_out))):this.onData(u.shrinkBuf(i.output,i.next_out)))}while((i.avail_in>0||0===i.avail_out)&&1!==r);return 4===n?(r=s.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===d):2!==n||(this.onEnd(d),i.avail_out=0,!0)},n.prototype.onData=function(t){this.chunks.push(t)},n.prototype.onEnd=function(t){t===d&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=u.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Deflate=n,r.deflate=i,r.deflateRaw=o,r.gzip=a},{"./utils/common":65,"./utils/strings":66,"./zlib/deflate":70,"./zlib/messages":75,"./zlib/zstream":77}],64:[function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var r=a.inflateInit2(this.strm,e.windowBits);if(r!==h.Z_OK)throw new Error(l[r]);if(this.header=new c,a.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=u.string2buf(e.dictionary):"[object ArrayBuffer]"===d.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=a.inflateSetDictionary(this.strm,e.dictionary))!==h.Z_OK))throw new Error(l[r])}function i(t,e){var r=new n(e);if(r.push(t,!0),r.err)throw r.msg||l[r.err];return r.result}function o(t,e){return e=e||{},e.raw=!0,i(t,e)}var a=t("./zlib/inflate"),s=t("./utils/common"),u=t("./utils/strings"),h=t("./zlib/constants"),l=t("./zlib/messages"),f=t("./zlib/zstream"),c=t("./zlib/gzheader"),d=Object.prototype.toString;n.prototype.push=function(t,e){var r,n,i,o,l,f=this.strm,c=this.options.chunkSize,p=this.options.dictionary,m=!1;if(this.ended)return!1;n=e===~~e?e:!0===e?h.Z_FINISH:h.Z_NO_FLUSH,"string"==typeof t?f.input=u.binstring2buf(t):"[object ArrayBuffer]"===d.call(t)?f.input=new Uint8Array(t):f.input=t,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new s.Buf8(c),f.next_out=0,f.avail_out=c),r=a.inflate(f,h.Z_NO_FLUSH),r===h.Z_NEED_DICT&&p&&(r=a.inflateSetDictionary(this.strm,p)),r===h.Z_BUF_ERROR&&!0===m&&(r=h.Z_OK,m=!1),r!==h.Z_STREAM_END&&r!==h.Z_OK)return this.onEnd(r),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&r!==h.Z_STREAM_END&&(0!==f.avail_in||n!==h.Z_FINISH&&n!==h.Z_SYNC_FLUSH)||("string"===this.options.to?(i=u.utf8border(f.output,f.next_out),o=f.next_out-i,l=u.buf2string(f.output,i),f.next_out=o,f.avail_out=c-o,o&&s.arraySet(f.output,f.output,i,o,0),this.onData(l)):this.onData(s.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((f.avail_in>0||0===f.avail_out)&&r!==h.Z_STREAM_END);return r===h.Z_STREAM_END&&(n=h.Z_FINISH),n===h.Z_FINISH?(r=a.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===h.Z_OK):n!==h.Z_SYNC_FLUSH||(this.onEnd(h.Z_OK),f.avail_out=0,!0)},n.prototype.onData=function(t){this.chunks.push(t)},n.prototype.onEnd=function(t){t===h.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Inflate=n,r.inflate=i,r.inflateRaw=o,r.ungzip=i},{"./utils/common":65,"./utils/strings":66,"./zlib/constants":68,"./zlib/gzheader":71,"./zlib/inflate":73,"./zlib/messages":75,"./zlib/zstream":77}],65:[function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(t[i]=r[i])}}return t},r.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var o={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)return void t.set(e.subarray(r,r+n),i);for(var o=0;o=252?6:u>=248?5:u>=240?4:u>=224?3:u>=192?2:1;s[254]=s[254]=1,r.string2buf=function(t){var e,r,n,o,a,s=t.length,u=0;for(o=0;o>>6,e[a++]=128|63&r):r<65536?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|63&r):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|63&r);return e},r.buf2binstring=function(t){return n(t,t.length)},r.binstring2buf=function(t){for(var e=new i.Buf8(t.length),r=0,n=e.length;r4)h[i++]=65533,r+=a-1;else{for(o&=2===a?31:3===a?15:7;a>1&&r1?h[i++]=65533:o<65536?h[i++]=o:(o-=65536,h[i++]=55296|o>>10&1023,h[i++]=56320|1023&o)}return n(h,i)},r.utf8border=function(t,e){var r;for(e=e||t.length,e>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+s[t[r]]>e?r:e}},{"./common":65}],67:[function(t,e,r){"use strict";function n(t,e,r,n){for(var i=65535&t|0,o=t>>>16&65535|0,a=0;0!==r;){a=r>2e3?2e3:r,r-=a;do{i=i+e[n++]|0,o=o+i|0}while(--a);i%=65521,o%=65521}return i|o<<16|0}e.exports=n},{}],68:[function(t,e,r){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],69:[function(t,e,r){"use strict";function n(t,e,r,n){var o=i,a=n+r;t^=-1;for(var s=n;s>>8^o[255&(t^e[s])];return-1^t}var i=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=n},{}],70:[function(t,e,r){"use strict";function n(t,e){return t.msg=L[e],e}function i(t){return(t<<1)-(t>4?9:0)}function o(t){for(var e=t.length;--e>=0;)t[e]=0}function a(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(k.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function s(t,e){T._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,a(t.strm)}function u(t,e){t.pending_buf[t.pending++]=e}function h(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function l(t,e,r,n){var i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,k.arraySet(e,t.input,t.next_in,i,r),1===t.state.wrap?t.adler=P(t.adler,e,i,r):2===t.state.wrap&&(t.adler=R(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)}function f(t,e){var r,n,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match,u=t.strstart>t.w_size-ht?t.strstart-(t.w_size-ht):0,h=t.window,l=t.w_mask,f=t.prev,c=t.strstart+ut,d=h[o+a-1],p=h[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(r=e,h[r+a]===p&&h[r+a-1]===d&&h[r]===h[o]&&h[++r]===h[o+1]){o+=2,r++;do{}while(h[++o]===h[++r]&&h[++o]===h[++r]&&h[++o]===h[++r]&&h[++o]===h[++r]&&h[++o]===h[++r]&&h[++o]===h[++r]&&h[++o]===h[++r]&&h[++o]===h[++r]&&oa){if(t.match_start=e,a=n,n>=s)break;d=h[o+a-1],p=h[o+a]}}}while((e=f[e&l])>u&&0!=--i);return a<=t.lookahead?a:t.lookahead}function c(t){var e,r,n,i,o,a=t.w_size;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=a+(a-ht)){k.arraySet(t.window,t.window,a,a,0),t.match_start-=a,t.strstart-=a,t.block_start-=a,r=t.hash_size,e=r;do{n=t.head[--e],t.head[e]=n>=a?n-a:0}while(--r);r=a,e=r;do{n=t.prev[--e],t.prev[e]=n>=a?n-a:0}while(--r);i+=a}if(0===t.strm.avail_in)break;if(r=l(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=r,t.lookahead+t.insert>=st)for(o=t.strstart-t.insert,t.ins_h=t.window[o],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(c(t),0===t.lookahead&&e===j)return vt;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,s(t,!1),0===t.strm.avail_out))return vt;if(t.strstart-t.block_start>=t.w_size-ht&&(s(t,!1),0===t.strm.avail_out))return vt}return t.insert=0,e===B?(s(t,!0),0===t.strm.avail_out?wt:_t):(t.strstart>t.block_start&&(s(t,!1),t.strm.avail_out),vt)}function p(t,e){for(var r,n;;){if(t.lookahead=st&&(t.ins_h=(t.ins_h<=st)if(n=T._tr_tally(t,t.strstart-t.match_start,t.match_length-st),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=st){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=st&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=st-1)),t.prev_length>=st&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-st,n=T._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-st),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<=st&&t.strstart>0&&(i=t.strstart-1,(n=a[i])===a[++i]&&n===a[++i]&&n===a[++i])){o=t.strstart+ut;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&it.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=st?(r=T._tr_tally(t,1,t.match_length-st),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=T._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(s(t,!1),0===t.strm.avail_out))return vt}return t.insert=0,e===B?(s(t,!0),0===t.strm.avail_out?wt:_t):t.last_lit&&(s(t,!1),0===t.strm.avail_out)?vt:bt}function y(t,e){for(var r;;){if(0===t.lookahead&&(c(t),0===t.lookahead)){if(e===j)return vt;break}if(t.match_length=0,r=T._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(s(t,!1),0===t.strm.avail_out))return vt}return t.insert=0,e===B?(s(t,!0),0===t.strm.avail_out?wt:_t):t.last_lit&&(s(t,!1),0===t.strm.avail_out)?vt:bt}function v(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}function b(t){t.window_size=2*t.w_size,o(t.head),t.max_lazy_match=I[t.level].max_lazy,t.good_match=I[t.level].good_length,t.nice_match=I[t.level].nice_length,t.max_chain_length=I[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=st-1,t.match_available=0,t.ins_h=0}function w(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Q,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new k.Buf16(2*ot),this.dyn_dtree=new k.Buf16(2*(2*nt+1)),this.bl_tree=new k.Buf16(2*(2*it+1)),o(this.dyn_ltree),o(this.dyn_dtree),o(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new k.Buf16(at+1),this.heap=new k.Buf16(2*rt+1),o(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new k.Buf16(2*rt+1),o(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function _(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=J,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?ft:gt,t.adler=2===e.wrap?0:1,e.last_flush=j,T._tr_init(e),F):n(t,U)}function x(t){var e=_(t);return e===F&&b(t.state),e}function M(t,e){return t&&t.state?2!==t.state.wrap?U:(t.state.gzhead=e,F):U}function E(t,e,r,i,o,a){if(!t)return U;var s=1;if(e===Y&&(e=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),o<1||o>$||r!==Q||i<8||i>15||e<0||e>9||a<0||a>Z)return n(t,U);8===i&&(i=9);var u=new w;return t.state=u,u.strm=t,u.wrap=s,u.gzhead=null,u.w_bits=i,u.w_size=1<z||e<0)return t?n(t,U):U;if(s=t.state,!t.output||!t.input&&0!==t.avail_in||s.status===yt&&e!==B)return n(t,0===t.avail_out?W:U);if(s.strm=t,r=s.last_flush,s.last_flush=e,s.status===ft)if(2===s.wrap)t.adler=0,u(s,31),u(s,139),u(s,8),s.gzhead?(u(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),u(s,255&s.gzhead.time),u(s,s.gzhead.time>>8&255),u(s,s.gzhead.time>>16&255),u(s,s.gzhead.time>>24&255),u(s,9===s.level?2:s.strategy>=X||s.level<2?4:0),u(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(u(s,255&s.gzhead.extra.length),u(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(t.adler=R(t.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=ct):(u(s,0),u(s,0),u(s,0),u(s,0),u(s,0),u(s,9===s.level?2:s.strategy>=X||s.level<2?4:0),u(s,xt),s.status=gt);else{var c=Q+(s.w_bits-8<<4)<<8,d=-1;d=s.strategy>=X||s.level<2?0:s.level<6?1:6===s.level?2:3,c|=d<<6,0!==s.strstart&&(c|=lt),c+=31-c%31,s.status=gt,h(s,c),0!==s.strstart&&(h(s,t.adler>>>16),h(s,65535&t.adler)),t.adler=1}if(s.status===ct)if(s.gzhead.extra){for(l=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>l&&(t.adler=R(t.adler,s.pending_buf,s.pending-l,l)),a(t),l=s.pending,s.pending!==s.pending_buf_size));)u(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>l&&(t.adler=R(t.adler,s.pending_buf,s.pending-l,l)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=dt)}else s.status=dt;if(s.status===dt)if(s.gzhead.name){l=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>l&&(t.adler=R(t.adler,s.pending_buf,s.pending-l,l)),a(t),l=s.pending,s.pending===s.pending_buf_size)){f=1;break}f=s.gzindexl&&(t.adler=R(t.adler,s.pending_buf,s.pending-l,l)),0===f&&(s.gzindex=0,s.status=pt)}else s.status=pt;if(s.status===pt)if(s.gzhead.comment){l=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>l&&(t.adler=R(t.adler,s.pending_buf,s.pending-l,l)),a(t),l=s.pending,s.pending===s.pending_buf_size)){f=1;break}f=s.gzindexl&&(t.adler=R(t.adler,s.pending_buf,s.pending-l,l)),0===f&&(s.status=mt)}else s.status=mt;if(s.status===mt&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&a(t),s.pending+2<=s.pending_buf_size&&(u(s,255&t.adler),u(s,t.adler>>8&255),t.adler=0,s.status=gt)):s.status=gt),0!==s.pending){if(a(t),0===t.avail_out)return s.last_flush=-1,F}else if(0===t.avail_in&&i(e)<=i(r)&&e!==B)return n(t,W);if(s.status===yt&&0!==t.avail_in)return n(t,W);if(0!==t.avail_in||0!==s.lookahead||e!==j&&s.status!==yt){var p=s.strategy===X?y(s,e):s.strategy===H?g(s,e):I[s.level].func(s,e);if(p!==wt&&p!==_t||(s.status=yt),p===vt||p===wt)return 0===t.avail_out&&(s.last_flush=-1),F;if(p===bt&&(e===N?T._tr_align(s):e!==z&&(T._tr_stored_block(s,0,0,!1),e===q&&(o(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),a(t),0===t.avail_out))return s.last_flush=-1,F}return e!==B?F:s.wrap<=0?D:(2===s.wrap?(u(s,255&t.adler),u(s,t.adler>>8&255),u(s,t.adler>>16&255),u(s,t.adler>>24&255),u(s,255&t.total_in),u(s,t.total_in>>8&255),u(s,t.total_in>>16&255),u(s,t.total_in>>24&255)):(h(s,t.adler>>>16),h(s,65535&t.adler)),a(t),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?F:D)}function O(t){var e;return t&&t.state?(e=t.state.status)!==ft&&e!==ct&&e!==dt&&e!==pt&&e!==mt&&e!==gt&&e!==yt?n(t,U):(t.state=null,e===gt?n(t,G):F):U}function A(t,e){var r,n,i,a,s,u,h,l,f=e.length;if(!t||!t.state)return U;if(r=t.state,2===(a=r.wrap)||1===a&&r.status!==ft||r.lookahead)return U;for(1===a&&(t.adler=P(t.adler,e,f,0)),r.wrap=0,f>=r.w_size&&(0===a&&(o(r.head),r.strstart=0,r.block_start=0,r.insert=0),l=new k.Buf8(r.w_size),k.arraySet(l,e,f-r.w_size,r.w_size,0),e=l,f=r.w_size),s=t.avail_in,u=t.next_in,h=t.input,t.avail_in=f,t.next_in=0,t.input=e,c(r);r.lookahead>=st;){n=r.strstart,i=r.lookahead-(st-1);do{r.ins_h=(r.ins_h<>>24,d>>>=w,p-=w,0===(w=b>>>16&255))S[o++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=m[(65535&b)+(d&(1<>>=w,p-=w),p<15&&(d+=C[n++]<>>24,d>>>=w,p-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=g[(65535&b)+(d&(1<u){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=w,p-=w,w=o-a,x>w){if((w=x-w)>l&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(M=0,E=c,0===f){if(M+=h-w,w<_){_-=w;do{S[o++]=c[M++]}while(--w);M=o-x,E=S}}else if(f2;)S[o++]=E[M++],S[o++]=E[M++],S[o++]=E[M++],_-=3;_&&(S[o++]=E[M++],_>1&&(S[o++]=E[M++]))}else{M=o-x;do{S[o++]=S[M++],S[o++]=S[M++],S[o++]=S[M++],_-=3}while(_>2);_&&(S[o++]=S[M++],_>1&&(S[o++]=S[M++]))}break}}break}}while(n>3,n-=_,p-=_<<3,d&=(1<>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function i(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new v.Buf16(320),this.work=new v.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function o(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=q,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new v.Buf32(mt),e.distcode=e.distdyn=new v.Buf32(gt),e.sane=1,e.back=-1,I):P}function a(t){var e;return t&&t.state?(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,o(t)):P}function s(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?P:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,a(t))):P}function u(t,e){var r,n;return t?(n=new i,t.state=n,n.window=null,r=s(t,e),r!==I&&(t.state=null),r):P}function h(t){return u(t,yt)}function l(t){if(vt){var e;for(g=new v.Buf32(512),y=new v.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(x(E,t.lens,0,288,g,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;x(C,t.lens,0,32,y,0,t.work,{bits:5}),vt=!1}t.lencode=g,t.lenbits=9,t.distcode=y,t.distbits=5}function f(t,e,r,n){var i,o=t.state;return null===o.window&&(o.wsize=1<=o.wsize?(v.arraySet(o.window,e,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),v.arraySet(o.window,e,r-n,i,o.wnext),n-=i,n?(v.arraySet(o.window,e,r-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,r.check=w(r.check,Ot,2,0),c=0,d=0,r.mode=B;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=ct;break}if((15&c)!==N){t.msg="unknown compression method",r.mode=ct;break}if(c>>>=4,d-=4,xt=8+(15&c),0===r.wbits)r.wbits=xt;else if(xt>r.wbits){t.msg="invalid window size",r.mode=ct;break}r.dmax=1<>8&1),512&r.flags&&(Ot[0]=255&c,Ot[1]=c>>>8&255,r.check=w(r.check,Ot,2,0)),c=0,d=0,r.mode=z;case z:for(;d<32;){if(0===u)break t;u--,c+=i[a++]<>>8&255,Ot[2]=c>>>16&255,Ot[3]=c>>>24&255,r.check=w(r.check,Ot,4,0)),c=0,d=0,r.mode=F;case F:for(;d<16;){if(0===u)break t;u--,c+=i[a++]<>8),512&r.flags&&(Ot[0]=255&c,Ot[1]=c>>>8&255,r.check=w(r.check,Ot,2,0)),c=0,d=0,r.mode=D;case D:if(1024&r.flags){for(;d<16;){if(0===u)break t;u--,c+=i[a++]<>>8&255,r.check=w(r.check,Ot,2,0)),c=0,d=0}else r.head&&(r.head.extra=null);r.mode=U;case U:if(1024&r.flags&&(g=r.length,g>u&&(g=u),g&&(r.head&&(xt=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),v.arraySet(r.head.extra,i,a,g,xt)),512&r.flags&&(r.check=w(r.check,i,g,a)),u-=g,a+=g,r.length-=g),r.length))break t;r.length=0,r.mode=G;case G:if(2048&r.flags){if(0===u)break t;g=0;do{xt=i[a+g++],r.head&&xt&&r.length<65536&&(r.head.name+=String.fromCharCode(xt))}while(xt&&g>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=H;break;case V:for(;d<32;){if(0===u)break t;u--,c+=i[a++]<>>=7&d,d-=7&d,r.mode=ht;break}for(;d<3;){if(0===u)break t;u--,c+=i[a++]<>>=1,d-=1,3&c){case 0:r.mode=K;break;case 1:if(l(r),r.mode=rt,e===A){c>>>=2,d-=2;break t}break;case 2:r.mode=$;break;case 3:t.msg="invalid block type",r.mode=ct}c>>>=2,d-=2;break;case K:for(c>>>=7&d,d-=7&d;d<32;){if(0===u)break t;u--,c+=i[a++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=ct;break}if(r.length=65535&c,c=0,d=0,r.mode=J,e===A)break t;case J:r.mode=Q;case Q:if(g=r.length){if(g>u&&(g=u),g>h&&(g=h),0===g)break t;v.arraySet(o,i,a,g,s),u-=g,a+=g,h-=g,s+=g,r.length-=g;break}r.mode=H;break;case $:for(;d<14;){if(0===u)break t;u--,c+=i[a++]<>>=5,d-=5,r.ndist=1+(31&c),c>>>=5,d-=5,r.ncode=4+(15&c),c>>>=4,d-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=ct;break}r.have=0,r.mode=tt;case tt:for(;r.have>>=3,d-=3}for(;r.have<19;)r.lens[At[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,Et={bits:r.lenbits},Mt=x(M,r.lens,0,19,r.lencode,0,r.work,Et),r.lenbits=Et.bits,Mt){t.msg="invalid code lengths set",r.mode=ct;break}r.have=0,r.mode=et;case et:for(;r.have>>24,yt=St>>>16&255,vt=65535&St,!(gt<=d);){if(0===u)break t;u--,c+=i[a++]<>>=gt,d-=gt,r.lens[r.have++]=vt;else{if(16===vt){for(Ct=gt+2;d>>=gt,d-=gt,0===r.have){t.msg="invalid bit length repeat",r.mode=ct;break}xt=r.lens[r.have-1],g=3+(3&c),c>>>=2,d-=2}else if(17===vt){for(Ct=gt+3;d>>=gt,d-=gt,xt=0,g=3+(7&c),c>>>=3,d-=3}else{for(Ct=gt+7;d>>=gt,d-=gt,xt=0,g=11+(127&c),c>>>=7,d-=7}if(r.have+g>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=ct;break}for(;g--;)r.lens[r.have++]=xt}}if(r.mode===ct)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=ct;break}if(r.lenbits=9,Et={bits:r.lenbits},Mt=x(E,r.lens,0,r.nlen,r.lencode,0,r.work,Et),r.lenbits=Et.bits,Mt){t.msg="invalid literal/lengths set",r.mode=ct;break}if(r.distbits=6,r.distcode=r.distdyn,Et={bits:r.distbits},Mt=x(C,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,Et),r.distbits=Et.bits,Mt){t.msg="invalid distances set",r.mode=ct;break}if(r.mode=rt,e===A)break t;case rt:r.mode=nt;case nt:if(u>=6&&h>=258){t.next_out=s,t.avail_out=h,t.next_in=a,t.avail_in=u,r.hold=c,r.bits=d,_(t,m),s=t.next_out,o=t.output,h=t.avail_out,a=t.next_in,i=t.input,u=t.avail_in,c=r.hold,d=r.bits, r.mode===H&&(r.back=-1);break}for(r.back=0;St=r.lencode[c&(1<>>24,yt=St>>>16&255,vt=65535&St,!(gt<=d);){if(0===u)break t;u--,c+=i[a++]<>bt)],gt=St>>>24,yt=St>>>16&255,vt=65535&St,!(bt+gt<=d);){if(0===u)break t;u--,c+=i[a++]<>>=bt,d-=bt,r.back+=bt}if(c>>>=gt,d-=gt,r.back+=gt,r.length=vt,0===yt){r.mode=ut;break}if(32&yt){r.back=-1,r.mode=H;break}if(64&yt){t.msg="invalid literal/length code",r.mode=ct;break}r.extra=15&yt,r.mode=it;case it:if(r.extra){for(Ct=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=ot;case ot:for(;St=r.distcode[c&(1<>>24,yt=St>>>16&255,vt=65535&St,!(gt<=d);){if(0===u)break t;u--,c+=i[a++]<>bt)],gt=St>>>24,yt=St>>>16&255,vt=65535&St,!(bt+gt<=d);){if(0===u)break t;u--,c+=i[a++]<>>=bt,d-=bt,r.back+=bt}if(c>>>=gt,d-=gt,r.back+=gt,64&yt){t.msg="invalid distance code",r.mode=ct;break}r.offset=vt,r.extra=15&yt,r.mode=at;case at:if(r.extra){for(Ct=r.extra;d>>=r.extra,d-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=ct;break}r.mode=st;case st:if(0===h)break t;if(g=m-h,r.offset>g){if((g=r.offset-g)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=ct;break}g>r.wnext?(g-=r.wnext,y=r.wsize-g):y=r.wnext-g,g>r.length&&(g=r.length),mt=r.window}else mt=o,y=s-r.offset,g=r.length;g>h&&(g=h),h-=g,r.length-=g;do{o[s++]=mt[y++]}while(--g);0===r.length&&(r.mode=nt);break;case ut:if(0===h)break t;o[s++]=r.length,h--,r.mode=nt;break;case ht:if(r.wrap){for(;d<32;){if(0===u)break t;u--,c|=i[a++]<=1&&0===j[S];S--);if(O>S&&(O=S),0===S)return h[l++]=20971520,h[l++]=20971520,c.bits=1,0;for(C=1;C0&&(0===t||1!==S))return-1;for(N[1]=0,M=1;M<15;M++)N[M+1]=N[M]+j[M];for(E=0;E852||2===t&&T>592)return 1;for(;;){b=M-I,f[E]v?(w=q[B+f[E]],_=R[L+f[E]]):(w=96,_=0),d=1<>I)+p]=b<<24|w<<16|_|0}while(0!==p);for(d=1<>=1;if(0!==d?(P&=d-1,P+=d):P=0,E++,0==--j[M]){if(M===S)break;M=e[r+f[E]]}if(M>O&&(P&g)!==m){for(0===I&&(I=O),y+=C,A=M-I,k=1<852||2===t&&T>592)return 1;m=P&g,h[m]=O<<24|A<<16|y-l|0}}return 0!==P&&(h[y+P]=M-I<<24|64<<16|0),c.bits=O,0}},{"../utils/common":65}],75:[function(t,e,r){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],76:[function(t,e,r){"use strict";function n(t){for(var e=t.length;--e>=0;)t[e]=0}function i(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function o(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function a(t){return t<256?ot[t]:ot[256+(t>>>7)]}function s(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function u(t,e,r){t.bi_valid>X-r?(t.bi_buf|=e<>X-t.bi_valid,t.bi_valid+=r-X):(t.bi_buf|=e<>>=1,r<<=1}while(--e>0);return r>>>1}function f(t){16===t.bi_valid?(s(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}function c(t,e){var r,n,i,o,a,s,u=e.dyn_tree,h=e.max_code,l=e.stat_desc.static_tree,f=e.stat_desc.has_stree,c=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,p=e.stat_desc.max_length,m=0;for(o=0;o<=V;o++)t.bl_count[o]=0;for(u[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;rp&&(o=p,m++),u[2*n+1]=o,n>h||(t.bl_count[o]++,a=0,n>=d&&(a=c[n-d]),s=u[2*n],t.opt_len+=s*(o+a),f&&(t.static_len+=s*(l[2*n+1]+a)));if(0!==m){do{for(o=p-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[p]--,m-=2}while(m>0);for(o=p;0!==o;o--)for(n=t.bl_count[o];0!==n;)(i=t.heap[--r])>h||(u[2*i+1]!==o&&(t.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}function d(t,e,r){var n,i,o=new Array(V+1),a=0;for(n=1;n<=V;n++)o[n]=a=a+r[n-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=l(o[s]++,s))}}function p(){var t,e,r,n,o,a=new Array(V+1);for(r=0,n=0;n>=7;n8?s(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function y(t,e,r,n){g(t),n&&(s(t,r),s(t,~r)),P.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}function v(t,e,r,n){var i=2*e,o=2*r;return t[i]>1;r>=1;r--)b(t,o,r);i=u;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],b(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,o[2*i]=o[2*r]+o[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,o[2*r+1]=o[2*n+1]=i,t.heap[1]=i++,b(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],c(t,e),d(o,h,t.bl_count)}function x(t,e,r){var n,i,o=-1,a=e[1],s=0,u=7,h=4;for(0===a&&(u=138,h=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=e[2*(n+1)+1],++s=3&&0===t.bl_tree[2*rt[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}function C(t,e,r,n){var i;for(u(t,e-257,5),u(t,r-1,5),u(t,n-4,4),i=0;i>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return L;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return j;for(e=32;e0?(t.strm.data_type===N&&(t.strm.data_type=S(t)),_(t,t.l_desc),_(t,t.d_desc),a=E(t),i=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?A(t,e,r,n):t.strategy===R||o===i?(u(t,(B<<1)+(n?1:0),3),w(t,nt,it)):(u(t,(z<<1)+(n?1:0),3),C(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),w(t,t.dyn_ltree,t.dyn_dtree)),m(t),n&&g(t)}function T(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(at[r]+D+1)]++,t.dyn_dtree[2*a(e)]++),t.last_lit===t.lit_bufsize-1}var P=t("../utils/common"),R=4,L=0,j=1,N=2,q=0,B=1,z=2,F=29,D=256,U=D+1+F,G=30,W=19,Y=2*U+1,V=15,X=16,H=7,Z=256,K=16,J=17,Q=18,$=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],tt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],et=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],rt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],nt=new Array(2*(U+2));n(nt);var it=new Array(2*G);n(it);var ot=new Array(512);n(ot);var at=new Array(256);n(at);var st=new Array(F);n(st);var ut=new Array(G);n(ut);var ht,lt,ft,ct=!1;r._tr_init=O,r._tr_stored_block=A,r._tr_flush_block=k,r._tr_tally=T,r._tr_align=I},{"../utils/common":65}],77:[function(t,e,r){"use strict";function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=n},{}],78:[function(t,e,r){function n(t){var e=new o;return(e.write(t)+e.end()).replace(/\0/g,"").trim()}function i(t){function e(e){var r=new TextDecoder(t);return(r.decode(e,{stream:!0})+r.decode()).replace(/\0/g,"").trim()}if(!t)return n;try{new TextDecoder(t.trim())}catch(e){var r=a.exec(t);r&&(t="windows-"+r[1])}return e}t("text-encoding-polyfill");var o=t("string_decoder").StringDecoder;e.exports=i;var a=/^(?:ASNI\s)?(\d+)$/m},{string_decoder:94,"text-encoding-polyfill":95}],79:[function(t,e,r){function n(t){var e={};return e.lastUpdated=new Date(t.readUInt8(1)+1900,t.readUInt8(2),t.readUInt8(3)),e.records=t.readUInt32LE(4),e.headerLen=t.readUInt16LE(8),e.recLen=t.readUInt16LE(10),e}function i(t,e,r){for(var n=[],i=32;in!=l>n&&r<(h-s)*(n-u)/(l-u)+s&&(i=!i)}return i}},{}],81:[function(t,e,r){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(t){if(f===setTimeout)return setTimeout(t,0);if((f===n||!f)&&setTimeout)return f=setTimeout,setTimeout(t,0);try{return f(t,0)}catch(e){try{return f.call(null,t,0)}catch(e){return f.call(this,t,0)}}}function a(t){if(c===clearTimeout)return clearTimeout(t);if((c===i||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(t);try{return c(t)}catch(e){try{return c.call(null,t)}catch(e){return c.call(this,t)}}}function s(){g&&p&&(g=!1,p.length?m=p.concat(m):y=-1,m.length&&u())}function u(){if(!g){var t=o(s);g=!0;for(var e=m.length;e;){for(p=m,m=[];++y1)for(var r=1;r0?90:-90),t.lat_ts=t.lat1)}function u(t){var e=this;if(2===arguments.length){var r=arguments[1];"string"==typeof r?"+"===r.charAt(0)?u[t]=rr(arguments[1]):u[t]=lr(arguments[1]):u[t]=r}else if(1===arguments.length){if(Array.isArray(t))return t.map(function(t){Array.isArray(t)?u.apply(e,t):u(t)});if("string"==typeof t){if(t in u)return u[t]}else"EPSG"in t?u["EPSG:"+t.EPSG]=t:"ESRI"in t?u["ESRI:"+t.ESRI]=t:"IAU2000"in t?u["IAU2000:"+t.IAU2000]=t:console.log(t);return}}function h(t){return"string"==typeof t}function l(t){return t in u}function f(t){return fr.some(function(e){return t.indexOf(e)>-1})}function c(e){var r=t(e,"authority");if(r){var n=t(r,"epsg");return n&&cr.indexOf(n)>-1}}function d(e){var r=t(e,"extension");if(r)return t(r,"proj4")}function p(t){return"+"===t[0]}function m(t){if(!h(t))return t;if(l(t))return u[t];if(f(t)){var e=lr(t);if(c(e))return u["EPSG:3857"];var r=d(e);return r?rr(r):e}return p(t)?rr(t):void 0}function g(){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=pr(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function y(t){var e=t.x,r=t.y;if(r*Ze>90&&r*Ze<-90&&e*Ze>180&&e*Ze<-180)return null;var n,i;if(Math.abs(Math.abs(r)-Ge)<=Xe)return null;if(this.sphere)n=this.x0+this.a*this.k0*gr(e-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(Ke+.5*r));else{var o=Math.sin(r),a=yr(this.e,r,o);n=this.x0+this.a*this.k0*gr(e-this.long0),i=this.y0-this.a*this.k0*Math.log(a)}return t.x=n,t.y=i,t}function v(t){var e,r,n=t.x-this.x0,i=t.y-this.y0;if(this.sphere)r=Ge-2*Math.atan(Math.exp(-i/(this.a*this.k0)));else{var o=Math.exp(-i/(this.a*this.k0));if(-9999===(r=vr(this.e,o)))return null}return e=gr(this.long0+n/(this.a*this.k0)),t.x=e,t.y=r,t}function b(){}function w(t){return t}function _(t,e){var r=Cr.length;return t.names?(Cr[r]=t,t.names.forEach(function(t){Er[t.toLowerCase()]=r}),this):(console.log(e),!0)}function x(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==Er[e]&&Cr[Er[e]]?Cr[Er[e]]:void 0}function M(){Mr.forEach(_)}function E(t,e,r,n){var i=t*t,o=e*e,a=(i-o)/i,s=0;return n?(t*=1-a*(We+a*(Ye+a*Ve)),i=t*t,a=0):s=Math.sqrt(a),{es:a,e:s,ep2:(i-o)/o}}function C(e,r,n,i,o){if(!e){var a=t(Or,i);a||(a=Ar),e=a.a,r=a.b,n=a.rf}return n&&!r&&(r=(1-1/n)*e),(0===n||Math.abs(e-r)3&&(0===a.datum_params[3]&&0===a.datum_params[4]&&0===a.datum_params[5]&&0===a.datum_params[6]||(a.datum_type=ze,a.datum_params[3]*=Ue,a.datum_params[4]*=Ue,a.datum_params[5]*=Ue,a.datum_params[6]=a.datum_params[6]/1e6+1))),a.a=r,a.b=n,a.es=i,a.ep2=o,a}function O(e,r){if(!(this instanceof O))return new O(e);r=r||function(t){if(t)throw t};var n=m(e);if("object"!=typeof n)return void r(e);var i=O.projections.get(n.projName);if(!i)return void r(e);if(n.datumCode&&"none"!==n.datumCode){var o=t(Ir,n.datumCode);o&&(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";var a=C(n.a,n.b,n.rf,n.ellps,n.sphere),s=E(a.a,a.b,a.rf,n.R_A),u=n.datum||S(n.datumCode,n.datum_params,a.a,a.b,s.es,s.ep2);dr(this,n),dr(this,i),this.a=a.a,this.b=a.b,this.rf=a.rf,this.sphere=a.sphere,this.es=s.es,this.e=s.e,this.ep2=s.ep2,this.datum=u,this.init(),r(null,this)}function A(t,e){return t.datum_type===e.datum_type&&(!(t.a!==e.a||Math.abs(t.es-e.es)>5e-11)&&(t.datum_type===Be?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!==ze||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 I(t,e,r){var n,i,o,a,s=t.x,u=t.y,h=t.z?t.z:0;if(u<-Ge&&u>-1.001*Ge)u=-Ge;else if(u>Ge&&u<1.001*Ge)u=Ge;else{if(u<-Ge)return{x:-1/0,y:-1/0,z:t.z};if(u>Ge)return{x:1/0,y:1/0,z:t.z}}return s>Math.PI&&(s-=2*Math.PI),i=Math.sin(u),a=Math.cos(u),o=i*i,n=r/Math.sqrt(1-e*o),{x:(n+h)*a*Math.cos(s),y:(n+h)*a*Math.sin(s),z:(n*(1-e)+h)*i}}function k(t,e,r,n){var i,o,a,s,u,h,l,f,c,d,p,m,g,y,v,b,w=t.x,_=t.y,x=t.z?t.z:0;if(i=Math.sqrt(w*w+_*_),o=Math.sqrt(w*w+_*_+x*x),i/r<1e-12){if(y=0,o/r<1e-12)return v=Ge,b=-n,{x:t.x,y:t.y,z:t.z}}else y=Math.atan2(_,w);a=x/o,s=i/o,u=1/Math.sqrt(1-e*(2-e)*s*s),f=s*(1-e)*u,c=a*u,g=0;do{g++,l=r/Math.sqrt(1-e*c*c),b=i*f+x*c-l*(1-e*c*c),h=e*l/(l+b),u=1/Math.sqrt(1-h*(2-h)*s*s),d=s*(1-h)*u,p=a*u,m=p*f-d*c,f=d,c=p}while(m*m>1e-24&&g<30);return v=Math.atan(p/Math.abs(d)),{x:y,y:v,z:b}}function T(t,e,r){if(e===Be)return{x:t.x+r[0],y:t.y+r[1],z:t.z+r[2]};if(e===ze){var n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],u=r[5],h=r[6];return{x:h*(t.x-u*t.y+s*t.z)+n,y:h*(u*t.x+t.y-a*t.z)+i,z:h*(-s*t.x+a*t.y+t.z)+o}}}function P(t,e,r){if(e===Be)return{x:t.x-r[0],y:t.y-r[1],z:t.z-r[2]};if(e===ze){var n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],u=r[5],h=r[6],l=(t.x-n)/h,f=(t.y-i)/h,c=(t.z-o)/h;return{x:l+u*f-s*c,y:-u*l+f+a*c,z:s*l-a*f+c}}}function R(t){return t===Be||t===ze}function L(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 j(t,e){return(t.datum.datum_type===Be||t.datum.datum_type===ze)&&"WGS84"!==e.datumCode||(e.datum.datum_type===Be||e.datum.datum_type===ze)&&"WGS84"!==t.datumCode}function N(t,e,r){var n;return Array.isArray(r)&&(r=Pr(r)),Rr(r),t.datum&&e.datum&&j(t,e)&&(n=new O("WGS84"),r=N(t,n,r),t=n),"enu"!==t.axis&&(r=Tr(t,!1,r)),"longlat"===t.projName?r={x:r.x*He,y:r.y*He,z:r.z||0}:(t.to_meter&&(r={x:r.x*t.to_meter,y:r.y*t.to_meter,z:r.z||0}),r=t.inverse(r)),t.from_greenwich&&(r.x+=t.from_greenwich),r=kr(t.datum,e.datum,r),e.from_greenwich&&(r={x:r.x-e.from_greenwich,y:r.y,z:r.z||0}),"longlat"===e.projName?r={x:r.x*Ze,y:r.y*Ze,z:r.z||0}:(r=e.forward(r),e.to_meter&&(r={x:r.x/e.to_meter,y:r.y/e.to_meter,z:r.z||0})),"enu"!==e.axis?Tr(e,!0,r):r}function q(t,e,r){var n,i,o;return Array.isArray(r)?(n=N(t,e,r)||{x:NaN,y:NaN},r.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name?"number"==typeof n.z?[n.x,n.y,n.z].concat(r.splice(3)):[n.x,n.y,r[2]].concat(r.splice(3)):[n.x,n.y].concat(r.splice(2)):[n.x,n.y]):(i=N(t,e,r),o=Object.keys(r),2===o.length?i:(o.forEach(function(n){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;i[n]=r[n]}),i))}function B(t){return t instanceof O?t:t.oProj?t.oProj:O(t)}function z(t,e,r){t=B(t);var n,i=!1;return void 0===e?(e=t,t=Lr,i=!0):(void 0!==e.x||Array.isArray(e))&&(r=e,e=t,t=Lr,i=!0),e=B(e),r?q(t,e,r):(n={forward:function(r){return q(t,e,r)},inverse:function(r){return q(e,t,r)}},i&&(n.oProj=e),n)}function F(t,e){return e=e||5,H(Y({lat:t[1],lon:t[0]}),e)}function D(t){var e=V(Q(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]}function U(t){var e=V(Q(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function G(t){return t*(Math.PI/180)}function W(t){return t/Math.PI*180}function Y(t){var e,r,n,i,o,a,s,u,h,l=t.lat,f=t.lon,c=6378137,d=G(l),p=G(f);h=Math.floor((f+180)/6)+1,180===f&&(h=60),l>=56&&l<64&&f>=3&&f<12&&(h=32),l>=72&&l<84&&(f>=0&&f<9?h=31:f>=9&&f<21?h=33:f>=21&&f<33?h=35:f>=33&&f<42&&(h=37)),e=6*(h-1)-180+3,u=G(e),r=.006739496752268451,n=c/Math.sqrt(1-.00669438*Math.sin(d)*Math.sin(d)),i=Math.tan(d)*Math.tan(d),o=r*Math.cos(d)*Math.cos(d),a=Math.cos(d)*(p-u),s=c*(.9983242984503243*d-.002514607064228144*Math.sin(2*d)+2639046602129982e-21*Math.sin(4*d)-3.418046101696858e-9*Math.sin(6*d));var m=.9996*n*(a+(1-i+o)*a*a*a/6+(5-18*i+i*i+72*o-58*r)*a*a*a*a*a/120)+5e5,g=.9996*(s+n*Math.tan(d)*(a*a/2+(5-i+9*o+4*o*o)*a*a*a*a/24+(61-58*i+i*i+600*o-330*r)*a*a*a*a*a*a/720));return l<0&&(g+=1e7),{northing:Math.round(g),easting:Math.round(m),zoneNumber:h,zoneLetter:X(l)}}function V(t){var e=t.northing,r=t.easting,n=t.zoneLetter,i=t.zoneNumber;if(i<0||i>60)return null;var o,a,s,u,h,l,f,c,d,p,m=6378137,g=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),y=r-5e5,v=e;n<"N"&&(v-=1e7),c=6*(i-1)-180+3,o=.006739496752268451,f=v/.9996,d=f/6367449.145945056,p=d+(3*g/2-27*g*g*g/32)*Math.sin(2*d)+(21*g*g/16-55*g*g*g*g/32)*Math.sin(4*d)+151*g*g*g/96*Math.sin(6*d),a=m/Math.sqrt(1-.00669438*Math.sin(p)*Math.sin(p)),s=Math.tan(p)*Math.tan(p),u=o*Math.cos(p)*Math.cos(p),h=.99330562*m/Math.pow(1-.00669438*Math.sin(p)*Math.sin(p),1.5),l=y/(.9996*a);var b=p-a*Math.tan(p)/h*(l*l/2-(5+3*s+10*u-4*u*u-9*o)*l*l*l*l/24+(61+90*s+298*u+45*s*s-252*o-3*u*u)*l*l*l*l*l*l/720);b=W(b);var w=(l-(1+2*s+u)*l*l*l/6+(5-2*u+28*s-3*u*u+8*o+24*s*s)*l*l*l*l*l/120)/Math.cos(p);w=c+W(w);var _;if(t.accuracy){var x=V({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});_={top:x.lat,right:x.lon,bottom:b,left:w}}else _={lat:b,lon:w};return _}function X(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 H(t,e){var r="00000"+t.easting,n="00000"+t.northing;return t.zoneNumber+t.zoneLetter+Z(t.easting,t.northing,t.zoneNumber)+r.substr(r.length-5,e)+n.substr(n.length-5,e)}function Z(t,e,r){var n=K(r);return J(Math.floor(t/1e5),Math.floor(e/1e5)%20,n)}function K(t){var e=t%jr;return 0===e&&(e=jr),e}function J(t,e,r){var n=r-1,i=Nr.charCodeAt(n),o=qr.charCodeAt(n),a=i+t-1,s=o+e,u=!1;return a>Ur&&(a=a-Ur+Br-1,u=!0),(a===zr||izr||(a>zr||iFr||(a>Fr||iUr&&(a=a-Ur+Br-1),s>Dr?(s=s-Dr+Br-1,u=!0):u=!1,(s===zr||ozr||(s>zr||oFr||(s>Fr||oDr&&(s=s-Dr+Br-1),String.fromCharCode(a)+String.fromCharCode(s)}function Q(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,r=t.length,n=null,i="",o=0;!/[A-Z]/.test(e=t.charAt(o));){if(o>=2)throw"MGRSPoint bad conversion from: "+t;i+=e,o++}var a=parseInt(i,10);if(0===o||o+3>r)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;n=t.substring(o,o+=2);for(var u=K(a),h=$(n.charAt(0),u),l=tt(n.charAt(1),u);l0&&(c=1e5/Math.pow(10,y),d=t.substring(o,o+y),v=parseFloat(d)*c,p=t.substring(o+y),b=parseFloat(p)*c),m=v+h,g=b+l,{easting:m,northing:g,zoneLetter:s,zoneNumber:a,accuracy:c}}function $(t,e){for(var r=Nr.charCodeAt(e-1),n=1e5,i=!1;r!==t.charCodeAt(0);){if(r++,r===zr&&r++,r===Fr&&r++,r>Ur){if(i)throw"Bad character: "+t;r=Br,i=!0}n+=1e5}return n}function tt(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var r=qr.charCodeAt(e-1),n=0,i=!1;r!==t.charCodeAt(0);){if(r++,r===zr&&r++,r===Fr&&r++,r>Dr){if(i)throw"Bad character: "+t;r=Br,i=!0}n+=1e5}return n}function et(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 rt(t,e,r){if(!(this instanceof rt))return new rt(t,e,r);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 n=t.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=t,this.y=e,this.z=r||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}function nt(){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=Yr(this.es),this.ml0=Vr(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function it(t){var e,r,n,i=t.x,o=t.y,a=gr(i-this.long0),s=Math.sin(o),u=Math.cos(o);if(this.es){var h=u*a,l=Math.pow(h,2),f=this.ep2*Math.pow(u,2),c=Math.pow(f,2),d=Math.abs(u)>Xe?Math.tan(o):0,p=Math.pow(d,2),m=Math.pow(p,2);e=1-this.es*Math.pow(s,2),h/=Math.sqrt(e);var g=Vr(o,s,u,this.en);r=this.a*(this.k0*h*(1+l/6*(1-p+f+l/20*(5-18*p+m+14*f-58*p*f+l/42*(61+179*m-m*p-479*p)))))+this.x0,n=this.a*(this.k0*(g-this.ml0+s*a*h/2*(1+l/12*(5-p+9*f+4*c+l/30*(61+m-58*p+270*f-330*p*f+l/56*(1385+543*m-m*p-3111*p))))))+this.y0}else{var y=u*Math.sin(a);if(Math.abs(Math.abs(y)-1)=1){if(y-1>Xe)return 93;n=0}else n=Math.acos(n);o<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return t.x=r,t.y=n,t}function ot(t){var e,r,n,i,o=(t.x-this.x0)*(1/this.a),a=(t.y-this.y0)*(1/this.a);if(this.es)if(e=this.ml0+a/this.k0,r=Xr(e,this.es,this.en),Math.abs(r)Xe?Math.tan(r):0,l=this.ep2*Math.pow(u,2),f=Math.pow(l,2),c=Math.pow(h,2),d=Math.pow(c,2);e=1-this.es*Math.pow(s,2);var p=o*Math.sqrt(e)/this.k0,m=Math.pow(p,2);e*=h,n=r-e*m/(1-this.es)*.5*(1-m/12*(5+3*c-9*l*c+l-4*f-m/30*(61+90*c-252*l*c+45*d+46*l-m/56*(1385+3633*c+4095*d+1574*d*c)))),i=gr(this.long0+p*(1-m/6*(1+2*c+l-m/20*(5+28*c+24*d+8*l*c+6*l-m/42*(61+662*c+1320*d+720*d*c))))/u)}else n=Ge*mr(a),i=0;else{var g=Math.exp(o/this.k0),y=.5*(g-1/g),v=this.lat0+a/this.k0,b=Math.cos(v);e=Math.sqrt((1-Math.pow(b,2))/(1+Math.pow(y,2))),n=Math.asin(e),a<0&&(n=-n),i=0===y&&0===b?0:gr(Math.atan2(y,b)+this.long0)}return t.x=i,t.y=n,t}function at(){if(void 0===this.es||this.es<=0)throw new Error("incorrect elliptical usage");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),r=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),r*=e,this.cgb[1]=r*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=r*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),r*=e,this.cgb[2]=r*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=r*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),r*=e,this.cgb[3]=r*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=r*(1237/630+e*(e*(-24832/14175)-2.4)),r*=e,this.cgb[4]=r*(4174/315+e*(-144838/6237)),this.cbg[4]=r*(-734/315+e*(109598/31185)),r*=e,this.cgb[5]=r*(601676/22275),this.cbg[5]=r*(444337/155925),r=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+r*(.25+r*(1/64+r/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]=r*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=r*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),r*=e,this.utg[2]=r*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=r*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),r*=e,this.utg[3]=r*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=r*(49561/161280+e*(-179/168+e*(6601661/7257600))),r*=e,this.utg[4]=r*(-4583/161280+e*(108847/3991680)),this.gtu[4]=r*(34729/80640+e*(-3418889/1995840)),r*=e,this.utg[5]=-.03233083094085698*r,this.gtu[5]=.6650675310896665*r;var n=tn(this.cbg,this.lat0);this.Zb=-this.Qn*(n+en(this.gtu,2*n))}function st(t){var e=gr(t.x-this.long0),r=t.y;r=tn(this.cbg,r);var n=Math.sin(r),i=Math.cos(r),o=Math.sin(e),a=Math.cos(e);r=Math.atan2(n,a*i),e=Math.atan2(o*i,Jr(n,i*a)),e=$r(Math.tan(e));var s=nn(this.gtu,2*r,2*e);r+=s[0],e+=s[1];var u,h;return Math.abs(e)<=2.623395162778?(u=this.a*(this.Qn*e)+this.x0,h=this.a*(this.Qn*r+this.Zb)+this.y0):(u=1/0,h=1/0),t.x=u,t.y=h,t}function ut(t){var e=(t.x-this.x0)*(1/this.a),r=(t.y-this.y0)*(1/this.a);r=(r-this.Zb)/this.Qn,e/=this.Qn;var n,i;if(Math.abs(e)<=2.623395162778){var o=nn(this.utg,2*r,2*e);r+=o[0],e+=o[1],e=Math.atan(Kr(e));var a=Math.sin(r),s=Math.cos(r),u=Math.sin(e),h=Math.cos(e);r=Math.atan2(a*h,Jr(u,h*s)),e=Math.atan2(u,h*s),n=gr(e+this.long0),i=tn(this.cgb,r)}else n=1/0,i=1/0;return t.x=n,t.y=i,t}function ht(){var t=sn(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*He,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,an.init.apply(this),this.forward=an.forward,this.inverse=an.inverse}function lt(){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+Ke)/(Math.pow(Math.tan(.5*this.lat0+Ke),this.C)*ln(this.e*t,this.ratexp))}function ft(t){var e=t.x,r=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*r+Ke),this.C)*ln(this.e*Math.sin(r),this.ratexp))-Ge,t.x=this.C*e,t}function ct(t){for(var e=t.x/this.C,r=t.y,n=Math.pow(Math.tan(.5*r+Ke)/this.K,1/this.C),i=fn;i>0&&(r=2*Math.atan(n*ln(this.e*Math.sin(t.y),-.5*this.e))-Ge,!(Math.abs(r-t.y)<1e-14));--i)t.y=r;return i?(t.x=e,t.y=r,t):null}function dt(){dn.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 pt(t){var e,r,n,i;return t.x=gr(t.x-this.long0),dn.forward.apply(this,[t]),e=Math.sin(t.y),r=Math.cos(t.y),n=Math.cos(t.x),i=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*r*n),t.x=i*r*Math.sin(t.x),t.y=i*(this.cosc0*e-this.sinc0*r*n),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function mt(t){var e,r,n,i,o;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,o=Math.sqrt(t.x*t.x+t.y*t.y)){var a=2*Math.atan2(o,this.R2);e=Math.sin(a),r=Math.cos(a),i=Math.asin(r*this.sinc0+t.y*e*this.cosc0/o),n=Math.atan2(t.x*e,o*this.cosc0*r-t.y*this.sinc0*e)}else i=this.phic0,n=0;return t.x=n,t.y=i,dn.inverse.apply(this,[t]),t.x=gr(t.x+this.long0),t}function gt(t,e,r){return e*=r,Math.tan(.5*(Ge+t))*Math.pow((1-e)/(1+e),.5*r)}function yt(){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)<=Xe&&(this.k0=.5*(1+mr(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=Xe&&(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)<=Xe&&(this.k0=.5*this.cons*pr(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/yr(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=pr(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-Ge,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function vt(t){var e,r,n,i,o,a,s=t.x,u=t.y,h=Math.sin(u),l=Math.cos(u),f=gr(s-this.long0);return Math.abs(Math.abs(s-this.long0)-Math.PI)<=Xe&&Math.abs(u+this.lat0)<=Xe?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*h+this.coslat0*l*Math.cos(f)),t.x=this.a*e*l*Math.sin(f)+this.x0,t.y=this.a*e*(this.coslat0*h-this.sinlat0*l*Math.cos(f))+this.y0,t):(r=2*Math.atan(this.ssfn_(u,h,this.e))-Ge,i=Math.cos(r),n=Math.sin(r),Math.abs(this.coslat0)<=Xe?(o=yr(this.e,u*this.con,this.con*h),a=2*this.a*this.k0*o/this.cons,t.x=this.x0+a*Math.sin(s-this.long0),t.y=this.y0-this.con*a*Math.cos(s-this.long0),t):(Math.abs(this.sinlat0)0?this.long0+Math.atan2(t.x,-1*t.y):this.long0+Math.atan2(t.x,t.y):this.long0+Math.atan2(t.x*Math.sin(s),a*this.coslat0*Math.cos(s)-t.y*this.sinlat0*Math.sin(s))),t.x=e,t.y=r,t)}if(Math.abs(this.coslat0)<=Xe){if(a<=Xe)return r=this.lat0,e=this.long0,t.x=e,t.y=r,t;t.x*=this.con,t.y*=this.con,n=a*this.cons/(2*this.a*this.k0),r=this.con*vr(this.e,n),e=this.con*gr(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else i=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,a<=Xe?o=this.X0:(o=Math.asin(Math.cos(i)*this.sinX0+t.y*Math.sin(i)*this.cosX0/a),e=gr(this.long0+Math.atan2(t.x*Math.sin(i),a*this.cosX0*Math.cos(i)-t.y*this.sinX0*Math.sin(i)))),r=-1*vr(this.e,Math.tan(.5*(Ge+o)));return t.x=e,t.y=r,t}function wt(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),r=this.a,n=this.rf,i=1/n,o=2*i-Math.pow(i,2),a=this.e=Math.sqrt(o);this.R=this.k0*r*Math.sqrt(1-o)/(1-o*Math.pow(e,2)),this.alpha=Math.sqrt(1+o/(1-o)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var s=Math.log(Math.tan(Math.PI/4+this.b0/2)),u=Math.log(Math.tan(Math.PI/4+t/2)),h=Math.log((1+a*e)/(1-a*e));this.K=s-this.alpha*u+this.alpha*a/2*h}function _t(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),r=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),n=-this.alpha*(e+r)+this.K,i=2*(Math.atan(Math.exp(n))-Math.PI/4),o=this.alpha*(t.x-this.lambda0),a=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(o))),s=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*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 xt(t){for(var e=t.x-this.x0,r=t.y-this.y0,n=e/this.R,i=2*(Math.atan(Math.exp(r/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(i))),s=this.lambda0+a/this.alpha,u=0,h=o,l=-1e3,f=0;Math.abs(h-l)>1e-7;){if(++f>20)return;u=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(h))/2)),l=h,h=2*Math.atan(Math.exp(u))-Math.PI/2}return t.x=s,t.y=h,t}function Mt(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var t=Math.sin(this.lat0),e=Math.cos(this.lat0),r=this.e*t;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(e,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-r*r);var n=yr(this.e,this.lat0,t),i=this.bl/e*Math.sqrt((1-this.es)/(1-r*r));i*i<1&&(i=1);var o,a;if(isNaN(this.longc)){var s=yr(this.e,this.lat1,Math.sin(this.lat1)),u=yr(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(i+Math.sqrt(i*i-1))*Math.pow(n,this.bl):this.el=(i-Math.sqrt(i*i-1))*Math.pow(n,this.bl);var h=Math.pow(s,this.bl),l=Math.pow(u,this.bl);o=this.el/h,a=.5*(o-1/o);var f=(this.el*this.el-l*h)/(this.el*this.el+l*h),c=(l-h)/(l+h),d=gr(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(f*Math.tan(.5*this.bl*d)/c)/this.bl,this.long0=gr(this.long0);var p=gr(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*p)/a),this.alpha=Math.asin(i*Math.sin(this.gamma0))}else o=this.lat0>=0?i+Math.sqrt(i*i-1):i-Math.sqrt(i*i-1),this.el=o*Math.pow(n,this.bl),a=.5*(o-1/o),this.gamma0=Math.asin(Math.sin(this.alpha)/i),this.long0=this.longc-Math.asin(a*Math.tan(this.gamma0))/this.bl;this.no_off?this.uc=0:this.lat0>=0?this.uc=this.al/this.bl*Math.atan2(Math.sqrt(i*i-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(i*i-1),Math.cos(this.alpha))}function Et(t){var e,r,n,i=t.x,o=t.y,a=gr(i-this.long0);if(Math.abs(Math.abs(o)-Ge)<=Xe)n=o>0?-1:1,r=this.al/this.bl*Math.log(Math.tan(Ke+n*this.gamma0*.5)),e=-1*n*Ge*this.al/this.bl;else{var s=yr(this.e,o,Math.sin(o)),u=this.el/Math.pow(s,this.bl),h=.5*(u-1/u),l=.5*(u+1/u),f=Math.sin(this.bl*a),c=(h*Math.sin(this.gamma0)-f*Math.cos(this.gamma0))/l;r=Math.abs(Math.abs(c)-1)<=Xe?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-c)/(1+c))/this.bl,e=Math.abs(Math.cos(this.bl*a))<=Xe?this.al*this.bl*a:this.al*Math.atan2(h*Math.cos(this.gamma0)+f*Math.sin(this.gamma0),Math.cos(this.bl*a))/this.bl}return this.no_rot?(t.x=this.x0+e,t.y=this.y0+r):(e-=this.uc,t.x=this.x0+r*Math.cos(this.alpha)+e*Math.sin(this.alpha),t.y=this.y0+e*Math.cos(this.alpha)-r*Math.sin(this.alpha)),t}function Ct(t){var e,r;this.no_rot?(r=t.y-this.y0,e=t.x-this.x0):(r=(t.x-this.x0)*Math.cos(this.alpha)-(t.y-this.y0)*Math.sin(this.alpha),e=(t.y-this.y0)*Math.cos(this.alpha)+(t.x-this.x0)*Math.sin(this.alpha),e+=this.uc);var n=Math.exp(-1*this.bl*r/this.al),i=.5*(n-1/n),o=.5*(n+1/n),a=Math.sin(this.bl*e/this.al),s=(a*Math.cos(this.gamma0)+i*Math.sin(this.gamma0))/o,u=Math.pow(this.el/Math.sqrt((1+s)/(1-s)),1/this.bl);return Math.abs(s-1)Xe?this.ns=Math.log(n/s)/Math.log(i/u):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=n/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function Ot(t){var e=t.x,r=t.y;Math.abs(2*Math.abs(r)-Math.PI)<=Xe&&(r=mr(r)*(Ge-2*Xe));var n,i,o=Math.abs(Math.abs(r)-Ge);if(o>Xe)n=yr(this.e,r,Math.sin(r)),i=this.a*this.f0*Math.pow(n,this.ns);else{if((o=r*this.ns)<=0)return null;i=0}var a=this.ns*gr(e-this.long0);return t.x=this.k0*(i*Math.sin(a))+this.x0,t.y=this.k0*(this.rh-i*Math.cos(a))+this.y0,t}function At(t){var e,r,n,i,o,a=(t.x-this.x0)/this.k0,s=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(a*a+s*s),r=1):(e=-Math.sqrt(a*a+s*s),r=-1);var u=0;if(0!==e&&(u=Math.atan2(r*a,r*s)),0!==e||this.ns>0){if(r=1/this.ns,n=Math.pow(e/(this.a*this.f0),r),-9999===(i=vr(this.e,n)))return null}else i=-Ge;return o=gr(u/this.ns+this.long0),t.x=o,t.y=i,t}function It(){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 kt(t){var e,r,n,i,o,a,s,u=t.x,h=t.y,l=gr(u-this.long0);return e=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),r=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/e)-this.s45),n=-l*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(r)+Math.sin(this.ad)*Math.cos(r)*Math.cos(n)),o=Math.asin(Math.cos(r)*Math.sin(n)/Math.cos(i)),a=this.n*o,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),t.y=s*Math.cos(a)/1,t.x=s*Math.sin(a)/1,this.czech||(t.y*=-1,t.x*=-1),t}function Tt(t){var e,r,n,i,o,a,s,u,h=t.x;t.x=t.y,t.y=h,this.czech||(t.y*=-1,t.x*=-1),a=Math.sqrt(t.x*t.x+t.y*t.y),o=Math.atan2(t.y,t.x),i=o/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/a,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),r=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(e)),t.x=this.long0-r/this.alfa,s=e,u=0;var l=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(s))/(1-this.e*Math.sin(s)),this.e/2))-this.s45),Math.abs(s-t.y)<1e-10&&(u=1),s=t.y,l+=1}while(0===u&&l<15);return l>=15?null:t}function Pt(){this.sphere||(this.e0=On(this.es),this.e1=An(this.es),this.e2=In(this.es),this.e3=kn(this.es),this.ml0=this.a*Sn(this.e0,this.e1,this.e2,this.e3,this.lat0))}function Rt(t){var e,r,n=t.x,i=t.y;if(n=gr(n-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(i)*Math.sin(n)),r=this.a*(Math.atan2(Math.tan(i),Math.cos(n))-this.lat0);else{var o=Math.sin(i),a=Math.cos(i),s=Tn(this.a,this.e,o),u=Math.tan(i)*Math.tan(i),h=n*Math.cos(i),l=h*h,f=this.es*a*a/(1-this.es),c=this.a*Sn(this.e0,this.e1,this.e2,this.e3,i);e=s*h*(1-l*u*(1/6-(8-u+8*f)*l/120)),r=c-this.ml0+s*o/a*l*(.5+(5-u+6*f)*l/24)}return t.x=e+this.x0,t.y=r+this.y0,t}function Lt(t){t.x-=this.x0,t.y-=this.y0;var e,r,n=t.x/this.a,i=t.y/this.a;if(this.sphere){var o=i+this.lat0;e=Math.asin(Math.sin(o)*Math.cos(n)),r=Math.atan2(Math.tan(n),Math.cos(o))}else{var a=this.ml0/this.a+i,s=Rn(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-Ge)<=Xe)return t.x=this.long0,t.y=Ge,i<0&&(t.y*=-1),t;var u=Tn(this.a,this.e,Math.sin(s)),h=u*u*u/this.a/this.a*(1-this.es),l=Math.pow(Math.tan(s),2),f=n*this.a/u,c=f*f;e=s-u*Math.tan(s)/h*f*f*(.5-(1+3*l)*f*f/24),r=f*(1-c*(l/3+(1+3*l)*l*c/15))/Math.cos(s)}return t.x=gr(r+this.long0),t.y=Pn(e),t}function jt(){var t=Math.abs(this.lat0);if(Math.abs(t-Ge)0){var e;switch(this.qp=Nn(this.e,1),this.mmf=.5/(1-this.es),this.apa=Bt(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),e=Math.sin(this.lat0),this.sinb1=Nn(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*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 Nt(t){var e,r,n,i,o,a,s,u,h,l,f=t.x,c=t.y;if(f=gr(f-this.long0),this.sphere){if(o=Math.sin(c),l=Math.cos(c),n=Math.cos(f),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((r=this.mode===this.EQUIT?1+l*n:1+this.sinph0*o+this.cosph0*l*n)<=Xe)return null;r=Math.sqrt(2/r),e=r*l*Math.sin(f),r*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*l*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(c+this.phi0)=0?(e=(h=Math.sqrt(a))*i,r=n*(this.mode===this.S_POLE?h:-h)):e=r=0}}return t.x=this.a*e+this.x0,t.y=this.a*r+this.y0,t}function qt(t){t.x-=this.x0,t.y-=this.y0;var e,r,n,i,o,a,s,u=t.x/this.a,h=t.y/this.a;if(this.sphere){var l,f=0,c=0;if(l=Math.sqrt(u*u+h*h),(r=.5*l)>1)return null;switch(r=2*Math.asin(r),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(c=Math.sin(r),f=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(l)<=Xe?0:Math.asin(h*c/l),u*=c,h=f*l;break;case this.OBLIQ:r=Math.abs(l)<=Xe?this.phi0:Math.asin(f*this.sinph0+h*c*this.cosph0/l),u*=c*this.cosph0,h=(f-Math.sin(r)*this.sinph0)*l;break;case this.N_POLE:h=-h,r=Ge-r;break;case this.S_POLE:r-=Ge}e=0!==h||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(u,h):0}else{if(s=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(u/=this.dd,h*=this.dd,(a=Math.sqrt(u*u+h*h))Xe?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 Dt(t){var e=t.x,r=t.y;this.sin_phi=Math.sin(r),this.cos_phi=Math.cos(r);var n=Nn(this.e3,this.sin_phi,this.cos_phi),i=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,o=this.ns0*gr(e-this.long0),a=i*Math.sin(o)+this.x0,s=this.rh-i*Math.cos(o)+this.y0;return t.x=a,t.y=s,t}function Ut(t){var e,r,n,i,o,a;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),n=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),n=-1),i=0,0!==e&&(i=Math.atan2(n*t.x,n*t.y)),n=e*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(r=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,r)),o=gr(i/this.ns0+this.long0),t.x=o,t.y=a,t}function Gt(t,e){var r,n,i,o,a,s=Yn(.5*e);if(t0||Math.abs(a)<=Xe?(s=this.x0+this.a*o*r*Math.sin(n)/a,u=this.y0+this.a*o*(this.cos_p14*e-this.sin_p14*r*i)/a):(s=this.x0+this.infinity_dist*r*Math.sin(n),u=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*r*i)),t.x=s,t.y=u,t}function Vt(t){var e,r,n,i,o,a;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))?(i=Math.atan2(e,this.rc),r=Math.sin(i),n=Math.cos(i),a=Yn(n*this.sin_p14+t.y*r*this.cos_p14/e),o=Math.atan2(t.x*r,e*this.cos_p14*n-t.y*this.sin_p14*r),o=gr(this.long0+o)):(a=this.phic0,o=0),t.x=o,t.y=a,t}function Xt(){this.sphere||(this.k0=pr(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function Ht(t){var e,r,n=t.x,i=t.y,o=gr(n-this.long0);if(this.sphere)e=this.x0+this.a*o*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(i)/Math.cos(this.lat_ts);else{var a=Nn(this.e,Math.sin(i));e=this.x0+this.a*this.k0*o,r=this.y0+this.a*a*.5/this.k0}return t.x=e,t.y=r,t}function Zt(t){t.x-=this.x0,t.y-=this.y0;var e,r;return this.sphere?(e=gr(this.long0+t.x/this.a/Math.cos(this.lat_ts)),r=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(r=Kn(this.e,2*t.y*this.k0/this.a),e=gr(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=r,t}function Kt(){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 Jt(t){var e=t.x,r=t.y,n=gr(e-this.long0),i=Pn(r-this.lat0);return t.x=this.x0+this.a*n*this.rc,t.y=this.y0+this.a*i,t}function Qt(t){var e=t.x,r=t.y;return t.x=gr(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=Pn(this.lat0+(r-this.y0)/this.a),t}function $t(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=On(this.es),this.e1=An(this.es),this.e2=In(this.es),this.e3=kn(this.es),this.ml0=this.a*Sn(this.e0,this.e1,this.e2,this.e3,this.lat0)}function te(t){var e,r,n,i=t.x,o=t.y,a=gr(i-this.long0);if(n=a*Math.sin(o),this.sphere)Math.abs(o)<=Xe?(e=this.a*a,r=-1*this.a*this.lat0):(e=this.a*Math.sin(n)/Math.tan(o),r=this.a*(Pn(o-this.lat0)+(1-Math.cos(n))/Math.tan(o)));else if(Math.abs(o)<=Xe)e=this.a*a,r=-1*this.ml0;else{var s=Tn(this.a,this.e,Math.sin(o))/Math.tan(o);e=s*Math.sin(n),r=this.a*Sn(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+s*(1-Math.cos(n))}return t.x=e+this.x0,t.y=r+this.y0,t}function ee(t){var e,r,n,i,o,a,s,u,h;if(n=t.x-this.x0,i=t.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=Xe)e=gr(n/this.a+this.long0),r=0;else{a=this.lat0+i/this.a,s=n*n/this.a/this.a+a*a,u=a;var l;for(o=ei;o;--o)if(l=Math.tan(u),h=-1*(a*(u*l+1)-u-.5*(u*u+s)*l)/((u-a)/l-1),u+=h,Math.abs(h)<=Xe){r=u;break}e=gr(this.long0+Math.asin(n*Math.tan(u)/this.a)/Math.sin(r))}else if(Math.abs(i+this.ml0)<=Xe)r=0,e=gr(this.long0+n/this.a);else{a=(this.ml0+i)/this.a,s=n*n/this.a/this.a+a*a,u=a;var f,c,d,p,m;for(o=ei;o;--o)if(m=this.e*Math.sin(u),f=Math.sqrt(1-m*m)*Math.tan(u),c=this.a*Sn(this.e0,this.e1,this.e2,this.e3,u),d=this.e0-2*this.e1*Math.cos(2*u)+4*this.e2*Math.cos(4*u)-6*this.e3*Math.cos(6*u),p=c/this.a,h=(a*(f*p+1)-p-.5*f*(p*p+s))/(this.es*Math.sin(2*u)*(p*p+s-2*a*p)/(4*f)+(a-p)*(f*d-2/Math.sin(2*u))-d),u-=h,Math.abs(h)<=Xe){r=u;break}f=Math.sqrt(1-this.es*Math.pow(Math.sin(r),2))*Math.tan(r),e=gr(this.long0+Math.asin(n*f/this.a)/Math.sin(r))}return t.x=e,t.y=r,t}function re(){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 ne(t){var e,r=t.x,n=t.y,i=n-this.lat0,o=r-this.long0,a=i/Ue*1e-5,s=o,u=1,h=0;for(e=1;e<=10;e++)u*=a,h+=this.A[e]*u;var l,f,c=h,d=s,p=1,m=0,g=0,y=0;for(e=1;e<=6;e++)l=p*c-m*d,f=m*c+p*d,p=l,m=f,g=g+this.B_re[e]*p-this.B_im[e]*m,y=y+this.B_im[e]*p+this.B_re[e]*m;return t.x=y*this.a+this.x0,t.y=g*this.a+this.y0,t}function ie(t){var e,r,n,i=t.x,o=t.y,a=i-this.x0,s=o-this.y0,u=s/this.a,h=a/this.a,l=1,f=0,c=0,d=0;for(e=1;e<=6;e++)r=l*u-f*h,n=f*u+l*h,l=r,f=n,c=c+this.C_re[e]*l-this.C_im[e]*f,d=d+this.C_im[e]*l+this.C_re[e]*f;for(var p=0;p.999999999999&&(r=.999999999999),e=Math.asin(r);var n=gr(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),r=(2*e+Math.sin(2*e))/Math.PI,Math.abs(r)>1&&(r=1);var i=Math.asin(r);return t.x=n,t.y=i,t}function pe(){Math.abs(this.lat1+this.lat2)=0?(r=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(r=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var o=0;if(0!==r&&(o=Math.atan2(e*t.x,e*t.y)),this.sphere)return i=gr(this.long0+o/this.ns),n=Pn(this.g-r/this.a),t.x=i,t.y=n,t;var a=this.g-r/this.a;return n=Rn(a,this.e0,this.e1,this.e2,this.e3),i=gr(this.long0+o/this.ns),t.x=i,t.y=n,t}function ye(){this.R=this.a}function ve(t){var e,r,n=t.x,i=t.y,o=gr(n-this.long0);Math.abs(i)<=Xe&&(e=this.x0+this.R*o,r=this.y0);var a=Yn(2*Math.abs(i/Math.PI));(Math.abs(o)<=Xe||Math.abs(Math.abs(i)-Ge)<=Xe)&&(e=this.x0,r=i>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var s=.5*Math.abs(Math.PI/o-o/Math.PI),u=s*s,h=Math.sin(a),l=Math.cos(a),f=l/(h+l-1),c=f*f,d=f*(2/h-1),p=d*d,m=Math.PI*this.R*(s*(f-p)+Math.sqrt(u*(f-p)*(f-p)-(p+u)*(c-p)))/(p+u);o<0&&(m=-m),e=this.x0+m;var g=u+f;return m=Math.PI*this.R*(d*g-s*Math.sqrt((p+u)*(u+1)-g*g))/(p+u),r=i>=0?this.y0+m:this.y0-m,t.x=e,t.y=r,t}function be(t){var e,r,n,i,o,a,s,u,h,l,f,c,d;return t.x-=this.x0,t.y-=this.y0,f=Math.PI*this.R,n=t.x/f,i=t.y/f,o=n*n+i*i,a=-Math.abs(i)*(1+o),s=a-2*i*i+n*n,u=-2*a+1+2*i*i+o*o,d=i*i/u+(2*s*s*s/u/u/u-9*a*s/u/u)/27,h=(a-s*s/3/u)/u,l=2*Math.sqrt(-h/3),f=3*d/h/l,Math.abs(f)>1&&(f=f>=0?1:-1),c=Math.acos(f)/3,r=t.y>=0?(-l*Math.cos(c+Math.PI/3)-s/3/u)*Math.PI:-(-l*Math.cos(c+Math.PI/3)-s/3/u)*Math.PI,e=Math.abs(n)2*Ge*this.a)return;return r=e/this.a,n=Math.sin(r),i=Math.cos(r),o=this.long0,Math.abs(e)<=Xe?a=this.lat0:(a=Yn(i*this.sin_p12+t.y*n*this.cos_p12/e),s=Math.abs(this.lat0)-Ge,o=gr(Math.abs(s)<=Xe?this.lat0>=0?this.long0+Math.atan2(t.x,-t.y):this.long0-Math.atan2(-t.x,t.y):this.long0+Math.atan2(t.x*n,e*this.cos_p12*i-t.y*this.sin_p12*n))),t.x=o,t.y=a,t}return u=On(this.es),h=An(this.es),l=In(this.es),f=kn(this.es),Math.abs(this.sin_p12-1)<=Xe?(c=this.a*Sn(u,h,l,f,Ge),e=Math.sqrt(t.x*t.x+t.y*t.y),d=c-e,a=Rn(d/this.a,u,h,l,f),o=gr(this.long0+Math.atan2(t.x,-1*t.y)),t.x=o,t.y=a,t):Math.abs(this.sin_p12+1)<=Xe?(c=this.a*Sn(u,h,l,f,Ge),e=Math.sqrt(t.x*t.x+t.y*t.y),d=e-c,a=Rn(d/this.a,u,h,l,f),o=gr(this.long0+Math.atan2(t.x,t.y)),t.x=o,t.y=a,t):(e=Math.sqrt(t.x*t.x+t.y*t.y),g=Math.atan2(t.x,t.y),p=Tn(this.a,this.e,this.sin_p12),y=Math.cos(g),v=this.e*this.cos_p12*y,b=-v*v/(1-this.es),w=3*this.es*(1-b)*this.sin_p12*this.cos_p12*y/(1-this.es),_=e/p,x=_-b*(1+b)*Math.pow(_,3)/6-w*(1+3*b)*Math.pow(_,4)/24,M=1-b*x*x/2-_*x*x*x/6,m=Math.asin(this.sin_p12*Math.cos(x)+this.cos_p12*Math.sin(x)*y),o=gr(this.long0+Math.asin(Math.sin(g)*Math.sin(x)/Math.cos(m))),a=Math.atan((1-this.es*M*this.sin_p12/Math.sin(m))*Math.tan(m)/(1-this.es)),t.x=o,t.y=a,t)}function Me(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function Ee(t){var e,r,n,i,o,a,s,u,h=t.x,l=t.y;return n=gr(h-this.long0),e=Math.sin(l),r=Math.cos(l),i=Math.cos(n),a=this.sin_p14*e+this.cos_p14*r*i,o=1,(a>0||Math.abs(a)<=Xe)&&(s=this.a*o*r*Math.sin(n),u=this.y0+this.a*o*(this.cos_p14*e-this.sin_p14*r*i)),t.x=s,t.y=u,t}function Ce(t){var e,r,n,i,o,a,s;return t.x-=this.x0,t.y-=this.y0,e=Math.sqrt(t.x*t.x+t.y*t.y),r=Yn(e/this.a),n=Math.sin(r),i=Math.cos(r),a=this.long0,Math.abs(e)<=Xe?(s=this.lat0,t.x=a,t.y=s,t):(s=Yn(i*this.sin_p14+t.y*n*this.cos_p14/e),o=Math.abs(this.lat0)-Ge,Math.abs(o)<=Xe?(a=gr(this.lat0>=0?this.long0+Math.atan2(t.x,-t.y):this.long0-Math.atan2(-t.x,t.y)),t.x=a,t.y=s,t):(a=gr(this.long0+Math.atan2(t.x*n,e*this.cos_p14*i-t.y*this.sin_p14*n)),t.x=a,t.y=s,t))}function Se(){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>=Ge-Ke/2?this.face=_i.TOP:this.lat0<=-(Ge-Ke/2)?this.face=_i.BOTTOM:Math.abs(this.long0)<=Ke?this.face=_i.FRONT:Math.abs(this.long0)<=Ge+Ke?this.face=this.long0>0?_i.RIGHT:_i.LEFT:this.face=_i.BACK,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 Oe(t){var e,r,n,i,o,a,s={x:0,y:0},u={value:0};if(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,r=t.x,this.face===_i.TOP)i=Ge-e,r>=Ke&&r<=Ge+Ke?(u.value=xi.AREA_0,n=r-Ge):r>Ge+Ke||r<=-(Ge+Ke)?(u.value=xi.AREA_1,n=r>0?r-Qe:r+Qe):r>-(Ge+Ke)&&r<=-Ke?(u.value=xi.AREA_2,n=r+Ge):(u.value=xi.AREA_3,n=r);else if(this.face===_i.BOTTOM)i=Ge+e,r>=Ke&&r<=Ge+Ke?(u.value=xi.AREA_0,n=-r+Ge):r=-Ke?(u.value=xi.AREA_1,n=-r):r<-Ke&&r>=-(Ge+Ke)?(u.value=xi.AREA_2,n=-r-Ge):(u.value=xi.AREA_3,n=r>0?-r+Qe:-r-Qe);else{var h,l,f,c,d,p,m;this.face===_i.RIGHT?r=ke(r,+Ge):this.face===_i.BACK?r=ke(r,+Qe):this.face===_i.LEFT&&(r=ke(r,-Ge)),c=Math.sin(e),d=Math.cos(e),p=Math.sin(r),m=Math.cos(r),h=d*m,l=d*p,f=c,this.face===_i.FRONT?(i=Math.acos(h),n=Ie(i,f,l,u)):this.face===_i.RIGHT?(i=Math.acos(l),n=Ie(i,f,-h,u)):this.face===_i.BACK?(i=Math.acos(-h),n=Ie(i,f,-l,u)):this.face===_i.LEFT?(i=Math.acos(-l),n=Ie(i,f,h,u)):(i=n=0,u.value=xi.AREA_0)}return a=Math.atan(12/Qe*(n+Math.acos(Math.sin(n)*Math.cos(Ke))-Ge)),o=Math.sqrt((1-Math.cos(i))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(n))))),u.value===xi.AREA_1?a+=Ge:u.value===xi.AREA_2?a+=Qe:u.value===xi.AREA_3&&(a+=1.5*Qe),s.x=o*Math.cos(a),s.y=o*Math.sin(a),s.x=s.x*this.a+this.x0,s.y=s.y*this.a+this.y0,t.x=s.x,t.y=s.y,t}function Ae(t){var e,r,n,i,o,a,s,u,h,l={lam:0,phi:0},f={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,r=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)?f.value=xi.AREA_0:t.y>=0&&t.y>=Math.abs(t.x)?(f.value=xi.AREA_1,e-=Ge):t.x<0&&-t.x>=Math.abs(t.y)?(f.value=xi.AREA_2,e=e<0?e+Qe:e-Qe):(f.value=xi.AREA_3,e+=Ge),h=Qe/12*Math.tan(e),o=Math.sin(h)/(Math.cos(h)-1/Math.sqrt(2)),a=Math.atan(o),n=Math.cos(e),i=Math.tan(r),s=1-n*n*i*i*(1-Math.cos(Math.atan(1/Math.cos(a)))),s<-1?s=-1:s>1&&(s=1),this.face===_i.TOP)u=Math.acos(s),l.phi=Ge-u,f.value===xi.AREA_0?l.lam=a+Ge:f.value===xi.AREA_1?l.lam=a<0?a+Qe:a-Qe:f.value===xi.AREA_2?l.lam=a-Ge:l.lam=a;else if(this.face===_i.BOTTOM)u=Math.acos(s),l.phi=u-Ge,f.value===xi.AREA_0?l.lam=-a+Ge:f.value===xi.AREA_1?l.lam=-a:f.value===xi.AREA_2?l.lam=-a-Ge:l.lam=a<0?-a-Qe:-a+Qe;else{var c,d,p;c=s,h=c*c,p=h>=1?0:Math.sqrt(1-h)*Math.sin(a),h+=p*p,d=h>=1?0:Math.sqrt(1-h),f.value===xi.AREA_1?(h=d,d=-p,p=h):f.value===xi.AREA_2?(d=-d,p=-p):f.value===xi.AREA_3&&(h=d,d=p,p=-h),this.face===_i.RIGHT?(h=c,c=-d,d=h):this.face===_i.BACK?(c=-c,d=-d):this.face===_i.LEFT&&(h=c,c=d,d=-h),l.phi=Math.acos(-p)-Ge,l.lam=Math.atan2(d,c),this.face===_i.RIGHT?l.lam=ke(l.lam,-Ge):this.face===_i.BACK?l.lam=ke(l.lam,-Qe):this.face===_i.LEFT&&(l.lam=ke(l.lam,+Ge))}if(0!==this.es){var m,g,y;m=l.phi<0?1:0,g=Math.tan(l.phi),y=this.b/Math.sqrt(g*g+this.one_minus_f_squared),l.phi=Math.atan(Math.sqrt(this.a*this.a-y*y)/(this.one_minus_f*y)),m&&(l.phi=-l.phi)}return l.lam+=this.long0,t.x=l.lam,t.y=l.phi,t}function Ie(t,e,r,n){var i;return tKe&&i<=Ge+Ke?(n.value=xi.AREA_1,i-=Ge):i>Ge+Ke||i<=-(Ge+Ke)?(n.value=xi.AREA_2,i=i>=0?i-Qe:i+Qe):(n.value=xi.AREA_3,i+=Ge)),i}function ke(t,e){var r=t+e;return r<-Qe?r+=Je:r>+Qe&&(r-=Je),r}function Te(t,e,r,n){for(var i=e;n;--n){var o=t(i);if(i-=o,Math.abs(o)=Ti&&(n=Ti-1),r=Ze*(r-ki*n);var i={x:Pi(Ci[n],r)*e,y:Pi(Si[n],r)};return t.y<0&&(i.y=-i.y),i.x=i.x*this.a*Oi+this.x0,i.y=i.y*this.a*Ai+this.y0,i}function Le(t){var e={x:(t.x-this.x0)/(this.a*Oi),y:Math.abs(t.y-this.y0)/(this.a*Ai)};if(e.y>=1)e.x/=Ci[Ti][0],e.y=t.y<0?-Ge:Ge;else{var r=Math.floor(e.y*Ti);for(r<0?r=0:r>=Ti&&(r=Ti-1);;)if(Si[r][0]>e.y)--r;else{if(!(Si[r+1][0]<=e.y))break;++r}var n=Si[r],i=5*(e.y-n[0])/(Si[r+1][0]-n[0]);i=Te(function(t){return(Pi(n,t)-e.y)/Ri(n,t)},i,Xe,100),e.x/=Pi(Ci[r],i),e.y=(5*r+i)*He,t.y<0&&(e.y=-e.y)}return e.x=gr(e.x+this.long0),e}function je(){this.name="geocent"}function Ne(t){return I(t,this.es,this.a)}function qe(t){return k(t,this.es,this.a,this.b)}var Be=1,ze=2,Fe=4,De=5,Ue=484813681109536e-20,Ge=Math.PI/2,We=.16666666666666666,Ye=.04722222222222222,Ve=.022156084656084655,Xe=1e-10,He=.017453292519943295,Ze=57.29577951308232,Ke=Math.PI/4,Je=2*Math.PI,Qe=3.14159265359,$e={};$e.greenwich=0,$e.lisbon=-9.131906111111,$e.paris=2.337229166667,$e.bogota=-74.080916666667,$e.madrid=-3.687938888889,$e.rome=12.452333333333,$e.bern=7.439583333333,$e.jakarta=106.807719444444,$e.ferro=-17.666666666667,$e.brussels=4.367975,$e.stockholm=18.058277777778,$e.athens=23.7163375,$e.oslo=10.722916666667;var tr={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},er=/[\s_\-\/\(\)]/g,rr=function(e){var r,n,i,o={},a=e.split("+").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,e){var r=e.split("=");return r.push(!0),t[r[0].toLowerCase()]=r[1],t},{}),s={proj:"projName",datum:"datumCode",rf:function(t){o.rf=parseFloat(t)},lat_0:function(t){o.lat0=t*He},lat_1:function(t){o.lat1=t*He},lat_2:function(t){o.lat2=t*He},lat_ts:function(t){o.lat_ts=t*He},lon_0:function(t){o.long0=t*He},lon_1:function(t){o.long1=t*He},lon_2:function(t){o.long2=t*He},alpha:function(t){o.alpha=parseFloat(t)*He},lonc:function(t){o.longc=t*He},x_0:function(t){o.x0=parseFloat(t)},y_0:function(t){o.y0=parseFloat(t)},k_0:function(t){o.k0=parseFloat(t)},k:function(t){o.k0=parseFloat(t)},a:function(t){o.a=parseFloat(t)},b:function(t){o.b=parseFloat(t)},r_a:function(){o.R_A=!0},zone:function(t){o.zone=parseInt(t,10)},south:function(){o.utmSouth=!0},towgs84:function(t){o.datum_params=t.split(",").map(function(t){return parseFloat(t)})},to_meter:function(t){o.to_meter=parseFloat(t)},units:function(e){o.units=e;var r=t(tr,e);r&&(o.to_meter=r.to_meter)},from_greenwich:function(t){o.from_greenwich=t*He},pm:function(e){var r=t($e,e);o.from_greenwich=(r||parseFloat(e))*He},nadgrids:function(t){"@null"===t?o.datumCode="none":o.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))&&(o.axis=t)}};for(r in a)n=a[r],r in s?(i=s[r],"function"==typeof i?i(n):o[i]=n):o[r]=n;return"string"==typeof o.datumCode&&"WGS84"!==o.datumCode&&(o.datumCode=o.datumCode.toLowerCase()),o},nr=1,ir=/\s/,or=/[A-Za-z]/,ar=/[A-Za-z84]/,sr=/[,\]]/,ur=/[\d\.E\-\+]/;e.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;ir.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case nr: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}},e.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(sr.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)},e.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=nr)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=nr,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},e.prototype.number=function(t){if(ur.test(t))return void(this.word+=t);if(sr.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)},e.prototype.quoted=function(t){if('"'===t)return void(this.state=5);this.word+=t},e.prototype.keyword=function(t){if(ar.test(t))return void(this.word+=t);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=nr)}if(sr.test(t))return void this.afterItem(t);throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place)},e.prototype.neutral=function(t){if(or.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(ur.test(t))return this.word=t,void(this.state=3);if(sr.test(t))return void this.afterItem(t);throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place)},e.prototype.output=function(){for(;this.place2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e},Rr=function(t){L(t.x),L(t.y)},Lr=O("WGS84"),jr=6,Nr="AJSAJS",qr="AFAFAF",Br=65,zr=73,Fr=79,Dr=86,Ur=90,Gr={forward:F,inverse:D,toPoint:U};rt.fromMGRS=function(t){return new rt(U(t))},rt.prototype.toMGRS=function(t){return F([this.x,this.y],t)};var Wr=.01068115234375,Yr=function(t){var e=[];e[0]=1-t*(.25+t*(.046875+t*(.01953125+t*Wr))),e[1]=t*(.75-t*(.046875+t*(.01953125+t*Wr)));var r=t*t;return e[2]=r*(.46875-t*(.013020833333333334+.007120768229166667*t)),r*=t,e[3]=r*(.3645833333333333-.005696614583333333*t),e[4]=r*t*.3076171875,e},Vr=function(t,e,r,n){return r*=e,e*=e,n[0]*t-r*(n[1]+e*(n[2]+e*(n[3]+e*n[4])))},Xr=function(t,e,r){for(var n=1/(1-e),i=t,o=20;o;--o){var a=Math.sin(i),s=1-e*a*a;if(s=(Vr(i,a,Math.cos(i),r)-t)*(s*Math.sqrt(s))*n,i-=s,Math.abs(s)=0;)r=n*o-a+t[i],a=o,o=r;return e+r*Math.sin(2*e)},en=function(t,e){for(var r,n=2*Math.cos(e),i=t.length-1,o=t[i],a=0;--i>=0;)r=n*o-a+t[i],a=o,o=r;return Math.sin(e)*r},rn=function(t){var e=Math.exp(t);return e=(e+1/e)/2},nn=function(t,e,r){for(var n,i,o=Math.sin(e),a=Math.cos(e),s=Kr(r),u=rn(r),h=2*a*u,l=-2*o*s,f=t.length-1,c=t[f],d=0,p=0,m=0;--f>=0;)n=p,i=d,p=c,d=m,c=h*p-n-l*d+t[f],m=l*p-i+h*d;return h=o*u,l=a*s,[h*c-l*m,h*m+l*c]},on=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc"],an={init:at,forward:st,inverse:ut,names:on},sn=function(t,e){if(void 0===t){if((t=Math.floor(30*(gr(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t},un=["Universal Transverse Mercator System","utm"],hn={init:ht,names:un,dependsOn:"etmerc"},ln=function(t,e){return Math.pow((1-t)/(1+t),e)},fn=20,cn=["gauss"],dn={init:lt,forward:ft,inverse:ct,names:cn},pn=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"],mn={init:dt,forward:pt,inverse:mt,names:pn},gn=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],yn={init:yt,forward:vt,inverse:bt,names:gn,ssfn_:gt},vn=["somerc"],bn={init:wt,forward:_t,inverse:xt,names:vn},wn=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","omerc"],_n={init:Mt,forward:Et,inverse:Ct,names:wn},xn=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"],Mn={init:St,forward:Ot,inverse:At,names:xn},En=["Krovak","krovak"],Cn={init:It,forward:kt,inverse:Tt,names:En},Sn=function(t,e,r,n,i){return t*i-e*Math.sin(2*i)+r*Math.sin(4*i)-n*Math.sin(6*i)},On=function(t){return 1-.25*t*(1+t/16*(3+1.25*t))},An=function(t){return.375*t*(1+.25*t*(1+.46875*t))},In=function(t){return.05859375*t*t*(1+.75*t)},kn=function(t){return t*t*t*(35/3072)},Tn=function(t,e,r){var n=e*r;return t/Math.sqrt(1-n*n)},Pn=function(t){return Math.abs(t)1e-7?(r=t*e,(1-t*t)*(e/(1-r*r)-.5/t*Math.log((1-r)/(1+r)))):2*e},qn=.3333333333333333,Bn=.17222222222222222,zn=.10257936507936508,Fn=.06388888888888888,Dn=.0664021164021164,Un=.016415012942191543,Gn=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],Wn={init:jt,forward:Nt,inverse:qt,names:Gn,S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4},Yn=function(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)},Vn=["Albers_Conic_Equal_Area","Albers","aea"],Xn={init:Ft,forward:Dt,inverse:Ut,names:Vn,phi1z:Gt},Hn=["gnom"],Zn={init:Wt,forward:Yt,inverse:Vt,names:Hn},Kn=function(t,e){var r=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-r)<1e-6)return e<0?-1*Ge:Ge;for(var n,i,o,a,s=Math.asin(.5*e),u=0;u<30;u++)if(i=Math.sin(s),o=Math.cos(s),a=t*i,n=Math.pow(1-a*a,2)/(2*o)*(e/(1-t*t)-i/(1-a*a)+.5/t*Math.log((1-a)/(1+a))),s+=n,Math.abs(n)<=1e-10)return s;return NaN},Jn=["cea"],Qn={init:Xt,forward:Ht,inverse:Zt,names:Jn},$n=["Equirectangular","Equidistant_Cylindrical","eqc"],ti={init:Kt,forward:Jt,inverse:Qt,names:$n},ei=20,ri=["Polyconic","poly"],ni={init:$t,forward:te,inverse:ee,names:ri},ii=["New_Zealand_Map_Grid","nzmg"],oi={init:re,forward:ne,inverse:ie,names:ii},ai=["Miller_Cylindrical","mill"],si={init:oe,forward:ae,inverse:se,names:ai},ui=20,hi=["Sinusoidal","sinu"],li={init:ue,forward:he,inverse:le,names:hi},fi=["Mollweide","moll"],ci={init:fe,forward:ce,inverse:de,names:fi},di=["Equidistant_Conic","eqdc"],pi={init:pe,forward:me,inverse:ge,names:di},mi=["Van_der_Grinten_I","VanDerGrinten","vandg"],gi={init:ye,forward:ve,inverse:be,names:mi},yi=["Azimuthal_Equidistant","aeqd"],vi={init:we,forward:_e,inverse:xe,names:yi},bi=["ortho"],wi={init:Me,forward:Ee,inverse:Ce,names:bi},_i={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},xi={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4},Mi=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"],Ei={init:Se,forward:Oe,inverse:Ae,names:Mi},Ci=[[1,2.2199e-17,-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]],Si=[[-5.20417e-18,.0124,1.21431e-18,-8.45284e-11],[.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]],Oi=.8487,Ai=1.3523,Ii=Ze/5,ki=1/Ii,Ti=18,Pi=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))},Ri=function(t,e){return t[1]+e*(2*t[2]+3*e*t[3])},Li=["Robinson","robin"],ji={init:Pe,forward:Re,inverse:Le,names:Li},Ni=["Geocentric","geocentric","geocent","Geocent"],qi={init:je,forward:Ne,inverse:qe,names:Ni};return z.defaultDatum="WGS84",z.Proj=O,z.WGS84=new z.Proj("WGS84"),z.Point=rt,z.toPoint=Pr,z.defs=u,z.transform=N,z.mgrs=Gr,z.version="2.6.0",function(t){t.Proj.projections.add(Zr),t.Proj.projections.add(an),t.Proj.projections.add(hn),t.Proj.projections.add(mn),t.Proj.projections.add(yn),t.Proj.projections.add(bn),t.Proj.projections.add(_n),t.Proj.projections.add(Mn),t.Proj.projections.add(Cn),t.Proj.projections.add(jn),t.Proj.projections.add(Wn),t.Proj.projections.add(Xn),t.Proj.projections.add(Zn),t.Proj.projections.add(Qn),t.Proj.projections.add(ti),t.Proj.projections.add(ni),t.Proj.projections.add(oi),t.Proj.projections.add(si),t.Proj.projections.add(li),t.Proj.projections.add(ci),t.Proj.projections.add(pi),t.Proj.projections.add(gi),t.Proj.projections.add(vi),t.Proj.projections.add(wi),t.Proj.projections.add(Ei),t.Proj.projections.add(ji),t.Proj.projections.add(qi)}(z),z})},{}],83:[function(e,r,n){!function(e,i){"object"==typeof n&&void 0!==r?r.exports=i():"function"==typeof t&&t.amd?t(i):e.quickselect=i()}(this,function(){"use strict";function t(t,r,i,o,a){e(t,r,i||0,o||t.length-1,a||n)}function e(t,n,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,u=n-i+1,h=Math.log(s),l=.5*Math.exp(2*h/3),f=.5*Math.sqrt(h*l*(s-l)/s)*(u-s/2<0?-1:1);e(t,n,Math.max(i,Math.floor(n-u*l/s+f)),Math.min(o,Math.floor(n+(s-u)*l/s+f)),a)}var c=t[n],d=i,p=o;for(r(t,i,n),a(t[o],c)>0&&r(t,i,o);d0;)p--}0===a(t[i],c)?r(t,i,p):(p++,r(t,p,o)),p<=n&&(i=p+1),n<=p&&(o=p-1)}}function r(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function n(t,e){return te?1:0}return t})},{}],84:[function(t,e,r){"use strict";function n(t,e){ if(!(this instanceof n))return new n(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function i(t,e,r){if(!r)return e.indexOf(t);for(var n=0;n=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function y(t,e,r,n,i){for(var o,a=[e,r];a.length;)r=a.pop(),e=a.pop(),r-e<=n||(o=e+Math.ceil((r-e)/n/2)*n,v(t,o,e,r,i),a.push(e,o,o,r))}e.exports=n,e.exports.default=n;var v=t("quickselect");n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,r=[],n=this.toBBox;if(!m(t,e))return r;for(var i,o,a,s,u=[];e;){for(i=0,o=e.children.length;i=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(i,o,e)},_split:function(t,e){var r=t[e],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);var a=this._chooseSplitIndex(r,i,n),s=g(r.children.splice(a,r.children.length-a));s.height=r.height,s.leaf=r.leaf,o(r,this.toBBox),o(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(r,s)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,r){var n,i,o,s,u,h,f,c;for(h=f=1/0,n=e;n<=r-e;n++)i=a(t,0,n,this.toBBox),o=a(t,n,r,this.toBBox),s=d(i,o),u=l(i)+l(o),s=e;i--)o=t.children[i],s(l,t.leaf?u(o):o),c+=f(l);return c},_adjustParentBBoxes:function(t,e,r){for(var n=r;n>=0;n--)s(e[n],t)},_condense:function(t){for(var e,r=t.length-1;r>=0;r--)0===t[r].children.length?r>0?(e=t[r-1].children,e.splice(e.indexOf(t[r]),1)):this.clear():o(t[r],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}},{quickselect:83}],85:[function(t,e,r){"use strict";function n(t,e){for(var r=new Array(t.length-1),n=1;n>1;return["sum(",a(t.slice(0,e)),",",a(t.slice(e)),")"].join("")}function s(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var e=[],r=0;r0){if(o<=0)return a;n=i+o}else{if(!(i<0))return a;if(o>=0)return a;n=-(i+o)}var s=3.3306690738754716e-16*n;return a>=s||a<=-s?a:m(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],o=e[0]-n[0],a=r[0]-n[0],s=t[1]-n[1],u=e[1]-n[1],h=r[1]-n[1],l=t[2]-n[2],f=e[2]-n[2],c=r[2]-n[2],d=o*h,p=a*u,m=a*s,y=i*h,v=i*u,b=o*s,w=l*(d-p)+f*(m-y)+c*(v-b),_=(Math.abs(d)+Math.abs(p))*Math.abs(l)+(Math.abs(m)+Math.abs(y))*Math.abs(f)+(Math.abs(v)+Math.abs(b))*Math.abs(c),x=7.771561172376103e-16*_;return w>x||-w>x?w:g(t,e,r,n)}];!function(){for(;y.length<=p;)y.push(u(y.length));for(var t=[],r=["slow"],n=0;n<=p;++n)t.push("a"+n),r.push("o"+n);for(var i=["function getOrientation(",t.join(),"){switch(arguments.length){case 0:case 1:return 0;"],n=2;n<=p;++n)i.push("case ",n,":return o",n,"(",t.slice(0,n).join(),");");i.push("}var s=new Array(arguments.length);for(var i=0;i=i?(o=d,(l+=1)=i?(o=d,(l+=1)399?"prj"===i||"cpg"===i?e(!1):n(new Error(o.status)):e("prj"!==i&&"cpg"!==i?new r(o.response):o.response)},!1),o.send()})}var i=t("lie");e.exports=n}).call(this,t("buffer").Buffer)},{buffer:30,lie:58}],91:[function(t,e,r){(function(r,n){"use strict";function i(t){if(!t)throw new Error("forgot to pass buffer");return n.isBuffer(t)?t:t instanceof r.ArrayBuffer?new n(t):t.buffer instanceof r.ArrayBuffer?new n(1===t.BYTES_PER_ELEMENT?t:t.buffer):void 0}function o(t,e){return"string"==typeof t&&p.has(t)?c.resolve(p.get(t)):o.getShapefile(t,e).then(function(e){return"string"==typeof t&&p.set(t,e),e})}function a(t,e){return h(t).then(function(t){return o.parseZip(t,e)})}var s=t("proj4");s.default&&(s=s.default);var u=t("./unzip"),h=t("./binaryajax"),l=t("./parseShp"),f=t("parsedbf"),c=t("lie"),d=t("lru-cache"),p=new d({max:20});o.combine=function(t){var e={};e.type="FeatureCollection",e.features=[];for(var r=0,n=t[0].length;r-1?a.push(r.slice(0,-3)+r.slice(-3).toLowerCase()):"dbf"!==r.slice(-3).toLowerCase()&&"cpg"!==r.slice(-3).toLowerCase()||(n[r.slice(0,-3)+r.slice(-3).toLowerCase()]=n[r]));if(!a.length)throw new Error("no layers founds");var h=a.map(function(t){var r,i,a=t.lastIndexOf(".");return a>-1&&t.slice(a).indexOf("json")>-1?(r=JSON.parse(n[t]),r.fileName=t.slice(0,a)):e.indexOf(t.slice(a+1))>-1?(r=n[t],r.fileName=t):(n[t+".dbf"]&&(i=f(n[t+".dbf"],n[t+".cpg"])),r=o.combine([l(n[t+".shp"],n[t+".prj"]),i]),r.fileName=t),r});return 1===h.length?h[0]:h},o.getShapefile=function(t,e){return"string"==typeof t?".zip"===t.slice(-4).toLowerCase()?a(t,e):c.all([c.all([h(t+".shp"),h(t+".prj")]).then(function(t){return l(t[0],!!t[1]&&s(t[1]))}),c.all([h(t+".dbf"),h(t+".cpg")]).then(function(t){return f(t[0],t[1])})]).then(o.combine):new c(function(e){e(o.parseZip(t))})},o.parseShp=function(t,e){return t=i(t),n.isBuffer(e)&&(e=e.toString()),"string"==typeof e?(e=s(e),l(t,e)):l(t)},o.parseDbf=function(t,e){return t=i(t),f(t,e)},e.exports=o}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"./binaryajax":90,"./parseShp":92,"./unzip":93,buffer:30,lie:58,"lru-cache":59,parsedbf:79,proj4:82}],92:[function(t,e,r){"use strict";function n(t){for(var e,r,n=0,i=1,o=t.length;i0}function i(t,e){return n(e)||!t.length?t.push([e]):t[t.length-1].push(e),t}function o(t){return t?function(e,r){var n=[e.readDoubleLE(r),e.readDoubleLE(r+8)];return isNaN(n[0])||isNaN(n[1])?n:t.inverse(n)}:function(t,e){return[t.readDoubleLE(e),t.readDoubleLE(e+8)]}}function a(t,e){if(!(this instanceof a))return new a(t,e);this.buffer=t,this.shpFuncs(e),this.rows=this.getRows()}a.prototype.parsePoint=function(t){return{type:"Point",coordinates:this.parseCoord(t,0)}},a.prototype.parseZPoint=function(t){var e=this.parsePoint(t);return e.coordinates.push(t.readDoubleLE(16)),e},a.prototype.parsePointArray=function(t,e,r){for(var n=[],i=0;i20&&(e-=20),!(e in s))throw new Error("I don't know that shp type");this.parseFunc=this[s[e]],this.parseCoord=o(t)},a.prototype.getShpCode=function(){return this.parseHeader().shpCode},a.prototype.parseHeader=function(){var t=this.buffer.slice(0,100);return{length:t.readInt32BE(24),version:t.readInt32LE(28),shpCode:t.readInt32LE(32),bbox:[t.readDoubleLE(36),t.readDoubleLE(44),t.readDoubleLE(52),t.readDoubleLE(52)]}},a.prototype.getRows=function(){for(var t,e=100,r=this.buffer.byteLength,n=[];e>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t,e,r){var n=e.length-1;if(n=0?(i>0&&(t.lastNeed=i-1),i):--n=0?(i>0&&(t.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0)}function u(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}function h(t){var e=this.lastTotal-this.lastNeed,r=u(this,t,e);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){var r=s(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function c(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function d(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function p(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function m(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function g(t){return t.toString(this.encoding)}function y(t){return t&&t.length?this.write(t):""}var v=t("safe-buffer").Buffer,b=v.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};r.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r57343)i.push(o);else if(56320<=o&&o<=57343)i.push(65533);else if(55296<=o&&o<=56319)if(n===r-1)i.push(65533);else{var a=e.charCodeAt(n+1);if(56320<=a&&a<=57343){var s=1023&o,u=1023&a;i.push(65536+(s<<10)+u),n+=1}else i.push(65533)}n+=1}return i}function s(t){for(var e="",r=0;r>10),56320+(1023&n)))}return e}function u(t){return 0<=t&&t<=127}function h(t){this.tokens=[].slice.call(t),this.tokens.reverse()}function l(t,e){if(t)throw TypeError("Decoder error");return e||65533}function f(t){throw TypeError("The code point "+t+" could not be encoded.")}function c(){}function d(){}function p(t){return t=String(t).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(K,t)?K[t]:null}function m(t,e){return e?e[t]||null:null}function g(t,e){var r=e.indexOf(t);return-1===r?null:r}function y(t){if(!("encoding-indexes"in r))throw Error("Indexes missing. Did you forget to include encoding-indexes.js first?");return r["encoding-indexes"][t]}function v(t){if(t>39419&&t<189e3||t>1237575)return null;if(7457===t)return 59335;var e,r=0,n=0,i=y("gb18030-ranges");for(e=0;e>6*r)+i];r>0;){var a=e>>6*(r-1);o.push(128|63&a),r-=1}return o}}function S(t,e){var r=e.fatal;this.handler=function(e,n){if(n===X)return H;if(u(n))return n;var i=t[n-128];return null===i?l(r):i}}function O(t,e){e.fatal;this.handler=function(e,r){if(r===X)return H;if(V(r))return r;var n=g(r,t);return null===n&&f(r),n+128}}function A(t){var e=t.fatal,r=0,i=0,o=0;this.handler=function(t,a){if(a===X&&0===r&&0===i&&0===o)return H;a!==X||0===r&&0===i&&0===o||(r=0,i=0,o=0,l(e));var s;if(0!==o){s=null,n(a,48,57)&&(s=v(10*(126*(10*(r-129)+i-48)+o-129)+a-48));var h=[i,o,a];return r=0,i=0,o=0,null===s?(t.prepend(h),l(e)):s}if(0!==i)return n(a,129,254)?(o=a,null):(t.prepend([i,a]),r=0,i=0,l(e));if(0!==r){if(n(a,48,57))return i=a,null;var f=r,c=null;r=0;var d=a<127?64:65;return(n(a,64,126)||n(a,128,254))&&(c=190*(f-129)+(a-d)),s=null===c?null:m(c,y("gb18030")),null===s&&u(a)&&t.prepend(a),null===s?l(e):s}return u(a)?a:128===a?8364:n(a,129,254)?(r=a,null):l(e)}}function I(t,e){t.fatal;this.handler=function(t,r){if(r===X)return H;if(V(r))return r;if(58853===r)return f(r);if(e&&8364===r)return 128;var n=g(r,y("gb18030"));if(null!==n){var i=Y(n/190)+129,o=n%190;return[i,o+(o<63?64:65)]}if(e)return f(r);n=b(r);var a=Y(n/10/126/10);n-=10*a*126*10;var s=Y(n/10/126);n-=10*s*126;var u=Y(n/10);return[a+129,s+48,u+129,n-10*u+48]}}function k(t){var e=t.fatal,r=0;this.handler=function(t,i){if(i===X&&0!==r)return r=0,l(e);if(i===X&&0===r)return H;if(0!==r){var o=r,a=null;r=0;var s=i<127?64:98;switch((n(i,64,126)||n(i,161,254))&&(a=157*(o-129)+(i-s)),a){case 1133:return[202,772];case 1135:return[202,780];case 1164:return[234,772];case 1166:return[234,780]}var h=null===a?null:m(a,y("big5"));return null===h&&u(i)&&t.prepend(i),null===h?l(e):h}return u(i)?i:n(i,129,254)?(r=i,null):l(e)}}function T(t){t.fatal;this.handler=function(t,e){if(e===X)return H;if(V(e))return e;var r=_(e);if(null===r)return f(e);var n=Y(r/157)+129;if(n<161)return f(e);var i=r%157;return[n,i+(i<63?64:98)]}}function P(t){var e=t.fatal,r=!1,i=0;this.handler=function(t,o){if(o===X&&0!==i)return i=0,l(e);if(o===X&&0===i)return H;if(142===i&&n(o,161,223))return i=0,65216+o;if(143===i&&n(o,161,254))return r=!0,i=o,null;if(0!==i){var a=i;i=0;var s=null;return n(a,161,254)&&n(o,161,254)&&(s=m(94*(a-161)+(o-161),y(r?"jis0212":"jis0208"))),r=!1,n(o,161,254)||t.prepend(o),null===s?l(e):s}return u(o)?o:142===o||143===o||n(o,161,254)?(i=o,null):l(e)}}function R(t){t.fatal;this.handler=function(t,e){if(e===X)return H;if(V(e))return e;if(165===e)return 92;if(8254===e)return 126;if(n(e,65377,65439))return[142,e-65377+161];8722===e&&(e=65293);var r=g(e,y("jis0208"));return null===r?f(e):[Y(r/94)+161,r%94+161]}}function L(t){var e=t.fatal,r={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},i=r.ASCII,o=r.ASCII,a=0,s=!1;this.handler=function(t,u){switch(i){default:case r.ASCII:return 27===u?(i=r.EscapeStart,null):n(u,0,127)&&14!==u&&15!==u&&27!==u?(s=!1,u):u===X?H:(s=!1,l(e));case r.Roman:return 27===u?(i=r.EscapeStart,null):92===u?(s=!1,165):126===u?(s=!1,8254):n(u,0,127)&&14!==u&&15!==u&&27!==u&&92!==u&&126!==u?(s=!1,u):u===X?H:(s=!1,l(e));case r.Katakana:return 27===u?(i=r.EscapeStart,null):n(u,33,95)?(s=!1,65344+u):u===X?H:(s=!1,l(e));case r.LeadByte:return 27===u?(i=r.EscapeStart,null):n(u,33,126)?(s=!1,a=u,i=r.TrailByte,null):u===X?H:(s=!1,l(e));case r.TrailByte:if(27===u)return i=r.EscapeStart,l(e);if(n(u,33,126)){i=r.LeadByte;var h=94*(a-33)+u-33,f=m(h,y("jis0208"));return null===f?l(e):f}return u===X?(i=r.LeadByte,t.prepend(u),l(e)):(i=r.LeadByte,l(e));case r.EscapeStart:return 36===u||40===u?(a=u,i=r.Escape,null):(t.prepend(u),s=!1,i=o,l(e));case r.Escape:var c=a;a=0;var d=null;if(40===c&&66===u&&(d=r.ASCII),40===c&&74===u&&(d=r.Roman),40===c&&73===u&&(d=r.Katakana),36!==c||64!==u&&66!==u||(d=r.LeadByte),null!==d){i=i=d;var p=s;return s=!0,p?l(e):null}return t.prepend([c,u]),s=!1,i=o,l(e)}}}function j(t){var e=(t.fatal,{ASCII:0,Roman:1,jis0208:2}),r=e.ASCII;this.handler=function(t,n){if(n===X&&r!==e.ASCII)return t.prepend(n),r=e.ASCII,[27,40,66];if(n===X&&r===e.ASCII)return H;if(!(r!==e.ASCII&&r!==e.Roman||14!==n&&15!==n&&27!==n))return f(65533);if(r===e.ASCII&&V(n))return n;if(r===e.Roman&&(V(n)&&92!==n&&126!==n||165==n||8254==n)){if(V(n))return n;if(165===n)return 92;if(8254===n)return 126}if(V(n)&&r!==e.ASCII)return t.prepend(n),r=e.ASCII,[27,40,66];if((165===n||8254===n)&&r!==e.Roman)return t.prepend(n),r=e.Roman,[27,40,74];8722===n&&(n=65293);var i=g(n,y("jis0208"));return null===i?f(n):r!==e.jis0208?(t.prepend(n),r=e.jis0208,[27,36,66]):[Y(i/94)+33,i%94+33]}}function N(t){var e=t.fatal,r=0;this.handler=function(t,i){if(i===X&&0!==r)return r=0,l(e);if(i===X&&0===r)return H;if(0!==r){var o=r,a=null;r=0;var s=i<127?64:65,h=o<160?129:193;if((n(i,64,126)||n(i,128,252))&&(a=188*(o-h)+i-s),n(a,8836,10715))return 48508+a;var f=null===a?null:m(a,y("jis0208"));return null===f&&u(i)&&t.prepend(i),null===f?l(e):f}return u(i)||128===i?i:n(i,161,223)?65216+i:n(i,129,159)||n(i,224,252)?(r=i,null):l(e)}}function q(t){t.fatal;this.handler=function(t,e){if(e===X)return H;if(V(e)||128===e)return e;if(165===e)return 92;if(8254===e)return 126;if(n(e,65377,65439))return e-65377+161;8722===e&&(e=65293);var r=w(e);if(null===r)return f(e);var i=Y(r/188),o=i<31?129:193,a=r%188;return[i+o,a+(a<63?64:65)]}}function B(t){var e=t.fatal,r=0;this.handler=function(t,i){if(i===X&&0!==r)return r=0,l(e);if(i===X&&0===r)return H;if(0!==r){var o=r,a=null;r=0,n(i,65,254)&&(a=190*(o-129)+(i-65));var s=null===a?null:m(a,y("euc-kr"));return null===a&&u(i)&&t.prepend(i),null===s?l(e):s}return u(i)?i:n(i,129,254)?(r=i, null):l(e)}}function z(t){t.fatal;this.handler=function(t,e){if(e===X)return H;if(V(e))return e;var r=g(e,y("euc-kr"));return null===r?f(e):[Y(r/190)+129,r%190+65]}}function F(t,e){var r=t>>8,n=255&t;return e?[r,n]:[n,r]}function D(t,e){var r=e.fatal,i=null,o=null;this.handler=function(e,a){if(a===X&&(null!==i||null!==o))return l(r);if(a===X&&null===i&&null===o)return H;if(null===i)return i=a,null;var s;if(s=t?(i<<8)+a:(a<<8)+i,i=null,null!==o){var u=o;return o=null,n(s,56320,57343)?65536+1024*(u-55296)+(s-56320):(e.prepend(F(s,t)),l(r))}return n(s,55296,56319)?(o=s,null):n(s,56320,57343)?l(r):s}}function U(t,e){e.fatal;this.handler=function(e,r){if(r===X)return H;if(n(r,0,65535))return F(r,t);var i=F(55296+(r-65536>>10),t),o=F(56320+(r-65536&1023),t);return i.concat(o)}}function G(t){t.fatal;this.handler=function(t,e){return e===X?H:u(e)?e:63360+e-128}}function W(t){t.fatal;this.handler=function(t,e){return e===X?H:V(e)?e:n(e,63360,63487)?e-63360+128:f(e)}}void 0!==e&&e.exports&&!r["encoding-indexes"]&&t("./encoding-indexes.js");var Y=Math.floor,V=u,X=-1;h.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():X},prepend:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.push(e.pop());else this.tokens.push(t)},push:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.unshift(e.shift());else this.tokens.unshift(t)}};var H=-1;c.prototype={handler:function(t,e){}},d.prototype={handler:function(t,e){}};var Z=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"UTF-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"IBM866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"ISO-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"ISO-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"ISO-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"ISO-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"ISO-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"ISO-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"ISO-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"ISO-8859-8-I"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"ISO-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"ISO-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"ISO-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"ISO-8859-15"},{labels:["iso-8859-16"],name:"ISO-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"KOI8-R"},{labels:["koi8-ru","koi8-u"],name:"KOI8-U"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"GBK"},{labels:["gb18030"],name:"gb18030"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"Big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"EUC-JP"},{labels:["csiso2022jp","iso-2022-jp"],name:"ISO-2022-JP"},{labels:["csshiftjis","ms932","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"Shift_JIS"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"EUC-KR"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","hz-gb-2312","iso-2022-cn","iso-2022-cn-ext","iso-2022-kr"],name:"replacement"},{labels:["utf-16be"],name:"UTF-16BE"},{labels:["utf-16","utf-16le"],name:"UTF-16LE"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}],K={};Z.forEach(function(t){t.encodings.forEach(function(t){t.labels.forEach(function(e){K[e]=t})})});var J,Q,$={},tt={},et="utf-8";Object.defineProperty&&(Object.defineProperty(x.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(x.prototype,"fatal",{get:function(){return"fatal"===this._error_mode}}),Object.defineProperty(x.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}})),x.prototype.decode=function(t,e){function r(t){return!i(["UTF-8","UTF-16LE","UTF-16BE"],this._encoding.name)||this._ignoreBOM||this._BOMseen||(t.length>0&&65279===t[0]?(this._BOMseen=!0,t.shift()):t.length>0&&(this._BOMseen=!0)),s(t)}var n;n="object"==typeof t&&t instanceof ArrayBuffer?new Uint8Array(t):"object"==typeof t&&"buffer"in t&&t.buffer instanceof ArrayBuffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(0),e=o(e),this._do_not_flush||(this._decoder=tt[this._encoding.name]({fatal:"fatal"===this._error_mode}),this._BOMseen=!1),this._do_not_flush=Boolean(e.stream);for(var a,u=new h(n),l=[];;){var f=u.read();if(f===X)break;if((a=this._decoder.handler(u,f))===H)break;null!==a&&(Array.isArray(a)?l.push.apply(l,a):l.push(a))}if(!this._do_not_flush){do{if((a=this._decoder.handler(u,u.read()))===H)break;null!==a&&(Array.isArray(a)?l.push.apply(l,a):l.push(a))}while(!u.endOfStream());this._decoder=null}return r.call(this,l)},Object.defineProperty&&Object.defineProperty(M.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),M.prototype.encode=function(t,e){t=void 0===t?"":String(t),e=o(e),this._do_not_flush||(this._encoder=$[this._encoding.name]({fatal:"fatal"===this._fatal})),this._do_not_flush=Boolean(e.stream);for(var r,n=new h(a(t)),i=[];;){var s=n.read();if(s===X)break;if((r=this._encoder.handler(n,s))===H)break;Array.isArray(r)?i.push.apply(i,r):i.push(r)}if(!this._do_not_flush){for(;;){if((r=this._encoder.handler(n,n.read()))===H)break;Array.isArray(r)?i.push.apply(i,r):i.push(r)}this._encoder=null}return new Uint8Array(i)},$["UTF-8"]=function(t){return new C(t)},tt["UTF-8"]=function(t){return new E(t)},function(){"encoding-indexes"in r&&Z.forEach(function(t){"Legacy single-byte encodings"===t.heading&&t.encodings.forEach(function(t){var e=t.name,r=y(e.toLowerCase());tt[e]=function(t){return new S(r,t)},$[e]=function(t){return new O(r,t)}})})}(),tt.GBK=function(t){return new A(t)},$.GBK=function(t){return new I(t,!0)},$.gb18030=function(t){return new I(t)},tt.gb18030=function(t){return new A(t)},$.Big5=function(t){return new T(t)},tt.Big5=function(t){return new k(t)},$["EUC-JP"]=function(t){return new R(t)},tt["EUC-JP"]=function(t){return new P(t)},$["ISO-2022-JP"]=function(t){return new j(t)},tt["ISO-2022-JP"]=function(t){return new L(t)},$.Shift_JIS=function(t){return new q(t)},tt.Shift_JIS=function(t){return new N(t)},$["EUC-KR"]=function(t){return new z(t)},tt["EUC-KR"]=function(t){return new B(t)},$["UTF-16BE"]=function(t){return new U(!0,t)},tt["UTF-16BE"]=function(t){return new D(!0,t)},$["UTF-16LE"]=function(t){return new U(!1,t)},tt["UTF-16LE"]=function(t){return new D(!1,t)},$["x-user-defined"]=function(t){return new W(t)},tt["x-user-defined"]=function(t){return new G(t)},r.TextEncoder||(r.TextEncoder=M),r.TextDecoder||(r.TextDecoder=x),void 0!==e&&e.exports&&(e.exports={TextEncoder:r.TextEncoder,TextDecoder:r.TextDecoder,EncodingIndexes:r["encoding-indexes"]})}(this||{})},{"./encoding-indexes.js":29}],97:[function(t,e,r){"use strict";function n(t,e){if(!(this instanceof n))return new n(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||i,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)}function i(t,e){return te?1:0}e.exports=n,e.exports.default=n,n.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},peek:function(){return this.data[0]},_up:function(t){for(var e=this.data,r=this.compare,n=e[t];t>0;){var i=t-1>>1,o=e[i];if(r(n,o)>=0)break;e[t]=o,t=i}e[t]=n},_down:function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];t=0)break;e[t]=s,t=o}e[t]=i}}},{}],98:[function(t,e,r){"use strict";function n(t,e,r){var n=t*e,o=i*t,a=o-t,s=o-a,u=t-s,h=i*e,l=h-e,f=h-l,c=e-f,d=n-s*f,p=d-u*f,m=p-s*c,g=u*c-m;return r?(r[0]=g,r[1]=n,r):[g,n]}e.exports=n;var i=+(Math.pow(2,27)+1)},{}],99:[function(t,e,r){"use strict";function n(t,e,r){var n=t+e,i=n-t,o=n-i,a=e-i,s=t-o;return r?(r[0]=s+a,r[1]=n,r):[s+a,n]}e.exports=n},{}],100:[function(t,e,r){(URI=function(t){this.value=t,this.length=t.length,String.call(this,t)}).prototype={__proto__:String.prototype,value:"",length:0,toString:function(){return this.value.toString()},valueOf:function(){return this.value},defrag:function(){var t=this.indexOf("#");return t<0?this:new URI(this.slice(0,t))},scheme:function(){var t=this.match(/^[a-z0-9\-\+\.]+:/i);return null==t?null:t.shift()},heirpart:function(){var t=this.value,e=t.indexOf("?");return e>=0?t=t.substring(0,e):(e=t.indexOf("#"))>=0&&(t=t.substring(0,e)),e=this.scheme(),e&&(t=t.slice(e.length)),new URI.HeirPart(t)},querystring:function(){var t=this.indexOf("?");if(t<0)return null;var e=this.indexOf("#");return e<0?this.slice(t):this.substring(t,e)},fragment:function(){var t=this.indexOf("#");return t<0?null:this.slice(t)},isAbsolute:function(){return null!=this.scheme()&&null!=this.heirpart()&&null==this.fragment()},toAbsolute:function(){if(null==this.scheme()||null==this.heirpart())throw"URI must have a scheme and a hierpart.";return this.resolveReference(this).defrag()},removeDotSegments:function(t){for(var e="",r=null;t.length>0;)"../"==t.substr(0,3)||"./"==t.substr(0,2)?t=t.slice(t.indexOf("/")):"/."==t?t="/":"/./"==t.substr(0,3)?t=t.slice(2):"/../"==t.substr(0,4)||"/.."==t?(t="/.."==t?"/":t.slice(3),r=e.lastIndexOf("/"),e=r?e.substring(0,r):""):".."==t.substr(0,2)||"."==t.substr(0,1)?(t=t.slice(t.indexOf(".")),(r=t.indexOf("."))&&(t=t.slice(r))):("/"==t.substr(0,1)&&(e+="/",t=t.slice(1)),r=t.indexOf("/"),r<0?(e+=t,t=""):(e+=t.substring(0,r),t=t.slice(r)));return e},resolveReference:function(t){if("string"==typeof t&&(t=new URI(t)),!(t instanceof URI))throw"Expected an URI or a String";var e={scheme:"",authority:"",path:"",query:"",fragment:""},r=null;return t.scheme()?(e.scheme=t.scheme(),r=t.heirpart().authority(),e.authority+=r?"//"+r:"",e.path=this.removeDotSegments(t.heirpart().path()),r=t.querystring(),e.query+=r||""):(r=t.heirpart().authority(),r?(e.authority=r?"//"+r:"",e.path=this.removeDotSegments(t.heirpart().path()),r=t.querystring(),e.query+=r||""):(r=t.heirpart().path(),""==r?(e.path=this.heirpart().path(),r=t.querystring(),r?e.query+=r||"":(r=this.querystring(),e.query+=r||"")):("/"==r.substring(0,1)?e.path=this.removeDotSegments(r):(this.heirpart().path()?(r=this.heirpart().path().lastIndexOf("/"),r&&(e.path=this.heirpart().path().substring(0,++r)),e.path+=t.heirpart().path()):e.path="/"+r,e.path=this.removeDotSegments(e.path)),r=t.querystring(),e.query+=r||""),r=this.heirpart().authority(),e.authority=r?"//"+r:""),e.scheme=this.scheme()),r=t.fragment(),e.fragment=r||"",new URI(e.scheme+e.authority+e.path+e.query+e.fragment)}},(URI.HeirPart=function(t){this.value=t,this.length=t.length,String.call(this,t)}).prototype={__proto__:String.prototype,toString:function(){return this.value.toString()},valueOf:function(){return this.value},authority:function(){if("//"!=this.substring(0,2))return null;var t=this.slice(2),e=t.indexOf("/");return e>=0&&(t=t.substr(0,e)),new URI.Authority(t)},path:function(){var t=this.authority();return t?new URI.Path(this.slice(t.length+2)):new URI.Path(this)}},(URI.Authority=function(t){this.value=t,this.length=t.length,String.call(this,t)}).prototype={__proto__:String.prototype,toString:function(){return this.value.toString()},valueOf:function(){return this.value},userinfo:function(){var t=this.indexOf("@");return t<0?null:this.substr(0,t)},host:function(){var t=this.value,e=t.indexOf("@");return e>=0&&(t=t.slice(++e)),0==t.indexOf("[")&&(e=t.indexOf("]"))>0?t.substring(0,++e):(e=t.lastIndexOf(":"),e>=0?t.substring(0,e):t)},port:function(){var t=this.value,e=t.indexOf("@");return e>=0&&(t=t.slice(e)),0==t.indexOf("[")&&(e=t.indexOf("]"))>0&&(t=t.slice(e)),(e=t.lastIndexOf(":"))<0?null:(t=t.slice(++e),0==t.length?null:t)}},(URI.Path=function(t){this.value=t,this.length=t.length,String.call(this,t)}).prototype={__proto__:String.prototype,toString:function(){return this.value.toString()},valueOf:function(){return this.value}},e.exports=URI},{}],101:[function(e,r,n){!function(t){"use strict";t(function(t){return t("./makePromise")({scheduler:new(t("./Scheduler"))(t("./env").asap)})})}("function"==typeof t&&t.amd?t:function(t){r.exports=t(e)})},{"./Scheduler":102,"./env":114,"./makePromise":116}],102:[function(e,r,n){!function(t){"use strict";t(function(){function t(t){this._async=t,this._running=!1,this._queue=this,this._queueLen=0,this._afterQueue={},this._afterQueueLen=0;var e=this;this.drain=function(){e._drain()}}return t.prototype.enqueue=function(t){this._queue[this._queueLen++]=t,this.run()},t.prototype.afterQueue=function(t){this._afterQueue[this._afterQueueLen++]=t,this.run()},t.prototype.run=function(){this._running||(this._running=!0,this._async(this.drain))},t.prototype._drain=function(){for(var t=0;t>>0,h=u,l=[],f=0;f0){s.become(i),t._visitRemaining(e,f,i);break}i.visit(s,r,n)}else--h;return 0===h&&s.reject(new RangeError("any(): array must not be empty")),a}function i(e,r){function n(t){this.resolved||(l.push(t),0==--d&&(f=null,this.resolve(l)))}function i(t){this.resolved||(f.push(t),0==--o&&(l=null,this.reject(f)))}var o,a,s,u=t._defer(),h=u._handler,l=[],f=[],c=e.length>>>0,d=0;for(s=0;sd?h.reject(new RangeError("some(): array must contain at least "+r+" item(s), but had "+d)):0===d&&h.resolve(l),s=0;s2?g.call(t,c(e),arguments[2]):g.call(t,c(e))}function f(t,e){return arguments.length>2?y.call(t,c(e),arguments[2]):y.call(t,c(e))}function c(t){return function(e,r,n){return d(t,void 0,[e,r,n])}}var d=r(t),p=t.resolve,m=t.all,g=Array.prototype.reduce,y=Array.prototype.reduceRight,v=Array.prototype.slice;return t.any=n,t.some=i,t.settle=u,t.map=o,t.filter=a,t.reduce=l,t.reduceRight=f,t.prototype.spread=function(t){return this.then(m).then(function(e){return t.apply(this,e)})},t}})}("function"==typeof t&&t.amd?t:function(t){r.exports=t(e)})},{"../apply":104,"../state":117}],106:[function(e,r,n){!function(t){"use strict";t(function(){function t(){throw new TypeError("catch predicate must be a function")}function e(t,e){return r(e)?t instanceof e:e(t)}function r(t){return t===Error||null!=t&&t.prototype instanceof Error}function n(t){return("object"==typeof t||"function"==typeof t)&&null!==t}function i(t){return t}return function(r){function o(t,r){return function(n){return e(n,r)?t.call(this,n):h(n)}}function a(t,e,r,i){var o=t.call(e);return n(o)?s(o,r,i):r(i)}function s(t,e,r){return u(t).then(function(){return e(r)})}var u=r.resolve,h=r.reject,l=r.prototype.catch;return r.prototype.done=function(t,e){this._handler.visit(this._handler.receiver,t,e)},r.prototype.catch=r.prototype.otherwise=function(e){return arguments.length<2?l.call(this,e):"function"!=typeof e?this.ensure(t):l.call(this,o(arguments[1],e))},r.prototype.finally=r.prototype.ensure=function(t){return"function"!=typeof t?this:this.then(function(e){return a(t,this,i,e)},function(e){return a(t,this,h,e)})},r.prototype.else=r.prototype.orElse=function(t){return this.then(void 0,function(){return t})},r.prototype.yield=function(t){return this.then(function(){return t})},r.prototype.tap=function(t){return this.then(t).yield(this)},r}})}("function"==typeof t&&t.amd?t:function(t){r.exports=t()})},{}],107:[function(e,r,n){!function(t){"use strict";t(function(){return function(t){return t.prototype.fold=function(e,r){var n=this._beget();return this._handler.fold(function(r,n,i){t._handler(r).fold(function(t,r,n){n.resolve(e.call(this,r,t))},n,this,i)},r,n._handler.receiver,n._handler),n},t}})}("function"==typeof t&&t.amd?t:function(t){r.exports=t()})},{}],108:[function(e,r,n){!function(t){"use strict";t(function(t){var e=t("../state").inspect;return function(t){return t.prototype.inspect=function(){return e(t._handler(this))},t}})}("function"==typeof t&&t.amd?t:function(t){r.exports=t(e)})},{"../state":117}],109:[function(e,r,n){!function(t){"use strict";t(function(){return function(t){function e(t,e,n,i){return r(function(e){return[e,t(e)]},e,n,i)}function r(t,e,i,o){function a(o,a){return n(i(o)).then(function(){return r(t,e,i,a)})}return n(o).then(function(r){return n(e(r)).then(function(e){return e?r:n(t(r)).spread(a)})})}var n=t.resolve;return t.iterate=e,t.unfold=r,t}})}("function"==typeof t&&t.amd?t:function(t){r.exports=t()})},{}],110:[function(e,r,n){!function(t){"use strict";t(function(){return function(t){return t.prototype.progress=function(t){return this.then(void 0,void 0,t)},t}})}("function"==typeof t&&t.amd?t:function(t){r.exports=t()})},{}],111:[function(e,r,n){!function(t){"use strict";t(function(t){function e(t,e,n,i){return r.setTimer(function(){t(n,i,e)},e)}var r=t("../env"),n=t("../TimeoutError");return function(t){function i(t,r,n){e(o,t,r,n)}function o(t,e){e.resolve(t)}function a(t,e,r){var i=void 0===t?new n("timed out after "+r+"ms"):t;e.reject(i)}return t.prototype.delay=function(t){var e=this._beget();return this._handler.fold(i,t,void 0,e._handler),e},t.prototype.timeout=function(t,n){var i=this._beget(),o=i._handler,s=e(a,t,n,i._handler);return this._handler.visit(o,function(t){r.clearTimer(s),this.resolve(t)},function(t){r.clearTimer(s),this.reject(t)},o.notify),i},t}})}("function"==typeof t&&t.amd?t:function(t){r.exports=t(e)})},{"../TimeoutError":103,"../env":114}],112:[function(e,r,n){!function(t){"use strict";t(function(t){function e(t){throw t}function r(){}var n=t("../env").setTimer,i=t("../format");return function(t){function o(t){t.handled||(d.push(t),l("Potentially unhandled rejection ["+t.id+"] "+i.formatError(t.value)))}function a(t){var e=d.indexOf(t);e>=0&&(d.splice(e,1),f("Handled previous rejection ["+t.id+"] "+i.formatObject(t.value)))}function s(t,e){c.push(t,e),null===p&&(p=n(u,0))}function u(){for(p=null;c.length>0;)c.shift()(c.shift())}var h,l=r,f=r;"undefined"!=typeof console&&(h=console,l=void 0!==h.error?function(t){h.error(t)}:function(t){h.log(t)},f=void 0!==h.info?function(t){h.info(t)}:function(t){h.log(t)}),t.onPotentiallyUnhandledRejection=function(t){s(o,t)},t.onPotentiallyUnhandledRejectionHandled=function(t){s(a,t)},t.onFatalRejection=function(t){s(e,t.value)};var c=[],d=[],p=null;return t}})}("function"==typeof t&&t.amd?t:function(t){r.exports=t(e)})},{"../env":114,"../format":115}],113:[function(e,r,n){!function(t){"use strict";t(function(){return function(t){return t.prototype.with=t.prototype.withThis=function(t){var e=this._beget(),r=e._handler;return r.receiver=t,this._handler.chain(r,t),e},t}})}("function"==typeof t&&t.amd?t:function(t){r.exports=t()})},{}],114:[function(e,r,n){(function(n){!function(t){"use strict";t(function(t){var e,r="undefined"!=typeof setTimeout&&setTimeout,i=function(t,e){return setTimeout(t,e)},o=function(t){return clearTimeout(t)},a=function(t){return r(t,0)};if(function(){return void 0!==n&&"[object process]"===Object.prototype.toString.call(n)}())a=function(t){return n.nextTick(t)};else if(e=function(){return"undefined"!=typeof MutationObserver&&MutationObserver||"undefined"!=typeof WebKitMutationObserver&&WebKitMutationObserver}())a=function(t){function e(){var t=r;r=void 0,t()}var r,n=document.createTextNode("");new t(e).observe(n,{characterData:!0});var i=0;return function(t){r=t,n.data=i^=1}}(e);else if(!r){var s=t,u=s("vertx");i=function(t,e){return u.setTimer(e,t)},o=u.cancelTimer,a=u.runOnLoop||u.runOnContext}return{setTimer:i,clearTimer:o,asap:a}})}("function"==typeof t&&t.amd?t:function(t){r.exports=t(e)})}).call(this,e("_process"))},{_process:81}],115:[function(e,r,n){!function(t){"use strict";t(function(){function t(t){var r="object"==typeof t&&null!==t&&(t.stack||t.message)?t.stack||t.message:e(t);return t instanceof Error?r:r+" (WARNING: non-Error used)"}function e(t){var e=String(t);return"[object Object]"===e&&"undefined"!=typeof JSON&&(e=r(t,e)),e}function r(t,e){try{return JSON.stringify(t)}catch(t){return e}}return{formatError:t,formatObject:e,tryStringify:r}})}("function"==typeof t&&t.amd?t:function(t){r.exports=t()})},{}],116:[function(e,r,n){(function(e){!function(t){"use strict";t(function(){return function(t){function r(t,e){this._handler=t===w?e:n(t)}function n(t){function e(t){i.resolve(t)}function r(t){i.reject(t)}function n(t){i.notify(t)}var i=new x;try{t(e,r,n)}catch(t){r(t)}return i}function i(t){return j(t)?t:new r(w,new M(y(t)))}function o(t){return new r(w,new M(new S(t)))}function a(){return et}function s(){return new r(w,new x)}function u(t,e){return new e(w,new x(t.receiver,t.join().context))}function h(t){return f(Y,null,t)}function l(t,e){return f(F,t,e)}function f(t,e,n){function i(r,i,a){a.resolved||c(n,o,r,t(e,i,r),a)}function o(t,e,r){l[t]=e,0==--h&&r.become(new C(l))}for(var a,s="function"==typeof e?i:o,u=new x,h=n.length>>>0,l=new Array(h),f=0;f0?e(r,o.value,i):(i.become(o),d(t,r+1,o))}else e(r,n,i)}function d(t,e,r){for(var n=e;n0||"function"!=typeof e&&i<0)return new this.constructor(w,n);var o=this._beget(),a=o._handler;return n.chain(a,n.receiver,t,e,r),o},r.prototype.catch=function(t){return this.then(void 0,t)},r.prototype._beget=function(){return u(this._handler,this.constructor)},r.all=h,r.race=m,r._traverse=l,r._visitRemaining=d,w.prototype.when=w.prototype.become=w.prototype.notify=w.prototype.fail=w.prototype._unreport=w.prototype._report=V,w.prototype._state=0,w.prototype.state=function(){return this._state},w.prototype.join=function(){for(var t=this;void 0!==t.handler;)t=t.handler;return t},w.prototype.chain=function(t,e,r,n,i){this.when({resolver:t,receiver:e,fulfilled:r,rejected:n,progress:i})},w.prototype.visit=function(t,e,r,n){this.chain(Q,t,e,r,n)},w.prototype.fold=function(t,e,r,n){this.when(new L(t,e,r,n))},W(w,_),_.prototype.become=function(t){t.fail()};var Q=new _;W(w,x),x.prototype._state=0,x.prototype.resolve=function(t){this.become(y(t))},x.prototype.reject=function(t){this.resolved||this.become(new S(t))},x.prototype.join=function(){if(!this.resolved)return this;for(var t=this;void 0!==t.handler;)if((t=t.handler)===this)return this.handler=I();return t},x.prototype.run=function(){var t=this.consumers,e=this.handler;this.handler=this.handler.join(),this.consumers=void 0;for(var r=0;r0?r(n.value):e(n.value)}return{pending:t,fulfilled:r,rejected:e,inspect:n}})}("function"==typeof t&&t.amd?t:function(t){r.exports=t()})},{}],118:[function(e,r,n){!function(t){"use strict";t(function(t){function e(t,e,r,n){var i=M.resolve(t);return arguments.length<2?i:i.then(e,r,n)}function r(t){return new M(t)}function n(t){return function(){for(var e=0,r=arguments.length,n=new Array(r);er.x?i.xMax:r.x,i.yMax=i.yMax>r.y?i.yMax:r.y}return i}function n(t,e){var r=e.xMax-e.xMin,n=e.yMin-e.yMax,i=Math.abs(t[0]-e.xMin),a=t[1]-e.yMax,s=i/r,u=a/n;return{x:s*o.width,y:u*o.height}}function i(t,e){var r=e.xMax-e.xMin,n=e.yMin-e.yMax;return[t.x/o.width*r,t.y/o.height*n]}var o={width:t,height:e};this.project=n,this.unproject=i,this.getBoundingRect=r}e.exports=n},{}],120:[function(t,e,r){var n=t("shpjs/lib/index.js"),i=t("when"),o=t("./utils/readAsArrayBuffer"),a=t("./utils/readAsText"),s=t("./utils/Path");n.groupFiles=function(t){for(var e={},r=0;r0){for(var r,s,u,h=i.defer(),l=h.promise,f=0;f0&&(r=t[f]),t[f].name.toLocaleLowerCase().indexOf(".prj")>0&&(u=t[f]),t[f].name.toLocaleLowerCase().indexOf(".dbf")>0&&(s=t[f]);return r&&u&&s?(o(r).then(function(t){a(u).then(function(i){o(s).then(function(o){var a=n.combine([n.parseShp(t,i),n.parseDbf(o,e)]);a.fileName=r.name.toLocaleLowerCase(),h.resolve(a)}).otherwise(function(t){h.reject(t)})}).otherwise(function(t){h.reject(t)})}).otherwise(function(t){h.reject(t)}),l):(h.reject(new Error("打开文件失败,请通过ctrl+同时选择shp、prj、dbf三个文件")),l)}throw new Error("文件列表不能为空")},e.exports=n},{"./utils/Path":182,"./utils/readAsArrayBuffer":185,"./utils/readAsText":186,"shpjs/lib/index.js":91,when:118}],121:[function(t,e,r){function n(t){return"undefined"!=typeof Cesium?"string"==typeof t?t=Cesium.Color.fromCssColorString(t):Array.isArray(t)&&(t=Cesium.Color.fromBytes(t[0],t[1],t[2],t[3])):Array.isArray(t)&&(t="rgba("+[t[0],t[1],t[2],o(t[3],0)/255].join(",")+")"),t}function i(t){if("undefined"==typeof document)return t;t=o(t,{}),this.fillColor=o(n(t.fillColor),n([0,255,255,30])),this.fill=o(t.fill,!0),this.labelStroke=t.labelStroke,this.labelStrokeWidth=o(t.labelStrokeWidth,1),this.labelStrokeColor=o(n(t.labelStrokeColor),n([160,99,57])),this.outlineColor=o(n(t.outlineColor),n("yellow")),this.backgroundColor=n(t.backgroundColor),this.lineWidth=o(t.lineWidth,1.5),this.outline=o(t.outline,!0),this.fontColor=n(o(t.fontColor,"black")),this.fontSize=o(t.fontSize,16),this.fontFamily=o(t.fontFamily,"宋体"),this.pointSize=o(t.pointSize,4),this.pointColor=n(o(t.pointColor,"yellow")),this.pointStyle=o(t.pointStyle,"Ring"),this.labelPropertyName=o(t.labelPropertyName,"NAME"),this.ringRadius=o(t.ringRadius,2),this.circleLineWidth=o(t.circleLineWidth,2),a(t.showMaker)&&(this.showMarker=o(t.showMaker,!0)),a(t.showMarker)&&(this.showMarker=o(t.showMarker,!0)),this.showLabel=o(t.showLabel,!0),this.showCenterLabel=o(t.showCenterLabel,!1),this.centerLabelPropertyName=t.centerLabelPropertyName,this.labelOffsetX=o(t.labelOffsetX,0),this.labelOffsetY=o(t.labelOffsetY,0),this.markerImage=t.markerImage,this.lineDash=t.lineDash,this.lineCap=o(t.lineCap,"butt"),this.lineJoin=o(t.lineJoin,"miter"),this.shadowColor=n(t.shadowColor),this.shadowBlur=t.shadowBlur,this.shadowOffsetX=t.shadowOffsetX,this.shadowOffsetY=t.shadowOffsetY,this.miterLimit=o(t.miterLimit,10),this.markerImageEl=null;var e=s.defer();this.readyPromise=e.promise;var r=this;if("string"==typeof this.markerImage){var i=new Image;i.onload=function(){r.markerImageEl=this,e.resolve(!0)},i.onerror=function(t){e.reject(t)},i.src=this.markerImage}else(this.markerImage instanceof Image||this.markerImage instanceof HTMLCanvasElement)&&(this.markerImageEl=this.markerImage),setTimeout(function(){e.resolve(!0)},10)}var o=t("./cesium/Core/defaultValue"),a=t("./cesium/Core/defined"),s=t("when");i.prototype.clone=function(){var t=new i;for(var e in this)this.hasOwnProperty(e)&&("undefined"!=typeof Cesium&&this[e]instanceof Cesium.Color?t[e]=Cesium.Color.clone(this[e]):t[e]=this[e]);return t},i.Default=new i,e.exports=i},{"./cesium/Core/defaultValue":158,"./cesium/Core/defined":160,when:118}],122:[function(t,e,r){function n(t){if(!(t.length>=3))return!1;for(var e,r,n,i=0;i0&&(e=t[i]),t[i].name.toLocaleLowerCase().indexOf(".prj")>0&&(n=t[i]),t[i].name.toLocaleLowerCase().indexOf(".dbf")>0&&(r=t[i])}return!!(e&&n&&r)}function i(t){function e(t){u._allowPick&&(u._geoJSON=t);var e,r=u._simplifyTolerance,n=[],o=[],a=[],s=[],h=!0,l=!0,f=!0;u._defaultStyle.showCenterLabel&&u._defaultStyle.centerLabelPropertyName&&(u._defaultStyle.showLabel=!0,u._defaultStyle.labelPropertyName=u._defaultStyle.centerLabelPropertyName,function(t,e){var r={};w.featureEach(t,function(t){var n=t.geometry;n||("Polygon"==n.type||"MultiPolygon"==n.type)&&u._defaultStyle.showCenterLabel&&u._defaultStyle.centerLabelPropertyName&&t.properties.hasOwnProperty(e)&&(r[t.properties[e]]||(r[t.properties[e]]=[]),r[t.properties[e]].push(t))});for(var n=Object.keys(r),i=0;i0&&(u._lineGeoJSON=w.featureCollection(n),n=null),o.length>0&&(o.forEach(function(t){t.properties.isOutline=!0}),u._outlineGeoJSON=w.featureCollection(o),o=null),a.length>0&&(u._pointGeoJSON=w.featureCollection(a),a=null),s.length>0&&(u._polygonJSON=w.featureCollection(s),s=null),u._lineOnly=l,u._polygonOnly=f,u._onlyPoint=h,u._state=i.State.LOADED;var m=w.bbox(t);m[0]==m[2]&&(m[0]=m[0]-.1,m[2]=m[2]+.1),m[1]==m[3]&&(m[1]=m[1]-.1,m[3]=m[3]+.1),u._bbox=_.fromDegrees(m[0],m[1],m[2],m[3]),u._rectangle||(u._rectangle=u._bbox),t=null,b.resolve(u)}if(t=g(t,{}),m(t.source)){var r=null,o=!1;if("string"==typeof t.source){var a=t.source.toLowerCase();if(".shp"!==(r=f.GetExtension(a))&&".json"!==r&&".geojson"!==r&&".topojson"!==r)throw new Error("The data options.source provider is not supported.")}else if(t.source.type&&"FeatureCollection"==t.source.type);else{if(!n(t.source))throw new Error("The data options.source provider is not supported.");o=!0}this._rectangle=t.rectangle,this._tilingScheme=new Cesium.GeographicTilingScheme({ellipsoid:t.ellipsoid}),this._tileWidth=g(t.tileWidth,256),this._tileHeight=g(t.tileHeight,256),this._url=t.source,this._fileExtension=r,this._removeDuplicate=g(t.removeDuplicate,!0),this._allowPick=g(t.allowPick,!1),this._simplifyTolerance=g(t.simplifyTolerance,.01),this._simplify=g(t.simplify,!1),this._maximumLevel=g(t.maximumLevel,22),this._minimumLevel=g(t.minimumLevel,3),this._showMaximumLevel=g(t.showMaximumLevel,!0),this._makerImage=t.markerImage,this._tileCacheSize=g(t.tileCacheSize,200),"object"!=typeof t.defaultStyle||t.defaultStyle instanceof c||(t.defaultStyle=new c(t.defaultStyle)),this._defaultStyle=g(t.defaultStyle,c.Default.clone()),this._styleFilter="function"==typeof t.styleFilter?t.styleFilter:void 0,this.clustering=t.clustering,this._errorEvent=new y,this._featuresPicked=new y;var s=v.defer();this._readyPromise=s.promise,this._ready=!1,this._state=i.State.READY,this._cache={},this._count=0,this.zIndex=t.zIndex,this._bbox=null,this._geoJSON=null;var u=this,l=[];if("string"==typeof this._makerImage){var d=v.defer(),p=new Image;p.onload=function(){d.resolve(this),u._makerImageEl=this},p.onerror=function(t){d.resolve(t)},p.src=this._makerImage,l.push(d.promise)}var b=v.defer();if(l.push(b.promise),this._state=i.State.SHPLOADING,r)switch(r){case".shp":var x=this._url,r=f.GetExtension(x);if(x=x.replace(r,""),"function"==typeof shp)shp(x,void 0,"gbk").then(e,function(t){console.log("load shp file error:"+t)});else{if("function"!=typeof i.shp)throw new Error("找不到shp()方法,请确认是否引用了shpjs");i.shp(x,void 0,"gbk").then(e,function(t){console.log("load shp file error:"+t),u.readyPromise.reject(t)})}break;case".json":case".geojson":case".topojson":h(this._url).then(function(t){e(t)}).otherwise(function(t){console.log(t)});break;default:throw new Error("The file options.source provider is not supported.")}else if(o){if("undefined"==typeof shp){if("function"!=typeof i.shp)throw new Error("找不到shp()方法,请确认是否引用了shpjs");shp=i.shp}var M=shp.parseShpFiles(u._url);M?M.then(e).otherwise(function(t){s.reject(t)}):s.reject(new Error("The file options.source provider is not supported."))}else setTimeout(function(){Array.isArray(u._url)?s.reject(new Error("The data options.source provide is not supported.")):e(u._url)},10);this._lineGeoJSON=null,this._outlineGeoJSON=null,this._pointGeoJSON=null,this._polygonJSON=null,this._onlyPoint=!1,this._lineOnly=!1,this._polygonOnly=!1,v.all(l).then(function(){u._ready=u._state==i.State.LOADED,u._createCanvas(),i.instanceCount++,s.resolve(!0),u._state=i.State.COMPELTED}).otherwise(function(t){s.reject(t)})}}function o(t,e,r,n,i,o){var a=t.canvas,s=t.getImageData(0,0,a.width,a.height),u=document.createElement("canvas");u.width=a.width,u.height=a.height;var h=u.getContext("2d"),l=[];o.map(function(t){h.clearRect(0,0,u.width,u.height),h.beginPath();var o=0;t.map(function(t){var a=e.project(t,r);0==o?h.moveTo(n+a.x,i+a.y):h.lineTo(n+a.x,i+a.y),o++}),h.closePath(),h.fillStyle="rgba(255,255,255,1)",h.fill(),l=h.getImageData(0,0,u.width,u.height).data;for(var a=3;a0&&(s.data[a]=0)}),t.putImageData(s,0,0)}function a(t,e,r,n,i,o,a,s,u){var h=0,l=[];if(o.map(function(o){if(!a||h<=0){var u=0;t.beginPath(),o.map(function(o){var a=e.project(o,r);0==u?t.moveTo(n+a.x,i+a.y):t.lineTo(n+a.x,i+a.y),u++}),a&&(t.closePath(),t.fill()),s&&t.stroke()}else l.push(o);h++}),a)return l;l=null}function s(t,e,r,n,i,o,a,s,u,h){void 0===u&&(u="NAME");var l=Object.assign({pointSize:3,fontSize:9,fontFamily:"courier",color:"rgb(0,0,0)",backgroundColor:"rgb(255,0,0)",pointStyle:"Solid",ringRadius:2,circleLineWidth:1,showMarker:!0,showLabel:!0,labelOffsetX:0,labelOffsetY:0,markerSymbol:void 0},h);t.font=l.fontSize+"px "+l.fontFamily+" bold";var f=o.geometry.coordinates,c=(f[0]-r.xMin)/(r.xMax-r.xMin),p=(f[1]-r.yMax)/(r.yMin-r.yMax),m={x:c*t.canvas.width,y:p*t.canvas.height};if(l.showMarker||l.showMarker){var g=m.x+n,y=m.y+i;if(l.markerSymbol&&(l.markerSymbol instanceof Image||l.markerSymbol instanceof HTMLCanvasElement)){var v=l.markerSymbol.height,b=l.markerSymbol.width;g-=b/2,y-=v/2,l.markerSymbol.width&&l.markerSymbol.height&&t.drawImage(l.markerSymbol,g,y)}else g-=l.pointSize,y-=l.pointSize,t.fillStyle=l.backgroundColor,t.beginPath(),t.arc(g,y,l.pointSize,0,2*Math.PI),"Solid"==l.pointStyle?t.fill():"Circle"==l.pointStyle?(t.lineWidth=l.circleLineWidth,t.strokeStyle=l.backgroundColor,t.stroke()):"Ring"==l.pointStyle&&(t.strokeStyle=l.backgroundColor,t.stroke(),t.beginPath(),t.arc(g,y,l.ringRadius,0,2*Math.PI),t.closePath(),t.fill())}if(l.showLabel){var w=o.properties[u];if(w){"string"!=typeof w&&(w=w.toString()),t.fillStyle=l.color;var g=m.x+n+l.labelOffsetX;y=m.y+i+l.labelOffsetY,w=w.trim();var _=d(w,{fill:!0,font:l.fontSize+"px "+l.fontFamily,stroke:l.labelStroke,strokeWidth:l.labelStrokeWidth,strokeColor:"string"==typeof l.labelStrokeColor?Cesium.Color.fromCssColorString(l.labelStrokeColor):l.labelStrokeColor,fillColor:Cesium.Color.fromCssColorString(l.color)}),v=_.height,b=_.width;g-=b/2+l.pointSize,y-=v/2+l.pointSize,_.width&&_.height&&t.drawImage(_,g,y)}}t.restore()}function u(t){if(x||(x=document.createElement("canvas"),x.width=256,x.height=256),t){var e=x.getContext("2d");t instanceof Cesium.Color?e.fillStyle=t.toCssColorString():e.fillStyle=t,e.fillRect(0,0,x.width,x.height)}else{var e=x.getContext("2d");e.clearRect(0,0,x.width,x.height)}return x}var h=t("./cesium/Core/Resource").fetchJson,l=t("./LonLatProjection"),f=t("./utils/Path"),c=t("./VectorStyle"),d=t("./utils/drawText"),p=t("./cesium/Core/defineProperties"),m=t("./cesium/Core/defined"),g=t("./cesium/Core/defaultValue"),y=t("./cesium/Core/Event"),v=t("when"),b=t("./cesium/Core/Math"),w=t("./turf-light"),_=t("./cesium/Core/Rectangle");"undefined"!=typeof Cesium&&Cesium.ImageryLayerCollection&&(Cesium.ImageryLayerCollection.prototype.orderByZIndex=function(){for(var t=[],e=0;ee.zIndex?1:t.zIndex0){for(var n=!0,i=0;i0){n=!1;break}n||o.push(c)}}catch(r){var a=[];t.geometry.coordinates.forEach(function(t){t.length>3&&a.push(t)}),t.geometry.coordinates=a;try{c=w.bboxClip(t,e),c&&c.geometry.coordinates.length>0&&o.push(c)}catch(t){console.error(t)}}}})}),c=null,o.length>0?o=w.featureCollection(o):null},i.prototype._drawGeojson=function(t,e,r,n,i,u,h,f,c,d,p,m){function g(n,o){if(y._styleFilter){if(b=n.style,0==b.show)return;_={labelStroke:b.labelStroke,labelStrokeWidth:b.labelStrokeWidth,labelStrokeColor:b.labelStrokeColor,pointSize:b.pointSize,fontSize:b.fontSize,fontFamily:b.fontFamily,color:b.fontColor instanceof Cesium.Color?b.fontColor.toCssColorString():b.fontColor,backgroundColor:b.pointColor instanceof Cesium.Color?b.pointColor.toCssColorString():b.pointColor,pointStyle:b.pointStyle,ringRadius:b.ringRadius,circleLineWidth:b.circleLineWidth,showMarker:b.showMarker,showLabel:b.showLabel,labelOffsetX:b.labelOffsetX,labelOffsetY:b.labelOffsetY,markerSymbol:b.markerImage instanceof Image||b.markerImage instanceof HTMLCanvasElement?b.markerImage:b.markerImageEl}}else b=y._defaultStyle;t.lineWidth=b.lineWidth,b.outlineColor instanceof Cesium.Color?t.strokeStyle=b.outlineColor.toCssColorString():t.strokeStyle=b.outlineColor,b.fillColor instanceof Cesium.Color?t.fillStyle=b.fillColor.toCssColorString():t.fillStyle=b.fillColor,b.lineDash&&t.setLineDash(b.lineDash),t.lineCap=b.lineCap,b.shadowColor&&b.shadowColor instanceof Cesium.Color?t.shadowColor=b.shadowColor.toCssColorString():t.shadowColor=b.shadowColor,t.shadowBlur=b.shadowBlur,t.shadowOffsetX=b.shadowOffsetX,t.shadowOffsetY=b.shadowOffsetY,t.miterLimit=b.miterLimit,t.lineJoin=b.lineJoin;var u=n.geometry;if("Point"==u.type)s(t,v,i,e,r,n,f,c,b.labelPropertyName,_);else if("Polygon"==u.type&&b.fill){var h=w.getCoords(n),l=a(t,v,i,e,r,h,!0,!1,b);l&&l.map(function(t){t.style=b,x.push(t)})}else if("MultiPolygon"==u.type&&b.fill){var d;try{d=w.getCoords(n),d.map(function(n){var o=a(t,v,i,e,r,n,!0,!1,b);o&&o.map(function(t){t.style=b,x.push(t)})})}catch(t){}}else if("MultiLineString"==u.type)if(n.properties.isOutline&&!b.outline);else{var h=w.getCoords(n);a(t,v,i,e,r,h,!1,!0,b),h=null}else if("LineString"==u.type)if(n.properties.isOutline&&!b.outline);else{var p=w.getCoords(n),h=[p];a(t,v,i,e,r,h,!1,!0,b),p=null,h=null}}var y=this;if(void 0===f&&(f=!0),void 0===c&&(c=!0),f||c){void 0===u&&(u=t.canvas.width-e),void 0===h&&(h=t.canvas.height-r);var v=new l(u,h),b=this._defaultStyle,_={labelStroke:b.labelStroke,labelStrokeWidth:b.labelStrokeWidth,labelStrokeColor:b.labelStrokeColor,pointSize:b.pointSize,fontSize:b.fontSize,fontFamily:b.fontFamily,color:b.fontColor instanceof Cesium.Color?b.fontColor.toCssColorString():b.fontColor,backgroundColor:b.pointColor instanceof Cesium.Color?b.pointColor.toCssColorString():b.pointColor,pointStyle:b.pointStyle,ringRadius:b.ringRadius,circleLineWidth:b.circleLineWidth,showMarker:b.showMarker,showLabel:b.showLabel,labelOffsetX:b.labelOffsetX,labelOffsetY:b.labelOffsetY,markerSymbol:b.markerImage instanceof Image||b.markerImage instanceof HTMLCanvasElement?b.markerImage:b.markerImageEl},x=[];y._styleFilter&&(w.featureEach(n,function(t,e){y._styleFilter&&(b=y._defaultStyle.clone(),y._styleFilter(t,b,d,p,m),t.style=b)}),n.features.sort(function(t,e){return t.style&&t.style.lineDash?1:e.style&&e.style.lineDash?-1:0})),w.featureEach(n,function(t,e){var r=t.geometry;r&&("Polygon"!=r.type&&"MultiPolygon"!=r.type||g(t,e))}),x&&x.length&&o(t,v,i,e,r,x),w.featureEach(n,function(t,e){var r=t.geometry;r&&("LineString"!=r.type&&"MultiLineString"!=r.type||g(t,e))});var M=[];w.featureEach(n,function(t,e){var r=t.geometry;r&&("Point"!=r.type&&"MultiPoint"!=r.type||("function"!=typeof y.clustering?g(t,e):M.push(t)))});var E=[i.xMin,i.yMin,i.xMax,i.yMax];"function"==typeof y.clustering&&(M=y.clustering(M,t,E,d,p,m)),M&&M.length&&M.forEach(function(t,e){g(t,e)})}},i.pointIsCrossTile=function(t,e,r,n){if(n&&n.splice(0,n.length),!r.properties)return!0;if(!r.properties.symbol)return!0;var i=r.properties.symbol,o=r.geometry.coordinates,a=(o[0]-e[0])/(e[2]-e[0]),s=(o[1]-e[3])/(e[1]-e[3]),u=a*t.canvas.width,h=s*t.canvas.height,l=u-i.width/2,f=u+i.width/2,c=h-i.height/2,d=h+i.height/2;return l<0||f>t.canvas.width||(c<0||d>t.canvas.height||(n[0]=l,n[1]=c,n[2]=f,n[3]=d,!1))},i.prototype.requestImageSync=function(t,e,r){var n=this,i=t+","+e+","+r;if(n.cache&&n.cache[i])return n.cache[i];var o=this._tilingScheme.tileXYToRectangle(t,e,r),a={xMin:b.toDegrees(o.west),yMin:b.toDegrees(o.south),xMax:b.toDegrees(o.east),yMax:b.toDegrees(o.north)},s=n._clipGeojson(o);return s?(n._createCanvas(),n._defaultStyle.backgroundColor||n._context.clearRect(0,0,n._canvas.width,n._canvas.height),n._drawGeojson(n._context,0,0,s,a,n._tileWidth,n._tileHeight,n._fill,n._outline,t,e,r),n._canvas):n._onlyPoint||n._polygonOnly&&n._defaultStyle.fill?u(n._defaultStyle.backgroundColor):void 0},i.prototype._createTileImage=function(t,e,r,n,o){var a=this,s=t+","+e+","+r,h={xMin:b.toDegrees(n.west),yMin:b.toDegrees(n.south),xMax:b.toDegrees(n.east),yMax:b.toDegrees(n.north)};this._state=i.State.CLIPPING,requestAnimationFrame(function(){var l=a._clipGeojson(n);l?Cesium.requestAnimationFrame(function(){a._state=i.State.GEOJSONDRAWING,a._createCanvas(),a._defaultStyle.backgroundColor||a._context.clearRect(0,0,a._canvas.width,a._canvas.height),a._drawGeojson(a._context,0,0,l,h,a._tileWidth,a._tileHeight,a._fill,a._outline,t,e,r),a.cache[s]=a._canvas,a.cache[s].srcJson=l,a.cacheCount++,i._currentTaskCount--,o.resolve(a._canvas),Cesium.requestAnimationFrame(function(){a._state=i.State.COMPELTED})}):(a._onlyPoint?o.resolve(u(a._defaultStyle.backgroundColor)):o.resolve(void 0),a._state=i.State.COMPELTED,i._currentTaskCount--)})},i.prototype.clearCache=function(){var t=this;for(var e in t.cache)t.cache.hasOwnProperty(e)&&(t.cache[e].srcJson=null,delete t.cache[e]);t.cache={},t.cacheCount=0},i.prototype._getTileImage=function(t,e,r,n){var o=v.defer(),a=this,s=t+","+e+","+r;if(a.cacheCount||(a.cacheCount=0),!a.cache||a.cacheCount>a._tileCacheSize){for(var s in a.cache)a.cache.hasOwnProperty(s)&&(a.cache[s].srcJson=null,delete a.cache[s]);a.cache={},a.cacheCount=0}return a.cache[s]?a.cache[s]:i._maxTaskCountthis._maximumLevel)return u(this._defaultStyle.backgroundColor);var o=this.tilingScheme.tileXYToRectangle(t,e,r);return this._getTileImage(t,e,r,o)}},i.prototype.pickFeatures=function(t,e,r,n,i){},i.compose=function(t,e,r,n,i){n=n||256,i=i||256,t.sort(function(t,e){return Cesium.defined(t.zIndex)?Cesium.defined(e.zIndex)?t.zIndex-e.zIndex:1:-1});var o=new Cesium.GeographicTilingScheme,a=_.northwest(e),s=_.southeast(e),u=o.positionToTileXY(a,r),h=o.positionToTileXY(s,r),l=(h.x-u.x+1)*n,f=(h.y-u.y+1)*i,c=document.createElement("canvas");c.width=l,c.height=f;for(var d=c.getContext("2d"),p=0;p=38)return n<0?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY;var o=n*t.x*(1/256);return o+=n*t.y*(1/65536),(o+=n*t.z*(1/16777216))*Math.pow(10,r)},e.exports=n},{"./Check":129,"./DeveloperError":131,"./Math":139,"./defaultValue":158,"./defined":160,"./freezeObject":163}],128:[function(t,e,r){function n(t,e,r){this.longitude=a(t,0),this.latitude=a(e,0),this.height=a(r,0)}var i=t("./Cartesian3"),o=t("./Check"),a=t("./defaultValue"),s=t("./defined"),u=t("./freezeObject"),h=t("./Math"),l=t("./scaleToGeodeticSurface");n.fromRadians=function(t,e,r,i){return o.typeOf.number("longitude",t),o.typeOf.number("latitude",e),r=a(r,0),s(i)?(i.longitude=t,i.latitude=e,i.height=r,i):new n(t,e,r)},n.fromDegrees=function(t,e,r,i){return o.typeOf.number("longitude",t),o.typeOf.number("latitude",e),t=h.toRadians(t),e=h.toRadians(e),n.fromRadians(t,e,r,i)};var f=new i,c=new i,d=new i,p=new i(1/6378137,1/6378137,1/6356752.314245179),m=new i(1/40680631590769,1/40680631590769,1/40408299984661.445),g=h.EPSILON1;n.fromCartesian=function(t,e,r){var o=s(e)?e.oneOverRadii:p,a=s(e)?e.oneOverRadiiSquared:m,u=s(e)?e._centerToleranceSquared:g,y=l(t,o,a,u,c);if(s(y)){var v=i.multiplyComponents(y,a,f);v=i.normalize(v,v);var b=i.subtract(t,y,d),w=Math.atan2(v.y,v.x),_=Math.asin(v.z),x=h.sign(i.dot(b,t))*i.magnitude(b);return s(r)?(r.longitude=w,r.latitude=_,r.height=x,r):new n(w,_,x)}},n.toCartesian=function(t,e,r){return o.defined("cartographic",t),i.fromRadians(t.longitude,t.latitude,t.height,e,r)},n.clone=function(t,e){if(s(t))return s(e)?(e.longitude=t.longitude,e.latitude=t.latitude,e.height=t.height,e):new n(t.longitude,t.latitude,t.height)},n.equals=function(t,e){return t===e||s(t)&&s(e)&&t.longitude===e.longitude&&t.latitude===e.latitude&&t.height===e.height},n.equalsEpsilon=function(t,e,r){return o.typeOf.number("epsilon",r),t===e||s(t)&&s(e)&&Math.abs(t.longitude-e.longitude)<=r&&Math.abs(t.latitude-e.latitude)<=r&&Math.abs(t.height-e.height)<=r},n.ZERO=u(new n(0,0,0)),n.prototype.clone=function(t){return n.clone(this,t)},n.prototype.equals=function(t){return n.equals(this,t)},n.prototype.equalsEpsilon=function(t,e){return n.equalsEpsilon(this,t,e)},n.prototype.toString=function(){return"("+this.longitude+", "+this.latitude+", "+this.height+")"},e.exports=n},{"./Cartesian3":126,"./Check":129,"./Math":139,"./defaultValue":158,"./defined":160,"./freezeObject":163,"./scaleToGeodeticSurface":176}],129:[function(t,e,r){function n(t){return t+" is required, actual value was undefined"}function i(t,e,r){return"Expected "+r+" to be typeof "+e+", actual typeof was "+t}var o=t("./defined"),a=t("./DeveloperError"),s={};s.typeOf={},s.defined=function(t,e){if(!o(e))throw new a(n(t))},s.typeOf.func=function(t,e){if("function"!=typeof e)throw new a(i(typeof e,"function",t))},s.typeOf.string=function(t,e){if("string"!=typeof e)throw new a(i(typeof e,"string",t))},s.typeOf.number=function(t,e){if("number"!=typeof e)throw new a(i(typeof e,"number",t))},s.typeOf.number.lessThan=function(t,e,r){if(s.typeOf.number(t,e),e>=r)throw new a("Expected "+t+" to be less than "+r+", actual value was "+e)},s.typeOf.number.lessThanOrEquals=function(t,e,r){if(s.typeOf.number(t,e),e>r)throw new a("Expected "+t+" to be less than or equal to "+r+", actual value was "+e)},s.typeOf.number.greaterThan=function(t,e,r){if(s.typeOf.number(t,e),e<=r)throw new a("Expected "+t+" to be greater than "+r+", actual value was "+e)},s.typeOf.number.greaterThanOrEquals=function(t,e,r){if(s.typeOf.number(t,e),e1&&(r-=1),6*r<1?t+6*(e-t)*r:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function i(t,e,r,n){this.red=a(t,1),this.green=a(e,1),this.blue=a(r,1),this.alpha=a(n,1)}var o=t("./Check"),a=t("./defaultValue"),s=t("./defined"),u=t("./FeatureDetection"),h=t("./freezeObject"),l=t("./Math");i.fromCartesian4=function(t,e){return o.typeOf.object("cartesian",t),s(e)?(e.red=t.x,e.green=t.y,e.blue=t.z,e.alpha=t.w,e):new i(t.x,t.y,t.z,t.w)},i.fromBytes=function(t,e,r,n,o){return t=i.byteToFloat(a(t,255)),e=i.byteToFloat(a(e,255)),r=i.byteToFloat(a(r,255)),n=i.byteToFloat(a(n,255)),s(o)?(o.red=t,o.green=e,o.blue=r,o.alpha=n,o):new i(t,e,r,n)},i.fromAlpha=function(t,e,r){return o.typeOf.object("color",t),o.typeOf.number("alpha",e),s(r)?(r.red=t.red,r.green=t.green,r.blue=t.blue,r.alpha=e,r):new i(t.red,t.green,t.blue,e)};var f,c,d;u.supportsTypedArrays()&&(f=new ArrayBuffer(4),c=new Uint32Array(f),d=new Uint8Array(f)),i.fromRgba=function(t,e){return c[0]=t,i.fromBytes(d[0],d[1],d[2],d[3],e)},i.fromHsl=function(t,e,r,o,u){t=a(t,0)%1,e=a(e,0),r=a(r,0),o=a(o,1);var h=r,l=r,f=r;if(0!==e){var c;c=r<.5?r*(1+e):r+e-r*e;var d=2*r-c;h=n(d,c,t+1/3),l=n(d,c,t),f=n(d,c,t-1/3)}return s(u)?(u.red=h,u.green=l,u.blue=f,u.alpha=o,u):new i(h,l,f,o)},i.fromRandom=function(t,e){t=a(t,a.EMPTY_OBJECT);var r=t.red;if(!s(r)){var n=a(t.minimumRed,0),u=a(t.maximumRed,1);o.typeOf.number.lessThanOrEquals("minimumRed",n,u),r=n+l.nextRandomNumber()*(u-n)}var h=t.green;if(!s(h)){var f=a(t.minimumGreen,0),c=a(t.maximumGreen,1);o.typeOf.number.lessThanOrEquals("minimumGreen",f,c),h=f+l.nextRandomNumber()*(c-f)}var d=t.blue;if(!s(d)){var p=a(t.minimumBlue,0),m=a(t.maximumBlue,1);o.typeOf.number.lessThanOrEquals("minimumBlue",p,m),d=p+l.nextRandomNumber()*(m-p)}var g=t.alpha;if(!s(g)){var y=a(t.minimumAlpha,0),v=a(t.maximumAlpha,1);o.typeOf.number.lessThanOrEquals("minumumAlpha",y,v),g=y+l.nextRandomNumber()*(v-y)}return s(e)?(e.red=r,e.green=h,e.blue=d,e.alpha=g,e):new i(r,h,d,g)};var p=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,m=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,g=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,y=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;i.fromCssColorString=function(t,e){o.typeOf.string("color",t),s(e)||(e=new i);var r=i[t.toUpperCase()];if(s(r))return i.clone(r,e),e;var n=p.exec(t);return null!==n?(e.red=parseInt(n[1],16)/15,e.green=parseInt(n[2],16)/15,e.blue=parseInt(n[3],16)/15,e.alpha=1,e):null!==(n=m.exec(t))?(e.red=parseInt(n[1],16)/255,e.green=parseInt(n[2],16)/255,e.blue=parseInt(n[3],16)/255,e.alpha=1,e):null!==(n=g.exec(t))?(e.red=parseFloat(n[1])/("%"===n[1].substr(-1)?100:255),e.green=parseFloat(n[2])/("%"===n[2].substr(-1)?100:255),e.blue=parseFloat(n[3])/("%"===n[3].substr(-1)?100:255),e.alpha=parseFloat(a(n[4],"1.0")),e):null!==(n=y.exec(t))?i.fromHsl(parseFloat(n[1])/360,parseFloat(n[2])/100,parseFloat(n[3])/100,parseFloat(a(n[4],"1.0")),e):e=void 0},i.packedLength=4,i.pack=function(t,e,r){return o.typeOf.object("value",t),o.defined("array",e),r=a(r,0),e[r++]=t.red,e[r++]=t.green,e[r++]=t.blue,e[r]=t.alpha,e},i.unpack=function(t,e,r){return o.defined("array",t),e=a(e,0),s(r)||(r=new i),r.red=t[e++],r.green=t[e++],r.blue=t[e++],r.alpha=t[e],r},i.byteToFloat=function(t){return t/255},i.floatToByte=function(t){return 1===t?255:256*t|0},i.clone=function(t,e){if(s(t))return s(e)?(e.red=t.red,e.green=t.green,e.blue=t.blue,e.alpha=t.alpha,e):new i(t.red,t.green,t.blue,t.alpha)},i.equals=function(t,e){return t===e||s(t)&&s(e)&&t.red===e.red&&t.green===e.green&&t.blue===e.blue&&t.alpha===e.alpha},i.equalsArray=function(t,e,r){return t.red===e[r]&&t.green===e[r+1]&&t.blue===e[r+2]&&t.alpha===e[r+3]},i.prototype.clone=function(t){return i.clone(this,t)},i.prototype.equals=function(t){return i.equals(this,t)},i.prototype.equalsEpsilon=function(t,e){return this===t||s(t)&&Math.abs(this.red-t.red)<=e&&Math.abs(this.green-t.green)<=e&&Math.abs(this.blue-t.blue)<=e&&Math.abs(this.alpha-t.alpha)<=e},i.prototype.toString=function(){return"("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"},i.prototype.toCssColorString=function(){var t=i.floatToByte(this.red),e=i.floatToByte(this.green),r=i.floatToByte(this.blue);return 1===this.alpha?"rgb("+t+","+e+","+r+")":"rgba("+t+","+e+","+r+","+this.alpha+")"},i.prototype.toBytes=function(t){var e=i.floatToByte(this.red),r=i.floatToByte(this.green),n=i.floatToByte(this.blue),o=i.floatToByte(this.alpha);return s(t)?(t[0]=e,t[1]=r,t[2]=n,t[3]=o,t):[e,r,n,o]},i.prototype.toRgba=function(){return d[0]=i.floatToByte(this.red),d[1]=i.floatToByte(this.green),d[2]=i.floatToByte(this.blue),d[3]=i.floatToByte(this.alpha),c[0]},i.prototype.brighten=function(t,e){return o.typeOf.number("magnitude",t),o.typeOf.number.greaterThanOrEquals("magnitude",t,0),o.typeOf.object("result",e),t=1-t,e.red=1-(1-this.red)*t,e.green=1-(1-this.green)*t,e.blue=1-(1-this.blue)*t,e.alpha=this.alpha,e},i.prototype.darken=function(t,e){return o.typeOf.number("magnitude",t),o.typeOf.number.greaterThanOrEquals("magnitude",t,0),o.typeOf.object("result",e),t=1-t,e.red=this.red*t,e.green=this.green*t,e.blue=this.blue*t,e.alpha=this.alpha,e},i.prototype.withAlpha=function(t,e){return i.fromAlpha(this,t,e)},i.add=function(t,e,r){return o.typeOf.object("left",t),o.typeOf.object("right",e),o.typeOf.object("result",r),r.red=t.red+e.red,r.green=t.green+e.green,r.blue=t.blue+e.blue,r.alpha=t.alpha+e.alpha,r},i.subtract=function(t,e,r){return o.typeOf.object("left",t),o.typeOf.object("right",e),o.typeOf.object("result",r),r.red=t.red-e.red,r.green=t.green-e.green,r.blue=t.blue-e.blue,r.alpha=t.alpha-e.alpha,r},i.multiply=function(t,e,r){return o.typeOf.object("left",t),o.typeOf.object("right",e),o.typeOf.object("result",r),r.red=t.red*e.red,r.green=t.green*e.green,r.blue=t.blue*e.blue,r.alpha=t.alpha*e.alpha,r},i.divide=function(t,e,r){return o.typeOf.object("left",t),o.typeOf.object("right",e),o.typeOf.object("result",r),r.red=t.red/e.red,r.green=t.green/e.green,r.blue=t.blue/e.blue,r.alpha=t.alpha/e.alpha,r},i.mod=function(t,e,r){return o.typeOf.object("left",t),o.typeOf.object("right",e),o.typeOf.object("result",r),r.red=t.red%e.red,r.green=t.green%e.green,r.blue=t.blue%e.blue,r.alpha=t.alpha%e.alpha,r},i.multiplyByScalar=function(t,e,r){return o.typeOf.object("color",t),o.typeOf.number("scalar",e),o.typeOf.object("result",r),r.red=t.red*e,r.green=t.green*e,r.blue=t.blue*e,r.alpha=t.alpha*e,r},i.divideByScalar=function(t,e,r){return o.typeOf.object("color",t),o.typeOf.number("scalar",e),o.typeOf.object("result",r),r.red=t.red/e,r.green=t.green/e,r.blue=t.blue/e,r.alpha=t.alpha/e,r},i.ALICEBLUE=h(i.fromCssColorString("#F0F8FF")),i.ANTIQUEWHITE=h(i.fromCssColorString("#FAEBD7")),i.AQUA=h(i.fromCssColorString("#00FFFF")),i.AQUAMARINE=h(i.fromCssColorString("#7FFFD4")),i.AZURE=h(i.fromCssColorString("#F0FFFF")),i.BEIGE=h(i.fromCssColorString("#F5F5DC")),i.BISQUE=h(i.fromCssColorString("#FFE4C4")),i.BLACK=h(i.fromCssColorString("#000000")),i.BLANCHEDALMOND=h(i.fromCssColorString("#FFEBCD")),i.BLUE=h(i.fromCssColorString("#0000FF")),i.BLUEVIOLET=h(i.fromCssColorString("#8A2BE2")),i.BROWN=h(i.fromCssColorString("#A52A2A")),i.BURLYWOOD=h(i.fromCssColorString("#DEB887")),i.CADETBLUE=h(i.fromCssColorString("#5F9EA0")),i.CHARTREUSE=h(i.fromCssColorString("#7FFF00")),i.CHOCOLATE=h(i.fromCssColorString("#D2691E")),i.CORAL=h(i.fromCssColorString("#FF7F50")),i.CORNFLOWERBLUE=h(i.fromCssColorString("#6495ED")),i.CORNSILK=h(i.fromCssColorString("#FFF8DC")),i.CRIMSON=h(i.fromCssColorString("#DC143C")),i.CYAN=h(i.fromCssColorString("#00FFFF")),i.DARKBLUE=h(i.fromCssColorString("#00008B")),i.DARKCYAN=h(i.fromCssColorString("#008B8B")),i.DARKGOLDENROD=h(i.fromCssColorString("#B8860B")),i.DARKGRAY=h(i.fromCssColorString("#A9A9A9")),i.DARKGREEN=h(i.fromCssColorString("#006400")),i.DARKGREY=i.DARKGRAY,i.DARKKHAKI=h(i.fromCssColorString("#BDB76B")),i.DARKMAGENTA=h(i.fromCssColorString("#8B008B")),i.DARKOLIVEGREEN=h(i.fromCssColorString("#556B2F")),i.DARKORANGE=h(i.fromCssColorString("#FF8C00")),i.DARKORCHID=h(i.fromCssColorString("#9932CC")),i.DARKRED=h(i.fromCssColorString("#8B0000")),i.DARKSALMON=h(i.fromCssColorString("#E9967A")),i.DARKSEAGREEN=h(i.fromCssColorString("#8FBC8F")),i.DARKSLATEBLUE=h(i.fromCssColorString("#483D8B")),i.DARKSLATEGRAY=h(i.fromCssColorString("#2F4F4F")),i.DARKSLATEGREY=i.DARKSLATEGRAY,i.DARKTURQUOISE=h(i.fromCssColorString("#00CED1")),i.DARKVIOLET=h(i.fromCssColorString("#9400D3")),i.DEEPPINK=h(i.fromCssColorString("#FF1493")),i.DEEPSKYBLUE=h(i.fromCssColorString("#00BFFF")),i.DIMGRAY=h(i.fromCssColorString("#696969")),i.DIMGREY=i.DIMGRAY,i.DODGERBLUE=h(i.fromCssColorString("#1E90FF")),i.FIREBRICK=h(i.fromCssColorString("#B22222")),i.FLORALWHITE=h(i.fromCssColorString("#FFFAF0")),i.FORESTGREEN=h(i.fromCssColorString("#228B22")),i.FUCHSIA=h(i.fromCssColorString("#FF00FF")),i.GAINSBORO=h(i.fromCssColorString("#DCDCDC")),i.GHOSTWHITE=h(i.fromCssColorString("#F8F8FF")),i.GOLD=h(i.fromCssColorString("#FFD700")),i.GOLDENROD=h(i.fromCssColorString("#DAA520")),i.GRAY=h(i.fromCssColorString("#808080")),i.GREEN=h(i.fromCssColorString("#008000")),i.GREENYELLOW=h(i.fromCssColorString("#ADFF2F")),i.GREY=i.GRAY,i.HONEYDEW=h(i.fromCssColorString("#F0FFF0")),i.HOTPINK=h(i.fromCssColorString("#FF69B4")),i.INDIANRED=h(i.fromCssColorString("#CD5C5C")),i.INDIGO=h(i.fromCssColorString("#4B0082")),i.IVORY=h(i.fromCssColorString("#FFFFF0")),i.KHAKI=h(i.fromCssColorString("#F0E68C")),i.LAVENDER=h(i.fromCssColorString("#E6E6FA")), i.LAVENDAR_BLUSH=h(i.fromCssColorString("#FFF0F5")),i.LAWNGREEN=h(i.fromCssColorString("#7CFC00")),i.LEMONCHIFFON=h(i.fromCssColorString("#FFFACD")),i.LIGHTBLUE=h(i.fromCssColorString("#ADD8E6")),i.LIGHTCORAL=h(i.fromCssColorString("#F08080")),i.LIGHTCYAN=h(i.fromCssColorString("#E0FFFF")),i.LIGHTGOLDENRODYELLOW=h(i.fromCssColorString("#FAFAD2")),i.LIGHTGRAY=h(i.fromCssColorString("#D3D3D3")),i.LIGHTGREEN=h(i.fromCssColorString("#90EE90")),i.LIGHTGREY=i.LIGHTGRAY,i.LIGHTPINK=h(i.fromCssColorString("#FFB6C1")),i.LIGHTSEAGREEN=h(i.fromCssColorString("#20B2AA")),i.LIGHTSKYBLUE=h(i.fromCssColorString("#87CEFA")),i.LIGHTSLATEGRAY=h(i.fromCssColorString("#778899")),i.LIGHTSLATEGREY=i.LIGHTSLATEGRAY,i.LIGHTSTEELBLUE=h(i.fromCssColorString("#B0C4DE")),i.LIGHTYELLOW=h(i.fromCssColorString("#FFFFE0")),i.LIME=h(i.fromCssColorString("#00FF00")),i.LIMEGREEN=h(i.fromCssColorString("#32CD32")),i.LINEN=h(i.fromCssColorString("#FAF0E6")),i.MAGENTA=h(i.fromCssColorString("#FF00FF")),i.MAROON=h(i.fromCssColorString("#800000")),i.MEDIUMAQUAMARINE=h(i.fromCssColorString("#66CDAA")),i.MEDIUMBLUE=h(i.fromCssColorString("#0000CD")),i.MEDIUMORCHID=h(i.fromCssColorString("#BA55D3")),i.MEDIUMPURPLE=h(i.fromCssColorString("#9370DB")),i.MEDIUMSEAGREEN=h(i.fromCssColorString("#3CB371")),i.MEDIUMSLATEBLUE=h(i.fromCssColorString("#7B68EE")),i.MEDIUMSPRINGGREEN=h(i.fromCssColorString("#00FA9A")),i.MEDIUMTURQUOISE=h(i.fromCssColorString("#48D1CC")),i.MEDIUMVIOLETRED=h(i.fromCssColorString("#C71585")),i.MIDNIGHTBLUE=h(i.fromCssColorString("#191970")),i.MINTCREAM=h(i.fromCssColorString("#F5FFFA")),i.MISTYROSE=h(i.fromCssColorString("#FFE4E1")),i.MOCCASIN=h(i.fromCssColorString("#FFE4B5")),i.NAVAJOWHITE=h(i.fromCssColorString("#FFDEAD")),i.NAVY=h(i.fromCssColorString("#000080")),i.OLDLACE=h(i.fromCssColorString("#FDF5E6")),i.OLIVE=h(i.fromCssColorString("#808000")),i.OLIVEDRAB=h(i.fromCssColorString("#6B8E23")),i.ORANGE=h(i.fromCssColorString("#FFA500")),i.ORANGERED=h(i.fromCssColorString("#FF4500")),i.ORCHID=h(i.fromCssColorString("#DA70D6")),i.PALEGOLDENROD=h(i.fromCssColorString("#EEE8AA")),i.PALEGREEN=h(i.fromCssColorString("#98FB98")),i.PALETURQUOISE=h(i.fromCssColorString("#AFEEEE")),i.PALEVIOLETRED=h(i.fromCssColorString("#DB7093")),i.PAPAYAWHIP=h(i.fromCssColorString("#FFEFD5")),i.PEACHPUFF=h(i.fromCssColorString("#FFDAB9")),i.PERU=h(i.fromCssColorString("#CD853F")),i.PINK=h(i.fromCssColorString("#FFC0CB")),i.PLUM=h(i.fromCssColorString("#DDA0DD")),i.POWDERBLUE=h(i.fromCssColorString("#B0E0E6")),i.PURPLE=h(i.fromCssColorString("#800080")),i.RED=h(i.fromCssColorString("#FF0000")),i.ROSYBROWN=h(i.fromCssColorString("#BC8F8F")),i.ROYALBLUE=h(i.fromCssColorString("#4169E1")),i.SADDLEBROWN=h(i.fromCssColorString("#8B4513")),i.SALMON=h(i.fromCssColorString("#FA8072")),i.SANDYBROWN=h(i.fromCssColorString("#F4A460")),i.SEAGREEN=h(i.fromCssColorString("#2E8B57")),i.SEASHELL=h(i.fromCssColorString("#FFF5EE")),i.SIENNA=h(i.fromCssColorString("#A0522D")),i.SILVER=h(i.fromCssColorString("#C0C0C0")),i.SKYBLUE=h(i.fromCssColorString("#87CEEB")),i.SLATEBLUE=h(i.fromCssColorString("#6A5ACD")),i.SLATEGRAY=h(i.fromCssColorString("#708090")),i.SLATEGREY=i.SLATEGRAY,i.SNOW=h(i.fromCssColorString("#FFFAFA")),i.SPRINGGREEN=h(i.fromCssColorString("#00FF7F")),i.STEELBLUE=h(i.fromCssColorString("#4682B4")),i.TAN=h(i.fromCssColorString("#D2B48C")),i.TEAL=h(i.fromCssColorString("#008080")),i.THISTLE=h(i.fromCssColorString("#D8BFD8")),i.TOMATO=h(i.fromCssColorString("#FF6347")),i.TURQUOISE=h(i.fromCssColorString("#40E0D0")),i.VIOLET=h(i.fromCssColorString("#EE82EE")),i.WHEAT=h(i.fromCssColorString("#F5DEB3")),i.WHITE=h(i.fromCssColorString("#FFFFFF")),i.WHITESMOKE=h(i.fromCssColorString("#F5F5F5")),i.YELLOW=h(i.fromCssColorString("#FFFF00")),i.YELLOWGREEN=h(i.fromCssColorString("#9ACD32")),i.TRANSPARENT=h(new i(0,0,0,0)),e.exports=i},{"./Check":129,"./FeatureDetection":134,"./Math":139,"./defaultValue":158,"./defined":160,"./freezeObject":163}],131:[function(t,e,r){function n(t){this.name="DeveloperError",this.message=t;var e;try{throw new Error}catch(t){e=t.stack}this.stack=e}var i=t("./defined");i(Object.create)&&(n.prototype=Object.create(Error.prototype),n.prototype.constructor=n),n.prototype.toString=function(){var t=this.name+": "+this.message;return i(this.stack)&&(t+="\n"+this.stack.toString()),t},n.throwInstantiationError=function(){throw new n("This function defines an interface and should not be called directly.")},e.exports=n},{"./defined":160}],132:[function(t,e,r){function n(t,e,r,n){e=u(e,0),r=u(r,0),n=u(n,0),s.typeOf.number.greaterThanOrEquals("x",e,0),s.typeOf.number.greaterThanOrEquals("y",r,0),s.typeOf.number.greaterThanOrEquals("z",n,0),t._radii=new o(e,r,n),t._radiiSquared=new o(e*e,r*r,n*n),t._radiiToTheFourth=new o(e*e*e*e,r*r*r*r,n*n*n*n),t._oneOverRadii=new o(0===e?0:1/e,0===r?0:1/r,0===n?0:1/n),t._oneOverRadiiSquared=new o(0===e?0:1/(e*e),0===r?0:1/(r*r),0===n?0:1/(n*n)),t._minimumRadius=Math.min(e,r,n),t._maximumRadius=Math.max(e,r,n),t._centerToleranceSquared=d.EPSILON1,0!==t._radiiSquared.z&&(t._squaredXOverSquaredZ=t._radiiSquared.x/t._radiiSquared.z)}function i(t,e,r){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,n(this,t,e,r)}var o=t("./Cartesian3"),a=t("./Cartographic"),s=t("./Check"),u=t("./defaultValue"),h=t("./defined"),l=t("./defineProperties"),f=t("./DeveloperError"),c=t("./freezeObject"),d=t("./Math"),p=t("./scaleToGeodeticSurface");l(i.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),i.clone=function(t,e){if(h(t)){var r=t._radii;return h(e)?(o.clone(r,e._radii),o.clone(t._radiiSquared,e._radiiSquared),o.clone(t._radiiToTheFourth,e._radiiToTheFourth),o.clone(t._oneOverRadii,e._oneOverRadii),o.clone(t._oneOverRadiiSquared,e._oneOverRadiiSquared),e._minimumRadius=t._minimumRadius,e._maximumRadius=t._maximumRadius,e._centerToleranceSquared=t._centerToleranceSquared,e):new i(r.x,r.y,r.z)}},i.fromCartesian3=function(t,e){return h(e)||(e=new i),h(t)?(n(e,t.x,t.y,t.z),e):e},i.WGS84=c(new i(6378137,6378137,6356752.314245179)),i.UNIT_SPHERE=c(new i(1,1,1)),i.MOON=c(new i(d.LUNAR_RADIUS,d.LUNAR_RADIUS,d.LUNAR_RADIUS)),i.prototype.clone=function(t){return i.clone(this,t)},i.packedLength=o.packedLength,i.pack=function(t,e,r){return s.typeOf.object("value",t),s.defined("array",e),r=u(r,0),o.pack(t._radii,e,r),e},i.unpack=function(t,e,r){s.defined("array",t),e=u(e,0);var n=o.unpack(t,e);return i.fromCartesian3(n,r)},i.prototype.geocentricSurfaceNormal=o.normalize,i.prototype.geodeticSurfaceNormalCartographic=function(t,e){s.typeOf.object("cartographic",t);var r=t.longitude,n=t.latitude,i=Math.cos(n),a=i*Math.cos(r),u=i*Math.sin(r),l=Math.sin(n);return h(e)||(e=new o),e.x=a,e.y=u,e.z=l,o.normalize(e,e)},i.prototype.geodeticSurfaceNormal=function(t,e){return h(e)||(e=new o),e=o.multiplyComponents(t,this._oneOverRadiiSquared,e),o.normalize(e,e)};var m=new o,g=new o;i.prototype.cartographicToCartesian=function(t,e){var r=m,n=g;this.geodeticSurfaceNormalCartographic(t,r),o.multiplyComponents(this._radiiSquared,r,n);var i=Math.sqrt(o.dot(r,n));return o.divideByScalar(n,i,n),o.multiplyByScalar(r,t.height,r),h(e)||(e=new o),o.add(n,r,e)},i.prototype.cartographicArrayToCartesianArray=function(t,e){s.defined("cartographics",t);var r=t.length;h(e)?e.length=r:e=new Array(r);for(var n=0;n=this._radii.z-e))return r},e.exports=i},{"./Cartesian3":126,"./Cartographic":128,"./Check":129,"./DeveloperError":131,"./Math":139,"./defaultValue":158,"./defineProperties":159,"./defined":160,"./freezeObject":163,"./scaleToGeodeticSurface":176}],133:[function(t,e,r){function n(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function i(t,e){return e-t}var o=t("./Check"),a=t("./defined");t("./defineProperties")(n.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),n.prototype.addEventListener=function(t,e){o.typeOf.func("listener",t),this._listeners.push(t),this._scopes.push(e);var r=this;return function(){r.removeEventListener(t,e)}},n.prototype.removeEventListener=function(t,e){o.typeOf.func("listener",t);for(var r=this._listeners,n=this._scopes,i=-1,a=0;a0){for(s.sort(i),t=0;t0&&e.height>0,t.resolve(w._result)},e.onerror=function(){w._result=!1,t.resolve(w._result)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.promise},E(w,{initialized:{get:function(){return M(w._result)}}});var W=[];"undefined"!=typeof ArrayBuffer&&(W.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),"undefined"!=typeof Uint8ClampedArray&&W.push(Uint8ClampedArray),"undefined"!=typeof CanvasPixelArray&&W.push(CanvasPixelArray));var Y={isChrome:i,chromeVersion:o,isSafari:a,safariVersion:s,isWebkit:u,webkitVersion:h,isInternetExplorer:l,internetExplorerVersion:f,isEdge:c,edgeVersion:d,isFirefox:p,firefoxVersion:g,isWindows:m,hardwareConcurrency:x(_.hardwareConcurrency,3),supportsPointerEvents:y,supportsImageRenderingPixelated:v,supportsWebP:w,imageRenderingValue:b,typedArrayTypes:W};Y.supportsFullscreen=function(){return S.supportsFullscreen()},Y.supportsTypedArrays=function(){return"undefined"!=typeof ArrayBuffer},Y.supportsWebWorkers=function(){return"undefined"!=typeof Worker},Y.supportsWebAssembly=function(){return"undefined"!=typeof WebAssembly&&!Y.isEdge()},e.exports=Y},{"./DeveloperError":131,"./Fullscreen":135,"./defaultValue":158,"./defineProperties":159,"./defined":160,when:118}],135:[function(t,e,r){var n,i=t("./defined"),o=t("./defineProperties"),a={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},s={};o(s,{element:{get:function(){if(s.supportsFullscreen())return document[a.fullscreenElement]}},changeEventName:{get:function(){if(s.supportsFullscreen())return a.fullscreenchange}},errorEventName:{get:function(){if(s.supportsFullscreen())return a.fullscreenerror}},enabled:{get:function(){if(s.supportsFullscreen())return document[a.fullscreenEnabled]}},fullscreen:{get:function(){if(s.supportsFullscreen())return null!==s.element}}}),s.supportsFullscreen=function(){if(i(n))return n;n=!1;var t=document.body;if("function"==typeof t.requestFullscreen)return a.requestFullscreen="requestFullscreen",a.exitFullscreen="exitFullscreen",a.fullscreenEnabled="fullscreenEnabled",a.fullscreenElement="fullscreenElement",a.fullscreenchange="fullscreenchange",a.fullscreenerror="fullscreenerror",n=!0;for(var e,r=["webkit","moz","o","ms","khtml"],o=0,s=r.length;o=o&&(d=o-1);var p=(n.north-t.latitude)/h|0;return p>=a&&(p=a-1),s(r)?(r.x=d,r.y=p,r):new i(d,p)}},e.exports=n},{"./Cartesian2":125,"./Check":129,"./Ellipsoid":132,"./GeographicProjection":136,"./Math":139,"./Rectangle":140,"./defaultValue":158,"./defineProperties":159,"./defined":160}],138:[function(t,e,r){function n(t){o.typeOf.object("options",t),o.defined("options.comparator",t.comparator),this._comparator=t.comparator,this._array=[],this._length=0,this._maximumLength=void 0}function i(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}var o=t("./Check"),a=t("./defaultValue"),s=t("./defined");t("./defineProperties")(n.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(t){this._maximumLength=t,this._length>t&&t>0&&(this._length=t,this._array.length=t)}},comparator:{get:function(){return this._comparator}}}),n.prototype.reserve=function(t){t=a(t,this._length),this._array.length=t},n.prototype.heapify=function(t){t=a(t,0);for(var e=this._length,r=this._comparator,n=this._array,o=-1,s=!0;s;){var u=2*(t+1),h=u-1;o=h=0;--e)this.heapify(e)},n.prototype.insert=function(t){o.defined("element",t);var e=this._array,r=this._comparator,n=this._maximumLength,a=this._length++;for(an&&(h=e[n],this._length=n),h},n.prototype.pop=function(t){if(t=a(t,0),0!==this._length){o.typeOf.number.lessThan("index",t,this._length);var e=this._array,r=e[t];return i(e,t,--this._length),this.heapify(t),r}},e.exports=n},{"./Check":129,"./defaultValue":158,"./defineProperties":159,"./defined":160}],139:[function(t,e,r){var n=t("mersenne-twister"),i=t("./Check"),o=t("./defaultValue"),a=t("./defined"),s=t("./DeveloperError"),u={};u.EPSILON1=.1,u.EPSILON2=.01,u.EPSILON3=.001,u.EPSILON4=1e-4,u.EPSILON5=1e-5,u.EPSILON6=1e-6,u.EPSILON7=1e-7,u.EPSILON8=1e-8,u.EPSILON9=1e-9,u.EPSILON10=1e-10,u.EPSILON11=1e-11,u.EPSILON12=1e-12,u.EPSILON13=1e-13,u.EPSILON14=1e-14,u.EPSILON15=1e-15,u.EPSILON16=1e-16,u.EPSILON17=1e-17,u.EPSILON18=1e-18,u.EPSILON19=1e-19,u.EPSILON20=1e-20,u.EPSILON21=1e-21,u.GRAVITATIONALPARAMETER=3986004418e5,u.SOLAR_RADIUS=6955e5,u.LUNAR_RADIUS=1737400,u.SIXTY_FOUR_KILOBYTES=65536,u.sign=o(Math.sign,function(t){return t=+t,0===t||t!==t?t:t>0?1:-1}),u.signNotZero=function(t){return t<0?-1:1},u.toSNorm=function(t,e){return e=o(e,255),Math.round((.5*u.clamp(t,-1,1)+.5)*e)},u.fromSNorm=function(t,e){return e=o(e,255),u.clamp(t,0,e)/e*2-1},u.sinh=o(Math.sinh,function(t){return(Math.exp(t)-Math.exp(-t))/2}),u.cosh=o(Math.cosh,function(t){return(Math.exp(t)+Math.exp(-t))/2}),u.lerp=function(t,e,r){return(1-r)*t+r*e},u.PI=Math.PI,u.ONE_OVER_PI=1/Math.PI,u.PI_OVER_TWO=Math.PI/2,u.PI_OVER_THREE=Math.PI/3,u.PI_OVER_FOUR=Math.PI/4,u.PI_OVER_SIX=Math.PI/6,u.THREE_PI_OVER_TWO=3*Math.PI/2,u.TWO_PI=2*Math.PI,u.ONE_OVER_TWO_PI=1/(2*Math.PI),u.RADIANS_PER_DEGREE=Math.PI/180,u.DEGREES_PER_RADIAN=180/Math.PI,u.RADIANS_PER_ARCSECOND=u.RADIANS_PER_DEGREE/3600,u.toRadians=function(t){if(!a(t))throw new s("degrees is required.");return t*u.RADIANS_PER_DEGREE},u.toDegrees=function(t){if(!a(t))throw new s("radians is required.");return t*u.DEGREES_PER_RADIAN},u.convertLongitudeRange=function(t){if(!a(t))throw new s("angle is required.");var e=u.TWO_PI,r=t-Math.floor(t/e)*e;return r<-Math.PI?r+e:r>=Math.PI?r-e:r},u.clampToLatitudeRange=function(t){if(!a(t))throw new s("angle is required.");return u.clamp(t,-1*u.PI_OVER_TWO,u.PI_OVER_TWO)},u.negativePiToPi=function(t){if(!a(t))throw new s("angle is required.");return u.zeroToTwoPi(t+u.PI)-u.PI},u.zeroToTwoPi=function(t){if(!a(t))throw new s("angle is required.");var e=u.mod(t,u.TWO_PI);return Math.abs(e)u.EPSILON14?u.TWO_PI:e},u.mod=function(t,e){if(!a(t))throw new s("m is required.");if(!a(e))throw new s("n is required.");return(t%e+e)%e},u.equalsEpsilon=function(t,e,r,n){if(!a(t))throw new s("left is required.");if(!a(e))throw new s("right is required.");if(!a(r))throw new s("relativeEpsilon is required.");n=o(n,r);var i=Math.abs(t-e);return i<=n||i<=r*Math.max(Math.abs(t),Math.abs(e))},u.lessThan=function(t,e,r){if(!a(t))throw new s("first is required.");if(!a(e))throw new s("second is required.");if(!a(r))throw new s("relativeEpsilon is required.");return t-e<-r},u.lessThanOrEquals=function(t,e,r){if(!a(t))throw new s("first is required.");if(!a(e))throw new s("second is required.");if(!a(r))throw new s("relativeEpsilon is required.");return t-er},u.greaterThanOrEquals=function(t,e,r){if(!a(t))throw new s("first is required.");if(!a(e))throw new s("second is required.");if(!a(r))throw new s("relativeEpsilon is required.");return t-e>-r};var h=[1];u.factorial=function(t){if("number"!=typeof t||t<0)throw new s("A number greater than or equal to 0 is required.");var e=h.length;if(t>=e)for(var r=h[e-1],n=e;n<=t;n++)h.push(r*n);return h[t]},u.incrementWrap=function(t,e,r){if(r=o(r,0),!a(t))throw new s("n is required.");if(e<=r)throw new s("maximumValue must be greater than minimumValue.");return++t,t>e&&(t=r),t},u.isPowerOfTwo=function(t){if("number"!=typeof t||t<0)throw new s("A number greater than or equal to 0 is required.");return 0!==t&&0==(t&t-1)},u.nextPowerOfTwo=function(t){if("number"!=typeof t||t<0)throw new s("A number greater than or equal to 0 is required.");return--t,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t},u.clamp=function(t,e,r){if(!a(t))throw new s("value is required");if(!a(e))throw new s("min is required.");if(!a(r))throw new s("max is required.");return tr?r:t};var l=new n;u.setRandomNumberSeed=function(t){if(!a(t))throw new s("seed is required.");l=new n(t)},u.nextRandomNumber=function(){return l.random()},u.randomBetween=function(t,e){return u.nextRandomNumber()*(e-t)+t},u.acosClamped=function(t){if(!a(t))throw new s("value is required.");return Math.acos(u.clamp(t,-1,1))},u.asinClamped=function(t){if(!a(t))throw new s("value is required.");return Math.asin(u.clamp(t,-1,1))},u.chordLength=function(t,e){if(!a(t))throw new s("angle is required.");if(!a(e))throw new s("radius is required.");return 2*e*Math.sin(.5*t)},u.logBase=function(t,e){if(!a(t))throw new s("number is required.");if(!a(e))throw new s("base is required.");return Math.log(t)/Math.log(e)},u.cbrt=o(Math.cbrt,function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e}),u.log2=o(Math.log2,function(t){return Math.log(t)*Math.LOG2E}),u.fog=function(t,e){var r=t*e;return 1-Math.exp(-r*r)},u.fastApproximateAtan=function(t){return i.typeOf.number("x",t),t*(-.1784*Math.abs(t)-.0663*t*t+1.0301)},u.fastApproximateAtan2=function(t,e){i.typeOf.number("x",t),i.typeOf.number("y",e);var r,n,o=Math.abs(t);r=Math.abs(e),n=Math.max(o,r),r=Math.min(o,r);var a=r/n;if(isNaN(a))throw new s("either x or y must be nonzero");return o=u.fastApproximateAtan(a),o=Math.abs(e)>Math.abs(t)?u.PI_OVER_TWO-o:o,o=t<0?u.PI-o:o,o=e<0?-o:o},e.exports=u},{"./Check":129,"./DeveloperError":131,"./defaultValue":158,"./defined":160,"mersenne-twister":60}],140:[function(t,e,r){function n(t,e,r,n){this.west=a(t,0),this.south=a(e,0),this.east=a(r,0),this.north=a(n,0)}var i=t("./Cartographic"),o=t("./Check"),a=t("./defaultValue"),s=t("./defined"),u=t("./defineProperties"),h=t("./Ellipsoid"),l=t("./freezeObject"),f=t("./Math");u(n.prototype,{width:{get:function(){return n.computeWidth(this)}},height:{get:function(){return n.computeHeight(this)}}}),n.packedLength=4,n.pack=function(t,e,r){return o.typeOf.object("value",t),o.defined("array",e),r=a(r,0),e[r++]=t.west,e[r++]=t.south,e[r++]=t.east,e[r]=t.north,e},n.unpack=function(t,e,r){return o.defined("array",t),e=a(e,0),s(r)||(r=new n),r.west=t[e++],r.south=t[e++],r.east=t[e++],r.north=t[e],r},n.computeWidth=function(t){o.typeOf.object("rectangle",t);var e=t.east,r=t.west;return e=0?p.longitude:p.longitude+f.TWO_PI;a=Math.min(a,m),u=Math.max(u,m)}return i-r>u-a&&(r=a,i=u,i>f.PI&&(i-=f.TWO_PI),r>f.PI&&(r-=f.TWO_PI)),s(e)?(e.west=r,e.south=h,e.east=i,e.north=l,e):new n(r,h,i,l)},n.fromCartesianArray=function(t,e,r){o.defined("cartesians",t),e=a(e,h.WGS84);for(var i=Number.MAX_VALUE,u=-Number.MAX_VALUE,l=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=Number.MAX_VALUE,p=-Number.MAX_VALUE,m=0,g=t.length;m=0?y.longitude:y.longitude+f.TWO_PI;l=Math.min(l,v),c=Math.max(c,v)}return u-i>c-l&&(i=l,u=c,u>f.PI&&(u-=f.TWO_PI),i>f.PI&&(i-=f.TWO_PI)),s(r)?(r.west=i,r.south=d,r.east=u,r.north=p,r):new n(i,d,u,p)},n.clone=function(t,e){if(s(t))return s(e)?(e.west=t.west,e.south=t.south,e.east=t.east,e.north=t.north,e):new n(t.west,t.south,t.east,t.north)},n.equalsEpsilon=function(t,e,r){return o.typeOf.number("absoluteEpsilon",r),t===e||s(t)&&s(e)&&Math.abs(t.west-e.west)<=r&&Math.abs(t.south-e.south)<=r&&Math.abs(t.east-e.east)<=r&&Math.abs(t.north-e.north)<=r},n.prototype.clone=function(t){return n.clone(this,t)},n.prototype.equals=function(t){return n.equals(this,t)},n.equals=function(t,e){return t===e||s(t)&&s(e)&&t.west===e.west&&t.south===e.south&&t.east===e.east&&t.north===e.north},n.prototype.equalsEpsilon=function(t,e){return o.typeOf.number("epsilon",e),n.equalsEpsilon(this,t,e)},n.validate=function(t){o.typeOf.object("rectangle",t);var e=t.north;o.typeOf.number.greaterThanOrEquals("north",e,-f.PI_OVER_TWO),o.typeOf.number.lessThanOrEquals("north",e,f.PI_OVER_TWO);var r=t.south;o.typeOf.number.greaterThanOrEquals("south",r,-f.PI_OVER_TWO),o.typeOf.number.lessThanOrEquals("south",r,f.PI_OVER_TWO);var n=t.west;o.typeOf.number.greaterThanOrEquals("west",n,-Math.PI),o.typeOf.number.lessThanOrEquals("west",n,Math.PI);var i=t.east;o.typeOf.number.greaterThanOrEquals("east",i,-Math.PI),o.typeOf.number.lessThanOrEquals("east",i,Math.PI)},n.southwest=function(t,e){return o.typeOf.object("rectangle",t),s(e)?(e.longitude=t.west,e.latitude=t.south,e.height=0,e):new i(t.west,t.south)},n.northwest=function(t,e){return o.typeOf.object("rectangle",t),s(e)?(e.longitude=t.west,e.latitude=t.north,e.height=0,e):new i(t.west,t.north)},n.northeast=function(t,e){return o.typeOf.object("rectangle",t),s(e)?(e.longitude=t.east,e.latitude=t.north,e.height=0,e):new i(t.east,t.north)},n.southeast=function(t,e){return o.typeOf.object("rectangle",t),s(e)?(e.longitude=t.east,e.latitude=t.south,e.height=0,e):new i(t.east,t.south)},n.center=function(t,e){o.typeOf.object("rectangle",t);var r=t.east,n=t.west;r0?i+=f.TWO_PI:u0&&(u+=f.TWO_PI),i=p))return s(r)?(r.west=l,r.south=d,r.east=c,r.north=p,r):new n(l,d,c,p)}},n.simpleIntersection=function(t,e,r){o.typeOf.object("rectangle",t),o.typeOf.object("otherRectangle",e);var i=Math.max(t.west,e.west),a=Math.max(t.south,e.south),u=Math.min(t.east,e.east),h=Math.min(t.north,e.north) ;if(!(a>=h||i>=u))return s(r)?(r.west=i,r.south=a,r.east=u,r.north=h,r):new n(i,a,u,h)},n.union=function(t,e,r){o.typeOf.object("rectangle",t),o.typeOf.object("otherRectangle",e),s(r)||(r=new n);var i=t.east,a=t.west,u=e.east,h=e.west;i0?i+=f.TWO_PI:u0&&(u+=f.TWO_PI),ii||f.equalsEpsilon(r,i,f.EPSILON14))&&(r=t.south&&n<=t.north};var c=new i;n.subsample=function(t,e,r,i){o.typeOf.object("rectangle",t),e=a(e,h.WGS84),r=a(r,0),s(i)||(i=[]);var u=0,l=t.north,d=t.south,p=t.east,m=t.west,g=c;g.height=r,g.longitude=m,g.latitude=l,i[u]=e.cartographicToCartesian(g,i[u]),u++,g.longitude=p,i[u]=e.cartographicToCartesian(g,i[u]),u++,g.latitude=d,i[u]=e.cartographicToCartesian(g,i[u]),u++,g.longitude=m,i[u]=e.cartographicToCartesian(g,i[u]),u++,g.latitude=l<0?l:d>0?d:0;for(var y=1;y<8;++y)g.longitude=-Math.PI+y*f.PI_OVER_TWO,n.contains(t,g)&&(i[u]=e.cartographicToCartesian(g,i[u]),u++);return 0===g.latitude&&(g.longitude=m,i[u]=e.cartographicToCartesian(g,i[u]),u++,g.longitude=p,i[u]=e.cartographicToCartesian(g,i[u]),u++),i.length=u,i},n.MAX_VALUE=l(new n(-Math.PI,-f.PI_OVER_TWO,Math.PI,f.PI_OVER_TWO)),e.exports=n},{"./Cartographic":128,"./Check":129,"./Ellipsoid":132,"./Math":139,"./defaultValue":158,"./defineProperties":159,"./defined":160,"./freezeObject":163}],141:[function(t,e,r){function n(t){t=i(t,i.EMPTY_OBJECT);var e=i(t.throttleByServer,!1),r=i(t.throttle,!1);this.url=t.url,this.requestFunction=t.requestFunction,this.cancelFunction=t.cancelFunction,this.priorityFunction=t.priorityFunction,this.priority=i(t.priority,0),this.throttle=r,this.throttleByServer=e,this.type=i(t.type,s.OTHER),this.serverKey=void 0,this.state=a.UNISSUED,this.deferred=void 0,this.cancelled=!1}var i=t("./defaultValue"),o=t("./defined"),a=t("./RequestState"),s=t("./RequestType");n.prototype.cancel=function(){this.cancelled=!0},n.prototype.clone=function(t){return o(t)?(t.url=this.url,t.requestFunction=this.requestFunction,t.cancelFunction=this.cancelFunction,t.priorityFunction=this.priorityFunction,t.priority=this.priority,t.throttle=this.throttle,t.throttleByServer=this.throttleByServer,t.type=this.type,t.serverKey=this.serverKey,t.state=this.RequestState.UNISSUED,t.deferred=void 0,t.cancelled=!1,t):new n(this)},e.exports=n},{"./RequestState":144,"./RequestType":145,"./defaultValue":158,"./defined":160}],142:[function(t,e,r){function n(t,e,r){this.statusCode=t,this.response=e,this.responseHeaders=r,"string"==typeof this.responseHeaders&&(this.responseHeaders=o(this.responseHeaders))}var i=t("./defined"),o=t("./parseResponseHeaders");n.prototype.toString=function(){var t="Request has failed.";return i(this.statusCode)&&(t+=" Status Code: "+this.statusCode),t},e.exports=n},{"./defined":160,"./parseResponseHeaders":174}],143:[function(t,e,r){function n(t,e){return t.priority-e.priority}function i(){}function o(t){v(t.priorityFunction)&&(t.priority=t.priorityFunction())}function a(t){var e=y(i.requestsByServer[t],i.maximumRequestsPerServer);return I[t]0&&console.log("Number of attempted requests: "+C.numberOfAttemptedRequests),C.numberOfActiveRequests>0&&console.log("Number of active requests: "+C.numberOfActiveRequests),C.numberOfCancelledRequests>0&&console.log("Number of cancelled requests: "+C.numberOfCancelledRequests),C.numberOfCancelledActiveRequests>0&&console.log("Number of cancelled active requests: "+C.numberOfCancelledActiveRequests),C.numberOfFailedRequests>0&&console.log("Number of failed requests: "+C.numberOfFailedRequests),c())}var p=t("./Uri"),m=t("when"),g=t("./Check"),y=t("./defaultValue"),v=t("./defined"),b=t("./defineProperties"),w=t("./Event"),_=t("./Heap"),x=t("./isBlobUri"),M=t("./isDataUri"),E=t("./RequestState"),C={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0},S=20,O=new _({comparator:n});O.maximumLength=S,O.reserve(S);var A=[],I={},k="undefined"!=typeof document?new p(document.location.href):new p,T=new w;i.maximumRequests=50,i.maximumRequestsPerServer=6,i.requestsByServer={"api.cesium.com:443":18,"assets.cesium.com:443":18},i.throttleRequests=!0,i.debugShowStatistics=!1,i.requestCompletedEvent=T,b(i,{statistics:{get:function(){return C}},priorityHeapLength:{get:function(){return S},set:function(t){if(tt;){var e=O.pop();f(e)}S=t,O.maximumLength=t,O.reserve(t)}}}),i.update=function(){var t,e,r=0,n=A.length;for(t=0;t0&&(A[t-r]=e):++r;A.length-=r;var s=O.internalArray,u=O.length;for(t=0;t0;)e=O.pop(),e.cancelled?f(e):!e.throttleByServer||a(e.serverKey)?(l(e),++c):f(e);d()},i.getServerKey=function(t){g.typeOf.string("url",t);var e=new p(t).resolve(k);e.normalize();var r=e.authority;/:/.test(r)||(r=r+":"+("https"===e.scheme?"443":"80"));var n=I[r];return v(n)||(I[r]=0),r},i.request=function(t){if(g.typeOf.object("request",t),g.typeOf.string("request.url",t.url),g.typeOf.func("request.requestFunction",t.requestFunction),M(t.url)||x(t.url))return T.raiseEvent(),t.state=E.RECEIVED,t.requestFunction();if(++C.numberOfAttemptedRequests,v(t.serverKey)||(t.serverKey=i.getServerKey(t.url)),!t.throttleByServer||a(t.serverKey)){if(!i.throttleRequests||!t.throttle)return l(t);if(!(A.length>=i.maximumRequests)){o(t);var e=O.insert(t);if(v(e)){if(e===t)return;f(e)}return s(t)}}},i.clearForSpecs=function(){for(;O.length>0;){f(O.pop())}for(var t=A.length,e=0;e=300)return void s.reject(new F(t.statusCode,t,t.headers));var r=[];t.on("data",function(t){r.push(t)}),t.on("end",function(){var i=n.concat(r);"gzip"===t.headers["content-encoding"]?c.gunzip(i,function(t,r){t?s.reject(new G("Error decompressing response.")):s.resolve(g(r,e))}):s.resolve(g(i,e))})}).on("error",function(t){s.reject(new F)}).end()}var v=t("uri"),b=t("when"),w=t("./appendForwardSlash"),_=t("./Check"),x=t("./clone"),M=t("./combine"),E=t("./defaultValue"),C=t("./defined"),S=t("./defineProperties"),O=t("./deprecationWarning"),A=t("./DeveloperError"),I=t("./freezeObject"),k=(t("./FeatureDetection"),t("./getAbsoluteUri")),T=t("./getBaseUri"),P=t("./getExtensionFromUri"),R=t("./isBlobUri"),L=t("./isCrossOriginUrl"),j=t("./isDataUri"),N=t("./loadAndExecuteScript"),q=t("./objectToQuery"),B=t("./queryToObject"),z=t("./Request"),F=t("./RequestErrorEvent"),D=t("./RequestScheduler"),U=t("./RequestState"),G=t("./RuntimeError"),W=t("./TrustedServers"),Y=function(){try{var t=new XMLHttpRequest;return t.open("GET","#",!0),t.responseType="blob","blob"===t.responseType}catch(t){return!1}}();h.createIfNeeded=function(t){return t instanceof h?t.getDerivedResource({request:t.request}):"string"!=typeof t?t:new h({url:t})};var V;h.supportsImageBitmapOptions=function(){if(C(V))return V;if("function"!=typeof createImageBitmap)return V=b.resolve(!1);return V=h.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWP4////fwAJ+wP9CNHoHgAAAABJRU5ErkJggg=="}).then(function(t){return createImageBitmap(t,{imageOrientation:"flipY"})}).then(function(t){return!0}).otherwise(function(){return!1})},S(h,{isBlobSupported:{get:function(){return Y}}}),S(h.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(t){var e=new v(t);i(e,this,!1),e.fragment=void 0,this._url=e.toString()}},extension:{get:function(){return P(this._url)}},isDataUri:{get:function(){return j(this._url)}},isBlobUri:{get:function(){return R(this._url)}},isCrossOriginUrl:{get:function(){return L(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}}}),h.prototype.getUrlComponent=function(t,e){if(this.isDataUri)return this._url;var r=new v(this._url);t&&o(r,this);var n=r.toString().replace(/%7B/g,"{").replace(/%7D/g,"}"),i=this._templateValues;return n=n.replace(/{(.*?)}/g,function(t,e){var r=i[e];return C(r)?encodeURIComponent(r):t}),e&&C(this.proxy)&&(n=this.proxy.getURL(n)),n},h.prototype.setQueryParameters=function(t,e){this._queryParameters=e?u(this._queryParameters,t,!1):u(t,this._queryParameters,!1)},h.prototype.appendQueryParameters=function(t){this._queryParameters=u(t,this._queryParameters,!0)},h.prototype.setTemplateValues=function(t,e){this._templateValues=e?M(this._templateValues,t):M(t,this._templateValues)},h.prototype.getDerivedResource=function(t){var e=this.clone();if(e._retryCount=0,C(t.url)){var r=new v(t.url);i(r,e,!0,E(t.preserveQueryParameters,!1)),r.fragment=void 0,e._url=r.resolve(new v(k(this._url))).toString()}return C(t.queryParameters)&&(e._queryParameters=M(t.queryParameters,e._queryParameters)),C(t.templateValues)&&(e._templateValues=M(t.templateValues,e.templateValues)),C(t.headers)&&(e.headers=M(t.headers,e.headers)),C(t.proxy)&&(e.proxy=t.proxy),C(t.request)&&(e.request=t.request),C(t.retryCallback)&&(e.retryCallback=t.retryCallback),C(t.retryAttempts)&&(e.retryAttempts=t.retryAttempts),e},h.prototype.retryOnError=function(t){var e=this.retryCallback;if("function"!=typeof e||this._retryCount>=this.retryAttempts)return b(!1);var r=this;return b(e(this,t)).then(function(t){return++r._retryCount,t})},h.prototype.clone=function(t){return C(t)||(t=new h({url:this._url})),t._url=this._url,t._queryParameters=x(this._queryParameters),t._templateValues=x(this._templateValues),t.headers=x(this.headers),t.proxy=this.proxy,t.retryCallback=this.retryCallback,t.retryAttempts=this.retryAttempts,t._retryCount=0,t.request=this.request.clone(),t},h.prototype.getBaseUri=function(t){return T(this.getUrlComponent(t),t)},h.prototype.appendForwardSlash=function(){this._url=w(this._url)},h.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},h.fetchArrayBuffer=function(t){return new h(t).fetchArrayBuffer()},h.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},h.fetchBlob=function(t){return new h(t).fetchBlob()},h.prototype.fetchImage=function(t){"boolean"==typeof t&&(O("fetchImage-parameter-change","fetchImage now takes an options object in CesiumJS 1.57. Use resource.fetchImage({ preferBlob: true }) instead of resource.fetchImage(true)."),t={preferBlob:t}),t=E(t,E.EMPTY_OBJECT);var e=E(t.preferImageBitmap,!1),r=E(t.preferBlob,!1),n=E(t.flipY,!1);if(s(this.request),!Y||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!r)return l({resource:this,flipY:n,preferImageBitmap:e});var i=this.fetchBlob();if(C(i)){var o,a,u,f;return h.supportsImageBitmapOptions().then(function(t){return o=t,a=o&&e,i}).then(function(t){if(C(t)){if(f=t,a)return h._Implementations.createImageBitmapFromBlob(t,n);var e=window.URL.createObjectURL(t);return u=new h({url:e}),l({resource:u,flipY:n,preferImageBitmap:!1})}}).then(function(t){if(C(t))return t.blob=f,a?t:(window.URL.revokeObjectURL(u.url),t)}).otherwise(function(t){return C(u)&&window.URL.revokeObjectURL(u.url),b.reject(t)})}},h.fetchImage=function(t){return new h(t).fetchImage({flipY:t.flipY,preferBlob:t.preferBlob,preferImageBitmap:t.preferImageBitmap})},h.prototype.fetchText=function(){return this.fetch({responseType:"text"})},h.fetchText=function(t){return new h(t).fetchText()},h.prototype.fetchJson=function(){var t=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(C(t))return t.then(function(t){if(C(t))return JSON.parse(t)})},h.fetchJson=function(t){return new h(t).fetchJson()},h.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},h.fetchXML=function(t){return new h(t).fetchXML()},h.prototype.fetchJsonp=function(t){t=E(t,"callback"),s(this.request);var e;do{e="loadJsonp"+Math.random().toString().substring(2,8)}while(C(window[e]));return f(this,t,e)},h.fetchJsonp=function(t){return new h(t).fetchJsonp(t.callbackParameterName)},h.prototype._makeRequest=function(t){var e=this;s(e.request);var r=e.request;r.url=e.url,r.requestFunction=function(){var n=t.responseType,i=M(t.headers,e.headers),o=t.overrideMimeType,a=t.method,s=t.data,u=b.defer(),l=h._Implementations.loadWithXhr(e.url,n,a,s,i,u,o);return C(l)&&C(l.abort)&&(r.cancelFunction=function(){l.abort()}),u.promise};var n=D.request(r);if(C(n))return n.then(function(t){return t}).otherwise(function(n){return r.state!==U.FAILED?b.reject(n):e.retryOnError(n).then(function(i){return i?(r.state=U.UNISSUED,r.deferred=void 0,e.fetch(t)):b.reject(n)})})};var X=/^data:(.*?)(;base64)?,(.*)$/;h.prototype.fetch=function(t){return t=a(t,{}),t.method="GET",this._makeRequest(t)},h.fetch=function(t){return new h(t).fetch({responseType:t.responseType,overrideMimeType:t.overrideMimeType})},h.prototype.delete=function(t){return t=a(t,{}),t.method="DELETE",this._makeRequest(t)},h.delete=function(t){return new h(t).delete({responseType:t.responseType,overrideMimeType:t.overrideMimeType,data:t.data})},h.prototype.head=function(t){return t=a(t,{}),t.method="HEAD",this._makeRequest(t)},h.head=function(t){return new h(t).head({responseType:t.responseType,overrideMimeType:t.overrideMimeType})},h.prototype.options=function(t){return t=a(t,{}),t.method="OPTIONS",this._makeRequest(t)},h.options=function(t){return new h(t).options({responseType:t.responseType,overrideMimeType:t.overrideMimeType})},h.prototype.post=function(t,e){return _.defined("data",t),e=a(e,{}),e.method="POST",e.data=t,this._makeRequest(e)},h.post=function(t){return new h(t).post(t.data,{responseType:t.responseType,overrideMimeType:t.overrideMimeType})},h.prototype.put=function(t,e){return _.defined("data",t),e=a(e,{}),e.method="PUT",e.data=t,this._makeRequest(e)},h.put=function(t){return new h(t).put(t.data,{responseType:t.responseType,overrideMimeType:t.overrideMimeType})},h.prototype.patch=function(t,e){return _.defined("data",t),e=a(e,{}),e.method="PATCH",e.data=t,this._makeRequest(e)},h.patch=function(t){return new h(t).patch(t.data,{responseType:t.responseType,overrideMimeType:t.overrideMimeType})},h._Implementations={},h._Implementations.createImage=function(t,e,r,n,i){h.supportsImageBitmapOptions().then(function(n){return n&&i?h.fetchBlob({url:t}):void m(t,e,r)}).then(function(t){if(C(t))return h._Implementations.createImageBitmapFromBlob(t,n)}).then(function(t){C(t)&&r.resolve(t)}).otherwise(r.reject)},h._Implementations.createImageBitmapFromBlob=function(t,e){return createImageBitmap(t,{imageOrientation:e?"flipY":"none"})};var H="undefined"==typeof XMLHttpRequest;h._Implementations.loadWithXhr=function(t,e,r,n,i,o,a){var s=X.exec(t);if(null!==s)return void o.resolve(p(s,e));if(H)return void y(t,e,r,n,i,o,a);var u=new XMLHttpRequest;if(W.contains(t)&&(u.withCredentials=!0),u.open(r,t,!0),C(a)&&C(u.overrideMimeType)&&u.overrideMimeType(a),C(i))for(var h in i)i.hasOwnProperty(h)&&u.setRequestHeader(h,i[h]);C(e)&&(u.responseType=e);var l=!1;return"string"==typeof t&&(l=0===t.indexOf("file://")||"undefined"!=typeof window&&"file://"===window.location.origin),u.onload=function(){if((u.status<200||u.status>=300)&&(!l||0!==u.status))return void o.reject(new F(u.status,u.response,u.getAllResponseHeaders()));var t=u.response,n=u.responseType;if("HEAD"===r||"OPTIONS"===r){var i=u.getAllResponseHeaders(),a=i.trim().split(/[\r\n]+/),s={};return a.forEach(function(t){var e=t.split(": "),r=e.shift();s[r]=e.join(": ")}),void o.resolve(s)}if(204===u.status)o.resolve();else if(!C(t)||C(e)&&n!==e)if("json"===e&&"string"==typeof t)try{o.resolve(JSON.parse(t))}catch(t){o.reject(t)}else(""===n||"document"===n)&&C(u.responseXML)&&u.responseXML.hasChildNodes()?o.resolve(u.responseXML):""!==n&&"text"!==n||!C(u.responseText)?o.reject(new G("Invalid XMLHttpRequest response type.")):o.resolve(u.responseText);else o.resolve(t)},u.onerror=function(t){o.reject(new F)},u.send(n),u},h._Implementations.loadAndExecuteScript=function(t,e,r){return N(t,e).otherwise(r.reject)},h._DefaultImplementations={},h._DefaultImplementations.createImage=h._Implementations.createImage,h._DefaultImplementations.loadWithXhr=h._Implementations.loadWithXhr,h._DefaultImplementations.loadAndExecuteScript=h._Implementations.loadAndExecuteScript,h.DEFAULT=I(new h({url:"undefined"==typeof document?"":document.location.href.split("?")[0]})),e.exports=h}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"./Check":129,"./DeveloperError":131,"./FeatureDetection":134,"./Request":141,"./RequestErrorEvent":142,"./RequestScheduler":143,"./RequestState":144,"./RuntimeError":147,"./TrustedServers":150,"./appendForwardSlash":154,"./clone":156,"./combine":157,"./defaultValue":158,"./defineProperties":159,"./defined":160,"./deprecationWarning":161,"./freezeObject":163,"./getAbsoluteUri":164,"./getBaseUri":165,"./getExtensionFromUri":166,"./isBlobUri":168,"./isCrossOriginUrl":169,"./isDataUri":170,"./loadAndExecuteScript":171,"./objectToQuery":172,"./queryToObject":175,buffer:30,uri:100,when:118}],147:[function(t,e,r){function n(t){this.name="RuntimeError",this.message=t;var e;try{throw new Error}catch(t){e=t.stack}this.stack=e}var i=t("./defined");i(Object.create)&&(n.prototype=Object.create(Error.prototype),n.prototype.constructor=n),n.prototype.toString=function(){var t=this.name+": "+this.message;return i(this.stack)&&(t+="\n"+this.stack.toString()),t},e.exports=n},{"./defined":160}],148:[function(e,r,n){function i(){if(!m(l._canTransferArrayBuffer)){var t=new Worker(a("Workers/transferTypedArrayTest.js"));t.postMessage=p(t.webkitPostMessage,t.postMessage);var e=new Int8Array([99]);try{t.postMessage({array:e},[e.buffer])}catch(t){return l._canTransferArrayBuffer=!1,l._canTransferArrayBuffer}var r=c.defer();t.onmessage=function(e){var n=e.data.array,i=m(n)&&99===n[0];r.resolve(i),t.terminate(),l._canTransferArrayBuffer=i},l._canTransferArrayBuffer=r.promise}return l._canTransferArrayBuffer}function o(t,e){--t._activeTasks;var r=e.id;if(m(r)){var n=t._deferreds,i=n[r];if(m(e.error)){var o=e.error;"RuntimeError"===o.name?(o=new x(e.error.message),o.stack=e.error.stack):"DeveloperError"===o.name&&(o=new y(e.error.message),o.stack=e.error.stack),M.raiseEvent(o),i.reject(o)}else M.raiseEvent(),i.resolve(e.result);delete n[r]}}function a(t){var e=d(t);if(w(e)){var r,n='importScripts("'+e+'");';try{r=new Blob([n],{type:"application/javascript"})}catch(t){var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,o=new i;o.append(n),r=o.getBlob("application/javascript")}e=(window.URL||window.webkitURL).createObjectURL(r)}return e}function s(){return m(f)||(f=a("Workers/cesiumWorkerBootstrapper.js")),f}function u(r){var n=new Worker(s());n.postMessage=p(n.webkitPostMessage,n.postMessage);var i={loaderConfig:{},workerModule:l._workerModulePrefix+r._workerName};return m(l._loaderConfig)?i.loaderConfig=l._loaderConfig:(m(t.amd)&&!t.amd.toUrlUndefined&&m(e.toUrl)||(i.loaderConfig.paths={Workers:d("Workers")}),i.loaderConfig.baseUrl=d.getCesiumBaseUrl().url),n.postMessage(i),n.onmessage=function(t){o(r,t.data)},n}function h(t,e){var r={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(!b.supportsWebAssembly()){if(!m(e.fallbackModulePath))throw new x("This browser does not support Web Assembly, and no backup module was provided for "+t._workerName);return r.modulePath=d(e.fallbackModulePath),c.resolve(r)}return r.modulePath=d(e.modulePath),r.wasmBinaryFile=d(e.wasmBinaryFile),_.fetchArrayBuffer({url:r.wasmBinaryFile}).then(function(t){return r.wasmBinary=t,r})}function l(t,e){this._workerName=t,this._maximumActiveTasks=p(e,5),this._activeTasks=0,this._deferreds={},this._nextID=0}var f,c=e("when"),d=e("./buildModuleUrl"),p=e("./defaultValue"),m=e("./defined"),g=e("./destroyObject"),y=e("./DeveloperError"),v=e("./Event"),b=e("./FeatureDetection"),w=(e("./getAbsoluteUri"),e("./isCrossOriginUrl")),_=e("./Resource"),x=e("./RuntimeError"),M=new v,E=[];l.prototype.scheduleTask=function(t,e){if(m(this._worker)||(this._worker=u(this)),!(this._activeTasks>=this._maximumActiveTasks)){++this._activeTasks;var r=this;return c(i(),function(n){m(e)?n||(e.length=0):e=E;var i=r._nextID++,o=c.defer();return r._deferreds[i]=o,r._worker.postMessage({id:i,parameters:t,canTransferArrayBuffer:n},e),o.promise})}},l.prototype.initWebAssemblyModule=function(t){m(this._worker)||(this._worker=u(this));var e=c.defer(),r=this,n=this._worker;return h(this,t).then(function(t){return c(i(),function(i){var a,s=t.wasmBinary;m(s)&&i&&(a=[s]),n.onmessage=function(t){n.onmessage=function(t){o(r,t.data)},e.resolve(t.data)},n.postMessage({webAssemblyConfig:t},a)})}),e},l.prototype.isDestroyed=function(){return!1},l.prototype.destroy=function(){return m(this._worker)&&this._worker.terminate(),g(this)},l.taskCompletedEvent=M,l._defaultWorkerModulePrefix="Workers/",l._workerModulePrefix=l._defaultWorkerModulePrefix,l._loaderConfig=void 0,l._canTransferArrayBuffer=void 0,r.exports=l},{"./DeveloperError":131,"./Event":133,"./FeatureDetection":134,"./Resource":146,"./RuntimeError":147,"./buildModuleUrl":155,"./defaultValue":158,"./defined":160,"./destroyObject":162,"./getAbsoluteUri":164,"./isCrossOriginUrl":169,when:118}],149:[function(t,e,r){function n(t){throw new o("This type should not be instantiated directly. Instead, use WebMercatorTilingScheme or GeographicTilingScheme.")}var i=t("./defineProperties"),o=t("./DeveloperError");i(n.prototype,{ellipsoid:{get:o.throwInstantiationError},rectangle:{get:o.throwInstantiationError},projection:{get:o.throwInstantiationError}}),n.prototype.getNumberOfXTilesAtLevel=o.throwInstantiationError,n.prototype.getNumberOfYTilesAtLevel=o.throwInstantiationError,n.prototype.rectangleToNativeRectangle=o.throwInstantiationError,n.prototype.tileXYToNativeRectangle=o.throwInstantiationError,n.prototype.tileXYToRectangle=o.throwInstantiationError,n.prototype.positionToTileXY=o.throwInstantiationError,e.exports=n},{"./DeveloperError":131,"./defineProperties":159}],150:[function(t,e,r){function n(t){var e=new i(t);e.normalize();var r=e.getAuthority();if(o(r)){if(-1!==r.indexOf("@")){r=r.split("@")[1]}if(-1===r.indexOf(":")){var n=e.getScheme();if(o(n)||(n=window.location.protocol,n=n.substring(0,n.length-1)),"http"===n)r+=":80";else{if("https"!==n)return;r+=":443"}}return r}}var i=t("./Uri"),o=t("./defined"),a=t("./DeveloperError"),s={},u={};s.add=function(t,e){if(!o(t))throw new a("host is required.");if(!o(e)||e<=0)throw new a("port is required to be greater than 0.");var r=t.toLowerCase()+":"+e;o(u[r])||(u[r]=!0)},s.remove=function(t,e){if(!o(t))throw new a("host is required.");if(!o(e)||e<=0)throw new a("port is required to be greater than 0.");var r=t.toLowerCase()+":"+e;o(u[r])&&delete u[r]},s.contains=function(t){if(!o(t))throw new a("url is required.");var e=n(t);return!(!o(e)||!o(u[e]))},s.clear=function(){u={}},e.exports=s},{"./DeveloperError":131,"./Uri":151,"./defined":160}],151:[function(t,e,r){function n(t){if(t instanceof n)this.scheme=t.scheme,this.authority=t.authority,this.path=t.path,this.query=t.query,this.fragment=t.fragment;else if(t){var e=a.exec(t);this.scheme=e[1],this.authority=e[2],this.path=e[3],this.query=e[4],this.fragment=e[5]}}function i(t){var e=unescape(t);return u.test(e)?e:t.toUpperCase()}function o(t,e,r,n){return(e||"")+r.toLowerCase()+(n||"")}n.prototype.scheme=null,n.prototype.authority=null,n.prototype.path="",n.prototype.query=null,n.prototype.fragment=null;var a=new RegExp("^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$");n.prototype.getScheme=function(){return this.scheme},n.prototype.getAuthority=function(){return this.authority},n.prototype.getPath=function(){return this.path},n.prototype.getQuery=function(){return this.query},n.prototype.getFragment=function(){return this.fragment},n.prototype.isAbsolute=function(){return!!this.scheme&&!this.fragment},n.prototype.isSameDocumentAs=function(t){return t.scheme==this.scheme&&t.authority==this.authority&&t.path==this.path&&t.query==this.query},n.prototype.equals=function(t){return this.isSameDocumentAs(t)&&t.fragment==this.fragment},n.prototype.normalize=function(){this.removeDotSegments(),this.scheme&&(this.scheme=this.scheme.toLowerCase()),this.authority&&(this.authority=this.authority.replace(h,o).replace(s,i)),this.path&&(this.path=this.path.replace(s,i)),this.query&&(this.query=this.query.replace(s,i)),this.fragment&&(this.fragment=this.fragment.replace(s,i))};var s=/%[0-9a-z]{2}/gi,u=/[a-zA-Z0-9\-\._~]/,h=/(.*@)?([^@:]*)(:.*)?/;n.prototype.resolve=function(t){var e=new n;return this.scheme?(e.scheme=this.scheme,e.authority=this.authority,e.path=this.path,e.query=this.query):(e.scheme=t.scheme,this.authority?(e.authority=this.authority,e.path=this.path,e.query=this.query):(e.authority=t.authority,""==this.path?(e.path=t.path,e.query=this.query||t.query):("/"==this.path.charAt(0)?(e.path=this.path,e.removeDotSegments()):(t.authority&&""==t.path?e.path="/"+this.path:e.path=t.path.substring(0,t.path.lastIndexOf("/")+1)+this.path,e.removeDotSegments()),e.query=this.query))),e.fragment=this.fragment,e},n.prototype.removeDotSegments=function(){var t,e=this.path.split("/"),r=[],n=""==e[0];n&&e.shift();for(""==e[0]&&e.shift();e.length;)t=e.shift(),".."==t?r.pop():"."!=t&&r.push(t);"."!=t&&".."!=t||r.push(""),n&&r.unshift(""),this.path=r.join("/")},n.prototype.toString=function(){var t="";return this.scheme&&(t+=this.scheme+":"),this.authority&&(t+="//"+this.authority),t+=this.path,this.query&&(t+="?"+this.query),this.fragment&&(t+="#"+this.fragment),t},e.exports=n},{}],152:[function(t,e,r){function n(t){this._ellipsoid=a(t,l.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}var i=t("./Cartesian3"),o=t("./Cartographic"),a=t("./defaultValue"),s=t("./defined"),u=t("./defineProperties"),h=t("./DeveloperError"),l=t("./Ellipsoid"),f=t("./Math");u(n.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),n.mercatorAngleToGeodeticLatitude=function(t){return f.PI_OVER_TWO-2*Math.atan(Math.exp(-t))},n.geodeticLatitudeToMercatorAngle=function(t){ t>n.MaximumLatitude?t=n.MaximumLatitude:t<-n.MaximumLatitude&&(t=-n.MaximumLatitude);var e=Math.sin(t);return.5*Math.log((1+e)/(1-e))},n.MaximumLatitude=n.mercatorAngleToGeodeticLatitude(Math.PI),n.prototype.project=function(t,e){var r=this._semimajorAxis,o=t.longitude*r,a=n.geodeticLatitudeToMercatorAngle(t.latitude)*r,u=t.height;return s(e)?(e.x=o,e.y=a,e.z=u,e):new i(o,a,u)},n.prototype.unproject=function(t,e){if(!s(t))throw new h("cartesian is required");var r=this._oneOverSemimajorAxis,i=t.x*r,a=n.mercatorAngleToGeodeticLatitude(t.y*r),u=t.z;return s(e)?(e.longitude=i,e.latitude=a,e.height=u,e):new o(i,a,u)},e.exports=n},{"./Cartesian3":126,"./Cartographic":128,"./DeveloperError":131,"./Ellipsoid":132,"./Math":139,"./defaultValue":158,"./defineProperties":159,"./defined":160}],153:[function(t,e,r){function n(t){if(t=o(t,{}),this._ellipsoid=o(t.ellipsoid,u.WGS84),this._numberOfLevelZeroTilesX=o(t.numberOfLevelZeroTilesX,1),this._numberOfLevelZeroTilesY=o(t.numberOfLevelZeroTilesY,1),this._projection=new l(this._ellipsoid),a(t.rectangleSouthwestInMeters)&&a(t.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=t.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=t.rectangleNortheastInMeters;else{var e=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new i(-e,-e),this._rectangleNortheastInMeters=new i(e,e)}var r=this._projection.unproject(this._rectangleSouthwestInMeters),n=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new h(r.longitude,r.latitude,n.longitude,n.latitude)}var i=t("./Cartesian2"),o=t("./defaultValue"),a=t("./defined"),s=t("./defineProperties"),u=t("./Ellipsoid"),h=t("./Rectangle"),l=t("./WebMercatorProjection");s(n.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),n.prototype.getNumberOfXTilesAtLevel=function(t){return this._numberOfLevelZeroTilesX<=o&&(y=o-1);var v=g/c|0;return v>=s&&(v=s-1),a(r)?(r.x=y,r.y=v,r):new i(y,v)}},e.exports=n},{"./Cartesian2":125,"./Ellipsoid":132,"./Rectangle":140,"./WebMercatorProjection":152,"./defaultValue":158,"./defineProperties":159,"./defined":160}],154:[function(t,e,r){"use strict";function n(t){return 0!==t.length&&"/"===t[t.length-1]||(t+="/"),t}e.exports=n},{}],155:[function(e,r,n){function i(){for(var t=document.getElementsByTagName("script"),e=0,r=t.length;e0){var a=i.substring(0,o),s=i.substring(o+2);e[a]=s}}return e}e.exports=n},{}],175:[function(t,e,r){function n(t){if(!i(t))throw new o("queryString is required.");var e={};if(""===t)return e;for(var r=t.replace(/\+/g,"%20").split(/[&;]/),n=0,s=r.length;ns.EPSILON12);return o(l)?(l.x=f*I,l.y=c*k,l.z=d*T,l):new i(f*I,c*k,d*T)}var i=t("./Cartesian3"),o=t("./defined"),a=t("./DeveloperError"),s=t("./Math"),u=new i,h=new i;e.exports=n},{"./Cartesian3":126,"./DeveloperError":131,"./Math":139,"./defined":160}],177:[function(t,e,r){function n(t,e){if(!u(t))throw new h("text is required.");if(""!==t){e=s(e,s.EMPTY_OBJECT);var r=s(e.font,"10px sans-serif"),n=s(e.stroke,!1),l=s(e.fill,!0),f=s(e.strokeWidth,1),c=s(e.backgroundColor,a.TRANSPARENT),d=s(e.padding,0),p=2*d,m=document.createElement("canvas");m.width=1,m.height=1,m.style.font=r;var g=m.getContext("2d");u(i)||(u(g.imageSmoothingEnabled)?i="imageSmoothingEnabled":u(g.mozImageSmoothingEnabled)?i="mozImageSmoothingEnabled":u(g.webkitImageSmoothingEnabled)?i="webkitImageSmoothingEnabled":u(g.msImageSmoothingEnabled)&&(i="msImageSmoothingEnabled")),g.font=r,g.lineJoin="round",g.lineWidth=f,g[i]=!1,g.textBaseline=s(e.textBaseline,"bottom"),m.style.visibility="hidden",document.body.appendChild(m);var y=o(g,t,n,l);m.dimensions=y,document.body.removeChild(m),m.style.visibility="";var v=-y.bounds.minx,b=Math.ceil(y.width)+v+p,w=y.height+p,_=w-y.ascent+p,x=w-_+p;if(m.width=b,m.height=w,g.font=r,g.lineJoin="round",g.lineWidth=f,g[i]=!1,c!==a.TRANSPARENT&&(g.fillStyle=c.toCssColorString(),g.fillRect(0,0,m.width,m.height)),n){var M=s(e.strokeColor,a.BLACK);g.strokeStyle=M.toCssColorString(),g.strokeText(t,v+d,x)}if(l){var E=s(e.fillColor,a.WHITE);g.fillStyle=E.toCssColorString(),g.fillText(t,v+d,x)}return m}}var i,o=t("../ThirdParty/measureText"),a=t("./Color"),s=t("./defaultValue"),u=t("./defined"),h=t("./DeveloperError");e.exports=n},{"../ThirdParty/measureText":178,"./Color":130,"./DeveloperError":131,"./defaultValue":158,"./defined":160}],178:[function(t,e,r){var n=function(t,e){return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},i=function(t,e,r,i){var o=t.measureText(e),a=n(t.canvas,"font-family"),s=n(t.canvas,"font-size").replace("px",""),u=n(t.canvas,"font-style"),h=n(t.canvas,"font-weight"),l=!/\S/.test(e);o.fontsize=s;var f=document.createElement("div");f.style.position="absolute",f.style.opacity=0,f.style.font=u+" "+h+" "+s+"px "+a,f.innerHTML=e+"
"+e,document.body.appendChild(f),o.leading=1.2*s;var c=n(f,"height");if(c=c.replace("px",""),c>=2*s&&(o.leading=c/2|0),document.body.removeChild(f),l)o.ascent=0,o.descent=0,o.bounds={minx:0,maxx:o.width,miny:0,maxy:0},o.height=0;else{var d=document.createElement("canvas");d.width=o.width+100,d.height=3*s,d.style.opacity=1,d.style.fontFamily=a,d.style.fontSize=s,d.style.fontStyle=u,d.style.fontWeight=h;var p=d.getContext("2d");p.font=u+" "+h+" "+s+"px "+a;var m=d.width,g=d.height,y=g/2;p.fillStyle="white",p.fillRect(-1,-1,m+2,g+2),r&&(p.strokeStyle="black",p.lineWidth=t.lineWidth,p.strokeText(e,50,y)),i&&(p.fillStyle="black",p.fillText(e,50,y));for(var v=p.getImageData(0,0,m,g).data,b=0,w=4*m,_=v.length;++b<_&&255===v[b];);var x=b/w|0;for(b=_-1;--b>0&&255===v[b];);var M=b/w|0;for(b=0;b<_&&255===v[b];)(b+=w)>=_&&(b=b-_+4);var E=b%w/4|0,C=1;for(b=_-3;b>=0&&255===v[b];)(b-=w)<0&&(b=_-3-4*C++);var S=b%w/4+1|0;o.ascent=y-x,o.descent=M-y,o.bounds={minx:E-50,maxx:S-50,miny:0,maxy:M-x},o.height=M-x+1}return o};e.exports=i},{}],179:[function(e,r,n){!function(t){"use strict";t(function(){function t(t,r,n,i){return e(t).then(r,n,i)}function e(t){var e,r;return t instanceof n?e=t:s(t)?(r=a(),t.then(function(t){r.resolve(t)},function(t){r.reject(t)},function(t){r.progress(t)}),e=r.promise):e=i(t),e}function r(e){return t(e,o)}function n(t){this.then=t}function i(t){return new n(function(r){try{return e(r?r(t):t)}catch(t){return o(t)}})}function o(t){return new n(function(r,n){try{return n?e(n(t)):o(t)}catch(t){return o(t)}})}function a(){function t(t,e,r){return c(t,e,r)}function r(t){return p(t)}function i(t){return p(o(t))}function s(t){return d(t)}var u,h,l,f,c,d,p;return h=new n(t),u={then:t,resolve:r,reject:i,progress:s,promise:h,resolver:{resolve:r,reject:i,progress:s}},l=[],f=[],c=function(t,e,r){var n,i;return n=a(),i="function"==typeof r?function(t){try{n.progress(r(t))}catch(t){n.progress(t)}}:function(t){n.progress(t)},l.push(function(r){r.then(t,e).then(n.resolve,n.reject,i)}),f.push(i),n.promise},d=function(t){return m(f,t),t},p=function(t){return t=e(t),c=t.then,p=e,d=y,m(l,t),f=l=_,t},u}function s(t){return t&&"function"==typeof t.then}function u(e,r,n,i,o){return g(2,arguments),t(e,function(e){function s(t){m(t)}function u(t){p(t)}var h,l,f,c,d,p,m,g,v,b;if(v=e.length>>>0,h=Math.max(0,Math.min(r,v)),f=[],l=v-h+1,c=[],d=a(),h)for(g=d.progress,m=function(t){c.push(t),--l||(p=m=y,d.reject(c))},p=function(t){f.push(t),--h||(p=m=y,d.resolve(f))},b=0;b>>0,n=[],h=a(),o)for(s=function(e,i){t(e,r).then(function(t){n[i]=t,--o||h.resolve(n)},h.reject)},u=0;u2;return t(e,function(t){return t=i?n:t,r.resolve(t),t},function(t){return r.reject(t),o(t)},r.progress)}function m(t,e){for(var r,n=0;r=t[n++];)r(e)}function g(t,e){for(var r,n=e.length;n>t;)if(null!=(r=e[--n])&&"function"!=typeof r)throw new Error("arg "+n+" must be a function")}function y(){}function v(t){return t}var b,w,_;return t.defer=a,t.resolve=e,t.reject=r,t.join=f,t.all=l,t.map=c,t.reduce=d,t.any=h,t.some=u,t.chain=p,t.isPromise=s,n.prototype={always:function(t,e){return this.then(t,t,e)},otherwise:function(t){return this.then(_,t)},yield:function(t){return this.then(function(){return t})},spread:function(t){return this.then(function(e){return l(e,function(e){return t.apply(_,e)})})}},w=[].slice,b=[].reduce||function(t){var e,r,n,i,o;if(o=0,e=Object(this),i=e.length>>>0,r=arguments,r.length<=1)for(;;){if(o in e){n=e[o++];break}if(++o>=i)throw new TypeError}else n=r[1];for(;o=0?t.substring(e,t.length):""},n.GetFileName=function(t){var e=t.lastIndexOf("/");return e<0?t:t.substring(e+1,t.length)},n.GetDirectoryName=function(t){var e=t.lastIndexOf("/");return e<0?"":t.substring(0,e)},n.Combine=function(t,e){return t+e},n.ChangeExtension=function(t,e){return t.replace(n.GetExtension(t),e)},e.exports=n},{}],183:[function(t,e,r){function n(t,e,r){var n=i(t.x+e,t.y),o=i(t.x+t.width,t.y),a=i(t.x+t.width,t.y+t.height),s=i(t.x,t.y+t.height),u=i(t.x,t.y);r.beginPath(),r.moveTo(n.x,n.y),r.arcTo(o.x,o.y,a.x,a.y,e),r.arcTo(a.x,a.y,s.x,s.y,e),r.arcTo(s.x,s.y,u.x,u.y,e),r.arcTo(u.x,u.y,n.x,n.y,e),r.fill(),r.stroke()}var i=function(t,e){return{x:t,y:e}};e.exports=n},{}],184:[function(t,e,r){function n(t,e){e=e||{font:"20px sans-serif"};var r=e.backgroundColor,n=e.padding?e.padding:0;delete e.backgroundColor,delete e.padding;for(var a=t.split(/[\r]?\n+/),s=[],u=0,h=0,l=0;l