You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
konova/templates/map/client/libs/shapefilejs/4.0.2/shp.min.js

16 lines
243 KiB
JavaScript

(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 t=Math.log,o=Math.abs,l=Math.pow,d=Math.min,p=Math.floor,m=String.fromCharCode,f;return function(){function s(l,e,n){function t(o,i){if(!e[o]){if(!l[o]){var d="function"==typeof require&&require;if(!i&&d)return d(o,!0);if(r)return r(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var a=e[o]={exports:{}};l[o][0].call(a.exports,function(e){var a=l[o][1][e];return t(a||e)},a,a.exports,s,l,e,n)}return e[o].exports}for(var r="function"==typeof require&&require,a=0;a<n.length;a++)t(n[a]);return t}return s}()({1:[function(e,t){function a(e){var t=new r,a=t.write(e)+t.end();return a.replace(/\0/g,"").trim()}function n(t,r){if(console.log("encoding",t),!t)return a;try{new TextDecoder(t.trim())}catch(i){console.log("catch",i);var s=o.exec(t);return console.log("match",s),s&&!r?(console.log("m1",s[1]),n("windows-"+s[1],!0)):a}return function(e){var a=new TextDecoder(t),n=a.decode(e,{stream:!0})+a.decode();return n.replace(/\0/g,"").trim()}}e("text-encoding-polyfill");var r=e("string_decoder").StringDecoder;t.exports=n;var o=/^(?:ANSI\s)?(\d+)$/m},{string_decoder:21,"text-encoding-polyfill":3}],2:[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<t&&(n.push({name:a(e.slice(r,r+11)),dataType:m(e.readUInt8(r+11)),len:e.readUInt8(r+16),decimal:e.readUInt8(r+17)}),13!==e.readUInt8(r+32));)r+=32;return n}function r(e,t,a,n,r){var o=e.slice(t,t+a),s=r(o);return"N"===n||"F"===n||"O"===n?parseFloat(s,10):"D"===n?new Date(s.slice(0,4),parseInt(s.slice(4,6),10)-1,s.slice(6,8)):"L"===n?"y"===s.toLowerCase()||"t"===s.toLowerCase():s}function o(e,t,a,n){for(var o={},s=0,l=a.length,d,p;s<l;)p=a[s],d=r(e,t,p.len,p.dataType,n),t+=p.len,"undefined"!=typeof d&&(o[p.name]=d),s++;return o}var s=e("./decoder");t.exports=function(e,t){for(var r=s(t),i=a(e),l=n(e,i.headerLen-1,r),d=(l.length+1<<5)+2,p=i.recLen,u=i.records,c=[];u;)c.push(o(e,d,l,r)),d+=p,u--;return c}},{"./decoder":1}],3:[function(e,t){t.exports=e("./lib/encoding.js")},{"./lib/encoding.js":4}],4:[function(e,t){(function(a){'use strict';function n(e,t,a){return t<=e&&e<=a}function r(e,t){return-1!==e.indexOf(t)}function o(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function s(e){for(var t=e+"",a=t.length,n=0,r=[];n<a;){var o=t.charCodeAt(n);if(55296>o||57343<o)r.push(o);else if(56320<=o&&57343>=o)r.push(65533);else if(55296<=o&&56319>=o)if(n===a-1)r.push(65533);else{var s=t.charCodeAt(n+1);if(56320<=s&&57343>=s){r.push(65536+((1023&o)<<10)+(1023&s)),n+=1}else r.push(65533)}n+=1}return r}function i(e){for(var t="",a=0,n;a<e.length;++a)n=e[a],65535>=n?t+=m(n):(n-=65536,t+=m((n>>10)+55296,(1023&n)+56320));return t}function l(e){return 0<=e&&127>=e}function d(e){this.tokens=[].slice.call(e),this.tokens.reverse()}function u(e,t){if(e)throw TypeError("Decoder error");return t||65533}function c(e){throw TypeError("The code point "+e+" could not be encoded.")}function f(e){return e=(e+"").trim().toLowerCase(),Object.prototype.hasOwnProperty.call(J,e)?J[e]:null}function h(e,t){return t?t[e]||null:null}function _(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(39419<e&&189e3>e||1237575<e)return null;if(7457===e)return 59335;var t=0,a=0,n=g("gb18030-ranges"),r;for(r=0;r<n.length;++r){var o=n[r];if(o[0]<=e)t=o[0],a=o[1];else break}return a+e-t}function x(e){if(59335===e)return 7457;var t=0,a=0,n=g("gb18030-ranges"),r;for(r=0;r<n.length;++r){var o=n[r];if(o[1]<=
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/'use strict';function t(e){if(2147483647<e)throw new RangeError("The value \""+e+"\" is invalid for option \"size\"");var t=new Uint8Array(e);return t.__proto__=n.prototype,t}function n(e,t,a){if("number"==typeof e){if("string"==typeof t)throw new TypeError("The \"string\" argument must be of type string. Received type number");return i(e)}return r(e,t,a)}function r(e,t,a){if("string"==typeof e)return p(e,t);if(ArrayBuffer.isView(e))return u(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(H(e,ArrayBuffer)||e&&H(e.buffer,ArrayBuffer))return c(e,t,a);if("number"==typeof e)throw new TypeError("The \"value\" argument must not be of type number. Received type number");var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return n.from(r,t,a);var o=f(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return n.from(e[Symbol.toPrimitive]("string"),t,a);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function o(e){if("number"!=typeof e)throw new TypeError("\"size\" argument must be of type number");else if(0>e)throw new RangeError("The value \""+e+"\" is invalid for option \"size\"")}function s(e,a,n){return o(e),0>=e?t(e):void 0===a?t(e):"string"==typeof n?t(e).fill(a,n):t(e).fill(a)}function i(e){return o(e),t(0>e?0:0|h(e))}function p(e,a){if(("string"!=typeof a||""===a)&&(a="utf8"),!n.isEncoding(a))throw new TypeError("Unknown encoding: "+a);var r=0|_(e,a),o=t(r),s=o.write(e,a);return s!==r&&(o=o.slice(0,s)),o}function u(e){for(var a=0>e.length?0:0|h(e.length),n=t(a),r=0;r<a;r+=1)n[r]=255&e[r];return n}function c(e,t,a){if(0>t||e.byteLength<t)throw new RangeError("\"offset\" is outside of buffer bounds");if(e.byteLength<t+(a||0))throw new RangeError("\"length\" is outside of buffer bounds");var r;return r=void 0===t&&void 0===a?new Uint8Array(e):void 0===a?new Uint8Array(e,t):new Uint8Array(e,t,a),r.__proto__=n.prototype,r}function f(e){if(n.isBuffer(e)){var a=0|h(e.length),r=t(a);return 0===r.length?r:(e.copy(r,0,0,a),r)}return void 0===e.length?"Buffer"===e.type&&Array.isArray(e.data)?u(e.data):void 0:"number"!=typeof e.length||K(e.length)?t(0):u(e)}function h(e){if(e>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|e}function _(e,t){if(n.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||H(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError("The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type "+typeof e);var a=e.length,r=2<arguments.length&&!0===arguments[2];if(!r&&0===a)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return a;case"utf8":case"utf-8":return M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*a;case"hex":return a>>>1;case"base64":return Z(e).length;default:if(o)return r?-1:M(e).length;t=(""+t).toLowerCase(),o=!0;}}function g(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 z(this,t,a);case"utf8":case"utf-8":return I(this,t,a);case"ascii":return B(this,t,a);case"latin1":case"binary":return L(this,t,a);case"base64":return A(this,t,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,a);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0;}}function y(e,t,a){var n=e[t];e[t]=e[a],e[a]=n}function x(e,t,a,r,o){if(0===e.length)return-1;if("string"==typeof a?(r=a,a=0):2147483647<a?a=2147483647:-2147483648>a&&(a=-2147483648),a=+a,K(a)&&(a=o?0:e.length-1),0>a&&(a=e.length+a),a>=e.length){if(o)return-1;a=e.length-1}else if(0>a)if(o)a=0;else return-1;if("string"==typeof t&&(t=n.from(t,r)),n.isBuffer(t))return 0===t.length?-1:b(e,t,a,r,o);if("number"==typeof t)ret
JSZip v3.6.0 - A JavaScript class for generating and reading zip files
<http://stuartk.com/jszip>
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown.
JSZip uses the library pako released under the MIT license :
https://github.com/nodeca/pako/blob/master/LICENSE
*/!function(t){"object"==typeof r&&"undefined"!=typeof n?n.exports=t():"function"==typeof f&&f.amd?f([],t):("undefined"==typeof window?"undefined"==typeof s?"undefined"==typeof self?this:self:s:window).JSZip=t()}(function(){return function l(s,d,o){function n(p,r){if(!d[p]){if(!s[p]){var e="function"==typeof a&&a;if(!r&&e)return e(p,!0);if(i)return i(p,!0);var t=new Error("Cannot find module '"+p+"'");throw t.code="MODULE_NOT_FOUND",t}var u=d[p]={exports:{}};s[p][0].call(u.exports,function(a){var e=s[p][1][a];return n(e||a)},u,u.exports,l,s,d,o)}return d[p].exports}for(var i="function"==typeof a&&a,t=0;t<o.length;t++)n(o[t]);return n}({1:[function(a,i,t){(function(s){!function(a){"object"==typeof t&&void 0!==i?i.exports=a():("undefined"==typeof window?void 0===s?"undefined"==typeof self?this:self:s:window).JSZip=a()}(function(){return function l(s,d,o){function n(p,t){if(!d[p]){if(!s[p]){var e="function"==typeof a&&a;if(!t&&e)return e(p,!0);if(i)return i(p,!0);var r=new Error("Cannot find module '"+p+"'");throw r.code="MODULE_NOT_FOUND",r}var u=d[p]={exports:{}};s[p][0].call(u.exports,function(t){return n(s[p][1][t]||t)},u,u.exports,l,s,d,o)}return d[p].exports}for(var i="function"==typeof a&&a,t=0;t<o.length;t++)n(o[t]);return n}({1:[function(a,i,t){(function(s){!function(a){"object"==typeof t&&void 0!==i?i.exports=a():("undefined"==typeof window?void 0===s?"undefined"==typeof self?this:self:s:window).JSZip=a()}(function(){return function l(s,d,o){function n(p,t){if(!d[p]){if(!s[p]){var e="function"==typeof a&&a;if(!t&&e)return e(p,!0);if(i)return i(p,!0);var r=new Error("Cannot find module '"+p+"'");throw r.code="MODULE_NOT_FOUND",r}var u=d[p]={exports:{}};s[p][0].call(u.exports,function(t){return n(s[p][1][t]||t)},u,u.exports,l,s,d,o)}return d[p].exports}for(var i="function"==typeof a&&a,t=0;t<o.length;t++)n(o[t]);return n}({1:[function(a,i,t){(function(s){!function(a){"object"==typeof t&&void 0!==i?i.exports=a():("undefined"==typeof window?void 0===s?"undefined"==typeof self?this:self:s:window).JSZip=a()}(function(){return function l(s,d,o){function n(p,t){if(!d[p]){if(!s[p]){var e="function"==typeof a&&a;if(!t&&e)return e(p,!0);if(i)return i(p,!0);var r=new Error("Cannot find module '"+p+"'");throw r.code="MODULE_NOT_FOUND",r}var u=d[p]={exports:{}};s[p][0].call(u.exports,function(t){return n(s[p][1][t]||t)},u,u.exports,l,s,d,o)}return d[p].exports}for(var i="function"==typeof a&&a,t=0;t<o.length;t++)n(o[t]);return n}({1:[function(a,i,t){(function(s){!function(a){"object"==typeof t&&void 0!==i?i.exports=a():("undefined"==typeof window?void 0===s?"undefined"==typeof self?this:self:s:window).JSZip=a()}(function(){return function l(s,d,o){function n(p,t){if(!d[p]){if(!s[p]){var e="function"==typeof a&&a;if(!t&&e)return e(p,!0);if(i)return i(p,!0);var r=new Error("Cannot find module '"+p+"'");throw r.code="MODULE_NOT_FOUND",r}var u=d[p]={exports:{}};s[p][0].call(u.exports,function(t){return n(s[p][1][t]||t)},u,u.exports,l,s,d,o)}return d[p].exports}for(var i="function"==typeof a&&a,t=0;t<o.length;t++)n(o[t]);return n}({1:[function(a,i,t){(function(n){!function(a){"object"==typeof t&&void 0!==i?i.exports=a():("undefined"==typeof window?void 0===n?"undefined"==typeof self?this:self:n:window).JSZip=a()}(function(){return function l(s,d,o){function n(p,t){if(!d[p]){if(!s[p]){var e="function"==typeof a&&a;if(!t&&e)return e(p,!0);if(i)return i(p,!0);var r=new Error("Cannot find module '"+p+"'");throw r.code="MODULE_NOT_FOUND",r}var u=d[p]={exports:{}};s[p][0].call(u.exports,function(t){return n(s[p][1][t]||t)},u,u.exports,l,s,d,o)}return d[p].exports}for(var i="function"==typeof a&&a,t=0;t<o.length;t++)n(o[t]);return n}({1:[function(a,e,t){"use strict";var p=a("./utils"),d=a("./support");t.encode=function(c){for(var e=[],u=0,m=c.length,f=m,_="string"!==p.getTypeOf(c),d,g,y,x,b,w,k;u<c.length;)f=m-u,y=_?(d=c[u++],g=u<m?c[u++]:0,u<m?c[u++]:0):(d=c.charCodeAt(u++),g=u<m?c.charCodeAt(u++):0,u<m?c.charCodeAt(u++):0),x=d>>2,b=(3&d)<<4|g>>4,w=1<f?(15&g)<<2|y>>6:64,k=2<f?63&y:64,e.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst