(function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?this:self:global:window,t.shp=e()}})(function(){var a=Math.log,n=Math.abs,r=Math.floor,o=Math.pow,d=String.fromCharCode,l=Math.min,p;return function(){function s(d,e,n){function t(o,i){if(!e[o]){if(!d[o]){var l="function"==typeof require&&require;if(!i&&l)return l(o,!0);if(r)return r(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var a=e[o]={exports:{}};d[o][0].call(a.exports,function(e){var a=d[o][1][e];return t(a||e)},a,a.exports,s,d,e,n)}return e[o].exports}for(var r="function"==typeof require&&require,a=0;a>16,o[d++]=255&p>>8,o[d++]=255&p;return 2===s&&(p=c[e.charCodeAt(m)]<<2|c[e.charCodeAt(m+1)]>>4,o[d++]=255&p),1===s&&(p=c[e.charCodeAt(m)]<<10|c[e.charCodeAt(m+1)]<<4|c[e.charCodeAt(m+2)]>>2,o[d++]=255&p>>8,o[d++]=255&p),o}function o(e){return p[63&e>>18]+p[63&e>>12]+p[63&e>>6]+p[63&e]}function d(e,t,a){for(var n=[],r=t,s;ro?o:s+r));return 1===a?(l=e[t-1],n.push(p[l>>2]+p[63&l<<4]+"==")):2===a&&(l=(e[t-2]<<8)+e[t-1],n.push(p[l>>10]+p[63&l>>4]+p[63&l<<2]+"=")),n.join("")}a.byteLength=function(e){var t=n(e),a=t[0],r=t[1];return 3*(a+r)/4-r},a.toByteArray=s,a.fromByteArray=l;for(var p=[],c=[],u="undefined"==typeof Uint8Array?Array:Uint8Array,m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=0,f=m.length;_ * @license MIT */'use strict';function s(){return n.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function p(e,t){if(s()e)throw new RangeError("\"size\" argument must not be negative")}function m(e,t,a,n){return u(t),0>=t?p(e,t):void 0===a?p(e,t):"string"==typeof n?p(e,t).fill(a,n):p(e,t).fill(a)}function _(e,t){if(u(t),e=p(e,0>t?0:0|b(t)),!n.TYPED_ARRAY_SUPPORT)for(var a=0;at.length?0:0|b(t.length);e=p(e,a);for(var n=0;na||t.byteLength=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function x(e){return+e!=e&&(e=0),n.alloc(+e)}function w(e,t){if(n.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var a=e.length;if(0===a)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return a;case"utf8":case"utf-8":case void 0:return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*a;case"hex":return a>>>1;case"base64":return V(e).length;default:if(r)return W(e).length;t=(""+t).toLowerCase(),r=!0;}}function E(e,t,a){var n=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===a||a>this.length)&&(a=this.length),0>=a)return"";if(a>>>=0,t>>>=0,a<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,a);case"utf8":case"utf-8":return T(this,t,a);case"ascii":return P(this,t,a);case"latin1":case"binary":return N(this,t,a);case"base64":return L(this,t,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,a);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0;}}function C(e,t,a){var n=e[t];e[t]=e[a],e[a]=n}function A(e,t,a,r,s){if(0===e.length)return-1;if("string"==typeof a?(r=a,a=0):2147483647a&&(a=-2147483648),a=+a,isNaN(a)&&(a=s?0:e.length-1),0>a&&(a=e.length+a),a>=e.length){if(s)return-1;a=e.length-1}else if(0>a)if(s)a=0;else return-1;if("string"==typeof t&&(t=n.from(t,r)),n.isBuffer(t))return 0===t.length?-1:S(e,t,a,r,s);if("number"==typeof t)return t&=255,n.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,a):Uint8Array.prototype.lastIndexOf.call(e,t,a):S(e,[t],a,r,s);throw new TypeError("val must be string, number or Buffer")}function S(e,t,a,n,r){function s(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,d=e.length,l=t.length;if(void 0!==n&&(n=(n+"").toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(2>e.length||2>t.length)return-1;o=2,d/=2,l/=2,a/=2}var p;if(r){var c=-1;for(p=a;pd&&(a=d-l),p=a;0<=p;p--){for(var u=!0,m=0;mr&&(n=r)):n=r;var s=t.length;if(0!=s%2)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var o=0,d;os&&(o=s):2===d?(p=e[r+1],128==(192&p)&&(m=(31&s)<<6|63&p,127m||57343m&&(o=m))):void 0}null===o?(o=65533,d=1):65535>>10),o=56320|1023&o),n.push(o),r+=d}return B(n)}function B(e){var t=e.length;if(t<=4096)return d.apply(String,e);for(var a="",n=0;nt)&&(t=0),(!a||0>a||a>n)&&(a=n);for(var r="",s=t;se)throw new RangeError("offset is not uint");if(e+t>a)throw new RangeError("Trying to access beyond buffer length")}function F(e,t,a,r,s,i){if(!n.isBuffer(e))throw new TypeError("\"buffer\" argument must be a Buffer instance");if(t>s||te.length)throw new RangeError("Index out of range")}function M(e,t,a,n){0>t&&(t=65535+t+1);for(var r=0,s=l(e.length-a,2);r>>8*(n?r:1-r)}function G(e,t,a,n){0>t&&(t=4294967295+t+1);for(var r=0,s=l(e.length-a,4);r>>8*(n?r:3-r)}function Z(e,t,a,n){if(a+n>e.length)throw new RangeError("Index out of range");if(0>a)throw new RangeError("Index out of range")}function Y(e,t,a,n,r){return r||Z(e,t,a,4,34028234663852886e22,-34028234663852886e22),ae.write(e,t,a,n,23,4),a+4}function q(e,t,a,n,r){return r||Z(e,t,a,8,17976931348623157e292,-17976931348623157e292),ae.write(e,t,a,n,52,8),a+8}function H(e){if(e=K(e).replace(re,""),2>e.length)return"";for(;0!=e.length%4;)e+="=";return e}function K(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function X(e){return 16>e?"0"+e.toString(16):e.toString(16)}function W(e,t){t=t||1/0;for(var a=e.length,n=null,r=[],s=0,o;so){if(!n){if(56319o){-1<(t-=3)&&r.push(239,191,189),n=o;continue}o=(n-55296<<10|o-56320)+65536}else n&&-1<(t-=3)&&r.push(239,191,189);if(n=null,128>o){if(0>(t-=1))break;r.push(o)}else if(2048>o){if(0>(t-=2))break;r.push(192|o>>6,128|63&o)}else if(65536>o){if(0>(t-=3))break;r.push(224|o>>12,128|63&o>>6,128|63&o)}else if(1114112>o){if(0>(t-=4))break;r.push(240|o>>18,128|63&o>>12,128|63&o>>6,128|63&o)}else throw new Error("Invalid code point")}return r}function Q(e){for(var t=[],a=0;a(t-=2));++n)r=e.charCodeAt(n),s=r>>8,o=r%256,a.push(o),a.push(s);return a}function V(e){return te.toByteArray(H(e))}function $(e,t,a,n){for(var r=0;r=t.length||r>=e.length);++r)t[r+a]=e[r];return r}function ee(e){return e!==e}var te=e("base64-js"),ae=e("ieee754"),ne=e("isarray");a.Buffer=n,a.SlowBuffer=x,a.INSPECT_MAX_BYTES=50,n.TYPED_ARRAY_SUPPORT=t.TYPED_ARRAY_SUPPORT===void 0?function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}():t.TYPED_ARRAY_SUPPORT,a.kMaxLength=s(),n.poolSize=8192,n._augment=function(e){return e.__proto__=n.prototype,e},n.from=function(e,t,a){return c(null,e,t,a)},n.TYPED_ARRAY_SUPPORT&&(n.prototype.__proto__=Uint8Array.prototype,n.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&n[Symbol.species]===n&&Object.defineProperty(n,Symbol.species,{value:null,configurable:!0})),n.alloc=function(e,t,a){return m(null,e,t,a)},n.allocUnsafe=function(e){return _(null,e)},n.allocUnsafeSlow=function(e){return _(null,e)},n.isBuffer=function(e){return!!(null!=e&&e._isBuffer)},n.compare=function(e,t){if(!n.isBuffer(e)||!n.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var a=e.length,r=t.length,s=0,o=l(a,r);st&&(e+=" ... ")),""},n.prototype.compare=function(e,t,a,r,s){if(!n.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===a&&(a=e?e.length:0),void 0===r&&(r=0),void 0===s&&(s=this.length),0>t||a>e.length||0>r||s>this.length)throw new RangeError("out of range index");if(r>=s&&t>=a)return 0;if(r>=s)return-1;if(t>=a)return 1;if(t>>>=0,a>>>=0,r>>>=0,s>>>=0,this===e)return 0;for(var o=s-r,d=a-t,p=l(o,d),c=this.slice(r,s),u=e.slice(t,a),m=0;mr)&&(a=r),0a||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return k(this,e,t,a);case"utf8":case"utf-8":return v(this,e,t,a);case"ascii":return I(this,e,t,a);case"latin1":case"binary":return R(this,e,t,a);case"base64":return O(this,e,t,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,e,t,a);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0;}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};n.prototype.slice=function(e,t){var a=this.length;e=~~e,t=t===void 0?a:~~t,0>e?(e+=a,0>e&&(e=0)):e>a&&(e=a),0>t?(t+=a,0>t&&(t=0)):t>a&&(t=a),t=r&&(n-=o(2,8*t)),n},n.prototype.readIntBE=function(e,t,a){e|=0,t|=0,a||U(e,t,this.length);for(var n=t,r=1,s=this[e+--n];0=r&&(s-=o(2,8*t)),s},n.prototype.readInt8=function(e,t){return t||U(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},n.prototype.readInt16LE=function(e,t){t||U(e,2,this.length);var a=this[e]|this[e+1]<<8;return 32768&a?4294901760|a:a},n.prototype.readInt16BE=function(e,t){t||U(e,2,this.length);var a=this[e+1]|this[e]<<8;return 32768&a?4294901760|a:a},n.prototype.readInt32LE=function(e,t){return t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},n.prototype.readInt32BE=function(e,t){return t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},n.prototype.readFloatLE=function(e,t){return t||U(e,4,this.length),ae.read(this,e,!0,23,4)},n.prototype.readFloatBE=function(e,t){return t||U(e,4,this.length),ae.read(this,e,!1,23,4)},n.prototype.readDoubleLE=function(e,t){return t||U(e,8,this.length),ae.read(this,e,!0,52,8)},n.prototype.readDoubleBE=function(e,t){return t||U(e,8,this.length),ae.read(this,e,!1,52,8)},n.prototype.writeUIntLE=function(e,t,a,n){if(e=+e,t|=0,a|=0,!n){var r=o(2,8*a)-1;F(this,e,t,a,r,0)}var s=1,d=0;for(this[t]=255&e;++d>>8):M(this,e,t,!0),t+2},n.prototype.writeUInt16BE=function(e,t,a){return e=+e,t|=0,a||F(this,e,t,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},n.prototype.writeUInt32LE=function(e,t,a){return e=+e,t|=0,a||F(this,e,t,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):G(this,e,t,!0),t+4},n.prototype.writeUInt32BE=function(e,t,a){return e=+e,t|=0,a||F(this,e,t,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):G(this,e,t,!1),t+4},n.prototype.writeIntLE=function(e,t,a,n){if(e=+e,t|=0,!n){var r=o(2,8*a-1);F(this,e,t,a,r-1,-r)}var s=0,d=1,l=0;for(this[t]=255&e;++se&&0===l&&0!==this[t+s-1]&&(l=1),this[t+s]=255&(e/d>>0)-l;return t+a},n.prototype.writeIntBE=function(e,t,a,n){if(e=+e,t|=0,!n){var r=o(2,8*a-1);F(this,e,t,a,r-1,-r)}var s=a-1,d=1,l=0;for(this[t+s]=255&e;0<=--s&&(d*=256);)0>e&&0===l&&0!==this[t+s+1]&&(l=1),this[t+s]=255&(e/d>>0)-l;return t+a},n.prototype.writeInt8=function(e,t,a){return e=+e,t|=0,a||F(this,e,t,1,127,-128),n.TYPED_ARRAY_SUPPORT||(e=r(e)),0>e&&(e=255+e+1),this[t]=255&e,t+1},n.prototype.writeInt16LE=function(e,t,a){return e=+e,t|=0,a||F(this,e,t,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},n.prototype.writeInt16BE=function(e,t,a){return e=+e,t|=0,a||F(this,e,t,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},n.prototype.writeInt32LE=function(e,t,a){return e=+e,t|=0,a||F(this,e,t,4,2147483647,-2147483648),n.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):G(this,e,t,!0),t+4},n.prototype.writeInt32BE=function(e,t,a){return e=+e,t|=0,a||F(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),n.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):G(this,e,t,!1),t+4},n.prototype.writeFloatLE=function(e,t,a){return Y(this,e,t,!0,a)},n.prototype.writeFloatBE=function(e,t,a){return Y(this,e,t,!1,a)},n.prototype.writeDoubleLE=function(e,t,a){return q(this,e,t,!0,a)},n.prototype.writeDoubleBE=function(e,t,a){return q(this,e,t,!1,a)},n.prototype.copy=function(e,t,a,r){if(a||(a=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),0t)throw new RangeError("targetStart out of bounds");if(0>a||a>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-ts||!n.TYPED_ARRAY_SUPPORT)for(o=0;os&&(e=s)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!n.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(0>t||this.length>>=0,a=a===void 0?this.length:a>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o>1,_=-7,f=n?l-1:0,h=n?-1:1,d=t[a+f],g,y;for(f+=h,g=d&(1<<-_)-1,d>>=-_,_+=p;0<_;g=256*g+t[a+f],f+=h,_-=8);for(y=g&(1<<-_)-1,g>>=-_,_+=r;0<_;y=256*y+t[a+f],f+=h,_-=8);if(0===g)g=1-u;else{if(g===c)return y?NaN:(d?-1:1)*(1/0);y+=o(2,r),g-=u}return(d?-1:1)*y*o(2,g-r)},s.write=function(t,l,p,u,_,f){var h=Math.LN2,g=8*f-_-1,y=(1<>1,x=23===_?o(2,-24)-o(2,-77):0,w=u?0:f-1,E=u?1:-1,d=0>l||0===l&&0>1/l?1:0,s,C,A;for(l=n(l),isNaN(l)||l===1/0?(C=isNaN(l)?1:0,s=y):(s=r(a(l)/h),1>l*(A=o(2,-s))&&(s--,A*=2),l+=1<=s+b?x/A:x*o(2,1-b),2<=l*A&&(s++,A/=2),s+b>=y?(C=0,s=y):1<=s+b?(C=(l*A-1)*o(2,_),s+=b):(C=l*o(2,b-1)*o(2,_),s=0));8<=_;t[p+w]=255&C,w+=E,C/=256,_-=8);for(s=s<<_|C,g+=_;0>2,d=(3&n)<<4|r>>4,l=(15&r)<<2|s>>6,p=63&s,isNaN(r)?l=p=64:isNaN(s)&&(p=64),t=t+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(o)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(d)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(l)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p);return t},a.decode=function(e){var t="",a=0,n,r,s,o,l,p,c;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");a>4,r=(15&l)<<4|p>>2,s=(3&p)<<6|c,t+=d(n),64!=p&&(t+=d(r)),64!=c&&(t+=d(s));return t}},{}],13:[function(e,t){'use strict';function a(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}a.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},t.exports=a},{}],14:[function(e,t,a){'use strict';a.STORE={magic:"\0\0",compress:function(e){return e},uncompress:function(e){return e},compressInputType:null,uncompressInputType:null},a.DEFLATE=e("./flate")},{"./flate":19}],15:[function(e,t){'use strict';var a=e("./utils"),n=[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];t.exports=function(e,t){if("undefined"==typeof e||!e.length)return 0;var r="string"!==a.getTypeOf(e);"undefined"==typeof t&&(t=0);var s=0,o=0,d=0;t^=-1;for(var l=0,p=e.length;l>>8^s;return-1^t}},{"./utils":32}],16:[function(e,t){'use strict';function a(){this.data=null,this.length=0,this.index=0,this.zero=0}var n=e("./utils");a.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.lengthe)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t=0,a;for(this.checkOffset(e),a=this.index+e-1;a>=this.index;a--)t=(t<<8)+this.byteAt(a);return this.index+=e,t},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date((127&e>>25)+1980,(15&e>>21)-1,31&e>>16,31&e>>11,63&e>>5,(31&e)<<1)}},t.exports=a},{"./utils":32}],17:[function(e,t,a){'use strict';a.base64=!1,a.binary=!1,a.dir=!1,a.createFolders=!1,a.date=null,a.compression=null,a.compressionOptions=null,a.comment=null,a.unixPermissions=null,a.dosPermissions=null},{}],18:[function(e,t,a){'use strict';var n=e("./utils");a.string2binary=function(e){return n.string2binary(e)},a.string2Uint8Array=function(e){return n.transformTo("uint8array",e)},a.uint8Array2String=function(e){return n.transformTo("string",e)},a.string2Blob=function(e){var t=n.transformTo("arraybuffer",e);return n.arrayBuffer2Blob(t)},a.arrayBuffer2Blob=function(e){return n.arrayBuffer2Blob(e)},a.transformTo=function(e,t){return n.transformTo(e,t)},a.getTypeOf=function(e){return n.getTypeOf(e)},a.checkSupport=function(e){return n.checkSupport(e)},a.MAX_VALUE_16BITS=n.MAX_VALUE_16BITS,a.MAX_VALUE_32BITS=n.MAX_VALUE_32BITS,a.pretty=function(e){return n.pretty(e)},a.findCompression=function(e){return n.findCompression(e)},a.isRegExp=function(e){return n.isRegExp(e)}},{"./utils":32}],19:[function(e,t,a){'use strict';var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,r=e("pako");a.uncompressInputType=n?"uint8array":"array",a.compressInputType=n?"uint8array":"array",a.magic="\b\0",a.compress=function(e,t){return r.deflateRaw(e,{level:t.level||-1})},a.uncompress=function(e){return r.inflateRaw(e)}},{pako:37}],20:[function(e,t){'use strict';function a(e,t){return this instanceof a?void(this.files={},this.comment=null,this.root="",e&&this.load(e,t),this.clone=function(){var e=new a;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}):new a(e,t)}var n=e("./base64");a.prototype=e("./object"),a.prototype.load=e("./load"),a.support=e("./support"),a.defaults=e("./defaults"),a.utils=e("./deprecatedPublicUtils"),a.base64={encode:function(e){return n.encode(e)},decode:function(e){return n.decode(e)}},a.compressions=e("./compressions"),t.exports=a},{"./base64":12,"./compressions":14,"./defaults":17,"./deprecatedPublicUtils":18,"./load":21,"./object":24,"./support":28}],21:[function(e,t){'use strict';var a=e("./base64"),n=e("./utf8"),r=e("./utils"),s=e("./zipEntries");t.exports=function(e,t){var o,d,l,p;for(t=r.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n.utf8decode}),t.base64&&(e=a.decode(e)),d=new s(e,t),o=d.files,l=0;l>>=8;return a},x=function(e){return e=e||{},!0===e.base64&&(null===e.binary||void 0===e.binary)&&(e.binary=!0),e=n.extend(e,i),e.date=e.date||new Date,null!==e.compression&&(e.compression=e.compression.toUpperCase()),e},w=function(e,t,a){var r=n.getTypeOf(t),s;if(a=x(a),"string"==typeof a.unixPermissions&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&16384&a.unixPermissions&&(a.dir=!0),a.dosPermissions&&16&a.dosPermissions&&(a.dir=!0),a.dir&&(e=C(e)),a.createFolders&&(s=E(e))&&A.call(this,s,!0),a.dir||null===t||"undefined"==typeof t)a.base64=!1,a.binary=!1,t=null,r=null;else if("string"===r)a.binary&&!a.base64&&!0!==a.optimizedBinaryString&&(t=n.string2binary(t));else{if(a.base64=!1,a.binary=!0,!r&&!(t instanceof p))throw new Error("The data of '"+e+"' is in an unsupported format !");"arraybuffer"==r&&(t=n.transformTo("uint8array",t))}var i=new y(e,t,a);return this.files[e]=i,i},E=function(e){"/"==e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0d;d++)o[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;o[254]=o[254]=1;var p=function(e){var t=e.length,a=0,n,s,o,d,l;for(d=0;ds?1:2048>s?2:65536>s?3:4;for(n=r.uint8array?new Uint8Array(a):Array(a),l=0,d=0;ls?n[l++]=s:2048>s?(n[l++]=192|s>>>6,n[l++]=128|63&s):65536>s?(n[l++]=224|s>>>12,n[l++]=128|63&s>>>6,n[l++]=128|63&s):(n[l++]=240|s>>>18,n[l++]=128|63&s>>>12,n[l++]=128|63&s>>>6,n[l++]=128|63&s);return n},c=function(e,t){var a;for(t=t||e.length,t>e.length&&(t=e.length),a=t-1;0<=a&&128==(192&e[a]);)a--;return 0>a?t:0===a?t:a+o[e[a]]>t?a:t},u=function(e){var t=e.length,a=Array(2*t),r,s,d,l;for(s=0,r=0;rd){a[s++]=d;continue}if(l=o[d],4d?a[s++]=d:(d-=65536,a[s++]=55296|1023&d>>10,a[s++]=56320|1023&d)}return a.length!==s&&(a.subarray?a=a.subarray(0,s):a.length=s),n.applyFromCharCode(a)};a.utf8encode=function(e){return r.nodebuffer?s(e,"utf-8"):p(e)},a.utf8decode=function(e){if(r.nodebuffer)return n.transformTo("nodebuffer",e).toString("utf-8");e=n.transformTo(r.uint8array?"uint8array":"array",e);for(var t=[],a=0,s=e.length;aa?"0":"")+a.toString(16).toUpperCase();return t},a.findCompression=function(e){for(var t in c)if(c.hasOwnProperty(t)&&c[t].magic===e)return c[t];return null},a.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},a.extend=function(){var e={},t,a;for(t=0;te){var t=!this.isSignature(0,l.LOCAL_FILE_HEADER);if(t)throw new Error("Can't find end of central directory : is this a zip file ? If it is, see http://stuk.github.io/jszip/documentation/howto/read_zip.html");else throw new Error("Corrupted zip : can't find end of central directory")}this.reader.setIndex(e);var a=e;if(this.checkSignature(l.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===d.MAX_VALUE_16BITS||this.diskWithCentralDirStart===d.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===d.MAX_VALUE_16BITS||this.centralDirRecords===d.MAX_VALUE_16BITS||this.centralDirSize===d.MAX_VALUE_32BITS||this.centralDirOffset===d.MAX_VALUE_32BITS){if(this.zip64=!0,e=this.reader.lastIndexOfSignature(l.ZIP64_CENTRAL_DIRECTORY_LOCATOR),0>e)throw new Error("Corrupted zip : can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(l.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,l.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(l.ZIP64_CENTRAL_DIRECTORY_END),0>this.relativeOffsetEndOfZip64CentralDir))throw new Error("Corrupted zip : can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(l.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var s=a-r;if(0s)throw new Error("Corrupted zip: missing "+n(s)+" bytes.")},prepareReader:function(e){var t=d.getTypeOf(e);if(d.checkSupport(t),"string"===t&&!c.uint8array)this.reader=new r(e,this.loadOptions.optimizedBinaryString);else if("nodebuffer"===t)this.reader=new s(e);else if(c.uint8array)this.reader=new i(d.transformTo("uint8array",e));else if(c.array)this.reader=new o(d.transformTo("array",e));else throw new Error("Unexpected error: unsupported type '"+t+"'")},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=a},{"./arrayReader":11,"./nodeBufferReader":23,"./object":24,"./signature":25,"./stringReader":26,"./support":28,"./uint8ArrayReader":29,"./utils":32,"./zipEntry":34}],34:[function(e,t){'use strict';function a(e,t){this.options=e,this.loadOptions=t}var n=e("./stringReader"),r=e("./utils"),s=e("./compressedObject"),i=e("./object"),o=e("./support");a.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},prepareCompressedContent:function(e,t,a){return function(){var n=e.index;e.setIndex(t);var r=e.readData(a);return e.setIndex(n),r}},prepareContent:function(e,t,a,n,s){return function(){var e=r.transformTo(n.uncompressInputType,this.getCompressedContent()),t=n.uncompress(e);if(t.length!==s)throw new Error("Bug : uncompressed data size mismatch");return t}},readLocalPart:function(e){var t,a;if(e.skip(22),this.fileNameLength=e.readInt(2),a=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(a),-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(t=r.findCompression(this.compressionMethod),null===t)throw new Error("Corrupted zip : compression "+r.pretty(this.compressionMethod)+" unknown (inner file : "+r.transformTo("string",this.fileName)+")");if(this.decompressed=new s,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(e,e.index,this.compressedSize,t),this.decompressed.getContent=this.prepareContent(e,e.index,this.compressedSize,t,this.uncompressedSize),this.loadOptions.checkCRC32&&(this.decompressed=r.transformTo("string",this.decompressed.getContent()),i.crc32(this.decompressed)!==this.crc32))throw new Error("Corrupted zip : CRC32 mismatch")},readCentralPart:function(e){if(this.versionMadeBy=e.readInt(2),this.versionNeeded=e.readInt(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4),this.fileNameLength=e.readInt(2),this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");this.fileName=e.readData(this.fileNameLength),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),e===0&&(this.dosPermissions=63&this.externalFileAttributes),e===3&&(this.unixPermissions=65535&this.externalFileAttributes>>16),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=new n(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t=e.index,a,n,r;for(this.extraFields=this.extraFields||{};e.index=this._max)&&(this._max=1/0),this._lengthCalculator=e.length||a,"function"!=typeof this._lengthCalculator&&(this._lengthCalculator=a),this._allowStale=e.stale||!1,this._maxAge=e.maxAge||null,this._dispose=e.dispose,this.reset()):new r(e)}function s(e,t,a){n(t);var r=e._cache[t];return r&&(o(e,r)?(c(e,r),!e._allowStale&&(r=void 0)):a&&d(e,r),r&&(r=r.value)),r}function o(e,t){if(!t||!t.maxAge&&!e._maxAge)return!1;var a=!1,n=Date.now()-t.now;return a=t.maxAge?n>t.maxAge:e._maxAge&&n>e._maxAge,a}function d(e,t){p(e,t),t.lu=e._mru++,e._lruList[t.lu]=t}function l(e){for(;e._lrue._max;)c(e,e._lruList[e._lru])}function p(e,t){for(delete e._lruList[t.lu];e._lru=e)||(e=1/0),this._max=e,this._length>this._max&&l(this)},get:function(){return this._max},enumerable:!0}),Object.defineProperty(r.prototype,"lengthCalculator",{set:function(e){if("function"!=typeof e)for(var t in this._lengthCalculator=a,this._length=this._itemCount,this._cache)this._cache[t].length=1;else for(var t in this._lengthCalculator=e,this._length=0,this._cache)this._cache[t].length=this._lengthCalculator(this._cache[t].value),this._length+=this._cache[t].length;this._length>this._max&&l(this)},get:function(){return this._lengthCalculator},enumerable:!0}),Object.defineProperty(r.prototype,"length",{get:function(){return this._length},enumerable:!0}),Object.defineProperty(r.prototype,"itemCount",{get:function(){return this._itemCount},enumerable:!0}),r.prototype.forEach=function(e,t){t=t||this;for(var a=0,n=this._itemCount,r=this._mru-1;0<=r&&athis._max?(c(this,this._cache[t]),!1):(this._dispose&&this._dispose(t,this._cache[t].value),this._cache[t].now=s,this._cache[t].maxAge=r,this._cache[t].value=a,this._length+=i-this._cache[t].length,this._cache[t].length=i,this.get(t),this._length>this._max&&l(this),!0);var o=new u(t,a,this._mru++,i,s,r);return o.length>this._max?(this._dispose&&this._dispose(t,a),!1):(this._length+=o.length,this._lruList[o.lu]=this._cache[t]=o,this._itemCount++,this._length>this._max&&l(this),!0)},r.prototype.has=function(t){if(n(t),!e(this._cache,t))return!1;var a=this._cache[t];return!o(this,a)},r.prototype.get=function(e){return n(e),s(this,e,!0)},r.prototype.peek=function(e){return n(e),s(this,e,!1)},r.prototype.pop=function(){var e=this._lruList[this._lru];return c(this,e),e||null},r.prototype.del=function(e){n(e),c(this,this._cache[e])},r.prototype.load=function(e){this.reset();for(var t=Date.now(),a=e.length-1,r;0<=a;a--){r=e[a],n(r.k);var s=r.e||0;if(0===s)this.set(r.k,r.v);else{var i=s-t;0t.windowBits&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var a=s.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==a)throw new Error(d[a]);if(t.header&&s.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(r="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===p.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,a=s.deflateSetDictionary(this.strm,r),0!==a)throw new Error(d[a]);this._dict_set=!0}}function r(e,t){var a=new n(t);if(a.push(e,!0),a.err)throw a.msg||d[a.err];return a.result}var s=e("./zlib/deflate"),i=e("./utils/common"),o=e("./utils/strings"),d=e("./zlib/messages"),l=e("./zlib/zstream"),p=Object.prototype.toString,c=4,u=0,m=1,_=2;n.prototype.push=function(e,t){var a=this.strm,n=this.options.chunkSize,r,d;if(this.ended)return!1;d=t===~~t?t:!0===t?c:0,a.input="string"==typeof e?o.string2buf(e):"[object ArrayBuffer]"===p.call(e)?new Uint8Array(e):e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(n),a.next_out=0,a.avail_out=n),r=s.deflate(a,d),r!==m&&r!==u)return this.onEnd(r),this.ended=!0,!1;(0===a.avail_out||0===a.avail_in&&(d===c||d===_))&&("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(a.output,a.next_out))):this.onData(i.shrinkBuf(a.output,a.next_out)))}while((0t.windowBits&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),0<=t.windowBits&&16>t.windowBits&&!(e&&e.windowBits)&&(t.windowBits+=32),15t.windowBits&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new p,this.strm.avail_out=0;var a=s.inflateInit2(this.strm,t.windowBits);if(a!==d.Z_OK)throw new Error(l[a]);if(this.header=new c,s.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(a=s.inflateSetDictionary(this.strm,t.dictionary),a!==d.Z_OK)))throw new Error(l[a])}function r(e,t){var a=new n(t);if(a.push(e,!0),a.err)throw a.msg||l[a.err];return a.result}var s=e("./zlib/inflate"),i=e("./utils/common"),o=e("./utils/strings"),d=e("./zlib/constants"),l=e("./zlib/messages"),p=e("./zlib/zstream"),c=e("./zlib/gzheader"),u=Object.prototype.toString;n.prototype.push=function(e,t){var a=this.strm,n=this.options.chunkSize,r=this.options.dictionary,l=!1,p,c,m,_,f;if(this.ended)return!1;c=t===~~t?t:!0===t?d.Z_FINISH:d.Z_NO_FLUSH,a.input="string"==typeof e?o.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?new Uint8Array(e):e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(n),a.next_out=0,a.avail_out=n),p=s.inflate(a,d.Z_NO_FLUSH),p===d.Z_NEED_DICT&&r&&(p=s.inflateSetDictionary(this.strm,r)),p===d.Z_BUF_ERROR&&!0===l&&(p=d.Z_OK,l=!1),p!==d.Z_STREAM_END&&p!==d.Z_OK)return this.onEnd(p),this.ended=!0,!1;a.next_out&&(0===a.avail_out||p===d.Z_STREAM_END||0===a.avail_in&&(c===d.Z_FINISH||c===d.Z_SYNC_FLUSH))&&("string"===this.options.to?(m=o.utf8border(a.output,a.next_out),_=a.next_out-m,f=o.buf2string(a.output,m),a.next_out=_,a.avail_out=n-_,_&&i.arraySet(a.output,a.output,m,_,0),this.onData(f)):this.onData(i.shrinkBuf(a.output,a.next_out))),0===a.avail_in&&0===a.avail_out&&(l=!0)}while((0t&&(e.subarray&&o||!e.subarray&&s))return d.apply(null,r.shrinkBuf(e,t));for(var a="",n=0;np;p++)l[p]=252<=p?6:248<=p?5:240<=p?4:224<=p?3:192<=p?2:1;l[254]=l[254]=1,a.string2buf=function(e){var t=e.length,a=0,n,s,o,d,l;for(d=0;ds?1:2048>s?2:65536>s?3:4;for(n=new r.Buf8(a),l=0,d=0;ls?n[l++]=s:2048>s?(n[l++]=192|s>>>6,n[l++]=128|63&s):65536>s?(n[l++]=224|s>>>12,n[l++]=128|63&s>>>6,n[l++]=128|63&s):(n[l++]=240|s>>>18,n[l++]=128|63&s>>>12,n[l++]=128|63&s>>>6,n[l++]=128|63&s);return n},a.buf2binstring=function(e){return n(e,e.length)},a.binstring2buf=function(e){for(var t=new r.Buf8(e.length),a=0,n=t.length;ad){r[o++]=d;continue}if(p=l[d],4d?r[o++]=d:(d-=65536,r[o++]=55296|1023&d>>10,r[o++]=56320|1023&d)}return n(r,o)},a.utf8border=function(e,t){var a;for(t=t||e.length,t>e.length&&(t=e.length),a=t-1;0<=a&&128==(192&e[a]);)a--;return 0>a?t:0===a?t:a+l[e[a]]>t?a:t}},{"./common":40}],42:[function(e,t){'use strict';t.exports=function(e,t,a,r){for(var s=0|65535&e,i=0|65535&e>>>16,o=0;0!==a;){o=2e3t;t++){a=t;for(var r=0;8>r;r++)a=1&a?3988292384^a>>>1:a>>>1;e[t]=a}return e}();t.exports=function(e,t,n,r){e^=-1;for(var s=r;s>>8^a[255&(e^t[s])];return-1^e}},{}],45:[function(e,t,a){'use strict';function n(e,t){return e.msg=R[t],t}function r(e){return(e<<1)-(4e.avail_out&&(a=e.avail_out);0===a||(S.arraySet(e.output,t.pending_buf,t.pending_out,a,e.next_out),e.next_out+=a,t.pending_out+=a,e.total_out+=a,e.avail_out-=a,t.pending-=a,0===t.pending&&(t.pending_out=0))}function d(e,t){k._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,o(e.strm)}function l(e,t){e.pending_buf[e.pending++]=t}function p(e,t){e.pending_buf[e.pending++]=255&t>>>8,e.pending_buf[e.pending++]=255&t}function c(e,t,a,n){var r=e.avail_in;return(r>n&&(r=n),0===r)?0:(e.avail_in-=r,S.arraySet(t,e.input,e.next_in,r,a),1===e.state.wrap?e.adler=v(e.adler,t,r,a):2===e.state.wrap&&(e.adler=I(e.adler,t,r,a)),e.next_in+=r,e.total_in+=r,r)}function u(e,t){var a=e.max_chain_length,n=e.strstart,r=e.prev_length,s=e.nice_match,i=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,o=e.window,d=e.w_mask,l=e.prev,p=e.strstart+258,c=o[n+r-1],u=o[n+r],m,_;e.prev_length>=e.good_match&&(a>>=2),s>e.lookahead&&(s=e.lookahead);do{if(m=t,o[m+r]!==u||o[m+r-1]!==c||o[m]!==o[n]||o[++m]!==o[n+1])continue;n+=2,m++;do;while(o[++n]===o[++m]&&o[++n]===o[++m]&&o[++n]===o[++m]&&o[++n]===o[++m]&&o[++n]===o[++m]&&o[++n]===o[++m]&&o[++n]===o[++m]&&o[++n]===o[++m]&&nr){if(e.match_start=t,r=_,_>=s)break;c=o[n+r-1],u=o[n+r]}}while((t=l[t&d])>i&&0!=--a);return r<=e.lookahead?r:e.lookahead}function m(e){var t=e.w_size,a,r,s,i,o;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-262)){S.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,a=r;do s=e.head[--a],e.head[a]=s>=t?s-t:0;while(--r);r=t,a=r;do s=e.prev[--a],e.prev[a]=s>=t?s-t:0;while(--r);i+=t}if(0===e.strm.avail_in)break;if(r=c(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=r,3<=e.lookahead+e.insert)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<e.lookahead+e.insert)););}while(262>e.lookahead&&0!==e.strm.avail_in)}function _(e,t){for(var a,n;;){if(262>e.lookahead){if(m(e),262>e.lookahead&&0===t)return 1;if(0===e.lookahead)break}if(a=0,3<=e.lookahead&&(e.ins_h=(e.ins_h<e.strstart?e.strstart:2,4===t?(d(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?1:2}function f(e,t){for(var a,n,r;;){if(262>e.lookahead){if(m(e),262>e.lookahead&&0===t)return 1;if(0===e.lookahead)break}if(a=0,3<=e.lookahead&&(e.ins_h=(e.ins_h<=e.match_length&&(1===e.strategy||3===e.match_length&&4096e.strstart?e.strstart:2,4===t?(d(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?1:2}function h(e,t){for(var a=e.window,n,r,s,i;;){if(258>=e.lookahead){if(m(e),258>=e.lookahead&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,3<=e.lookahead&&0e.lookahead&&(e.match_length=e.lookahead)}if(3<=e.match_length?(n=k._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=k._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(d(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(d(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?1:2}function g(e,t){for(var a;;){if(0===e.lookahead&&(m(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,a=k._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,a&&(d(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(d(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?1:2}function y(e,t,a,n,r){this.good_length=e,this.max_lazy=t,this.nice_length=a,this.max_chain=n,this.func=r}function b(e){e.window_size=2*e.w_size,i(e.head),e.max_lazy_match=O[e.level].max_lazy,e.good_match=O[e.level].good_length,e.nice_match=O[e.level].nice_length,e.max_chain_length=O[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0}function x(){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=8,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 S.Buf16(1146),this.dyn_dtree=new S.Buf16(122),this.bl_tree=new S.Buf16(78),i(this.dyn_ltree),i(this.dyn_dtree),i(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new S.Buf16(16),this.heap=new S.Buf16(573),i(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new S.Buf16(573),i(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 w(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,t=e.state,t.pending=0,t.pending_out=0,0>t.wrap&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=0,k._tr_init(t),0):n(e,-2)}function E(e){var t=w(e);return 0===t&&b(e.state),t}function C(e,t,a,r,i,o){if(!e)return-2;var d=1;if(-1===t&&(t=6),0>r?(d=0,r=-r):15i||9r||15t||9o||4t)return e?n(e,-2):-2;if(d=e.state,!e.output||!e.input&&0!==e.avail_in||666===d.status&&4!==t)return n(e,0===e.avail_out?-5:-2);if(d.strm=e,a=d.last_flush,d.last_flush=t,42===d.status)if(2===d.wrap)e.adler=0,l(d,31),l(d,139),l(d,8),d.gzhead?(l(d,(d.gzhead.text?1:0)+(d.gzhead.hcrc?2:0)+(d.gzhead.extra?4:0)+(d.gzhead.name?8:0)+(d.gzhead.comment?16:0)),l(d,255&d.gzhead.time),l(d,255&d.gzhead.time>>8),l(d,255&d.gzhead.time>>16),l(d,255&d.gzhead.time>>24),l(d,9===d.level?2:2<=d.strategy||2>d.level?4:0),l(d,255&d.gzhead.os),d.gzhead.extra&&d.gzhead.extra.length&&(l(d,255&d.gzhead.extra.length),l(d,255&d.gzhead.extra.length>>8)),d.gzhead.hcrc&&(e.adler=I(e.adler,d.pending_buf,d.pending,0)),d.gzindex=0,d.status=69):(l(d,0),l(d,0),l(d,0),l(d,0),l(d,0),l(d,9===d.level?2:2<=d.strategy||2>d.level?4:0),l(d,3),d.status=113);else{var m=8+(d.w_bits-8<<4)<<8,_=-1;_=2<=d.strategy||2>d.level?0:6>d.level?1:6===d.level?2:3,m|=_<<6,0!==d.strstart&&(m|=32),m+=31-m%31,d.status=113,p(d,m),0!==d.strstart&&(p(d,e.adler>>>16),p(d,65535&e.adler)),e.adler=1}if(69===d.status)if(d.gzhead.extra){for(c=d.pending;d.gzindex<(65535&d.gzhead.extra.length)&&!(d.pending===d.pending_buf_size&&(d.gzhead.hcrc&&d.pending>c&&(e.adler=I(e.adler,d.pending_buf,d.pending-c,c)),o(e),c=d.pending,d.pending===d.pending_buf_size));)l(d,255&d.gzhead.extra[d.gzindex]),d.gzindex++;d.gzhead.hcrc&&d.pending>c&&(e.adler=I(e.adler,d.pending_buf,d.pending-c,c)),d.gzindex===d.gzhead.extra.length&&(d.gzindex=0,d.status=73)}else d.status=73;if(73===d.status)if(d.gzhead.name){c=d.pending;do{if(d.pending===d.pending_buf_size&&(d.gzhead.hcrc&&d.pending>c&&(e.adler=I(e.adler,d.pending_buf,d.pending-c,c)),o(e),c=d.pending,d.pending===d.pending_buf_size)){u=1;break}u=d.gzindexc&&(e.adler=I(e.adler,d.pending_buf,d.pending-c,c)),0===u&&(d.gzindex=0,d.status=91)}else d.status=91;if(91===d.status)if(d.gzhead.comment){c=d.pending;do{if(d.pending===d.pending_buf_size&&(d.gzhead.hcrc&&d.pending>c&&(e.adler=I(e.adler,d.pending_buf,d.pending-c,c)),o(e),c=d.pending,d.pending===d.pending_buf_size)){u=1;break}u=d.gzindexc&&(e.adler=I(e.adler,d.pending_buf,d.pending-c,c)),0===u&&(d.status=103)}else d.status=103;if(103===d.status&&(d.gzhead.hcrc?(d.pending+2>d.pending_buf_size&&o(e),d.pending+2<=d.pending_buf_size&&(l(d,255&e.adler),l(d,255&e.adler>>8),e.adler=0,d.status=113)):d.status=113),0!==d.pending){if(o(e),0===e.avail_out)return d.last_flush=-1,0;}else if(0===e.avail_in&&r(t)<=r(a)&&4!==t)return n(e,-5);if(666===d.status&&0!==e.avail_in)return n(e,-5);if(0!==e.avail_in||0!==d.lookahead||0!==t&&666!==d.status){var f=2===d.strategy?g(d,t):3===d.strategy?h(d,t):O[d.level].func(d,t);if((3===f||4===f)&&(d.status=666),1===f||3===f)return 0===e.avail_out&&(d.last_flush=-1),0;if(2===f&&(1===t?k._tr_align(d):5!==t&&(k._tr_stored_block(d,0,0,!1),3===t&&(i(d.head),0===d.lookahead&&(d.strstart=0,d.block_start=0,d.insert=0))),o(e),0===e.avail_out))return d.last_flush=-1,0}return 4===t?0>=d.wrap?1:(2===d.wrap?(l(d,255&e.adler),l(d,255&e.adler>>8),l(d,255&e.adler>>16),l(d,255&e.adler>>24),l(d,255&e.total_in),l(d,255&e.total_in>>8),l(d,255&e.total_in>>16),l(d,255&e.total_in>>24)):(p(d,e.adler>>>16),p(d,65535&e.adler)),o(e),0e.pending_buf_size-5&&(a=e.pending_buf_size-5);;){if(1>=e.lookahead){if(m(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+a;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,d(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(d(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(d(e,!0),0===e.strm.avail_out?3:4):e.strstart>e.block_start&&(d(e,!1),0===e.strm.avail_out)?1:1}),new y(4,4,8,4,_),new y(4,5,16,8,_),new y(4,6,32,32,_),new y(4,4,16,16,f),new y(8,16,32,32,f),new y(8,16,128,128,f),new y(8,32,128,256,f),new y(32,128,258,1024,f),new y(32,258,258,4096,f)],a.deflateInit=function(e,t){return C(e,t,8,15,8,0)},a.deflateInit2=C,a.deflateReset=E,a.deflateResetKeep=w,a.deflateSetHeader=function(e,t){return e&&e.state?2===e.state.wrap?(e.state.gzhead=t,0):-2:-2},a.deflate=A,a.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status,42!==t&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t)?n(e,-2):(e.state=null,113===t?n(e,-3):0):-2},a.deflateSetDictionary=function(e,t){var a=t.length,r,o,d,l,p,c,u,_;if(!e||!e.state)return-2;if(r=e.state,l=r.wrap,2===l||1===l&&42!==r.status||r.lookahead)return-2;for(1===l&&(e.adler=v(e.adler,t,a,0)),r.wrap=0,a>=r.w_size&&(0===l&&(i(r.head),r.strstart=0,r.block_start=0,r.insert=0),_=new S.Buf8(r.w_size),S.arraySet(_,t,a-r.w_size,r.w_size,0),t=_,a=r.w_size),p=e.avail_in,c=e.next_in,u=e.input,e.avail_in=a,e.next_in=0,e.input=t,m(r);3<=r.lookahead;){o=r.strstart,d=r.lookahead-2;do r.ins_h=(r.ins_h<_&&(m+=S[n++]<<_,_+=8,m+=S[n++]<<_,_+=8),b=f[m&g];dolen:for(;;){if(x=b>>>24,m>>>=x,_-=x,x=255&b>>>16,0===x)k[s++]=65535&b;else if(16&x){w=65535&b,x&=15,x&&(_>>=x,_-=x),15>_&&(m+=S[n++]<<_,_+=8,m+=S[n++]<<_,_+=8),b=h[m&y];dodist:for(;;){if(x=b>>>24,m>>>=x,_-=x,x=255&b>>>16,16&x){if(E=65535&b,x&=15,_d){e.msg="invalid distance too far back",a.mode=30;break top}if(m>>>=x,_-=x,x=s-i,E>x){if(x=E-x,x>p&&a.sane){e.msg="invalid distance too far back",a.mode=30;break top}if(C=0,A=u,0===c){if(C+=l-x,x>3,n-=w,_-=w<<3,m&=(1<<_)-1,e.next_in=n,e.next_out=s,e.avail_in=n>>24)+(65280&e>>>8)+((65280&e)<<8)+((255&e)<<24)}function s(){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 m.Buf16(320),this.work=new m.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function i(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new m.Buf32(852),t.distcode=t.distdyn=new m.Buf32(592),t.sane=1,t.back=-1,0):-2}function o(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,i(e)):-2}function l(e,t){var a,n;return e&&e.state?(n=e.state,0>t?(a=0,t=-t):(a=(t>>4)+1,48>t&&(t&=15)),t&&(8>t||15t;)e.lens[t++]=8;for(;256>t;)e.lens[t++]=9;for(;280>t;)e.lens[t++]=7;for(;288>t;)e.lens[t++]=8;for(g(1,e.lens,0,288,b,0,e.work,{bits:9}),t=0;32>t;)e.lens[t++]=5;g(2,e.lens,0,32,x,0,e.work,{bits:5}),y=!1}e.lencode=b,e.lenbits=9,e.distcode=x,e.distbits=5}function u(e,t,a,n){var r=e.state,s;return null===r.window&&(r.wsize=1<=r.wsize?(m.arraySet(r.window,t,a-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(s=r.wsize-r.wnext,s>n&&(s=n),m.arraySet(r.window,t,a-n,s,r.wnext),n-=s,n?(m.arraySet(r.window,t,a-n,n,0),r.wnext=n,r.whave=r.wsize):(r.wnext+=s,r.wnext===r.wsize&&(r.wnext=0),r.whaveC;){if(0===x)break inf_leave;x--,E+=l[y++]<>>8,o.check=f(o.check,s,2,0),E=0,C=0,o.mode=2;break}if(o.flags=0,o.head&&(o.head.done=!1),!(1&o.wrap)||(((255&E)<<8)+(E>>8))%31){e.msg="incorrect header check",o.mode=30;break}if(8!==(15&E)){e.msg="unknown compression method",o.mode=30;break}if(E>>>=4,C-=4,P=(15&E)+8,0===o.wbits)o.wbits=P;else if(P>o.wbits){e.msg="invalid window size",o.mode=30;break}o.dmax=1<C;){if(0===x)break inf_leave;x--,E+=l[y++]<>8),512&o.flags&&(s[0]=255&E,s[1]=255&E>>>8,o.check=f(o.check,s,2,0)),E=0,C=0,o.mode=3;case 3:for(;32>C;){if(0===x)break inf_leave;x--,E+=l[y++]<>>8,s[2]=255&E>>>16,s[3]=255&E>>>24,o.check=f(o.check,s,4,0)),E=0,C=0,o.mode=4;case 4:for(;16>C;){if(0===x)break inf_leave;x--,E+=l[y++]<>8),512&o.flags&&(s[0]=255&E,s[1]=255&E>>>8,o.check=f(o.check,s,2,0)),E=0,C=0,o.mode=5;case 5:if(1024&o.flags){for(;16>C;){if(0===x)break inf_leave;x--,E+=l[y++]<>>8,o.check=f(o.check,s,2,0)),E=0,C=0}else o.head&&(o.head.extra=null);o.mode=6;case 6:if(1024&o.flags&&(k=o.length,k>x&&(k=x),k&&(o.head&&(P=o.head.extra_len-o.length,!o.head.extra&&(o.head.extra=Array(o.head.extra_len)),m.arraySet(o.head.extra,l,y,k,P)),512&o.flags&&(o.check=f(o.check,l,k,y)),x-=k,y+=k,o.length-=k),o.length))break inf_leave;o.length=0,o.mode=7;case 7:if(2048&o.flags){if(0===x)break inf_leave;k=0;do P=l[y+k++],o.head&&P&&65536>o.length&&(o.head.name+=d(P));while(P&&ko.length&&(o.head.comment+=d(P));while(P&&kC;){if(0===x)break inf_leave;x--,E+=l[y++]<>9,o.head.done=!0),e.adler=o.check=0,o.mode=12;break;case 10:for(;32>C;){if(0===x)break inf_leave;x--,E+=l[y++]<>>=7&C,C-=7&C,o.mode=27;break}for(;3>C;){if(0===x)break inf_leave;x--,E+=l[y++]<>>=1,C-=1,3&E){case 0:o.mode=14;break;case 1:if(c(o),o.mode=20,6===t){E>>>=2,C-=2;break inf_leave}break;case 2:o.mode=17;break;case 3:e.msg="invalid block type",o.mode=30;}E>>>=2,C-=2;break;case 14:for(E>>>=7&C,C-=7&C;32>C;){if(0===x)break inf_leave;x--,E+=l[y++]<>>16)){e.msg="invalid stored block lengths",o.mode=30;break}if(o.length=65535&E,E=0,C=0,o.mode=15,6===t)break inf_leave;case 15:o.mode=16;case 16:if(k=o.length,k){if(k>x&&(k=x),k>w&&(k=w),0===k)break inf_leave;m.arraySet(p,l,y,k,b),x-=k,y+=k,w-=k,b+=k,o.length-=k;break}o.mode=12;break;case 17:for(;14>C;){if(0===x)break inf_leave;x--,E+=l[y++]<>>=5,C-=5,o.ndist=(31&E)+1,E>>>=5,C-=5,o.ncode=(15&E)+4,E>>>=4,C-=4,286C;){if(0===x)break inf_leave;x--,E+=l[y++]<>>=3,C-=3}for(;19>o.have;)o.lens[i[o.have++]]=0;if(o.lencode=o.lendyn,o.lenbits=7,D={bits:o.lenbits},N=g(0,o.lens,0,19,o.lencode,0,o.work,D),o.lenbits=D.bits,N){e.msg="invalid code lengths set",o.mode=30;break}o.have=0,o.mode=19;case 19:for(;o.have>>24,O=255&a>>>16,z=65535&a,R<=C)break;if(0===x)break inf_leave;x--,E+=l[y++]<z)E>>>=R,C-=R,o.lens[o.have++]=z;else{if(16===z){for(j=R+2;C>>=R,C-=R,0===o.have){e.msg="invalid bit length repeat",o.mode=30;break}P=o.lens[o.have-1],k=3+(3&E),E>>>=2,C-=2}else if(17===z){for(j=R+3;C>>=R,C-=R,P=0,k=3+(7&E),E>>>=3,C-=3}else{for(j=R+7;C>>=R,C-=R,P=0,k=11+(127&E),E>>>=7,C-=7}if(o.have+k>o.nlen+o.ndist){e.msg="invalid bit length repeat",o.mode=30;break}for(;k--;)o.lens[o.have++]=P}}if(30===o.mode)break;if(0===o.lens[256]){e.msg="invalid code -- missing end-of-block",o.mode=30;break}if(o.lenbits=9,D={bits:o.lenbits},N=g(1,o.lens,0,o.nlen,o.lencode,0,o.work,D),o.lenbits=D.bits,N){e.msg="invalid literal/lengths set",o.mode=30;break}if(o.distbits=6,o.distcode=o.distdyn,D={bits:o.distbits},N=g(2,o.lens,o.nlen,o.ndist,o.distcode,0,o.work,D),o.distbits=D.bits,N){e.msg="invalid distances set",o.mode=30;break}if(o.mode=20,6===t)break inf_leave;case 20:o.mode=21;case 21:if(6<=x&&258<=w){e.next_out=b,e.avail_out=w,e.next_in=y,e.avail_in=x,o.hold=E,o.bits=C,h(e,S),b=e.next_out,p=e.output,w=e.avail_out,y=e.next_in,l=e.input,x=e.avail_in,E=o.hold,C=o.bits,12===o.mode&&(o.back=-1);break}for(o.back=0;;){if(a=o.lencode[E&(1<>>24,O=255&a>>>16,z=65535&a,R<=C)break;if(0===x)break inf_leave;x--,E+=l[y++]<>L)],R=a>>>24,O=255&a>>>16,z=65535&a,L+R<=C)break;if(0===x)break inf_leave;x--,E+=l[y++]<>>=L,C-=L,o.back+=L}if(E>>>=R,C-=R,o.back+=R,o.length=z,0===O){o.mode=26;break}if(32&O){o.back=-1,o.mode=12;break}if(64&O){e.msg="invalid literal/length code",o.mode=30;break}o.extra=15&O,o.mode=22;case 22:if(o.extra){for(j=o.extra;C>>=o.extra,C-=o.extra,o.back+=o.extra}o.was=o.length,o.mode=23;case 23:for(;;){if(a=o.distcode[E&(1<>>24,O=255&a>>>16,z=65535&a,R<=C)break;if(0===x)break inf_leave;x--,E+=l[y++]<>L)],R=a>>>24,O=255&a>>>16,z=65535&a,L+R<=C)break;if(0===x)break inf_leave;x--,E+=l[y++]<>>=L,C-=L,o.back+=L}if(E>>>=R,C-=R,o.back+=R,64&O){e.msg="invalid distance code",o.mode=30;break}o.offset=z,o.extra=15&O,o.mode=24;case 24:if(o.extra){for(j=o.extra;C>>=o.extra,C-=o.extra,o.back+=o.extra}if(o.offset>o.dmax){e.msg="invalid distance too far back",o.mode=30;break}o.mode=25;case 25:if(0===w)break inf_leave;if(k=S-w,o.offset>k){if(k=o.offset-k,k>o.whave&&o.sane){e.msg="invalid distance too far back",o.mode=30;break}k>o.wnext?(k-=o.wnext,v=o.wsize-k):v=o.wnext-k,k>o.length&&(k=o.length),I=o.window}else I=p,v=b-o.offset,k=o.length;k>w&&(k=w),w-=k,o.length-=k;do p[b++]=I[v++];while(--k);0===o.length&&(o.mode=21);break;case 26:if(0===w)break inf_leave;p[b++]=o.length,w--,o.mode=21;break;case 27:if(o.wrap){for(;32>C;){if(0===x)break inf_leave;x--,E|=l[y++]<C;){if(0===x)break inf_leave;x--,E+=l[y++]<o.mode&&(27>o.mode||4!==t))&&u(e,e.output,e.next_out,S-e.avail_out))?(o.mode=31,-4):(A-=e.avail_in,S-=e.avail_out,e.total_in+=A,e.total_out+=S,o.total+=S,o.wrap&&S&&(e.adler=o.check=o.flags?f(o.check,p,S,e.next_out-S):_(o.check,p,S,e.next_out-S)),e.data_type=o.bits+(o.last?64:0)+(12===o.mode?128:0)+(20===o.mode||15===o.mode?256:0),(0===A&&0===S||4===t)&&0===N&&(N=-5),N)},a.inflateEnd=function(e){if(!e||!e.state)return-2;var t=e.state;return t.window&&(t.window=null),e.state=null,0},a.inflateGetHeader=function(e,t){var a;return e&&e.state?(a=e.state,0==(2&a.wrap))?-2:(a.head=t,t.done=!1,0):-2},a.inflateSetDictionary=function(e,t){var a=t.length,n,r,s;return e&&e.state?(n=e.state,0!==n.wrap&&11!==n.mode)?-2:11===n.mode&&(r=1,r=_(r,t,a,0),r!==n.check)?-3:(s=u(e,t,a,a),s)?(n.mode=31,-4):(n.havedict=1,0):-2},a.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":40,"./adler32":42,"./crc32":44,"./inffast":47,"./inftrees":49}],49:[function(e,t){'use strict';var a=e("../utils/common"),n=15,r=852,s=592,i=0,o=1,d=2,l=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],p=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,m,_,f,h,g,y){var b=y.bits,x=0,w=0,E=0,C=0,A=0,S=0,k=0,v=0,I=0,R=0,O=null,z=0,L=new a.Buf16(n+1),T=new a.Buf16(n+1),B=null,P=0,N,D,j,U,F,M,G,Z,Y;for(x=0;x<=n;x++)L[x]=0;for(w=0;w<_;w++)L[t[m+w]]++;for(A=b,C=n;1<=C&&0===L[C];C--);if(A>C&&(A=C),0===C)return f[h++]=20971520,f[h++]=20971520,y.bits=1,0;for(E=1;Ev)return-1;if(0r||e===d&&I>s)return 1;for(;;){G=x-k,g[w]M?(Z=B[P+g[w]],Y=O[z+g[w]]):(Z=96,Y=0),N=1<>k)+D]=0|(G<<24|Z<<16|Y);while(0!==D);for(N=1<>=1;if(0===N?R=0:(R&=N-1,R+=N),w++,0==--L[x]){if(x===C)break;x=t[m+g[w]]}if(x>A&&(R&U)!==j){for(0===k&&(k=A),F+=E,S=x-k,v=1<=v));)S++,v<<=1;if(I+=1<r||e===d&&I>s)return 1;j=R&U,f[j]=0|(A<<24|S<<16|F-h)}}return 0!==R&&(f[F+R]=0|(4194304|x-k<<24)),y.bits=A,0}},{"../utils/common":40}],50:[function(e,t){'use strict';t.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"}},{}],51:[function(e,t,a){'use strict';function n(e){for(var t=e.length;0<=--t;)e[t]=0}function r(e,t,a,n,r){this.static_tree=e,this.extra_bits=t,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=e&&e.length}function i(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function o(e){return 256>e?M[e]:M[256+(e>>>7)]}function d(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=255&t>>>8}function l(e,t,a){e.bi_valid>16-a?(e.bi_buf|=65535&t<>16-e.bi_valid,e.bi_valid+=a-16):(e.bi_buf|=65535&t<>>=1,a<<=1;while(0<--t);return a>>>1}function u(e){16===e.bi_valid?(d(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function _(e,t){var a=t.dyn_tree,r=t.max_code,s=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,l=t.stat_desc.max_length,p=0,c,u,_,g,y,b;for(g=0;g<=15;g++)e.bl_count[g]=0;for(a[2*e.heap[e.heap_max]+1]=0,c=e.heap_max+1;573>c;c++)(u=e.heap[c],g=a[2*a[2*u+1]+1]+1,g>l&&(g=l,p++),a[2*u+1]=g,!(u>r))&&(e.bl_count[g]++,y=0,u>=d&&(y=o[u-d]),b=a[2*u],e.opt_len+=b*(g+y),i&&(e.static_len+=b*(s[2*u+1]+y)));if(0!==p){do{for(g=l-1;0===e.bl_count[g];)g--;e.bl_count[g]--,e.bl_count[g+1]+=2,e.bl_count[l]--,p-=2}while(0r))&&(a[2*_+1]!==g&&(e.opt_len+=(g-a[2*_+1])*a[2*_],a[2*_+1]=g),u--)}}function f(e,t,a){var r=Array(16),s=0,i,o;for(i=1;i<=15;i++)r[i]=s=s+a[i-1]<<1;for(o=0;o<=t;o++){var d=e[2*o+1];0!==d&&(e[2*o]=c(r[d]++,d))}}function h(){var e=Array(16),t,a,s,i,o;for(s=0,i=0;i<28;i++)for(Z[i]=s,t=0;t<1<i;i++)for(Y[i]=o,t=0;t<1<>=7;i<30;i++)for(Y[i]=o<<7,t=0;t<1<=t;)U[2*t+1]=8,t++,e[8]++;for(;255>=t;)U[2*t+1]=9,t++,e[9]++;for(;279>=t;)U[2*t+1]=7,t++,e[7]++;for(;287>=t;)U[2*t+1]=8,t++,e[8]++;for(f(U,287,e),t=0;t<30;t++)F[2*t+1]=5,F[2*t]=c(t,5);H=new r(U,P,257,286,15),K=new r(F,N,0,30,15),X=new r([],D,0,19,7)}function g(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function y(e){8e.heap_len;)p=e.heap[++e.heap_len]=2>o?++o:0,a[2*p]=1,e.depth[p]=0,e.opt_len--,s&&(e.static_len-=r[2*p+1]);for(t.max_code=o,d=e.heap_len>>1;1<=d;d--)w(e,a,d);p=i;do d=e.heap[1],e.heap[1]=e.heap[e.heap_len--],w(e,a,1),l=e.heap[1],e.heap[--e.heap_max]=d,e.heap[--e.heap_max]=l,a[2*p]=a[2*d]+a[2*l],e.depth[p]=(e.depth[d]>=e.depth[l]?e.depth[d]:e.depth[l])+1,a[2*d+1]=a[2*l+1]=p,e.heap[1]=p++,w(e,a,1);while(2<=e.heap_len);e.heap[--e.heap_max]=e.heap[1],_(e,t),f(a,o,e.bl_count)}function A(e,t,a){var r=-1,s=t[1],i=0,o=7,d=4,l,p;for(0===s&&(o=138,d=3),t[2*(a+1)+1]=65535,l=0;l<=a;l++){if(p=s,s=t[2*(l+1)+1],++i=i?e.bl_tree[34]++:e.bl_tree[36]++:(p!==r&&e.bl_tree[2*p]++,e.bl_tree[32]++);i=0,r=p,0===s?(o=138,d=3):p===s?(o=6,d=3):(o=7,d=4)}}function S(e,t,a){var r=-1,s=t[1],i=0,o=7,d=4,c,u;for(0===s&&(o=138,d=3),c=0;c<=a;c++){if(u=s,s=t[2*(c+1)+1],++i=i?(p(e,17,e.bl_tree),l(e,i-3,3)):(p(e,18,e.bl_tree),l(e,i-11,7)):(u!==r&&(p(e,u,e.bl_tree),i--),p(e,16,e.bl_tree),l(e,i-3,2));i=0,r=u,0===s?(o=138,d=3):u===s?(o=6,d=3):(o=7,d=4)}}function k(e){var t;for(A(e,e.dyn_ltree,e.l_desc.max_code),A(e,e.dyn_dtree,e.d_desc.max_code),C(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*j[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function v(e,t,a,n){var r;for(l(e,t-257,5),l(e,a-1,5),l(e,n-4,4),r=0;r=a;a++,t>>>=1)if(1&t&&0!==e.dyn_ltree[2*a])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(a=32;a<256;a++)if(0!==e.dyn_ltree[2*a])return 1;return 0}function R(e){q||(h(),q=!0),e.l_desc=new i(e.dyn_ltree,H),e.d_desc=new i(e.dyn_dtree,K),e.bl_desc=new i(e.bl_tree,X),e.bi_buf=0,e.bi_valid=0,g(e)}function O(e,t,a,n){l(e,0+(n?1:0),3),b(e,t,a,!0)}var z=e("../utils/common"),L=29,T=256+1+L,B=30,P=[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],N=[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],D=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],U=Array(2*(T+2));n(U);var F=Array(2*B);n(F);var M=Array(512);n(M);var G=Array(258-3+1);n(G);var Z=Array(L);n(Z);var Y=Array(B);n(Y);var q=!1,H,K,X;a._tr_init=R,a._tr_stored_block=O,a._tr_flush_block=function(e,t,a,n){var r=0,s,i;0>>3,i=e.static_len+3+7>>>3,i<=s&&(s=i)):s=i=a+5,a+4<=s&&-1!==t?O(e,t,a,n):e.strategy===4||i===s?(l(e,2+(n?1:0),3),E(e,U,F)):(l(e,4+(n?1:0),3),v(e,e.l_desc.max_code+1,e.d_desc.max_code+1,r+1),E(e,e.dyn_ltree,e.dyn_dtree)),g(e),n&&y(e)},a._tr_tally=function(e,t,a){return e.pending_buf[e.d_buf+2*e.last_lit]=255&t>>>8,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&a,e.last_lit++,0===t?e.dyn_ltree[2*a]++:(e.matches++,t--,e.dyn_ltree[2*(G[a]+256+1)]++,e.dyn_dtree[2*o(t)]++),e.last_lit===e.lit_bufsize-1},a._tr_align=function(e){l(e,2,3),p(e,256,U),u(e)}},{"../utils/common":40}],52:[function(e,t){'use strict';t.exports=function(){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}},{}],53:[function(e,t){function a(e){var t=new n,a=t.write(e)+t.end();return a.replace(/\0/g,"").trim()}e("text-encoding-polyfill");var n=e("string_decoder").StringDecoder;t.exports=function(t){function n(e){var a=new TextDecoder(t),n=a.decode(e,{stream:!0})+a.decode();return n.replace(/\0/g,"").trim()}if(!t)return a;try{new TextDecoder(t.trim())}catch(a){var s=r.exec(t);s&&(t="windows-"+s[1])}return n};var r=/^(?:ASNI\s)?(\d+)$/m},{string_decoder:56,"text-encoding-polyfill":57}],54:[function(e,t){function a(e){var t={lastUpdated:new Date(e.readUInt8(1)+1900,e.readUInt8(2),e.readUInt8(3)),records:e.readUInt32LE(4),headerLen:e.readUInt16LE(8),recLen:e.readUInt16LE(10)};return t}function n(e,t,a){for(var n=[],r=32;r-1.001*Ce)r=-Ce;else if(r>Ce&&r<1.001*Ce)r=Ce;else{if(r<-Ce)return{x:-Infinity,y:-Infinity,z:e.z};if(r>Ce)return{x:1/0,y:1/0,z:e.z}}return a>me&&(a-=2*me),o=ge(r),l=ye(r),d=o*o,i=n/be(1-t*d),{x:(i+s)*l*ye(a),y:(i+s)*l*ge(a),z:(i*(1-t)+s)*o}}function L(e,t,r,a){var s=1e-12,i=e.x,o=e.y,d=e.z?e.z:0,l,p,c,u,m,_,f,h,g,y,b,x,w,E,C,A;if(l=be(i*i+o*o),p=be(i*i+o*o+d*d),!(l/rs*s&&w<30);return C=_e(b/n(y)),{x:E,y:C,z:A}}function T(e,t,a){if(1===t)return{x:e.x+a[0],y:e.y+a[1],z:e.z+a[2]};if(2===t){var n=a[0],r=a[1],s=a[2],i=a[3],o=a[4],d=a[5],l=a[6];return{x:l*(e.x-d*e.y+o*e.z)+n,y:l*(d*e.x+e.y-i*e.z)+r,z:l*(-o*e.x+i*e.y+e.z)+s}}}function B(e,t,a){if(1===t)return{x:e.x-a[0],y:e.y-a[1],z:e.z-a[2]};if(2===t){var n=a[0],r=a[1],s=a[2],i=a[3],o=a[4],d=a[5],l=a[6],p=(e.x-n)/l,c=(e.y-r)/l,u=(e.z-s)/l;return{x:p+d*c-o*u,y:-d*p+c+i*u,z:o*p-i*c+u}}}function P(e){return 1===e||2===e}function N(e){var t=Number.isFinite;if("function"==typeof t){if(t(e))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof e||e!==e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function D(e,t){return(1===e.datum.datum_type||2===e.datum.datum_type)&&"WGS84"!==t.datumCode||(1===t.datum.datum_type||2===t.datum.datum_type)&&"WGS84"!==e.datumCode}function j(e,t,a){var n;return Array.isArray(a)&&(a=lt(a)),pt(a),e.datum&&t.datum&&D(e,t)&&(n=new R("WGS84"),a=j(e,n,a),e=n),"enu"!==e.axis&&(a=dt(e,!1,a)),"longlat"===e.projName?a={x:a.x*Ie,y:a.y*Ie,z:a.z||0}:(e.to_meter&&(a={x:a.x*e.to_meter,y:a.y*e.to_meter,z:a.z||0}),a=e.inverse(a)),e.from_greenwich&&(a.x+=e.from_greenwich),a=ot(e.datum,t.datum,a),t.from_greenwich&&(a={x:a.x-t.from_greenwich,y:a.y,z:a.z||0}),"longlat"===t.projName?a={x:a.x*Re,y:a.y*Re,z:a.z||0}:(a=t.forward(a),t.to_meter&&(a={x:a.x/t.to_meter,y:a.y/t.to_meter,z:a.z||0})),"enu"===t.axis?a:dt(t,!0,a)}function U(e,t,a){var n,r,s;return Array.isArray(a)?(n=j(e,t,a)||{x:NaN,y:NaN},2n&&3<=s&&12>s&&(y=32),72<=n&&84>n&&(0<=s&&9>s?y=31:9<=s&&21>s?y=33:21<=s&&33>s?y=35:33<=s&&42>s&&(y=37)),p=6*(y-1)-180+3,g=Y(p),c=a/(1-a),u=i/be(1-a*ge(d)*ge(d)),m=he(d)*he(d),_=c*ye(d)*ye(d),f=ye(d)*(l-g),h=i*((1-a/4-3*a*a/64-5*a*a*a/256)*d-(3*a/8+3*a*a/32+45*a*a*a/1024)*ge(2*d)+(15*a*a/256+45*a*a*a/1024)*ge(4*d)-35*a*a*a/3072*ge(6*d));var b=o*u*(65+65*(65*(65*(1-m+_)))/6+65*(65*(65*(65*(65*(5-18*m+m*m+72*_-58*c)))))/120)+5e5,x=o*(h+u*he(d)*(4225/2+65*(65*(65*(65*(5-m+9*_+4*_*_))))/24+65*(65*(65*(65*(65*(65*(61-58*m+m*m+600*_-330*c))))))/720));return 0>n&&(x+=1e7),{northing:t(x),easting:t(b),zoneNumber:y,zoneLetter:X(n)}}function K(e){var t=e.northing,n=e.easting,r=e.zoneLetter,s=e.zoneNumber;if(0>s||60r&&(p-=1e7),b=6*(s-1)-180+3,c=a/(1-a),g=p/i,x=g/(d*(1-a/4-3*a*a/64-5*a*a*a/256)),w=x+(3*l/2-27*l*l*l/32)*ge(2*x)+(21*l*l/16-55*l*l*l*l/32)*ge(4*x)+151*l*l*l/96*ge(6*x),u=d/be(1-a*ge(w)*ge(w)),m=he(w)*he(w),_=c*ye(w)*ye(w),f=d*(1-a)/o(1-a*ge(w)*ge(w),1.5),h=(n-5e5)/(u*i);var E=w-u*he(w)/f*(h*h/2-(5+3*m+10*_-4*_*_-9*c)*h*h*h*h/24+(61+90*m+298*_+45*m*m-252*c-3*_*_)*h*h*h*h*h*h/720);E=q(E);var C=(h-(1+2*m+_)*h*h*h/6+(5-2*_+28*m-3*_*_+8*c+24*m*m)*h*h*h*h*h/120)/ye(w);C=b+q(C);var A;if(e.accuracy){var S=K({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});A={top:S.lat,right:S.lon,bottom:E,left:C}}else A={lat:E,lon:C};return A}function X(e){var t="Z";return 84>=e&&72<=e?t="X":72>e&&64<=e?t="W":64>e&&56<=e?t="V":56>e&&48<=e?t="U":48>e&&40<=e?t="T":40>e&&32<=e?t="S":32>e&&24<=e?t="R":24>e&&16<=e?t="Q":16>e&&8<=e?t="P":8>e&&0<=e?t="N":0>e&&-8<=e?t="M":-8>e&&-16<=e?t="L":-16>e&&-24<=e?t="K":-24>e&&-32<=e?t="J":-32>e&&-40<=e?t="H":-40>e&&-48<=e?t="G":-48>e&&-56<=e?t="F":-56>e&&-64<=e?t="E":-64>e&&-72<=e?t="D":-72>e&&-80<=e&&(t="C"),t}function W(e,t){var a="00000"+e.easting,n="00000"+e.northing;return e.zoneNumber+e.zoneLetter+Q(e.easting,e.northing,e.zoneNumber)+a.substr(a.length-5,t)+n.substr(n.length-5,t)}function Q(e,t,a){var n=J(a),s=r(e/1e5),i=r(t/1e5)%20;return V(s,i,n)}function J(e){var t=e%6;return 0===t&&(t=6),t}function V(e,t,a){var n=a-1,r="AJSAJS".charCodeAt(n),s="AFAFAF".charCodeAt(n),i=r+e-1,o=s+t,l=!1;90r&&73r)&&l)&&i++,(79===i||79>r&&79r)&&l)&&(i++,73===i&&i++),90s&&73s)&&l)&&o++,(79===o||79>s&&79s)&&l)&&(o++,73===o&&o++),86t)throw"MGRSPoint bad conversion from: "+e;var l=e.charAt(r++);if("A">=l||"B"===l||"Y"===l||"Z"<=l||"I"===l||"O"===l)throw"MGRSPoint zone letter "+l+" not handled: "+e;a=e.substring(r,r+=2);for(var p=J(d),c=ee(a.charAt(0),p),u=te(a.charAt(1),p);uOe&&s<=Ce+Oe?(r.value=_a.AREA_1,s-=Ce):s>Ce+Oe||s<=-(Ce+Oe)?(r.value=_a.AREA_2,s=0<=s?s-Le:s+Le):(r.value=_a.AREA_3,s+=Ce)),s}function oe(e,t){var a=e+t;return a<-Le?a+=ze:a>+Le&&(a-=ze),a}function de(e,t,a,r){for(var s=t,i;r&&(i=e(s),s-=i,!(n(i)=this.text.length)return;e=this.text[this.place++]}switch(this.state){case De:return this.neutral(e);case je:return this.keyword(e);case Fe:return this.quoted(e);case Me:return this.afterquote(e);case Ue:return this.number(e);case Ge:}},t.prototype.afterquote=function(e){if("\""===e)return this.word+="\"",void(this.state=Fe);if(Ze.test(e))return this.word=this.word.trim(),void this.afterItem(e);throw new Error("havn't handled \""+e+"\" in afterquote yet, index "+this.place)},t.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=De)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=De,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=Ge))):void 0},t.prototype.number=function(e){if(Ye.test(e))return void(this.word+=e);if(Ze.test(e))return this.word=parseFloat(this.word),void this.afterItem(e);throw new Error("havn't handled \""+e+"\" in number yet, index "+this.place)},t.prototype.quoted=function(e){return"\""===e?void(this.state=Me):void(this.word+=e)},t.prototype.keyword=function(e){if(/[A-Za-z84]/.test(e))return void(this.word+=e);if("["===e){var t=[];return t.push(this.word),this.level++,null===this.root?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,void(this.state=De)}if(Ze.test(e))return void this.afterItem(e);throw new Error("havn't handled \""+e+"\" in keyword yet, index "+this.place)},t.prototype.neutral=function(e){if(/[A-Za-z]/.test(e))return this.word=e,void(this.state=je);if("\""===e)return this.word="",void(this.state=Fe);if(Ye.test(e))return this.word=e,void(this.state=Ue);if(Ze.test(e))return void this.afterItem(e);throw new Error("havn't handled \""+e+"\" in neutral yet, index "+this.place)},t.prototype.output=function(){for(;this.placee?-1:1},Ve=function(e){return n(e)<=Le?e:e-Je(e)*ze},$e=function(e,t,a){var n=e*a;return n=o((1-n)/(1+n),.5*e),he(.5*(Ce-t))/n},et=function(e,t){for(var a=Ce-2*_e(t),r=0,s,d;15>=r;r++)if(s=e*ge(a),d=Ce-2*_e(t*o((1-s)/(1+s),.5*e))-a,a+=d,1e-10>=n(d))return a;return-9999},tt=[{init:C,forward:function(e){var t=e.x,r=e.y;if(90r*Re&&180t*Re)return null;var s,i;if(n(n(r)-Ce)<=ve)return null;if(this.sphere)s=this.x0+this.a*this.k0*Ve(t-this.long0),i=this.y0+this.a*this.k0*a(he(Oe+.5*r));else{var o=ge(r),d=$e(this.e,r,o);s=this.x0+this.a*this.k0*Ve(t-this.long0),i=this.y0-this.a*this.k0*a(d)}return e.x=s,e.y=i,e},inverse:function(e){var t=e.x-this.x0,a=e.y-this.y0,n,r;if(this.sphere)r=Ce-2*_e(fe(-a/(this.a*this.k0)));else{var s=fe(-a/(this.a*this.k0));if(r=et(this.e,s),-9999===r)return null}return n=Ve(this.long0+t/(this.a*this.k0)),e.x=n,e.y=r,e},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:A,inverse:A,names:["longlat","identity"]}],at={},nt=[],rt={};rt.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},rt.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},rt.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},rt.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},rt.airy={a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},rt.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},rt.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},rt.mod_airy={a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},rt.andrae={a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},rt.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},rt.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},rt.bessel={a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},rt.bess_nam={a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},rt.clrk66={a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},rt.clrk80={a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},rt.clrk58={a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},rt.CPM={a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},rt.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},rt.engelis={a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},rt.evrst30={a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},rt.evrst48={a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},rt.evrst56={a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},rt.evrst69={a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},rt.evrstSS={a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},rt.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},rt.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},rt.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},rt.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},rt.hough={a:6378270,rf:297,ellipseName:"Hough"},rt.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},rt.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},rt.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},rt.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},rt.new_intl={a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},rt.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},rt.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},rt.SEasia={a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},rt.walbeck={a:6376896,b:6355834.8467,ellipseName:"Walbeck"},rt.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},rt.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},rt.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var st=rt.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};rt.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var it={};it.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},it.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},it.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},it.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},it.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},it.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},it.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},it.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},it.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},it.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},it.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},it.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},it.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},it.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},it.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},it.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},it.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},R.projections={start:function(){tt.forEach(S)},add:S,get:function(e){if(!e)return!1;var t=e.toLowerCase();if("undefined"!=typeof at[t]&&nt[at[t]])return nt[at[t]]}},R.projections.start(),"use strict";var ot=function(e,t,a){return O(e,t)?a:e.datum_type===xe||t.datum_type===xe?a:e.es!==t.es||e.a!==t.a||P(e.datum_type)||P(t.datum_type)?(a=z(a,e.es,e.a),P(e.datum_type)&&(a=T(a,e.datum_type,e.datum_params)),P(t.datum_type)&&(a=B(a,t.datum_type,t.datum_params)),L(a,t.es,t.a,t.b)):a},dt=function(e,a,n){var r=n.x,s=n.y,o=n.z||0,d={},l,p,c;for(c=0;3>c;c++)if(!(a&&2===c&&void 0===n.z))switch(0===c?(l=r,p=-1==="ew".indexOf(e.axis[c])?"y":"x"):1===c?(l=s,p=-1==="ns".indexOf(e.axis[c])?"x":"y"):(l=o,p="z"),e.axis[c]){case"e":case"w":case"n":case"s":d[p]=l;break;case"u":void 0!==n[p]&&(d.z=l);break;case"d":void 0!==n[p]&&(d.z=-l);break;default:return null;}return d},lt=function(e){var t={x:e[0],y:e[1]};return 2ve)return 93;m=0}else m=pe(m);0>s&&(m=-m),m=this.a*this.k0*(m-this.lat0)+this.y0}else{var f=l*i,h=o(f,2),g=this.ep2*o(l,2),c=o(g,2),w=n(l)>ve?he(s):0,E=o(w,2),t=o(E,2);p=1-this.es*o(d,2),f/=be(p);var C=ht(s,d,l,this.en);u=this.a*(this.k0*f*(1+h/6*(1-E+g+h/20*(5-18*E+t+14*g-58*E*g+h/42*(61+179*t-t*E-479*E)))))+this.x0,m=this.a*(this.k0*(C-this.ml0+d*i*f/2*(1+h/12*(5-E+9*g+4*c+h/30*(61+t-58*E+270*g-330*E*g+h/56*(1385+543*t-t*E-3111*E))))))+this.y0}return e.x=u,e.y=m,e},inverse:function(e){var a=(e.x-this.x0)*(1/this.a),r=(e.y-this.y0)*(1/this.a),s,i,l,p;if(!this.es){var u=fe(a/this.k0),m=.5*(u-1/u),_=this.lat0+r/this.k0,f=ye(_);s=be((1-o(f,2))/(1+o(m,2))),l=le(s),0>r&&(l=-l),p=0===m&&0===f?0:Ve(ue(m,f)+this.long0)}else if(s=this.ml0+r/this.k0,i=gt(s,this.es,this.en),n(i)ve?he(i):0,b=this.ep2*o(g,2),c=o(b,2),x=o(y,2),t=o(x,2);s=1-this.es*o(h,2);var w=a*be(s)/this.k0,d=o(w,2);s*=y,l=i-.5*(s*d/(1-this.es))*(1-d/12*(5+3*x-9*b*x+b-4*c-d/30*(61+90*x-252*b*x+45*t+46*b-d/56*(1385+3633*x+4095*t+1574*t*x)))),p=Ve(this.long0+w*(1-d/6*(1+2*x+b-d/20*(5+28*x+24*t+8*b*x+6*b-d/42*(61+662*x+1320*t+720*t*x))))/g)}else l=Ce*Je(r),p=0;return e.x=p,e.y=l,e},names:["Transverse_Mercator","Transverse Mercator","tmerc"]},bt=function(e){var t=fe(e);return t=(t-1/t)/2,t},xt=function(e,t){var r=Math.max;e=n(e),t=n(t);var s=r(e,t),a=l(e,t)/(s?s:1);return s*be(1+o(a,2))},wt=function(e){var t=1+e,n=t-1;return 0===n?e:e*a(t)/n},Et=function(e){var t=n(e);return t=wt(t*(1+t/(xt(1,t)+1))),0>e?-t:t},Ct=function(e,t){for(var a=2*ye(2*t),n=e.length-1,r=e[n],s=0,o;0<=--n;)o=-s+a*r+e[n],s=r,r=o;return t+o*ge(2*t)},At=function(e,t){for(var a=2*ye(t),n=e.length-1,r=e[n],s=0,o;0<=--n;)o=-s+a*r+e[n],s=r,r=o;return ge(t)*o},St=function(e){var t=fe(e);return t=(t+1/t)/2,t},kt=function(e,t,a){for(var n=ge(t),s=ye(t),o=bt(a),d=St(a),l=2*s*d,p=-2*n*o,c=e.length-1,u=e[c],m=0,_=0,f=0,h,g;0<=--c;)h=_,g=m,_=u,m=f,u=-h+l*_-p*m+e[c],f=-g+p*_+l*m;return l=n*d,p=s*o,[l*u-p*f,l*f+p*u]},vt={init:function(){if(void 0===this.es||0>=this.es)throw new Error("incorrect elliptical usage");this.x0=void 0===this.x0?0:this.x0,this.y0=void 0===this.y0?0:this.y0,this.long0=void 0===this.long0?0:this.long0,this.lat0=void 0===this.lat0?0:this.lat0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+be(1-this.es)),t=e/(2-e),a=t;this.cgb[0]=t*(2+t*(-2/3+t*(-2+t*(116/45+t*(26/45+t*(-2854/675)))))),this.cbg[0]=t*(-2+t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))),a*=t,this.cgb[1]=a*(7/3+t*(-8/5+t*(-227/45+t*(2704/315+t*(2323/945))))),this.cbg[1]=a*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),a*=t,this.cgb[2]=a*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=a*(-26/15+t*(34/21+t*(8/5+t*(-12686/2835)))),a*=t,this.cgb[3]=a*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=a*(1237/630+t*(-12/5+t*(-24832/14175))),a*=t,this.cgb[4]=a*(4174/315+t*(-144838/6237)),this.cbg[4]=a*(-734/315+t*(109598/31185)),a*=t,this.cgb[5]=a*(601676/22275),this.cbg[5]=a*(444337/155925),a=o(t,2),this.Qn=this.k0/(1+t)*(1+a*(1/4+a*(1/64+a/256))),this.utg[0]=t*(-.5+t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=a*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=a*(13/48+t*(-3/5+t*(557/1440+t*(281/630+t*(-1983433/1935360))))),a*=t,this.utg[2]=a*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=a*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),a*=t,this.utg[3]=a*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=a*(49561/161280+t*(-179/168+t*(6601661/7257600))),a*=t,this.utg[4]=a*(-4583/161280+t*(108847/3991680)),this.gtu[4]=a*(34729/80640+t*(-3418889/1995840)),a*=t,this.utg[5]=a*(-20648693/638668800),this.gtu[5]=a*(212378941/319334400);var n=Ct(this.cbg,this.lat0);this.Zb=-this.Qn*(n+At(this.gtu,2*n))},forward:function(e){var t=Ve(e.x-this.long0),a=e.y;a=Ct(this.cbg,a);var r=ge(a),s=ye(a),i=ge(t),o=ye(t);a=ue(r,o*s),t=ue(i*s,xt(r,s*o)),t=Et(he(t));var d=kt(this.gtu,2*a,2*t);a+=d[0],t+=d[1];var l,p;return 2.623395162778>=n(t)?(l=this.a*(this.Qn*t)+this.x0,p=this.a*(this.Qn*a+this.Zb)+this.y0):(l=1/0,p=1/0),e.x=l,e.y=p,e},inverse:function(e){var t=(e.x-this.x0)*(1/this.a),a=(e.y-this.y0)*(1/this.a);a=(a-this.Zb)/this.Qn,t/=this.Qn;var r,s;if(2.623395162778>=n(t)){var i=kt(this.utg,2*a,2*t);a+=i[0],t+=i[1],t=_e(bt(t));var o=ge(a),d=ye(a),l=ge(t),p=ye(t);a=ue(o*p,xt(l,p*d)),t=ue(l,p*d),r=Ve(t+this.long0),s=Ct(this.cgb,a)}else r=1/0,s=1/0;return e.x=r,e.y=s,e},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc"]},It=function(e,t){if(void 0===e){if(e=r(30*(Ve(t)+me)/me)+1,0>e)return 0;if(60r*r&&(r=1);var s,i;if(!isNaN(this.longc))s=0<=this.lat0?r+be(r*r-1):r-be(r*r-1),this.el=s*o(n,this.bl),i=.5*(s-1/s),this.gamma0=le(ge(this.alpha)/r),this.long0=this.longc-le(i*he(this.gamma0))/this.bl;else{var d=$e(this.e,this.lat1,ge(this.lat1)),l=$e(this.e,this.lat2,ge(this.lat2));this.el=0<=this.lat0?(r+be(r*r-1))*o(n,this.bl):(r-be(r*r-1))*o(n,this.bl);var p=o(d,this.bl),c=o(l,this.bl);s=this.el/p,i=.5*(s-1/s);var u=(this.el*this.el-c*p)/(this.el*this.el+c*p),m=Ve(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-_e(u*he(.5*this.bl*m)/((c-p)/(c+p)))/this.bl,this.long0=Ve(this.long0);var _=Ve(this.long1-this.long0);this.gamma0=_e(ge(this.bl*_)/i),this.alpha=le(r*ge(this.gamma0))}this.uc=this.no_off?0:0<=this.lat0?this.al/this.bl*ue(be(r*r-1),ye(this.alpha)):-1*this.al/this.bl*ue(be(r*r-1),ye(this.alpha))},forward:function(e){var r=Number.POSITIVE_INFINITY,s=e.x,i=e.y,d=Ve(s-this.long0),l,p,c;if(n(n(i)-Ce)<=ve)c=0ve?a(s/p)/a(i/c):t,isNaN(this.ns)&&(this.ns=t),this.f0=s/(this.ns*o(i,this.ns)),this.rh=this.a*this.f0*o(u,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(e){var t=e.x,a=e.y;n(2*n(a)-me)<=ve&&(a=Je(a)*(Ce-2*ve));var r=n(n(a)-Ce),s,i;if(r>ve)s=$e(this.e,a,ge(a)),i=this.a*this.f0*o(s,this.ns);else{if(r=a*this.ns,0>=r)return null;i=0}var d=this.ns*Ve(t-this.long0);return e.x=this.k0*(i*ge(d))+this.x0,e.y=this.k0*(this.rh-i*ye(d))+this.y0,e},inverse:function(e){var t=(e.x-this.x0)/this.k0,a=this.rh-(e.y-this.y0)/this.k0,n,r,s,i,d;0n(m-e.y)&&(_=1),m=e.y,f+=1;while(0===_&&15>f);return 15<=f?null:e},names:["Krovak","krovak"]},jt=function(e,t,a,n,r){return e*r-t*ge(2*r)+a*ge(4*r)-n*ge(6*r)},Ut=function(e){return 1-.25*e*(1+e/16*(3+1.25*e))},Ft=function(e){return .375*e*(1+.25*e*(1+.46875*e))},Mt=function(e){return .05859375*e*e*(1+.75*e)},Gt=function(e){return e*e*e*(35/3072)},Zt=function(t,a,e){var n=a*e;return t/be(1-n*n)},i=function(e){return n(e)l;l++)if(d=(e-(t*o-a*ge(2*o)+r*ge(4*o)-s*ge(6*o)))/(t-2*a*ye(2*o)+4*r*ye(4*o)-6*s*ye(6*o)),o+=d,1e-10>=n(d))return o;return NaN},Ee={init:function(){this.sphere||(this.e0=Ut(this.es),this.e1=Ft(this.es),this.e2=Mt(this.es),this.e3=Gt(this.es),this.ml0=this.a*jt(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(e){var t=e.x,a=e.y,n,r;if(t=Ve(t-this.long0),this.sphere)n=this.a*le(ye(a)*ge(t)),r=this.a*(ue(he(a),ye(t))-this.lat0);else{var s=ge(a),i=ye(a),o=Zt(this.a,this.e,s),d=he(a)*he(a),l=t*ye(a),p=l*l,c=this.es*i*i/(1-this.es),u=this.a*jt(this.e0,this.e1,this.e2,this.e3,a);n=o*l*(1-p*d*(1/6-(8-d+8*c)*p/120)),r=u-this.ml0+o*s/i*p*(.5+(5-d+6*c)*p/24)}return e.x=n+this.x0,e.y=r+this.y0,e},inverse:function(e){e.x-=this.x0,e.y-=this.y0;var t=e.x/this.a,a=e.y/this.a,r,s;if(this.sphere){var d=a+this.lat0;r=le(ge(d)*ye(t)),s=ue(he(t),ye(d))}else{var l=this.ml0/this.a+a,p=ce(l,this.e0,this.e1,this.e2,this.e3);if(n(n(p)-Ce)<=ve)return e.x=this.long0,e.y=Ce,0>a&&(e.y*=-1),e;var c=Zt(this.a,this.e,ge(p)),u=c*c*c/this.a/this.a*(1-this.es),m=o(he(p),2),_=t*this.a/c,f=_*_;r=p-c*he(p)/u*_*_*(.5-(1+3*m)*_*_/24),s=_*(1-f*(m/3+(1+3*m)*m*f/15))/ye(p)}return e.x=Ve(s+this.long0),e.y=i(r),e},names:["Cassini","Cassini_Soldner","cass"]},Yt=function(e,t){var n;return 1e-7this.lat0?this.S_POLE:this.N_POLE:n(e)ve?(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*be(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(e){var t=e.x,a=e.y;this.sin_phi=ge(a),this.cos_phi=ye(a);var n=Yt(this.e3,this.sin_phi,this.cos_phi),r=this.a*be(this.c-this.ns0*n)/this.ns0,s=this.ns0*Ve(t-this.long0),i=r*ge(s)+this.x0,o=this.rh-r*ye(s)+this.y0;return e.x=i,e.y=o,e},inverse:function(e){var t,a,n,r,s,i;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,0<=this.ns0?(t=be(e.x*e.x+e.y*e.y),n=1):(t=-be(e.x*e.x+e.y*e.y),n=-1),r=0,0!==t&&(r=ue(n*e.x,n*e.y)),n=t*this.ns0/this.a,this.sphere?i=le((this.c-n*n)/(2*this.ns0)):(a=(this.c-n*n)/this.ns0,i=this.phi1z(this.e3,a)),s=Ve(r/this.ns0+this.long0),e.x=s,e.y=i,e},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(e,t){var r=Vt(.5*t),s,o,d,l,p;if(e=c;c++)if(s=ge(r),o=ye(r),d=e*s,l=1-d*d,p=.5*l*l/o*(t/(1-e*e)-s/l+.5/e*a((1-d)/(1+d))),r+=p,1e-7>=n(p))return r;return null}},ea={init:function(){this.sin_p14=ge(this.lat0),this.cos_p14=ye(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(e){var t=e.x,a=e.y,r,s,i,o,d,l,p,c;return i=Ve(t-this.long0),r=ge(a),s=ye(a),o=ye(i),l=this.sin_p14*r+this.cos_p14*s*o,d=1,0n(n(t)-r))return 0>t?-1*Ce:Ce;for(var s=le(.5*t),d=0,l,p,c,u;30>d;d++)if(p=ge(s),c=ye(s),u=e*p,l=o(1-u*u,2)/(2*c)*(t/(1-e*e)-p/(1-u*u)+.5/e*a((1-u)/(1+u))),s+=l,1e-10>=n(l))return s;return NaN},aa={init:function(){this.sphere||(this.k0=Qe(this.e,ge(this.lat_ts),ye(this.lat_ts)))},forward:function(e){var t=e.x,a=e.y,n=Ve(t-this.long0),r,s;if(this.sphere)r=this.x0+this.a*n*ye(this.lat_ts),s=this.y0+this.a*ge(a)/ye(this.lat_ts);else{var i=Yt(this.e,ge(a));r=this.x0+this.a*this.k0*n,s=this.y0+.5*(this.a*i)/this.k0}return e.x=r,e.y=s,e},inverse:function(e){e.x-=this.x0,e.y-=this.y0;var t,a;return this.sphere?(t=Ve(this.long0+e.x/this.a/ye(this.lat_ts)),a=le(e.y/this.a*ye(this.lat_ts))):(a=ta(this.e,2*e.y*this.k0/this.a),t=Ve(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=a,e},names:["cea"]},na={init:function(){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=ye(this.lat_ts)},forward:function(e){var t=e.x,a=e.y,n=Ve(t-this.long0),r=i(a-this.lat0);return e.x=this.x0+this.a*n*this.rc,e.y=this.y0+this.a*r,e},inverse:function(e){var t=e.x,a=e.y;return e.x=Ve(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=i(this.lat0+(a-this.y0)/this.a),e},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},ra={init:function(){this.temp=this.b/this.a,this.es=1-o(this.temp,2),this.e=be(this.es),this.e0=Ut(this.es),this.e1=Ft(this.es),this.e2=Mt(this.es),this.e3=Gt(this.es),this.ml0=this.a*jt(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(e){var t=e.x,a=e.y,r=Ve(t-this.long0),s,o,d;if(d=r*ge(a),this.sphere)n(a)<=ve?(s=this.a*r,o=-1*this.a*this.lat0):(s=this.a*ge(d)/he(a),o=this.a*(i(a-this.lat0)+(1-ye(d))/he(a)));else if(n(a)<=ve)s=this.a*r,o=-1*this.ml0;else{var l=Zt(this.a,this.e,ge(a))/he(a);s=l*ge(d),o=this.a*jt(this.e0,this.e1,this.e2,this.e3,a)-this.ml0+l*(1-ye(d))}return e.x=s+this.x0,e.y=o+this.y0,e},inverse:function(e){var t,a,r,s,d,l,p,c,u;if(r=e.x-this.x0,s=e.y-this.y0,this.sphere){if(n(s+this.a*this.lat0)<=ve)t=Ve(r/this.a+this.long0),a=0;else{l=this.lat0+s/this.a,p=r*r/this.a/this.a+l*l,c=l;var m;for(d=20;d;--d)if(m=he(c),u=-1*(l*(c*m+1)-c-.5*(c*c+p)*m)/((c-l)/m-1),c+=u,n(u)<=ve){a=c;break}t=Ve(this.long0+le(r*he(c)/this.a)/ge(a))}}else if(n(s+this.ml0)<=ve)a=0,t=Ve(this.long0+r/this.a);else{l=(this.ml0+s)/this.a,p=r*r/this.a/this.a+l*l,c=l;var _,f,h,g,b;for(d=20;d;--d)if(b=this.e*ge(c),_=be(1-b*b)*he(c),f=this.a*jt(this.e0,this.e1,this.e2,this.e3,c),h=this.e0-2*this.e1*ye(2*c)+4*this.e2*ye(4*c)-6*this.e3*ye(6*c),g=f/this.a,u=(l*(_*g+1)-g-.5*_*(g*g+p))/(this.es*ge(2*c)*(g*g+p-2*l*g)/(4*_)+(l-g)*(_*h-2/ge(2*c))-h),c-=u,n(u)<=ve){a=c;break}_=be(1-this.es*o(ge(a),2))*he(a),t=Ve(this.long0+le(r*_/this.a)/ge(a))}return e.x=t,e.y=a,e},names:["Polyconic","poly"]},sa={init:function(){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},forward:function(e){var t=e.x,a=e.y,r=a-this.lat0,s=t-this.long0,i=1,o=0,d;for(d=1;10>=d;d++)i*=1E-5*(r/we),o+=this.A[d]*i;var l=o,p=s,c=1,u=0,m=0,_=0,f,h;for(d=1;6>=d;d++)f=c*l-u*p,h=u*l+c*p,c=f,u=h,m=m+this.B_re[d]*c-this.B_im[d]*u,_=_+this.B_im[d]*c+this.B_re[d]*u;return e.x=_*this.a+this.x0,e.y=m*this.a+this.y0,e},inverse:function(e){var t=e.x,a=e.y,r=t-this.x0,s=a-this.y0,o=s/this.a,d=r/this.a,l=1,p=0,c=0,u=0,m,_,f;for(m=1;6>=m;m++)_=l*o-p*d,f=p*o+l*d,l=_,p=f,c=c+this.C_re[m]*l-this.C_im[m]*p,u=u+this.C_im[m]*l+this.C_re[m]*p;for(var h=0;h=m;m++)w=g*c-y*u,E=y*c+g*u,g=w,y=E,b+=(m-1)*(this.B_re[m]*g-this.B_im[m]*y),x+=(m-1)*(this.B_im[m]*g+this.B_re[m]*y);g=1,y=0;var C=this.B_re[1],A=this.B_im[1];for(m=2;6>=m;m++)w=g*c-y*u,E=y*c+g*u,g=w,y=E,C+=m*(this.B_re[m]*g-this.B_im[m]*y),A+=m*(this.B_im[m]*g+this.B_re[m]*y);var S=C*C+A*A;c=(b*C+x*A)/S,u=(x*C-b*A)/S}var k=c,v=u,I=1,R=0;for(m=1;9>=m;m++)I*=k,R+=this.D[m]*I;var O=this.lat0+1E5*(R*we),z=this.long0+v;return e.x=z,e.y=O,e},names:["New_Zealand_Map_Grid","nzmg"]},ia={init:function(){},forward:function(e){var t=e.x,n=e.y,r=Ve(t-this.long0),s=this.x0+this.a*r,i=this.y0+1.25*(this.a*a(he(me/4+n/2.5)));return e.x=s,e.y=i,e},inverse:function(e){e.x-=this.x0,e.y-=this.y0;var t=Ve(this.long0+e.x/this.a),a=2.5*(_e(fe(.8*e.y/this.a))-me/4);return e.x=t,e.y=a,e},names:["Miller_Cylindrical","mill"]},oa={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=be((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=ft(this.es)},forward:function(e){var t=e.x,a=e.y,r,o;if(t=Ve(t-this.long0),this.sphere){if(!this.m)a=1===this.n?a:le(this.n*ge(a));else for(var d=this.n*ge(a),l=20,p;l&&(p=(this.m*a+ge(a)-d)/(this.m+ye(a)),a-=p,!(n(p)me&&(r=me),a=(2*t+ge(2*t))/me,1r&&(f=-f),s=this.x0+f;var h=l+u;return f=me*this.R*(_*h-d*be((m+l)*(l+1)-h*h))/(m+l),i=0<=a?this.y0+f:this.y0-f,e.x=s,e.y=i,e},inverse:function(e){var t,a,r,s,i,o,l,p,c,u,m,_,f;return e.x-=this.x0,e.y-=this.y0,m=me*this.R,r=e.x/m,s=e.y/m,i=r*r+s*s,o=-n(s)*(1+i),l=o-2*s*s+r*r,p=-2*o+1+2*s*s+i*i,f=s*s/p+(2*l*l*l/p/p/p-9*o*l/p/p)/27,c=(o-l*l/3/p)/p,u=2*be(-c/3),m=3*f/c/u,12*Ce*this.a)?void 0:(a=t/this.a,r=ge(a),s=ye(a),i=this.long0,n(t)<=ve?d=this.lat0:(d=Vt(s*this.sin_p12+e.y*r*this.cos_p12/t),l=n(this.lat0)-Ce,i=n(l)<=ve?0<=this.lat0?Ve(this.long0+ue(e.x,-e.y)):Ve(this.long0-ue(-e.x,e.y)):Ve(this.long0+ue(e.x*r,t*this.cos_p12*s-e.y*this.sin_p12*r))),e.x=i,e.y=d,e):(p=Ut(this.es),c=Ft(this.es),u=Mt(this.es),m=Gt(this.es),n(this.sin_p12-1)<=ve?(_=this.a*jt(p,c,u,m,Ce),t=be(e.x*e.x+e.y*e.y),f=_-t,d=ce(f/this.a,p,c,u,m),i=Ve(this.long0+ue(e.x,-1*e.y)),e.x=i,e.y=d,e):n(this.sin_p12+1)<=ve?(_=this.a*jt(p,c,u,m,Ce),t=be(e.x*e.x+e.y*e.y),f=t-_,d=ce(f/this.a,p,c,u,m),i=Ve(this.long0+ue(e.x,e.y)),e.x=i,e.y=d,e):(t=be(e.x*e.x+e.y*e.y),y=ue(e.x,e.y),h=Zt(this.a,this.e,this.sin_p12),b=ye(y),x=this.e*this.cos_p12*b,w=-x*x/(1-this.es),E=3*this.es*(1-w)*this.sin_p12*this.cos_p12*b/(1-this.es),C=t/h,S=C-w*(1+w)*o(C,3)/6-E*(1+3*w)*o(C,4)/24,k=1-w*S*S/2-C*S*S*S/6,g=le(this.sin_p12*ye(S)+this.cos_p12*ge(S)*b),i=Ve(this.long0+le(ge(y)*ge(S)/ye(g))),d=_e((1-this.es*k*this.sin_p12/ge(g))*he(g)/(1-this.es)),e.x=i,e.y=d,e))},names:["Azimuthal_Equidistant","aeqd"]},ua={init:function(){this.sin_p14=ge(this.lat0),this.cos_p14=ye(this.lat0)},forward:function(e){var t=e.x,a=e.y,r,s,i,o,d,l,p,c;return i=Ve(t-this.long0),r=ge(a),s=ye(a),o=ye(i),l=this.sin_p14*r+this.cos_p14*s*o,d=1,(0=Ce-Oe/2?ma.TOP:this.lat0<=-(Ce-Oe/2)?ma.BOTTOM:n(this.long0)<=Oe?ma.FRONT:n(this.long0)<=Ce+Oe?0=Oe&&o<=Ce+Oe?(n.value=_a.AREA_0,d=o-Ce):o>Ce+Oe||o<=-(Ce+Oe)?(n.value=_a.AREA_1,d=0-(Ce+Oe)&&o<=-Oe?(n.value=_a.AREA_2,d=o+Ce):(n.value=_a.AREA_3,d=o);else if(this.face===ma.BOTTOM)l=Ce+i,o>=Oe&&o<=Ce+Oe?(n.value=_a.AREA_0,d=-o+Ce):o=-Oe?(n.value=_a.AREA_1,d=-o):o<-Oe&&o>=-(Ce+Oe)?(n.value=_a.AREA_2,d=-o-Ce):(n.value=_a.AREA_3,d=0=n(e.y)?i.value=_a.AREA_0:0<=e.y&&e.y>=n(e.x)?(i.value=_a.AREA_1,o-=Ce):0>e.x&&-e.x>=n(e.y)?(i.value=_a.AREA_2,o=0>o?o+Le:o-Le):(i.value=_a.AREA_3,o+=Ce),f=Le/12*he(o),c=ge(f)/(ye(f)-1/be(2)),u=_e(c),l=ye(o),p=he(d),m=1-l*l*p*p*(1-ye(_e(1/ye(u)))),-1>m?m=-1:1u?u+Le:u-Le:i.value===_a.AREA_2?u-Ce:u;else if(this.face===ma.BOTTOM)_=pe(m),a.phi=_-Ce,a.lam=i.value===_a.AREA_0?-u+Ce:i.value===_a.AREA_1?-u:i.value===_a.AREA_2?-u-Ce:0>u?-u-Le:-u+Le;else{var h,g,y;h=m,f=h*h,y=1<=f?0:be(1-f)*ge(u),f+=y*y,g=1<=f?0:be(1-f),i.value===_a.AREA_1?(f=g,g=-y,y=f):i.value===_a.AREA_2?(g=-g,y=-y):i.value===_a.AREA_3&&(f=g,g=y,y=-f),this.face===ma.RIGHT?(f=h,h=-g,g=f):this.face===ma.BACK?(h=-h,g=-g):this.face===ma.LEFT&&(f=h,h=g,g=-f),a.phi=pe(-y)-Ce,a.lam=ue(g,h),this.face===ma.RIGHT?a.lam=oe(a.lam,-Ce):this.face===ma.BACK?a.lam=oe(a.lam,-Le):this.face===ma.LEFT&&(a.lam=oe(a.lam,+Ce))}if(0!==this.es){var b,x,w;b=0>a.phi?1:0,x=he(a.phi),w=this.b/be(x*x+this.one_minus_f_squared),a.phi=_e(be(this.a*this.a-w*w)/(this.one_minus_f*w)),b&&(a.phi=-a.phi)}return a.lam+=this.long0,e.x=a.lam,e.y=a.phi,e},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},ha=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],ga=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,422642e-15],[.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]],ya=.8487,ba=1.3523,xa=Re/5,wa=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},Ea=function(e,t){return e[1]+t*(2*e[2]+3*t*e[3])},Ca={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(e){var t=Ve(e.x-this.long0),a=n(e.y),s=r(a*xa);0>s?s=0:18<=s&&(s=17),a=Re*(a-1/xa*s);var o={x:wa(ha[s],a)*t,y:wa(ga[s],a)};return 0>e.y&&(o.y=-o.y),o.x=o.x*this.a*ya+this.x0,o.y=o.y*this.a*ba+this.y0,o},inverse:function(e){var a={x:(e.x-this.x0)/(this.a*ya),y:n(e.y-this.y0)/(this.a*ba)};if(1<=a.y)a.x/=ha[18][0],a.y=0>e.y?-Ce:Ce;else{var s=r(18*a.y);for(0>s?s=0:18<=s&&(s=17);;)if(ga[s][0]>a.y)--s;else if(ga[s+1][0]<=a.y)++s;else break;var o=ga[s],d=5*(a.y-o[0])/(ga[s+1][0]-o[0]);d=de(function(e){return(wa(o,e)-a.y)/Ea(o,e)},d,ve,100),a.x/=wa(ha[s],d),a.y=(5*s+d)*Ie,0>e.y&&(a.y=-a.y)}return a.x=Ve(a.x+this.long0),a},names:["Robinson","robin"]},Aa={init:function(){this.name="geocent"},forward:function(e){var t=z(e,this.es,this.a);return t},inverse:function(e){var t=L(e,this.es,this.a,this.b);return t},names:["Geocentric","geocentric","geocent","Geocent"]};return M.defaultDatum="WGS84",M.Proj=R,M.WGS84=new M.Proj("WGS84"),M.Point=ne,M.toPoint=lt,M.defs=f,M.transform=j,M.mgrs={forward:G,inverse:function(e){var t=K($(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]},toPoint:Z},M.version="2.6.1",function(e){e.Proj.projections.add(yt),e.Proj.projections.add(vt),e.Proj.projections.add(Rt),e.Proj.projections.add(Lt),e.Proj.projections.add(Tt),e.Proj.projections.add(Bt),e.Proj.projections.add(Pt),e.Proj.projections.add(Nt),e.Proj.projections.add(Dt),e.Proj.projections.add(Ee),e.Proj.projections.add(Jt),e.Proj.projections.add($t),e.Proj.projections.add(ea),e.Proj.projections.add(aa),e.Proj.projections.add(na),e.Proj.projections.add(ra),e.Proj.projections.add(sa),e.Proj.projections.add(ia),e.Proj.projections.add(oa),e.Proj.projections.add(da),e.Proj.projections.add(la),e.Proj.projections.add(pa),e.Proj.projections.add(ca),e.Proj.projections.add(ua),e.Proj.projections.add(fa),e.Proj.projections.add(Ca),e.Proj.projections.add(Aa)}(M),M})},{}],56:[function(e,t,a){function n(e){if(e&&!d(e))throw new Error("Unknown encoding: "+e)}function r(e){return e.toString(this.encoding)}function s(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function i(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var o=e("buffer").Buffer,d=o.isEncoding||function(e){switch(e&&e.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;}},l=a.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),n(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=i;break;default:return void(this.write=r);}this.charBuffer=new o(6),this.charReceived=0,this.charLength=0};l.prototype.write=function(e){for(var t="",a;this.charLength;){if(a=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length,e.copy(this.charBuffer,this.charReceived,0,a),this.charReceived+=a,this.charReceived=n){this.charLength+=this.surrogateSize,t="";continue}if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.detectIncompleteChar(e);var r=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,r),r-=this.charReceived),t+=e.toString(this.encoding,0,r);var r=t.length-1,n=t.charCodeAt(r);if(55296<=n&&56319>=n){var s=this.surrogateSize;return this.charLength+=s,this.charReceived+=s,this.charBuffer.copy(this.charBuffer,s,0,s),e.copy(this.charBuffer,0,0,s),t.substring(0,r)}return t},l.prototype.detectIncompleteChar=function(e){for(var t=3<=e.length?3:e.length;0>5){this.charLength=2;break}if(2>=t&&14==a>>4){this.charLength=3;break}if(3>=t&&30==a>>3){this.charLength=4;break}}this.charReceived=t},l.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var a=this.charReceived,n=this.charBuffer,r=this.encoding;t+=n.slice(0,a).toString(r)}return t}},{buffer:7}],57:[function(e,t){t.exports=e("./lib/encoding.js")},{"./lib/encoding.js":58}],58:[function(e,t){(function(a){'use strict';function n(e,t,a){return t<=e&&e<=a}function s(e,t){return-1!==e.indexOf(t)}function i(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function o(e){for(var t=e+"",a=t.length,n=0,r=[];ns||57343=s)r.push(65533);else if(55296<=s&&56319>=s)if(n===a-1)r.push(65533);else{var o=t.charCodeAt(n+1);if(56320<=o&&57343>=o){r.push(65536+((1023&s)<<10)+(1023&o)),n+=1}else r.push(65533)}n+=1}return r}function l(e){for(var t="",a=0,n;a=n?t+=d(n):(n-=65536,t+=d((n>>10)+55296,(1023&n)+56320));return t}function p(e){return 0<=e&&127>=e}function c(e){this.tokens=[].slice.call(e),this.tokens.reverse()}function u(e,t){if(e)throw TypeError("Decoder error");return t||65533}function m(e){throw TypeError("The code point "+e+" could not be encoded.")}function _(e){return e=(e+"").trim().toLowerCase(),Object.prototype.hasOwnProperty.call(W,e)?W[e]:null}function f(e,t){return t?t[e]||null:null}function h(e,t){var a=t.indexOf(e);return-1===a?null:a}function g(e){if(!("encoding-indexes"in a))throw Error("Indexes missing. Did you forget to include encoding-indexes.js first?");return a["encoding-indexes"][e]}function y(e){if(39419e||1237575>6*a)+r];0>6*(a-1);s.push(128|63&i),a-=1}return s}}function k(e,t){var a=t.fatal;this.handler=function(t,n){if(n===-1)return-1;if(p(n))return n;var r=e[n-128];return null===r?u(a):r}}function v(e,t){t.fatal;this.handler=function(t,a){if(-1===a)return-1;if(H(a))return a;var n=h(a,e);return null===n&&m(a),n+128}}function I(e){var t=e.fatal,a=0,r=0,s=0;this.handler=function(e,i){if(i===-1&&0===a&&0===r&&0===s)return-1;i===-1&&(0!==a||0!==r||0!==s)&&(a=0,r=0,s=0,u(t));var o;if(0!==s){o=null,n(i,48,57)&&(o=y(10*(126*(10*(a-129)+r-48)+s-129)+i-48));var d=[r,s,i];return a=0,r=0,s=0,null===o?(e.prepend(d),u(t)):o}if(0!==r)return n(i,129,254)?(s=i,null):(e.prepend([r,i]),a=0,r=0,u(t));if(0!==a){if(n(i,48,57))return r=i,null;var l=a,c=null;a=0;var m=127>i?64:65;return(n(i,64,126)||n(i,128,254))&&(c=190*(l-129)+(i-m)),o=null===c?null:f(c,g("gb18030")),null===o&&p(i)&&e.prepend(i),null===o?u(t):o}return p(i)?i:128===i?8364:n(i,129,254)?(a=i,null):u(t)}}function R(e,t){e.fatal;this.handler=function(e,a){if(a===-1)return-1;if(H(a))return a;if(58853===a)return m(a);if(t&&8364===a)return 128;var n=h(a,g("gb18030"));if(null!==n){var r=q(n/190)+129,s=n%190,i=63>s?64:65;return[r,s+i]}if(t)return m(a);n=b(a);var o=q(n/10/126/10);n-=10*(126*(10*o));var d=q(n/10/126);n-=126*(10*d);var l=q(n/10),p=n-10*l;return[o+129,d+48,l+129,p+48]}}function O(e){var t=e.fatal,a=0;this.handler=function(e,r){if(-1===r&&0!==a)return a=0,u(t);if(-1===r&&0===a)return-1;if(0!==a){var s=a,i=null;a=0;var o=127>r?64:98;switch((n(r,64,126)||n(r,161,254))&&(i=157*(s-129)+(r-o)),i){case 1133:return[202,772];case 1135:return[202,780];case 1164:return[234,772];case 1166:return[234,780];}var d=null===i?null:f(i,g("big5"));return null===d&&p(r)&&e.prepend(r),null===d?u(t):d}return p(r)?r:n(r,129,254)?(a=r,null):u(t)}}function z(e){e.fatal;this.handler=function(e,t){if(t===-1)return-1;if(H(t))return t;var a=w(t);if(null===a)return m(t);var n=q(a/157)+129;if(161>n)return m(t);var r=a%157,s=63>r?64:98;return[n,r+s]}}function L(e){var t=e.fatal,a=!1,r=0;this.handler=function(e,s){if(-1===s&&0!==r)return r=0,u(t);if(-1===s&&0===r)return-1;if(142===r&&n(s,161,223))return r=0,65216+s;if(143===r&&n(s,161,254))return a=!0,r=s,null;if(0!==r){var i=r;r=0;var o=null;return n(i,161,254)&&n(s,161,254)&&(o=f(94*(i-161)+(s-161),g(a?"jis0212":"jis0208"))),a=!1,n(s,161,254)||e.prepend(s),null===o?u(t):o}return p(s)?s:142===s||143===s||n(s,161,254)?(r=s,null):u(t)}}function T(e){e.fatal;this.handler=function(e,t){if(t===-1)return-1;if(H(t))return t;if(165===t)return 92;if(8254===t)return 126;if(n(t,65377,65439))return[142,t-65377+161];8722===t&&(t=65293);var a=h(t,g("jis0208"));if(null===a)return m(t);var r=q(a/94)+161;return[r,a%94+161]}}function B(e){var t=e.fatal,a={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},r=a.ASCII,s=a.ASCII,i=0,o=!1;this.handler=function(e,d){switch(r){default:case a.ASCII:return 27===d?(r=a.EscapeStart,null):n(d,0,127)&&14!==d&&15!==d&&27!==d?(o=!1,d):-1===d?-1:(o=!1,u(t));case a.Roman:return 27===d?(r=a.EscapeStart,null):92===d?(o=!1,165):126===d?(o=!1,8254):n(d,0,127)&&14!==d&&15!==d&&27!==d&&92!==d&&126!==d?(o=!1,d):-1===d?-1:(o=!1,u(t));case a.Katakana:return 27===d?(r=a.EscapeStart,null):n(d,33,95)?(o=!1,65344+d):-1===d?-1:(o=!1,u(t));case a.LeadByte:return 27===d?(r=a.EscapeStart,null):n(d,33,126)?(o=!1,i=d,r=a.TrailByte,null):-1===d?-1:(o=!1,u(t));case a.TrailByte:if(27===d)return r=a.EscapeStart,u(t);if(n(d,33,126)){r=a.LeadByte;var l=94*(i-33)+d-33,p=f(l,g("jis0208"));return null===p?u(t):p}return-1===d?(r=a.LeadByte,e.prepend(d),u(t)):(r=a.LeadByte,u(t));case a.EscapeStart:return 36===d||40===d?(i=d,r=a.Escape,null):(e.prepend(d),o=!1,r=s,u(t));case a.Escape:var c=i;i=0;var m=null;if(40===c&&66===d&&(m=a.ASCII),40===c&&74===d&&(m=a.Roman),40===c&&73===d&&(m=a.Katakana),36===c&&(64===d||66===d)&&(m=a.LeadByte),null!==m){r=r=m;var _=o;return o=!0,_?u(t):null}return e.prepend([c,d]),o=!1,r=s,u(t);}}}function P(e){var t=e.fatal,a={ASCII:0,Roman:1,jis0208:2},n=a.ASCII;this.handler=function(e,t){if(-1===t&&n!==a.ASCII)return e.prepend(t),n=a.ASCII,[27,40,66];if(-1===t&&n===a.ASCII)return-1;if((n===a.ASCII||n===a.Roman)&&(14===t||15===t||27===t))return m(65533);if(n===a.ASCII&&H(t))return t;if(n===a.Roman&&(H(t)&&92!==t&&126!==t||165==t||8254==t)){if(H(t))return t;if(165===t)return 92;if(8254===t)return 126}if(H(t)&&n!==a.ASCII)return e.prepend(t),n=a.ASCII,[27,40,66];if((165===t||8254===t)&&n!==a.Roman)return e.prepend(t),n=a.Roman,[27,40,74];8722===t&&(t=65293);var r=h(t,g("jis0208"));if(null===r)return m(t);if(n!==a.jis0208)return e.prepend(t),n=a.jis0208,[27,36,66];var s=q(r/94)+33;return[s,r%94+33]}}function N(e){var t=e.fatal,a=0;this.handler=function(e,r){if(-1===r&&0!==a)return a=0,u(t);if(-1===r&&0===a)return-1;if(0!==a){var s=a,i=null;a=0;var o=127>r?64:65,d=160>s?129:193;if((n(r,64,126)||n(r,128,252))&&(i=188*(s-d)+r-o),n(i,8836,10715))return 48508+i;var l=null===i?null:f(i,g("jis0208"));return null===l&&p(r)&&e.prepend(r),null===l?u(t):l}return p(r)||128===r?r:n(r,161,223)?65216+r:n(r,129,159)||n(r,224,252)?(a=r,null):u(t)}}function D(e){e.fatal;this.handler=function(e,t){if(t===-1)return-1;if(H(t)||128===t)return t;if(165===t)return 92;if(8254===t)return 126;if(n(t,65377,65439))return t-65377+161;8722===t&&(t=65293);var a=x(t);if(null===a)return m(t);var r=q(a/188),s=31>r?129:193,i=a%188,o=63>i?64:65;return[r+s,i+o]}}function j(e){var t=e.fatal,a=0;this.handler=function(e,r){if(-1===r&&0!==a)return a=0,u(t);if(-1===r&&0===a)return-1;if(0!==a){var s=a,i=null;a=0,n(r,65,254)&&(i=190*(s-129)+(r-65));var o=null===i?null:f(i,g("euc-kr"));return null===i&&p(r)&&e.prepend(r),null===o?u(t):o}return p(r)?r:n(r,129,254)?(a=r,null):u(t)}}function U(e){e.fatal;this.handler=function(e,t){if(t===-1)return-1;if(H(t))return t;var a=h(t,g("euc-kr"));if(null===a)return m(t);var n=q(a/190)+129;return[n,a%190+65]}}function F(e,t){var a=e>>8,n=255&e;return t?[a,n]:[n,a]}function M(e,t){var a=t.fatal,r=null,s=null;this.handler=function(t,i){if(-1===i&&(null!==r||null!==s))return u(a);if(-1===i&&null===r&&null===s)return-1;if(null===r)return r=i,null;var o;if(o=e?(r<<8)+i:(i<<8)+r,r=null,null!==s){var d=s;return(s=null,n(o,56320,57343))?65536+1024*(d-55296)+(o-56320):(t.prepend(F(o,e)),u(a))}return n(o,55296,56319)?(s=o,null):n(o,56320,57343)?u(a):o}}function G(e,t){t.fatal;this.handler=function(t,a){if(a===-1)return-1;if(n(a,0,65535))return F(a,e);var r=F((a-65536>>10)+55296,e),s=F((1023&a-65536)+56320,e);return r.concat(s)}}function Z(e){e.fatal;this.handler=function(e,t){return-1===t?-1:p(t)?t:63360+t-128}}function Y(e){e.fatal;this.handler=function(e,t){return-1===t?-1:H(t)?t:n(t,63360,63487)?t-63360+128:m(t)}}"undefined"!=typeof t&&t.exports&&!a["encoding-indexes"]&&e("./encoding-indexes.js");var q=r,H=p,K=-1;c.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():K},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.pop());else this.tokens.push(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.shift());else this.tokens.unshift(e)}};(function(){}).prototype={handler:function(){}},function(){}.prototype={handler:function(){}};var X=[{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"}],W={};X.forEach(function(e){e.encodings.forEach(function(e){e.labels.forEach(function(t){W[t]=e})})});var Q={},J={},V,$;Object.defineProperty&&(Object.defineProperty(E.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(E.prototype,"fatal",{get:function(){return"fatal"===this._error_mode}}),Object.defineProperty(E.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}})),E.prototype.decode=function(e,t){var a;a="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=i(t),this._do_not_flush||(this._decoder=J[this._encoding.name]({fatal:"fatal"===this._error_mode}),this._BOMseen=!1),this._do_not_flush=!!t.stream;for(var n=new c(a),r=[],o,d;(d=n.read(),d!==K)&&!(o=this._decoder.handler(n,d),-1===o);)null!==o&&(Array.isArray(o)?r.push.apply(r,o):r.push(o));if(!this._do_not_flush){do{if(o=this._decoder.handler(n,n.read()),-1===o)break;if(null===o)continue;Array.isArray(o)?r.push.apply(r,o):r.push(o)}while(!n.endOfStream());this._decoder=null}return function(e){return!s(["UTF-8","UTF-16LE","UTF-16BE"],this._encoding.name)||this._ignoreBOM||this._BOMseen||(0